wicked-crew-api-types 0.99.0 → 0.100.1

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 +185 -4
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -711,6 +711,136 @@ export interface WorkUnit {
711
711
  * marker was MISSING (that denies; the denial is the record), and on an older engine.
712
712
  */
713
713
  capture_report?: CaptureReport;
714
+ /**
715
+ * TRUE when the worktree guard governs this unit (a def-driven, agent-executed
716
+ * `executes_code: false` phase — a READ-ONLY phase; wicked-core `WorkUnit.worktree_guarded`,
717
+ * derived at plan time). Skip-if-false on the wire: ABSENT on every other unit and on an older
718
+ * engine. Typed here for crew#891 (the floor-fix gate is a read-only phase's).
719
+ */
720
+ worktree_guarded?: boolean;
721
+ /**
722
+ * TRUE when this unit runs the repository's own checks as its floor (wicked-core
723
+ * `WorkUnit.repo_checks_floor`). Skip-if-false on the wire: ABSENT otherwise.
724
+ */
725
+ repo_checks_floor?: boolean;
726
+ /**
727
+ * The repo-checks evidence the fold attached to this unit (wicked-core `RepoChecksReport`),
728
+ * typed only as far as a skin reads it (crew#891); the rest of the report rides the index
729
+ * signature. ABSENT until the unit's gate folds, and when the floor does not apply.
730
+ */
731
+ repo_checks?: WorkUnitRepoChecks;
732
+ /**
733
+ * Every human gate note that amended this unit, oldest first (wicked-core#760
734
+ * `WorkUnit.operator_rulings`) — the record the evaluator reviewing it reads. ABSENT when empty.
735
+ */
736
+ operator_rulings?: OperatorRuling[];
737
+ /** (crew#894, wicked-core#810) The phase's worker pool (one creator plus monitors). ABSENT = 1. */
738
+ pool?: number;
739
+ /** (crew#894) How that pool was seated, once distributed (see {@link UnitPoolSeating}). ABSENT
740
+ * for a pool of 1 and before distribution. */
741
+ pool_seating?: UnitPoolSeating;
742
+ /**
743
+ * (wicked-core#761) The FAIL items an operator landed this Evaluator unit over at its
744
+ * `review_adjudication` gate, carried forward with the work. ABSENT when empty.
745
+ */
746
+ carried_items?: string[];
747
+ /**
748
+ * (wicked-core#686) The phase's AUTHORED instructions as a field: for the deliver phase, the gate
749
+ * card the workflow wrote. {@link WorkUnit.description} still carries them after ` ||| ` (it is
750
+ * the worker's prompt), but a reader takes them from here when
751
+ * {@link WorkUnit.structured_description} is true. ABSENT when the phase has none, and on a
752
+ * record that predates the field.
753
+ */
754
+ instructions?: string;
755
+ /**
756
+ * (wicked-core#686) Every approved intent amendment folded onto this unit, oldest first, as the
757
+ * operator's text (the description also carries each one after the amendment prefix).
758
+ * ABSENT when empty.
759
+ */
760
+ amendments?: string[];
761
+ /**
762
+ * (wicked-core#686) TRUE when the unit was planned with {@link WorkUnit.instructions} and
763
+ * {@link WorkUnit.amendments} as fields: read them there and never split the description.
764
+ * ABSENT (false) on a record that predates the fields; only then may a skin fall back to
765
+ * re-parsing the description, as a legacy path.
766
+ */
767
+ structured_description?: boolean;
768
+ }
769
+
770
+ /**
771
+ * How an operator's floor-only re-run ran (wicked-core `FloorRerunMode`, snake_case on the wire):
772
+ * `extend` | `targeted` | `accept_partial` (wicked-core#469, the escalation arms of a floor that did
773
+ * not finish) and `floor_fix` (crew#891, wicked-core#782 / #811 — a seat distinct from the
774
+ * read-only phase made the operator's fix first; reached only through an approve with a note at
775
+ * that phase's floor gate, never as its own `GateDecision.action`).
776
+ */
777
+ export type FloorRerunMode = 'extend' | 'targeted' | 'accept_partial' | 'floor_fix';
778
+
779
+ /** (crew#891, wicked-core#782) The fix a `floor_fix` re-run makes before its floor runs. */
780
+ export interface FloorFix {
781
+ /** The operator's note, verbatim — the fixing seat's whole task. */
782
+ note: string;
783
+ /** The seat that makes the fix: distinct from the read-only phase's own (evaluator ≠ fixer). */
784
+ seat: string;
785
+ }
786
+
787
+ /** (wicked-core#469) A floor-only re-run the escalation gate armed on a unit, read by its next dispatch. */
788
+ export interface FloorRerun {
789
+ mode: FloorRerunMode;
790
+ /** `accept_partial`: the checks waived. Absent when empty. */
791
+ waive?: string[];
792
+ /** The seat's output from the attempt the gate reviewed (the fold reads it; the seat does not re-run).
793
+ * Always serialised (`""` when none). */
794
+ output: string;
795
+ /** `floor_fix` only (crew#891): the note and the distinct seat that makes it. */
796
+ fix?: FloorFix;
797
+ }
798
+
799
+ /** {@link WorkUnit.repo_checks}: the parts of wicked-core's `RepoChecksReport` a skin reads. */
800
+ export interface WorkUnitRepoChecks {
801
+ /** Whether the floor passed (vacuously true when nothing was detected). The engine always sends
802
+ * it; optional here because this type is a partial reading, and consumers (fixtures included)
803
+ * already hold units whose report they only partly know. */
804
+ passed?: boolean;
805
+ /** The operator's re-run this report answers; absent for the ordinary floor. */
806
+ rerun?: FloorRerunMode;
807
+ /** Checks the operator waived for this unit. Absent when empty. */
808
+ waived?: string[];
809
+ /** The re-run armed at the gate and not yet consumed. Absent otherwise. */
810
+ requested_rerun?: FloorRerun;
811
+ [k: string]: unknown;
812
+ }
813
+
814
+ /**
815
+ * One human gate note on a unit (wicked-core#760 `OperatorRuling`): `request_changes` | `amend`,
816
+ * and `floor_fix` (crew#891, wicked-core#782) for an approve-with-note a distinct seat made as a
817
+ * floor fix. Read an unknown token as a note, never as an error.
818
+ */
819
+ export interface OperatorRuling {
820
+ action: 'request_changes' | 'amend' | 'floor_fix' | (string & {});
821
+ /** The operator's own words. */
822
+ text: string;
823
+ /** The amended unit's attempt when the ruling was given. */
824
+ attempt: number;
825
+ /** Unix millis. */
826
+ at: number;
827
+ }
828
+
829
+ /**
830
+ * (crew#894, wicked-core#810) A unit's worker-pool fill — `unitDistributed.pool` and
831
+ * `WorkUnit.pool_seating` (the same keys; core-ts `UnitPoolSeatingJson`).
832
+ */
833
+ export interface UnitPoolSeating {
834
+ /** The phase's `pool` (after any plan step lowered it). */
835
+ requested: number;
836
+ /** Seats filled: the creator plus `monitors.length`. */
837
+ seated: number;
838
+ /** The monitor seat instances (`claude#2`), in the order the team supervisor summons them. */
839
+ monitors: string[];
840
+ /** Configured instances that could have filled the shortfall but are not signed in. */
841
+ missing: string[];
842
+ /** Why `seated < requested`; `null` when the pool was filled. */
843
+ shortfall: string | null;
714
844
  }
