wicked-crew-api-types 0.73.0 → 0.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +178 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -237,6 +237,13 @@ export interface HealthCapabilities {
237
237
  * as `false`: group such a daemon's runs one session per run.
238
238
  */
239
239
  runChatId?: boolean;
240
+ /**
241
+ * Repo-bound runs get an EVIDENCE ROOT for walkthroughs (WT-W1, api-types 0.74.0): the engine
242
+ * addon takes `LaunchOptions.evidenceRoot` (wicked-core-ts ≥ 0.7.35), so a walkthrough step on a
243
+ * run launched now can record and pass. `GET /runs/:id/walkthrough` answers on every daemon that
244
+ * has the field. ABSENT or `false` — a walkthrough step on this daemon's runs fails closed.
245
+ */
246
+ walkthroughRoots?: boolean;
240
247
  }
241
248
 
242
249
  /** One `GET /health.warnings[]` entry (additive; wicked-core#411 / wicked-crew#497). */
@@ -350,6 +357,13 @@ export interface AgentSession {
350
357
  * plus `denial_reason` (crew#318's message), both already on the list wire.
351
358
  */
352
359
  delivery?: 'delivered' | 'pushed' | 'stranded' | 'vacuous' | 'none';
360
+ /**
361
+ * (crew#755; api-types 0.76.0) `'text_only'` on a COMPLETED free-text run (launched with neither a
362
+ * workflow nor a plan) that had no repo and no write root of its own: whatever it did, it did in
363
+ * text — nothing was changed, checked or delivered. Show it as such, never as plain completed
364
+ * work. ABSENT on every other run (and on a daemon before the field).
365
+ */
366
+ outcome?: 'text_only';
353
367
  /**
354
368
  * The delivered PR's URL (crew#393; api-types 0.18.0) — present exactly when
355
369
  * `delivery === 'delivered'`; absent otherwise (absence is the one spelling, never `null`).
@@ -521,6 +535,14 @@ export interface AgentSession {
521
535
  * workflow ids.
522
536
  */
523
537
  run_identity?: RunIdentity;
538
+ /**
539
+ * The run's EVIDENCE ROOT (WT-W1, DES-walkthrough-proof §4.2; api-types 0.74.0), minted by the
540
+ * daemon for every repo-bound run on an engine that takes it: `<root>/author/<plan step>/` is
541
+ * the walkthrough author's write dir, `<root>/<review step>/` the proof root only the jailed
542
+ * `walkthrough_review` Tool writes. Read the walkthrough through `GET /runs/:id/walkthrough`, not
543
+ * from this path. ABSENT on a repo-less run, on an engine before the field, and on older runs.
544
+ */
545
+ evidence_root?: string;
524
546
  }
525
547
 
526
548
  /**
@@ -2557,7 +2579,13 @@ export interface ConformanceRule {
2557
2579
  statement: string;
2558
2580
  severity: 'info' | 'warn' | 'error' | 'critical';
2559
2581
  confidence: number;
2560
- targets: { language?: string; layer?: string; framework?: string };
2582
+ /**
2583
+ * Facets. `language` / `layer` / `framework` are wildcards (absent = every value). `project`
2584
+ * (api-types 0.77.0, DC-S3; engine >= wicked-core-ts 0.7.35) is ASYMMETRIC: a rule with no project
2585
+ * applies everywhere; a rule with one is recalled only for that project. A landed policy proposal
2586
+ * keeps its `project` facet here.
2587
+ */
2588
+ targets: { language?: string; layer?: string; framework?: string; project?: string };
2561
2589
  symbol_ref?: string;
2562
2590
  compliance?: { framework: string; control_id: string };
2563
2591
  /** Where the rule came from. Doc-ingested rules keep `path@sha#id` in `ref`; UI/chat-authored
@@ -2601,6 +2629,8 @@ export interface ConformanceRule {
2601
2629
  * pre-bump binding), so a `since`/`until` filter cannot assert an undated rule in range.
2602
2630
  */
2603
2631
  created_at?: number;
2632
+ /** (api-types 0.77.0, DC-S1/DC-S3) The rule ids this rule replaces. Absent when it replaces none. */
2633
+ supersedes?: string[];
2604
2634
  }
2605
2635
 
2606
2636
  /** Facet query for `GET /governance/rules/preview`. All fields are optional. */
