@motebit/protocol 1.1.0 → 1.3.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 (49) hide show
  1. package/dist/artifact-type.d.ts +118 -0
  2. package/dist/artifact-type.d.ts.map +1 -0
  3. package/dist/artifact-type.js +97 -0
  4. package/dist/artifact-type.js.map +1 -0
  5. package/dist/audience.d.ts +108 -0
  6. package/dist/audience.d.ts.map +1 -0
  7. package/dist/audience.js +104 -0
  8. package/dist/audience.js.map +1 -0
  9. package/dist/co-browse.d.ts +369 -0
  10. package/dist/co-browse.d.ts.map +1 -0
  11. package/dist/co-browse.js +64 -0
  12. package/dist/co-browse.js.map +1 -0
  13. package/dist/computer-use.d.ts +463 -3
  14. package/dist/computer-use.d.ts.map +1 -1
  15. package/dist/computer-use.js +40 -0
  16. package/dist/computer-use.js.map +1 -1
  17. package/dist/dispute.d.ts +150 -4
  18. package/dist/dispute.d.ts.map +1 -1
  19. package/dist/index.d.ts +311 -7
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +73 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/memory-events.d.ts +1 -1
  24. package/dist/memory-events.js +1 -1
  25. package/dist/money.d.ts +33 -0
  26. package/dist/money.d.ts.map +1 -0
  27. package/dist/money.js +41 -0
  28. package/dist/money.js.map +1 -0
  29. package/dist/perception.d.ts +308 -0
  30. package/dist/perception.d.ts.map +1 -0
  31. package/dist/perception.js +9 -0
  32. package/dist/perception.js.map +1 -0
  33. package/dist/retention-policy.d.ts +464 -0
  34. package/dist/retention-policy.d.ts.map +1 -0
  35. package/dist/retention-policy.js +128 -0
  36. package/dist/retention-policy.js.map +1 -0
  37. package/dist/sensitivity.d.ts +73 -0
  38. package/dist/sensitivity.d.ts.map +1 -0
  39. package/dist/sensitivity.js +97 -0
  40. package/dist/sensitivity.js.map +1 -0
  41. package/dist/skills.d.ts +334 -0
  42. package/dist/skills.d.ts.map +1 -0
  43. package/dist/skills.js +44 -0
  44. package/dist/skills.js.map +1 -0
  45. package/dist/transparency.d.ts +116 -0
  46. package/dist/transparency.d.ts.map +1 -0
  47. package/dist/transparency.js +67 -0
  48. package/dist/transparency.js.map +1 -0
  49. package/package.json +1 -1
