wicked-crew-api-types 0.100.1 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +366 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -261,6 +261,12 @@ export interface HealthCapabilities {
|
|
|
261
261
|
* has the field. ABSENT or `false` — a walkthrough step on this daemon's runs fails closed.
|
|
262
262
|
*/
|
|
263
263
|
walkthroughRoots?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* (crew ≥ 0.9.0; wicked-core#850) `LaunchRunBody.reducedAssurance` is accepted, a one-CLI
|
|
266
|
+
* full-assurance launch answers `LaunchRunResponse.assuranceNotice`, delivery enforces `qe_acceptance` ({@link QeAcceptanceRefusal}) and gate / delivery responses carry
|
|
267
|
+
* receipts. ABSENT on an older daemon — do not send the field (its strict schema 400s on it).
|
|
268
|
+
*/
|
|
269
|
+
reducedAssurance?: boolean;
|
|
264
270
|
}
|
|
265
271
|
|
|
266
272
|
/** One `GET /health.warnings[]` entry (additive; wicked-core#411 / wicked-crew#497). */
|
|
@@ -303,6 +309,19 @@ export interface AgentSession {
|
|
|
303
309
|
archived_at: number | null;
|
|
304
310
|
/** Optional operator note recorded at archival. */
|
|
305
311
|
archive_note: string | null;
|
|
312
|
+
/**
|
|
313
|
+
* (api-types 0.102.0; wicked-core#850, core-ts ≥ 0.7.46) The run's assurance contract, persisted
|
|
314
|
+
* by the engine: `mode: 'reduced'` only when the launch opted in (`reducedAssurance: true`).
|
|
315
|
+
* ABSENT on a run from an older engine (read it as unknown, never as `full`).
|
|
316
|
+
*/
|
|
317
|
+
assurance?: RunAssurance;
|
|
318
|
+
/**
|
|
319
|
+
* (crew ≥ 0.9.0, EX-04) How the run's delivery was assured, when crew delivered it post-hoc
|
|
320
|
+
* (`POST /runs/:id/deliver`): `verified: false`, with the tree before and after the lift — the
|
|
321
|
+
* same label the PR body carries. Rehydrated from the `run.delivered` audit entry. ABSENT for an
|
|
322
|
+
* in-run delivery (its receipt is `deliverLiftEvaluated.assurance`) and for an undelivered run.
|
|
323
|
+
*/
|
|
324
|
+
delivery_assurance?: DeliveryAssurance;
|
|
306
325
|
/**
|
|
307
326
|
* The project this run is filed into (DES-UX-001 §8.2, CREW-UX-2; api-types 0.8.0) —
|
|
308
327
|
* populated by the crew server from the membership record at DTO assembly on BOTH
|
|
@@ -668,6 +687,9 @@ export interface WorkUnit {
|
|
|
668
687
|
skill_ref?: string | null;
|
|
669
688
|
/** The command this unit runs directly (Tool-executor phases). `null`/absent for Agent units. */
|
|
670
689
|
tool_cmd?: string[] | null;
|
|
690
|
+
/** (api-types 0.102.0; wicked-core#850, core-ts ≥ 0.7.46) The receipt of this unit's LAST gate,
|
|
691
|
+
* as `gateEvaluated.assurance` carried it. ABSENT until a gate ran, and on an older engine. */
|
|
692
|
+
assurance?: AssuranceReceipt;
|
|
671
693
|
/** Evaluator≠creator role. Present on def-driven units; absent on legacy/free-text. */
|
|
672
694
|
role?: PhaseRole;
|
|
673
695
|
/** Gate policy for this phase. Present on def-driven units; absent on legacy/free-text. */
|
|
@@ -1260,6 +1282,22 @@ export interface GateInfo {
|
|
|
1260
1282
|
* advisory: it never gates a decision, and is omitted entirely on a normal gate.
|
|
1261
1283
|
*/
|
|
1262
1284
|
refusal?: { matched: boolean; reason: string };
|
|
1285
|
+
/** (crew ≥ 0.9.0) The gated unit's persisted receipt (`WorkUnit.assurance`) — what assured the
|
|
1286
|
+
* work this gate asks about. `null` when the unit carries none (no gate evaluated it yet, or an
|
|
1287
|
+
* older engine); ABSENT on an older daemon. */
|
|
1288
|
+
assurance?: AssuranceReceipt | null;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* The 200 body of `POST /runs/:id/gate` (and of a gated `POST /runs/:id/resume`). `assurance`
|
|
1293
|
+
* (crew ≥ 0.9.0) is the gated unit's receipt as it stood when the decision was taken; `null` when
|
|
1294
|
+
* the unit carried none. A DELIVER gate's approve also carries `delivery` (its QE acceptance check).
|
|
1295
|
+
*/
|
|
1296
|
+
export interface GateDecisionResult {
|
|
1297
|
+
status: SessionStatus;
|
|
1298
|
+
landing?: SteeringLandingResult;
|
|
1299
|
+
assurance?: AssuranceReceipt | null;
|
|
1300
|
+
delivery?: { qeAcceptance: QeAcceptanceCheck | null };
|
|
1263
1301
|
}
|
|
1264
1302
|
|
|
1265
1303
|
/** Approve / reject payload for the steering gate (`POST /runs/:id/gate`). On a
|
|
@@ -1311,7 +1349,10 @@ export interface GateDecision {
|
|
|
1311
1349
|
| 'targeted'
|
|
1312
1350
|
| 'accept_partial'
|
|
1313
1351
|
| 'accept_suggestion'
|
|
1314
|
-
| 'amend_intent'
|
|
1352
|
+
| 'amend_intent'
|
|
1353
|
+
/** (core#820) A `consent` gate's choice from its dry-run plan (`awaitingHuman.choices`), with
|
|
1354
|
+
* `approve: true`: `consent:worker` (the default), `consent:operator`, …; `reject` declines. */
|
|
1355
|
+
| `consent:${string}`;
|
|
1315
1356
|
/**
|
|
1316
1357
|
* Where an approve's `amend` lands (api-types 0.38.0, additive; same release as `action`).
|
|
1317
1358
|
* Absent = `'cursor'` (today: the gated unit's description). `'creator'` — the first creator
|
|
@@ -1403,6 +1444,24 @@ export interface CoreEvent {
|
|
|
1403
1444
|
* ABSENT ⇒ nothing is preselected.
|
|
1404
1445
|
*/
|
|
1405
1446
|
recommended?: number;
|
|
1447
|
+
/**
|
|
1448
|
+
* `awaitingHuman{gateKind: 'consent'}` (core#820): the answer tokens the gate offers, from the
|
|
1449
|
+
* dry-run plan the gated unit depends on (`consent:<id>`…, `reject` last); `recommended` is then
|
|
1450
|
+
* the index of the plan's default choice. ABSENT on every other gate, and on a consent gate with
|
|
1451
|
+
* no plan (see `writeTargetsMissing`).
|
|
1452
|
+
*/
|
|
1453
|
+
choices?: string[];
|
|
1454
|
+
/** `awaitingHuman{gateKind: 'consent'}` (core#820): each token's label (`reject` → "Decline"). */
|
|
1455
|
+
choiceLabels?: Record<string, string>;
|
|
1456
|
+
/** `awaitingHuman{gateKind: 'consent'}` (core#820): what each token would write (`reject` → `[]`). */
|
|
1457
|
+
writeTargets?: Record<string, ConsentWriteTarget[]>;
|
|
1458
|
+
/** `awaitingHuman{gateKind: 'consent'}` (core#820): the ord of the dry-run unit the plan came from. */
|
|
1459
|
+
writePlanOrd?: number;
|
|
1460
|
+
/** `awaitingHuman{gateKind: 'consent'}` (core#820): CLIs the plan leaves out, and why. */
|
|
1461
|
+
writeTargetsSkipped?: Array<{ cli: string; why: string }>;
|
|
1462
|
+
/** `awaitingHuman{gateKind: 'consent'}` (core#820): why no write targets are listed (no dry run
|
|
1463
|
+
* ran before the gate, or it printed no plan); the gate is then a plain approve / reject. */
|
|
1464
|
+
writeTargetsMissing?: string;
|
|
1406
1465
|
/** PTY terminal frames (`terminalOpened`/`terminalOutput`/`terminalExited`): the terminal id. */
|
|
1407
1466
|
id?: string;
|
|
1408
1467
|
/**
|
|
@@ -1824,6 +1883,14 @@ export interface DataUsedEvent {
|
|
|
1824
1883
|
* which denies fail-closed WITHOUT that event; `reason` names the cause;
|
|
1825
1884
|
* - `repo_checks` — the repository's own checks failed in the worktree (wicked-core F-039, see
|
|
1826
1885
|
* {@link RepoChecksEvaluatedEvent}).
|
|
1886
|
+
* - `same_seat_evaluator` (api-types 0.102.0; wicked-core#850 EX-01, core-ts ≥ 0.7.46) — a
|
|
1887
|
+
* review/test unit ran on the seat that built its work, on a run whose contract requires a
|
|
1888
|
+
* distinct evaluator. It escalates as a `dead_seat` gate: reassign the unit to a distinct seat.
|
|
1889
|
+
* - `evaluator_error` (api-types 0.102.0; EX-05) — the evaluator≠creator pass errored; `reason`
|
|
1890
|
+
* names the error. Before core-ts 0.7.46 the error was dropped and the gate could approve.
|
|
1891
|
+
* - `judge_unavailable` — the gate's judge did not run (every eligible judge seat failed, or, since
|
|
1892
|
+
* core-ts 0.7.46 / EX-02, the run requires a judge and none distinct from the creator existed).
|
|
1893
|
+
* A HOLD: sign a judge seat in, then approve to re-run.
|
|
1827
1894
|
* Open-ended (`string & {}`) so a newer engine's source parses in an older studio.
|
|
1828
1895
|
*/
|
|
1829
1896
|
export type UnitDenialSource =
|
|
@@ -1838,6 +1905,9 @@ export type UnitDenialSource =
|
|
|
1838
1905
|
| 'elicitation'
|
|
1839
1906
|
| 'worktree_guard'
|
|
1840
1907
|
| 'repo_checks'
|
|
1908
|
+
| 'same_seat_evaluator'
|
|
1909
|
+
| 'evaluator_error'
|
|
1910
|
+
| 'judge_unavailable'
|
|
1841
1911
|
| (string & {});
|
|
1842
1912
|
|
|
1843
1913
|
/** The MACHINE-READABLE twin of `gateEvaluated.denialReason` (wicked-core `UnitDenial`, camelCase on
|
|
@@ -1853,6 +1923,136 @@ export interface UnitDenial {
|
|
|
1853
1923
|
phase: string | null;
|
|
1854
1924
|
}
|
|
1855
1925
|
|
|
1926
|
+
// ── Assurance (api-types 0.102.0; wicked-core#850, codex audit EX-01..EX-05, core-ts ≥ 0.7.46) ──
|
|
1927
|
+
|
|
1928
|
+
/** The run's assurance mode. `reduced` only when the launch EXPLICITLY opted in
|
|
1929
|
+
* (`LaunchRunBody.reducedAssurance: true`); it is disclosed on every receipt. */
|
|
1930
|
+
export type AssuranceMode = 'full' | 'reduced';
|
|
1931
|
+
|
|
1932
|
+
/** What a run's contract can require: a workflow's `required_instruments`, else the first two. */
|
|
1933
|
+
export type AssuranceRequirement = 'distinct_evaluator' | 'judge' | 'qe_acceptance' | (string & {});
|
|
1934
|
+
|
|
1935
|
+
/** A receipt's instrument token (`ran[]`, `skipped[].instrument`). */
|
|
1936
|
+
export type AssuranceInstrument =
|
|
1937
|
+
| 'pinned_validator'
|
|
1938
|
+
| 'repo_checks'
|
|
1939
|
+
| 'judge'
|
|
1940
|
+
| 'evaluator_pass'
|
|
1941
|
+
| 'distinct_evaluator'
|
|
1942
|
+
| (string & {});
|
|
1943
|
+
|
|
1944
|
+
/** Why an instrument is absent from a receipt. */
|
|
1945
|
+
export type AssuranceSkipReason =
|
|
1946
|
+
| 'reduced_assurance'
|
|
1947
|
+
| 'no_distinct_seat'
|
|
1948
|
+
| 'no_boundary'
|
|
1949
|
+
| 'error'
|
|
1950
|
+
| 'not_applicable'
|
|
1951
|
+
| (string & {});
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* The run's assurance CONTRACT, persisted by the engine on the session (`AgentSession.assurance`)
|
|
1955
|
+
* and carried on `sessionStarted.assurance`. `required` is what the workflow requires BEFORE any
|
|
1956
|
+
* waiver; `reduced` waives exactly `distinct_evaluator` and `judge`, never `qe_acceptance`. A
|
|
1957
|
+
* session persisted before core-ts 0.7.46 reads back `full` with the default requirements.
|
|
1958
|
+
*/
|
|
1959
|
+
export interface RunAssurance {
|
|
1960
|
+
mode: AssuranceMode;
|
|
1961
|
+
required: AssuranceRequirement[];
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
/** One instrument a receipt did NOT run, and why. */
|
|
1965
|
+
export interface AssuranceSkip {
|
|
1966
|
+
instrument: AssuranceInstrument;
|
|
1967
|
+
reason: AssuranceSkipReason;
|
|
1968
|
+
/** The engine's own words when it has them (the judge-skip reason, the floor note); else `null`. */
|
|
1969
|
+
detail: string | null;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* What assured ONE decision: the run's contract, the instruments that RAN and the ones that did
|
|
1974
|
+
* not (and why), who made, evaluated and judged the work, the tree it was decided on, the attempt.
|
|
1975
|
+
* On `gateEvaluated.assurance` (one unit's gate, persisted as `WorkUnit.assurance`) and
|
|
1976
|
+
* `deliverLiftEvaluated.assurance` (every gate of the run aggregated, stamped with the delivered
|
|
1977
|
+
* tree). A receipt claims only what ran: a pinned validator that timed out is a skip, checks count
|
|
1978
|
+
* as ran only when some executed, a judge only when a seat answered. `null` fields are the
|
|
1979
|
+
* engine's `None`, never absent.
|
|
1980
|
+
*/
|
|
1981
|
+
export interface AssuranceReceipt {
|
|
1982
|
+
mode: AssuranceMode;
|
|
1983
|
+
required: AssuranceRequirement[];
|
|
1984
|
+
ran: AssuranceInstrument[];
|
|
1985
|
+
skipped: AssuranceSkip[];
|
|
1986
|
+
creator: string | null;
|
|
1987
|
+
evaluator: string | null;
|
|
1988
|
+
judge: string | null;
|
|
1989
|
+
tree: string | null;
|
|
1990
|
+
attempt: number;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
/**
|
|
1994
|
+
* (crew ≥ 0.9.0, EX-03) The QE acceptance check a delivery ran: present when the run's contract
|
|
1995
|
+
* requires `qe_acceptance`. `satisfied` only on a PASS ATTRIBUTED to this run — a FAIL, any
|
|
1996
|
+
* non-PASS verdict, no verdict, an unattributed verdict or an unreadable ledger refuses delivery.
|
|
1997
|
+
*/
|
|
1998
|
+
export interface QeAcceptanceCheck {
|
|
1999
|
+
satisfied: boolean;
|
|
2000
|
+
/** The gate's own words (`GET /runs/:id/acceptance` → `gate.reason`). */
|
|
2001
|
+
reason: string;
|
|
2002
|
+
/** The deciding verdict's id and reviewer, when one was attributed; `null` otherwise. */
|
|
2003
|
+
verdictId: string | null;
|
|
2004
|
+
reviewer: string | null;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* (crew ≥ 0.9.0) What assured a DELIVERY. `receipt` is the run's aggregate: the engine's
|
|
2009
|
+
* `deliverLiftEvaluated.assurance` for an in-run deliver, or — for a post-hoc delivery, which no
|
|
2010
|
+
* engine lift preceded — crew's union of the units' persisted receipts with `tree` set to the
|
|
2011
|
+
* delivered tree. `verified: false` (EX-04) is a post-hoc / recovery delivery: nothing re-verified
|
|
2012
|
+
* the tree it pushed, and `treeBefore` (the run's work as it stood) and `treeAfter` (what was
|
|
2013
|
+
* delivered, after the rebase) say whether the lift moved it. The PR body carries the same label.
|
|
2014
|
+
*/
|
|
2015
|
+
export interface DeliveryAssurance {
|
|
2016
|
+
verified: boolean;
|
|
2017
|
+
via: 'deliver_lift' | 'post_hoc';
|
|
2018
|
+
receipt: AssuranceReceipt | null;
|
|
2019
|
+
treeBefore: string | null;
|
|
2020
|
+
treeAfter: string | null;
|
|
2021
|
+
/** `null` when the run's contract does not require `qe_acceptance`. */
|
|
2022
|
+
qeAcceptance: QeAcceptanceCheck | null;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
/**
|
|
2026
|
+
* (crew ≥ 0.9.0, EX-03) The 409 body of a delivery the QE acceptance requirement refused: an
|
|
2027
|
+
* APPROVE of the deliver gate (`POST /runs/:id/gate`, or a gated `POST /runs/:id/resume`) or a
|
|
2028
|
+
* post-hoc `POST /runs/:id/deliver`. Nothing was pushed; a deliver gate stays open. Record an
|
|
2029
|
+
* attributed PASS (garden's qe `accept`), then approve again.
|
|
2030
|
+
*/
|
|
2031
|
+
export interface QeAcceptanceRefusal {
|
|
2032
|
+
code: 'qe_acceptance_required';
|
|
2033
|
+
error: string;
|
|
2034
|
+
acceptance: QeAcceptanceCheck;
|
|
2035
|
+
assurance: AssuranceReceipt | null;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* (crew ≥ 0.9.0, EX-01/EX-02) `LaunchRunResponse.assuranceNotice`: the run launched under FULL
|
|
2040
|
+
* assurance on a roster whose WORK seats (not benched, not ballot-only) all invoke ONE CLI binary
|
|
2041
|
+
* (the engine's judge identity), so no other seat can evaluate its work and no other identity can
|
|
2042
|
+
* judge it. If the run reviews or changes code, the engine refuses the review on its builder's seat
|
|
2043
|
+
* (`dead_seat` gate) or holds a gate that needs a judge (`judge_unavailable`), and the run waits.
|
|
2044
|
+
* The ways forward are explicit: sign a second CLI in, or relaunch with `retryWith` merged into the
|
|
2045
|
+
* launch body (the creator's seat then evaluates its own work, disclosed on every receipt). A client
|
|
2046
|
+
* shows `message` and asks its operator; crew never applies the opt-in by itself.
|
|
2047
|
+
*/
|
|
2048
|
+
export interface LaunchAssuranceNotice {
|
|
2049
|
+
code: 'single_cli_roster';
|
|
2050
|
+
message: string;
|
|
2051
|
+
/** The work seats, all one CLI identity. */
|
|
2052
|
+
seats: string[];
|
|
2053
|
+
retryWith: { retryOf: string; reducedAssurance: true };
|
|
2054
|
+
}
|
|
2055
|
+
|
|
1856
2056
|
/** §3 B1 — the gate's decision depth, emitted alongside `gateDecided`. `denial` is the structured
|
|
1857
2057
|
* twin of `denialReason`: `null` when the gate approved, else the winning layer (deny-dominates) —
|
|
1858
2058
|
* `worktree_guard` and `repo_checks` are the two wicked-core F-036/F-039 layers. `judgeCli` /
|
|
@@ -1914,6 +2114,9 @@ export interface GateEvaluatedEvent {
|
|
|
1914
2114
|
* parsed", never as PASS.
|
|
1915
2115
|
*/
|
|
1916
2116
|
evaluatorVerdict?: string | null;
|
|
2117
|
+
/** (api-types 0.102.0; wicked-core#850, core-ts ≥ 0.7.46) What assured this gate — persisted on
|
|
2118
|
+
* the unit as `WorkUnit.assurance`. ABSENT on an older engine. */
|
|
2119
|
+
assurance?: AssuranceReceipt;
|
|
1917
2120
|
}
|
|
1918
2121
|
|
|
1919
2122
|
/** Foundation wave: session started with enriched context. */
|
|
@@ -1925,6 +2128,9 @@ export interface SessionStartedEvent {
|
|
|
1925
2128
|
cli_count: number;
|
|
1926
2129
|
governed: boolean;
|
|
1927
2130
|
entity_mode: 'shared' | 'isolated';
|
|
2131
|
+
/** (api-types 0.102.0; wicked-core#850, core-ts ≥ 0.7.46) The run's assurance contract. ABSENT
|
|
2132
|
+
* on an older engine. */
|
|
2133
|
+
assurance?: RunAssurance;
|
|
1928
2134
|
}
|
|
1929
2135
|
|
|
1930
2136
|
// ── P1 observability events ─────────────────────────────────────────────────
|
|
@@ -2100,7 +2306,10 @@ export interface GateEscalatedEvent {
|
|
|
2100
2306
|
* The raw denial LAYER token (`gateEvaluated.denial.source`): `worktree_guard` ·
|
|
2101
2307
|
* `input_governance` · `dead_seat` · `repo_checks` · `repo_checks_timeout` · `pinned_validator`
|
|
2102
2308
|
* · `substance` · `deliverables` · `agent_validator` · `worker_failure` · `evaluator_verdict`
|
|
2103
|
-
* (0.7.27) · `governance
|
|
2309
|
+
* (0.7.27) · `governance` · `same_seat_evaluator` (a `dead_seat` condition: the review ran on its
|
|
2310
|
+
* builder's seat — core-ts 0.7.46, EX-01) · `evaluator_error` · `judge_unavailable` (a
|
|
2311
|
+
* `judge_unavailable` condition; since core-ts 0.7.46 also a required judge with no distinct
|
|
2312
|
+
* seat — EX-02). `""` (EMPTY) = a hook veto whose source identity was folded away
|
|
2104
2313
|
* (`actor.rs` `boundary_deny` arm with no structured denial) — a reader keys copy on
|
|
2105
2314
|
* `(condition, denialSource)` and treats `""` beside `boundary_deny` as input governance.
|
|
2106
2315
|
*/
|
|
@@ -2477,6 +2686,9 @@ export type DeliverLiftEvaluatedEvent = {
|
|
|
2477
2686
|
conflicts: string[];
|
|
2478
2687
|
/** Why the lift was skipped / failed, or a disclosed degradation (a failed fetch); `null` otherwise. */
|
|
2479
2688
|
note: string | null;
|
|
2689
|
+
/** (api-types 0.102.0; wicked-core#850, core-ts ≥ 0.7.46) Every gate of the run aggregated,
|
|
2690
|
+
* stamped with the delivered tree and the attempt. ABSENT on an older engine. */
|
|
2691
|
+
assurance?: AssuranceReceipt;
|
|
2480
2692
|
};
|
|
2481
2693
|
|
|
2482
2694
|
/** wicked-core#431 / F-3R2-009 — an `executes_code: false` phase (an evaluator, a recon rung, a
|
|
@@ -4288,6 +4500,17 @@ export interface LaunchRunBody {
|
|
|
4288
4500
|
* `excluded: true`. Send only when `GET /health.capabilities.linkedIssuesExclude === true`.
|
|
4289
4501
|
*/
|
|
4290
4502
|
excludeLinkedIssues?: string[];
|
|
4503
|
+
/**
|
|
4504
|
+
* (crew ≥ 0.9.0; wicked-core#850 EX-01/EX-02) The EXPLICIT opt-in to reduced assurance: the
|
|
4505
|
+
* creator's seat may evaluate its own work and a pinned gate may pass with its judge skipped for
|
|
4506
|
+
* want of a distinct seat — both disclosed on every receipt (`AgentSession.assurance.mode:
|
|
4507
|
+
* 'reduced'`). Omitted or `false` (the same): full assurance — a run that would grade on its
|
|
4508
|
+
* creator's seat parks at the engine's `dead_seat` gate, a gate whose judge had no distinct seat
|
|
4509
|
+
* holds (`judge_unavailable`), and a one-CLI launch is answered with
|
|
4510
|
+
* `LaunchRunResponse.assuranceNotice`. It never waives `qe_acceptance`. A client must ask its
|
|
4511
|
+
* operator before sending `true`; send it only when `GET /health.capabilities.reducedAssurance === true`.
|
|
4512
|
+
*/
|
|
4513
|
+
reducedAssurance?: boolean;
|
|
4291
4514
|
}
|
|
4292
4515
|
|
|
4293
4516
|
/** `POST /linked-issues/preview` (crew#825): what a workflow launch of `problem` WOULD append. */
|
|
@@ -4344,6 +4567,9 @@ export interface LaunchRunResponse {
|
|
|
4344
4567
|
* same `skills.installed-ahead` finding `GET /diagnostics.skills.findings` carries.
|
|
4345
4568
|
*/
|
|
4346
4569
|
skillsWarning?: { kind: 'skills.installed-ahead'; severity: 'warning'; message: string };
|
|
4570
|
+
/** (crew ≥ 0.9.0; wicked-core#850) PRESENT when a full-assurance launch's usable seats are all one
|
|
4571
|
+
* CLI: the run will wait at a gate for a distinct seat. ABSENT otherwise. */
|
|
4572
|
+
assuranceNotice?: LaunchAssuranceNotice;
|
|
4347
4573
|
}
|
|
4348
4574
|
|
|
4349
4575
|
/**
|
|
@@ -4378,6 +4604,9 @@ export interface SetGuidanceResult {
|
|
|
4378
4604
|
*/
|
|
4379
4605
|
export interface DeliverRunResult {
|
|
4380
4606
|
prUrl: string;
|
|
4607
|
+
/** (crew ≥ 0.9.0, EX-04) Always `verified: false, via: 'post_hoc'` here: nothing re-verified the
|
|
4608
|
+
* delivered tree. ABSENT on an idempotent replay of a delivery recorded before crew 0.9.0. */
|
|
4609
|
+
assurance?: DeliveryAssurance;
|
|
4381
4610
|
}
|
|
4382
4611
|
|
|
4383
4612
|
/**
|
|
@@ -5613,8 +5842,21 @@ export interface ChatScopeRepo {
|
|
|
5613
5842
|
name: string;
|
|
5614
5843
|
/** The registered root path — the read root the seats are pointed at. */
|
|
5615
5844
|
rootPath: string;
|
|
5845
|
+
/**
|
|
5846
|
+
* (crew#899) What opening the chat found for this checkout against its upstream: `current`,
|
|
5847
|
+
* `refreshed` (fast-forwarded `commits` to `upstream`, because the tree was clean and had no
|
|
5848
|
+
* commits of its own), or `stale` (`behind` commits, NOT refreshed, `reason` says why; the seats
|
|
5849
|
+
* are told). ABSENT when the root is not a checkout with an upstream, and on an older daemon.
|
|
5850
|
+
*/
|
|
5851
|
+
freshness?: ChatCheckoutFreshness;
|
|
5616
5852
|
}
|
|
5617
5853
|
|
|
5854
|
+
/** {@link ChatScopeRepo.freshness} (crew#899). */
|
|
5855
|
+
export type ChatCheckoutFreshness =
|
|
5856
|
+
| { state: 'current'; upstream: string }
|
|
5857
|
+
| { state: 'refreshed'; upstream: string; commits: number }
|
|
5858
|
+
| { state: 'stale'; upstream: string; behind: number; reason: string };
|
|
5859
|
+
|
|
5618
5860
|
/**
|
|
5619
5861
|
* What a chat's seats can see — decided at `POST /chats`, stated to the seats in their scratch
|
|
5620
5862
|
* root's `AGENTS.md` / `CLAUDE.md`, and returned to the caller so the UI can show it. Additive:
|
|
@@ -7135,11 +7377,15 @@ export interface CaptureImageFile {
|
|
|
7135
7377
|
export interface CaptureBody {
|
|
7136
7378
|
notes?: string;
|
|
7137
7379
|
files?: Array<CaptureTextFile | CaptureImageFile>;
|
|
7380
|
+
/** (crew ≥ 0.9.0) The explicit reduced-assurance opt-in, as `LaunchRunBody.reducedAssurance`. */
|
|
7381
|
+
reducedAssurance?: boolean;
|
|
7138
7382
|
}
|
|
7139
7383
|
|
|
7140
7384
|
/** `POST /projects/:id/capture` → 201. */
|
|
7141
7385
|
export interface CaptureResponse {
|
|
7142
7386
|
runId: string;
|
|
7387
|
+
/** (crew ≥ 0.9.0) The launch's {@link LaunchAssuranceNotice}, when it answered one. */
|
|
7388
|
+
assuranceNotice?: LaunchAssuranceNotice;
|
|
7143
7389
|
}
|
|
7144
7390
|
|
|
7145
7391
|
// ── The Demo experience (wicked-studio#373, api-types 0.61.0) ────────────────────────────────
|
|
@@ -7157,11 +7403,15 @@ export interface DemoLaunchBody {
|
|
|
7157
7403
|
show: string;
|
|
7158
7404
|
/** The roster to seat the team from, as `POST /runs` takes it. Omit for the daemon's roster. */
|
|
7159
7405
|
clisJson?: string;
|
|
7406
|
+
/** (crew ≥ 0.9.0) The explicit reduced-assurance opt-in, as `LaunchRunBody.reducedAssurance`. */
|
|
7407
|
+
reducedAssurance?: boolean;
|
|
7160
7408
|
}
|
|
7161
7409
|
|
|
7162
7410
|
/** `POST /projects/:id/demo` → 201. */
|
|
7163
7411
|
export interface DemoLaunchResponse {
|
|
7164
7412
|
runId: string;
|
|
7413
|
+
/** (crew ≥ 0.9.0) The launch's {@link LaunchAssuranceNotice}, when it answered one. */
|
|
7414
|
+
assuranceNotice?: LaunchAssuranceNotice;
|
|
7165
7415
|
}
|
|
7166
7416
|
|
|
7167
7417
|
/** `PUT /runs/:id/demo/script` body: the presenter's edit of `script.md` (plan gate only; ≤ 256 KB). */
|
|
@@ -9685,3 +9935,117 @@ export interface EditorGrantsResponse {
|
|
|
9685
9935
|
firstParty: boolean;
|
|
9686
9936
|
grants: EditorGrant[];
|
|
9687
9937
|
}
|
|
9938
|
+
|
|
9939
|
+
/** (core#820) One file or directory a consent choice would write, as the install's dry run
|
|
9940
|
+
* resolved it on the daemon host (`awaitingHuman.writeTargets`). */
|
|
9941
|
+
export interface ConsentWriteTarget {
|
|
9942
|
+
path: string;
|
|
9943
|
+
/** What the file is ("claude MCP config"). */
|
|
9944
|
+
what: string;
|
|
9945
|
+
/** The CLI it configures, when it is a CLI's file. */
|
|
9946
|
+
cli?: string;
|
|
9947
|
+
/** The path is the operator's OWN (outside every program-owned root). */
|
|
9948
|
+
operatorOwned: boolean;
|
|
9949
|
+
}
|
|
9950
|
+
|
|
9951
|
+
// ── Project aggregates (crew#371; GET /projects/:id/{requirements,domain,coverage}) ──────────────
|
|
9952
|
+
/** Each `crew.repo` member is one row, never dropped: `ok`, `absent` (nothing generated or indexed
|
|
9953
|
+
* yet), `error`, or `dangling` (a member whose registry record is gone). `reason` says why for
|
|
9954
|
+
* every state but `ok`. */
|
|
9955
|
+
export type ProjectAggregateRowState = 'ok' | 'absent' | 'error' | 'dangling';
|
|
9956
|
+
|
|
9957
|
+
export interface ProjectAggregateRowBase {
|
|
9958
|
+
repo: { id: string; name: string | null };
|
|
9959
|
+
state: ProjectAggregateRowState;
|
|
9960
|
+
reason?: string;
|
|
9961
|
+
}
|
|
9962
|
+
|
|
9963
|
+
export interface ProjectAggregateTotals {
|
|
9964
|
+
repos: number;
|
|
9965
|
+
ok: number;
|
|
9966
|
+
absent: number;
|
|
9967
|
+
errors: number;
|
|
9968
|
+
dangling: number;
|
|
9969
|
+
}
|
|
9970
|
+
|
|
9971
|
+
/** One repo's part of `GET /projects/:id/requirements`. */
|
|
9972
|
+
export interface ProjectRequirementsRow extends ProjectAggregateRowBase {
|
|
9973
|
+
/** Requirements matching the query in this repo (`0` unless `ok`). */
|
|
9974
|
+
total: number;
|
|
9975
|
+
/** This repo's whole corpus (`0` unless `ok`). */
|
|
9976
|
+
corpus: number;
|
|
9977
|
+
orphanedOverrides: number;
|
|
9978
|
+
/** This repo's part of the requested window; `[]` when the window lies in other repos. */
|
|
9979
|
+
items: RequirementSummary[];
|
|
9980
|
+
}
|
|
9981
|
+
|
|
9982
|
+
/**
|
|
9983
|
+
* `GET /projects/:id/requirements?q&risk&category&domain&offset&limit` (crew#371): the same query as
|
|
9984
|
+
* `GET /repos/:id/requirements`, over every repo of the project. `offset`/`limit` (max 200) page a
|
|
9985
|
+
* GLOBAL window over the repos in membership order; each row's `total` says how many of its
|
|
9986
|
+
* requirements match. The synthesized `default` project has no members (empty rows).
|
|
9987
|
+
*/
|
|
9988
|
+
export interface ProjectRequirementsResponse {
|
|
9989
|
+
projectId: string;
|
|
9990
|
+
totals: ProjectAggregateTotals & { total: number; corpus: number };
|
|
9991
|
+
offset: number;
|
|
9992
|
+
limit: number;
|
|
9993
|
+
rows: ProjectRequirementsRow[];
|
|
9994
|
+
}
|
|
9995
|
+
|
|
9996
|
+
/** One domain of a repo's `requirements_graph.json`, summarised. */
|
|
9997
|
+
export interface ProjectDomainSummary {
|
|
9998
|
+
name: string;
|
|
9999
|
+
description: string | null;
|
|
10000
|
+
requirements: number;
|
|
10001
|
+
entities: number;
|
|
10002
|
+
}
|
|
10003
|
+
|
|
10004
|
+
export interface ProjectDomainRow extends ProjectAggregateRowBase {
|
|
10005
|
+
domains: ProjectDomainSummary[];
|
|
10006
|
+
}
|
|
10007
|
+
|
|
10008
|
+
/** `GET /projects/:id/domain` (crew#371): per-repo domain summaries and the merged domain list.
|
|
10009
|
+
* Full graphs stay on `GET /repos/:id/domain-graph`; coverage is `GET /projects/:id/coverage`. */
|
|
10010
|
+
export interface ProjectDomainResponse {
|
|
10011
|
+
projectId: string;
|
|
10012
|
+
totals: ProjectAggregateTotals & { domains: number; requirements: number; entities: number };
|
|
10013
|
+
merged: Array<{ name: string; repoIds: string[]; requirements: number; entities: number }>;
|
|
10014
|
+
rows: ProjectDomainRow[];
|
|
10015
|
+
}
|
|
10016
|
+
|
|
10017
|
+
export interface ProjectCoverageRow extends ProjectAggregateRowBase {
|
|
10018
|
+
/** The repo's report WITHOUT `unaccounted_nodes` (their count is `unaccounted`; the list is on
|
|
10019
|
+
* `GET /governance/coverage?repo=`). `null` unless `ok`. */
|
|
10020
|
+
report: Omit<CoverageReport, 'unaccounted_nodes'> | null;
|
|
10021
|
+
}
|
|
10022
|
+
|
|
10023
|
+
/** `GET /projects/:id/coverage` (crew#371): each repo's own coverage report; `totals.coverage` is
|
|
10024
|
+
* sum(resolved) / sum(behavior_bearing) over the `ok` rows, `null` when that is 0/0. */
|
|
10025
|
+
export interface ProjectCoverageResponse {
|
|
10026
|
+
projectId: string;
|
|
10027
|
+
totals: ProjectAggregateTotals & { behavior_bearing: number; resolved: number; coverage: number | null };
|
|
10028
|
+
rows: ProjectCoverageRow[];
|
|
10029
|
+
}
|
|
10030
|
+
|
|
10031
|
+
// ── Product compose (crew#372; POST /projects/:id/product/compose) ──────────────────────────────
|
|
10032
|
+
/**
|
|
10033
|
+
* Draft epics → features → stories from selected requirements of the project (at most 40). The
|
|
10034
|
+
* daemon re-reads each one from its repo's artifact (an unknown or foreign ref is a 400 naming it,
|
|
10035
|
+
* nothing launched) and launches a governed run through `POST /runs`: a `produce` draft step, then
|
|
10036
|
+
* a `review` evaluator with a human gate; `deliver: "none"`. The draft ends with one fenced JSON
|
|
10037
|
+
* plan `{epics:[{title, features:[{title, requirementRefs:[{repoId,key}], stories:[{title,
|
|
10038
|
+
* acceptance:[…]}]}]}]}`. `POST /runs`' own refusals are relayed with their status.
|
|
10039
|
+
*/
|
|
10040
|
+
export interface ProductComposeBody {
|
|
10041
|
+
requirements: Array<{ repoId: string; key: string }>;
|
|
10042
|
+
/** The operator's steer for the draft (≤ 500 chars). */
|
|
10043
|
+
instructions?: string;
|
|
10044
|
+
}
|
|
10045
|
+
|
|
10046
|
+
/** `POST /projects/:id/product/compose` 202. */
|
|
10047
|
+
export interface ProductComposeResponse {
|
|
10048
|
+
runId: string;
|
|
10049
|
+
/** How many requirements the draft was handed. */
|
|
10050
|
+
requirements: number;
|
|
10051
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-crew-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"description": "The wire contract of the wicked-crew daemon's /api/v1 REST surface and /ws CoreEvent frames \u2014 types only, zero runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|