@@ -3946,6 +3976,12 @@ export interface LinkedIssue {
3946
3976
  export interface LaunchRunResponse {
3947
3977
  runId: string;
3948
3978
  linkedIssues?: LinkedIssue[];
3979
+ /**
3980
+ * (crew#755; api-types 0.76.0) PRESENT when the launch named neither a `workflow` nor a `plan`:
3981
+ * the run uses the engine's free-text planner (one step, the brief verbatim; no phases, checks or
3982
+ * delivery), and `notice` says so in words a composer can show. ABSENT on every other launch.
3983
+ */
3984
+ freeText?: { notice: string };
3949
3985
  }
3950
3986
 
3951
3987
  /**
@@ -6307,6 +6343,12 @@ export interface PolicyLandingResult {
6307
6343
  ruleId?: string;
6308
6344
  /** The steering type derived from the proposal's `kind_type` (`policy:<type>`). Present on `landed`. */
6309
6345
  steering_type?: SteeringType;
6346
+ /**
6347
+ * (api-types 0.77.0, DC-S3) The project the landed rule is scoped to — the proposal's `project`
6348
+ * facet, kept as `targets.project` and confirmed by reading the rule back. Absent on a landing
6349
+ * with no project (the rule applies everywhere).
6350
+ */
6351
+ project?: string;
6310
6352
  /** Present iff `outcome:"failed"` — the loud reason the rule did not land. */
6311
6353
  error?: string;
6312
6354
  }
@@ -6533,6 +6575,141 @@ export interface DemoExportResponse {
6533
6575
  bytes: number;
6534
6576
  }
6535
6577
 
