wicked-crew-api-types 0.131.0 → 0.133.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 +43 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -291,7 +291,8 @@ export interface HealthCapabilities {
291
291
 
292
292
  /** One `GET /health.warnings[]` entry (additive; wicked-core#411 / wicked-crew#497). */
293
293
  export interface HealthWarning {
294
- /** `state-home.unregistered` today; open for later kinds. */
294
+ /** `state-home.unregistered` today; open for later kinds (e.g. `seat.work_default`,
295
+ * api-types 0.133.0 — see `DiagnosticsSeatGovernance.roleFindings`). */
295
296
  kind: string;
296
297
  severity: 'warning' | 'error';
297
298
  message: string;
@@ -1557,7 +1558,15 @@ export interface RunDiff {
1557
1558
  base?: string;
1558
1559
  }
1559
1560
 
1560
- /** The daemon's cached open-gate record (`GET /runs/:id/gate`, DES-STUDIO-001 §3.3). */
1561
+ /**
1562
+ * The daemon's cached open-gate record (`GET /runs/:id/gate`, DES-STUDIO-001 §3.3).
1563
+ *
1564
+ * (api-types 0.132.0) The read answers **503** `{ error, code: 'gate_unstable' }` when live gate
1565
+ * events kept landing while the daemon read the run's record and nothing could be verified — retry
1566
+ * — and **409** `{ error, code: 'gate_unknown' }` when the engine's open gate rows disagree on the
1567
+ * ord. It serves the newest of the agreeing rows: the one a decision is judged by.
1568
+ * A decision is never authorized from this record: see {@link GateDecision.ord}.
1569
+ */
1561
1570
  export interface GateInfo {
1562
1571
  runId: string;
1563
1572
  ord: number;
@@ -1578,6 +1587,20 @@ export interface GateInfo {
1578
1587
  * kind, never infer it from the unit. ABSENT on an older daemon and when the engine did not say.
1579
1588
  */
1580
1589
  gateKind?: string;
1590
+ /**
1591
+ * (api-types 0.132.0; issue #969) The answer tokens the engine offered on this gate — mirrors the
1592
+ * opening `awaitingHuman.choices` (e.g. a `team_dispute` gate's
1593
+ * `['approve', 'request_changes', 'reject']`), so a client that missed the live frame (reload,
1594
+ * late join, second tab) renders the same answers. ABSENT on an older daemon and when the engine
1595
+ * offered none; never empty.
1596
+ */
1597
+ choices?: string[];
1598
+ /**
1599
+ * (api-types 0.132.0; issue #969) The index into {@link GateInfo.choices} of the engine's
1600
+ * recommended answer — mirrors `awaitingHuman.recommended`. ABSENT on an older daemon, when the
1601
+ * engine recommended none, and whenever `choices` is absent.
1602
+ */
1603
+ recommended?: number;
1581
1604
  /** (crew ≥ 0.9.0) The gated unit's persisted receipt (`WorkUnit.assurance`) — what assured the
1582
1605
  * work this gate asks about. `null` when the unit carries none (no gate evaluated it yet, or an
1583
1606
  * older engine); ABSENT on an older daemon. */
@@ -1674,7 +1697,16 @@ export interface GateDecision {
1674
1697
  * mismatch, confirming nothing: the gate was answered elsewhere or replaced while the decision
1675
1698
  * waited (a skin's undo window). When the daemon cannot tell which gate is open it answers
1676
1699
  * **409** `{ error, code: 'gate_unknown' }` — refresh the gate and decide again. Absent = today's
1677
- * behaviour (no gate check).
1700
+ * behaviour (no gate check). (api-types 0.132.0) The comparison is made against the engine's
1701
+ * durable open gate rows, read under the run's decision lock immediately before the confirm —
1702
+ * never the daemon's gate cache — and judged by ORD AGREEMENT, not row count:
1703
+ * - no open gate row → **409** `gate_unknown`;
1704
+ * - open rows that disagree on the ord (the record is ambiguous) → **409** `gate_unknown`;
1705
+ * - the rows agree on an ord other than this one → **409** `gate_changed` with `openOrd`;
1706
+ * - the rows agree on this ord — one row or several (a keyed plan gate plus its recovery row) →
1707
+ * authorized.
1708
+ * The same reading judges a decision without `ord` (ambiguous rows → `gate_unknown`) and a gated
1709
+ * `POST /runs/:id/resume` or `/reassign`.
1678
1710
  */
1679
1711
  ord?: number;
1680
1712
  }
@@ -7531,6 +7563,14 @@ export interface DiagnosticsSeatGovernance {
7531
7563
  * found on PATH; `null` = none, so floor seats resting on it run advisory. */
7532
7564
  hostBoundary: string | null;
7533
7565
  seats: DiagnosticsSeatGovernanceEntry[];
7566
+ /**
7567
+ * (api-types 0.133.0) Seat-role findings read from the overlay above — the same objects
7568
+ * `GET /health.warnings[]` carries. Today one kind: `seat.work_default`, one per CUSTOM seat the
7569
+ * overlay writes `enabled_for_council = false` with no `seat_eligible_for_work` key, which since
7570
+ * crew 0.15.2 (#916) is eligible for work by the engine default. Built-in seats never appear; an
7571
+ * explicit `seat_eligible_for_work` (true or false) silences it. ABSENT on an older daemon.
7572
+ */
7573
+ roleFindings?: HealthWarning[];
7534
7574
  }
7535
7575
 
7536
7576
  export interface DiagnosticsSeatGovernanceEntry {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.131.0",
3
+ "version": "0.133.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",