@open-agent-toolkit/cli 0.2.54 → 0.2.55

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.
@@ -13,7 +13,6 @@ a new version rather than accepting untyped fields.
13
13
  ├── claims.json
14
14
  ├── reviews/
15
15
  │ ├── briefs/
16
- │ ├── locator-validation.json
17
16
  │ ├── semantic/
18
17
  │ ├── adversarial/
19
18
  │ ├── coverage/
@@ -21,7 +20,6 @@ a new version rather than accepting untyped fields.
21
20
  └── raw/
22
21
  ├── dossiers/
23
22
  ├── drafts/
24
- ├── dispatch/
25
23
  ├── quarantine/
26
24
  └── failure.json
27
25
  ```
@@ -36,16 +34,9 @@ An artifact reference is `{ "path": "packet-relative/path", "digest":
36
34
  "sha256:<64 lowercase hex>" }`. Paths must remain inside the packet directory.
37
35
  Digests cover the exact bytes on disk.
38
36
 
39
- Approval evidence embeds the existing `oat-dispatch-approval/v1` canonical
40
- prepared projection without reducing or renaming its fields. Fingerprints use
41
- canonical JSON: UTF-8, object keys sorted lexicographically, array order
42
- preserved, no insignificant whitespace, and SHA-256 with the `sha256:` prefix.
43
- The stored canonical JSON text and fingerprint cover the whole projection.
44
- Every `writable_roots`, `escalate_when`, and `candidates_considered` member is a
45
- non-empty string. These arrays use stable sorted-set form: entries are unique
46
- and lexicographically ordered before approval, and packet validation rejects
47
- nulls, empty strings, duplicates, or unstable ordering rather than normalizing
48
- them after approval.
37
+ Fingerprints use canonical JSON: UTF-8, object keys sorted lexicographically,
38
+ array order preserved, no insignificant whitespace, and SHA-256 with the
39
+ `sha256:` prefix.
49
40
 
50
41
  ## One Validation Boundary
51
42
 
@@ -53,18 +44,15 @@ Version 1 compiles persisted packet inputs exactly once into one non-persisted,
53
44
  deeply immutable `ValidatedRun`. This value is an internal normalized graph,
54
45
  not an artifact kind, schema version, file, cache, or caller-selectable profile.
55
46
  Assurance derivation and rendering accept only `ValidatedRun`; they never
56
- reopen or independently reinterpret raw manifest, ledger, review, receipt, or
47
+ reopen or independently reinterpret raw manifest, ledger, review, or
57
48
  reconciliation artifacts.
58
49
 
59
50
  Construction is all-or-nothing. A valid graph contains:
60
51
 
61
- - one complete `oat-dispatch-approval/v1` projection with its request,
62
- selection, every planned and conditional wave, per-wave task class and model
63
- floor, lane scope, authority and authorization scope, writable roots,
64
- fallback and context controls, payload digest, run maximum floor, pinned
65
- target, and original live catalog identity;
66
- - one exact approved wave/lane topology, with one terminal stage and matching
67
- accepted/completed receipt resolution for every required lane;
52
+ - one approved execution envelope whose canonical fingerprint matches the
53
+ recorded explicit user approval;
54
+ - complete typed same-run artifacts, each written by an approved wave and lane,
55
+ from which the achieved profile is derived;
68
56
  - exactly one terminal reconciliation for standard or thorough runs and one
69
57
  immutable canonical prior-ledger identity used by all review, transition,
70
58
  addition, and removal checks;
@@ -80,22 +68,11 @@ Construction is all-or-nothing. A valid graph contains:
80
68
  - derived claim assurance, achieved profile, material gaps, and publication
81
69
  status.
82
70
 
83
- Reject partial approval envelopes, omitted receipt axes, unknown selection
84
- shapes, duplicate or shadow reconciliation results, symlink root aliases,
85
- retargeted roots, raw secret-bearing stale excerpts, and caller-downgraded gap
86
- materiality. Equivalent-looking inputs do not excuse a failed invariant.
87
-
88
- The approved, accepted, and completed receipts carry the manifest's exact
89
- `approvedAt` value. The accepted and completed receipts also carry one
90
- identical launch-acceptance record, including the accepted child handle; a
91
- different terminal handle is a replacement and fails validation. The catalog
92
- recheck is a distinct observation from the projection's original catalog
93
- observation, occurs strictly after approval and strictly before launch
94
- acceptance, and retains the approved catalog source, context, and relevant
95
- fingerprint. The completed receipt's terminal timestamp is parseable and cannot
96
- precede launch acceptance; equality is valid at the contract's millisecond
97
- precision. Copied, non-fresh, or causally impossible receipt evidence cannot
98
- support publication.
71
+ Reject approval fingerprint drift, unknown execution fields, artifacts from
72
+ unapproved lanes, duplicate or shadow reconciliation results, symlink root
73
+ aliases, retargeted roots, raw secret-bearing stale excerpts, and
74
+ caller-downgraded gap materiality. Equivalent-looking inputs do not excuse a
75
+ failed invariant.
99
76
 
100
77
  ## Manifest
101
78
 
@@ -105,24 +82,77 @@ support publication.
105
82
  - `request`: objective, questions, included/excluded scope, stable context
106
83
  references, confirmed output path;
107
84
  - discriminated `sources`;
108
- - `execution`: exact prepared projection, canonical JSON, fingerprint,
109
- explicit-user approval evidence, approval timestamp, and fresh catalog
110
- recheck. The projection is identical to the dispatch dependency's canonical
111
- v1 object rather than a packet-local summary;
112
- - `stages`: `recon.stage-result` records whose single artifact ID, lane, and
113
- exact `waveId` plus prepared/approved/accepted/completed receipt IDs bind
114
- every completed pass to one hashed same-run artifact of the required kind;
85
+ - `execution`: the approved execution envelope described below;
115
86
  - `artifacts`: direct references; and
116
87
  - `gaps`: categorical omitted, unavailable, stale, or failed work, each with an
117
88
  explicit boolean `material` classification and affected source, claim, and
118
89
  coverage-finding IDs when applicable.
119
90
 
91
+ ### Execution Envelope
92
+
93
+ `execution` is a closed object binding exactly what the user approved:
94
+
95
+ - `provider`, `route`, `role`, `model`, `effort`: non-empty strings;
96
+ - `reasoningMode`, `serviceTier`: string or `null`;
97
+ - `authority`: `provider-enforced` or `contract-enforced`;
98
+ - `maxConcurrency`, `deadlineSeconds`: integers of at least 1; `retryLimit`:
99
+ integer of at least 0;
100
+ - `waves`: closed `{ waveId, mode, taskClass, lanes, conditional }` records
101
+ with a unique wave identity, a mode from the wave-mode set, a task class from
102
+ the durable task-class order, and at least one closed
103
+ `{ laneId, scope, writeRoot }` lane whose identity is unique across the run
104
+ and whose write root is a packet-relative path; and
105
+ - `approval`: `{ type: "explicit-user-approval", approvedAt, fingerprint }`.
106
+
107
+ The fingerprint is the canonical SHA-256 of `execution` with `approval`
108
+ removed. Validation recomputes it; any difference is
109
+ `APPROVAL_FINGERPRINT_MISMATCH`. The envelope records what will run, not proof
110
+ that a launcher ran it. Launch acceptance and per-lane terminal outcomes are
111
+ reported in the controller's status and as `PASS_FAILED` gaps, not as packet
112
+ artifacts.
113
+
114
+ Wave modes are `map`, `gather`, `compile`, `semantic-verification`,
115
+ `adversarial`, `coverage`, `reconciliation`, `redundant-gather`,
116
+ `redundant-verification`, and `contradiction-resolution`.
117
+
118
+ ### Passes and Achieved Profile
119
+
120
120
  Run status is `preparing`, `awaiting-approval`, `running`, `complete`, `partial`,
121
- or `failed`. The validator—not a worker—derives achieved profile.
122
- It derives rigor from the exact required wave/lane/stage multiset, never from a
123
- set of mode names. Every approved required lane has one terminal stage; only
124
- lanes whose typed artifact is named by matching accepted and completed receipts
125
- can contribute to achieved rigor.
121
+ or `failed`. The validator, not a worker, derives the achieved profile from
122
+ complete typed artifacts of the same run:
123
+
124
+ | Pass | Complete artifact |
125
+ | -------------------------- | ------------------------------------------------------------ |
126
+ | `map` | a `recon.raw-dossier` with mode `map` |
127
+ | `gather` | a `recon.raw-dossier` with mode `gather` |
128
+ | `semantic-verification` | a `recon.review-result` with kind `semantic` |
129
+ | `adversarial` | a `recon.review-result` with kind `adversarial` |
130
+ | `coverage` | a `recon.review-result` with kind `coverage` |
131
+ | `reconciliation` | a `recon.review-result` with kind `reconciliation` |
132
+ | `redundant-gather` | complete `gather` dossiers from at least two distinct lanes |
133
+ | `redundant-verification` | a `recon.review-result` with kind `redundant-verification` |
134
+ | `contradiction-resolution` | a `recon.review-result` with kind `contradiction-resolution` |
135
+
136
+ `quick` requires `map` and `gather`; the canonical ledger itself is the
137
+ compile result, so an approved `compile` lane needs no separate artifact, and
138
+ locator validation is performed by the validator.
139
+ `standard` adds `semantic-verification`, `adversarial`, `coverage`, and
140
+ `reconciliation`. `thorough` adds `redundant-gather`,
141
+ `redundant-verification`, and `contradiction-resolution`.
142
+
143
+ Every dossier records the approved `waveId` and `laneId` that wrote it; every
144
+ review result records its approved `reviewerLane`. The lane must belong to a
145
+ wave whose mode matches the artifact (a semantic result to a
146
+ `semantic-verification` wave, a gather dossier to a `gather` or
147
+ `redundant-gather` wave, and so on); otherwise the artifact is
148
+ `UNAPPROVED_LANE`. The artifact path must equal or sit under the lane's
149
+ approved `writeRoot`; otherwise it is `LANE_WRITE_PATH_VIOLATION`. Every
150
+ non-conditional approved lane must either have written an artifact or be
151
+ covered by a material `PASS_FAILED` or `PASS_OMITTED` gap naming its wave
152
+ mode; otherwise the packet fails with `MISSING_LANE_OUTCOME`. Each required
153
+ pass of the requested profile that has no complete artifact must likewise be
154
+ named by such a gap, or the packet fails with
155
+ `MISSING_PASS_OUTCOME_EVIDENCE`.
126
156
 
127
157
  ## Source Descriptors and Locators
128
158
 
@@ -162,12 +192,23 @@ mismatch invalidates the locator. Only `exact` and `redacted-exact` states are
162
192
  assurance-eligible. Managed packet, capture, repository, and output paths reject
163
193
  both ancestor and final-component symlinks before reads, hashes, or writes.
164
194
 
195
+ Source preflight runs these checks on the candidate manifest and ledger before
196
+ any review brief is created, so ineligible sources and broken locators are
197
+ found before the expensive review passes rather than at publication.
198
+
165
199
  ## Claim Ledger
166
200
 
167
201
  `recon.claim-ledger` version 1 contains run ID, monotonic revision, direct input
168
202
  references, synthesis, evidence, claims, unresolved questions, and explicit
169
203
  claim transitions.
170
204
 
205
+ Every claim evidence link is a closed `{ evidenceId, relation }` object whose
206
+ `evidenceId` resolves to an evidence record in the same ledger and whose
207
+ `relation` is `supports`, `contradicts`, `qualifies`, or `context`. A claim
208
+ links each evidence record at most once. String links, open objects, unknown
209
+ relations, unresolved IDs, and duplicates fail `validate-artifact.mjs` before
210
+ any review brief can consume the ledger.
211
+
171
212
  Claim states are categorical:
172
213
 
173
214
  - `provisional`: compiled, not mechanically validated;
@@ -186,27 +227,27 @@ incoming transition; the genesis exception cannot be reused.
186
227
 
187
228
  Quick packets never contain `verified` claims. Standard and thorough claims need
188
229
  recorded independent semantic, adversarial, and coverage reviews. Every review
189
- ID resolves to a unique, complete, typed, hashed result bound to the exact
190
- immutable brief digest, the claim's required disposition, and the matching
191
- accepted/completed stage receipts. An unreceipted result cannot contribute
192
- assurance or reconciliation. A material unresolved challenge or coverage
193
- finding prevents verification. A run with contested claims may publish as
194
- `complete` when all declared questions and claims are resolved or
195
- characterized; contested claims are rendered under "Contradictions and
196
- Qualifications". If an unresolved challenge represents an unanswered question
197
- or missing source evidence that leaves investigation incomplete, it must be
198
- recorded as a material gap in `manifest.gaps` and the run published as
199
- `partial`. Review workers propose; only a reconciler writes
200
- a new ledger candidate. Reconciliation binds the prior ledger reference and
201
- revision, the next revision, the exact receipted review-result set, and the exact
202
- canonical claim transitions. Standard and thorough output is exactly the next
203
- revision of the bound prior ledger; revision one cannot bypass reconciliation.
204
- It also binds additions, removals, and every prior/current state change;
205
- preserves statement, evidence-link, and qualification continuity; accepts new
206
- evidence only when an incorporated review supplied the exact record plus a
207
- closed `{ evidenceId, claimId, relation }` association to one of that review's
208
- disposition claims; preserves every unaffected evidence link byte-for-byte; and
209
- requires a receipted typed rejection disposition before removing a prior claim.
230
+ ID resolves to a unique, complete, typed, hashed result from an approved lane,
231
+ bound to the exact immutable brief digest and the claim's required disposition.
232
+ An incomplete or unapproved result cannot contribute assurance or
233
+ reconciliation. A material unresolved challenge or coverage finding prevents
234
+ verification. A run with contested claims may publish as `complete` when all
235
+ declared questions and claims are resolved or characterized; contested claims
236
+ are rendered under "Contradictions and Qualifications". If an unresolved
237
+ challenge represents an unanswered question or missing source evidence that
238
+ leaves investigation incomplete, it must be recorded as a material gap in
239
+ `manifest.gaps` and the run published as `partial`. Review workers propose;
240
+ only a reconciler writes a new ledger candidate. Reconciliation binds the prior
241
+ ledger reference and revision, the next revision, the exact complete
242
+ assurance-review set, and the exact canonical claim transitions. Standard and
243
+ thorough output is exactly the next revision of the bound prior ledger;
244
+ revision one cannot bypass reconciliation. It also binds additions, removals,
245
+ and every prior/current state change; preserves statement, evidence-link, and
246
+ qualification continuity; accepts new evidence only when an incorporated review
247
+ supplied the exact record plus a closed `{ evidenceId, claimId, relation }`
248
+ association to one of that review's disposition claims; preserves every
249
+ unaffected evidence link byte-for-byte; and requires a typed rejection
250
+ disposition from a complete review before removing a prior claim.
210
251
 
211
252
  ## Evidence and Secret Redaction
212
253
 
@@ -223,34 +264,25 @@ branch; source ineligibility never bypasses persistence safety.
223
264
 
224
265
  ## Other Artifacts
225
266
 
226
- - `recon.raw-dossier`: assignment identity, mode, inputs/exclusions, findings,
227
- uncertainty, contradictions, gaps, and outcome.
267
+ - `recon.raw-dossier`: assignment identity, approved wave and lane, mode,
268
+ inputs/exclusions, findings, uncertainty, contradictions, gaps, and outcome.
228
269
  - `recon.review-brief`: immutable selective-blind projection and digest.
229
- - `recon.review-result`: review kind, lane, exact brief reference,
270
+ - `recon.review-result`: review kind, approved lane, exact brief reference,
230
271
  permitted/excluded inputs, dispositions, new evidence, closed typed
231
272
  claim/evidence associations, coverage findings, unresolved issues, and
232
273
  completion status. Every new evidence record has at least one exact
233
274
  association, and an association cannot name evidence absent from that result
234
- or a claim without a disposition in that result. Reconciliation results replace the
235
- brief reference with prior-ledger/revision, additions/removals, exact
236
- transitions, and coverage-disposition bindings. Coverage findings are closed
237
- records bound to affected claims and exact manifest gaps. Accepted material
238
- gaps require a legal downgrade for every affected claim; a resolved finding
239
- instead names exact typed evidence. Non-material coverage gaps downgrade
240
- verified claims and transition provisional claims to unresolved, while
241
- existing supported claims remain supported without verified promotion.
242
- Thorough redundant verification and
243
- contradiction resolution are claim-bearing typed review results, not raw
244
- dossiers: they bind immutable briefs, claim dispositions, and explicit
245
- affected-contradiction dispositions.
246
- - `recon.stage-result`: stable stage ID, mode, lane, status, exactly one output
247
- artifact ID, accepted/completed receipt IDs, and safe diagnostics.
248
- - `recon.dispatch-receipt`: immutable prepared, approved, accepted, or
249
- completed evidence. Every state repeats the exact canonical projection,
250
- canonical JSON, and fingerprint. Approved and later states bind the same
251
- explicit approval evidence; accepted and completed states bind the fresh
252
- catalog recheck and launch acceptance; completed binds the terminal outcome
253
- and artifact IDs.
275
+ or a claim without a disposition in that result. Reconciliation results
276
+ replace the brief reference with prior-ledger/revision, additions/removals,
277
+ exact transitions, and coverage-disposition bindings. Coverage findings are
278
+ closed records bound to affected claims and exact manifest gaps. Accepted
279
+ material gaps require a legal downgrade for every affected claim; a resolved
280
+ finding instead names exact typed evidence. Non-material coverage gaps
281
+ downgrade verified claims and transition provisional claims to unresolved,
282
+ while existing supported claims remain supported without verified promotion.
283
+ Thorough redundant verification and contradiction resolution are
284
+ claim-bearing typed review results, not raw dossiers: they bind immutable
285
+ briefs, claim dispositions, and explicit affected-contradiction dispositions.
254
286
 
255
287
  Create immutable mode-specific review projections with
256
288
  `scripts/create-review-brief.mjs`. Verification briefs expose only claim
@@ -268,15 +300,14 @@ record under `raw/quarantine/`. Never promote invalid output.
268
300
 
269
301
  Run `scripts/validate-packet.mjs <packet-dir>` before rendering or publication.
270
302
  It delegates to the single validation boundary, which validates schemas, IDs,
271
- references, containment, hashes, source reopening, locators, the complete
272
- approval and receipt selection, exact topology, the one terminal
273
- reconciliation, legal transitions, secret-safe persistence, derived gaps,
274
- assurance, and requested vs achieved profile. Candidate validation is
275
- non-destructive for canonical diagnostic artifacts, but a non-publishable
276
- candidate withdraws any existing `packet.md` and does not authorize rendering.
277
- Only a valid `complete` or honest `partial` candidate is publishable, so a
278
- rejected canonical generation cannot retain a consumer entry point from another
279
- generation.
303
+ references, containment, hashes, source reopening, locators, the approval
304
+ fingerprint, approved lanes, pass outcomes, the one terminal reconciliation,
305
+ legal transitions, secret-safe persistence, derived gaps, assurance, and
306
+ requested vs achieved profile. Candidate validation is non-destructive for
307
+ canonical diagnostic artifacts, but a non-publishable candidate withdraws any
308
+ existing `packet.md` and does not authorize rendering. Only a valid `complete`
309
+ or honest `partial` candidate is publishable, so a rejected canonical
310
+ generation cannot retain a consumer entry point from another generation.
280
311
 
281
312
  `complete` requires the requested profile and no material gap. `partial` is
282
313
  valid when either a lower profile was achieved or at least one material gap is
@@ -301,7 +332,9 @@ dossier content.
301
332
 
302
333
  This boundary does not add another schema version, review pass, persisted
303
334
  intermediate, generalized plugin artifact kind, saved validation profile,
304
- provider behavior, or integration surface. It does not change p01 dispatch,
305
- research-pack distribution, documentation, backlog integrations,
306
- `quick`/`standard`/`thorough`, selective blindness, categorical claim states,
307
- honest partial publication, or directory-only handoff.
335
+ provider behavior, or integration surface. It does not require launcher-emitted
336
+ dispatch receipts; reintroduce those only when a launcher exists that produces
337
+ them itself. It does not change research-pack distribution, documentation,
338
+ backlog integrations, `quick`/`standard`/`thorough`, selective blindness,
339
+ categorical claim states, honest partial publication, or directory-only
340
+ handoff.