715
845
 
716
846
  /** The counts a capture phase reported (`WorkUnit.capture_report`; wicked-core#535). */
@@ -2532,10 +2662,14 @@ export interface UnitReworkAmendedEvent {
2532
2662
  * (`amendScope: 'creator'`); `'request_changes'` — the creator phase the gate rewound to, and
2533
2663
  * `amendment` then carries the evaluator's full findings + the operator's note;
2534
2664
  * `'accept_suggestion'` (wicked-core#467) — the same rewind after the operator adopted the
2535
- * evaluator's pinned edit, and `amendment` names it. ABSENT on an engine before the field — read
2536
- * as `'cursor'`.
2665
+ * evaluator's pinned edit, and `amendment` names it. `'floor_fix'` (crew#891, wicked-core#782 /
2666
+ * #811) — an approve WITH A NOTE at the escalation gate of a READ-ONLY phase (worktree-guarded,
2667
+ * `executes_code: false`) whose own repo-checks floor denied it: a seat DISTINCT from that phase
2668
+ * makes the note's fix in the worktree, then only the floor re-runs (the phase does not run again;
2669
+ * its verdict stands and the floor decides). ABSENT on an engine before the field — read as
2670
+ * `'cursor'`.
2537
2671
  */
2538
- scope?: 'cursor' | 'creator' | 'request_changes' | 'accept_suggestion';
2672
+ scope?: 'cursor' | 'creator' | 'request_changes' | 'accept_suggestion' | 'floor_fix';
2539
2673
  }