6578
+ // ── Walkthroughs: the recording view (WT-W1, DES-walkthrough-proof §4.10; api-types 0.74.0) ──────
6579
+
6580
+ /**
6581
+ * Where a walkthrough stands (`WalkthroughView.state`), read from the run's walkthrough pair — the
6582
+ * `walkthrough_plan` unit (the author, an evaluator) and the `walkthrough_review` unit (the jailed
6583
+ * engine-run recorder) — and the recorder's files in the proof root.
6584
+ *
6585
+ * - `authoring` the author has not finished the storyline (also: the run has no walkthrough
6586
+ * step yet — `stepId` is then `null` and `cause` says so);
6587
+ * - `linting` the author's storyline was refused by its pinned lint (the unit was denied;
6588
+ * its escalation gate is open, `cause` is the lint's reason);
6589
+ * - `starting_app`, `recording`, `judging`
6590
+ * the recorder is queued or running: its `progress.json` names the phase;
6591
+ * - `passed`, `failed`, `inconclusive`
6592
+ * the recorder finished: `result.json`'s `overall` (PASS / FAIL / INCONCLUSIVE).
6593
+ * A finished recorder with no readable `result.json` reads `inconclusive` with
6594
+ * `cause: 'no_result'`.
6595
+ */
6596
+ export type WalkthroughState =
6597
+ | 'authoring'
6598
+ | 'linting'
6599
+ | 'starting_app'
6600
+ | 'recording'
6601
+ | 'judging'
6602
+ | 'passed'
6603
+ | 'failed'
6604
+ | 'inconclusive';
6605
+
6606
+ /** One chapter's verdict, as the recorder's judge wrote it (§4.5). */
6607
+ export type WalkthroughVerdict = 'PASS' | 'FAIL' | 'INCONCLUSIVE';
6608
+
6609
+ /** One check of a chapter: what was captured on screen or underneath, and whether its verifier passed. */
6610
+ export interface WalkthroughCheck {
6611
+ id: string;
6612
+ /** `on_screen`, `saved_state`, `events`, `side_effects`, `output`, `must_not_happen`, `cross_check`. */
6613
+ kind: string;
6614
+ /** The plain sentence the check proves. */
6615
+ sentence: string;
6616
+ /** `null` when the check never ran (its `ctx.check` was not reached, or the take was refused). */
6617
+ passed: boolean | null;
6618
+ /** Seconds into the chapter when the check was captured; `null` when it never ran. */
6619
+ atSec: number | null;
6620
+ /** Proof-root-relative paths (for `GET /runs/:id/walkthrough/file`). */
6621
+ evidence: string[];
6622
+ vaultEntry: string | null;
6623
+ detail: string | null;
6624
+ }
6625
+
6626
+ /** A capped leg of a chapter (§4.5 "the honest cap"): e.g. the provider leg ran against a sink. */
6627
+ export interface WalkthroughLeg {
6628
+ leg: string;
6629
+ claim_level: string;
6630
+ reason: string;
6631
+ }
6632
+
6633
+ /** One chapter of a walkthrough: the demo chapter plus its verdict and checks. */
6634
+ export interface WalkthroughChapter extends DemoChapter {
6635
+ /** 1-based position and the chapter count, for "chapter 2 of 5". */
6636
+ index: number;
6637
+ total: number;
6638
+ /** `null` until the judge has written it. */
6639
+ verdict: WalkthroughVerdict | null;
6640
+ /** How many takes the recorder made of this chapter (failed takes are kept, never stitched). */
6641
+ takes: number;
6642
+ /** Seconds into the chapter of the first failing check; `null` unless it failed. */
6643
+ failedAtSec: number | null;
6644
+ /** The failing frame (proof-root-relative), when the recorder kept one. */
6645
+ failedFrame: string | null;
6646
+ /** The plan step ids this chapter proves. */
6647
+ proves: string[];
6648
+ legs: WalkthroughLeg[];
6649
+ checks: WalkthroughCheck[];
6650
+ }
6651
+
6652
+ /**
6653
+ * Per plan step, whether a sealed walkthrough proves it (§4.9). Computed at every read, never stored.
6654
+ * `checked`: every proving chapter of the newest sealed walkthrough passed; `failed`: one failed;
6655
+ * `claimed`: the step passed its own gate and no sealed chapter proves it; `owned_by_you`: the
6656
+ * accepted plan's override removed the walkthrough pair.
6657
+ */
6658
+ export type WalkthroughCheckState = 'checked' | 'failed' | 'claimed' | 'owned_by_you';
6659
+
6660
+ export interface WalkthroughStepState {
6661
+ stepId: string;
6662
+ checkState: WalkthroughCheckState;
6663
+ provedBy: Array<{ chapter: string; atSec: number | null }>;
6664
+ }
6665
+
6666
+ /**
6667
+ * `GET /runs/:id/walkthrough?step=` → 200 for every known run (404 for an unknown run, or a `step`
6668
+ * that names no walkthrough step of it). `step` is the `walkthrough_review` step id (or its author's
6669
+ * `walkthrough_plan` step id); omitted, the NEWEST pair. Studio polls it, as Demo mode polls `DemoView`.
6670
+ */
6671
+ export interface WalkthroughView {
6672
+ runId: string;
6673
+ /** The `walkthrough_review` step id; `null` when the run has no walkthrough step. */
6674
+ stepId: string | null;
6675
+ /** The `walkthrough_plan` step that authored it; `null` when there is none. */
6676
+ planStepId: string | null;
6677
+ state: WalkthroughState;
6678
+ /** Why the state is what it is, when there is something to say (`no_walkthrough`, `no_evidence_root`,
6679
+ * the recorder's own causes such as `unjailed_host`, `fixture_unavailable`, `storyline_refused`). */
6680
+ cause: string | null;
6681
+ /** Evaluator ≠ creator: the seat that wrote the checks, and the seats that built what they check. */
6682
+ seat: { evaluator: string | null; builders: string[] };
6683
+ /** The tree id the recorder recorded (`git archive` of it is what ran). */
6684
+ tree: string | null;
6685
+ /** Always `false`: a later creator step re-inserts the pair after it (§4.8). Kept so an old plan shape reads honestly. */
6686
+ stale: false;
6687
+ /** The take's seal was found in the engine store and every re-check against the files on disk held (WT-W2). */
6688
+ sealed: boolean;
6689
+ /** Proof-root-relative paths of the stitched take; `null` until there is one. */
6690
+ video: { mp4: string | null; poster: string | null; markers: DemoMarker[] };
6691
+ chapters: WalkthroughChapter[];
6692
+ /** Per creator step, the check state from THIS pair's take — computed at every read from its re-verified seal (WT-W2). */
6693
+ steps: WalkthroughStepState[];
6694
+ }
6695
+
6696
+ /**
6697
+ * `GET /runs/:id/acceptance` → `walkthrough` (WT-W2, DES-walkthrough-proof §4.9; api-types 0.75.0):
6698
+ * the walkthrough half of the gate. One row per `walkthrough_review` step the run's requirement names,
6699
+ * each re-verified at this read — the seal (the last `WALKTHROUGH-SEAL` line of the recorder's
6700
+ * engine-captured output), `bundle_sha` recomputed from the proof root, and the proof root's stamped
6701
+ * ledger verdicts against the sealed chapter verdicts. The gate is deny-dominates across the repo
6702
+ * ledger and every row: a missing, mismatched ("changed after it was sealed") or non-PASS seal
6703
+ * denies. ABSENT when the requirement names no walkthrough step.
6704
+ */
6705
+ export interface RunAcceptanceWalkthrough {
6706
+ roots: Array<{ stepId: string; sealed: boolean; satisfied: boolean; reason: string }>;
6707
+ /** Every row's seal held. */
6708
+ sealed: boolean;
6709
+ /** Per creator step, from the NEWEST walkthrough of the run. */
6710
+ steps: WalkthroughStepState[];
6711
+ }
6712
+
6536
6713
  /** `POST /proposals/:id/reject` → 200. */
6537
6714
  export interface RejectProposalResponse {
6538
6715
  ok: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.73.0",
3
+ "version": "0.77.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",