@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.
- package/LICENSE +21 -0
- package/README.md +270 -0
- package/dist/assert/index.d.ts +35 -0
- package/dist/assert/index.d.ts.map +1 -0
- package/dist/assert/index.js +398 -0
- package/dist/baselines/cost-thesis/index.d.ts +103 -0
- package/dist/baselines/cost-thesis/index.d.ts.map +1 -0
- package/dist/baselines/cost-thesis/index.js +337 -0
- package/dist/baselines/naive-loop/index.d.ts +46 -0
- package/dist/baselines/naive-loop/index.d.ts.map +1 -0
- package/dist/baselines/naive-loop/index.js +188 -0
- package/dist/baselines/no-memo/index.d.ts +84 -0
- package/dist/baselines/no-memo/index.d.ts.map +1 -0
- package/dist/baselines/no-memo/index.js +226 -0
- package/dist/doubles/clock.d.ts +9 -0
- package/dist/doubles/clock.d.ts.map +1 -0
- package/dist/doubles/clock.js +42 -0
- package/dist/doubles/storage.d.ts +24 -0
- package/dist/doubles/storage.d.ts.map +1 -0
- package/dist/doubles/storage.js +191 -0
- package/dist/eval/index.d.ts +204 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +596 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/policy-author/index.d.ts +103 -0
- package/dist/policy-author/index.d.ts.map +1 -0
- package/dist/policy-author/index.js +358 -0
- package/dist/policy-drift/index.d.ts +64 -0
- package/dist/policy-drift/index.d.ts.map +1 -0
- package/dist/policy-drift/index.js +495 -0
- package/dist/policy-replay/index.d.ts +106 -0
- package/dist/policy-replay/index.d.ts.map +1 -0
- package/dist/policy-replay/index.js +361 -0
- package/dist/provider-parity/index.d.ts +91 -0
- package/dist/provider-parity/index.d.ts.map +1 -0
- package/dist/provider-parity/index.js +439 -0
- package/dist/recompile/index.d.ts +161 -0
- package/dist/recompile/index.d.ts.map +1 -0
- package/dist/recompile/index.js +690 -0
- package/dist/release-candidate/index.d.ts +139 -0
- package/dist/release-candidate/index.d.ts.map +1 -0
- package/dist/release-candidate/index.js +553 -0
- package/dist/release-parity/index.d.ts +80 -0
- package/dist/release-parity/index.d.ts.map +1 -0
- package/dist/release-parity/index.js +1035 -0
- package/dist/replay/model-gateway.d.ts +25 -0
- package/dist/replay/model-gateway.d.ts.map +1 -0
- package/dist/replay/model-gateway.js +166 -0
- package/dist/replay/parity.d.ts +110 -0
- package/dist/replay/parity.d.ts.map +1 -0
- package/dist/replay/parity.js +232 -0
- package/dist/rollback/index.d.ts +106 -0
- package/dist/rollback/index.d.ts.map +1 -0
- package/dist/rollback/index.js +694 -0
- package/dist/scenario/parser.d.ts +11 -0
- package/dist/scenario/parser.d.ts.map +1 -0
- package/dist/scenario/parser.js +490 -0
- package/dist/scenario/runner.d.ts +12 -0
- package/dist/scenario/runner.d.ts.map +1 -0
- package/dist/scenario/runner.js +345 -0
- package/dist/scenario/synthetic-world-adapter.d.ts +4 -0
- package/dist/scenario/synthetic-world-adapter.d.ts.map +1 -0
- package/dist/scenario/synthetic-world-adapter.js +82 -0
- package/dist/scenario/time.d.ts +4 -0
- package/dist/scenario/time.d.ts.map +1 -0
- package/dist/scenario/time.js +45 -0
- package/dist/scenario/types.d.ts +149 -0
- package/dist/scenario/types.d.ts.map +1 -0
- package/dist/scenario/types.js +5 -0
- package/dist/spikes/index.d.ts +10 -0
- package/dist/spikes/index.d.ts.map +1 -0
- package/dist/spikes/index.js +29 -0
- package/dist/spikes/k1-ensemble-spread.d.ts +88 -0
- package/dist/spikes/k1-ensemble-spread.d.ts.map +1 -0
- package/dist/spikes/k1-ensemble-spread.js +396 -0
- package/dist/spikes/k2-policy-author.d.ts +25 -0
- package/dist/spikes/k2-policy-author.d.ts.map +1 -0
- package/dist/spikes/k2-policy-author.js +503 -0
- package/dist/spikes/live-refresh.d.ts +150 -0
- package/dist/spikes/live-refresh.d.ts.map +1 -0
- package/dist/spikes/live-refresh.js +511 -0
- package/dist/world/index.d.ts +2 -0
- package/dist/world/index.d.ts.map +1 -0
- package/dist/world/index.js +17 -0
- package/dist/world/synthetic-world.d.ts +104 -0
- package/dist/world/synthetic-world.d.ts.map +1 -0
- package/dist/world/synthetic-world.js +449 -0
- package/package.json +139 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OpenProse
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# @openprose/reactor-cradle
|
|
2
|
+
|
|
3
|
+
`@openprose/reactor-cradle` is the deterministic test harness for the local
|
|
4
|
+
OpenProse Reactor package. It is where Reactor behavior is replayed, compared,
|
|
5
|
+
projected, and packaged into release evidence without requiring live services
|
|
6
|
+
for the normal test path.
|
|
7
|
+
|
|
8
|
+
The Cradle is a test and evidence package, not the production Reactor runtime.
|
|
9
|
+
This README describes the `0.1.0-rc.1` package surface. It is an OSS release
|
|
10
|
+
candidate; the stable `0.1.0` launch waits for provenance publication and
|
|
11
|
+
stranger-run verification.
|
|
12
|
+
|
|
13
|
+
## v0.1 Status
|
|
14
|
+
|
|
15
|
+
What v0.1 demonstrates:
|
|
16
|
+
|
|
17
|
+
- The static-world cost thesis is measured and locally runnable: the
|
|
18
|
+
package-backed `skills/open-prose/examples/flat-tokens` run drives four real
|
|
19
|
+
`createReactor().ingest()` turns and prints `tokens.fresh=46`,
|
|
20
|
+
`tokens.reused=46`, and `ratio=46:46`. The Cradle C5 summary also compares
|
|
21
|
+
that Reactor run with the no-memo deterministic control (`92:0`) and the
|
|
22
|
+
naive-loop control (`256:0`).
|
|
23
|
+
- Receipts, owner/subscriber/public projections, and SDK exit-bundle
|
|
24
|
+
export/import are exercised by release-candidate evidence helpers without
|
|
25
|
+
exposing private replay payloads.
|
|
26
|
+
- Composition pins and release parity are represented as deterministic checks:
|
|
27
|
+
consumed receipts are pinned by contract revision and acceptable signer
|
|
28
|
+
posture, while memory/filesystem parity is exercised with Postgres marked
|
|
29
|
+
future.
|
|
30
|
+
- Local examples are runnable from the package/CLI release surface: the flat
|
|
31
|
+
tokens example runs from packed tarballs, and the companion OpenProse CLI
|
|
32
|
+
quickstart compiles, serves, triggers, and projects an incident-briefing
|
|
33
|
+
responsibility locally.
|
|
34
|
+
|
|
35
|
+
What is designed and partial:
|
|
36
|
+
|
|
37
|
+
- The CLI path is local and deterministic. It proves package/CLI integration,
|
|
38
|
+
receipt production, and projection, not production ingress or hosted
|
|
39
|
+
fulfillment quality.
|
|
40
|
+
- Provider parity is recorded, not a live runtime matrix. Cradle carries
|
|
41
|
+
deterministic provider parity doubles and one live-recorded K1 cassette, but
|
|
42
|
+
the runtime does not perform variable-depth live ensemble judging.
|
|
43
|
+
- The tagged publish gate is wired for provenance publication, but no npm
|
|
44
|
+
publication has been run for this worktree.
|
|
45
|
+
|
|
46
|
+
Deferred to v0.2 or external gates:
|
|
47
|
+
|
|
48
|
+
- Actual npm publication and provenance until a release tag and npm auth or
|
|
49
|
+
trusted publishing are available.
|
|
50
|
+
- The stranger run that verifies both local demos outside the authoring team.
|
|
51
|
+
- Production ingress, fulfillment, and oracle layers.
|
|
52
|
+
- Runtime variable-depth ensemble judging, Postgres parity, and a non-null
|
|
53
|
+
signer adapter.
|
|
54
|
+
|
|
55
|
+
The Cradle currently provides:
|
|
56
|
+
|
|
57
|
+
- Virtual clock, in-memory storage, and filesystem storage doubles for the
|
|
58
|
+
Reactor SDK adapter shape.
|
|
59
|
+
- Synthetic worlds, scenario parsing, and scenario replay.
|
|
60
|
+
- Recording/replay model gateway cassettes for deterministic model-facing
|
|
61
|
+
tests.
|
|
62
|
+
- Assertion families for static surprise, token attribution, flat spend, and
|
|
63
|
+
fixed-interval work.
|
|
64
|
+
- Policy-author, policy-drift, recompile, rollback, and recorded-artifact
|
|
65
|
+
replay proofs.
|
|
66
|
+
- Release parity, eval/report, public projection, and release-candidate
|
|
67
|
+
evidence helpers.
|
|
68
|
+
|
|
69
|
+
## Public Subpaths
|
|
70
|
+
|
|
71
|
+
The packed artifact exposes these CommonJS entrypoints:
|
|
72
|
+
|
|
73
|
+
- `@openprose/reactor-cradle`
|
|
74
|
+
- `@openprose/reactor-cradle/assert`
|
|
75
|
+
- `@openprose/reactor-cradle/eval`
|
|
76
|
+
- `@openprose/reactor-cradle/spikes`
|
|
77
|
+
- `@openprose/reactor-cradle/spikes/live-refresh`
|
|
78
|
+
- `@openprose/reactor-cradle/spikes/k1-ensemble-spread`
|
|
79
|
+
- `@openprose/reactor-cradle/spikes/k2-policy-author`
|
|
80
|
+
- `@openprose/reactor-cradle/doubles/clock`
|
|
81
|
+
- `@openprose/reactor-cradle/doubles/storage`
|
|
82
|
+
- `@openprose/reactor-cradle/policy-author`
|
|
83
|
+
- `@openprose/reactor-cradle/policy-drift`
|
|
84
|
+
- `@openprose/reactor-cradle/policy-replay`
|
|
85
|
+
- `@openprose/reactor-cradle/recompile`
|
|
86
|
+
- `@openprose/reactor-cradle/release-parity`
|
|
87
|
+
- `@openprose/reactor-cradle/release-candidate`
|
|
88
|
+
- `@openprose/reactor-cradle/rollback`
|
|
89
|
+
- `@openprose/reactor-cradle/replay/model-gateway`
|
|
90
|
+
- `@openprose/reactor-cradle/replay/parity`
|
|
91
|
+
- `@openprose/reactor-cradle/scenario/parser`
|
|
92
|
+
- `@openprose/reactor-cradle/scenario/runner`
|
|
93
|
+
- `@openprose/reactor-cradle/scenario/time`
|
|
94
|
+
- `@openprose/reactor-cradle/scenario/types`
|
|
95
|
+
- `@openprose/reactor-cradle/world`
|
|
96
|
+
|
|
97
|
+
## Quickstart
|
|
98
|
+
|
|
99
|
+
These TypeScript examples use the package's public subpaths. Run the recorded
|
|
100
|
+
release-parity proof and turn it into local eval evidence:
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import {
|
|
104
|
+
buildR6ReleaseParityEvalResultV0,
|
|
105
|
+
runRecordedR6ReleaseParityProofV0,
|
|
106
|
+
} from "@openprose/reactor-cradle/release-parity";
|
|
107
|
+
import { renderCradleEvalReportMarkdownV0 } from "@openprose/reactor-cradle/eval";
|
|
108
|
+
|
|
109
|
+
const proof = runRecordedR6ReleaseParityProofV0();
|
|
110
|
+
const evalResult = buildR6ReleaseParityEvalResultV0(proof);
|
|
111
|
+
const markdown = renderCradleEvalReportMarkdownV0(evalResult);
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Use deterministic doubles around an SDK-like run:
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
import { VirtualClock } from "@openprose/reactor-cradle/doubles/clock";
|
|
118
|
+
import { InMemoryReactorStorage } from "@openprose/reactor-cradle/doubles/storage";
|
|
119
|
+
|
|
120
|
+
const clock = new VirtualClock("2026-05-19T00:00:00Z");
|
|
121
|
+
const storage = new InMemoryReactorStorage({
|
|
122
|
+
contract_revision:
|
|
123
|
+
"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
124
|
+
policy_artifact_namespace: "policy.static",
|
|
125
|
+
policy_artifact_revision: "policy-revision-1",
|
|
126
|
+
policy_artifact_validation_state: "validated",
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
clock.set("2026-05-19T01:00:00Z");
|
|
130
|
+
const receipts = storage.listReceipts();
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Record a model-gateway cassette once, then replay the same request sequence:
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
import {
|
|
137
|
+
createRecordingModelGatewayV0,
|
|
138
|
+
createReplayModelGatewayV0,
|
|
139
|
+
} from "@openprose/reactor-cradle/replay/model-gateway";
|
|
140
|
+
|
|
141
|
+
const recording = createRecordingModelGatewayV0((request) => ({
|
|
142
|
+
payload: { echoed: request.payload },
|
|
143
|
+
}));
|
|
144
|
+
|
|
145
|
+
recording.adapter.invoke({ kind: "judge", payload: { case_id: "static" } });
|
|
146
|
+
|
|
147
|
+
const replay = createReplayModelGatewayV0(recording.cassette);
|
|
148
|
+
replay.invoke({ kind: "judge", payload: { case_id: "static" } });
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Parse and run a scenario with injected doubles. The `scenarioText` and
|
|
152
|
+
`cassette` values are caller-provided fixtures:
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
import { parseScenarioV0 } from "@openprose/reactor-cradle/scenario/parser";
|
|
156
|
+
import { runScenarioV0 } from "@openprose/reactor-cradle/scenario/runner";
|
|
157
|
+
import { createReplayModelGatewayV0 } from "@openprose/reactor-cradle/replay/model-gateway";
|
|
158
|
+
import { VirtualClock } from "@openprose/reactor-cradle/doubles/clock";
|
|
159
|
+
import { InMemoryReactorStorage } from "@openprose/reactor-cradle/doubles/storage";
|
|
160
|
+
import { createSyntheticWorldConnectorV0 } from "@openprose/reactor-cradle/world";
|
|
161
|
+
|
|
162
|
+
const scenario = parseScenarioV0(scenarioText, {
|
|
163
|
+
sourceName: "static-flat-spend.scenario",
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
const run = runScenarioV0({
|
|
167
|
+
scenario,
|
|
168
|
+
clock: new VirtualClock(scenario.initial_instant),
|
|
169
|
+
world: createSyntheticWorldConnectorV0({
|
|
170
|
+
initial_as_of: scenario.initial_instant,
|
|
171
|
+
profile: { kind: "static" },
|
|
172
|
+
sources: [{ source_id: "status-page", payload: { ok: true } }],
|
|
173
|
+
}),
|
|
174
|
+
modelGateway: createReplayModelGatewayV0(cassette),
|
|
175
|
+
storage: new InMemoryReactorStorage({
|
|
176
|
+
policy_artifact_namespace: "policy.static",
|
|
177
|
+
policy_artifact_revision: "policy-revision-1",
|
|
178
|
+
}),
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Local Release-Candidate Preflight
|
|
183
|
+
|
|
184
|
+
The repository-level preflight script assembles a local evidence bundle and
|
|
185
|
+
Markdown report from explicit observed command evidence plus packed Reactor and
|
|
186
|
+
Cradle artifacts:
|
|
187
|
+
|
|
188
|
+
```sh
|
|
189
|
+
rm -rf /tmp/openprose-reactor-pack /tmp/openprose-reactor-evidence
|
|
190
|
+
mkdir -p /tmp/openprose-reactor-pack
|
|
191
|
+
|
|
192
|
+
pnpm --filter @openprose/reactor test
|
|
193
|
+
pnpm --filter @openprose/reactor-cradle test
|
|
194
|
+
node --test .github/scripts/verify-reactor-pin.test.mjs .github/scripts/smoke-reactor-tarball-import.test.mjs .github/scripts/smoke-reactor-cradle-tarball-import.test.mjs .github/scripts/build-reactor-release-candidate-evidence.test.mjs
|
|
195
|
+
node --test .github/scripts/smoke-reactor-release-readiness-example.test.mjs
|
|
196
|
+
node --test .github/scripts/smoke-reactor-flat-tokens-example.test.mjs
|
|
197
|
+
pnpm --dir packages/reactor pack --pack-destination /tmp/openprose-reactor-pack
|
|
198
|
+
pnpm --dir packages/reactor-cradle pack --pack-destination /tmp/openprose-reactor-pack
|
|
199
|
+
|
|
200
|
+
node .github/scripts/build-reactor-release-candidate-evidence.mjs \
|
|
201
|
+
--releaseCandidateId local-release-candidate \
|
|
202
|
+
--generatedAt 2026-05-19T00:00:00.000Z \
|
|
203
|
+
--asOf 2026-05-19T00:00:00.000Z \
|
|
204
|
+
--branch main \
|
|
205
|
+
--commit <local-commit-sha> \
|
|
206
|
+
--worktreeStatus clean \
|
|
207
|
+
--reactorTarball /tmp/openprose-reactor-pack/openprose-reactor-0.1.0-rc.1.tgz \
|
|
208
|
+
--cradleTarball /tmp/openprose-reactor-pack/openprose-reactor-cradle-0.1.0-rc.1.tgz \
|
|
209
|
+
--verifierSmokeTests <verifier-smoke-passed/total> \
|
|
210
|
+
--exampleSmokeTests <example-smoke-passed/total> \
|
|
211
|
+
--reactorTests <reactor-tests-passed/total> \
|
|
212
|
+
--cradleTests <cradle-tests-passed/total> \
|
|
213
|
+
--diffCheck pass \
|
|
214
|
+
--dependencyScan pass \
|
|
215
|
+
--secretScan pass \
|
|
216
|
+
--outDir /tmp/openprose-reactor-evidence
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The script runs the local Reactor pin verifier, both tarball import smokes, and
|
|
220
|
+
the packed release-readiness example smoke, then renders the release-candidate
|
|
221
|
+
evidence bundle through the Cradle helpers.
|
|
222
|
+
The count flags are evidence metadata from the commands you just ran; pass the
|
|
223
|
+
observed counts for the current worktree instead of reusing stale numbers.
|
|
224
|
+
It does not publish, push, contact a registry, run a live provider/model
|
|
225
|
+
matrix, or claim remote CI provenance.
|
|
226
|
+
|
|
227
|
+
## Explicit Deferred Rows
|
|
228
|
+
|
|
229
|
+
The current release-candidate evidence keeps these rows unrepresented:
|
|
230
|
+
|
|
231
|
+
- `down-after-budget-exhaustion`: deferred until typed retry-budget and
|
|
232
|
+
pressure-dispatch primitives exist.
|
|
233
|
+
- `postgres-parity`: future work; memory and filesystem parity rows are the
|
|
234
|
+
represented rows today.
|
|
235
|
+
- `live-provider-model-matrix`: one live K1 cassette is recorded, but the full
|
|
236
|
+
live provider/model matrix is not run for the local candidate.
|
|
237
|
+
|
|
238
|
+
## Local Package Evidence
|
|
239
|
+
|
|
240
|
+
Useful local checks:
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
pnpm --filter @openprose/reactor-cradle test
|
|
244
|
+
pnpm --dir packages/reactor pack --pack-destination /tmp/openprose-reactor-pack
|
|
245
|
+
pnpm --dir packages/reactor-cradle pack --pack-destination /tmp/openprose-reactor-pack
|
|
246
|
+
node .github/scripts/smoke-reactor-cradle-tarball-import.mjs \
|
|
247
|
+
--reactorTarball /tmp/openprose-reactor-pack/openprose-reactor-0.1.0-rc.1.tgz \
|
|
248
|
+
--cradleTarball /tmp/openprose-reactor-pack/openprose-reactor-cradle-0.1.0-rc.1.tgz
|
|
249
|
+
node .github/scripts/smoke-reactor-flat-tokens-example.mjs \
|
|
250
|
+
--reactorTarball /tmp/openprose-reactor-pack/openprose-reactor-0.1.0-rc.1.tgz \
|
|
251
|
+
--cradleTarball /tmp/openprose-reactor-pack/openprose-reactor-cradle-0.1.0-rc.1.tgz \
|
|
252
|
+
--exampleDir skills/open-prose/examples/flat-tokens
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
The Cradle tarball smoke installs packed Reactor and Cradle artifacts into a
|
|
256
|
+
temporary offline consumer and imports every public Cradle entrypoint. The
|
|
257
|
+
flat-tokens smoke runs from the same packed artifacts and expects
|
|
258
|
+
`tokens.fresh=46`, `tokens.reused=46`, and `ratio=46:46`.
|
|
259
|
+
|
|
260
|
+
## Current Boundaries
|
|
261
|
+
|
|
262
|
+
- This README describes the release-candidate package surface; the stable npm
|
|
263
|
+
release waits for registry-visible provenance and stranger-run evidence.
|
|
264
|
+
- The Cradle is a deterministic harness and evidence package, not a production
|
|
265
|
+
hosted service.
|
|
266
|
+
- The package does not include the CLI implementation; local CLI
|
|
267
|
+
`serve/status` evidence lives in the companion OpenProse CLI worktree.
|
|
268
|
+
- Postgres parity, production adapter release, registry-visible provenance
|
|
269
|
+
attestations, and live provider/model matrix coverage are still outside the
|
|
270
|
+
represented package evidence.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReceiptV0 } from "@openprose/reactor/receipt";
|
|
2
|
+
import type { ScenarioReceiptLogV0, ScenarioRunReceiptV0 } from "../scenario/types";
|
|
3
|
+
export type CradleAssertionFamilyV0 = "static-surprise-zero" | "surprise-attribution-complete" | "flat-spend-under-static" | "no-fixed-interval-work" | "release-parity-fixture";
|
|
4
|
+
export type CradleAssertionStatusV0 = "pass" | "fail";
|
|
5
|
+
export interface CradleAssertionEvidenceV0 {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly message: string;
|
|
8
|
+
readonly observed?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface CradleAssertionResultV0 {
|
|
11
|
+
readonly ok: boolean;
|
|
12
|
+
readonly relationship: CradleAssertionFamilyV0;
|
|
13
|
+
readonly family: CradleAssertionFamilyV0;
|
|
14
|
+
readonly status: CradleAssertionStatusV0;
|
|
15
|
+
readonly summary: string;
|
|
16
|
+
readonly evidence: readonly CradleAssertionEvidenceV0[];
|
|
17
|
+
}
|
|
18
|
+
export interface CradleAssertionSuiteResultV0 {
|
|
19
|
+
readonly status: CradleAssertionStatusV0;
|
|
20
|
+
readonly results: readonly CradleAssertionResultV0[];
|
|
21
|
+
}
|
|
22
|
+
export interface FlatSpendUnderStaticOptionsV0 {
|
|
23
|
+
readonly bootstrap_receipt_count?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface CradleAssertionOptionsV0 {
|
|
26
|
+
readonly flat_spend?: FlatSpendUnderStaticOptionsV0;
|
|
27
|
+
}
|
|
28
|
+
export declare function assertStaticSurpriseZeroV0(run: ScenarioRunReceiptV0): CradleAssertionResultV0;
|
|
29
|
+
export declare function assertSurpriseAttributionCompleteV0(run: ScenarioRunReceiptV0 | ScenarioReceiptLogV0 | readonly ReceiptV0[]): CradleAssertionResultV0;
|
|
30
|
+
export declare function assertFlatSpendUnderStaticV0(run: ScenarioRunReceiptV0, options?: FlatSpendUnderStaticOptionsV0): CradleAssertionResultV0;
|
|
31
|
+
export declare function assertNoFixedIntervalWorkV0(run: ScenarioRunReceiptV0): CradleAssertionResultV0;
|
|
32
|
+
export declare function evaluateCradleAssertionV0(run: ScenarioRunReceiptV0, family: CradleAssertionFamilyV0, options?: CradleAssertionOptionsV0): CradleAssertionResultV0;
|
|
33
|
+
export declare function evaluateCradleAssertionsV0(run: ScenarioRunReceiptV0, families: readonly CradleAssertionFamilyV0[], options?: CradleAssertionOptionsV0): CradleAssertionSuiteResultV0;
|
|
34
|
+
export declare function evaluateExpectedCradleRelationshipsV0(run: ScenarioRunReceiptV0, options?: CradleAssertionOptionsV0): CradleAssertionSuiteResultV0;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,SAAS,EACV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAEV,oBAAoB,EACpB,oBAAoB,EAGrB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,uBAAuB,GAC/B,sBAAsB,GACtB,+BAA+B,GAC/B,yBAAyB,GACzB,wBAAwB,GACxB,wBAAwB,CAAC;AAE7B,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,yBAAyB,EAAE,CAAC;CACzD;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACtD;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAC3C;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,6BAA6B,CAAC;CACrD;AAyBD,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,oBAAoB,GACxB,uBAAuB,CAiEzB;AAED,wBAAgB,mCAAmC,CACjD,GAAG,EAAE,oBAAoB,GAAG,oBAAoB,GAAG,SAAS,SAAS,EAAE,GACtE,uBAAuB,CAiDzB;AAED,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,oBAAoB,EACzB,OAAO,GAAE,6BAAkC,GAC1C,uBAAuB,CAsEzB;AAED,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,oBAAoB,GACxB,uBAAuB,CAyDzB;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,oBAAoB,EACzB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,GAAE,wBAA6B,GACrC,uBAAuB,CAezB;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,oBAAoB,EACzB,QAAQ,EAAE,SAAS,uBAAuB,EAAE,EAC5C,OAAO,GAAE,wBAA6B,GACrC,4BAA4B,CAI9B;AAED,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,oBAAoB,EACzB,OAAO,GAAE,wBAA6B,GACrC,4BAA4B,CAM9B"}
|