2540
2674
 
2541
2675
  /** P2 — a worker's ApplyStepResult arrived and output is ready to be gated. Fires before GateDecided.
@@ -2646,6 +2780,13 @@ export interface UnitDistributedEvent {
2646
2780
  * unrecognised value as a disclosure too, never as "distinct".
2647
2781
  */
2648
2782
  distinctnessFallback?: 'creator_seat' | 'same_cli_instance' | null;
2783
+ /**
2784
+ * (crew#894, wicked-core#810 / #813; core-ts >= 0.7.44) How the unit's WORKER POOL was filled:
2785
+ * one creator plus monitors. `null` for a pool of 1 (the default) and a tool unit; ABSENT on an
2786
+ * older engine. A pool larger than the signed-in instances is seated SHORT and disclosed here
2787
+ * (`seated < requested`, `missing`, `shortfall`), never refused. Guard with `== null`.
2788
+ */
2789
+ pool?: UnitPoolSeating | null;
2649
2790
  /** @deprecated api-types 0.36.0 — the engine emits `routingMethod`; removed in 0.37. */
2650
2791
  routing_method?: 'council' | 'degraded' | 'evaluator_distinct' | 'tool' | 'teamed';
2651
2792
  /** @deprecated api-types 0.36.0 — the engine emits `agreementPct`; removed in 0.37. */
