@real-life/trust-protocol 0.4.0 → 0.6.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.
- package/CHANGELOG.md +137 -0
- package/README.md +91 -24
- package/dist/adapters/vti-mediator.d.ts +36 -8
- package/dist/adapters/vti-mediator.d.ts.map +1 -1
- package/dist/adapters/vti-mediator.js +193 -29
- package/dist/adapters/vti-mediator.js.map +1 -1
- package/dist/codec.d.ts +2 -1
- package/dist/codec.d.ts.map +1 -1
- package/dist/codec.js +75 -26
- package/dist/codec.js.map +1 -1
- package/dist/engine.d.ts +77 -4
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +419 -31
- package/dist/engine.js.map +1 -1
- package/dist/entropy.d.ts +1 -1
- package/dist/entropy.d.ts.map +1 -1
- package/dist/entropy.js +1 -1
- package/dist/entropy.js.map +1 -1
- package/dist/events.d.ts +21 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/holder-api.d.ts +44 -2
- package/dist/holder-api.d.ts.map +1 -1
- package/dist/holder-api.js +40 -5
- package/dist/holder-api.js.map +1 -1
- package/dist/{holder-state-v1.d.ts → holder-state-v3.d.ts} +261 -201
- package/dist/holder-state-v3.d.ts.map +1 -0
- package/dist/holder-state-v3.js +2 -0
- package/dist/holder-state-v3.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/introduction/holder.d.ts.map +1 -1
- package/dist/introduction/holder.js +7 -0
- package/dist/introduction/holder.js.map +1 -1
- package/dist/invariants.d.ts.map +1 -1
- package/dist/invariants.js +70 -0
- package/dist/invariants.js.map +1 -1
- package/dist/membership/holder.d.ts +3 -5
- package/dist/membership/holder.d.ts.map +1 -1
- package/dist/membership/holder.js +165 -88
- package/dist/membership/holder.js.map +1 -1
- package/dist/membership.d.ts +31 -0
- package/dist/membership.d.ts.map +1 -1
- package/dist/membership.js +25 -2
- package/dist/membership.js.map +1 -1
- package/dist/message/holder.d.ts +49 -0
- package/dist/message/holder.d.ts.map +1 -0
- package/dist/message/holder.js +290 -0
- package/dist/message/holder.js.map +1 -0
- package/dist/message.d.ts +43 -0
- package/dist/message.d.ts.map +1 -0
- package/dist/message.js +51 -0
- package/dist/message.js.map +1 -0
- package/dist/receive.d.ts +4 -3
- package/dist/receive.d.ts.map +1 -1
- package/dist/receive.js +23 -4
- package/dist/receive.js.map +1 -1
- package/dist/results.d.ts +22 -3
- package/dist/results.d.ts.map +1 -1
- package/dist/results.js.map +1 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +9 -6
- package/dist/schemas.js.map +1 -1
- package/dist/state.d.ts +88 -14
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +2 -1
- package/dist/state.js.map +1 -1
- package/dist/trust/continuity.d.ts.map +1 -1
- package/dist/trust/continuity.js +7 -1
- package/dist/trust/continuity.js.map +1 -1
- package/dist/trust/entries.d.ts.map +1 -1
- package/dist/trust/entries.js +103 -2
- package/dist/trust/entries.js.map +1 -1
- package/dist/views.d.ts +34 -2
- package/dist/views.d.ts.map +1 -1
- package/dist/views.js +19 -1
- package/dist/views.js.map +1 -1
- package/dist/wire.d.ts +47 -6
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js.map +1 -1
- package/package.json +6 -4
- package/schemas/{holder-state-v1.schema.json → holder-state-v3.schema.json} +300 -12
- package/dist/holder-state-v1.d.ts.map +0 -1
- package/dist/holder-state-v1.js +0 -2
- package/dist/holder-state-v1.js.map +0 -1
package/dist/state.d.ts
CHANGED
|
@@ -52,8 +52,56 @@ export interface HolderState {
|
|
|
52
52
|
acts: Record<string, ActRecord>;
|
|
53
53
|
encounter: EncounterState;
|
|
54
54
|
/** groups on the way in: the preludes answered and the invitations
|
|
55
|
-
* received, before a welcome makes them groups (Membership
|
|
55
|
+
* received, before a welcome makes them groups (Membership 3.5, 3.1) */
|
|
56
56
|
joining: Joining;
|
|
57
|
+
/** Message Tasks 0.1 on the holder: the block of relationships and the
|
|
58
|
+
* rates per relationship (message/holder.ts) */
|
|
59
|
+
messages: MessagesState;
|
|
60
|
+
}
|
|
61
|
+
/** What Message Tasks 0.1 keeps on the holder (message/holder.ts). The
|
|
62
|
+
* time mark of RLTP-MSG-4060 is `lastWhen`: it never falls, every commit
|
|
63
|
+
* writes it, and the CAS commits only on the state it was read with. */
|
|
64
|
+
export interface MessagesState {
|
|
65
|
+
/** the relationships under a block (Message Tasks 6.1): chain-level
|
|
66
|
+
* state of a relationship (Trust 2280), by relationship id, sorted */
|
|
67
|
+
blocked: string[];
|
|
68
|
+
/** per relationship id: the times at which documents counted against a
|
|
69
|
+
* rate were accepted, inside the last 24 hours (Message Tasks 4.2):
|
|
70
|
+
* new message/0.1 document digests (4110) and invitations with a
|
|
71
|
+
* credential digest new to the holder (4115, Membership RLTP-MT-3105) */
|
|
72
|
+
rates: Record<string, Rates>;
|
|
73
|
+
/** the own pair labels of the tuples that are ready (5.1, 5020): a
|
|
74
|
+
* document whose issuer is the counterpart was accepted on them; sorted */
|
|
75
|
+
ready: string[];
|
|
76
|
+
/** the completion record (4.4), per tuple (own pair label) and inbound
|
|
77
|
+
* direction: mid → the body's digest and its sentAt */
|
|
78
|
+
records: Record<string, Record<string, MessageRecord>>;
|
|
79
|
+
/** the inbox (4.5): messages accepted and not yet taken over by the
|
|
80
|
+
* application, by the accepted document's digest */
|
|
81
|
+
inbox: Record<string, InboxEntry>;
|
|
82
|
+
}
|
|
83
|
+
/** The acceptance times a rate counts, oldest first. */
|
|
84
|
+
export interface Rates {
|
|
85
|
+
invites: Millis[];
|
|
86
|
+
messages: Millis[];
|
|
87
|
+
}
|
|
88
|
+
/** One completion-record entry (RLTP-MSG-4310). */
|
|
89
|
+
export interface MessageRecord {
|
|
90
|
+
bodyDigest: string;
|
|
91
|
+
sentAt: Millis;
|
|
92
|
+
}
|
|
93
|
+
/** One inbox entry (RLTP-MSG-4410): the body unchanged, the t_ref of its
|
|
94
|
+
* acceptance and the display time min(sentAt, receivedAt), fixed then. */
|
|
95
|
+
export interface InboxEntry {
|
|
96
|
+
/** the accepted document's digest */
|
|
97
|
+
id: string;
|
|
98
|
+
/** the own pair label of the arrival tuple */
|
|
99
|
+
tuple: string;
|
|
100
|
+
mid: string;
|
|
101
|
+
/** the message@1 body as it arrived */
|
|
102
|
+
body: JsonObject;
|
|
103
|
+
receivedAt: Millis;
|
|
104
|
+
displayAt: Millis;
|
|
57
105
|
}
|
|
58
106
|
/** The label register (Identity §2, §6.3): every set grows only. */
|
|
59
107
|
export interface Register {
|
|
@@ -462,6 +510,13 @@ export interface Joining {
|
|
|
462
510
|
}>;
|
|
463
511
|
/** invitations received, by credential digest */
|
|
464
512
|
invites: Record<string, ReceivedInvite>;
|
|
513
|
+
/** the credential digest of every invitation surfaced, for as long as
|
|
514
|
+
* the holder exists (RLTP-MT-3130), sorted */
|
|
515
|
+
surfaced: string[];
|
|
516
|
+
/** the register of declined invitations: the credential digest of every
|
|
517
|
+
* invitation declined under a block, holder-wide and for as long as the
|
|
518
|
+
* holder exists (Message Tasks 6.4, RLTP-MT-3115), sorted */
|
|
519
|
+
declined: string[];
|
|
465
520
|
}
|
|
466
521
|
/** An invitation received (Membership 3.1), surfaced as a group-invite prompt. */
|
|
467
522
|
export interface ReceivedInvite {
|
|
@@ -469,9 +524,12 @@ export interface ReceivedInvite {
|
|
|
469
524
|
/** genesis digest */
|
|
470
525
|
group: string;
|
|
471
526
|
name: string;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
527
|
+
/** the contact of the relationship its prelude binding attributed it to
|
|
528
|
+
* (RLTP-MT-3100); absent for an invitation attributed to none */
|
|
529
|
+
contactId?: string;
|
|
530
|
+
/** the own rkid of the tuple its prelude arrived on, which a split
|
|
531
|
+
* follows (2080); absent with contactId */
|
|
532
|
+
rkid?: string;
|
|
475
533
|
memberLabel: string;
|
|
476
534
|
/** the invite document, complete */
|
|
477
535
|
invite: JsonObject;
|
|
@@ -497,13 +555,17 @@ export interface Effect {
|
|
|
497
555
|
/**
|
|
498
556
|
* The acknowledgement of a completed effect, sealed once inside the
|
|
499
557
|
* effect's transaction and re-sent byte-identical on every duplicate
|
|
500
|
-
* (Delivery 4.2, 6.2 stage 4). Acks are outbox-less: no trias.
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
* (
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
558
|
+
* (Delivery 4.2, 6.2 stage 4). Acks are outbox-less: no trias. It is
|
|
559
|
+
* unsent until a service takes it (an `accepted` or `delivered` report on
|
|
560
|
+
* its digest), the adapter reports it failed, or its retries end at the
|
|
561
|
+
* horizon (at + horizonMs): `sent` with `sentBy` saying which (Delivery
|
|
562
|
+
* RLTP-DEL-6330). An awaiting-transport report keeps it unsent and records
|
|
563
|
+
* `held`: the adapter has it, resume does not re-offer it, and
|
|
564
|
+
* pendingTransport keeps offering it (RLTP-DEL-6120). Unsent and not held,
|
|
565
|
+
* resume re-offers it on the retry policy like an outbox item (attempt,
|
|
566
|
+
* nextAttemptAt, backoff). Sent or not, it stays retained with its effect
|
|
567
|
+
* until expiresAt, and a redelivery of the document still earns it
|
|
568
|
+
* (duplicate-known, RLTP-DEL-6335).
|
|
507
569
|
*/
|
|
508
570
|
export interface StoredAck {
|
|
509
571
|
/** the ack document's digest; report() on it marks the ack sent */
|
|
@@ -519,8 +581,17 @@ export interface StoredAck {
|
|
|
519
581
|
/** next re-offer while unsent */
|
|
520
582
|
nextAttemptAt?: Millis;
|
|
521
583
|
sent: boolean;
|
|
522
|
-
/** why it counts as sent
|
|
523
|
-
|
|
584
|
+
/** why it counts as sent (present exactly when sent): a service took it,
|
|
585
|
+
* the adapter reported it failed, or its retries ended at the horizon */
|
|
586
|
+
sentBy?: 'accepted' | 'failed' | 'horizon';
|
|
587
|
+
/** unsent and held by the adapter: its last report was awaiting-transport */
|
|
588
|
+
held?: PreTransportReason;
|
|
589
|
+
/** the duplicates' answers granted so far (Delivery RLTP-DEL-6330): each
|
|
590
|
+
* stage-4 duplicate arriving while none is due grants the next */
|
|
591
|
+
answers?: number;
|
|
592
|
+
/** an answer is due: granted, its hand-over not yet begun; kept across a
|
|
593
|
+
* lock, apart from the retries and `sent` (present with `answers`) */
|
|
594
|
+
answerDue?: true;
|
|
524
595
|
}
|
|
525
596
|
export type OutboxStatus = 'submitted' | 'accepted' | 'delivered' | 'failed';
|
|
526
597
|
/** One step of an item's history. `awaiting-transport` is a pre-transport
|
|
@@ -544,7 +615,7 @@ export type OutboxStep = {
|
|
|
544
615
|
} | {
|
|
545
616
|
status: 'failed';
|
|
546
617
|
at: Millis;
|
|
547
|
-
reason: Exclude<DeliveryFailure, 'rejected-by-receiver'
|
|
618
|
+
reason: Exclude<DeliveryFailure, 'rejected-by-receiver'> | 'task-expired';
|
|
548
619
|
} | {
|
|
549
620
|
status: 'failed';
|
|
550
621
|
at: Millis;
|
|
@@ -562,6 +633,9 @@ export interface OutboxItem {
|
|
|
562
633
|
/** history, oldest first (Delivery §6.1) */
|
|
563
634
|
history: OutboxStep[];
|
|
564
635
|
nextAttemptAt?: Millis;
|
|
636
|
+
/** the sender lifetime its type declares (Delivery RLTP-DEL-7020):
|
|
637
|
+
* from then on failed(task-expired), never handed out again (6110, 6115) */
|
|
638
|
+
expiresAt?: Millis;
|
|
565
639
|
}
|
|
566
640
|
/** Re-issue of the anchor mapping after a rotation (6370): due now, or
|
|
567
641
|
* waiting until the relationship presents `awaitHead` (6596). */
|
package/dist/state.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACj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sDAAsD;IACtD,IAAI,EAAE,SAAS,GAAG,WAAW,CAAA;IAC7B;qCACiC;IACjC,GAAG,EAAE,cAAc,GAAG,IAAI,CAAA;IAC1B,EAAE,EAAE,cAAc,GAAG,IAAI,CAAA;IACzB;6EACyE;IACzE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;yEACqE;IACrE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAA;IAC3B;6EACyE;IACzE,cAAc,EAAE,OAAO,CAAA;CACxB;AAED;iDACiD;AACjD,wBAAgB,OAAO,CAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,YAAY,CAMjE;AAED,8BAA8B;AAC9B,wBAAgB,UAAU,CAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAsBtD"}
|
package/dist/state.js
CHANGED
|
@@ -30,7 +30,8 @@ export function emptyState(codec) {
|
|
|
30
30
|
prompts: {},
|
|
31
31
|
acts: {},
|
|
32
32
|
encounter: { challenges: {}, records: {}, introductions: {}, offers: {}, designators: {}, declarations: {} },
|
|
33
|
-
joining: { preludes: {}, invites: {} },
|
|
33
|
+
joining: { preludes: {}, invites: {}, surfaced: [], declined: [] },
|
|
34
|
+
messages: { blocked: [], rates: {}, ready: [], records: {}, inbox: {} },
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
//# sourceMappingURL=state.js.map
|
package/dist/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAiCA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAwB,EAAqB,EAAE,CAAC,CAAiC,CAAA;AAwrB1G;iDACiD;AACjD,MAAM,UAAU,OAAO,CAAE,IAA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E,EAAE,EAAE;QAC5G,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KACvC,CAAA;AACH,CAAC","sourcesContent":["// state — the holder's whole state as data (lib Stage 2, note §2.1).\n//\n// Pure JSON under a codec version (codec.ts): no CryptoKeys, promises,\n// closures, glyphs or human text. Counters are canonical decimal\n// strings, maps are records keyed by strings, sets are arrays, times\n// are integer milliseconds. Everything open (duties, outbox, rotations,\n// prompts, the act journal) lives here, so a restart loses nothing.\n// Keys are not state (Identity 9.3); the KeyProvider derives them.\n//\n// Rule numbers: bare four-digit numbers are RLTP-TRU (trust-layer.md);\n// Identity §n is identity-layer.md, Delivery §n delivery-contract.md.\nimport type { Json, JsonObject } from './core.js'\nimport type { Envelope } from './delivery.js'\nimport type { HolderEvent } from './events.js'\nimport type { DeliveryFailure, LogHead, PreTransportReason, ReceiverRefusalCode, Recipient } from './ports.js'\n\n/** Canonical decimal integer: \"0\" or no leading zero, at most 18 digits (2.1). */\nexport type Dec = string\n/** Unpadded base64url bytes. */\nexport type B64u = string\n/** Milliseconds since the epoch, a non-negative safe integer. */\nexport type Millis = number\n\ndeclare const OPAQUE: unique symbol\n\n/**\n * The holder's state at the consumer boundary (note §4.5): opaque. Store\n * adapters persist it as JSON and hand it back; apps never read inside it\n * and use the views (holder methods) instead. At runtime it is the\n * structural HolderState below, which only ./internal exposes.\n */\nexport interface OpaqueHolderState { readonly [OPAQUE]: 'HolderState' }\n\n/** The structural state as the opaque one, for the store and the facade. */\nexport const toOpaque = (s: Readonly<HolderState>): OpaqueHolderState => s as unknown as OpaqueHolderState\n\nexport interface HolderState {\n /** state format version (codec.ts) */\n codec: number\n /** engine-owned commit sequence, +1 on every commit; journal and events\n * carry it. The store's version token is for CAS only (ports.ts). */\n commitSeq: Dec\n /** highest `when` seen; a lower `when` is raised to it (note §4.7) */\n lastWhen: Millis\n register: Register\n addresses: Addresses\n /** keyed by entry id (= Contact.id) */\n contacts: Record<string, Contact>\n /** keyed by relationship id */\n relationships: Record<string, Relationship>\n entryOrder: EntryOrder\n /** keyed by group genesis digest */\n groups: Record<string, Group>\n profile: OwnProfile\n /** completed-effect cache, keyed by document digest (Delivery §6.2 stage 4/9) */\n effects: Record<string, Effect>\n /** issued documents, keyed by document digest */\n outbox: Record<string, OutboxItem>\n /** open duties, keyed by duty id */\n duties: Record<string, Duty>\n /** running rotations, keyed by rotation id */\n rotations: Record<string, Rotation>\n /** open decisions of the human, keyed by prompt id */\n prompts: Record<string, Prompt>\n /** act journal, keyed by actId (note §4.2) */\n acts: Record<string, ActRecord>\n encounter: EncounterState\n /** groups on the way in: the preludes answered and the invitations\n * received, before a welcome makes them groups (Membership 1.2, 3.1) */\n joining: Joining\n}\n\n// ── Identity ───────────────────────────────────────────────────────────\n\n/** The label register (Identity §2, §6.3): every set grows only. */\nexport interface Register {\n /** canonical labels ever used (Identity §6.1) */\n labels: string[]\n /** pair label → its 32-byte relationship nonce (Identity §6.1) */\n pairNonces: Record<string, B64u>\n /** relationship id → carrier-nonce entries; canonical is the highest\n * generation, then the smallest nonce (Identity §7a.3) */\n carriers: Record<string, CarrierNonce[]>\n /** device names and revocation marks, both monotone (Identity §5.5) */\n devices: { names: string[], revoked: string[] }\n /** the personal community: genesis digest and head generation (Identity §5.4) */\n community: { genesis: string, head: Dec } | null\n /** every signed anchor-rotation@2 the holder produced, chain order;\n * the source of the lineage segments of 6420 */\n lineage: AnchorRotation[]\n}\n\n/** A signed anchor-rotation@2 artifact (Trust §6.5). */\nexport type AnchorRotation = JsonObject\n\nexport interface CarrierNonce { nonce: B64u, generation: Dec }\n\n/** Key-agreement addresses and their lifecycle (Delivery §5). */\nexport interface Addresses {\n /** rkid → the label it derives under and when it was last shown */\n keys: Record<string, AddressKey>\n /** retired rkids, kept forever; never shrinks */\n tombstones: string[]\n}\n\nexport interface AddressKey { label: string, lastShown: Millis, retiredAt?: Millis }\n\n// ── Contacts: the entries of the deliverable set ──────────────────────\n\n/** The five trust classes (2720). */\nexport type TrustClass = 'star' | 'groupStar' | 'anchorMapping' | 'sealedGroupStar' | 'profile'\n/** One setting per class and contact (2810). */\nexport type Setting = 'default' | 'on' | 'off'\n\n/** A contact, i.e. one entry of the deliverable set (2120, 2140). */\nexport interface Contact {\n /** entry id: the surviving relationship identity (2100, 2140) */\n id: string\n /** entry-commit position (2120); null while no entry is committed (2060) */\n pos: Dec | null\n /** 'none' before the first verified mapping, 'pending' at a full set (2250) */\n status: 'none' | 'admitted' | 'pending'\n /** identities merged into this entry (2140) */\n aliases: string[]\n relIds: string[]\n /** the entry's anchor head (5610) */\n anchorHead: string | null\n /** per trust class (2810, merged by 2160) */\n settings: Record<TrustClass, Setting>\n /** sealed group star per group genesis (2830) */\n groupSettings: Record<string, Setting>\n}\n\n/** Two orders, kept apart. */\nexport interface EntryOrder {\n /** next entry-commit position (2120) */\n nextPos: Dec\n /** relationship ids by creation of their active head, oldest first (2180) */\n heads: string[]\n}\n\n// ── Relationships and tuples ───────────────────────────────────────────\n\n/** A holder-local chain of tuples with one active head, plus chain state (2280). */\nexport interface Relationship {\n id: string\n contactId: string\n /** chain order, oldest first */\n tuples: Tuple[]\n /** ownPairLabel of the active tuple */\n activeHead: string\n /** earliest community anchor a mapping was issued under here (2285) */\n earliestAnchor: string | null\n /** links held from verified lineages (6610) */\n links: Array<{ prev: string, next: string }>\n /** anchor → every pre-rotation binding held for it, sorted (6610: the\n * union over the mappings verified on any tuple of the chain; two where\n * a chaining joined tuples that disagree, a conflict the binding rule\n * sees, 6605) */\n bindings: Record<string, string[]>\n /** the counterpart's anchor head as last verified */\n heldCounterpartHead: string | null\n /** contact memory and evidence (2280) */\n memory: Record<string, Json>\n /** via: the introducer's contact; viaPin: the own pair label toward it\n * the act was pinned to (8270), which a split follows (2080) */\n provenance: { kind: 'ceremony' | 'introduced', via?: string, viaPin?: string, at: Millis }\n /** set when this chain was appended into another (6a.4): the fresh\n * relationship whose tuple a chaining appended to `chainedInto` stays as\n * a husk without tuples, its id resolving to the chain and its contactId\n * a chain alias of it (2090) */\n chainedInto: string | null\n /** commitSeq of the first verification commit on this relationship\n * (2190): its place in entry-commit order among the relationships of\n * one entry (2100); null before any */\n firstVerified: Dec | null\n}\n\n/** One pair context toward one counterpart: per-tuple state (2280). */\nexport interface Tuple {\n /** own `pair/…` label; identifies the tuple */\n ownPairLabel: string\n counterpartAnchor: string\n /** the counterpart's key-agreement Multikey, sealed to */\n counterpartKeyAgreement: string\n /** own key-agreement Multikey of this tuple (Delivery §5) */\n rkid: string\n /** the entry this tuple's verifications go to (2145) */\n entryId: string\n /** the active-head tuples of the holder's relationships when this\n * tuple was created, frozen (2300) */\n priorCandidates: TupleRef[]\n starOut: StarOut\n starIn: StarIn\n /** the group star's own scope and domain (5730) */\n groupStarOut: GroupStarOut\n groupStarIn: GroupStarIn\n /** 6a.2: the own probe sequence of this tuple direction (6680), the\n * probes in flight and whether one completed (its delivery acked) */\n probeOut: ProbeOut\n probeIn: { hwm: Dec, lowerBound: Dec, assembly: Assembly | null }\n /** 6a.4: own continuity-mapping issuance (6300) and the open work on it */\n continuityOut: ContinuityOut\n /** 6a.4: verified continuity mapping; recordPrior frozen by 6290 */\n continuityIn: { rev: Dec, body: Json | null, recordPrior: string | null }\n /** issued anchor mapping (6300) and the anchor it was issued under */\n mappingOut: { rev: Dec, body: Json | null, underAnchor: string | null }\n /** verified anchor mapping, its self and card */\n mappingIn: { rev: Dec, body: Json | null, self: string | null, card: Json | null }\n /** the profile revision last issued in this tuple's scope (6300, 6450):\n * the one counter's value it went out under, \"0\" before any */\n profileOut: { rev: Dec }\n /** verified profile (6b.2) */\n profileIn: { rev: Dec, body: Json | null, verifiedSeq: Dec }\n deactivated: boolean\n}\n\n/** A frozen reference to one tuple: its own pair label and the counterpart\n * anchor; in a prior-candidate set, `replaces` holds the counterpart\n * anchors of the candidates it took the place of in this tuple's flow\n * (spec follow-up 17), transitively, absent where none */\nexport interface TupleRef { ownPairLabel: string, counterpartAnchor: string, replaces?: string[] }\n\n/** Continuity work the tuple still owes (today's contMappingDue): the\n * record side's choice (with the remaining alternatives), the non-record\n * side's match report, or the alignment re-issue. */\nexport type ContinuityDue =\n | { kind: 'choice', prior: string, alts: string[] }\n | { kind: 'report', prior: string }\n | { kind: 'align', prior: string }\n\n/** A probe's sender state (6680, 6830). */\nexport interface ProbeOut {\n /** last assigned probe sequence, \"0\" before the first */\n seq: Dec\n /** probe → its chunks' digests and those acked */\n inflight: Record<string, { digests: string[], acked: string[] }>\n /** a probe completed: the standing probe duty ends (6830) */\n done: boolean\n}\n\nexport interface ContinuityOut {\n /** last issued revision and body (6300/6310) */\n rev: Dec\n body: Json | null\n /** the MACs of the last issued body: a resend (6840) re-seals the same\n * artifact without the prior tuple's key */\n proof: Json | null\n /** digests of the documents that carried the last issued body: this\n * issuance's alone, reset by the next (an ack of an earlier issuance\n * completes nothing of a later one) */\n sent: string[]\n /** the last issuance is the non-record side's alignment: issued after\n * the record side's mapping was verified (6930) */\n align: boolean\n /** record side: the prior it chose, final once set (contChosen) */\n chosen: string | null\n /** non-record side: the match it reported (contReported) */\n reported: string | null\n /** an alignment re-issue was acknowledged (contAligned) */\n aligned: boolean\n due: ContinuityDue | null\n}\n\n/** Sender side of one reconciled sequence over view elements V (5.4):\n * the salt scope, the baseline automaton and what is in flight. */\nexport interface SeqOut<V> {\n /** last issued salt, \"0\" before the first (5690) */\n lastSalt: Dec\n /** the scope issued its maximum and issues nothing further (2600/2610) */\n exhausted: boolean\n /** high-water mark H, highest completed salt (5630) */\n hwm: Dec\n /** snapshot S completed at H, or absent (5630) */\n snapshot: V[] | null\n /** SHA-256 hex of JCS(snapshot), null exactly when snapshot is: the\n * comparison key of the reconciliation (trust/star.ts viewDigest) */\n snapshotDigest: string | null\n /** salt → the view sent under it, its digest, and its chunks' digests (5660) */\n inflight: Record<string, { view: V[], viewDigest: string, digests: string[], acked: string[] }>\n}\n\n/** Receiver side of one chunked sequence (5.2a): A is what an accepted\n * salt leaves behind. */\nexport interface SeqIn<A> {\n hwm: Dec\n lowerBound: Dec\n assembly: Assembly | null\n accepted: A | null\n}\n\n/** One star reconciliation pair (member, anchor head of its entry) (5610). */\nexport interface StarPair { member: string, head: string }\nexport type StarOut = SeqOut<StarPair>\n/** A completed star as the receiver keeps it (trust/star.ts): its salt,\n * the whole assembled union of blinded values (sorted), and the entry ids\n * of the holder's contacts one of whose held anchors it carries (6160),\n * re-matched whenever the holder comes to hold new anchors. */\nexport type StarIn = SeqIn<{ salt: Dec, blinded: string[], matches: string[] }>\n\n/** One group-star domain element (5730): member and memberOp present for\n * sealed entries only, and a change of either diverges (5770). */\nexport type GroupStarItem =\n | { group: string, mode: 'digest' }\n | { group: string, mode: 'sealed', member: string, memberOp: string }\nexport type GroupStarOut = SeqOut<GroupStarItem>\n/** A completed group star as the receiver keeps it (trust/group-star.ts):\n * its salt, the whole assembled union of entries {d, c}, and the holder's\n * groups whose d it holds (5520), sorted; a group joined later is matched\n * against the union (groupStarRematch). */\nexport type GroupStarIn = SeqIn<{ salt: Dec, entries: Array<{ d: string, c: string }>, groups: string[] }>\n\n/** A chunked document under assembly: chunk index → chunk. */\nexport interface Assembly { salt: Dec, chunks: Record<string, Json> }\n\n// ── Groups, profile ────────────────────────────────────────────────────\n\nexport interface Group {\n /** genesis digest: the group's identity (Access 3.2) */\n id: string\n /** the group's name, as its genesis names it */\n name: string\n /** the group DID, its address, never its identity (Membership 2.3) */\n did?: string\n /** the signed genesis, as founded or as the welcome carried it */\n genesis?: JsonObject\n /** own member context label in this group: the founding pair label for\n * the founder (Access 3.4.1), group/<digest> for a member (5.1) */\n memberLabel: string\n /** group rules are group state, never entropy (note §3) */\n rules: { vouchThreshold: Dec }\n /** listed in the blinded group star (5.2b per-group switch) */\n listed: boolean\n /** the own member anchor in G (the anchor of memberLabel) and the oid\n * naming its canonical admission, or the genesis where the holder\n * founded G (5400). Required on a listed group (codec.ts): membership\n * sets them on join; only an unlisted group may lack them. */\n memberAnchor?: string\n memberOp?: string\n /** the members this holder knows of, by member anchor: its local view\n * (membership/*); the replicated log is the Access port's */\n roster: Record<string, RosterEntry>\n /** invitations this holder issued and not yet saw answered, by thread\n * (Membership 3.1: the invite opens its thread) */\n invitations: Record<string, OpenInvitation>\n /** consent pairs held toward an admission, by the accept document's\n * digest, with the vouches for it (Membership 3.4, Access 4.2) */\n evidence: Record<string, Evidence>\n /** preludes this holder sent for the group and awaits the answer of, by\n * thread: the contact and the own rkid of the tuple it went on */\n preludes: Record<string, { contactId: string, rkid: string, at: Millis }>\n /** the own accept's document digest, where the holder joined by one:\n * the vouches for it bind it (Access 5.3) */\n acceptDigest?: string\n}\n\n/** A member as this holder knows it (Membership 2.6: the enclosed card). */\nexport interface RosterEntry {\n /** member anchor */\n anchor: string\n /** the oid naming its admission (the accept's digest in this library's\n * welcome form), or the genesis digest for the founder */\n op: string\n /** its card's key agreement: what a document to it is sealed to */\n keyAgreement: string\n /** its card's display name, self-declared (Encounter 6120) */\n name?: string\n addedAt: Millis\n /** the contact this holder knows the member as, where it does */\n contactId?: string\n /** with contactId: the own rkid of the tuple that named the member as\n * that contact (its invitation's prelude), which a split follows (2080) */\n rkid?: string\n}\n\n/** An invitation issued (Membership 3.1): the invite document as sent. */\nexport interface OpenInvitation {\n /** the invitee's member anchor (credentialSubject.id) */\n invitee: string\n /** the invitee's member key agreement, from the prelude */\n keyAgreement: string\n contactId: string\n /** the own rkid of the tuple the prelude went on, which a split follows (2080) */\n rkid: string\n threadId: string\n /** the invitation's identity: its credential digest (RLTP-MT-2180) */\n credDigest: string\n invite: JsonObject\n validUntil: Millis\n}\n\n/** A consent pair held toward an admission (Membership 3.4). */\nexport interface Evidence {\n /** the invite and the accept documents, complete */\n invite: JsonObject\n accept: JsonObject\n /** vouch@2 credentials for this accept, at most 16 (3805) */\n vouches: JsonObject[]\n at: Millis\n}\n\n/** Groups on the way in (Membership 1.2, 3.1, 3.2). */\nexport interface Joining {\n /** preludes answered, by `<genesis digest> <inviter member anchor>`:\n * which contact asked as which inviter, so the invite that follows from\n * that anchor is surfaced as that contact's */\n /** by (group, inviter): the contact and the own rkid of the tuple the\n * prelude arrived on, the binding a later prelude is held against */\n preludes: Record<string, { group: string, inviter: string, contactId: string, rkid: string, memberLabel: string, at: Millis }>\n /** invitations received, by credential digest */\n invites: Record<string, ReceivedInvite>\n}\n\n/** An invitation received (Membership 3.1), surfaced as a group-invite prompt. */\nexport interface ReceivedInvite {\n credDigest: string\n /** genesis digest */\n group: string\n name: string\n contactId: string\n /** the own rkid of the tuple its prelude arrived on, which a split follows (2080) */\n rkid: string\n memberLabel: string\n /** the invite document, complete */\n invite: JsonObject\n promptId: string\n validUntil: Millis\n status: 'open' | 'accepted' | 'declined' | 'joined'\n /** the accept's document digest, once sent */\n acceptDigest?: string\n at: Millis\n}\n\n/** The holder's own profile: one revision counter (6450). */\nexport interface OwnProfile { body: Json | null, revision: Dec }\n\n// ── Delivery: effects and outbox ───────────────────────────────────────\n\n/** A completed effect with its retained ack (null for a terminal\n * document): the cache entry and the ack commit together at stage 9 and\n * expire together at expiresAt = commit + key-retention (Delivery 4.2, §7). */\nexport interface Effect { ack: StoredAck | null, expiresAt: Millis }\n\n/**\n * The acknowledgement of a completed effect, sealed once inside the\n * effect's transaction and re-sent byte-identical on every duplicate\n * (Delivery 4.2, 6.2 stage 4). Acks are outbox-less: no trias. Until the\n * app reports the ack's digest (any DeliveryReport status) it is unsent\n * and resume re-offers it on the retry policy like an outbox item\n * (attempt, nextAttemptAt, backoff), which covers a restart between the\n * receive commit and the send. At the horizon (at + horizonMs) the holder\n * stops offering it: `sent` with `sentBy: 'horizon'`; a redelivery of the\n * document still earns it (duplicate-known).\n */\nexport interface StoredAck {\n /** the ack document's digest; report() on it marks the ack sent */\n digest: string\n /** sealed to recipient.keyAgreement, as first emitted */\n envelope: Envelope\n threadId: string\n recipient: Recipient\n /** commit time of the effect, the first emission; the horizon counts from it */\n at: Millis\n /** emissions on the retry schedule so far (duplicates' re-sends excluded) */\n attempt: number\n /** next re-offer while unsent */\n nextAttemptAt?: Millis\n sent: boolean\n /** why it counts as sent: the app reported it, or the horizon passed */\n sentBy?: 'report' | 'horizon'\n}\n\nexport type OutboxStatus = 'submitted' | 'accepted' | 'delivered' | 'failed'\n\n/** One step of an item's history. `awaiting-transport` is a pre-transport\n * report, not a trias state (Delivery §6.1). The holder's own give-up\n * (RetryPolicy) is recorded as failed(expired-by-adapter-policy). */\nexport type OutboxStep =\n | { status: 'submitted', at: Millis, attempt: number }\n | { status: 'awaiting-transport', at: Millis, reason: PreTransportReason }\n | { status: 'accepted', at: Millis }\n | { status: 'delivered', at: Millis, late: boolean }\n | { status: 'failed', at: Millis, reason: Exclude<DeliveryFailure, 'rejected-by-receiver'> }\n | { status: 'failed', at: Millis, reason: 'rejected-by-receiver', code: ReceiverRefusalCode }\n\nexport interface OutboxItem {\n type: string\n threadId: string\n recipient: Recipient\n /** the envelope as last sent; retries resend it. Its rkid is\n * recipient.keyAgreement, never the own recipient.rkid. */\n envelope: Envelope\n attempt: number\n /** history, oldest first (Delivery §6.1) */\n history: OutboxStep[]\n nextAttemptAt?: Millis\n}\n\n// ── Duties ─────────────────────────────────────────────────────────────\n\n/** Re-issue of the anchor mapping after a rotation (6370): due now, or\n * waiting until the relationship presents `awaitHead` (6596). */\nexport interface ReissueMappingDuty { kind: 'reissue-mapping', v: 1, id: string, dueAt?: Millis, contactId: string, relId: string, awaitHead: string | null }\n/** Send a class's current artifact on a relationship it turned on for (2850). */\nexport interface ClassOnDuty { kind: 'class-on', v: 1, id: string, dueAt?: Millis, contactId: string, relId: string, cls: TrustClass }\n/** Deliver profile revision `rev` on a relationship (6455). */\nexport interface ProfileDuty { kind: 'profile', v: 1, id: string, dueAt?: Millis, contactId: string, relId: string, rev: Dec }\n/** Continuity resend on a tuple (6830–6850). */\nexport interface ContinuityDuty {\n kind: 'continuity', v: 1, id: string, dueAt?: Millis, relId: string, tuple: string, step: 'probe' | 'mapping'\n /** sends so far under this standing duty (the issuance counts) */\n attempt?: number\n /** when the last of them was sent: the next is due no earlier than\n * lastAt + backoff(attempt), a failure included */\n lastAt?: Millis\n}\n\n/** The persisted continuation of a merge (2230): the verification has\n * committed; these entries merge in one later atomic step. */\nexport interface MergeDuty {\n kind: 'merge', v: 1, id: string, dueAt?: Millis, entryIds: string[], relId: string\n /** what the merge was admitted against (6540, 6550, 6605): each entry's\n * anchor head, and per entry the other entries' heads it then held as\n * superseded. The duty runs only while this still holds */\n witness: { heads: Record<string, string>, superseded: Record<string, string[]> }\n}\n\n/** The mediator's one ack of an act, at t_received + ack-delay (Trust 8640). */\nexport interface IntroAckDuty { kind: 'intro-ack', v: 1, id: string, dueAt?: Millis, act: string }\n\n/** Step 2 of a running rotation (identity-state.ts): its log append, on\n * resume, until the log holds the entry; after a failure due again after\n * the retry backoff (attempt, lastAt). */\nexport interface RotationDuty { kind: 'rotation', v: 1, id: string, dueAt?: Millis, rotationId: string, attempt?: number, lastAt?: Millis }\n\n// Every duty may carry `dueAt`: resume runs it only from then on and\n// counts it into nextDueAt (engine.ts).\n\nexport type KnownDuty = ReissueMappingDuty | ClassOnDuty | ProfileDuty | ContinuityDuty | MergeDuty | RotationDuty | IntroAckDuty\n/** A duty of a kind (or version) this library does not know: kept as is. */\nexport interface UnknownDuty { kind: string, v: number, id: string, [field: string]: Json }\n/** Narrow with isKnownDuty (codec.ts) before switching on `kind`. */\nexport type Duty = KnownDuty | UnknownDuty\n\n// ── Rotations, prompts, acts, encounter ────────────────────────────────\n\n/**\n * A running rotation (identity-state.ts); steps in order: register, then\n * log, then duties. Step 1 commits the register's label and the whole\n * append closure with step 'log', so a restart repeats or recognizes\n * exactly that append (Log.append idempotence); the completion commits the\n * head, the lineage and the re-issue duties and removes the record.\n * 'register' and 'duties' name no state a commit leaves behind today.\n */\nexport interface Rotation {\n /** the generation it moves to, as a decimal string */\n id: string\n from: Dec\n to: Dec\n step: 'register' | 'log' | 'duties'\n startedAt: Millis\n /** the anchor.rotate body, incl. the signed anchor-rotation@2 */\n entry: Json\n /** the log head the entry is appended over */\n overHead: LogHead\n /** relationship id → anchor head the re-issue waits for, null = due at\n * once; decided at the label commit (6596) */\n awaitHead: Record<string, string | null>\n}\n\nexport type PromptKind = 'encounter-confirm' | 'group-invite' | 'introduction'\n/** The human's answer to a prompt (prompts.ts). */\nexport type PromptChoice = 'accept' | 'decline'\n\nexport interface Prompt {\n id: string\n kind: PromptKind\n contactId?: string\n groupId?: string\n openedAt: Millis\n expiresAt?: Millis\n}\n\n/** One journaled human act (note §4.2). */\nexport interface ActRecord {\n actId: string\n /** digest(JCS(name, input)) */\n inputHash: string\n /** commitSeq of the act's commit */\n commitSeq: Dec\n outboundDigests: string[]\n events: HolderEvent[]\n /** commit time, for retention like effects */\n at: Millis\n}\n\n/** Open challenges, enactment records and introduction acts (note §2.1). */\nexport interface EncounterState {\n /** own challenge values still held open (Encounter 5.3), by value */\n challenges: Record<string, OwnChallenge>\n /** enactment records (5.5), by the own challenge value: the consumed-\n * challenge history, kept for the life of the relation (5360) */\n records: Record<string, EnactmentRecord>\n /** introduction acts (Trust §8), by `<role>:<act id>`: per role (8320) */\n introductions: Record<string, IntroAct>\n /** introductions offered to this holder by a mediator, by prompt id */\n offers: Record<string, IntroOffer>\n /** the mediator's target designators (8610): designator → contact id */\n designators: Record<string, string>\n /** registry declarations held (Delivery §4.4), by `<issuer> <role>` */\n declarations: Record<string, HeldDeclaration>\n}\n\n/** The roles of an introduction act (Trust §8). */\nexport type IntroRole = 'requester' | 'mediator' | 'target'\n\n/** One role's view of one introduction act (8.1): its own lifecycle,\n * its pins and what 8200 retains, until the absolute lifetime (8310). */\nexport interface IntroAct {\n /** `<role>:<act>` */\n key: string\n act: string\n role: IntroRole\n /** requester: sent, acked, completed, failed; mediator: received,\n * forwarded, completed; target: received, consented, refused (8330–8380) */\n status: 'sent' | 'acked' | 'completed' | 'failed' | 'received' | 'forwarded' | 'consented' | 'refused'\n /** the request's issuedAt: the act's lifetime datum (8090) */\n issuedAt: Millis\n /** the request artifact and its card; the reply and its card (8200) */\n request: JsonObject\n requestCard: JsonObject\n reply: JsonObject | null\n replyCard: JsonObject | null\n /** the pinned tuples, by own pair label (8270): the requester's and the\n * target's toward the mediator, the mediator's toward each side */\n pins: { requester?: string, target?: string, mediator?: string }\n /** the threads: the request's (requester ↔ mediator) and the forward's (mediator ↔ target) */\n threads: { request: string, forward?: string }\n /** requester: its send (t_sent); mediator: entering received; target: the forward's arrival */\n at: Millis\n /** the ack-delay the role computes with (8.4, Delivery §4.4) */\n ackDelayMs: number\n /** the own fresh pair label of the act (requester, target) */\n ownLabel: string | null\n /** mediator: the one ack value produced (8640) */\n ack: JsonObject | null\n /** mediator: the reply forwarded and the vouchers sent (8360) */\n replyForwarded: boolean\n vouchersSent: boolean\n /** requester, target: a voucher held pending its reply (8770) */\n pendingVoucher: JsonObject | null\n /** requester, target: the accepted voucher, retained until the absolute\n * lifetime for the duplicate rule (8200, 8260) */\n voucher: JsonObject | null\n vouched: boolean\n /** target: the prompt asking for consent */\n promptId: string | null\n /** requester: the target's name as the offer carried it */\n peerName?: string\n}\n\n/** An introduction offered by a mediator (this library's offer form). */\nexport interface IntroOffer {\n /** the prompt's id */\n id: string\n mediatorContactId: string\n /** the own pair label toward the mediator, pinned at send (8270) */\n pin: string\n /** the mediator's opaque designator of the target (8610) */\n target: string\n /** a label the mediator's human typed in the introduce act */\n label?: string\n at: Millis\n}\n\n/** A registry declaration held for an (issuer, role) (Delivery §4.4). */\nexport interface HeldDeclaration { issuer: string, role: string, revision: Dec, constants: Record<string, string>, at: Millis }\n\n/** An own challenge value issued on a displayed card (5.3). */\nexport interface OwnChallenge {\n value: string\n /** issuance time t_ch */\n tCh: Millis\n /** the fresh pair label the card is shown under (4.4) */\n label: string\n /** the displayed card: the optical payload */\n card: JsonObject\n}\n\n/** A step credential with its credential digest (5.6 step 8). */\nexport interface HeldCredential { digest: string, credential: JsonObject }\n\n/** The enactment record (5.5), keyed by the own challenge value. Its\n * tuple is the relationship `relId` under the own pair label `label`. */\nexport interface EnactmentRecord {\n ceremony: string\n /** the own challenge value (the record key) and its issuance time */\n own: string\n tCh: Millis\n /** the counterparty's challenge value */\n peer: string\n /** the counterparty anchor and its card as received */\n counterpart: string\n card: JsonObject\n /** the enactment binding (5.4) */\n bind: string\n /** local time of the enactment */\n at: Millis\n label: string\n relId: string\n /** who scanned (sent the bundle) and who displayed */\n role: 'scanner' | 'displayer'\n /** the own step credential issued, and the counterparty's accepted,\n * per direction (5.6 step 8) */\n out: HeldCredential | null\n in: HeldCredential | null\n /** the thread of the bundle that opened the exchange and that bundle's\n * digest (Delivery 4.1); null on the displayer until a bundle landed */\n thread: string | null\n bundleDigest: string | null\n /** later threads used under this record: a re-issued bundle's (its\n * digest) or a standalone delivery's, threadId → document digest */\n threads: Record<string, string>\n /** the scanner's sent card: the optical leg's payload (5.8) */\n sentCard: JsonObject | null\n /** the displayer issued its counter credential on the optical leg\n * before the bundle landed: its document waits for the thread (5780) */\n counterPending: boolean\n}\n\n/** An outbox item's trias position (Delivery §6.1): its last step that is\n * not pre-transport, `submitted` before any. */\nexport function triasOf (item: Readonly<OutboxItem>): OutboxStatus {\n for (let i = item.history.length - 1; i >= 0; i--) {\n const s = item.history[i].status\n if (s !== 'awaiting-transport') return s\n }\n return 'submitted'\n}\n\n/** A fresh holder's state. */\nexport function emptyState (codec: number): HolderState {\n return {\n codec,\n commitSeq: '0',\n lastWhen: 0,\n register: { labels: [], pairNonces: {}, carriers: {}, devices: { names: [], revoked: [] }, community: null, lineage: [] },\n addresses: { keys: {}, tombstones: [] },\n contacts: {},\n relationships: {},\n entryOrder: { nextPos: '0', heads: [] },\n groups: {},\n profile: { body: null, revision: '0' },\n effects: {},\n outbox: {},\n duties: {},\n rotations: {},\n prompts: {},\n acts: {},\n encounter: { challenges: {}, records: {}, introductions: {}, offers: {}, designators: {}, declarations: {} },\n joining: { preludes: {}, invites: {} },\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","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AE;QACX,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;QAC5G,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAClE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;KACxE,CAAA;AACH,CAAC","sourcesContent":["// state — the holder's whole state as data (lib Stage 2, note §2.1).\n//\n// Pure JSON under a codec version (codec.ts): no CryptoKeys, promises,\n// closures, glyphs or human text. Counters are canonical decimal\n// strings, maps are records keyed by strings, sets are arrays, times\n// are integer milliseconds. Everything open (duties, outbox, rotations,\n// prompts, the act journal) lives here, so a restart loses nothing.\n// Keys are not state (Identity 9.3); the KeyProvider derives them.\n//\n// Rule numbers: bare four-digit numbers are RLTP-TRU (trust-layer.md);\n// Identity §n is identity-layer.md, Delivery §n delivery-contract.md.\nimport type { Json, JsonObject } from './core.js'\nimport type { Envelope } from './delivery.js'\nimport type { HolderEvent } from './events.js'\nimport type { DeliveryFailure, LogHead, PreTransportReason, ReceiverRefusalCode, Recipient } from './ports.js'\n\n/** Canonical decimal integer: \"0\" or no leading zero, at most 18 digits (2.1). */\nexport type Dec = string\n/** Unpadded base64url bytes. */\nexport type B64u = string\n/** Milliseconds since the epoch, a non-negative safe integer. */\nexport type Millis = number\n\ndeclare const OPAQUE: unique symbol\n\n/**\n * The holder's state at the consumer boundary (note §4.5): opaque. Store\n * adapters persist it as JSON and hand it back; apps never read inside it\n * and use the views (holder methods) instead. At runtime it is the\n * structural HolderState below, which only ./internal exposes.\n */\nexport interface OpaqueHolderState { readonly [OPAQUE]: 'HolderState' }\n\n/** The structural state as the opaque one, for the store and the facade. */\nexport const toOpaque = (s: Readonly<HolderState>): OpaqueHolderState => s as unknown as OpaqueHolderState\n\nexport interface HolderState {\n /** state format version (codec.ts) */\n codec: number\n /** engine-owned commit sequence, +1 on every commit; journal and events\n * carry it. The store's version token is for CAS only (ports.ts). */\n commitSeq: Dec\n /** highest `when` seen; a lower `when` is raised to it (note §4.7) */\n lastWhen: Millis\n register: Register\n addresses: Addresses\n /** keyed by entry id (= Contact.id) */\n contacts: Record<string, Contact>\n /** keyed by relationship id */\n relationships: Record<string, Relationship>\n entryOrder: EntryOrder\n /** keyed by group genesis digest */\n groups: Record<string, Group>\n profile: OwnProfile\n /** completed-effect cache, keyed by document digest (Delivery §6.2 stage 4/9) */\n effects: Record<string, Effect>\n /** issued documents, keyed by document digest */\n outbox: Record<string, OutboxItem>\n /** open duties, keyed by duty id */\n duties: Record<string, Duty>\n /** running rotations, keyed by rotation id */\n rotations: Record<string, Rotation>\n /** open decisions of the human, keyed by prompt id */\n prompts: Record<string, Prompt>\n /** act journal, keyed by actId (note §4.2) */\n acts: Record<string, ActRecord>\n encounter: EncounterState\n /** groups on the way in: the preludes answered and the invitations\n * received, before a welcome makes them groups (Membership 3.5, 3.1) */\n joining: Joining\n /** Message Tasks 0.1 on the holder: the block of relationships and the\n * rates per relationship (message/holder.ts) */\n messages: MessagesState\n}\n\n// ── Message Tasks: the block and the rates ─────────────────────────────\n\n/** What Message Tasks 0.1 keeps on the holder (message/holder.ts). The\n * time mark of RLTP-MSG-4060 is `lastWhen`: it never falls, every commit\n * writes it, and the CAS commits only on the state it was read with. */\nexport interface MessagesState {\n /** the relationships under a block (Message Tasks 6.1): chain-level\n * state of a relationship (Trust 2280), by relationship id, sorted */\n blocked: string[]\n /** per relationship id: the times at which documents counted against a\n * rate were accepted, inside the last 24 hours (Message Tasks 4.2):\n * new message/0.1 document digests (4110) and invitations with a\n * credential digest new to the holder (4115, Membership RLTP-MT-3105) */\n rates: Record<string, Rates>\n /** the own pair labels of the tuples that are ready (5.1, 5020): a\n * document whose issuer is the counterpart was accepted on them; sorted */\n ready: string[]\n /** the completion record (4.4), per tuple (own pair label) and inbound\n * direction: mid → the body's digest and its sentAt */\n records: Record<string, Record<string, MessageRecord>>\n /** the inbox (4.5): messages accepted and not yet taken over by the\n * application, by the accepted document's digest */\n inbox: Record<string, InboxEntry>\n}\n\n/** The acceptance times a rate counts, oldest first. */\nexport interface Rates { invites: Millis[], messages: Millis[] }\n\n/** One completion-record entry (RLTP-MSG-4310). */\nexport interface MessageRecord { bodyDigest: string, sentAt: Millis }\n\n/** One inbox entry (RLTP-MSG-4410): the body unchanged, the t_ref of its\n * acceptance and the display time min(sentAt, receivedAt), fixed then. */\nexport interface InboxEntry {\n /** the accepted document's digest */\n id: string\n /** the own pair label of the arrival tuple */\n tuple: string\n mid: string\n /** the message@1 body as it arrived */\n body: JsonObject\n receivedAt: Millis\n displayAt: Millis\n}\n\n// ── Identity ───────────────────────────────────────────────────────────\n\n/** The label register (Identity §2, §6.3): every set grows only. */\nexport interface Register {\n /** canonical labels ever used (Identity §6.1) */\n labels: string[]\n /** pair label → its 32-byte relationship nonce (Identity §6.1) */\n pairNonces: Record<string, B64u>\n /** relationship id → carrier-nonce entries; canonical is the highest\n * generation, then the smallest nonce (Identity §7a.3) */\n carriers: Record<string, CarrierNonce[]>\n /** device names and revocation marks, both monotone (Identity §5.5) */\n devices: { names: string[], revoked: string[] }\n /** the personal community: genesis digest and head generation (Identity §5.4) */\n community: { genesis: string, head: Dec } | null\n /** every signed anchor-rotation@2 the holder produced, chain order;\n * the source of the lineage segments of 6420 */\n lineage: AnchorRotation[]\n}\n\n/** A signed anchor-rotation@2 artifact (Trust §6.5). */\nexport type AnchorRotation = JsonObject\n\nexport interface CarrierNonce { nonce: B64u, generation: Dec }\n\n/** Key-agreement addresses and their lifecycle (Delivery §5). */\nexport interface Addresses {\n /** rkid → the label it derives under and when it was last shown */\n keys: Record<string, AddressKey>\n /** retired rkids, kept forever; never shrinks */\n tombstones: string[]\n}\n\nexport interface AddressKey { label: string, lastShown: Millis, retiredAt?: Millis }\n\n// ── Contacts: the entries of the deliverable set ──────────────────────\n\n/** The five trust classes (2720). */\nexport type TrustClass = 'star' | 'groupStar' | 'anchorMapping' | 'sealedGroupStar' | 'profile'\n/** One setting per class and contact (2810). */\nexport type Setting = 'default' | 'on' | 'off'\n\n/** A contact, i.e. one entry of the deliverable set (2120, 2140). */\nexport interface Contact {\n /** entry id: the surviving relationship identity (2100, 2140) */\n id: string\n /** entry-commit position (2120); null while no entry is committed (2060) */\n pos: Dec | null\n /** 'none' before the first verified mapping, 'pending' at a full set (2250) */\n status: 'none' | 'admitted' | 'pending'\n /** identities merged into this entry (2140) */\n aliases: string[]\n relIds: string[]\n /** the entry's anchor head (5610) */\n anchorHead: string | null\n /** per trust class (2810, merged by 2160) */\n settings: Record<TrustClass, Setting>\n /** sealed group star per group genesis (2830) */\n groupSettings: Record<string, Setting>\n}\n\n/** Two orders, kept apart. */\nexport interface EntryOrder {\n /** next entry-commit position (2120) */\n nextPos: Dec\n /** relationship ids by creation of their active head, oldest first (2180) */\n heads: string[]\n}\n\n// ── Relationships and tuples ───────────────────────────────────────────\n\n/** A holder-local chain of tuples with one active head, plus chain state (2280). */\nexport interface Relationship {\n id: string\n contactId: string\n /** chain order, oldest first */\n tuples: Tuple[]\n /** ownPairLabel of the active tuple */\n activeHead: string\n /** earliest community anchor a mapping was issued under here (2285) */\n earliestAnchor: string | null\n /** links held from verified lineages (6610) */\n links: Array<{ prev: string, next: string }>\n /** anchor → every pre-rotation binding held for it, sorted (6610: the\n * union over the mappings verified on any tuple of the chain; two where\n * a chaining joined tuples that disagree, a conflict the binding rule\n * sees, 6605) */\n bindings: Record<string, string[]>\n /** the counterpart's anchor head as last verified */\n heldCounterpartHead: string | null\n /** contact memory and evidence (2280) */\n memory: Record<string, Json>\n /** via: the introducer's contact; viaPin: the own pair label toward it\n * the act was pinned to (8270), which a split follows (2080) */\n provenance: { kind: 'ceremony' | 'introduced', via?: string, viaPin?: string, at: Millis }\n /** set when this chain was appended into another (6a.4): the fresh\n * relationship whose tuple a chaining appended to `chainedInto` stays as\n * a husk without tuples, its id resolving to the chain and its contactId\n * a chain alias of it (2090) */\n chainedInto: string | null\n /** commitSeq of the first verification commit on this relationship\n * (2190): its place in entry-commit order among the relationships of\n * one entry (2100); null before any */\n firstVerified: Dec | null\n}\n\n/** One pair context toward one counterpart: per-tuple state (2280). */\nexport interface Tuple {\n /** own `pair/…` label; identifies the tuple */\n ownPairLabel: string\n counterpartAnchor: string\n /** the counterpart's key-agreement Multikey, sealed to */\n counterpartKeyAgreement: string\n /** own key-agreement Multikey of this tuple (Delivery §5) */\n rkid: string\n /** the entry this tuple's verifications go to (2145) */\n entryId: string\n /** the active-head tuples of the holder's relationships when this\n * tuple was created, frozen (2300) */\n priorCandidates: TupleRef[]\n starOut: StarOut\n starIn: StarIn\n /** the group star's own scope and domain (5730) */\n groupStarOut: GroupStarOut\n groupStarIn: GroupStarIn\n /** 6a.2: the own probe sequence of this tuple direction (6680), the\n * probes in flight and whether one completed (its delivery acked) */\n probeOut: ProbeOut\n probeIn: { hwm: Dec, lowerBound: Dec, assembly: Assembly | null }\n /** 6a.4: own continuity-mapping issuance (6300) and the open work on it */\n continuityOut: ContinuityOut\n /** 6a.4: verified continuity mapping; recordPrior frozen by 6290 */\n continuityIn: { rev: Dec, body: Json | null, recordPrior: string | null }\n /** issued anchor mapping (6300) and the anchor it was issued under */\n mappingOut: { rev: Dec, body: Json | null, underAnchor: string | null }\n /** verified anchor mapping, its self and card */\n mappingIn: { rev: Dec, body: Json | null, self: string | null, card: Json | null }\n /** the profile revision last issued in this tuple's scope (6300, 6450):\n * the one counter's value it went out under, \"0\" before any */\n profileOut: { rev: Dec }\n /** verified profile (6b.2) */\n profileIn: { rev: Dec, body: Json | null, verifiedSeq: Dec }\n deactivated: boolean\n}\n\n/** A frozen reference to one tuple: its own pair label and the counterpart\n * anchor; in a prior-candidate set, `replaces` holds the counterpart\n * anchors of the candidates it took the place of in this tuple's flow\n * (spec follow-up 17), transitively, absent where none */\nexport interface TupleRef { ownPairLabel: string, counterpartAnchor: string, replaces?: string[] }\n\n/** Continuity work the tuple still owes (today's contMappingDue): the\n * record side's choice (with the remaining alternatives), the non-record\n * side's match report, or the alignment re-issue. */\nexport type ContinuityDue =\n | { kind: 'choice', prior: string, alts: string[] }\n | { kind: 'report', prior: string }\n | { kind: 'align', prior: string }\n\n/** A probe's sender state (6680, 6830). */\nexport interface ProbeOut {\n /** last assigned probe sequence, \"0\" before the first */\n seq: Dec\n /** probe → its chunks' digests and those acked */\n inflight: Record<string, { digests: string[], acked: string[] }>\n /** a probe completed: the standing probe duty ends (6830) */\n done: boolean\n}\n\nexport interface ContinuityOut {\n /** last issued revision and body (6300/6310) */\n rev: Dec\n body: Json | null\n /** the MACs of the last issued body: a resend (6840) re-seals the same\n * artifact without the prior tuple's key */\n proof: Json | null\n /** digests of the documents that carried the last issued body: this\n * issuance's alone, reset by the next (an ack of an earlier issuance\n * completes nothing of a later one) */\n sent: string[]\n /** the last issuance is the non-record side's alignment: issued after\n * the record side's mapping was verified (6930) */\n align: boolean\n /** record side: the prior it chose, final once set (contChosen) */\n chosen: string | null\n /** non-record side: the match it reported (contReported) */\n reported: string | null\n /** an alignment re-issue was acknowledged (contAligned) */\n aligned: boolean\n due: ContinuityDue | null\n}\n\n/** Sender side of one reconciled sequence over view elements V (5.4):\n * the salt scope, the baseline automaton and what is in flight. */\nexport interface SeqOut<V> {\n /** last issued salt, \"0\" before the first (5690) */\n lastSalt: Dec\n /** the scope issued its maximum and issues nothing further (2600/2610) */\n exhausted: boolean\n /** high-water mark H, highest completed salt (5630) */\n hwm: Dec\n /** snapshot S completed at H, or absent (5630) */\n snapshot: V[] | null\n /** SHA-256 hex of JCS(snapshot), null exactly when snapshot is: the\n * comparison key of the reconciliation (trust/star.ts viewDigest) */\n snapshotDigest: string | null\n /** salt → the view sent under it, its digest, and its chunks' digests (5660) */\n inflight: Record<string, { view: V[], viewDigest: string, digests: string[], acked: string[] }>\n}\n\n/** Receiver side of one chunked sequence (5.2a): A is what an accepted\n * salt leaves behind. */\nexport interface SeqIn<A> {\n hwm: Dec\n lowerBound: Dec\n assembly: Assembly | null\n accepted: A | null\n}\n\n/** One star reconciliation pair (member, anchor head of its entry) (5610). */\nexport interface StarPair { member: string, head: string }\nexport type StarOut = SeqOut<StarPair>\n/** A completed star as the receiver keeps it (trust/star.ts): its salt,\n * the whole assembled union of blinded values (sorted), and the entry ids\n * of the holder's contacts one of whose held anchors it carries (6160),\n * re-matched whenever the holder comes to hold new anchors. */\nexport type StarIn = SeqIn<{ salt: Dec, blinded: string[], matches: string[] }>\n\n/** One group-star domain element (5730): member and memberOp present for\n * sealed entries only, and a change of either diverges (5770). */\nexport type GroupStarItem =\n | { group: string, mode: 'digest' }\n | { group: string, mode: 'sealed', member: string, memberOp: string }\nexport type GroupStarOut = SeqOut<GroupStarItem>\n/** A completed group star as the receiver keeps it (trust/group-star.ts):\n * its salt, the whole assembled union of entries {d, c}, and the holder's\n * groups whose d it holds (5520), sorted; a group joined later is matched\n * against the union (groupStarRematch). */\nexport type GroupStarIn = SeqIn<{ salt: Dec, entries: Array<{ d: string, c: string }>, groups: string[] }>\n\n/** A chunked document under assembly: chunk index → chunk. */\nexport interface Assembly { salt: Dec, chunks: Record<string, Json> }\n\n// ── Groups, profile ────────────────────────────────────────────────────\n\nexport interface Group {\n /** genesis digest: the group's identity (Access 3.2) */\n id: string\n /** the group's name, as its genesis names it */\n name: string\n /** the group DID, its address, never its identity (Membership 2.3) */\n did?: string\n /** the signed genesis, as founded or as the welcome carried it */\n genesis?: JsonObject\n /** own member context label in this group: the founding pair label for\n * the founder (Access 3.4.1), group/<digest> for a member (5.1) */\n memberLabel: string\n /** group rules are group state, never entropy (note §3) */\n rules: { vouchThreshold: Dec }\n /** listed in the blinded group star (5.2b per-group switch) */\n listed: boolean\n /** the own member anchor in G (the anchor of memberLabel) and the oid\n * naming its canonical admission, or the genesis where the holder\n * founded G (5400). Required on a listed group (codec.ts): membership\n * sets them on join; only an unlisted group may lack them. */\n memberAnchor?: string\n memberOp?: string\n /** the members this holder knows of, by member anchor: its local view\n * (membership/*); the replicated log is the Access port's */\n roster: Record<string, RosterEntry>\n /** invitations this holder issued and not yet saw answered, by thread\n * (Membership 3.1: the invite opens its thread) */\n invitations: Record<string, OpenInvitation>\n /** consent pairs held toward an admission, by the accept document's\n * digest, with the vouches for it (Membership 3.4, Access 4.2) */\n evidence: Record<string, Evidence>\n /** preludes this holder sent for the group and awaits the answer of, by\n * thread: the contact and the own rkid of the tuple it went on */\n preludes: Record<string, { contactId: string, rkid: string, at: Millis }>\n /** the own accept's document digest, where the holder joined by one:\n * the vouches for it bind it (Access 5.3) */\n acceptDigest?: string\n}\n\n/** A member as this holder knows it (Membership 2.6: the enclosed card). */\nexport interface RosterEntry {\n /** member anchor */\n anchor: string\n /** the oid naming its admission (the accept's digest in this library's\n * welcome form), or the genesis digest for the founder */\n op: string\n /** its card's key agreement: what a document to it is sealed to */\n keyAgreement: string\n /** its card's display name, self-declared (Encounter 6120) */\n name?: string\n addedAt: Millis\n /** the contact this holder knows the member as, where it does */\n contactId?: string\n /** with contactId: the own rkid of the tuple that named the member as\n * that contact (its invitation's prelude), which a split follows (2080) */\n rkid?: string\n}\n\n/** An invitation issued (Membership 3.1): the invite document as sent. */\nexport interface OpenInvitation {\n /** the invitee's member anchor (credentialSubject.id) */\n invitee: string\n /** the invitee's member key agreement, from the prelude */\n keyAgreement: string\n contactId: string\n /** the own rkid of the tuple the prelude went on, which a split follows (2080) */\n rkid: string\n threadId: string\n /** the invitation's identity: its credential digest (RLTP-MT-2180) */\n credDigest: string\n invite: JsonObject\n validUntil: Millis\n}\n\n/** A consent pair held toward an admission (Membership 3.4). */\nexport interface Evidence {\n /** the invite and the accept documents, complete */\n invite: JsonObject\n accept: JsonObject\n /** vouch@2 credentials for this accept, at most 16 (3805) */\n vouches: JsonObject[]\n at: Millis\n}\n\n/** Groups on the way in (Membership 1.2, 3.1, 3.2). */\nexport interface Joining {\n /** preludes answered, by `<genesis digest> <inviter member anchor>`:\n * which contact asked as which inviter, so the invite that follows from\n * that anchor is surfaced as that contact's */\n /** by (group, inviter): the contact and the own rkid of the tuple the\n * prelude arrived on, the binding a later prelude is held against */\n preludes: Record<string, { group: string, inviter: string, contactId: string, rkid: string, memberLabel: string, at: Millis }>\n /** invitations received, by credential digest */\n invites: Record<string, ReceivedInvite>\n /** the credential digest of every invitation surfaced, for as long as\n * the holder exists (RLTP-MT-3130), sorted */\n surfaced: string[]\n /** the register of declined invitations: the credential digest of every\n * invitation declined under a block, holder-wide and for as long as the\n * holder exists (Message Tasks 6.4, RLTP-MT-3115), sorted */\n declined: string[]\n}\n\n/** An invitation received (Membership 3.1), surfaced as a group-invite prompt. */\nexport interface ReceivedInvite {\n credDigest: string\n /** genesis digest */\n group: string\n name: string\n /** the contact of the relationship its prelude binding attributed it to\n * (RLTP-MT-3100); absent for an invitation attributed to none */\n contactId?: string\n /** the own rkid of the tuple its prelude arrived on, which a split\n * follows (2080); absent with contactId */\n rkid?: string\n memberLabel: string\n /** the invite document, complete */\n invite: JsonObject\n promptId: string\n validUntil: Millis\n status: 'open' | 'accepted' | 'declined' | 'joined'\n /** the accept's document digest, once sent */\n acceptDigest?: string\n at: Millis\n}\n\n/** The holder's own profile: one revision counter (6450). */\nexport interface OwnProfile { body: Json | null, revision: Dec }\n\n// ── Delivery: effects and outbox ───────────────────────────────────────\n\n/** A completed effect with its retained ack (null for a terminal\n * document): the cache entry and the ack commit together at stage 9 and\n * expire together at expiresAt = commit + key-retention (Delivery 4.2, §7). */\nexport interface Effect { ack: StoredAck | null, expiresAt: Millis }\n\n/**\n * The acknowledgement of a completed effect, sealed once inside the\n * effect's transaction and re-sent byte-identical on every duplicate\n * (Delivery 4.2, 6.2 stage 4). Acks are outbox-less: no trias. It is\n * unsent until a service takes it (an `accepted` or `delivered` report on\n * its digest), the adapter reports it failed, or its retries end at the\n * horizon (at + horizonMs): `sent` with `sentBy` saying which (Delivery\n * RLTP-DEL-6330). An awaiting-transport report keeps it unsent and records\n * `held`: the adapter has it, resume does not re-offer it, and\n * pendingTransport keeps offering it (RLTP-DEL-6120). Unsent and not held,\n * resume re-offers it on the retry policy like an outbox item (attempt,\n * nextAttemptAt, backoff). Sent or not, it stays retained with its effect\n * until expiresAt, and a redelivery of the document still earns it\n * (duplicate-known, RLTP-DEL-6335).\n */\nexport interface StoredAck {\n /** the ack document's digest; report() on it marks the ack sent */\n digest: string\n /** sealed to recipient.keyAgreement, as first emitted */\n envelope: Envelope\n threadId: string\n recipient: Recipient\n /** commit time of the effect, the first emission; the horizon counts from it */\n at: Millis\n /** emissions on the retry schedule so far (duplicates' re-sends excluded) */\n attempt: number\n /** next re-offer while unsent */\n nextAttemptAt?: Millis\n sent: boolean\n /** why it counts as sent (present exactly when sent): a service took it,\n * the adapter reported it failed, or its retries ended at the horizon */\n sentBy?: 'accepted' | 'failed' | 'horizon'\n /** unsent and held by the adapter: its last report was awaiting-transport */\n held?: PreTransportReason\n /** the duplicates' answers granted so far (Delivery RLTP-DEL-6330): each\n * stage-4 duplicate arriving while none is due grants the next */\n answers?: number\n /** an answer is due: granted, its hand-over not yet begun; kept across a\n * lock, apart from the retries and `sent` (present with `answers`) */\n answerDue?: true\n}\n\nexport type OutboxStatus = 'submitted' | 'accepted' | 'delivered' | 'failed'\n\n/** One step of an item's history. `awaiting-transport` is a pre-transport\n * report, not a trias state (Delivery §6.1). The holder's own give-up\n * (RetryPolicy) is recorded as failed(expired-by-adapter-policy). */\nexport type OutboxStep =\n | { status: 'submitted', at: Millis, attempt: number }\n | { status: 'awaiting-transport', at: Millis, reason: PreTransportReason }\n | { status: 'accepted', at: Millis }\n | { status: 'delivered', at: Millis, late: boolean }\n | { status: 'failed', at: Millis, reason: Exclude<DeliveryFailure, 'rejected-by-receiver'> | 'task-expired' }\n | { status: 'failed', at: Millis, reason: 'rejected-by-receiver', code: ReceiverRefusalCode }\n\nexport interface OutboxItem {\n type: string\n threadId: string\n recipient: Recipient\n /** the envelope as last sent; retries resend it. Its rkid is\n * recipient.keyAgreement, never the own recipient.rkid. */\n envelope: Envelope\n attempt: number\n /** history, oldest first (Delivery §6.1) */\n history: OutboxStep[]\n nextAttemptAt?: Millis\n /** the sender lifetime its type declares (Delivery RLTP-DEL-7020):\n * from then on failed(task-expired), never handed out again (6110, 6115) */\n expiresAt?: Millis\n}\n\n// ── Duties ─────────────────────────────────────────────────────────────\n\n/** Re-issue of the anchor mapping after a rotation (6370): due now, or\n * waiting until the relationship presents `awaitHead` (6596). */\nexport interface ReissueMappingDuty { kind: 'reissue-mapping', v: 1, id: string, dueAt?: Millis, contactId: string, relId: string, awaitHead: string | null }\n/** Send a class's current artifact on a relationship it turned on for (2850). */\nexport interface ClassOnDuty { kind: 'class-on', v: 1, id: string, dueAt?: Millis, contactId: string, relId: string, cls: TrustClass }\n/** Deliver profile revision `rev` on a relationship (6455). */\nexport interface ProfileDuty { kind: 'profile', v: 1, id: string, dueAt?: Millis, contactId: string, relId: string, rev: Dec }\n/** Continuity resend on a tuple (6830–6850). */\nexport interface ContinuityDuty {\n kind: 'continuity', v: 1, id: string, dueAt?: Millis, relId: string, tuple: string, step: 'probe' | 'mapping'\n /** sends so far under this standing duty (the issuance counts) */\n attempt?: number\n /** when the last of them was sent: the next is due no earlier than\n * lastAt + backoff(attempt), a failure included */\n lastAt?: Millis\n}\n\n/** The persisted continuation of a merge (2230): the verification has\n * committed; these entries merge in one later atomic step. */\nexport interface MergeDuty {\n kind: 'merge', v: 1, id: string, dueAt?: Millis, entryIds: string[], relId: string\n /** what the merge was admitted against (6540, 6550, 6605): each entry's\n * anchor head, and per entry the other entries' heads it then held as\n * superseded. The duty runs only while this still holds */\n witness: { heads: Record<string, string>, superseded: Record<string, string[]> }\n}\n\n/** The mediator's one ack of an act, at t_received + ack-delay (Trust 8640). */\nexport interface IntroAckDuty { kind: 'intro-ack', v: 1, id: string, dueAt?: Millis, act: string }\n\n/** Step 2 of a running rotation (identity-state.ts): its log append, on\n * resume, until the log holds the entry; after a failure due again after\n * the retry backoff (attempt, lastAt). */\nexport interface RotationDuty { kind: 'rotation', v: 1, id: string, dueAt?: Millis, rotationId: string, attempt?: number, lastAt?: Millis }\n\n// Every duty may carry `dueAt`: resume runs it only from then on and\n// counts it into nextDueAt (engine.ts).\n\nexport type KnownDuty = ReissueMappingDuty | ClassOnDuty | ProfileDuty | ContinuityDuty | MergeDuty | RotationDuty | IntroAckDuty\n/** A duty of a kind (or version) this library does not know: kept as is. */\nexport interface UnknownDuty { kind: string, v: number, id: string, [field: string]: Json }\n/** Narrow with isKnownDuty (codec.ts) before switching on `kind`. */\nexport type Duty = KnownDuty | UnknownDuty\n\n// ── Rotations, prompts, acts, encounter ────────────────────────────────\n\n/**\n * A running rotation (identity-state.ts); steps in order: register, then\n * log, then duties. Step 1 commits the register's label and the whole\n * append closure with step 'log', so a restart repeats or recognizes\n * exactly that append (Log.append idempotence); the completion commits the\n * head, the lineage and the re-issue duties and removes the record.\n * 'register' and 'duties' name no state a commit leaves behind today.\n */\nexport interface Rotation {\n /** the generation it moves to, as a decimal string */\n id: string\n from: Dec\n to: Dec\n step: 'register' | 'log' | 'duties'\n startedAt: Millis\n /** the anchor.rotate body, incl. the signed anchor-rotation@2 */\n entry: Json\n /** the log head the entry is appended over */\n overHead: LogHead\n /** relationship id → anchor head the re-issue waits for, null = due at\n * once; decided at the label commit (6596) */\n awaitHead: Record<string, string | null>\n}\n\nexport type PromptKind = 'encounter-confirm' | 'group-invite' | 'introduction'\n/** The human's answer to a prompt (prompts.ts). */\nexport type PromptChoice = 'accept' | 'decline'\n\nexport interface Prompt {\n id: string\n kind: PromptKind\n contactId?: string\n groupId?: string\n openedAt: Millis\n expiresAt?: Millis\n}\n\n/** One journaled human act (note §4.2). */\nexport interface ActRecord {\n actId: string\n /** digest(JCS(name, input)) */\n inputHash: string\n /** commitSeq of the act's commit */\n commitSeq: Dec\n outboundDigests: string[]\n events: HolderEvent[]\n /** commit time, for retention like effects */\n at: Millis\n}\n\n/** Open challenges, enactment records and introduction acts (note §2.1). */\nexport interface EncounterState {\n /** own challenge values still held open (Encounter 5.3), by value */\n challenges: Record<string, OwnChallenge>\n /** enactment records (5.5), by the own challenge value: the consumed-\n * challenge history, kept for the life of the relation (5360) */\n records: Record<string, EnactmentRecord>\n /** introduction acts (Trust §8), by `<role>:<act id>`: per role (8320) */\n introductions: Record<string, IntroAct>\n /** introductions offered to this holder by a mediator, by prompt id */\n offers: Record<string, IntroOffer>\n /** the mediator's target designators (8610): designator → contact id */\n designators: Record<string, string>\n /** registry declarations held (Delivery §4.4), by `<issuer> <role>` */\n declarations: Record<string, HeldDeclaration>\n}\n\n/** The roles of an introduction act (Trust §8). */\nexport type IntroRole = 'requester' | 'mediator' | 'target'\n\n/** One role's view of one introduction act (8.1): its own lifecycle,\n * its pins and what 8200 retains, until the absolute lifetime (8310). */\nexport interface IntroAct {\n /** `<role>:<act>` */\n key: string\n act: string\n role: IntroRole\n /** requester: sent, acked, completed, failed; mediator: received,\n * forwarded, completed; target: received, consented, refused (8330–8380) */\n status: 'sent' | 'acked' | 'completed' | 'failed' | 'received' | 'forwarded' | 'consented' | 'refused'\n /** the request's issuedAt: the act's lifetime datum (8090) */\n issuedAt: Millis\n /** the request artifact and its card; the reply and its card (8200) */\n request: JsonObject\n requestCard: JsonObject\n reply: JsonObject | null\n replyCard: JsonObject | null\n /** the pinned tuples, by own pair label (8270): the requester's and the\n * target's toward the mediator, the mediator's toward each side */\n pins: { requester?: string, target?: string, mediator?: string }\n /** the threads: the request's (requester ↔ mediator) and the forward's (mediator ↔ target) */\n threads: { request: string, forward?: string }\n /** requester: its send (t_sent); mediator: entering received; target: the forward's arrival */\n at: Millis\n /** the ack-delay the role computes with (8.4, Delivery §4.4) */\n ackDelayMs: number\n /** the own fresh pair label of the act (requester, target) */\n ownLabel: string | null\n /** mediator: the one ack value produced (8640) */\n ack: JsonObject | null\n /** mediator: the reply forwarded and the vouchers sent (8360) */\n replyForwarded: boolean\n vouchersSent: boolean\n /** requester, target: a voucher held pending its reply (8770) */\n pendingVoucher: JsonObject | null\n /** requester, target: the accepted voucher, retained until the absolute\n * lifetime for the duplicate rule (8200, 8260) */\n voucher: JsonObject | null\n vouched: boolean\n /** target: the prompt asking for consent */\n promptId: string | null\n /** requester: the target's name as the offer carried it */\n peerName?: string\n}\n\n/** An introduction offered by a mediator (this library's offer form). */\nexport interface IntroOffer {\n /** the prompt's id */\n id: string\n mediatorContactId: string\n /** the own pair label toward the mediator, pinned at send (8270) */\n pin: string\n /** the mediator's opaque designator of the target (8610) */\n target: string\n /** a label the mediator's human typed in the introduce act */\n label?: string\n at: Millis\n}\n\n/** A registry declaration held for an (issuer, role) (Delivery §4.4). */\nexport interface HeldDeclaration { issuer: string, role: string, revision: Dec, constants: Record<string, string>, at: Millis }\n\n/** An own challenge value issued on a displayed card (5.3). */\nexport interface OwnChallenge {\n value: string\n /** issuance time t_ch */\n tCh: Millis\n /** the fresh pair label the card is shown under (4.4) */\n label: string\n /** the displayed card: the optical payload */\n card: JsonObject\n}\n\n/** A step credential with its credential digest (5.6 step 8). */\nexport interface HeldCredential { digest: string, credential: JsonObject }\n\n/** The enactment record (5.5), keyed by the own challenge value. Its\n * tuple is the relationship `relId` under the own pair label `label`. */\nexport interface EnactmentRecord {\n ceremony: string\n /** the own challenge value (the record key) and its issuance time */\n own: string\n tCh: Millis\n /** the counterparty's challenge value */\n peer: string\n /** the counterparty anchor and its card as received */\n counterpart: string\n card: JsonObject\n /** the enactment binding (5.4) */\n bind: string\n /** local time of the enactment */\n at: Millis\n label: string\n relId: string\n /** who scanned (sent the bundle) and who displayed */\n role: 'scanner' | 'displayer'\n /** the own step credential issued, and the counterparty's accepted,\n * per direction (5.6 step 8) */\n out: HeldCredential | null\n in: HeldCredential | null\n /** the thread of the bundle that opened the exchange and that bundle's\n * digest (Delivery 4.1); null on the displayer until a bundle landed */\n thread: string | null\n bundleDigest: string | null\n /** later threads used under this record: a re-issued bundle's (its\n * digest) or a standalone delivery's, threadId → document digest */\n threads: Record<string, string>\n /** the scanner's sent card: the optical leg's payload (5.8) */\n sentCard: JsonObject | null\n /** the displayer issued its counter credential on the optical leg\n * before the bundle landed: its document waits for the thread (5780) */\n counterPending: boolean\n}\n\n/** An outbox item's trias position (Delivery §6.1): its last step that is\n * not pre-transport, `submitted` before any. */\nexport function triasOf (item: Readonly<OutboxItem>): OutboxStatus {\n for (let i = item.history.length - 1; i >= 0; i--) {\n const s = item.history[i].status\n if (s !== 'awaiting-transport') return s\n }\n return 'submitted'\n}\n\n/** A fresh holder's state. */\nexport function emptyState (codec: number): HolderState {\n return {\n codec,\n commitSeq: '0',\n lastWhen: 0,\n register: { labels: [], pairNonces: {}, carriers: {}, devices: { names: [], revoked: [] }, community: null, lineage: [] },\n addresses: { keys: {}, tombstones: [] },\n contacts: {},\n relationships: {},\n entryOrder: { nextPos: '0', heads: [] },\n groups: {},\n profile: { body: null, revision: '0' },\n effects: {},\n outbox: {},\n duties: {},\n rotations: {},\n prompts: {},\n acts: {},\n encounter: { challenges: {}, records: {}, introductions: {}, offers: {}, designators: {}, declarations: {} },\n joining: { preludes: {}, invites: {}, surfaced: [], declined: [] },\n messages: { blocked: [], rates: {}, ready: [], records: {}, inbox: {} },\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuity.d.ts","sourceRoot":"","sources":["../../src/trust/continuity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"continuity.d.ts","sourceRoot":"","sources":["../../src/trust/continuity.ts"],"names":[],"mappings":"AAiQA,OAAO,KAAK,EAAc,OAAO,EAA2B,UAAU,EAAkB,YAAY,EAAE,cAAc,EAAmD,MAAM,cAAc,CAAA;AAE3L,OAAO,KAAK,EAA4D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AG,SAAS,GAAG,OAAO,CAkHpI;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAwC7F;AAihBD,iDAAiD;AACjD,wBAAgB,eAAe,CAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAAC,CASvJ;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,YAgBjC,CAAA"}
|
package/dist/trust/continuity.js
CHANGED
|
@@ -240,6 +240,7 @@
|
|
|
240
240
|
// C's earliestAnchor on r-A-x is right by 2285 as written (nothing
|
|
241
241
|
// earlier was issued on that relationship); it is the per-relationship
|
|
242
242
|
// scope, not the value, that leaves A without the link.
|
|
243
|
+
import { blockedRel, withBlocked } from '../message/holder.js';
|
|
243
244
|
import { iso, jcs, fromB64u } from '../core.js';
|
|
244
245
|
import { digestBytes, digestDoc } from '../crypto.js';
|
|
245
246
|
import { withLabel, withPairNonce } from '../identity-state.js';
|
|
@@ -511,9 +512,14 @@ export function chainTuple(state, label, prior, bound) {
|
|
|
511
512
|
awaitHead[R0.id] = own === undefined ? fresh : own === null || fresh === null ? null : own;
|
|
512
513
|
rotations[id] = { ...r, awaitHead };
|
|
513
514
|
}
|
|
515
|
+
// the block is chain-level state (Message Tasks 6010, 6030): the chain
|
|
516
|
+
// keeps its own, and takes the fresh relationship's, whose id becomes a husk
|
|
517
|
+
const messages = blockedRel(state, Rn.id) && !blockedRel(state, R0.id)
|
|
518
|
+
? { ...state.messages, blocked: withBlocked(state.messages.blocked, [R0.id], true) }
|
|
519
|
+
: state.messages;
|
|
514
520
|
let next = {
|
|
515
521
|
...state, relationships: { ...state.relationships, [R0.id]: chain, [Rn.id]: husk }, duties, rotations,
|
|
516
|
-
entryOrder: { ...state.entryOrder, heads },
|
|
522
|
+
entryOrder: { ...state.entryOrder, heads }, messages,
|
|
517
523
|
};
|
|
518
524
|
// the entries (2145, 2140)
|
|
519
525
|
const swap = (c) => ({ ...c, relIds: [...new Set(c.relIds.map((id) => (id === Rn.id ? R0.id : id)))] });
|