@longarc/mdash 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +278 -0
  2. package/dist/checkpoint/engine.d.ts +208 -0
  3. package/dist/checkpoint/engine.d.ts.map +1 -0
  4. package/dist/checkpoint/engine.js +369 -0
  5. package/dist/checkpoint/engine.js.map +1 -0
  6. package/dist/context/engine.d.ts +197 -0
  7. package/dist/context/engine.d.ts.map +1 -0
  8. package/dist/context/engine.js +392 -0
  9. package/dist/context/engine.js.map +1 -0
  10. package/dist/core/commitment.d.ts +154 -0
  11. package/dist/core/commitment.d.ts.map +1 -0
  12. package/dist/core/commitment.js +305 -0
  13. package/dist/core/commitment.js.map +1 -0
  14. package/dist/core/crypto.d.ts +100 -0
  15. package/dist/core/crypto.d.ts.map +1 -0
  16. package/dist/core/crypto.js +243 -0
  17. package/dist/core/crypto.js.map +1 -0
  18. package/dist/index.d.ts +121 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +234 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/mcca/engine.d.ts +260 -0
  23. package/dist/mcca/engine.d.ts.map +1 -0
  24. package/dist/mcca/engine.js +518 -0
  25. package/dist/mcca/engine.js.map +1 -0
  26. package/dist/physics/engine.d.ts +165 -0
  27. package/dist/physics/engine.d.ts.map +1 -0
  28. package/dist/physics/engine.js +371 -0
  29. package/dist/physics/engine.js.map +1 -0
  30. package/dist/tee/engine.d.ts +285 -0
  31. package/dist/tee/engine.d.ts.map +1 -0
  32. package/dist/tee/engine.js +505 -0
  33. package/dist/tee/engine.js.map +1 -0
  34. package/dist/warrant/engine.d.ts +195 -0
  35. package/dist/warrant/engine.d.ts.map +1 -0
  36. package/dist/warrant/engine.js +409 -0
  37. package/dist/warrant/engine.js.map +1 -0
  38. package/dist/zk/engine.d.ts +243 -0
  39. package/dist/zk/engine.d.ts.map +1 -0
  40. package/dist/zk/engine.js +489 -0
  41. package/dist/zk/engine.js.map +1 -0
  42. package/package.json +25 -0
  43. package/src/__tests__/phase1.test.ts +1120 -0
  44. package/src/__tests__/phase2-4.test.ts +898 -0
  45. package/src/checkpoint/engine.ts +532 -0
  46. package/src/context/engine.ts +598 -0
  47. package/src/core/commitment.ts +438 -0
  48. package/src/core/crypto.ts +304 -0
  49. package/src/index.ts +320 -0
  50. package/src/mcca/engine.ts +778 -0
  51. package/src/physics/engine.ts +563 -0
  52. package/src/tee/engine.ts +810 -0
  53. package/src/warrant/engine.ts +625 -0
  54. package/src/zk/engine.ts +730 -0
  55. package/tsconfig.json +21 -0