@@ -0,0 +1,464 @@
1
+ /**
2
+ * Retention policy — three shapes, one signed deletion-certificate union,
3
+ * sensitivity ceilings as interop law, reference defaults below them.
4
+ *
5
+ * Permissive floor (Apache-2.0). Type-only file — no I/O, no algorithms
6
+ * that bind the runtime. Verifiers and signers live in `@motebit/crypto`;
7
+ * runtime-validation schemas live in `@motebit/wire-schemas`; the
8
+ * judgment of which retention shape a store registers under lives in the
9
+ * BSL packages that hold those stores. Adding a new retention shape is
10
+ * an additive `kind: "..."` entry here plus a new dispatch arm in
11
+ * `verifyDeletionCertificate` — never a rename of an existing one.
12
+ *
13
+ * Doctrine: docs/doctrine/retention-policy.md.
14
+ */
15
+ import type { MotebitId, NodeId } from "./index.js";
16
+ import type { SuiteId } from "./crypto-suite.js";
17
+ /** A ceiling for retention in days, or `Infinity` for "no upper bound." */
18
+ export type RetentionCeilingDays = number;
19
+ /**
20
+ * Protocol-stated UPPER BOUND on retention, by sensitivity level.
21
+ * Compliant implementations MUST enforce a finite ceiling for
22
+ * `medical | financial | secret` and MAY enforce one for `personal`.
23
+ * `none` is `Infinity` by law. Operators MAY ship a stricter policy.
24
+ *
25
+ * Federation peers compare retention claims against these values. An
26
+ * operator manifest declaring retention beyond a ceiling is non-conforming.
27
+ *
28
+ * Retention dissolution axis of Liquescentia's persistence property —
29
+ * see `docs/doctrine/dissolution-spectrum.md` §4. Form: hard cliff per
30
+ * sensitivity tier; sensitivity acts as the permeability gradient (higher
31
+ * sensitivity → higher dissolution pressure → shorter persistence). This
32
+ * is the only dissolution axis that interop law constrains across
33
+ * implementations.
34
+ */
35
+ export declare const MAX_RETENTION_DAYS_BY_SENSITIVITY: Readonly<{
36
+ none: RetentionCeilingDays;
37
+ personal: RetentionCeilingDays;
38
+ medical: RetentionCeilingDays;
39
+ financial: RetentionCeilingDays;
40
+ secret: RetentionCeilingDays;
41
+ }>;
42
+ /**
43
+ * Reference defaults — what motebit's canonical relay enforces today.
44
+ * At-or-below `MAX_RETENTION_DAYS_BY_SENSITIVITY` for every level. An
45
+ * alternative implementation MAY override and remain interop-compliant
46
+ * so long as its values are at-or-below the ceiling.
47
+ *
48
+ * `@motebit/privacy-layer` consumes these as the in-runtime defaults; a
49
+ * parity test asserts `REFERENCE_RETENTION_DAYS_BY_SENSITIVITY[k] <=
50
+ * MAX_RETENTION_DAYS_BY_SENSITIVITY[k]` for every key.
51
+ */
52
+ export declare const REFERENCE_RETENTION_DAYS_BY_SENSITIVITY: Readonly<{
53
+ none: RetentionCeilingDays;
54
+ personal: RetentionCeilingDays;
55
+ medical: RetentionCeilingDays;
56
+ financial: RetentionCeilingDays;
57
+ secret: RetentionCeilingDays;
58
+ }>;
59
+ /**
60
+ * Retention shape registered by a store. Three legitimate motions
61
+ * derived from the doctrine's droplet-physics framing:
62
+ *
63
+ * - `mutable_pruning` — interior structure where individual deletion
64
+ * is sound (memory).
65
+ * - `append_only_horizon` — audit ledgers that admit only whole-prefix
66
+ * truncation (event-log, federation audit, settlement audit).
67
+ * - `consolidation_flush` — surface flow that consolidates into memory
68
+ * or expires (conversations, tool-audit).
69
+ */
70
+ export type RetentionShape = {
71
+ readonly kind: "mutable_pruning";
72
+ /** Per-sensitivity max retention days. Enforced ≤ `MAX_RETENTION_DAYS_BY_SENSITIVITY`. */
73
+ readonly max_retention_days_by_sensitivity: Readonly<Record<string, RetentionCeilingDays>>;
74
+ /** Always `true` — the shape commits to producing signed deletion certs. */
75
+ readonly deletion_cert: true;
76
+ } | {
77
+ readonly kind: "append_only_horizon";
78
+ /** How often the store may advance its horizon. */
79
+ readonly horizon_advance_period_days: number;
80
+ /** Always `true` — the shape commits to producing signed horizon certs. */
81
+ readonly horizon_cert: true;
82
+ /**
83
+ * Whether co-witness signatures are required on horizon certs.
84
+ * Decision 9: this value is DERIVED from federation state, not
85
+ * declared. The store declares `false` for self-witnessed mode;
86
+ * the manifest layer overrides to `true` when the operator
87
+ * appears in any peer's federation graph.
88
+ */
89
+ readonly witness_required: boolean;
90
+ } | {
91
+ readonly kind: "consolidation_flush";
92
+ readonly flush_to: "memory" | "expire";
93
+ /**
94
+ * Optional per-record min-floor resolver. Examines a record and
95
+ * returns the minimum days before flush is permissible. Used for
96
+ * settlement-floor obligations on tool-audit records (decision 3).
97
+ *
98
+ * Pure or async — phase 5 reads the resolver's return type and
99
+ * picks accordingly. Stateful resolvers close over a context
100
+ * passed at store registration; the resolver itself receives the
101
+ * record and returns the floor.
102
+ */
103
+ readonly min_floor_resolver?: (record: unknown) => number | Promise<number>;
104
+ /** Always `true` — the shape commits to producing signed flush certs. */
105
+ readonly flush_cert: true;
106
+ };
107
+ /** The closed registry of Merkle algorithm identifiers. */
108
+ export type MerkleAlgo = "merkle-sha256-v1";
109
+ /**
110
+ * Federation graph anchor — Merkle commitment over the operator's
111
+ * federation peer set at `horizon_ts`. Phase 4 quorum verification
112
+ * recomputes the root from the operator's published peer set or
113
+ * verifies inclusion proofs against it.
114
+ *
115
+ * `leaf_count = 0` is the canonical self-witnessed encoding (no peers
116
+ * at `horizon_ts`); see `EMPTY_FEDERATION_GRAPH_ANCHOR`.
117
+ */
118
+ export interface FederationGraphAnchor {
119
+ readonly algo: MerkleAlgo;
120
+ /** Hex-encoded SHA-256 root. */
121
+ readonly merkle_root: string;
122
+ /** Number of peer pubkeys in the anchored set. */
123
+ readonly leaf_count: number;
124
+ }
125
+ /**
126
+ * Empty-tree federation graph anchor — the canonical self-witnessed
127
+ * encoding when an operator has no federation peers at `horizon_ts`.
128
+ *
129
+ * `merkle_root` is the hex-encoded SHA-256 of the empty byte string
130
+ * (`sha256(new Uint8Array(0))`). Verifiers in `@motebit/crypto` admit
131
+ * `append_only_horizon` certs carrying this anchor as self-witnessed —
132
+ * `witnessed_by[]` may be empty since there are no peers to solicit.
133
+ *
134
+ * Phase 4b-3 makes `federation_graph_anchor` mandatory on certs from
135
+ * federation-aware deployments; pre-4b-3 certs without the field are
136
+ * grandfathered self-witnessed (verifier policy enforces
137
+ * presence-when-peered, not presence-always).
138
+ */
139
+ export declare const EMPTY_FEDERATION_GRAPH_ANCHOR: FederationGraphAnchor;
140
+ /**
141
+ * Merkle inclusion proof — same wire shape as
142
+ * `spec/credential-anchor-v1.md` §6 (siblings ordered leaf-to-root,
143
+ * `layer_sizes` for odd-leaf-promotion detection, `leaf_index`
144
+ * positional).
145
+ */
146
+ export interface MerkleInclusionProof {
147
+ readonly siblings: string[];
148
+ readonly leaf_index: number;
149
+ readonly layer_sizes: number[];
150
+ }
151
+ export interface HorizonWitness {
152
+ readonly motebit_id: MotebitId;
153
+ /** Ed25519 signature over the cert's canonical signing payload. */
154
+ readonly signature: string;
155
+ /**
156
+ * Optional Merkle inclusion proof for the witness's pubkey against
157
+ * the cert's `federation_graph_anchor.merkle_root`. Phase 4 quorum
158
+ * mechanisms either require this (Merkle-membership verification)
159
+ * or accept signature-only witnesses. Reserved in phase 1 so phase
160
+ * 4 lands without a wire break.
161
+ */
162
+ readonly inclusion_proof?: MerkleInclusionProof;
163
+ }
164
+ /**
165
+ * Cert body the witness canonicalizes and signs. Mirrors the
166
+ * `append_only_horizon` arm of `DeletionCertificate` minus
167
+ * `witnessed_by[]` and minus `signature` — exactly the shape
168
+ * `canonicalizeHorizonCertForWitness` in `@motebit/crypto` derives at
169
+ * verification time. A peer recomputes `canonicalJson(cert_body)`,
170
+ * verifies the issuer's `issuer_signature` against it, then signs the
171
+ * same bytes with its own federation key.
172
+ */
173
+ export interface HorizonWitnessRequestBody {
174
+ readonly kind: "append_only_horizon";
175
+ readonly subject: HorizonSubject;
176
+ readonly store_id: string;
177
+ readonly horizon_ts: number;
178
+ readonly issued_at: number;
179
+ /**
180
+ * Mandatory from phase 4b-3 onward when the issuer has any federation
181
+ * peers at `horizon_ts` — the `EMPTY_FEDERATION_GRAPH_ANCHOR`
182
+ * sentinel signals self-witnessed deployments. Optional in the type
183
+ * for grandfathered pre-4b-3 callers.
184
+ */
185
+ readonly federation_graph_anchor?: FederationGraphAnchor;
186
+ readonly suite: SuiteId;
187
+ }
188
+ /**
189
+ * `POST /federation/v1/horizon/witness` request body — issuer asks a
190
+ * federation peer to co-witness a pending `append_only_horizon` cert.
191
+ *
192
+ * Peer-side flow (fail-closed throughout):
193
+ * 1. Resolve `issuer_id` → issuer's federation Ed25519 public key
194
+ * from the local `relay_peers` table; reject if unknown.
195
+ * 2. Verify `issuer_signature` against `canonicalJson(cert_body)`
196
+ * under `cert_body.suite`. The issuer-signature payload is
197
+ * byte-equal to what the witness will sign, so verification +
198
+ * signing share canonical-bytes derivation.
199
+ * 3. Sign the same bytes; return a `WitnessSolicitationResponse`
200
+ * carrying the peer's `motebit_id`, signature, and (if available)
201
+ * a Merkle inclusion proof for its pubkey against
202
+ * `cert_body.federation_graph_anchor.merkle_root`.
203
+ *
204
+ * Non-goals: the request does NOT carry `witnessed_by[]`. Witnesses
205
+ * are portable across compositions of the same body; the issuer's
206
+ * eventual cert.signature is what binds the assembled witness array.
207
+ */
208
+ export interface WitnessSolicitationRequest {
209
+ readonly cert_body: HorizonWitnessRequestBody;
210
+ /**
211
+ * Issuer's identifier — MUST match the id projected from
212
+ * `cert_body.subject` (the `motebit_id` for per-motebit horizons,
213
+ * the `operator_id` for operator-wide horizons). Disagreement is
214
+ * fail-closed at the peer.
215
+ */
216
+ readonly issuer_id: string;
217
+ /**
218
+ * Base64url-encoded Ed25519 signature by the issuer's federation key
219
+ * over `canonicalJson(cert_body)` under `cert_body.suite`. Same
220
+ * canonical bytes the witness signs — the request authenticates
221
+ * itself by the issuer's pre-commitment to the body.
222
+ */
223
+ readonly issuer_signature: string;
224
+ }
225
+ /**
226
+ * `POST /federation/v1/horizon/witness` response body — the peer's
227
+ * `HorizonWitness`. Same shape as `cert.witnessed_by[]` entries; the
228
+ * issuer copies the response verbatim into the assembled cert before
229
+ * producing its final cert.signature.
230
+ *
231
+ * Distinct named type from `HorizonWitness` for RPC-surface clarity:
232
+ * the response is the on-the-wire envelope between two relays;
233
+ * `HorizonWitness` is the type as embedded inside a published cert.
234
+ * Structurally identical — issuer-side code passes the response
235
+ * directly into `witnessed_by[]` without transformation.
236
+ */
237
+ export interface WitnessSolicitationResponse {
238
+ readonly motebit_id: MotebitId;
239
+ /**
240
+ * Base64url-encoded Ed25519 signature over the same canonical bytes
241
+ * the issuer signed in `WitnessSolicitationRequest.issuer_signature`
242
+ * (i.e. `canonicalJson(cert_body)` under `cert_body.suite`).
243
+ */
244
+ readonly signature: string;
245
+ /**
246
+ * Optional Merkle inclusion proof for the peer's federation pubkey
247
+ * against `cert_body.federation_graph_anchor.merkle_root`. Phase
248
+ * 4b-3 verifier policy admits signature-only witnesses; future
249
+ * tightening to mandatory-inclusion-proof lands by changing verifier
250
+ * policy alone — the wire shape is forward-compatible.
251
+ */
252
+ readonly inclusion_proof?: MerkleInclusionProof;
253
+ }
254
+ /** Subject (motebit) signature block. */
255
+ export interface SubjectSignature {
256
+ readonly motebit_id: MotebitId;
257
+ readonly suite: SuiteId;
258
+ readonly signature: string;
259
+ }
260
+ /** Operator signature block. */
261
+ export interface OperatorSignature {
262
+ readonly operator_id: string;
263
+ readonly suite: SuiteId;
264
+ readonly signature: string;
265
+ }
266
+ /**
267
+ * Delegate signature block — multi-hop authorization per delegation-v1
268
+ * §5.5. The delegate's identity key signs; the delegation_receipt_id
269
+ * references the receipt that authorized the retention scope.
270
+ */
271
+ export interface DelegateSignature {
272
+ readonly motebit_id: MotebitId;
273
+ readonly delegation_receipt_id: string;
274
+ readonly suite: SuiteId;
275
+ readonly signature: string;
276
+ }
277
+ /**
278
+ * Guardian signature block — enterprise custody per identity-v1 §3.3.
279
+ * Verifier MUST cross-check `guardian_public_key` against the motebit's
280
+ * identity file `guardian.public_key` field.
281
+ */
282
+ export interface GuardianSignature {
283
+ /** Hex-encoded guardian Ed25519 public key. Matches `motebit.md` §3.3 `guardian.public_key`. */
284
+ readonly guardian_public_key: string;
285
+ readonly suite: SuiteId;
286
+ readonly signature: string;
287
+ }
288
+ /**
289
+ * Reasons admitted by `mutable_pruning` and `consolidation_flush` arms.
290
+ * Each reason constrains the permitted signer set per decision 5's
291
+ * `reason × signer × mode` table. Verifiers reject certs whose
292
+ * present signature(s) don't match the reason's permitted set.
293
+ *
294
+ * `retention_enforcement_post_classification` is admitted by
295
+ * `consolidation_flush` only — it names the migration cohort under
296
+ * decision 6b's lazy-classify-on-flush path.
297
+ */
298
+ export type DeletionReason = "user_request" | "retention_enforcement" | "retention_enforcement_post_classification" | "operator_request" | "delegated_request" | "self_enforcement" | "guardian_request";
299
+ /**
300
+ * Subject discriminator on `append_only_horizon`. Per decision 8, both
301
+ * per-motebit and operator-wide horizons are first-class; effective
302
+ * horizon for any given motebit's events is `max` of both.
303
+ */
304
+ export type HorizonSubject = {
305
+ readonly kind: "motebit";
306
+ readonly motebit_id: MotebitId;
307
+ } | {
308
+ readonly kind: "operator";
309
+ readonly operator_id: string;
310
+ };
311
+ /**
312
+ * Signed retention deletion certificate. Single discriminated union by
313
+ * `kind`. New deletion shapes ship as additive registry entries; the
314
+ * verifier in `@motebit/crypto` closes under additions.
315
+ *
316
+ * Canonical signing payload (decision 5): each signature in
317
+ * `mutable_pruning` and `consolidation_flush` covers
318
+ * `canonicalJson(cert_body)` where `cert_body` is the cert with all
319
+ * `*_signature` fields removed. All present signers sign identical
320
+ * bytes — same shape as identity-v1.md §3.8.1 dual-signature succession.
321
+ * The `append_only_horizon` arm covers `canonicalJson(cert minus
322
+ * signature)`.
323
+ *
324
+ * Certificates are TERMINAL: there is no signed-revocation path. A cert
325
+ * issued in error is corrected by a follow-up cert under a different
326
+ * reason. Same foundation-law shape as delegation-v1.md §4.2 and
327
+ * migration-v1.md §3.2 terminal-state irreversibility.
328
+ */
329
+ export type DeletionCertificate = {
330
+ readonly kind: "mutable_pruning";
331
+ readonly target_id: NodeId;
332
+ readonly sensitivity: SensitivityLevelString;
333
+ readonly reason: DeletionReason;
334
+ readonly deleted_at: number;
335
+ readonly subject_signature?: SubjectSignature;
336
+ readonly operator_signature?: OperatorSignature;
337
+ readonly delegate_signature?: DelegateSignature;
338
+ readonly guardian_signature?: GuardianSignature;
339
+ } | {
340
+ readonly kind: "append_only_horizon";
341
+ readonly subject: HorizonSubject;
342
+ readonly store_id: string;
343
+ readonly horizon_ts: number;
344
+ readonly witnessed_by: HorizonWitness[];
345
+ /**
346
+ * Optional pre-4b-3, mandatory from 4b-3+. When present with
347
+ * `leaf_count = 0` (`EMPTY_FEDERATION_GRAPH_ANCHOR`) the cert is
348
+ * self-witnessed — `witnessed_by` may be empty.
349
+ */
350
+ readonly federation_graph_anchor?: FederationGraphAnchor;
351
+ readonly issued_at: number;
352
+ readonly suite: SuiteId;
353
+ readonly signature: string;
354
+ } | {
355
+ readonly kind: "consolidation_flush";
356
+ readonly target_id: string;
357
+ readonly sensitivity: SensitivityLevelString;
358
+ readonly reason: DeletionReason;
359
+ readonly flushed_to: "memory_node" | "expire";
360
+ readonly memory_node_id?: NodeId;
361
+ readonly flushed_at: number;
362
+ readonly subject_signature?: SubjectSignature;
363
+ readonly operator_signature?: OperatorSignature;
364
+ readonly delegate_signature?: DelegateSignature;
365
+ readonly guardian_signature?: GuardianSignature;
366
+ };
367
+ /**
368
+ * Sensitivity expressed as the wire string. Mirrors
369
+ * `SensitivityLevel` enum values without importing the enum (this file
370
+ * stays minimal; the enum lives in index.ts).
371
+ */
372
+ export type SensitivityLevelString = "none" | "personal" | "medical" | "financial" | "secret";
373
+ /**
374
+ * Per-store retention declaration, embedded in the operator's signed
375
+ * retention manifest. Names the registered shape and the parameters a
376
+ * verifier needs to check the operator's claims against running code.
377
+ */
378
+ export interface RetentionStoreDeclaration {
379
+ /** Stable identifier for the store within the operator's deployment. */
380
+ readonly store_id: string;
381
+ /** Human-readable name for tooling display. */
382
+ readonly store_name: string;
383
+ /** The registered retention shape. */
384
+ readonly shape: RetentionShapeDeclaration;
385
+ }
386
+ /**
387
+ * Wire-format projection of `RetentionShape` — drops the resolver
388
+ * function (a closure can't ride the wire) and surfaces declared
389
+ * parameters only. The runtime registration in BSL carries the
390
+ * resolver; the manifest declares its presence as a boolean.
391
+ */
392
+ export type RetentionShapeDeclaration = {
393
+ readonly kind: "mutable_pruning";
394
+ readonly max_retention_days_by_sensitivity: Readonly<Record<string, RetentionCeilingDays>>;
395
+ } | {
396
+ readonly kind: "append_only_horizon";
397
+ readonly horizon_advance_period_days: number;
398
+ readonly witness_required: boolean;
399
+ } | {
400
+ readonly kind: "consolidation_flush";
401
+ readonly flush_to: "memory" | "expire";
402
+ readonly has_min_floor_resolver: boolean;
403
+ };
404
+ /**
405
+ * Stable string identifier for each canonical runtime store. The
406
+ * discriminator is interop law — verifiers and tooling cross-reference
407
+ * these exact strings with the manifest's `RetentionStoreDeclaration.store_id`.
408
+ */
409
+ export type RuntimeStoreId = "memory" | "event_log" | "conversation_messages" | "tool_audit" | "skill_audit";
410
+ /**
411
+ * Canonical registry: `RuntimeStoreId` → declared `RetentionShape`.
412
+ *
413
+ * - `memory` registers under `mutable_pruning` per phase 3 — the
414
+ * privacy-layer's `deleteMemory` constructs and signs the cert at
415
+ * each erase call site.
416
+ * - `event_log` registers under `append_only_horizon` per phase 4a —
417
+ * `EventStore.advanceHorizon` signs the horizon cert and truncates.
418
+ * `witness_required: false` is the no-peer-deployment derivation
419
+ * per decision 9; the manifest layer overrides to `true` once the
420
+ * operator appears in any peer's federation graph (phase 4b-3).
421
+ * - `conversation_messages` and `tool_audit` register under
422
+ * `consolidation_flush` per phase 5-ship — the consolidation cycle's
423
+ * flush phase enforces, lazy-classifying on read per decision 6b.
424
+ * Tool-audit's settlement-floor resolver per decision 3 is wired at
425
+ * runtime; the manifest projection surfaces only its presence.
426
+ *
427
+ * Reference defaults below come from `REFERENCE_RETENTION_DAYS_BY_SENSITIVITY`;
428
+ * an alternative implementation MAY ship stricter ceilings and remain
429
+ * interop-compliant.
430
+ */
431
+ export declare const RUNTIME_RETENTION_REGISTRY: Readonly<Record<RuntimeStoreId, RetentionShapeDeclaration>>;
432
+ /**
433
+ * Signed retention manifest published at
434
+ * `/.well-known/motebit-retention.json`. Sibling to the operator
435
+ * transparency manifest (`docs/doctrine/operator-transparency.md`),
436
+ * same suite and same browser-side re-verification pattern.
437
+ *
438
+ * Decision 6b's lazy-classify-on-flush path declares its default tier
439
+ * via `pre_classification_default_sensitivity`.
440
+ */
441
+ export interface RetentionManifest {
442
+ /** Always `motebit/retention-manifest@1`. */
443
+ readonly spec: "motebit/retention-manifest@1";
444
+ /** The operator publishing this manifest. */
445
+ readonly operator_id: string;
446
+ readonly issued_at: number;
447
+ /** Per-store declarations. Drift gate enumerates against the registry. */
448
+ readonly stores: RetentionStoreDeclaration[];
449
+ /**
450
+ * Default sensitivity for un-classified pre-deploy records under
451
+ * `consolidation_flush` (decision 6b). Defaults to `"personal"` if
452
+ * absent.
453
+ */
454
+ readonly pre_classification_default_sensitivity?: SensitivityLevelString;
455
+ /**
456
+ * Honest gaps the operator declares — same pattern as
457
+ * `operator-transparency.md` § "Reference implementation". Stage 1
458
+ * ships with the chain anchor in `honest_gaps` until stage 2.
459
+ */
460
+ readonly honest_gaps?: string[];
461
+ readonly suite: SuiteId;
462
+ readonly signature: string;
463
+ }
464
+ //# sourceMappingURL=retention-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retention-policy.d.ts","sourceRoot":"","sources":["../src/retention-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAajD,2EAA2E;AAC3E,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iCAAiC,EA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AAC,2BAA2B,EAAE,MAAM,CAAC;IAC7C,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACvC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;CAC1C,CAAC;AAwBN;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,WAAW,GACX,uBAAuB,GACvB,YAAY,GACZ,aAAa,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAC/C,MAAM,CAAC,cAAc,EAAE,yBAAyB,CAAC,CAgCjD,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;IAC9C,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,sCAAsC,CAAC,EAAE,sBAAsB,CAAC;IACzE;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Retention policy — three shapes, one signed deletion-certificate union,
3
+ * sensitivity ceilings as interop law, reference defaults below them.
4
+ *
5
+ * Permissive floor (Apache-2.0). Type-only file — no I/O, no algorithms
6
+ * that bind the runtime. Verifiers and signers live in `@motebit/crypto`;
7
+ * runtime-validation schemas live in `@motebit/wire-schemas`; the
8
+ * judgment of which retention shape a store registers under lives in the
9
+ * BSL packages that hold those stores. Adding a new retention shape is
10
+ * an additive `kind: "..."` entry here plus a new dispatch arm in
11
+ * `verifyDeletionCertificate` — never a rename of an existing one.
12
+ *
13
+ * Doctrine: docs/doctrine/retention-policy.md.
14
+ */
15
+ /**
16
+ * Protocol-stated UPPER BOUND on retention, by sensitivity level.
17
+ * Compliant implementations MUST enforce a finite ceiling for
18
+ * `medical | financial | secret` and MAY enforce one for `personal`.
19
+ * `none` is `Infinity` by law. Operators MAY ship a stricter policy.
20
+ *
21
+ * Federation peers compare retention claims against these values. An
22
+ * operator manifest declaring retention beyond a ceiling is non-conforming.
23
+ *
24
+ * Retention dissolution axis of Liquescentia's persistence property —
25
+ * see `docs/doctrine/dissolution-spectrum.md` §4. Form: hard cliff per
26
+ * sensitivity tier; sensitivity acts as the permeability gradient (higher
27
+ * sensitivity → higher dissolution pressure → shorter persistence). This
28
+ * is the only dissolution axis that interop law constrains across
29
+ * implementations.
30
+ */
31
+ export const MAX_RETENTION_DAYS_BY_SENSITIVITY = Object.freeze({
32
+ none: Infinity,
33
+ personal: 365,
34
+ medical: 90,
35
+ financial: 90,
36
+ secret: 30,
37
+ });
38
+ /**
39
+ * Reference defaults — what motebit's canonical relay enforces today.
40
+ * At-or-below `MAX_RETENTION_DAYS_BY_SENSITIVITY` for every level. An
41
+ * alternative implementation MAY override and remain interop-compliant
42
+ * so long as its values are at-or-below the ceiling.
43
+ *
44
+ * `@motebit/privacy-layer` consumes these as the in-runtime defaults; a
45
+ * parity test asserts `REFERENCE_RETENTION_DAYS_BY_SENSITIVITY[k] <=
46
+ * MAX_RETENTION_DAYS_BY_SENSITIVITY[k]` for every key.
47
+ */
48
+ export const REFERENCE_RETENTION_DAYS_BY_SENSITIVITY = Object.freeze({
49
+ none: Infinity,
50
+ personal: 365,
51
+ medical: 90,
52
+ financial: 90,
53
+ secret: 30,
54
+ });
55
+ /**
56
+ * Empty-tree federation graph anchor — the canonical self-witnessed
57
+ * encoding when an operator has no federation peers at `horizon_ts`.
58
+ *
59
+ * `merkle_root` is the hex-encoded SHA-256 of the empty byte string
60
+ * (`sha256(new Uint8Array(0))`). Verifiers in `@motebit/crypto` admit
61
+ * `append_only_horizon` certs carrying this anchor as self-witnessed —
62
+ * `witnessed_by[]` may be empty since there are no peers to solicit.
63
+ *
64
+ * Phase 4b-3 makes `federation_graph_anchor` mandatory on certs from
65
+ * federation-aware deployments; pre-4b-3 certs without the field are
66
+ * grandfathered self-witnessed (verifier policy enforces
67
+ * presence-when-peered, not presence-always).
68
+ */
69
+ export const EMPTY_FEDERATION_GRAPH_ANCHOR = Object.freeze({
70
+ algo: "merkle-sha256-v1",
71
+ // SHA-256 of zero bytes — well-known constant.
72
+ merkle_root: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
73
+ leaf_count: 0,
74
+ });
75
+ /**
76
+ * Canonical registry: `RuntimeStoreId` → declared `RetentionShape`.
77
+ *
78
+ * - `memory` registers under `mutable_pruning` per phase 3 — the
79
+ * privacy-layer's `deleteMemory` constructs and signs the cert at
80
+ * each erase call site.
81
+ * - `event_log` registers under `append_only_horizon` per phase 4a —
82
+ * `EventStore.advanceHorizon` signs the horizon cert and truncates.
83
+ * `witness_required: false` is the no-peer-deployment derivation
84
+ * per decision 9; the manifest layer overrides to `true` once the
85
+ * operator appears in any peer's federation graph (phase 4b-3).
86
+ * - `conversation_messages` and `tool_audit` register under
87
+ * `consolidation_flush` per phase 5-ship — the consolidation cycle's
88
+ * flush phase enforces, lazy-classifying on read per decision 6b.
89
+ * Tool-audit's settlement-floor resolver per decision 3 is wired at
90
+ * runtime; the manifest projection surfaces only its presence.
91
+ *
92
+ * Reference defaults below come from `REFERENCE_RETENTION_DAYS_BY_SENSITIVITY`;
93
+ * an alternative implementation MAY ship stricter ceilings and remain
94
+ * interop-compliant.
95
+ */
96
+ export const RUNTIME_RETENTION_REGISTRY = Object.freeze({
97
+ memory: {
98
+ kind: "mutable_pruning",
99
+ max_retention_days_by_sensitivity: REFERENCE_RETENTION_DAYS_BY_SENSITIVITY,
100
+ },
101
+ event_log: {
102
+ kind: "append_only_horizon",
103
+ horizon_advance_period_days: 365,
104
+ witness_required: false,
105
+ },
106
+ conversation_messages: {
107
+ kind: "consolidation_flush",
108
+ flush_to: "expire",
109
+ has_min_floor_resolver: false,
110
+ },
111
+ tool_audit: {
112
+ kind: "consolidation_flush",
113
+ flush_to: "expire",
114
+ has_min_floor_resolver: true,
115
+ },
116
+ // `skill_audit` carries the same shape as `tool_audit` — append-only
117
+ // operator-act ledger with a `sensitivity` column on the
118
+ // `skill_consent_granted` variant. Registers under `consolidation_flush`
119
+ // so the consolidation cycle's flush phase respects sensitivity-tier
120
+ // retention ceilings. No min-floor resolver: skill audit doesn't
121
+ // gate settlement, so the per-tier horizon is the only ceiling.
122
+ skill_audit: {
123
+ kind: "consolidation_flush",
124
+ flush_to: "expire",
125
+ has_min_floor_resolver: false,
126
+ },
127
+ });
128
+ //# sourceMappingURL=retention-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retention-policy.js","sourceRoot":"","sources":["../src/retention-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAmBH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAMzC,MAAM,CAAC,MAAM,CAAC;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,EAAE;CACX,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAM/C,MAAM,CAAC,MAAM,CAAC;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,EAAE;CACX,CAAC,CAAC;AA8FH;;;;;;;;;;;;;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