@@ -4340,6 +4481,12 @@ export type PhaseExecutor =
4340
4481
  export interface PhaseDef {
4341
4482
  id: string;
4342
4483
  kind: StageKindPhase;
4484
+ /**
4485
+ * (crew#894, wicked-core#810) The phase's worker pool, `1..=4` (absent = 1): one creator plus
4486
+ * `pool - 1` monitors, inside a TEAM run only. A user workflow declaring `pool > 1` is refused at
4487
+ * registration (`pool outside a team run`), and so is a value outside `1..=4` (`pool out of range`).
4488
+ */
4489
+ pool?: number;
4343
4490
  /** How the phase executes. Omitted = Agent (engine default). Tool phases bypass the council and
4344
4491
  * run `cmd` directly. */
4345
4492
  executor?: PhaseExecutor;
@@ -5245,6 +5392,9 @@ export interface InteractiveDocSummary {
5245
5392
  name: string;
5246
5393
  /** Manifest `kind`; a manifest without one lists as `doc`. */
5247
5394
  kind: 'doc' | 'html' | 'source' | 'demo';
5395
+ /** Manifest `style` (the bridge's set: `web` | `ppt` | `brochure` | `doc`); ABSENT when the
5396
+ * manifest carries none (the bridge renders that as `web`). */
5397
+ style?: 'web' | 'ppt' | 'brochure' | 'doc' | (string & {});
5248
5398
  /** Head version. */
5249
5399
  head: number;
5250
5400
  /** Lineage size. */
@@ -5315,6 +5465,16 @@ export interface InteractiveDocIndexRow {
5315
5465
  kinds: InteractiveSeamKind[];
5316
5466
  /** The governed runs those seams launched for it (ledger order) — the doc ↔ run binding. */
5317
5467
  runs: string[];
5468
+ /** (crew#896) Manifest `style`, as the per-project list relays it; ABSENT when the manifest
5469
+ * carries none. */
5470
+ style?: 'web' | 'ppt' | 'brochure' | 'doc' | (string & {});
5471
+ /**
5472
+ * (crew#896) The repository grounding the draft seam resolved for this document, read from the
5473
+ * same `crew-grounding.json` sidecar the per-project list reads (see
5474
+ * {@link InteractiveDocSummary.grounding}). ABSENT until a draft launch resolved it, and on a
5475
+ * daemon before api-types 0.100.1.
5476
+ */
5477
+ grounding?: InteractiveDocGrounding;
5318
5478
  }
5319
5479
 
5320
5480
  /** A project docs root the listing could not read (api-types 0.36.0). */
@@ -5372,7 +5532,12 @@ export interface InteractionRequest {
5372
5532
  reviewing_ord: number | null;
5373
5533
  prompt: string;
5374
5534
  status: 'open' | 'answered' | 'expired' | 'cancelled';
5375
- /** The decision payload (JSON text, e.g. `{"approve":true,"amend":null}`) once resolved. */
5535
+ /**
5536
+ * The decision payload (JSON text, e.g. `{"approve":true,"amend":null}`) once resolved. Its
5537
+ * `action` names the arm; `"floor_fix"` (crew#891, wicked-core#782) replaces `"approve"` when an
5538
+ * approve with a note at a read-only phase's floor gate was taken as a floor fix — it IS an
5539
+ * approve.
5540
+ */
5376
5541
  answer: string | null;
5377
5542
  /** Unix millis. */
5378
5543
  created_at: number;
@@ -7501,6 +7666,10 @@ export interface TeamPlanStep {
7501
7666
  added_by?: 'plan' | 'floor' | (string & {});
7502
7667
  floor_reason?: string;
7503
7668
  late?: boolean;
7669
+ /** (crew#894, wicked-core#810) The step's worker pool. A plan step may only LOWER the catalog
7670
+ * phase's pool; a raise is refused (`wicked.team.plan.refused`, reason `pool_raised`). Omitted
7671
+ * when unset. */
7672
+ pool?: number;
7504
7673
  }
7505
7674
 
7506
7675
  export interface TeamPlanOverride {
@@ -7585,6 +7754,8 @@ export type TeamPlanAcceptedPayload = TeamEnvelope & {
7585
7754
  export type TeamPlanRefusedPayload = TeamEnvelope & {
7586
7755
  proposal_id: string;
7587
7756
  base_rev: number | null;
7757
+ /** The engine's refusal reason, verbatim — e.g. `pool_raised` (crew#894, wicked-core#810: a plan
7758
+ * step raised a phase's `pool`; a step may only lower it). */
7588
7759
  reason: string;
7589
7760
  };
7590
7761
 
@@ -7621,6 +7792,9 @@ export type TeamStepClaimedPayload = TeamEnvelope & {
7621
7792
  baseline_tree: string | null;
7622
7793
  repo: { workdir: string; git_dir: string } | null;
7623
7794
  code_graph_db: string | null;
7795
+ /** (crew#894, wicked-core#810) The monitor seat instances summoned beside the claiming creator
7796
+ * (a pool > 1). Omitted when empty. */
7797
+ monitors?: string[];
7624
7798
  };
7625
7799
 
7626
7800
  export type TeamCheckpointReachedPayload = TeamEnvelope & {
@@ -8360,6 +8534,13 @@ export interface CatalogEntry {
8360
8534
  skill_ref: string | null;
8361
8535
  /** The entry's one-line description; `null` when it has none. */
8362
8536
  description: string | null;
8537
+ /**
8538
+ * (wicked-core#816) The entry's worker pool (`PhaseDef::pool_size()`): the most a plan step of
8539
+ * this entry may ask for, since the planner refuses a raise as `pool_raised`; a step may only
8540
+ * lower it. The engine always sends it (1 when the entry declares none). ABSENT from an engine
8541
+ * before core-ts carries #816: read absent as 1.
8542
+ */
8543
+ pool?: number;
8363
8544
  }
8364
8545
 
8365
8546
  /** `GET /catalog`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.99.0",
3
+ "version": "0.100.1",
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",