Skip to content

Commit 0e9b59f

Browse files
hyperpolymathclaude
andcommitted
feat: add 10 V-lang connectors (triplestore, kerberos, ntp, smtp, dhcp, coap, snmp, radius, backup, ca)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ae51ba8 commit 0e9b59f

File tree

50 files changed

+4652
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4652
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
= v-backup
2+
// SPDX-License-Identifier: PMPL-1.0-or-later
3+
4+
Multi-backend backup client for the V-Ecosystem API interfaces layer.
5+
Supports Restic (REST API), BorgBackup (SSH), and rsync with a unified interface for snapshot creation, listing, restoration, pruning, and integrity checking.
6+
Handles encryption-at-rest, deduplication, and incremental backups.
7+
8+
== Author
9+
10+
Jonathan D.A. Jewell
11+
12+
== Source
13+
14+
`src/backup.v`
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Trustfile.a2ml -- v-backup
2+
# SPDX-License-Identifier: PMPL-1.0-or-later
3+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
4+
#
5+
# Contractile trust specification for the v-backup protocol module.
6+
# Evaluated by the contractile-cli (must/trust/dust/intend/k9) toolchain.
7+
8+
[trust]
9+
post-quantum-keys = "pending"
10+
threat-model = "data-loss-encryption-key-management"
11+
formal-verification = "idris2-abi"
12+
audit-status = "unaudited"
13+
14+
[must]
15+
invariant-checks = ["input-validation", "path-traversal-prevention", "encryption-key-protection", "retention-policy-enforcement", "integrity-verification"]
16+
build-contract = "v build src/"
17+
18+
[dust]
19+
recovery = "restore-from-alternate-snapshot"
20+
rollback = "abort-and-verify-repository"
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
-- SPDX-License-Identifier: PMPL-1.0-or-later
2+
-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)
3+
--
4+
-- Idris2 ABI type definitions for the v-backup protocol.
5+
-- Multi-backend backup types (Restic, BorgBackup, rsync),
6+
-- snapshot structures, retention policies, and integrity checks.
7+
8+
module Types
9+
10+
import Data.List
11+
12+
||| Backup backend selection.
13+
public export
14+
data Backend : Type where
15+
Restic : Backend -- Restic REST API or local repository
16+
Borg : Backend -- BorgBackup (local or SSH)
17+
Rsync : Backend -- rsync over SSH
18+
19+
||| Snapshot status.
20+
public export
21+
data SnapshotStatus : Type where
22+
Complete : SnapshotStatus
23+
Partial : SnapshotStatus
24+
Corrupted : SnapshotStatus
25+
Pruned : SnapshotStatus
26+
27+
||| Compression algorithm selection.
28+
public export
29+
data Compression : Type where
30+
NoCompression : Compression
31+
Lz4 : Compression
32+
Zstd : Compression
33+
AutoCompress : Compression
34+
35+
||| A backup snapshot with metadata.
36+
public export
37+
record Snapshot where
38+
constructor MkSnapshot
39+
snapshotId : String
40+
timestamp : Nat -- Unix timestamp
41+
hostname : String
42+
paths : List String
43+
tags : List String
44+
sizeBytes : Nat
45+
status : SnapshotStatus
46+
47+
||| Retention policy for snapshot pruning.
48+
public export
49+
record RetentionPolicy where
50+
constructor MkRetentionPolicy
51+
keepDaily : Nat
52+
keepWeekly : Nat
53+
keepMonthly : Nat
54+
maxAgeDays : Nat
55+
56+
||| Integrity check result.
57+
public export
58+
record CheckResult where
59+
constructor MkCheckResult
60+
passed : Bool
61+
errors : List String
62+
packsChecked : Nat
63+
dataChecked : Nat

0 commit comments

Comments
 (0)