wicked-crew-api-types 0.91.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 +100 -3
  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.
@@ -1140,6 +1149,11 @@ export interface LaunchPlan {
1140
1149
  steps: Array<{ catalog: string; id?: string | undefined; [k: string]: unknown }>;
1141
1150
  touch?: string[];
1142
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 };
1143
1157
  }
1144
1158
 
1145
1159
  /**
@@ -5158,6 +5172,12 @@ export interface ChatOpenBody {
5158
5172
  * - `none` — the legacy unscoped chat; takes neither `projectId` nor `repoRefs`.
5159
5173
  */
5160
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;
5161
5181
  }
5162
5182
 
5163
5183
  /** The scope a `POST /chats` caller may name (api-types 0.39.0, studio#323 R4). */
@@ -5312,6 +5332,9 @@ export interface ChatMessageResponse {
5312
5332
  * and only `POST /chats` → 201, which performed the open, says anything about that moment.
5313
5333
  */
5314
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;
5315
5338
  }
5316
5339
 
5317
5340
  /**
@@ -5480,6 +5503,25 @@ export interface ChatDetailResponse {
5480
5503
  * "session continues" without history). Unbounded — a reply may be up to the engine's cap.
5481
5504
  */
5482
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;
5483
5525
  }
5484
5526
 
5485
5527
  // ── Project code graph (DES-PROJECT-001; the co-located multi-repo graph) ──────
@@ -7116,7 +7158,9 @@ export type TeamEventType =
7116
7158
  | 'wicked.team.ledger.folded'
7117
7159
  | 'wicked.team.gate.opened'
7118
7160
  | 'wicked.team.gate.decided'
7119
- | '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';
7120
7164
 
7121
7165
  /** The fields every team payload carries. */
7122
7166
  export interface TeamEnvelope {
@@ -7216,6 +7260,15 @@ export type TeamPlanAcceptedPayload = TeamEnvelope & {
7216
7260
  steps: TeamPlanStep[];
7217
7261
  override: TeamPlanOverride | null;
7218
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 & {});
7219
7272
  };
7220
7273
 
7221
7274
  export type TeamPlanRefusedPayload = TeamEnvelope & {
@@ -7227,7 +7280,12 @@ export type TeamPlanRefusedPayload = TeamEnvelope & {
7227
7280
  export type TeamMemberJoinedPayload = TeamEnvelope & {
7228
7281
  member_id: string;
7229
7282
  open_seq: number;
7230
- 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;
7231
7289
  role: 'monitor' | (string & {});
7232
7290
  status: 'attached' | 'failed' | (string & {});
7233
7291
  reason: string;
@@ -7271,6 +7329,12 @@ export type TeamFindingRaisedPayload = TeamEnvelope & {
7271
7329
  anchor: string | null;
7272
7330
  anchor_source: 'graph' | 'hunk' | 'none' | (string & {}) | null;
7273
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 & {});
7274
7338
  path: string;
7275
7339
  line: number;
7276
7340
  evidence: string;
@@ -7279,6 +7343,8 @@ export type TeamFindingRaisedPayload = TeamEnvelope & {
7279
7343
  tree: string;
7280
7344
  in_diff: boolean;
7281
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;
7282
7348
  };
7283
7349
 
7284
7350
  export type TeamAdviceDeliveredPayload = TeamEnvelope & {
@@ -7311,8 +7377,16 @@ export type TeamHelpRequestedPayload = TeamEnvelope & {
7311
7377
  export type TeamHelpAnsweredPayload = TeamEnvelope & {
7312
7378
  help_id: string;
7313
7379
  answer_id: string;
7314
- answer: string;
7380
+ /** `null` when `outcome` is not `answered` (core ASK-K3a). */
7381
+ answer: string | null;
7315
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;
7316
7390
  };
7317
7391
 
7318
7392
  export type TeamChangeRequestedPayload = TeamEnvelope & {
@@ -7328,6 +7402,11 @@ export type TeamStepCompletedPayload = TeamEnvelope & {
7328
7402
  tree: string | null;
7329
7403
  output_bytes: number;
7330
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;
7331
7410
  };
7332
7411
 
7333
7412
  export type TeamStepReviewedPayload = TeamEnvelope & {
@@ -7335,6 +7414,8 @@ export type TeamStepReviewedPayload = TeamEnvelope & {
7335
7414
  verdict: 'accepted' | 'rejected' | (string & {});
7336
7415
  to: 'member' | 'pa' | (string & {}) | null;
7337
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;
7338
7419
  };
7339
7420
 
7340
7421
  export type TeamFindingSettledPayload = TeamEnvelope & {
@@ -7490,6 +7571,21 @@ export type TeamPathEndedPayload = TeamEnvelope & {
7490
7571
  status: 'completed' | 'failed' | 'cancelled' | (string & {});
7491
7572
  };
7492
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
+
7493
7589
  /** Each team event type's payload. */
7494
7590
  export interface TeamEventPayloads {
7495
7591
  'wicked.team.path.started': TeamPathStartedPayload;
@@ -7517,6 +7613,7 @@ export interface TeamEventPayloads {
7517
7613
  'wicked.team.gate.opened': TeamGateOpenedPayload;
7518
7614
  'wicked.team.gate.decided': TeamGateDecidedPayload;
7519
7615
  'wicked.team.path.ended': TeamPathEndedPayload;
7616
+ 'wicked.team.path.repicked': TeamPathRepickedPayload;
7520
7617
  }
7521
7618
 
7522
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.91.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",