package/README.md ADDED
@@ -0,0 +1,278 @@
1
+ # mdash v3.0
2
+
3
+ > **"The best defense is the fastest seal."**
4
+
5
+ Liability infrastructure for autonomous AI agents. Three-layer cryptographic attestation that makes agent deployments insurable.
6
+
7
+ ## Architecture
8
+
9
+ ```
10
+ ┌─────────────────────────────────────────────────────────────────────────┐
11
+ │ APPLICATION LAYER │
12
+ │ Kai Command Center │ Ember │ Enterprise │
13
+ ├─────────────────────────────────────────────────────────────────────────┤
14
+ │ mdash v3.0 PROTOCOL │
15
+ │ Warrants │ Physics │ Checkpoints │ SCA │ MCCA │ Recovery │
16
+ ├─────────────────────────────────────────────────────────────────────────┤
17
+ │ THREE-LAYER ATTESTATION │
18
+ │ L1: Commitment (<1ms) │ L2: TEE (<10ms) │ L3: ZK Proofs (async) │
19
+ ├─────────────────────────────────────────────────────────────────────────┤
20
+ │ CRYPTOGRAPHIC CORE │
21
+ │ SHA-256 │ HMAC-SHA256 │ HKDF │ Web Crypto API │
22
+ └─────────────────────────────────────────────────────────────────────────┘
23
+ ```
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ npm install @longarcstudios/mdash
29
+ ```
30
+
31
+ ## Quick Start
32
+
33
+ ```typescript
34
+ import { createMdash } from '@longarcstudios/mdash';
35
+
36
+ // Initialize protocol with all layers
37
+ const mdash = createMdash({
38
+ sealKey: process.env.MDASH_SEAL_KEY!,
39
+ teePlatform: 'simulated', // 'nitro' | 'sgx' | 'simulated'
40
+ enableZKProofs: true,
41
+ enableMCCA: true,
42
+ });
43
+ await mdash.initialize();
44
+
45
+ // Pre-stage a warrant
46
+ await mdash.prestageWarrant({
47
+ agentId: 'trading-bot-001',
48
+ policyId: 'financial-transfer-v2',
49
+ tier: 'T2',
50
+ constraints: { maxAmount: 10000 },
51
+ durationMs: 30 * 24 * 60 * 60 * 1000,
52
+ issuedBy: 'admin@example.com',
53
+ });
54
+
55
+ // Execute with full three-layer attestation
56
+ const result = await mdash.execute({
57
+ agentId: 'trading-bot-001',
58
+ action: 'transfer',
59
+ actionParams: { amount: 500, destination: 'account-123' },
60
+ execute: async () => {
61
+ return { success: true, txId: 'tx-abc123' };
62
+ },
63
+ generateZKProof: true, // For insurance claims
64
+ });
65
+
66
+ console.log(result.attestation.platform); // 'simulated' | 'nitro' | 'sgx'
67
+ console.log(result.zkProof?.status); // 'queued' -> 'verified'
68
+ ```
69
+
70
+ ## Three-Layer Attestation Model
71
+
72
+ ### L1: Commitment Layer (<1ms)
73
+ Instant cryptographic sealing for every operation.
74
+
75
+ ```typescript
76
+ // Direct commitment
77
+ const seal = await mdash.commitment.commit(data, 'operation-id');
78
+
79
+ // Verify with O(log n) proof
80
+ const valid = await mdash.commitment.verify(seal);
81
+ ```
82
+
83
+ ### L2: TEE Attestation (<10ms)
84
+ Hardware-rooted attestation via AWS Nitro Enclaves or Intel SGX.
85
+
86
+ ```typescript
87
+ // Attest with hardware TEE
88
+ const attestation = await mdash.tee.attest(data, commitmentId);
89
+
90
+ // Verify remote attestation
91
+ const verifier = new TEEVerifier();
92
+ verifier.trustMeasurement(attestation.measurement);
93
+ const result = await verifier.verifyRemote(attestation);
94
+ ```
95
+
96
+ **Supported Platforms:**
97
+ | Platform | Memory Encryption | Remote Attestation | Key Sealing |
98
+ |----------|------------------|-------------------|-------------|
99
+ | AWS Nitro | ✓ | ✓ (PCR) | ✓ |
100
+ | Intel SGX | ✓ | ✓ (Quote) | ✓ |
101
+ | Simulated | ✗ | ✓ | HMAC |
102
+
103
+ ### L3: ZK Proofs (async)
104
+ Mathematically bulletproof attestation for disputes and insurance.
105
+
106
+ ```typescript
107
+ // Request proof (returns immediately)
108
+ const zkDoc = await mdash.zk.requestProof({
109
+ type: 'action_compliance',
110
+ statement: {
111
+ description: 'Prove action met constraints',
112
+ claim: { action, warrant, result },
113
+ },
114
+ priority: 'high',
115
+ });
116
+
117
+ // Wait for completion
118
+ const completed = await mdash.zk.waitForProof(zkDoc.id, 30000);
119
+ ```
120
+
121
+ **Circuit Types:**
122
+ | Circuit | Use Case | Est. Proving Time |
123
+ |---------|----------|-------------------|
124
+ | commitment_inclusion | Prove data in Merkle tree | ~500ms |
125
+ | warrant_validity | Prove warrant was valid | ~1s |
126
+ | checkpoint_chain | Prove checkpoint sequence | ~5s |
127
+ | action_compliance | Prove action met constraints | ~1.5s |
128
+ | audit_trail | Complete audit proof | ~20s |
129
+
130
+ ## MCCA v3 (Manifold-Constrained Context Architecture)
131
+
132
+ Based on DeepSeek's research on constrained context windows.
133
+
134
+ ```typescript
135
+ // Add context with influence tracking
136
+ const fragment = await mdash.mcca.addFragment({
137
+ content: { message: 'User request' },
138
+ source_class: 'user',
139
+ region: 'task',
140
+ token_count: 50,
141
+ });
142
+
143
+ // Check context health
144
+ const health = await mdash.contextWindow.getHealth();
145
+ console.log(health.drift.severity); // 'none' | 'low' | 'medium' | 'high' | 'critical'
146
+
147
+ // Generate manifold commitment proof
148
+ const proof = await mdash.mcca.generateCommitmentProof();
149
+ ```
150
+
151
+ **Influence Budget (Default):**
152
+ | Source Class | Budget | Description |
153
+ |--------------|--------|-------------|
154
+ | system | 30% | System prompts, policies |
155
+ | user | 35% | User messages |
156
+ | agent | 15% | Agent-generated content |
157
+ | tool | 10% | Tool outputs |
158
+ | memory | 5% | Retrieved memories |
159
+ | external | 5% | External APIs, web content |
160
+
161
+ ## Latency SLAs
162
+
163
+ | Operation | P50 | P99 | Breach Action |
164
+ |-----------|-----|-----|---------------|
165
+ | L1 Commitment | <0.5ms | <1ms | Log warning |
166
+ | L2 TEE Attestation | <5ms | <10ms | Fallback to simulated |
167
+ | Warrant Activation | <5ms | <10ms | Reject if exceeded |
168
+ | Checkpoint Creation | <0.5ms | <1ms | Log warning |
169
+ | ZK Proof | 100ms-20s | async | Queue with priority |
170
+
171
+ ## Insurance Claims
172
+
173
+ Generate insurance-grade proofs for claims:
174
+
175
+ ```typescript
176
+ import { InsuranceClaimProof } from '@longarcstudios/mdash';
177
+
178
+ const helper = new InsuranceClaimProof(mdash.zk);
179
+
180
+ const claimProof = await helper.generateClaim({
181
+ claimId: 'CLM-2026-001',
182
+ policyId: 'POL-ENTERPRISE-001',
183
+ incidentDescription: 'Unauthorized transaction',
184
+ warrantId: 'w-12345678',
185
+ checkpointIds: ['cp-001', 'cp-002'],
186
+ actionDetails: { type: 'transfer', amount: 50000 },
187
+ amount: 50000,
188
+ currency: 'USD',
189
+ });
190
+
191
+ // Wait for proof generation
192
+ const verified = await mdash.zk.waitForProof(claimProof.id, 60000);
193
+ ```
194
+
195
+ ## Warrant System
196
+
197
+ Three-tier warrant hierarchy with speculative issuance:
198
+
199
+ ```typescript
200
+ // T1: Low risk (auto-approve)
201
+ // T2: Medium risk (policy-based)
202
+ // T3: High risk (manual approval required)
203
+
204
+ const warrant = await mdash.prestageWarrant({
205
+ agentId: 'agent-001',
206
+ policyId: 'api-access-v1',
207
+ tier: 'T2',
208
+ constraints: {
209
+ maxCalls: 1000,
210
+ maxAmount: 10000,
211
+ allowedDomains: ['api.example.com'],
212
+ },
213
+ durationMs: 24 * 60 * 60 * 1000, // 24 hours
214
+ issuedBy: 'admin@company.com',
215
+ });
216
+
217
+ // Revoke with audit trail
218
+ await mdash.revokeWarrant(warrant.id, 'policy violation', {
219
+ type: 'user',
220
+ id: 'admin@company.com',
221
+ });
222
+ ```
223
+
224
+ ## Testing
225
+
226
+ ```bash
227
+ npm test # Run all tests
228
+ npm run test:watch # Watch mode
229
+ npm run test:coverage # Coverage report
230
+ ```
231
+
232
+ ## API Reference
233
+
234
+ ### MdashProtocol
235
+
236
+ | Method | Description |
237
+ |--------|-------------|
238
+ | `initialize()` | Initialize all engines |
239
+ | `execute(params)` | Execute action with full attestation |
240
+ | `prestageWarrant(params)` | Pre-stage speculative warrant |
241
+ | `revokeWarrant(id, reason, actor)` | Revoke warrant |
242
+ | `generateAuditProof(params)` | Generate ZK audit proof |
243
+ | `getStats()` | Get comprehensive statistics |
244
+ | `shutdown()` | Clean shutdown |
245
+
246
+ ### Engines
247
+
248
+ | Engine | Access | Purpose |
249
+ |--------|--------|---------|
250
+ | `commitment` | `mdash.commitment` | L1 Merkle sealing |
251
+ | `warrant` | `mdash.warrant` | Warrant lifecycle |
252
+ | `checkpoint` | `mdash.checkpoint` | Event-driven checkpoints |
253
+ | `physics` | `mdash.physics` | Constraint validation |
254
+ | `tee` | `mdash.tee` | L2 hardware attestation |
255
+ | `zk` | `mdash.zk` | L3 ZK proofs |
256
+ | `mcca` | `mdash.mcca` | Context architecture |
257
+
258
+ ## Version
259
+
260
+ ```typescript
261
+ import { VERSION } from '@longarcstudios/mdash';
262
+
263
+ console.log(VERSION);
264
+ // {
265
+ // protocol: '3.0.0',
266
+ // codename: 'Sealed Execution',
267
+ // releaseDate: '2026-01',
268
+ // features: [...]
269
+ // }
270
+ ```
271
+
272
+ ## License
273
+
274
+ MIT © Long Arc Studios
275
+
276
+ ---
277
+
278
+ *Governance without control. Complexity without chaos.* 🫡
@@ -0,0 +1,208 @@
1
+ /**
2
+ * mdash v3.0 - Checkpoint Surety
3
+ *
4
+ * Event-driven checkpoints replace time-driven intervals.
5
+ * "State transition triggers seal, not time intervals."
6
+ *
7
+ * Target Latency:
8
+ * - Checkpoint creation: <0.5ms P50, <1ms P99
9
+ *
10
+ * Key Property:
11
+ * - Single action blast radius: if an action fails, only that action is affected
12
+ */
13
+ import { Hash, Seal, Timestamp, CheckpointId, WarrantId } from '../core/crypto';
14
+ import { CommitmentEngine } from '../core/commitment';
15
+ export type CheckpointTrigger = 'action_start' | 'action_complete' | 'state_change' | 'constraint_check' | 'error' | 'recovery' | 'manual';
16
+ export type CheckpointStatus = 'pending' | 'sealed' | 'verified' | 'failed';
17
+ export interface CheckpointState {
18
+ /** Current execution state */
19
+ execution_state: Record<string, unknown>;
20
+ /** Active warrant at checkpoint */
21
+ warrant_id: WarrantId | null;
22
+ /** Action being performed */
23
+ action: string;
24
+ /** Action parameters */
25
+ params: Record<string, unknown>;
26
+ /** Result (if action complete) */
27
+ result?: unknown;
28
+ /** Error (if failed) */
29
+ error?: string;
30
+ }
31
+ export interface Checkpoint {
32
+ /** Unique checkpoint identifier */
33
+ id: CheckpointId;
34
+ /** Agent this checkpoint belongs to */
35
+ agent_id: string;
36
+ /** Trigger that created this checkpoint */
37
+ trigger: CheckpointTrigger;
38
+ /** Current status */
39
+ status: CheckpointStatus;
40
+ /** State at checkpoint */
41
+ state: CheckpointState;
42
+ /** Parent checkpoint (for happens-before) */
43
+ parent_id: CheckpointId | null;
44
+ /** Physics validation score */
45
+ physics_score: number;
46
+ /** Timestamp of creation */
47
+ created_at: Timestamp;
48
+ /** Content hash */
49
+ hash: Hash;
50
+ /** HMAC seal */
51
+ seal: Seal;
52
+ /** L1 commitment reference */
53
+ commitment_id: string | null;
54
+ /** Protocol version */
55
+ version: 'v3.0';
56
+ }
57
+ export interface CheckpointChain {
58
+ /** Head of the chain */
59
+ head: Checkpoint;
60
+ /** Previous checkpoints */
61
+ predecessors: CheckpointId[];
62
+ /** Chain length */
63
+ length: number;
64
+ /** Chain hash (rolling) */
65
+ chain_hash: Hash;
66
+ }
67
+ /**
68
+ * Lamport-style happens-before ordering for checkpoints
69
+ * Ensures causal consistency in distributed execution
70
+ */
71
+ export declare class HappensBeforeLattice {
72
+ private checkpoints;
73
+ private children;
74
+ private roots;
75
+ /**
76
+ * Add a checkpoint to the lattice
77
+ */
78
+ add(checkpoint: Checkpoint): void;
79
+ /**
80
+ * Check if a happens-before b
81
+ */
82
+ happensBefore(a: CheckpointId, b: CheckpointId): boolean;
83
+ /**
84
+ * Check if two checkpoints are concurrent (neither happens-before the other)
85
+ */
86
+ areConcurrent(a: CheckpointId, b: CheckpointId): boolean;
87
+ /**
88
+ * Get the causal history of a checkpoint
89
+ */
90
+ getCausalHistory(id: CheckpointId): Checkpoint[];
91
+ /**
92
+ * Get all checkpoints after a given one
93
+ */
94
+ getSuccessors(id: CheckpointId): Checkpoint[];
95
+ /**
96
+ * Find the latest common ancestor of two checkpoints
97
+ */
98
+ findLCA(a: CheckpointId, b: CheckpointId): CheckpointId | null;
99
+ /**
100
+ * Get statistics
101
+ */
102
+ getStats(): {
103
+ total: number;
104
+ roots: number;
105
+ maxDepth: number;
106
+ };
107
+ }
108
+ export declare class CheckpointEngine {
109
+ private key;
110
+ private commitmentEngine;
111
+ private lattice;
112
+ private checkpoints;
113
+ private agentHeads;
114
+ constructor(commitmentEngine: CommitmentEngine);
115
+ /**
116
+ * Initialize the engine with a seal key
117
+ */
118
+ initialize(sealKey: string): Promise<void>;
119
+ /**
120
+ * Create a checkpoint
121
+ * Target: <0.5ms P50, <1ms P99
122
+ */
123
+ createCheckpoint(params: {
124
+ agent_id: string;
125
+ trigger: CheckpointTrigger;
126
+ state: CheckpointState;
127
+ physics_score?: number;
128
+ }): Promise<Checkpoint>;
129
+ /**
130
+ * Create checkpoint for action start
131
+ */
132
+ onActionStart(params: {
133
+ agent_id: string;
134
+ warrant_id: WarrantId;
135
+ action: string;
136
+ params: Record<string, unknown>;
137
+ }): Promise<Checkpoint>;
138
+ /**
139
+ * Create checkpoint for action completion
140
+ */
141
+ onActionComplete(params: {
142
+ agent_id: string;
143
+ warrant_id: WarrantId;
144
+ action: string;
145
+ params: Record<string, unknown>;
146
+ result: unknown;
147
+ physics_score: number;
148
+ }): Promise<Checkpoint>;
149
+ /**
150
+ * Create checkpoint for error
151
+ */
152
+ onError(params: {
153
+ agent_id: string;
154
+ warrant_id: WarrantId | null;
155
+ action: string;
156
+ error: string;
157
+ }): Promise<Checkpoint>;
158
+ /**
159
+ * Verify a checkpoint
160
+ */
161
+ verify(checkpoint: Checkpoint): Promise<boolean>;
162
+ /**
163
+ * Get checkpoint by ID
164
+ */
165
+ get(id: CheckpointId): Checkpoint | null;
166
+ /**
167
+ * Get the latest checkpoint for an agent
168
+ */
169
+ getHead(agentId: string): Checkpoint | null;
170
+ /**
171
+ * Get checkpoint chain for an agent
172
+ */
173
+ getChain(agentId: string, limit?: number): Checkpoint[];
174
+ /**
175
+ * Check if checkpoint a happened before checkpoint b
176
+ */
177
+ happensBefore(a: CheckpointId, b: CheckpointId): boolean;
178
+ /**
179
+ * Get statistics
180
+ */
181
+ getStats(): {
182
+ total: number;
183
+ agents: number;
184
+ latticeStats: ReturnType<HappensBeforeLattice['getStats']>;
185
+ };
186
+ }
187
+ /**
188
+ * Analyzes the impact scope of a failed action
189
+ * "Single action blast radius" means failures are isolated
190
+ */
191
+ export declare class BlastRadiusAnalyzer {
192
+ private lattice;
193
+ constructor(lattice: HappensBeforeLattice);
194
+ /**
195
+ * Analyze the blast radius of a failed checkpoint
196
+ * Returns affected checkpoints that depend on the failed one
197
+ */
198
+ analyze(failedId: CheckpointId): {
199
+ affected: Checkpoint[];
200
+ isolated: boolean;
201
+ recoveryPoint: CheckpointId | null;
202
+ };
203
+ /**
204
+ * Check if an action can be safely retried
205
+ */
206
+ canRetry(checkpointId: CheckpointId): boolean;
207
+ }
208
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/checkpoint/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,SAAS,EAOV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,MAAM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