@skill-harness/adapters 0.17.0 → 0.19.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 (121) hide show
  1. package/dist/index.d.ts +0 -30
  2. package/dist/index.js +0 -30
  3. package/dist/model-pricing.d.ts +3 -0
  4. package/dist/model-pricing.js +24 -0
  5. package/dist/pi.js +26 -135
  6. package/package.json +5 -4
  7. package/prices/model-prices.json +43 -0
  8. package/dist/archive-access.d.ts +0 -58
  9. package/dist/archive-access.js +0 -61
  10. package/dist/archive-checkpoint.d.ts +0 -47
  11. package/dist/archive-checkpoint.js +0 -116
  12. package/dist/archive-facts.d.ts +0 -19
  13. package/dist/archive-facts.js +0 -20
  14. package/dist/archive-observer.d.ts +0 -21
  15. package/dist/archive-observer.js +0 -79
  16. package/dist/archive-policy.d.ts +0 -107
  17. package/dist/archive-policy.js +0 -135
  18. package/dist/archive-read-capability.d.ts +0 -49
  19. package/dist/archive-read-capability.js +0 -45
  20. package/dist/archive-retention-policy.d.ts +0 -52
  21. package/dist/archive-retention-policy.js +0 -49
  22. package/dist/archived-work.d.ts +0 -45
  23. package/dist/archived-work.js +0 -78
  24. package/dist/blind-intervention.d.ts +0 -35
  25. package/dist/blind-intervention.js +0 -218
  26. package/dist/codex-diagnostic-model.d.ts +0 -14
  27. package/dist/codex-diagnostic-model.js +0 -39
  28. package/dist/codex-host-observer.d.ts +0 -111
  29. package/dist/codex-host-observer.js +0 -309
  30. package/dist/codex-https.d.ts +0 -7
  31. package/dist/codex-https.js +0 -221
  32. package/dist/codex-model-profile.d.ts +0 -38
  33. package/dist/codex-model-profile.js +0 -54
  34. package/dist/codex-producer-ipc.d.ts +0 -55
  35. package/dist/codex-producer-ipc.js +0 -67
  36. package/dist/codex-sdk-transport.d.ts +0 -50
  37. package/dist/codex-sdk-transport.js +0 -294
  38. package/dist/codex-subscription.d.ts +0 -114
  39. package/dist/codex-subscription.js +0 -268
  40. package/dist/evidence-archive.d.ts +0 -65
  41. package/dist/evidence-archive.js +0 -225
  42. package/dist/execution-projection-schema.d.ts +0 -10
  43. package/dist/execution-projection-schema.js +0 -30
  44. package/dist/execution-retention-archive.d.ts +0 -69
  45. package/dist/execution-retention-archive.js +0 -154
  46. package/dist/generated/retention-v2-contract.d.ts +0 -72
  47. package/dist/generated/retention-v2-contract.js +0 -105
  48. package/dist/generated/retention-v2-json.d.ts +0 -24
  49. package/dist/generated/retention-v2-json.js +0 -268
  50. package/dist/generated/retention-v2-native-json.d.ts +0 -2
  51. package/dist/generated/retention-v2-native-json.js +0 -33
  52. package/dist/generated/retention-v2-native.d.ts +0 -58
  53. package/dist/generated/retention-v2-native.js +0 -155
  54. package/dist/generated/retention-v2-pin.d.ts +0 -2
  55. package/dist/generated/retention-v2-pin.js +0 -4
  56. package/dist/generated/retention-v2-types.d.ts +0 -49
  57. package/dist/generated/retention-v2-types.js +0 -2
  58. package/dist/generated/retention-v2-work-types.d.ts +0 -260
  59. package/dist/generated/retention-v2-work-types.js +0 -13
  60. package/dist/generated/work-v4/execution-id.d.ts +0 -5
  61. package/dist/generated/work-v4/execution-id.js +0 -14
  62. package/dist/generated/work-v4/json.d.ts +0 -24
  63. package/dist/generated/work-v4/json.js +0 -268
  64. package/dist/generated/work-v4/occurrences.d.ts +0 -226
  65. package/dist/generated/work-v4/occurrences.js +0 -116
  66. package/dist/generated/work-v4/pin.d.ts +0 -1
  67. package/dist/generated/work-v4/pin.js +0 -3
  68. package/dist/generated/work-v4/projection.d.ts +0 -294
  69. package/dist/generated/work-v4/projection.js +0 -238
  70. package/dist/generated/work-v4/reader.d.ts +0 -24
  71. package/dist/generated/work-v4/reader.js +0 -109
  72. package/dist/generated/work-v4/snapshot.d.ts +0 -28
  73. package/dist/generated/work-v4/snapshot.js +0 -268
  74. package/dist/generated/work-v4/types.d.ts +0 -260
  75. package/dist/generated/work-v4/types.js +0 -13
  76. package/dist/generated/work-v4/validation.d.ts +0 -13
  77. package/dist/generated/work-v4/validation.js +0 -227
  78. package/dist/installed-review-session.d.ts +0 -28
  79. package/dist/installed-review-session.js +0 -166
  80. package/dist/intervention-run.d.ts +0 -403
  81. package/dist/intervention-run.js +0 -169
  82. package/dist/learning-case.d.ts +0 -12
  83. package/dist/learning-case.js +0 -15
  84. package/dist/learning-journal.d.ts +0 -18
  85. package/dist/learning-journal.js +0 -256
  86. package/dist/learning-lifecycle.d.ts +0 -28
  87. package/dist/learning-lifecycle.js +0 -66
  88. package/dist/learning-trust-setup.d.ts +0 -64
  89. package/dist/learning-trust-setup.js +0 -55
  90. package/dist/learning-workspace.d.ts +0 -1084
  91. package/dist/learning-workspace.js +0 -705
  92. package/dist/principal-payload-port.d.ts +0 -25
  93. package/dist/principal-payload-port.js +0 -40
  94. package/dist/producer-product.d.ts +0 -70
  95. package/dist/producer-product.js +0 -186
  96. package/dist/producer-review.d.ts +0 -53
  97. package/dist/producer-review.js +0 -207
  98. package/dist/prompt-capture-extension.d.ts +0 -10
  99. package/dist/prompt-capture-extension.js +0 -26
  100. package/dist/prompt-provenance.d.ts +0 -22
  101. package/dist/prompt-provenance.js +0 -146
  102. package/dist/reviewed-archive-export.d.ts +0 -42
  103. package/dist/reviewed-archive-export.js +0 -78
  104. package/dist/session-observation.d.ts +0 -50
  105. package/dist/session-observation.js +0 -186
  106. package/dist/session-retention.d.ts +0 -48
  107. package/dist/session-retention.js +0 -121
  108. package/dist/trust-lifecycle.d.ts +0 -152
  109. package/dist/trust-lifecycle.js +0 -209
  110. package/dist/weekly-investigation.d.ts +0 -237
  111. package/dist/weekly-investigation.js +0 -330
  112. package/dist/work-candidates.d.ts +0 -29
  113. package/dist/work-candidates.js +0 -78
  114. package/dist/work-case-archive.d.ts +0 -25
  115. package/dist/work-case-archive.js +0 -63
  116. package/dist/work-case-review.d.ts +0 -45
  117. package/dist/work-case-review.js +0 -220
  118. package/dist/work-signal-cases.d.ts +0 -15
  119. package/dist/work-signal-cases.js +0 -54
  120. package/dist/work-signal-observation.d.ts +0 -23
  121. package/dist/work-signal-observation.js +0 -89
