@openprose/reactor-cradle 0.1.0-rc.1

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 (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +270 -0
  3. package/dist/assert/index.d.ts +35 -0
  4. package/dist/assert/index.d.ts.map +1 -0
  5. package/dist/assert/index.js +398 -0
  6. package/dist/baselines/cost-thesis/index.d.ts +103 -0
  7. package/dist/baselines/cost-thesis/index.d.ts.map +1 -0
  8. package/dist/baselines/cost-thesis/index.js +337 -0
  9. package/dist/baselines/naive-loop/index.d.ts +46 -0
  10. package/dist/baselines/naive-loop/index.d.ts.map +1 -0
  11. package/dist/baselines/naive-loop/index.js +188 -0
  12. package/dist/baselines/no-memo/index.d.ts +84 -0
  13. package/dist/baselines/no-memo/index.d.ts.map +1 -0
  14. package/dist/baselines/no-memo/index.js +226 -0
  15. package/dist/doubles/clock.d.ts +9 -0
  16. package/dist/doubles/clock.d.ts.map +1 -0
  17. package/dist/doubles/clock.js +42 -0
  18. package/dist/doubles/storage.d.ts +24 -0
  19. package/dist/doubles/storage.d.ts.map +1 -0
  20. package/dist/doubles/storage.js +191 -0
  21. package/dist/eval/index.d.ts +204 -0
  22. package/dist/eval/index.d.ts.map +1 -0
  23. package/dist/eval/index.js +596 -0
  24. package/dist/index.d.ts +24 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +39 -0
  27. package/dist/policy-author/index.d.ts +103 -0
  28. package/dist/policy-author/index.d.ts.map +1 -0
  29. package/dist/policy-author/index.js +358 -0
  30. package/dist/policy-drift/index.d.ts +64 -0
  31. package/dist/policy-drift/index.d.ts.map +1 -0
  32. package/dist/policy-drift/index.js +495 -0
  33. package/dist/policy-replay/index.d.ts +106 -0
  34. package/dist/policy-replay/index.d.ts.map +1 -0
  35. package/dist/policy-replay/index.js +361 -0
  36. package/dist/provider-parity/index.d.ts +91 -0
  37. package/dist/provider-parity/index.d.ts.map +1 -0
  38. package/dist/provider-parity/index.js +439 -0
  39. package/dist/recompile/index.d.ts +161 -0
  40. package/dist/recompile/index.d.ts.map +1 -0
  41. package/dist/recompile/index.js +690 -0
  42. package/dist/release-candidate/index.d.ts +139 -0
  43. package/dist/release-candidate/index.d.ts.map +1 -0
  44. package/dist/release-candidate/index.js +553 -0
  45. package/dist/release-parity/index.d.ts +80 -0
  46. package/dist/release-parity/index.d.ts.map +1 -0
  47. package/dist/release-parity/index.js +1035 -0
  48. package/dist/replay/model-gateway.d.ts +25 -0
  49. package/dist/replay/model-gateway.d.ts.map +1 -0
  50. package/dist/replay/model-gateway.js +166 -0
  51. package/dist/replay/parity.d.ts +110 -0
  52. package/dist/replay/parity.d.ts.map +1 -0
  53. package/dist/replay/parity.js +232 -0
  54. package/dist/rollback/index.d.ts +106 -0
  55. package/dist/rollback/index.d.ts.map +1 -0
  56. package/dist/rollback/index.js +694 -0
  57. package/dist/scenario/parser.d.ts +11 -0
  58. package/dist/scenario/parser.d.ts.map +1 -0
  59. package/dist/scenario/parser.js +490 -0
  60. package/dist/scenario/runner.d.ts +12 -0
  61. package/dist/scenario/runner.d.ts.map +1 -0
  62. package/dist/scenario/runner.js +345 -0
  63. package/dist/scenario/synthetic-world-adapter.d.ts +4 -0
  64. package/dist/scenario/synthetic-world-adapter.d.ts.map +1 -0
  65. package/dist/scenario/synthetic-world-adapter.js +82 -0
  66. package/dist/scenario/time.d.ts +4 -0
  67. package/dist/scenario/time.d.ts.map +1 -0
  68. package/dist/scenario/time.js +45 -0
  69. package/dist/scenario/types.d.ts +149 -0
  70. package/dist/scenario/types.d.ts.map +1 -0
  71. package/dist/scenario/types.js +5 -0
  72. package/dist/spikes/index.d.ts +10 -0
  73. package/dist/spikes/index.d.ts.map +1 -0
  74. package/dist/spikes/index.js +29 -0
  75. package/dist/spikes/k1-ensemble-spread.d.ts +88 -0
  76. package/dist/spikes/k1-ensemble-spread.d.ts.map +1 -0
  77. package/dist/spikes/k1-ensemble-spread.js +396 -0
  78. package/dist/spikes/k2-policy-author.d.ts +25 -0
  79. package/dist/spikes/k2-policy-author.d.ts.map +1 -0
  80. package/dist/spikes/k2-policy-author.js +503 -0
  81. package/dist/spikes/live-refresh.d.ts +150 -0
  82. package/dist/spikes/live-refresh.d.ts.map +1 -0
  83. package/dist/spikes/live-refresh.js +511 -0
  84. package/dist/world/index.d.ts +2 -0
  85. package/dist/world/index.d.ts.map +1 -0
  86. package/dist/world/index.js +17 -0
  87. package/dist/world/synthetic-world.d.ts +104 -0
  88. package/dist/world/synthetic-world.d.ts.map +1 -0
  89. package/dist/world/synthetic-world.js +449 -0
  90. package/package.json +139 -0
@@ -0,0 +1,103 @@
1
+ import type { ContentHashV0, ReceiptV0 } from "@openprose/reactor/receipt";
2
+ import type { ReactorAgentRequestV0, ReactorAgentResponseV0, ReactorAgentSdkAdapterV0, ReactorRegistrySnapshotV0 } from "@openprose/reactor/sdk";
3
+ export declare const POLICY_AUTHOR_AGENT_CASSETTE_SCHEMA_V0: "openprose.reactor-cradle.policy-author-agent-cassette";
4
+ export declare const POLICY_AUTHOR_AGENT_CASSETTE_VERSION_V0: 0;
5
+ export interface RecordedPolicyAuthorAgentExchangeV0 {
6
+ readonly request: ReactorAgentRequestV0;
7
+ readonly request_canonical: string;
8
+ readonly request_hash: ContentHashV0;
9
+ readonly response: ReactorAgentResponseV0;
10
+ readonly response_canonical: string;
11
+ readonly response_hash: ContentHashV0;
12
+ }
13
+ export interface PolicyAuthorAgentCassetteV0 {
14
+ readonly schema: typeof POLICY_AUTHOR_AGENT_CASSETTE_SCHEMA_V0;
15
+ readonly v: typeof POLICY_AUTHOR_AGENT_CASSETTE_VERSION_V0;
16
+ readonly exchanges: readonly RecordedPolicyAuthorAgentExchangeV0[];
17
+ }
18
+ export interface PolicyAuthorAgentHandlerContextV0 {
19
+ readonly exchange_index: number;
20
+ }
21
+ export type PolicyAuthorAgentHandlerV0 = (request: ReactorAgentRequestV0, context: PolicyAuthorAgentHandlerContextV0) => ReactorAgentResponseV0;
22
+ export interface RecordingPolicyAuthorAgentSdkV0 {
23
+ readonly adapter: ReactorAgentSdkAdapterV0;
24
+ readonly cassette: PolicyAuthorAgentCassetteV0;
25
+ readonly launch_count: number;
26
+ }
27
+ export interface ReplayPolicyAuthorAgentSdkV0 {
28
+ readonly adapter: ReactorAgentSdkAdapterV0;
29
+ readonly launch_count: number;
30
+ readonly remaining: number;
31
+ readonly assertConsumed: () => void;
32
+ }
33
+ export interface PolicyAuthorContractRevisionV0 {
34
+ readonly responsibility_id: string;
35
+ readonly revision: ContentHashV0;
36
+ readonly summary: string;
37
+ readonly no_anchor: boolean;
38
+ }
39
+ export type PolicyLiveObservableSourceV0 = "connector" | "receipt-log" | "kernel-backstop" | "cost-ledger" | "human-label-stream";
40
+ export interface PolicyLiveObservableV0 {
41
+ readonly id: string;
42
+ readonly source: PolicyLiveObservableSourceV0;
43
+ readonly description: string;
44
+ }
45
+ export interface PolicyAuthorP1AuthorInputV0 {
46
+ readonly responsibility_id: string;
47
+ readonly contract_revision: ContentHashV0;
48
+ readonly contract_summary: string;
49
+ readonly contract: PolicyAuthorContractRevisionV0;
50
+ readonly no_anchor: boolean;
51
+ readonly live_observables: readonly PolicyLiveObservableV0[];
52
+ readonly receipt_history: readonly ReceiptV0[];
53
+ readonly receipts: readonly ReceiptV0[];
54
+ readonly agentSdk: ReactorAgentSdkAdapterV0;
55
+ readonly agent_sdk: ReactorAgentSdkAdapterV0;
56
+ readonly as_of: string;
57
+ readonly policy_artifact_namespace?: string;
58
+ }
59
+ export type AuthorPolicyArtifactV0 = (input: PolicyAuthorP1AuthorInputV0) => Promise<ReactorRegistrySnapshotV0> | ReactorRegistrySnapshotV0;
60
+ export interface RunRecordedPolicyAuthorP1ProofInputV0 {
61
+ readonly authorPolicyArtifactV0: AuthorPolicyArtifactV0;
62
+ readonly responsibility_id: string;
63
+ readonly contract_revision: ContentHashV0;
64
+ readonly contract_summary: string;
65
+ readonly no_anchor: boolean;
66
+ readonly live_observables: readonly PolicyLiveObservableV0[];
67
+ readonly receipt_history: readonly ReceiptV0[];
68
+ readonly as_of: string;
69
+ readonly policy_artifact_namespace?: string;
70
+ readonly handler: PolicyAuthorAgentHandlerV0;
71
+ }
72
+ export interface PolicyAuthorP1CassetteObservationV0 {
73
+ readonly launch_count: number;
74
+ readonly history_query_index: number;
75
+ readonly artifact_authoring_index: number;
76
+ readonly history_query_request_hash: ContentHashV0;
77
+ readonly artifact_authoring_request_hash: ContentHashV0;
78
+ readonly summary_only_history_query: true;
79
+ }
80
+ export interface PolicyAuthorRegistryReplayEvidenceV0 {
81
+ readonly policy_artifact_namespace: string;
82
+ readonly policy_artifact_revision: string;
83
+ readonly policy_artifact_content_hash: ContentHashV0;
84
+ readonly validation_state: "validated";
85
+ readonly artifact_bytes_canonical: true;
86
+ }
87
+ export interface RecordedPolicyAuthorP1ProofV0 {
88
+ readonly cassette: PolicyAuthorAgentCassetteV0;
89
+ readonly observation: PolicyAuthorP1CassetteObservationV0;
90
+ readonly registry: PolicyAuthorRegistryReplayEvidenceV0;
91
+ readonly recorded_snapshot: ReactorRegistrySnapshotV0;
92
+ readonly replayed_snapshot: ReactorRegistrySnapshotV0;
93
+ readonly recorded_snapshot_hash: ContentHashV0;
94
+ readonly replayed_snapshot_hash: ContentHashV0;
95
+ readonly replay_launch_count: number;
96
+ }
97
+ export declare function createRecordingPolicyAuthorAgentSdkV0(handler: PolicyAuthorAgentHandlerV0): RecordingPolicyAuthorAgentSdkV0;
98
+ export declare function createReplayPolicyAuthorAgentSdkV0(cassette: PolicyAuthorAgentCassetteV0): ReplayPolicyAuthorAgentSdkV0;
99
+ export declare function runRecordedPolicyAuthorP1ProofV0(input: RunRecordedPolicyAuthorP1ProofInputV0): Promise<RecordedPolicyAuthorP1ProofV0>;
100
+ export declare function observePolicyAuthorP1CassetteV0(cassette: PolicyAuthorAgentCassetteV0): PolicyAuthorP1CassetteObservationV0;
101
+ export declare function assertReplayableRegistrySnapshotV0(snapshot: ReactorRegistrySnapshotV0): PolicyAuthorRegistryReplayEvidenceV0;
102
+ export declare function clonePolicyAuthorAgentCassetteV0(cassette: PolicyAuthorAgentCassetteV0): PolicyAuthorAgentCassetteV0;
103
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/policy-author/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,sCAAsC,EACjD,uDAAgE,CAAC;AACnE,eAAO,MAAM,uCAAuC,EAAG,CAAU,CAAC;AAElE,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;CACvC;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,MAAM,EAAE,OAAO,sCAAsC,CAAC;IAC/D,QAAQ,CAAC,CAAC,EAAE,OAAO,uCAAuC,CAAC;IAC3D,QAAQ,CAAC,SAAS,EAAE,SAAS,mCAAmC,EAAE,CAAC;CACpE;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,0BAA0B,GAAG,CACvC,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,iCAAiC,KACvC,sBAAsB,CAAC;AAE5B,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,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createRecordingPolicyAuthorAgentSdkV0 = createRecordingPolicyAuthorAgentSdkV0;
5
+ exports.createReplayPolicyAuthorAgentSdkV0 = createReplayPolicyAuthorAgentSdkV0;
6
+ exports.runRecordedPolicyAuthorP1ProofV0 = runRecordedPolicyAuthorP1ProofV0;
7
+ exports.observePolicyAuthorP1CassetteV0 = observePolicyAuthorP1CassetteV0;
8
+ exports.assertReplayableRegistrySnapshotV0 = assertReplayableRegistrySnapshotV0;
9
+ exports.clonePolicyAuthorAgentCassetteV0 = clonePolicyAuthorAgentCassetteV0;
10
+ const node_crypto_1 = require("node:crypto");
11
+ exports.POLICY_AUTHOR_AGENT_CASSETTE_SCHEMA_V0 = "openprose.reactor-cradle.policy-author-agent-cassette";
12
+ exports.POLICY_AUTHOR_AGENT_CASSETTE_VERSION_V0 = 0;
13
+ function createRecordingPolicyAuthorAgentSdkV0(handler) {
14
+ const exchanges = [];
15
+ const adapter = {
16
+ launch(request) {
17
+ assertPolicyAuthorRequest(request);
18
+ const requestSnapshot = createCanonicalSnapshot(request, "policy author agent request");
19
+ const response = handler(cloneFromCanonical(requestSnapshot), {
20
+ exchange_index: exchanges.length,
21
+ });
22
+ const responseSnapshot = createCanonicalSnapshot(response, "policy author agent response");
23
+ exchanges.push({
24
+ request: requestSnapshot.value,
25
+ request_canonical: requestSnapshot.canonical,
26
+ request_hash: requestSnapshot.hash,
27
+ response: responseSnapshot.value,
28
+ response_canonical: responseSnapshot.canonical,
29
+ response_hash: responseSnapshot.hash,
30
+ });
31
+ return cloneFromCanonical(responseSnapshot);
32
+ },
33
+ };
34
+ return {
35
+ adapter,
36
+ get cassette() {
37
+ return clonePolicyAuthorAgentCassetteV0({
38
+ schema: exports.POLICY_AUTHOR_AGENT_CASSETTE_SCHEMA_V0,
39
+ v: exports.POLICY_AUTHOR_AGENT_CASSETTE_VERSION_V0,
40
+ exchanges,
41
+ });
42
+ },
43
+ get launch_count() {
44
+ return exchanges.length;
45
+ },
46
+ };
47
+ }
48
+ function createReplayPolicyAuthorAgentSdkV0(cassette) {
49
+ const replayCassette = clonePolicyAuthorAgentCassetteV0(cassette);
50
+ let cursor = 0;
51
+ const adapter = {
52
+ launch(request) {
53
+ assertPolicyAuthorRequest(request);
54
+ const expected = replayCassette.exchanges[cursor];
55
+ if (expected === undefined) {
56
+ throw new Error(`policy author replay exhausted at exchange ${cursor}; cassette has ${replayCassette.exchanges.length} exchanges`);
57
+ }
58
+ const actual = createCanonicalSnapshot(request, "policy author replay request");
59
+ if (actual.canonical !== expected.request_canonical) {
60
+ throw new Error(`unexpected policy author request at exchange ${cursor}: expected ${expected.request_hash}, received ${actual.hash}`);
61
+ }
62
+ cursor += 1;
63
+ return cloneFromCanonical({
64
+ value: expected.response,
65
+ canonical: expected.response_canonical,
66
+ hash: expected.response_hash,
67
+ });
68
+ },
69
+ };
70
+ return {
71
+ adapter,
72
+ get launch_count() {
73
+ return cursor;
74
+ },
75
+ get remaining() {
76
+ return replayCassette.exchanges.length - cursor;
77
+ },
78
+ assertConsumed() {
79
+ if (cursor !== replayCassette.exchanges.length) {
80
+ throw new Error(`policy author replay stopped after ${cursor} of ${replayCassette.exchanges.length} recorded exchanges`);
81
+ }
82
+ },
83
+ };
84
+ }
85
+ async function runRecordedPolicyAuthorP1ProofV0(input) {
86
+ const recording = createRecordingPolicyAuthorAgentSdkV0(input.handler);
87
+ const recordedSnapshot = await input.authorPolicyArtifactV0(buildAuthorInput(input, recording.adapter));
88
+ const cassette = recording.cassette;
89
+ const observation = observePolicyAuthorP1CassetteV0(cassette);
90
+ const registry = assertReplayableRegistrySnapshotV0(recordedSnapshot);
91
+ const replay = createReplayPolicyAuthorAgentSdkV0(cassette);
92
+ const replayedSnapshot = await input.authorPolicyArtifactV0(buildAuthorInput(input, replay.adapter));
93
+ replay.assertConsumed();
94
+ const recordedSnapshotHash = hashCanonical(renderCanonical(recordedSnapshot));
95
+ const replayedSnapshotHash = hashCanonical(renderCanonical(replayedSnapshot));
96
+ if (recordedSnapshotHash !== replayedSnapshotHash) {
97
+ throw new Error(`policy author replay changed registry snapshot: recorded ${recordedSnapshotHash}, replayed ${replayedSnapshotHash}`);
98
+ }
99
+ assertReplayableRegistrySnapshotV0(replayedSnapshot);
100
+ return {
101
+ cassette,
102
+ observation,
103
+ registry,
104
+ recorded_snapshot: recordedSnapshot,
105
+ replayed_snapshot: replayedSnapshot,
106
+ recorded_snapshot_hash: recordedSnapshotHash,
107
+ replayed_snapshot_hash: replayedSnapshotHash,
108
+ replay_launch_count: replay.launch_count,
109
+ };
110
+ }
111
+ function observePolicyAuthorP1CassetteV0(cassette) {
112
+ const checkedCassette = clonePolicyAuthorAgentCassetteV0(cassette);
113
+ if (checkedCassette.exchanges.length < 2) {
114
+ throw new Error("policy author P1 cassette must include at least history-query and artifact-authoring exchanges");
115
+ }
116
+ const historyQueryIndex = checkedCassette.exchanges.findIndex((exchange) => exchangeMatches(exchange, ["history-query", "history_query"]));
117
+ if (historyQueryIndex < 0) {
118
+ throw new Error("policy author P1 cassette never requested receipt history");
119
+ }
120
+ const artifactAuthoringIndex = checkedCassette.exchanges.findIndex((exchange, index) => index > historyQueryIndex &&
121
+ exchangeMatches(exchange, [
122
+ "author-artifact",
123
+ "artifact-authoring",
124
+ "artifact_authoring",
125
+ "authored-artifact",
126
+ "authored_artifact",
127
+ "policy_artifact",
128
+ ]));
129
+ if (artifactAuthoringIndex < 0) {
130
+ throw new Error("policy author P1 cassette never authored an artifact after the history query");
131
+ }
132
+ const historyExchange = readExchange(checkedCassette, historyQueryIndex);
133
+ assertSummaryOnlyHistoryQuery(historyExchange);
134
+ const artifactExchange = readExchange(checkedCassette, artifactAuthoringIndex);
135
+ return {
136
+ launch_count: checkedCassette.exchanges.length,
137
+ history_query_index: historyQueryIndex,
138
+ artifact_authoring_index: artifactAuthoringIndex,
139
+ history_query_request_hash: historyExchange.request_hash,
140
+ artifact_authoring_request_hash: artifactExchange.request_hash,
141
+ summary_only_history_query: true,
142
+ };
143
+ }
144
+ function assertReplayableRegistrySnapshotV0(snapshot) {
145
+ const validationState = snapshot.policy_artifact_validation_state ?? snapshot.validation_state;
146
+ const validationStatus = typeof validationState === "string"
147
+ ? validationState
148
+ : isPlainRecord(validationState)
149
+ ? validationState["status"]
150
+ : undefined;
151
+ if (validationStatus !== "validated") {
152
+ throw new Error("policy author registry snapshot must be validated");
153
+ }
154
+ if (snapshot.policy_artifact_namespace.length === 0) {
155
+ throw new Error("policy author registry snapshot must name a policy artifact namespace");
156
+ }
157
+ if (snapshot.policy_artifact_revision.length === 0) {
158
+ throw new Error("policy author registry snapshot must name a policy artifact revision");
159
+ }
160
+ const bytes = snapshot.policy_artifact_bytes;
161
+ if (typeof bytes !== "string" || bytes.length === 0) {
162
+ throw new Error("policy author registry snapshot must carry canonical policy artifact bytes");
163
+ }
164
+ const parsed = parseCanonicalJson(bytes, "policy artifact bytes");
165
+ const rerendered = renderCanonical(parsed);
166
+ if (rerendered !== bytes) {
167
+ throw new Error("policy artifact bytes must already be canonical JSON");
168
+ }
169
+ const contentHash = hashCanonical(bytes);
170
+ if (snapshot.policy_artifact_content_hash !== contentHash) {
171
+ throw new Error(`policy artifact content hash mismatch: expected ${contentHash}, received ${snapshot.policy_artifact_content_hash ?? "undefined"}`);
172
+ }
173
+ return {
174
+ policy_artifact_namespace: snapshot.policy_artifact_namespace,
175
+ policy_artifact_revision: snapshot.policy_artifact_revision,
176
+ policy_artifact_content_hash: contentHash,
177
+ validation_state: "validated",
178
+ artifact_bytes_canonical: true,
179
+ };
180
+ }
181
+ function clonePolicyAuthorAgentCassetteV0(cassette) {
182
+ if (cassette.schema !== exports.POLICY_AUTHOR_AGENT_CASSETTE_SCHEMA_V0) {
183
+ throw new Error("policy author cassette schema must be openprose.reactor-cradle.policy-author-agent-cassette");
184
+ }
185
+ if (cassette.v !== exports.POLICY_AUTHOR_AGENT_CASSETTE_VERSION_V0) {
186
+ throw new Error("policy author cassette version must be 0");
187
+ }
188
+ if (!Array.isArray(cassette.exchanges)) {
189
+ throw new Error("policy author cassette exchanges must be an array");
190
+ }
191
+ return {
192
+ schema: exports.POLICY_AUTHOR_AGENT_CASSETTE_SCHEMA_V0,
193
+ v: exports.POLICY_AUTHOR_AGENT_CASSETTE_VERSION_V0,
194
+ exchanges: cassette.exchanges.map((exchange, index) => cloneExchange(exchange, index)),
195
+ };
196
+ }
197
+ function buildAuthorInput(input, agentSdk) {
198
+ const contract = {
199
+ responsibility_id: input.responsibility_id,
200
+ revision: input.contract_revision,
201
+ summary: input.contract_summary,
202
+ no_anchor: input.no_anchor,
203
+ };
204
+ const authorInput = {
205
+ responsibility_id: input.responsibility_id,
206
+ contract_revision: input.contract_revision,
207
+ contract_summary: input.contract_summary,
208
+ contract,
209
+ no_anchor: input.no_anchor,
210
+ live_observables: input.live_observables,
211
+ receipt_history: input.receipt_history,
212
+ receipts: input.receipt_history,
213
+ agentSdk,
214
+ agent_sdk: agentSdk,
215
+ as_of: input.as_of,
216
+ };
217
+ return input.policy_artifact_namespace === undefined
218
+ ? authorInput
219
+ : {
220
+ ...authorInput,
221
+ policy_artifact_namespace: input.policy_artifact_namespace,
222
+ };
223
+ }
224
+ function cloneExchange(exchange, index) {
225
+ const request = createCanonicalSnapshot(exchange.request, `policy author cassette exchange ${index} request`);
226
+ const response = createCanonicalSnapshot(exchange.response, `policy author cassette exchange ${index} response`);
227
+ assertPolicyAuthorRequest(request.value);
228
+ assertStoredCanonical(exchange.request_canonical, request.canonical, `policy author cassette exchange ${index} request_canonical`);
229
+ assertStoredHash(exchange.request_hash, request.hash, `policy author cassette exchange ${index} request_hash`);
230
+ assertStoredCanonical(exchange.response_canonical, response.canonical, `policy author cassette exchange ${index} response_canonical`);
231
+ assertStoredHash(exchange.response_hash, response.hash, `policy author cassette exchange ${index} response_hash`);
232
+ return {
233
+ request: request.value,
234
+ request_canonical: request.canonical,
235
+ request_hash: request.hash,
236
+ response: response.value,
237
+ response_canonical: response.canonical,
238
+ response_hash: response.hash,
239
+ };
240
+ }
241
+ function assertPolicyAuthorRequest(request) {
242
+ if (request.kind !== "policy-author") {
243
+ throw new Error("policy-author Cradle double only handles policy-author agent launches");
244
+ }
245
+ }
246
+ function assertSummaryOnlyHistoryQuery(exchange) {
247
+ const request = exchange.request_canonical;
248
+ const hasSummary = request.includes("receipt_summary") ||
249
+ request.includes("receipt_summaries") ||
250
+ request.includes("receipt_history_summary") ||
251
+ request.includes("history_summary");
252
+ if (!hasSummary) {
253
+ throw new Error("policy author history query must be launched from receipt summary only");
254
+ }
255
+ if (request.includes('"schema":"openprose.receipt"') ||
256
+ request.includes('"verdict":') ||
257
+ request.includes('"freshness":') ||
258
+ request.includes('"composition":') ||
259
+ request.includes('"cost":')) {
260
+ throw new Error("policy author history query must not receive full receipt bodies before selecting history");
261
+ }
262
+ }
263
+ function exchangeMatches(exchange, markers) {
264
+ const request = exchange.request_canonical;
265
+ const response = exchange.response_canonical;
266
+ return markers.some((marker) => request.includes(marker) || response.includes(marker));
267
+ }
268
+ function readExchange(cassette, index) {
269
+ const exchange = cassette.exchanges[index];
270
+ if (exchange === undefined) {
271
+ throw new Error(`expected policy author exchange ${index}`);
272
+ }
273
+ return exchange;
274
+ }
275
+ function createCanonicalSnapshot(value, label) {
276
+ try {
277
+ const canonical = renderCanonical(value);
278
+ return {
279
+ value: parseCanonicalJson(canonical, label),
280
+ canonical,
281
+ hash: hashCanonical(canonical),
282
+ };
283
+ }
284
+ catch (error) {
285
+ const message = error instanceof Error ? error.message : "canonicalization failed";
286
+ throw new Error(`${label} must be canonical JSON: ${message}`);
287
+ }
288
+ }
289
+ function cloneFromCanonical(snapshot) {
290
+ return parseCanonicalJson(snapshot.canonical, "canonical snapshot");
291
+ }
292
+ function assertStoredCanonical(stored, actual, label) {
293
+ if (stored !== actual) {
294
+ throw new Error(`${label} does not match canonical payload`);
295
+ }
296
+ }
297
+ function assertStoredHash(stored, actual, label) {
298
+ if (stored !== actual) {
299
+ throw new Error(`${label} does not match canonical payload hash`);
300
+ }
301
+ }
302
+ function parseCanonicalJson(value, label) {
303
+ try {
304
+ return JSON.parse(value);
305
+ }
306
+ catch (error) {
307
+ const message = error instanceof Error ? error.message : "parse failed";
308
+ throw new Error(`${label} must be JSON: ${message}`);
309
+ }
310
+ }
311
+ function hashCanonical(canonical) {
312
+ return `sha256:${(0, node_crypto_1.createHash)("sha256").update(canonical).digest("hex")}`;
313
+ }
314
+ function renderCanonical(value) {
315
+ if (value === null) {
316
+ return "null";
317
+ }
318
+ switch (typeof value) {
319
+ case "boolean":
320
+ return value ? "true" : "false";
321
+ case "number":
322
+ if (!Number.isFinite(value)) {
323
+ throw new TypeError("Cannot canonicalize non-finite numbers");
324
+ }
325
+ return JSON.stringify(value);
326
+ case "string":
327
+ return JSON.stringify(value);
328
+ case "object":
329
+ if (Array.isArray(value)) {
330
+ return `[${value.map((item) => renderCanonical(item)).join(",")}]`;
331
+ }
332
+ if (!isPlainRecord(value)) {
333
+ throw new TypeError("Cannot canonicalize non-plain objects");
334
+ }
335
+ return renderCanonicalObject(value);
336
+ case "undefined":
337
+ case "bigint":
338
+ case "function":
339
+ case "symbol":
340
+ throw new TypeError(`Cannot canonicalize ${typeof value}`);
341
+ }
342
+ throw new TypeError("Cannot canonicalize unknown value");
343
+ }
344
+ function renderCanonicalObject(value) {
345
+ const entries = Object.entries(value)
346
+ .filter(([, entryValue]) => entryValue !== undefined)
347
+ .sort(([left], [right]) => left.localeCompare(right));
348
+ return `{${entries
349
+ .map(([key, entryValue]) => `${JSON.stringify(key)}:${renderCanonical(entryValue)}`)
350
+ .join(",")}}`;
351
+ }
352
+ function isPlainRecord(value) {
353
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
354
+ return false;
355
+ }
356
+ const prototype = Object.getPrototypeOf(value);
357
+ return prototype === Object.prototype || prototype === null;
358
+ }
@@ -0,0 +1,64 @@
1
+ import type { KernelFactValue, PredicateEvaluation } from "@openprose/reactor/kernel";
2
+ import type { ContentHashV0, ReceiptV0 } from "@openprose/reactor/receipt";
3
+ import type { AuthoredPolicyArtifactV0 } from "@openprose/reactor/policy";
4
+ export declare const POLICY_DRIFT_P2_SCENARIO_SCHEMA_V0: "openprose.reactor-cradle.policy-drift-p2-scenario";
5
+ export declare const POLICY_DRIFT_P2_SCENARIO_VERSION_V0: 0;
6
+ export declare const POLICY_DRIFT_P2_RESPONSIBILITY_ID: "incident-channel-current-briefing";
7
+ export declare const POLICY_DRIFT_P2_COST_FACT: "cost.fresh_tokens_per_maintained_day";
8
+ export declare const POLICY_DRIFT_P2_OFF_LOG_FACT: "source.incident_channel.unrecorded_sentiment_score";
9
+ export declare const POLICY_DRIFT_P2_BACKSTOP_FACT: "kernel.deep_shallow_contradiction_count_7d";
10
+ export type PolicyDriftOutcomeV0 = "not-tripped" | "tripped" | "indeterminate";
11
+ export type PolicyDriftFactMapV0 = Readonly<Record<string, KernelFactValue>>;
12
+ export interface PolicyDriftEvaluatorInputV0 {
13
+ readonly artifact: AuthoredPolicyArtifactV0;
14
+ readonly receipts: readonly ReceiptV0[];
15
+ readonly as_of: string;
16
+ }
17
+ export type EvaluatePolicyDriftV0 = (input: PolicyDriftEvaluatorInputV0) => unknown;
18
+ export interface RecordedPolicyDriftP2ScenarioV0 {
19
+ readonly schema: typeof POLICY_DRIFT_P2_SCENARIO_SCHEMA_V0;
20
+ readonly v: typeof POLICY_DRIFT_P2_SCENARIO_VERSION_V0;
21
+ readonly responsibility_id: string;
22
+ readonly contract_revision: ContentHashV0;
23
+ readonly as_of: string;
24
+ readonly receipt_history: readonly ReceiptV0[];
25
+ readonly cost_drift_artifact: AuthoredPolicyArtifactV0;
26
+ readonly off_log_artifact: AuthoredPolicyArtifactV0;
27
+ readonly cost_drift_artifact_bytes: string;
28
+ readonly cost_drift_artifact_content_hash: ContentHashV0;
29
+ readonly off_log_artifact_bytes: string;
30
+ readonly off_log_artifact_content_hash: ContentHashV0;
31
+ }
32
+ export interface PolicyDriftGatewayProbeV0 {
33
+ readonly agent_launch_count: number;
34
+ readonly model_gateway_invocation_count: number;
35
+ readonly assertNoInvocations: () => void;
36
+ }
37
+ export interface NormalizedPolicyDriftResultV0 {
38
+ readonly outcome: PolicyDriftOutcomeV0;
39
+ readonly facts: PolicyDriftFactMapV0;
40
+ readonly evidence_receipt_hashes: readonly ContentHashV0[];
41
+ readonly predicate: PredicateEvaluation;
42
+ readonly missing_fact_ids: readonly string[];
43
+ readonly unsupported_fact_ids: readonly string[];
44
+ readonly raw: unknown;
45
+ }
46
+ export interface RecordedPolicyDriftP2ProofV0 {
47
+ readonly scenario: RecordedPolicyDriftP2ScenarioV0;
48
+ readonly cost_drift: NormalizedPolicyDriftResultV0;
49
+ readonly off_log: NormalizedPolicyDriftResultV0;
50
+ readonly gateway_invocations: {
51
+ readonly agent_launch_count: 0;
52
+ readonly model_gateway_invocation_count: 0;
53
+ };
54
+ }
55
+ export interface RunRecordedPolicyDriftP2ProofInputV0 {
56
+ readonly evaluatePolicyDriftV0: EvaluatePolicyDriftV0;
57
+ readonly scenario?: RecordedPolicyDriftP2ScenarioV0;
58
+ }
59
+ export declare function createPolicyDriftGatewayProbeV0(): PolicyDriftGatewayProbeV0;
60
+ export declare function makeRecordedPolicyDriftP2ScenarioV0(): RecordedPolicyDriftP2ScenarioV0;
61
+ export declare function runRecordedPolicyDriftP2ProofV0(input: RunRecordedPolicyDriftP2ProofInputV0): RecordedPolicyDriftP2ProofV0;
62
+ export declare function assertRecordedPolicyDriftP2ScenarioV0(scenario: RecordedPolicyDriftP2ScenarioV0): void;
63
+ export declare function normalizePolicyDriftResultV0(result: unknown): NormalizedPolicyDriftResultV0;
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/policy-drift/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,KAAK,EACV,aAAa,EAGb,SAAS,EACV,MAAM,4BAA4B,CAAC;AACpC,OA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