wicked-crew-api-types 0.88.0 → 0.92.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 +158 -10
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -215,6 +215,15 @@ export interface HealthResponse {
215
215
  export interface HealthCapabilities {
216
216
  /** See {@link HealthResponse} — the engine's deliver gate exists (wicked-core-ts ≥ 0.7.24). */
217
217
  deliverGate: boolean;
218
+ /**
219
+ * (DES-ASK-TEAM-CHAT-001 §5.1; api-types 0.92.0) An ask starts a PATH: `POST /chats` resolves
220
+ * eligibility and warms nothing, the first `POST /chats/:id/messages` launches one team run
221
+ * (one PA, picked at random among the eligible seats unless `primary` names one; a reviewer
222
+ * member), later messages continue it, and the reply is the PA's `step.completed` output. The
223
+ * whole behaviour contract — launch, continue, output review — needs wicked-core-ts ≥ 0.7.38;
224
+ * ABSENT or `false` means this daemon still fans a send out to every warm seat.
225
+ */
226
+ askPath?: boolean;
218
227
  /**
219
228
  * `LaunchRunBody.revisesPr` is accepted (crew#550; crew ≥ 0.7.36). ABSENT on a daemon before
220
229
  * the field — read as `false`: do not send `revisesPr` to such a daemon.
@@ -1010,7 +1019,7 @@ export interface RunFileContent {
1010
1019
  export interface RunDiff {
1011
1020
  /** Unified diff text (`git diff --no-color --no-ext-diff HEAD`), cut at 1 MB when `truncated`. */
1012
1021
  diff: string;
1013
- /** The diff exceeded the 1 MB output cap and was cut. */
1022
+ /** The diff exceeded the 1 MB output cap and was cut (or, crew#790, ran out of its time budget). */
1014
1023
  truncated: boolean;
1015
1024
  /**
1016
1025
  * Where the diff was read from (wave 6, F-7R2-013; api-types 0.36.0): `worktree` — the live run
@@ -1025,7 +1034,12 @@ export interface RunDiff {
1025
1034
  branch?: string;
1026
1035
  /** `source: 'branch'` — the base commit the branch was diffed against: the engine's recorded
1027
1036
  * `AgentSession.base_commit` when it has one, else the branch's merge-base with the default
1028
- * branch; `?base=<ref>` overrides it with a plain in-repo ref. */
1037
+ * branch; `?base=<ref>` overrides it with a plain in-repo ref. `source: 'worktree'` (crew#790)
1038
+ * — present when no `?base=` was sent and the worktree was diffed against the recorded
1039
+ * `base_commit` (committed AND uncommitted run work); absent when the baseline was HEAD (no
1040
+ * recorded base, or it does not resolve in the worktree). `truncated` is also `true` when the
1041
+ * untracked-file pass stopped at its time budget on a busy host; a git stopped before it
1042
+ * answered is 503 `{ code: "diff_busy" }` with `Retry-After`. */
1029
1043
  base?: string;
1030
1044
  }
1031
1045
 
@@ -1135,6 +1149,11 @@ export interface LaunchPlan {
1135
1149
  steps: Array<{ catalog: string; id?: string | undefined; [k: string]: unknown }>;
1136
1150
  touch?: string[];
1137
1151
  override?: TeamPlanOverride;
1152
+ /**
1153
+ * (DES-TEAMING-002 §6.1 `plan.proposed.monitors`; core ASK-K1b) How many members the plan asks
1154
+ * for; the supervisor seats `min(max(band monitors, asked), 3)`. An ask asks for one reviewer.
1155
+ */
1156
+ monitors?: { asked: number };
1138
1157
  }
1139
1158
 
1140
1159
  /**
@@ -4542,6 +4561,17 @@ export interface BlastRadius {
4542
4561
  * hot symbol. When non-zero, an empty `dependents` still never means "safe".
4543
4562
  */
4544
4563
  unresolved: number;
4564
+ /**
4565
+ * Completeness causes from estate (wicked-estate#222, estate >= 0.18.0; api-types 0.91.0, crew#751),
4566
+ * ABSENT on an older estate. `depth_horizon_reached`: the depth horizon stopped the walk with
4567
+ * dependents beyond it; `node_cap_reached`: the node budget dropped reachable nodes;
4568
+ * `searched_depth`: the horizon that applied (re-ask with a larger one); `truncated_dependents`:
4569
+ * rows estate had but cut to fit its output budget. Any of them set ⇒ `dependents` is partial.
4570
+ */
4571
+ depth_horizon_reached?: boolean;
4572
+ node_cap_reached?: boolean;
4573
+ searched_depth?: number;
4574
+ truncated_dependents?: number;
4545
4575
  }
4546
4576
 
4547
4577
  /** An open elicitation as `GET /runs/:id/elicitation` returns it (DES-002). */
@@ -5004,8 +5034,10 @@ export interface InteractiveDocsListing {
5004
5034
  unreachable: InteractiveDocsUnreachable[];
5005
5035
  }
5006
5036
 
5007
- /** The seams that can answer a document (the handoff ledgers). */
5008
- export type InteractiveSeamKind = 'draft' | 'edit' | 'chat' | 'demo' | (string & {});
5037
+ /** The seams that can answer a document (the handoff ledgers). `theme` (EP-C4 theme learning) and
5038
+ * `review` (EP-C2 reviews) keep their rows in the edit seam's ledger and are told apart by the row
5039
+ * key (api-types 0.90.0, crew#785): a document only reviewed reads `review`, never `edit`. */
5040
+ export type InteractiveSeamKind = 'draft' | 'edit' | 'chat' | 'demo' | 'theme' | 'review' | (string & {});
5009
5041
 
5010
5042
  /** One document on the daemon-wide listing (api-types 0.36.0). */
5011
5043
  export interface InteractiveDocIndexRow {
@@ -5140,6 +5172,12 @@ export interface ChatOpenBody {
5140
5172
  * - `none` — the legacy unscoped chat; takes neither `projectId` nor `repoRefs`.
5141
5173
  */
5142
5174
  scopeKind?: ChatScopeRequestKind;
5175
+ /**
5176
+ * (DES-ASK-TEAM-CHAT-001 §4.1; api-types 0.92.0) The seat the operator CHOSE as the primary
5177
+ * agent — one of the eligible seats, else 400. Omitted: the engine picks one at random
5178
+ * (`path.started.selection: "random"`).
5179
+ */
5180
+ primary?: string;
5143
5181
  }
5144
5182
 
5145
5183
  /** The scope a `POST /chats` caller may name (api-types 0.39.0, studio#323 R4). */
@@ -5294,6 +5332,9 @@ export interface ChatMessageResponse {
5294
5332
  * and only `POST /chats` → 201, which performed the open, says anything about that moment.
5295
5333
  */
5296
5334
  singleSeat?: ChatSingleSeatDegradation;
5335
+ /** (api-types 0.92.0) The ask path this message launched or continued, and its answer step. */
5336
+ runId?: string;
5337
+ stepId?: string;
5297
5338
  }
5298
5339
 
5299
5340
  /**
@@ -5462,6 +5503,25 @@ export interface ChatDetailResponse {
5462
5503
  * "session continues" without history). Unbounded — a reply may be up to the engine's cap.
5463
5504
  */
5464
5505
  messages?: ChatTranscriptRecord[];
5506
+ /**
5507
+ * (DES-ASK-TEAM-CHAT-001 §5.1; api-types 0.92.0) The chat's path once its first message
5508
+ * launched it: the run, the PA and how it was picked, the reviewer member (null until one
5509
+ * attached) and the helpers that answered. Absent before the first message and on a daemon
5510
+ * without `capabilities.askPath`.
5511
+ */
5512
+ path?: ChatPathView;
5513
+ }
5514
+
5515
+ /** (api-types 0.92.0) A chat's ask path — see {@link ChatDetailResponse.path}. */
5516
+ export interface ChatPathView {
5517
+ runId: string;
5518
+ /** The primary agent's seat key, `null` until `path.started` has been seen. */
5519
+ pa: string | null;
5520
+ selection: 'chosen' | 'random';
5521
+ reviewer: string | null;
5522
+ helpers: string[];
5523
+ /** The answer step the last message added (`answer-N`). */
5524
+ stepId: string;
5465
5525
  }
5466
5526
 
5467
5527
  // ── Project code graph (DES-PROJECT-001; the co-located multi-repo graph) ──────
@@ -5656,6 +5716,17 @@ export interface ProjectBlastRadius {
5656
5716
  missingRepos: string[];
5657
5717
  linkage: ProjectGraphLinkage;
5658
5718
  note: string;
5719
+ /**
5720
+ * Completeness causes from estate (wicked-estate#222, estate >= 0.18.0; api-types 0.91.0, crew#751),
5721
+ * ABSENT on an older estate. `depth_horizon_reached`: the depth horizon stopped the walk with
5722
+ * dependents beyond it; `node_cap_reached`: the node budget dropped reachable nodes;
5723
+ * `searched_depth`: the horizon that applied (re-ask with a larger one); `truncated_dependents`:
5724
+ * rows estate had but cut to fit its output budget. Any of them set ⇒ `dependents` is partial.
5725
+ */
5726
+ depth_horizon_reached?: boolean;
5727
+ node_cap_reached?: boolean;
5728
+ searched_depth?: number;
5729
+ truncated_dependents?: number;
5659
5730
  }
5660
5731
 
5661
5732
  /** `GET /projects/:id/graph/search?name=` — exact-name symbol resolution across member repos. */
@@ -6839,7 +6910,8 @@ export interface WalkthroughView {
6839
6910
  /** Proof-root-relative paths of the stitched take; `null` until there is one. */
6840
6911
  video: { mp4: string | null; poster: string | null; markers: DemoMarker[] };
6841
6912
  chapters: WalkthroughChapter[];
6842
- /** Per creator step, the check state from THIS pair's take — computed at every read from its re-verified seal (WT-W2). */
6913
+ /** Per creator step, the check state from THIS pair's take — computed at every read from its re-verified seal (WT-W2).
6914
+ * With no pair because the accepted plan's override removed it, every finished creator step `owned_by_you` (0.88.1). */
6843
6915
  steps: WalkthroughStepState[];
6844
6916
  }
6845
6917
 
@@ -6850,7 +6922,9 @@ export interface WalkthroughView {
6850
6922
  * engine-captured output), `bundle_sha` recomputed from the proof root, and the proof root's stamped
6851
6923
  * ledger verdicts against the sealed chapter verdicts. The gate is deny-dominates across the repo
6852
6924
  * ledger and every row: a missing, mismatched ("changed after it was sealed") or non-PASS seal
6853
- * denies. ABSENT when the requirement names no walkthrough step.
6925
+ * denies. ABSENT when the requirement names no walkthrough step — except when the accepted plan's floor
6926
+ * override removed the walkthrough pair (§4.9; api-types 0.88.1): then it is present with `roots: []`,
6927
+ * `sealed: true` (nothing to seal) and every finished creator step `owned_by_you`.
6854
6928
  */
6855
6929
  export interface RunAcceptanceWalkthrough {
6856
6930
  roots: Array<{ stepId: string; sealed: boolean; satisfied: boolean; reason: string }>;
@@ -6871,7 +6945,8 @@ export interface RunAcceptanceSummary {
6871
6945
  /** Deny-dominates across the repo ledger and every walkthrough (`gate.satisfied`). */
6872
6946
  satisfied: boolean;
6873
6947
  line: string;
6874
- /** From the newest walkthrough; `null` when the requirement names none. */
6948
+ /** From the newest walkthrough; `null` when the requirement names none — unless the accepted plan's
6949
+ * override removed the pair (then `tree` is `null` and `ownedByYou` counts the operator's steps). */
6875
6950
  walkthrough: {
6876
6951
  checked: number;
6877
6952
  failed: number;
@@ -6904,6 +6979,24 @@ export interface PutStorylineResponse {
6904
6979
  at: string;
6905
6980
  }
6906
6981
 
6982
+ /**
6983
+ * `GET /runs/:id/walkthrough/storyline?step=` → 200 (#782; api-types 0.89.0): the author's storyline
6984
+ * — `author/<planStepId>/storyline.mjs` — so "Edit the check" can prefill the box and send the edit
6985
+ * back through `PUT` ({@link PutStorylineBody}). Readable at any run status. `step` names the author or
6986
+ * its recorder (default: the newest pair). 404 `no_storyline` before the author wrote one; 409
6987
+ * `no_author` / `no_evidence_root` / `read_refused` (a link or a non-file, never followed); 413 over
6988
+ * 256 KB. `edited_by` / `at` come from crew's edit marker only when its `sha256` names THIS text.
6989
+ */
6990
+ export interface WalkthroughStorylineView {
6991
+ runId: string;
6992
+ planStepId: string;
6993
+ storyline: string;
6994
+ sha256: string;
6995
+ edited_by: 'human' | null;
6996
+ /** ISO-8601 of the operator's edit; `null` when the text is the author's. */
6997
+ at: string | null;
6998
+ }
6999
+
6907
7000
  /** `POST /proposals/:id/reject` → 200. */
6908
7001
  export interface RejectProposalResponse {
6909
7002
  ok: true;
@@ -7065,7 +7158,9 @@ export type TeamEventType =
7065
7158
  | 'wicked.team.ledger.folded'
7066
7159
  | 'wicked.team.gate.opened'
7067
7160
  | 'wicked.team.gate.decided'
7068
- | 'wicked.team.path.ended';
7161
+ | 'wicked.team.path.ended'
7162
+ /** (DES-ASK-TEAM-CHAT-001 §4.1; core ASK-K1a) The PA changed mid-path. */
7163
+ | 'wicked.team.path.repicked';
7069
7164
 
7070
7165
  /** The fields every team payload carries. */
7071
7166
  export interface TeamEnvelope {
@@ -7165,6 +7260,15 @@ export type TeamPlanAcceptedPayload = TeamEnvelope & {
7165
7260
  steps: TeamPlanStep[];
7166
7261
  override: TeamPlanOverride | null;
7167
7262
  proposal_id: string | null;
7263
+ /**
7264
+ * (core TR-W1a) This rev's declared touch unioned with every earlier accepted rev's, first-seen
7265
+ * order, capped; absent on rows written before the field existed. `touch_source` names where
7266
+ * THIS rev's declared touch came from: `user` (the launch), `pa_scope` (the PA's SCOPE answer,
7267
+ * or — DES-TEAMING-002 rev 15 — the touch a first-creator PA `PLAN+` declared), `none`.
7268
+ */
7269
+ touch?: string[];
7270
+ touch_truncated?: boolean;
7271
+ touch_source?: 'user' | 'pa_scope' | 'none' | (string & {});
7168
7272
  };
7169
7273
 
7170
7274
  export type TeamPlanRefusedPayload = TeamEnvelope & {
@@ -7176,7 +7280,12 @@ export type TeamPlanRefusedPayload = TeamEnvelope & {
7176
7280
  export type TeamMemberJoinedPayload = TeamEnvelope & {
7177
7281
  member_id: string;
7178
7282
  open_seq: number;
7179
- seat: string;
7283
+ /**
7284
+ * (DES-ASK-TEAM-CHAT-001 §4.6; core ASK-K3a) `null` on a `status: 'failed'` row published when
7285
+ * no distinct seat exists to seat the member on (one signed-in seat); `member_id`/`open_seq`
7286
+ * are still minted, so the row keeps its key.
7287
+ */
7288
+ seat: string | null;
7180
7289
  role: 'monitor' | (string & {});
7181
7290
  status: 'attached' | 'failed' | (string & {});
7182
7291
  reason: string;
@@ -7220,6 +7329,12 @@ export type TeamFindingRaisedPayload = TeamEnvelope & {
7220
7329
  anchor: string | null;
7221
7330
  anchor_source: 'graph' | 'hunk' | 'none' | (string & {}) | null;
7222
7331
  severity: 'high' | 'medium' | (string & {});
7332
+ /**
7333
+ * (DES-ASK-TEAM-CHAT-001 §4.6; core ASK-K3a) What the finding cites: a line of the settled tree
7334
+ * (`tree`, absent on old rows) or a line of the step's output (`output`: `path` is the step id,
7335
+ * `line` a line of the output; the bar is `medium`).
7336
+ */
7337
+ target?: 'tree' | 'output' | (string & {});
7223
7338
  path: string;
7224
7339
  line: number;
7225
7340
  evidence: string;
@@ -7228,6 +7343,8 @@ export type TeamFindingRaisedPayload = TeamEnvelope & {
7228
7343
  tree: string;
7229
7344
  in_diff: boolean;
7230
7345
  corroborated_by: string[];
7346
+ /** (core T6) The attempt that first raised it, when a redriven attempt carried it; else null. */
7347
+ carried_from_attempt?: number | null;
7231
7348
  };
7232
7349
 
7233
7350
  export type TeamAdviceDeliveredPayload = TeamEnvelope & {
@@ -7260,8 +7377,16 @@ export type TeamHelpRequestedPayload = TeamEnvelope & {
7260
7377
  export type TeamHelpAnsweredPayload = TeamEnvelope & {
7261
7378
  help_id: string;
7262
7379
  answer_id: string;
7263
- answer: string;
7380
+ /** `null` when `outcome` is not `answered` (core ASK-K3a). */
7381
+ answer: string | null;
7264
7382
  evidence: string[];
7383
+ /**
7384
+ * (DES-ASK-TEAM-CHAT-001 §4.5; core ASK-K3a) The help turn's terminal outcome, a fact on the row
7385
+ * S owns — never inferred from a missing row. Absent on old rows (= `answered`).
7386
+ */
7387
+ outcome?: 'answered' | 'timed_out' | 'failed' | 'no_member' | (string & {});
7388
+ /** Why, for a non-`answered` outcome. */
7389
+ error?: string | null;
7265
7390
  };
7266
7391
 
7267
7392
  export type TeamChangeRequestedPayload = TeamEnvelope & {
@@ -7277,6 +7402,11 @@ export type TeamStepCompletedPayload = TeamEnvelope & {
7277
7402
  tree: string | null;
7278
7403
  output_bytes: number;
7279
7404
  output_ref: string;
7405
+ /**
7406
+ * (core ASK-K3c) The attempt's `[team advice]` boundary block reached a seat turn. Omitted
7407
+ * when false (old rows read false).
7408
+ */
7409
+ answers_presented?: boolean;
7280
7410
  };
7281
7411
 
7282
7412
  export type TeamStepReviewedPayload = TeamEnvelope & {
@@ -7284,6 +7414,8 @@ export type TeamStepReviewedPayload = TeamEnvelope & {
7284
7414
  verdict: 'accepted' | 'rejected' | (string & {});
7285
7415
  to: 'member' | 'pa' | (string & {}) | null;
7286
7416
  reason: string;
7417
+ /** (core T6) The attempt of `step_id` the verdict is about; null on rows written before it existed. */
7418
+ reviewed_attempt?: number | null;
7287
7419
  };
7288
7420
 
7289
7421
  export type TeamFindingSettledPayload = TeamEnvelope & {
@@ -7439,6 +7571,21 @@ export type TeamPathEndedPayload = TeamEnvelope & {
7439
7571
  status: 'completed' | 'failed' | 'cancelled' | (string & {});
7440
7572
  };
7441
7573
 
7574
+ /**
7575
+ * (DES-ASK-TEAM-CHAT-001 §4.1; core ASK-K1a) `wicked.team.path.repicked` (E): a PA step's attempt
7576
+ * ended for a seat cause (`timed_out`, `failed`, a seat refusal's class) and another eligible seat
7577
+ * took over as the PA. The envelope's `ord`/`attempt` name the step; it is redispatched as
7578
+ * attempt+1 on `to`. Keyed by `pick_seq`, the engine's per-run re-pick counter (from 1).
7579
+ */
7580
+ export type TeamPathRepickedPayload = TeamEnvelope & {
7581
+ from: string;
7582
+ to: string;
7583
+ reason: string;
7584
+ /** Always `'random'`: a re-pick is never the operator's choice. */
7585
+ selection: 'random' | (string & {});
7586
+ pick_seq: number;
7587
+ };
7588
+
7442
7589
  /** Each team event type's payload. */
7443
7590
  export interface TeamEventPayloads {
7444
7591
  'wicked.team.path.started': TeamPathStartedPayload;
@@ -7466,6 +7613,7 @@ export interface TeamEventPayloads {
7466
7613
  'wicked.team.gate.opened': TeamGateOpenedPayload;
7467
7614
  'wicked.team.gate.decided': TeamGateDecidedPayload;
7468
7615
  'wicked.team.path.ended': TeamPathEndedPayload;
7616
+ 'wicked.team.path.repicked': TeamPathRepickedPayload;
7469
7617
  }
7470
7618
 
7471
7619
  /** One team bus row, discriminated on `event_type`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.88.0",
3
+ "version": "0.92.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",