wicked-crew-api-types 0.73.0 → 0.83.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 +402 -3
- 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,24 @@ 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';
|
|
367
|
+
/**
|
|
368
|
+
* (crew#762; api-types 0.79.0) Was delivery ASKED FOR on this run? A durable fact, so a skin can
|
|
369
|
+
* tell a run kept locally as asked from one whose delivery was attempted and did not land, also
|
|
370
|
+
* after a reload or a daemon restart. `stranded` with no deliver unit covers both.
|
|
371
|
+
* - `true`: the launch resolved `deliver: 'pr'`, OR a post-hoc `POST /runs/:id/deliver` was
|
|
372
|
+
* attempted (recorded before the script runs, whatever came of it), OR a delivery is on record.
|
|
373
|
+
* - `false`: the launch resolved `deliver: 'none'` and nothing was attempted since.
|
|
374
|
+
* - ABSENT: this daemon holds no launch record for the run and no attempt (a pre-field run, or a
|
|
375
|
+
* daemon before the field). Never fabricated.
|
|
376
|
+
*/
|
|
377
|
+
deliver_requested?: boolean;
|
|
353
378
|
/**
|
|
354
379
|
* The delivered PR's URL (crew#393; api-types 0.18.0) — present exactly when
|
|
355
380
|
* `delivery === 'delivered'`; absent otherwise (absence is the one spelling, never `null`).
|
|
@@ -521,6 +546,14 @@ export interface AgentSession {
|
|
|
521
546
|
* workflow ids.
|
|
522
547
|
*/
|
|
523
548
|
run_identity?: RunIdentity;
|
|
549
|
+
/**
|
|
550
|
+
* The run's EVIDENCE ROOT (WT-W1, DES-walkthrough-proof §4.2; api-types 0.74.0), minted by the
|
|
551
|
+
* daemon for every repo-bound run on an engine that takes it: `<root>/author/<plan step>/` is
|
|
552
|
+
* the walkthrough author's write dir, `<root>/<review step>/` the proof root only the jailed
|
|
553
|
+
* `walkthrough_review` Tool writes. Read the walkthrough through `GET /runs/:id/walkthrough`, not
|
|
554
|
+
* from this path. ABSENT on a repo-less run, on an engine before the field, and on older runs.
|
|
555
|
+
*/
|
|
556
|
+
evidence_root?: string;
|
|
524
557
|
}
|
|
525
558
|
|
|
526
559
|
/**
|
|
@@ -1142,6 +1175,12 @@ export interface CoreEvent {
|
|
|
1142
1175
|
elicitationId?: string;
|
|
1143
1176
|
/** `elicitationCreated`: an ordered set of valid responses; `null` / absent = free-text. */
|
|
1144
1177
|
options?: string[] | null;
|
|
1178
|
+
/**
|
|
1179
|
+
* `elicitationCreated` (C3; wicked-core-ts >= 0.7.35, api-types 0.83.0): the index into `options`
|
|
1180
|
+
* of the option the PRODUCER of the options recommends (the field's JSON Schema `default`).
|
|
1181
|
+
* ABSENT ⇒ nothing is preselected.
|
|
1182
|
+
*/
|
|
1183
|
+
recommended?: number;
|
|
1145
1184
|
/** PTY terminal frames (`terminalOpened`/`terminalOutput`/`terminalExited`): the terminal id. */
|
|
1146
1185
|
id?: string;
|
|
1147
1186
|
/**
|
|
@@ -2557,7 +2596,13 @@ export interface ConformanceRule {
|
|
|
2557
2596
|
statement: string;
|
|
2558
2597
|
severity: 'info' | 'warn' | 'error' | 'critical';
|
|
2559
2598
|
confidence: number;
|
|
2560
|
-
|
|
2599
|
+
/**
|
|
2600
|
+
* Facets. `language` / `layer` / `framework` are wildcards (absent = every value). `project`
|
|
2601
|
+
* (api-types 0.77.0, DC-S3; engine >= wicked-core-ts 0.7.35) is ASYMMETRIC: a rule with no project
|
|
2602
|
+
* applies everywhere; a rule with one is recalled only for that project. A landed policy proposal
|
|
2603
|
+
* keeps its `project` facet here.
|
|
2604
|
+
*/
|
|
2605
|
+
targets: { language?: string; layer?: string; framework?: string; project?: string };
|
|
2561
2606
|
symbol_ref?: string;
|
|
2562
2607
|
compliance?: { framework: string; control_id: string };
|
|
2563
2608
|
/** Where the rule came from. Doc-ingested rules keep `path@sha#id` in `ref`; UI/chat-authored
|
|
@@ -2601,6 +2646,8 @@ export interface ConformanceRule {
|
|
|
2601
2646
|
* pre-bump binding), so a `since`/`until` filter cannot assert an undated rule in range.
|
|
2602
2647
|
*/
|
|
2603
2648
|
created_at?: number;
|
|
2649
|
+
/** (api-types 0.77.0, DC-S1/DC-S3) The rule ids this rule replaces. Absent when it replaces none. */
|
|
2650
|
+
supersedes?: string[];
|
|
2604
2651
|
}
|
|
2605
2652
|
|
|
2606
2653
|
/** Facet query for `GET /governance/rules/preview`. All fields are optional. */
|
|
@@ -3946,6 +3993,12 @@ export interface LinkedIssue {
|
|
|
3946
3993
|
export interface LaunchRunResponse {
|
|
3947
3994
|
runId: string;
|
|
3948
3995
|
linkedIssues?: LinkedIssue[];
|
|
3996
|
+
/**
|
|
3997
|
+
* (crew#755; api-types 0.76.0) PRESENT when the launch named neither a `workflow` nor a `plan`:
|
|
3998
|
+
* the run uses the engine's free-text planner (one step, the brief verbatim; no phases, checks or
|
|
3999
|
+
* delivery), and `notice` says so in words a composer can show. ABSENT on every other launch.
|
|
4000
|
+
*/
|
|
4001
|
+
freeText?: { notice: string };
|
|
3949
4002
|
}
|
|
3950
4003
|
|
|
3951
4004
|
/**
|
|
@@ -4465,6 +4518,13 @@ export interface ElicitationInfo {
|
|
|
4465
4518
|
message: string;
|
|
4466
4519
|
/** Ordered set of valid responses; `null` means free-text. */
|
|
4467
4520
|
options: string[] | null;
|
|
4521
|
+
/**
|
|
4522
|
+
* (C3, api-types 0.83.0) The index into `options` the producer of the options recommends —
|
|
4523
|
+
* relayed from the engine's `elicitationCreated.recommended`, kept only when it names one of
|
|
4524
|
+
* `options`. ABSENT ⇒ nothing is preselected (and a skin's Enter stays inert until a choice has
|
|
4525
|
+
* focus, DESIGN-interaction rule 6).
|
|
4526
|
+
*/
|
|
4527
|
+
recommended?: number;
|
|
4468
4528
|
receivedAt: string;
|
|
4469
4529
|
}
|
|
4470
4530
|
|
|
@@ -6043,7 +6103,12 @@ export interface DiagnosticsSkillsFinding {
|
|
|
6043
6103
|
* an `error` under `'require'` (the engine refuses every launch at intake); cleared by a publish
|
|
6044
6104
|
* that hands it. Also carried as `DiagnosticsSkills.baseSkill.finding`; `skills.phase-skill`
|
|
6045
6105
|
* (`warning`, crew#661) = a subsystem's phases declare a skill the published snapshot did not hold
|
|
6046
|
-
* when it armed, so they run without it — one per `DiagnosticsSkills.phaseSkillGaps` entry
|
|
6106
|
+
* when it armed, so they run without it — one per `DiagnosticsSkills.phaseSkillGaps` entry;
|
|
6107
|
+
* `skills.garden` (`error`, api-types 0.78.0, crew#753) = the installed wicked-garden is older
|
|
6108
|
+
* than the daemon requires (`GardenRequiredBody.required`), so it is not used: found at seed,
|
|
6109
|
+
* the runtime is `config-error` and the engine is handed a refusal path. Rides
|
|
6110
|
+
* `/health.warnings` too; launches and onboarding answer 422
|
|
6111
|
+
* `garden_required` until a newer garden is installed and published. */
|
|
6047
6112
|
kind:
|
|
6048
6113
|
| 'skills.fallback'
|
|
6049
6114
|
| 'skills.blocked'
|
|
@@ -6052,11 +6117,25 @@ export interface DiagnosticsSkillsFinding {
|
|
|
6052
6117
|
| 'skills.manifest'
|
|
6053
6118
|
| 'skills.stale-rules'
|
|
6054
6119
|
| 'skills.base-skill'
|
|
6055
|
-
| 'skills.phase-skill'
|
|
6120
|
+
| 'skills.phase-skill'
|
|
6121
|
+
| 'skills.garden';
|
|
6056
6122
|
severity: 'warning' | 'error';
|
|
6057
6123
|
message: string;
|
|
6058
6124
|
}
|
|
6059
6125
|
|
|
6126
|
+
/**
|
|
6127
|
+
* The 422 `POST /runs`, `POST /repos` and `POST /repos/:id/onboard` answer while the installed
|
|
6128
|
+
* wicked-garden is older than the daemon requires (api-types 0.78.0, crew#753). `error` names the
|
|
6129
|
+
* version found, where, the version required and the install command. Nothing was launched or
|
|
6130
|
+
* registered. A daemon with NO garden answers the base skill's 422 `base_skill_refused` instead.
|
|
6131
|
+
*/
|
|
6132
|
+
export interface GardenRequiredBody {
|
|
6133
|
+
code: 'garden_required';
|
|
6134
|
+
error: string;
|
|
6135
|
+
/** The minimum wicked-garden version, e.g. `"12.40.0"`. */
|
|
6136
|
+
required: string;
|
|
6137
|
+
}
|
|
6138
|
+
|
|
6060
6139
|
/**
|
|
6061
6140
|
* `GET /diagnostics` → `skills`: whether the engine is being handed a verified snapshot, and if not,
|
|
6062
6141
|
* why — the one read-only answer to "why do launches refuse the skills snapshot". `disabled` is a
|
|
@@ -6307,6 +6386,12 @@ export interface PolicyLandingResult {
|
|
|
6307
6386
|
ruleId?: string;
|
|
6308
6387
|
/** The steering type derived from the proposal's `kind_type` (`policy:<type>`). Present on `landed`. */
|
|
6309
6388
|
steering_type?: SteeringType;
|
|
6389
|
+
/**
|
|
6390
|
+
* (api-types 0.77.0, DC-S3) The project the landed rule is scoped to — the proposal's `project`
|
|
6391
|
+
* facet, kept as `targets.project` and confirmed by reading the rule back. Absent on a landing
|
|
6392
|
+
* with no project (the rule applies everywhere).
|
|
6393
|
+
*/
|
|
6394
|
+
project?: string;
|
|
6310
6395
|
/** Present iff `outcome:"failed"` — the loud reason the rule did not land. */
|
|
6311
6396
|
error?: string;
|
|
6312
6397
|
}
|
|
@@ -6533,6 +6618,185 @@ export interface DemoExportResponse {
|
|
|
6533
6618
|
bytes: number;
|
|
6534
6619
|
}
|
|
6535
6620
|
|
|
6621
|
+
// ── Walkthroughs: the recording view (WT-W1, DES-walkthrough-proof §4.10; api-types 0.74.0) ──────
|
|
6622
|
+
|
|
6623
|
+
/**
|
|
6624
|
+
* Where a walkthrough stands (`WalkthroughView.state`), read from the run's walkthrough pair — the
|
|
6625
|
+
* `walkthrough_plan` unit (the author, an evaluator) and the `walkthrough_review` unit (the jailed
|
|
6626
|
+
* engine-run recorder) — and the recorder's files in the proof root.
|
|
6627
|
+
*
|
|
6628
|
+
* - `authoring` the author has not finished the storyline (also: the run has no walkthrough
|
|
6629
|
+
* step yet — `stepId` is then `null` and `cause` says so);
|
|
6630
|
+
* - `linting` the author's storyline was refused by its pinned lint (the unit was denied;
|
|
6631
|
+
* its escalation gate is open, `cause` is the lint's reason);
|
|
6632
|
+
* - `starting_app`, `recording`, `judging`
|
|
6633
|
+
* the recorder is queued or running: its `progress.json` names the phase;
|
|
6634
|
+
* - `passed`, `failed`, `inconclusive`
|
|
6635
|
+
* the recorder finished: `result.json`'s `overall` (PASS / FAIL / INCONCLUSIVE).
|
|
6636
|
+
* A finished recorder with no readable `result.json` reads `inconclusive` with
|
|
6637
|
+
* `cause: 'no_result'`.
|
|
6638
|
+
*/
|
|
6639
|
+
export type WalkthroughState =
|
|
6640
|
+
| 'authoring'
|
|
6641
|
+
| 'linting'
|
|
6642
|
+
| 'starting_app'
|
|
6643
|
+
| 'recording'
|
|
6644
|
+
| 'judging'
|
|
6645
|
+
| 'passed'
|
|
6646
|
+
| 'failed'
|
|
6647
|
+
| 'inconclusive';
|
|
6648
|
+
|
|
6649
|
+
/** One chapter's verdict, as the recorder's judge wrote it (§4.5). */
|
|
6650
|
+
export type WalkthroughVerdict = 'PASS' | 'FAIL' | 'INCONCLUSIVE';
|
|
6651
|
+
|
|
6652
|
+
/** One check of a chapter: what was captured on screen or underneath, and whether its verifier passed. */
|
|
6653
|
+
export interface WalkthroughCheck {
|
|
6654
|
+
id: string;
|
|
6655
|
+
/** `on_screen`, `saved_state`, `events`, `side_effects`, `output`, `must_not_happen`, `cross_check`. */
|
|
6656
|
+
kind: string;
|
|
6657
|
+
/** The plain sentence the check proves. */
|
|
6658
|
+
sentence: string;
|
|
6659
|
+
/** `null` when the check never ran (its `ctx.check` was not reached, or the take was refused). */
|
|
6660
|
+
passed: boolean | null;
|
|
6661
|
+
/** Seconds into the chapter when the check was captured; `null` when it never ran. */
|
|
6662
|
+
atSec: number | null;
|
|
6663
|
+
/** Proof-root-relative paths (for `GET /runs/:id/walkthrough/file`). */
|
|
6664
|
+
evidence: string[];
|
|
6665
|
+
vaultEntry: string | null;
|
|
6666
|
+
detail: string | null;
|
|
6667
|
+
}
|
|
6668
|
+
|
|
6669
|
+
/** A capped leg of a chapter (§4.5 "the honest cap"): e.g. the provider leg ran against a sink. */
|
|
6670
|
+
export interface WalkthroughLeg {
|
|
6671
|
+
leg: string;
|
|
6672
|
+
claim_level: string;
|
|
6673
|
+
reason: string;
|
|
6674
|
+
}
|
|
6675
|
+
|
|
6676
|
+
/** One chapter of a walkthrough: the demo chapter plus its verdict and checks. */
|
|
6677
|
+
export interface WalkthroughChapter extends DemoChapter {
|
|
6678
|
+
/** 1-based position and the chapter count, for "chapter 2 of 5". */
|
|
6679
|
+
index: number;
|
|
6680
|
+
total: number;
|
|
6681
|
+
/** `null` until the judge has written it. */
|
|
6682
|
+
verdict: WalkthroughVerdict | null;
|
|
6683
|
+
/** How many takes the recorder made of this chapter (failed takes are kept, never stitched). */
|
|
6684
|
+
takes: number;
|
|
6685
|
+
/** Seconds into the chapter of the first failing check; `null` unless it failed. */
|
|
6686
|
+
failedAtSec: number | null;
|
|
6687
|
+
/** The failing frame (proof-root-relative), when the recorder kept one. */
|
|
6688
|
+
failedFrame: string | null;
|
|
6689
|
+
/** The plan step ids this chapter proves. */
|
|
6690
|
+
proves: string[];
|
|
6691
|
+
legs: WalkthroughLeg[];
|
|
6692
|
+
checks: WalkthroughCheck[];
|
|
6693
|
+
}
|
|
6694
|
+
|
|
6695
|
+
/**
|
|
6696
|
+
* Per plan step, whether a sealed walkthrough proves it (§4.9). Computed at every read, never stored.
|
|
6697
|
+
* `checked`: every proving chapter of the newest sealed walkthrough passed; `failed`: one failed;
|
|
6698
|
+
* `claimed`: the step passed its own gate and no sealed chapter proves it; `owned_by_you`: the
|
|
6699
|
+
* accepted plan's override removed the walkthrough pair.
|
|
6700
|
+
*/
|
|
6701
|
+
export type WalkthroughCheckState = 'checked' | 'failed' | 'claimed' | 'owned_by_you';
|
|
6702
|
+
|
|
6703
|
+
export interface WalkthroughStepState {
|
|
6704
|
+
stepId: string;
|
|
6705
|
+
checkState: WalkthroughCheckState;
|
|
6706
|
+
provedBy: Array<{ chapter: string; atSec: number | null }>;
|
|
6707
|
+
}
|
|
6708
|
+
|
|
6709
|
+
/**
|
|
6710
|
+
* `GET /runs/:id/walkthrough?step=` → 200 for every known run (404 for an unknown run, or a `step`
|
|
6711
|
+
* that names no walkthrough step of it). `step` is the `walkthrough_review` step id (or its author's
|
|
6712
|
+
* `walkthrough_plan` step id); omitted, the NEWEST pair. Studio polls it, as Demo mode polls `DemoView`.
|
|
6713
|
+
*/
|
|
6714
|
+
export interface WalkthroughView {
|
|
6715
|
+
runId: string;
|
|
6716
|
+
/** The `walkthrough_review` step id; `null` when the run has no walkthrough step. */
|
|
6717
|
+
stepId: string | null;
|
|
6718
|
+
/** The `walkthrough_plan` step that authored it; `null` when there is none. */
|
|
6719
|
+
planStepId: string | null;
|
|
6720
|
+
state: WalkthroughState;
|
|
6721
|
+
/** Why the state is what it is, when there is something to say (`no_walkthrough`, `no_evidence_root`,
|
|
6722
|
+
* the recorder's own causes such as `unjailed_host`, `fixture_unavailable`, `storyline_refused`). */
|
|
6723
|
+
cause: string | null;
|
|
6724
|
+
/** Evaluator ≠ creator: the seat that wrote the checks, and the seats that built what they check. */
|
|
6725
|
+
seat: { evaluator: string | null; builders: string[] };
|
|
6726
|
+
/** The tree id the recorder recorded (`git archive` of it is what ran). */
|
|
6727
|
+
tree: string | null;
|
|
6728
|
+
/** Always `false`: a later creator step re-inserts the pair after it (§4.8). Kept so an old plan shape reads honestly. */
|
|
6729
|
+
stale: false;
|
|
6730
|
+
/** The take's seal was found in the engine store and every re-check against the files on disk held (WT-W2). */
|
|
6731
|
+
sealed: boolean;
|
|
6732
|
+
/** Proof-root-relative paths of the stitched take; `null` until there is one. */
|
|
6733
|
+
video: { mp4: string | null; poster: string | null; markers: DemoMarker[] };
|
|
6734
|
+
chapters: WalkthroughChapter[];
|
|
6735
|
+
/** Per creator step, the check state from THIS pair's take — computed at every read from its re-verified seal (WT-W2). */
|
|
6736
|
+
steps: WalkthroughStepState[];
|
|
6737
|
+
}
|
|
6738
|
+
|
|
6739
|
+
/**
|
|
6740
|
+
* `GET /runs/:id/acceptance` → `walkthrough` (WT-W2, DES-walkthrough-proof §4.9; api-types 0.75.0):
|
|
6741
|
+
* the walkthrough half of the gate. One row per `walkthrough_review` step the run's requirement names,
|
|
6742
|
+
* each re-verified at this read — the seal (the last `WALKTHROUGH-SEAL` line of the recorder's
|
|
6743
|
+
* engine-captured output), `bundle_sha` recomputed from the proof root, and the proof root's stamped
|
|
6744
|
+
* ledger verdicts against the sealed chapter verdicts. The gate is deny-dominates across the repo
|
|
6745
|
+
* ledger and every row: a missing, mismatched ("changed after it was sealed") or non-PASS seal
|
|
6746
|
+
* denies. ABSENT when the requirement names no walkthrough step.
|
|
6747
|
+
*/
|
|
6748
|
+
export interface RunAcceptanceWalkthrough {
|
|
6749
|
+
roots: Array<{ stepId: string; sealed: boolean; satisfied: boolean; reason: string }>;
|
|
6750
|
+
/** Every row's seal held. */
|
|
6751
|
+
sealed: boolean;
|
|
6752
|
+
/** Per creator step, from the NEWEST walkthrough of the run. */
|
|
6753
|
+
steps: WalkthroughStepState[];
|
|
6754
|
+
}
|
|
6755
|
+
|
|
6756
|
+
/**
|
|
6757
|
+
* `GET /runs/:id/acceptance` → `summary` (WT-W3, DES-walkthrough-proof §4.8/§7; api-types 0.82.0): the
|
|
6758
|
+
* deliver card's ONE acceptance line, computed at the same read as the gate. `line` is plain words
|
|
6759
|
+
* ("Checked by a walkthrough: 3 of 3 steps at a1b2c3d."); it cites counts and the tree, never a path.
|
|
6760
|
+
*/
|
|
6761
|
+
export interface RunAcceptanceSummary {
|
|
6762
|
+
/** The run had something to prove (`gate.required`). */
|
|
6763
|
+
required: boolean;
|
|
6764
|
+
/** Deny-dominates across the repo ledger and every walkthrough (`gate.satisfied`). */
|
|
6765
|
+
satisfied: boolean;
|
|
6766
|
+
line: string;
|
|
6767
|
+
/** From the newest walkthrough; `null` when the requirement names none. */
|
|
6768
|
+
walkthrough: {
|
|
6769
|
+
checked: number;
|
|
6770
|
+
failed: number;
|
|
6771
|
+
ownedByYou: number;
|
|
6772
|
+
/** Creator steps with a check state. */
|
|
6773
|
+
steps: number;
|
|
6774
|
+
/** Every walkthrough seal held. */
|
|
6775
|
+
sealed: boolean;
|
|
6776
|
+
/** The tree the newest seal binds; `null` with no seal. */
|
|
6777
|
+
tree: string | null;
|
|
6778
|
+
} | null;
|
|
6779
|
+
}
|
|
6780
|
+
|
|
6781
|
+
/**
|
|
6782
|
+
* `PUT /runs/:id/walkthrough/storyline?step=` body (WT-W3, §4.8 "Edit the check"): the whole storyline
|
|
6783
|
+
* module text. Accepted only while that walkthrough's escalation gate is open (409
|
|
6784
|
+
* `no_open_escalation` otherwise), only from a human actor (403), at most 256 KB (413).
|
|
6785
|
+
*/
|
|
6786
|
+
export interface PutStorylineBody {
|
|
6787
|
+
storyline: string;
|
|
6788
|
+
}
|
|
6789
|
+
|
|
6790
|
+
/** `PUT /runs/:id/walkthrough/storyline` → 200: crew wrote `author/<planStepId>/storyline.mjs`, marked `edited_by: human`. */
|
|
6791
|
+
export interface PutStorylineResponse {
|
|
6792
|
+
runId: string;
|
|
6793
|
+
planStepId: string;
|
|
6794
|
+
sha256: string;
|
|
6795
|
+
edited_by: 'human';
|
|
6796
|
+
/** ISO-8601. */
|
|
6797
|
+
at: string;
|
|
6798
|
+
}
|
|
6799
|
+
|
|
6536
6800
|
/** `POST /proposals/:id/reject` → 200. */
|
|
6537
6801
|
export interface RejectProposalResponse {
|
|
6538
6802
|
ok: true;
|
|
@@ -7310,6 +7574,12 @@ export interface WatchEntry {
|
|
|
7310
7574
|
version: number;
|
|
7311
7575
|
/** See {@link WatchEntrySource}. A `bus` type is a 4-segment `wicked.<domain>.<noun>.<verb>` type. */
|
|
7312
7576
|
on: { source: WatchEntrySource; type: string };
|
|
7577
|
+
/**
|
|
7578
|
+
* (api-types 0.81.0, TR-W5b) The key points the check JOINS to its trigger — "the same unit's
|
|
7579
|
+
* `repoChecksEvaluated`", "the cursor unit's latest `unitOutputCaptured`". They reach the check
|
|
7580
|
+
* unfiltered so it can fold them; only `on` (with `filter`) triggers a row. Absent = none.
|
|
7581
|
+
*/
|
|
7582
|
+
join?: Array<{ source: Exclude<WatchEntrySource, 'internal'>; type: string }>;
|
|
7313
7583
|
/** JSON-path equality, AND of keys; an array means "any of". */
|
|
7314
7584
|
filter: Record<string, unknown>;
|
|
7315
7585
|
check: string;
|
|
@@ -8334,3 +8604,132 @@ export interface McpUsageResponse {
|
|
|
8334
8604
|
/** Lines of `calls.ndjson` that did not parse as a call record. */
|
|
8335
8605
|
skipped: number;
|
|
8336
8606
|
}
|
|
8607
|
+
|
|
8608
|
+
// ── Decision capture (DES-decision-capture §4.2.1 / §4.6; DC-S4a, api-types 0.80.0) ──────────────
|
|
8609
|
+
|
|
8610
|
+
/** The laya codebook's decision types. `none` is crew's label for "no decision". */
|
|
8611
|
+
export type DecisionType = 'rule' | 'correction' | 'scope' | 'exception' | 'choice' | 'confirmation' | 'none';
|
|
8612
|
+
|
|
8613
|
+
/** Where the operator's words entered crew. S4a records the three structured hosts. */
|
|
8614
|
+
export type DecisionHost = 'studio-chat' | 'gate' | 'elicitation' | 'inject' | 'capture' | 'claude-code';
|
|
8615
|
+
|
|
8616
|
+
/** The deterministic templates (`derive.ts`). Only `T1-always` and `T2-never` can auto-remember. */
|
|
8617
|
+
export type DecisionTemplateId =
|
|
8618
|
+
| 'T1-always'
|
|
8619
|
+
| 'T2-never'
|
|
8620
|
+
| 'T3-before'
|
|
8621
|
+
| 'T4-prefer'
|
|
8622
|
+
| 'T5-must'
|
|
8623
|
+
| 'T6-only'
|
|
8624
|
+
| 'in-your-words';
|
|
8625
|
+
|
|
8626
|
+
/** How the derivation routed a decision (§4.4): the first that applies wins. */
|
|
8627
|
+
export type DecisionRoute = 'ledger' | 'offer' | 'auto' | 'restated' | 'maybe-restated' | 'conflict';
|
|
8628
|
+
|
|
8629
|
+
/** The latest outcome of a decision. `recorded` = no outcome yet (ledger-only, or still landing). */
|
|
8630
|
+
export type DecisionState =
|
|
8631
|
+
| 'recorded'
|
|
8632
|
+
| 'offered'
|
|
8633
|
+
| 'remembered'
|
|
8634
|
+
| 'undone'
|
|
8635
|
+
| 'dismissed'
|
|
8636
|
+
| 'restated'
|
|
8637
|
+
| 'widened'
|
|
8638
|
+
| 'landing_failed';
|
|
8639
|
+
|
|
8640
|
+
/** Why an offered decision was dismissed (a label for the laya v3 flywheel). */
|
|
8641
|
+
export type DecisionDismissReason = 'not-a-rule' | 'one-off' | 'wrong-type' | 'wrong-scope' | 'not-the-same' | 'undone';
|
|
8642
|
+
|
|
8643
|
+
/**
|
|
8644
|
+
* One decision as studio renders it (`GET /decisions`, operator+). ORIGIN (`origin.words`) comes
|
|
8645
|
+
* ONLY from crew's ledger: a proposal payload carries just the decision id, so a forged payload
|
|
8646
|
+
* has no ORIGIN. Words are never on the bus.
|
|
8647
|
+
*/
|
|
8648
|
+
export interface DecisionView {
|
|
8649
|
+
id: string;
|
|
8650
|
+
/** Epoch ms the words were recorded. */
|
|
8651
|
+
at: number;
|
|
8652
|
+
project_id: string | null;
|
|
8653
|
+
host: DecisionHost;
|
|
8654
|
+
origin: {
|
|
8655
|
+
actor: { id: string; kind: 'human'; trust: TrustLevel };
|
|
8656
|
+
auth_mode: 'off' | 'required';
|
|
8657
|
+
run_id?: string;
|
|
8658
|
+
ord?: number;
|
|
8659
|
+
gate_id?: string;
|
|
8660
|
+
elicitation_id?: string;
|
|
8661
|
+
chat_id?: string;
|
|
8662
|
+
turn_id?: string;
|
|
8663
|
+
/** The verbatim words (masked where a secret was found; then `redacted: true`). */
|
|
8664
|
+
words: string;
|
|
8665
|
+
/** A bare gate approve/reject or a picked elicitation option, when there were no words. */
|
|
8666
|
+
choice?: string;
|
|
8667
|
+
words_source: 'typed' | 'operator-files' | 'cli-transcript';
|
|
8668
|
+
redacted: boolean;
|
|
8669
|
+
};
|
|
8670
|
+
/** The derived rule: the statement crew would remember, never the model's paraphrase. */
|
|
8671
|
+
derived: {
|
|
8672
|
+
statement: string | null;
|
|
8673
|
+
polarity: 'do' | 'dont' | null;
|
|
8674
|
+
key: string | null;
|
|
8675
|
+
scope: 'project' | 'everywhere';
|
|
8676
|
+
steering_type: SteeringType;
|
|
8677
|
+
template: DecisionTemplateId | null;
|
|
8678
|
+
exclusions: string[];
|
|
8679
|
+
};
|
|
8680
|
+
route: DecisionRoute;
|
|
8681
|
+
state: DecisionState;
|
|
8682
|
+
/** How it was remembered (present once `remembered`). */
|
|
8683
|
+
how?: 'auto' | 'chip' | 'needs-you';
|
|
8684
|
+
proposal_id?: string;
|
|
8685
|
+
rule_id?: string;
|
|
8686
|
+
/** The in-force rule this restates (`restated`) or contradicts (`conflict`). */
|
|
8687
|
+
restates_rule_id?: string;
|
|
8688
|
+
conflicts_rule_id?: string;
|
|
8689
|
+
/** Edits the operator made at Remember; ORIGIN keeps the original words. */
|
|
8690
|
+
edits?: { statement?: string; scope?: 'project' | 'everywhere'; steering_type?: SteeringType };
|
|
8691
|
+
/** The loud reason a landing failed (`landing_failed`). */
|
|
8692
|
+
error?: string;
|
|
8693
|
+
/** B8: the same rule decided in ≥ 2 projects — "Make it apply everywhere". */
|
|
8694
|
+
widen?: { projects: string[] };
|
|
8695
|
+
}
|
|
8696
|
+
|
|
8697
|
+
/** `GET /decisions?project=&chat=&run=&state=&since=` (operator+). Newest first. */
|
|
8698
|
+
export interface ListDecisionsResponse {
|
|
8699
|
+
decisions: DecisionView[];
|
|
8700
|
+
/** `off` | `ledger` | `on` — the `WICKED_DECISIONS` switch this daemon runs under. */
|
|
8701
|
+
mode: 'off' | 'ledger' | 'on';
|
|
8702
|
+
}
|
|
8703
|
+
|
|
8704
|
+
/** `POST /decisions/:id/remember` body. An edited `statement` is recorded in `edits`. */
|
|
8705
|
+
export interface RememberDecisionBody {
|
|
8706
|
+
scope?: 'project' | 'everywhere';
|
|
8707
|
+
steering_type?: SteeringType;
|
|
8708
|
+
statement?: string;
|
|
8709
|
+
}
|
|
8710
|
+
|
|
8711
|
+
/** `POST /decisions/:id/remember` → the landed rule. */
|
|
8712
|
+
export interface RememberDecisionResponse {
|
|
8713
|
+
rule_id: string;
|
|
8714
|
+
proposal_id: string;
|
|
8715
|
+
project?: string;
|
|
8716
|
+
}
|
|
8717
|
+
|
|
8718
|
+
/** `POST /decisions/:id/dismiss` body. */
|
|
8719
|
+
export interface DismissDecisionBody {
|
|
8720
|
+
reason: DecisionDismissReason;
|
|
8721
|
+
}
|
|
8722
|
+
|
|
8723
|
+
/** `POST /decisions/:id/same` body — resolves a `maybe-restated` decision. */
|
|
8724
|
+
export interface SameDecisionBody {
|
|
8725
|
+
same: boolean;
|
|
8726
|
+
}
|
|
8727
|
+
|
|
8728
|
+
/** `/ws` frame: a decision's state changed (no words). */
|
|
8729
|
+
export interface DecisionChangedFrame {
|
|
8730
|
+
type: 'decisionChanged';
|
|
8731
|
+
id: string;
|
|
8732
|
+
state: DecisionState;
|
|
8733
|
+
rule_id?: string;
|
|
8734
|
+
project_id: string | null;
|
|
8735
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-crew-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.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",
|