@@ -1,226 +0,0 @@
1
- import { type indexWorkLedgerText } from "./projection.js";
2
- import type { WorkFrozen, WorkSnapshot, WorkOccurrencePayload } from "./types.js";
3
- /** @internal One governed execution identity, many explicit work associations. No acceptance inferred. */
4
- export declare function foldWorkOccurrences(index: ReturnType<typeof indexWorkLedgerText>, snapshot: WorkFrozen<WorkSnapshot>): {
5
- runtime: {
6
- readonly counts: {
7
- readonly attempts: number;
8
- readonly variants: number;
9
- readonly observedCompletedAttempts: number;
10
- };
11
- readonly occurrences: readonly {
12
- readonly event: {
13
- readonly eventId: string;
14
- readonly digest: string;
15
- };
16
- readonly payload: {
17
- readonly scope: {
18
- readonly kind: import("./types.js").RevisionKind;
19
- readonly id: string;
20
- readonly revision: number;
21
- readonly digest: string;
22
- };
23
- readonly obligation: {
24
- readonly kind: import("./types.js").RevisionKind;
25
- readonly id: string;
26
- readonly revision: number;
27
- readonly digest: string;
28
- };
29
- readonly executionId: string;
30
- readonly parentExecutionId: string | null;
31
- readonly childId: string | null;
32
- readonly variantId: string | null;
33
- readonly artifact: {
34
- readonly kind: import("./types.js").RevisionKind;
35
- readonly id: string;
36
- readonly revision: number;
37
- readonly digest: string;
38
- } | null;
39
- readonly provenance: "declared" | "observed";
40
- readonly state: "unknown" | "starting" | "running" | "completed" | "failed";
41
- readonly labels: {
42
- readonly sessionId: string | null;
43
- readonly branchLeafId: string | null;
44
- readonly toolCallId: string | null;
45
- readonly taskId: string | null;
46
- readonly workspaceId: string | null;
47
- readonly definitionDigest: string | null;
48
- readonly configurationDigest: string | null;
49
- readonly modelId: string | null;
50
- readonly effortId: string | null;
51
- };
52
- };
53
- }[];
54
- readonly attempts: readonly {
55
- readonly executionId: string;
56
- readonly bindings: readonly {
57
- readonly scope: {
58
- readonly kind: import("./types.js").RevisionKind;
59
- readonly id: string;
60
- readonly revision: number;
61
- readonly digest: string;
62
- };
63
- readonly obligation: {
64
- readonly kind: import("./types.js").RevisionKind;
65
- readonly id: string;
66
- readonly revision: number;
67
- readonly digest: string;
68
- };
69
- readonly variantIds: readonly string[];
70
- readonly artifacts: readonly {
71
- readonly kind: import("./types.js").RevisionKind;
72
- readonly id: string;
73
- readonly revision: number;
74
- readonly digest: string;
75
- }[];
76
- }[];
77
- readonly parentExecutionId: string | null;
78
- readonly childId: string | null;
79
- readonly declaredLabels: readonly {
80
- readonly sessionId: string | null;
81
- readonly branchLeafId: string | null;
82
- readonly toolCallId: string | null;
83
- readonly taskId: string | null;
84
- readonly workspaceId: string | null;
85
- readonly definitionDigest: string | null;
86
- readonly configurationDigest: string | null;
87
- readonly modelId: string | null;
88
- readonly effortId: string | null;
89
- }[];
90
- readonly observedLabels: readonly {
91
- readonly sessionId: string | null;
92
- readonly branchLeafId: string | null;
93
- readonly toolCallId: string | null;
94
- readonly taskId: string | null;
95
- readonly workspaceId: string | null;
96
- readonly definitionDigest: string | null;
97
- readonly configurationDigest: string | null;
98
- readonly modelId: string | null;
99
- readonly effortId: string | null;
100
- }[];
101
- readonly effectiveLabels: {
102
- readonly sessionId: string | null;
103
- readonly branchLeafId: string | null;
104
- readonly toolCallId: string | null;
105
- readonly taskId: string | null;
106
- readonly workspaceId: string | null;
107
- readonly definitionDigest: string | null;
108
- readonly configurationDigest: string | null;
109
- readonly modelId: string | null;
110
- readonly effortId: string | null;
111
- };
112
- readonly state: WorkOccurrencePayload["state"] | "conflicted";
113
- readonly resolution: "resolved" | "unresolved";
114
- readonly problems: readonly {
115
- readonly code: import("./types.js").WorkResolutionCode;
116
- readonly reference: {
117
- readonly type: "revision";
118
- readonly ref: {
119
- readonly kind: import("./types.js").RevisionKind;
120
- readonly id: string;
121
- readonly revision: number;
122
- readonly digest: string;
123
- };
124
- } | {
125
- readonly type: "event";
126
- readonly ref: {
127
- readonly eventId: string;
128
- readonly digest: string;
129
- };
130
- } | {
131
- readonly type: "snapshot" | "authority" | "artifact-bytes" | "evidence-bytes";
132
- readonly ref: {
133
- readonly id: string;
134
- readonly digest: string;
135
- };
136
- } | {
137
- readonly type: "execution";
138
- readonly id: string;
139
- } | null;
140
- readonly affectedObligations: readonly {
141
- readonly kind: import("./types.js").RevisionKind;
142
- readonly id: string;
143
- readonly revision: number;
144
- readonly digest: string;
145
- }[];
146
- }[];
147
- }[];
148
- };
149
- problems: {
150
- readonly code: import("./types.js").WorkResolutionCode;
151
- readonly reference: {
152
- readonly type: "revision";
153
- readonly ref: {
154
- readonly kind: import("./types.js").RevisionKind;
155
- readonly id: string;
156
- readonly revision: number;
157
- readonly digest: string;
158
- };
159
- } | {
160
- readonly type: "event";
161
- readonly ref: {
162
- readonly eventId: string;
163
- readonly digest: string;
164
- };
165
- } | {
166
- readonly type: "snapshot" | "authority" | "artifact-bytes" | "evidence-bytes";
167
- readonly ref: {
168
- readonly id: string;
169
- readonly digest: string;
170
- };
171
- } | {
172
- readonly type: "execution";
173
- readonly id: string;
174
- } | null;
175
- readonly affectedObligations: readonly {
176
- readonly kind: import("./types.js").RevisionKind;
177
- readonly id: string;
178
- readonly revision: number;
179
- readonly digest: string;
180
- }[];
181
- }[];
182
- conflicts: {
183
- readonly kind: "event" | "receipt";
184
- readonly id: string;
185
- readonly digests: readonly string[];
186
- readonly affectedObligations: readonly {
187
- readonly kind: import("./types.js").RevisionKind;
188
- readonly id: string;
189
- readonly revision: number;
190
- readonly digest: string;
191
- }[];
192
- }[];
193
- eventProblems: Map<string, readonly {
194
- readonly code: import("./types.js").WorkResolutionCode;
195
- readonly reference: {
196
- readonly type: "revision";
197
- readonly ref: {
198
- readonly kind: import("./types.js").RevisionKind;
199
- readonly id: string;
200
- readonly revision: number;
201
- readonly digest: string;
202
- };
203
- } | {
204
- readonly type: "event";
205
- readonly ref: {
206
- readonly eventId: string;
207
- readonly digest: string;
208
- };
209
- } | {
210
- readonly type: "snapshot" | "authority" | "artifact-bytes" | "evidence-bytes";
211
- readonly ref: {
212
- readonly id: string;
213
- readonly digest: string;
214
- };
215
- } | {
216
- readonly type: "execution";
217
- readonly id: string;
218
- } | null;
219
- readonly affectedObligations: readonly {
220
- readonly kind: import("./types.js").RevisionKind;
221
- readonly id: string;
222
- readonly revision: number;
223
- readonly digest: string;
224
- }[];
225
- }[]>;
226
- };
@@ -1,116 +0,0 @@
1
- // GENERATED from pi-daddy 7c78769c47177b1972b09e1f5c5474ad44cd2cac by scripts/vendor-work-v4-reader.mjs. Do not hand-edit.
2
- import { workResultKey as key, sortWorkResults as sorted, mergeWorkProblems } from "./json.js";
3
- import { workEventConflictSources } from "./projection.js";
4
- const eventRef = (e) => ({ eventId: e.eventId, digest: e.digest });
5
- const emptyLabels = () => ({ sessionId: null, branchLeafId: null,
6
- toolCallId: null, taskId: null, workspaceId: null, definitionDigest: null, configurationDigest: null, modelId: null, effortId: null });
7
- /** @internal One governed execution identity, many explicit work associations. No acceptance inferred. */
8
- export function foldWorkOccurrences(index, snapshot) {
9
- const groups = new Map();
10
- const effectiveRefs = new Set(index.effectiveEvents.map(e => key({ eventId: e.eventId, digest: e.digest })));
11
- for (const event of index.candidates)
12
- if (event.event === "work_occurrence") {
13
- const group = groups.get(event.payload.executionId) ?? [];
14
- group.push(event);
15
- groups.set(event.payload.executionId, group);
16
- }
17
- const effective = new Map([...groups].map(([id, group]) => [id, group.filter(e => effectiveRefs.has(key(eventRef(e))))]));
18
- const selectedObligations = new Set(snapshot.bindings.map(b => key(b.obligation)));
19
- const selectedJoin = (e) => key(e.payload.scope) === key(snapshot.scope) && selectedObligations.has(key(e.payload.obligation));
20
- const attempts = [], occurrences = [];
21
- const allProblems = [], conflicts = [];
22
- const eventProblems = new Map();
23
- for (const [executionId, candidates] of groups) {
24
- const clean = effective.get(executionId);
25
- const bindings = new Map();
26
- for (const event of clean.filter(selectedJoin)) {
27
- const p = event.payload, id = key([p.scope, p.obligation]), prior = bindings.get(id);
28
- bindings.set(id, { scope: p.scope, obligation: p.obligation,
29
- variantIds: sorted([...(prior?.variantIds ?? []), ...(p.variantId ? [p.variantId] : [])]),
30
- artifacts: sorted([...(prior?.artifacts ?? []), ...(p.artifact ? [p.artifact] : [])]),
31
- });
32
- }
33
- const affected = sorted([...bindings.values()].map(b => b.obligation));
34
- const problems = [];
35
- const problem = (code, id = executionId) => problems.push({ code, reference: { type: "execution", id }, affectedObligations: affected });
36
- const badSources = sorted(candidates.flatMap(e => workEventConflictSources(index, e)));
37
- for (const ref of badSources)
38
- problems.push({ code: "EVENT_CONFLICT", reference: { type: "event", ref }, affectedObligations: affected });
39
- if (bindings.size)
40
- for (const id of sorted(badSources.map(ref => ref.eventId))) {
41
- conflicts.push({ kind: "event", id, digests: index.conflictingEvents.filter(ref => ref.eventId === id).map(ref => ref.digest), affectedObligations: affected });
42
- }
43
- const parents = sorted(clean.map(e => e.payload.parentExecutionId));
44
- const children = sorted(clean.flatMap(e => e.payload.childId ? [e.payload.childId] : []));
45
- const identityConflict = parents.length > 1 || children.length > 1;
46
- if (identityConflict)
47
- problem("OCCURRENCE_CONFLICT");
48
- let parentExecutionId = parents.length === 1 ? parents[0] : null;
49
- let childId = children.length === 1 ? children[0] : null;
50
- const observed = clean.filter(e => e.payload.provenance === "observed");
51
- const declaredLabels = sorted(clean.filter(e => e.payload.provenance === "declared").map(e => e.payload.labels));
52
- const observedLabels = sorted(observed.map(e => e.payload.labels));
53
- const effectiveLabels = emptyLabels();
54
- for (const label of Object.keys(effectiveLabels)) {
55
- const values = sorted(observed.flatMap(e => e.payload.labels[label] === null ? [] : [e.payload.labels[label]]));
56
- if (values.length > 1)
57
- problem("OBSERVATION_CONFLICT");
58
- else
59
- effectiveLabels[label] = values[0] ?? null;
60
- }
61
- const states = new Set(observed.map(e => e.payload.state));
62
- const terminalConflict = states.has("completed") && states.has("failed");
63
- if (terminalConflict)
64
- problem("OBSERVATION_CONFLICT");
65
- let state = terminalConflict ? "conflicted" : states.has("completed") ? "completed" :
66
- states.has("failed") ? "failed" : states.has("running") ? "running" : states.has("starting") ? "starting" : "unknown";
67
- if (identityConflict || badSources.length) {
68
- state = "conflicted";
69
- parentExecutionId = null;
70
- childId = null;
71
- Object.assign(effectiveLabels, emptyLabels());
72
- }
73
- else {
74
- const seen = new Set([executionId]);
75
- let parent = parentExecutionId;
76
- while (parent !== null) {
77
- if (seen.has(parent)) {
78
- problem("PARENT_CYCLE", parent);
79
- break;
80
- }
81
- seen.add(parent);
82
- const bodies = effective.get(parent);
83
- if (!bodies?.length) {
84
- problem("PARENT_MISSING", parent);
85
- break;
86
- }
87
- const alternatives = sorted(bodies.map(e => e.payload.parentExecutionId));
88
- if (alternatives.length !== 1) {
89
- problem("OCCURRENCE_CONFLICT", parent);
90
- break;
91
- }
92
- parent = alternatives[0];
93
- }
94
- if (effectiveLabels.branchLeafId === null)
95
- problem("BRANCH_UNKNOWN");
96
- }
97
- const rowProblems = mergeWorkProblems(problems);
98
- // Support closure can name an occurrence even when its association is not selected. Keep its
99
- // global identity diagnostics available internally; only selected joins become public attempts.
100
- for (const candidate of candidates)
101
- eventProblems.set(key(eventRef(candidate)), rowProblems);
102
- if (!bindings.size)
103
- continue;
104
- allProblems.push(...rowProblems);
105
- occurrences.push(...candidates.map(e => ({ event: eventRef(e), payload: e.payload })));
106
- attempts.push({ executionId, bindings: sorted(bindings.values()), parentExecutionId, childId, declaredLabels,
107
- observedLabels, effectiveLabels, state, resolution: rowProblems.length ? "unresolved" : "resolved", problems: rowProblems });
108
- }
109
- const runtime = { attempts: sorted(attempts), occurrences: sorted(occurrences), counts: {
110
- attempts: attempts.length,
111
- variants: new Set(attempts.flatMap(a => a.bindings.flatMap(b => b.variantIds))).size,
112
- observedCompletedAttempts: attempts.filter(a => a.resolution === "resolved" && a.state === "completed").length,
113
- } };
114
- return { runtime, problems: mergeWorkProblems(allProblems), conflicts, eventProblems };
115
- }
116
- //# sourceMappingURL=occurrences.js.map
@@ -1 +0,0 @@
1
- export declare const WORK_V4_READER_COMMIT = "7c78769c47177b1972b09e1f5c5474ad44cd2cac";
@@ -1,3 +0,0 @@
1
- // GENERATED: immutable work-v4 reader pin.
2
- export const WORK_V4_READER_COMMIT = "7c78769c47177b1972b09e1f5c5474ad44cd2cac";
3
- //# sourceMappingURL=pin.js.map
@@ -1,294 +0,0 @@
1
- import type { EventRef, RevisionRef, WorkFrozen, WorkIngestion, WorkLedgerEvent, WorkProjectionContext, WorkAvailability } from "./types.js";
2
- import type { resolveWorkSnapshotText } from "./snapshot.js";
3
- import type { foldWorkOccurrences } from "./occurrences.js";
4
- type IndexedEvent = WorkFrozen<WorkLedgerEvent>;
5
- /**
6
- * Internal first-pass evidence index, NOT the public WorkProjection result.
7
- * No selector, graph resolution, runtime counts or authority decisions are inferred here.
8
- * Keep every candidate plus the exact conflicting event references: later reachability must
9
- * inspect all alternatives, including nonselected associations and redelivered revision bodies.
10
- */
11
- interface WorkReplayIndex {
12
- readonly ingestion: WorkFrozen<WorkIngestion>;
13
- /** One body per validated (eventId,digest); includes quarantined evidence. */
14
- readonly candidates: readonly IndexedEvent[];
15
- /** Every alternative of every ID with multiple digests; not a chosen winner or receipt conflict. */
16
- readonly conflictingEvents: ReadonlyArray<WorkFrozen<EventRef>>;
17
- /** Exact revision bodies appearing in those conflicts, independent of delivery ID/timestamp. */
18
- readonly quarantinedRevisions: ReadonlyArray<WorkFrozen<RevisionRef>>;
19
- /** Central, frozen source index. Body keys point to IDs, not duplicated Cartesian candidate lists. */
20
- readonly conflictSources: {
21
- readonly bodies: Readonly<Record<string, readonly string[]>>;
22
- readonly events: Readonly<Record<string, readonly WorkFrozen<EventRef>[]>>;
23
- };
24
- /** Clean delivery identities only; these are evidence, never proof of acceptance or a current head. */
25
- readonly effectiveEvents: readonly IndexedEvent[];
26
- }
27
- type Sources = Pick<WorkReplayIndex, "conflictSources">;
28
- /** @internal Only index-derived validated events/references. Raw alternatives remain diagnostic input. */
29
- export declare function workEventConflictSources(index: Sources, event: IndexedEvent | WorkFrozen<EventRef>): WorkFrozen<EventRef>[];
30
- /** @internal Exact revision references need not have a clean delivery to be quarantined. */
31
- export declare function workRevisionConflictSources(index: Sources, ref: WorkFrozen<RevisionRef>): readonly WorkFrozen<EventRef>[];
32
- /**
33
- * @internal Strict text -> complete delivery grouping -> quarantine -> effective evidence.
34
- * Deliberately not re-exported by work-ledger.ts: this is not an unchecked public projector.
35
- * Raw serialized/archival byte hashes play no role in semantic delivery identity.
36
- */
37
- export declare function indexWorkLedgerText(text: string): WorkReplayIndex;
38
- /** @internal Global receipt identity diagnostics exist even without a resolved work selector. */
39
- export declare function indexWorkReceipts(authority: WorkFrozen<WorkProjectionContext>["authority"]): {
40
- receipts: Map<string, Map<string, {
41
- readonly receiptId: string;
42
- readonly authorityId: string;
43
- readonly claim: {
44
- readonly eventId: string;
45
- readonly digest: string;
46
- };
47
- readonly binding: {
48
- readonly snapshot: {
49
- readonly id: string;
50
- readonly digest: string;
51
- };
52
- readonly scope: {
53
- readonly kind: import("./types.js").RevisionKind;
54
- readonly id: string;
55
- readonly revision: number;
56
- readonly digest: string;
57
- };
58
- readonly intent: {
59
- readonly kind: import("./types.js").RevisionKind;
60
- readonly id: string;
61
- readonly revision: number;
62
- readonly digest: string;
63
- };
64
- readonly obligation: {
65
- readonly kind: import("./types.js").RevisionKind;
66
- readonly id: string;
67
- readonly revision: number;
68
- readonly digest: string;
69
- };
70
- readonly artifact: {
71
- readonly kind: import("./types.js").RevisionKind;
72
- readonly id: string;
73
- readonly revision: number;
74
- readonly digest: string;
75
- };
76
- readonly artifactDigest: string;
77
- readonly policy: {
78
- readonly kind: import("./types.js").RevisionKind;
79
- readonly id: string;
80
- readonly revision: number;
81
- readonly digest: string;
82
- };
83
- readonly evidence: readonly {
84
- readonly id: string;
85
- readonly digest: string;
86
- readonly event: {
87
- readonly eventId: string;
88
- readonly digest: string;
89
- } | null;
90
- }[];
91
- };
92
- readonly decision: "accept" | "reject";
93
- }>>;
94
- conflicts: {
95
- readonly kind: "event" | "receipt";
96
- readonly id: string;
97
- readonly digests: readonly string[];
98
- readonly affectedObligations: readonly {
99
- readonly kind: import("./types.js").RevisionKind;
100
- readonly id: string;
101
- readonly revision: number;
102
- readonly digest: string;
103
- }[];
104
- }[];
105
- };
106
- /** @internal Conditional binding proof, not authentication. Only the separately supplied, validated
107
- * host authority is a TCB input. No wire label, event, receipt-shaped payload or environment is trust. */
108
- export declare function projectWorkAcceptance(index: WorkReplayIndex, structure: ReturnType<typeof resolveWorkSnapshotText>, authority: WorkFrozen<WorkProjectionContext>["authority"], runtime: ReturnType<typeof foldWorkOccurrences>): {
109
- obligations: {
110
- readonly binding: {
111
- readonly intent: {
112
- readonly kind: import("./types.js").RevisionKind;
113
- readonly id: string;
114
- readonly revision: number;
115
- readonly digest: string;
116
- };
117
- readonly obligation: {
118
- readonly kind: import("./types.js").RevisionKind;
119
- readonly id: string;
120
- readonly revision: number;
121
- readonly digest: string;
122
- };
123
- readonly artifact: {
124
- readonly kind: import("./types.js").RevisionKind;
125
- readonly id: string;
126
- readonly revision: number;
127
- readonly digest: string;
128
- } | null;
129
- readonly policy: {
130
- readonly kind: import("./types.js").RevisionKind;
131
- readonly id: string;
132
- readonly revision: number;
133
- readonly digest: string;
134
- };
135
- };
136
- readonly acceptance: import("./types.js").WorkAcceptanceState;
137
- readonly artifactCoverage: {
138
- readonly state: WorkAvailability | "unselected";
139
- readonly items: readonly {
140
- readonly kind: "artifact" | "evidence";
141
- readonly identity: {
142
- readonly id: string;
143
- readonly digest: string;
144
- };
145
- readonly state: WorkAvailability;
146
- }[];
147
- };
148
- readonly evidenceCoverage: {
149
- readonly state: WorkAvailability | "unselected";
150
- readonly items: readonly {
151
- readonly kind: "artifact" | "evidence";
152
- readonly identity: {
153
- readonly id: string;
154
- readonly digest: string;
155
- };
156
- readonly state: WorkAvailability;
157
- }[];
158
- };
159
- readonly claims: readonly {
160
- readonly eventId: string;
161
- readonly digest: string;
162
- }[];
163
- readonly problems: readonly {
164
- readonly code: import("./types.js").WorkResolutionCode;
165
- readonly reference: {
166
- readonly type: "revision";
167
- readonly ref: {
168
- readonly kind: import("./types.js").RevisionKind;
169
- readonly id: string;
170
- readonly revision: number;
171
- readonly digest: string;
172
- };
173
- } | {
174
- readonly type: "event";
175
- readonly ref: {
176
- readonly eventId: string;
177
- readonly digest: string;
178
- };
179
- } | {
180
- readonly type: "snapshot" | "authority" | "artifact-bytes" | "evidence-bytes";
181
- readonly ref: {
182
- readonly id: string;
183
- readonly digest: string;
184
- };
185
- } | {
186
- readonly type: "execution";
187
- readonly id: string;
188
- } | null;
189
- readonly affectedObligations: readonly {
190
- readonly kind: import("./types.js").RevisionKind;
191
- readonly id: string;
192
- readonly revision: number;
193
- readonly digest: string;
194
- }[];
195
- }[];
196
- }[];
197
- claims: {
198
- readonly claim: {
199
- readonly eventId: string;
200
- readonly digest: string;
201
- };
202
- readonly obligation: {
203
- readonly kind: import("./types.js").RevisionKind;
204
- readonly id: string;
205
- readonly revision: number;
206
- readonly digest: string;
207
- };
208
- readonly applicability: import("./types.js").WorkAcceptanceState | "superseded";
209
- readonly matchedReceiptIds: readonly string[];
210
- readonly problems: readonly {
211
- readonly code: import("./types.js").WorkResolutionCode;
212
- readonly reference: {
213
- readonly type: "revision";
214
- readonly ref: {
215
- readonly kind: import("./types.js").RevisionKind;
216
- readonly id: string;
217
- readonly revision: number;
218
- readonly digest: string;
219
- };
220
- } | {
221
- readonly type: "event";
222
- readonly ref: {
223
- readonly eventId: string;
224
- readonly digest: string;
225
- };
226
- } | {
227
- readonly type: "snapshot" | "authority" | "artifact-bytes" | "evidence-bytes";
228
- readonly ref: {
229
- readonly id: string;
230
- readonly digest: string;
231
- };
232
- } | {
233
- readonly type: "execution";
234
- readonly id: string;
235
- } | null;
236
- readonly affectedObligations: readonly {
237
- readonly kind: import("./types.js").RevisionKind;
238
- readonly id: string;
239
- readonly revision: number;
240
- readonly digest: string;
241
- }[];
242
- }[];
243
- }[];
244
- supersededClaims: number;
245
- conflicts: {
246
- readonly kind: "event" | "receipt";
247
- readonly id: string;
248
- readonly digests: readonly string[];
249
- readonly affectedObligations: readonly {
250
- readonly kind: import("./types.js").RevisionKind;
251
- readonly id: string;
252
- readonly revision: number;
253
- readonly digest: string;
254
- }[];
255
- }[];
256
- problems: {
257
- readonly code: import("./types.js").WorkResolutionCode;
258
- readonly reference: {
259
- readonly type: "revision";
260
- readonly ref: {
261
- readonly kind: import("./types.js").RevisionKind;
262
- readonly id: string;
263
- readonly revision: number;
264
- readonly digest: string;
265
- };
266
- } | {
267
- readonly type: "event";
268
- readonly ref: {
269
- readonly eventId: string;
270
- readonly digest: string;
271
- };
272
- } | {
273
- readonly type: "snapshot" | "authority" | "artifact-bytes" | "evidence-bytes";
274
- readonly ref: {
275
- readonly id: string;
276
- readonly digest: string;
277
- };
278
- } | {
279
- readonly type: "execution";
280
- readonly id: string;
281
- } | null;
282
- readonly affectedObligations: readonly {
283
- readonly kind: import("./types.js").RevisionKind;
284
- readonly id: string;
285
- readonly revision: number;
286
- readonly digest: string;
287
- }[];
288
- }[];
289
- progress: {
290
- accepted: number;
291
- total: number;
292
- };
293
- };
294
- export {};