wicked-crew-api-types 0.99.0 → 0.100.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 +139 -4
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -711,6 +711,110 @@ 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
+
744
+ /**
745
+ * How an operator's floor-only re-run ran (wicked-core `FloorRerunMode`, snake_case on the wire):
746
+ * `extend` | `targeted` | `accept_partial` (wicked-core#469, the escalation arms of a floor that did
747
+ * not finish) and `floor_fix` (crew#891, wicked-core#782 / #811 — a seat distinct from the
748
+ * read-only phase made the operator's fix first; reached only through an approve with a note at
749
+ * that phase's floor gate, never as its own `GateDecision.action`).
750
+ */
751
+ export type FloorRerunMode = 'extend' | 'targeted' | 'accept_partial' | 'floor_fix';
752
+
753
+ /** (crew#891, wicked-core#782) The fix a `floor_fix` re-run makes before its floor runs. */
754
+ export interface FloorFix {
755
+ /** The operator's note, verbatim — the fixing seat's whole task. */
756
+ note: string;
757
+ /** The seat that makes the fix: distinct from the read-only phase's own (evaluator ≠ fixer). */
758
+ seat: string;
759
+ }
760
+
761
+ /** (wicked-core#469) A floor-only re-run the escalation gate armed on a unit, read by its next dispatch. */
762
+ export interface FloorRerun {
763
+ mode: FloorRerunMode;
764
+ /** `accept_partial`: the checks waived. Absent when empty. */
765
+ waive?: string[];
766
+ /** The seat's output from the attempt the gate reviewed (the fold reads it; the seat does not re-run).
767
+ * Always serialised (`""` when none). */
768
+ output: string;
769
+ /** `floor_fix` only (crew#891): the note and the distinct seat that makes it. */
770
+ fix?: FloorFix;
771
+ }
772
+
773
+ /** {@link WorkUnit.repo_checks}: the parts of wicked-core's `RepoChecksReport` a skin reads. */
774
+ export interface WorkUnitRepoChecks {
775
+ /** Whether the floor passed (vacuously true when nothing was detected). The engine always sends
776
+ * it; optional here because this type is a partial reading, and consumers (fixtures included)
777
+ * already hold units whose report they only partly know. */
778
+ passed?: boolean;
779
+ /** The operator's re-run this report answers; absent for the ordinary floor. */
780
+ rerun?: FloorRerunMode;
781
+ /** Checks the operator waived for this unit. Absent when empty. */
782
+ waived?: string[];
783
+ /** The re-run armed at the gate and not yet consumed. Absent otherwise. */
784
+ requested_rerun?: FloorRerun;
785
+ [k: string]: unknown;
786
+ }
787
+
788
+ /**
789
+ * One human gate note on a unit (wicked-core#760 `OperatorRuling`): `request_changes` | `amend`,
790
+ * and `floor_fix` (crew#891, wicked-core#782) for an approve-with-note a distinct seat made as a
791
+ * floor fix. Read an unknown token as a note, never as an error.
792
+ */
793
+ export interface OperatorRuling {
794
+ action: 'request_changes' | 'amend' | 'floor_fix' | (string & {});
795
+ /** The operator's own words. */
796
+ text: string;
797
+ /** The amended unit's attempt when the ruling was given. */
798
+ attempt: number;
799
+ /** Unix millis. */
800
+ at: number;
801
+ }
802
+
803
+ /**
804
+ * (crew#894, wicked-core#810) A unit's worker-pool fill — `unitDistributed.pool` and
805
+ * `WorkUnit.pool_seating` (the same keys; core-ts `UnitPoolSeatingJson`).
806
+ */
807
+ export interface UnitPoolSeating {
808
+ /** The phase's `pool` (after any plan step lowered it). */
809
+ requested: number;
810
+ /** Seats filled: the creator plus `monitors.length`. */
811
+ seated: number;
812
+ /** The monitor seat instances (`claude#2`), in the order the team supervisor summons them. */
813
+ monitors: string[];
814
+ /** Configured instances that could have filled the shortfall but are not signed in. */
815
+ missing: string[];
816
+ /** Why `seated < requested`; `null` when the pool was filled. */
817
+ shortfall: string | null;
714
818
  }
715
819
 
716
820
  /** The counts a capture phase reported (`WorkUnit.capture_report`; wicked-core#535). */
@@ -2532,10 +2636,14 @@ export interface UnitReworkAmendedEvent {
2532
2636
  * (`amendScope: 'creator'`); `'request_changes'` — the creator phase the gate rewound to, and
2533
2637
  * `amendment` then carries the evaluator's full findings + the operator's note;
2534
2638
  * `'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'`.
2639
+ * evaluator's pinned edit, and `amendment` names it. `'floor_fix'` (crew#891, wicked-core#782 /
2640
+ * #811) — an approve WITH A NOTE at the escalation gate of a READ-ONLY phase (worktree-guarded,
2641
+ * `executes_code: false`) whose own repo-checks floor denied it: a seat DISTINCT from that phase
2642
+ * makes the note's fix in the worktree, then only the floor re-runs (the phase does not run again;
2643
+ * its verdict stands and the floor decides). ABSENT on an engine before the field — read as
2644
+ * `'cursor'`.
2537
2645
  */
2538
- scope?: 'cursor' | 'creator' | 'request_changes' | 'accept_suggestion';
2646
+ scope?: 'cursor' | 'creator' | 'request_changes' | 'accept_suggestion' | 'floor_fix';
2539
2647
  }
2540
2648
 
2541
2649
  /** P2 — a worker's ApplyStepResult arrived and output is ready to be gated. Fires before GateDecided.
@@ -2646,6 +2754,13 @@ export interface UnitDistributedEvent {
2646
2754
  * unrecognised value as a disclosure too, never as "distinct".
2647
2755
  */
2648
2756
  distinctnessFallback?: 'creator_seat' | 'same_cli_instance' | null;
2757
+ /**
2758
+ * (crew#894, wicked-core#810 / #813; core-ts >= 0.7.44) How the unit's WORKER POOL was filled:
2759
+ * one creator plus monitors. `null` for a pool of 1 (the default) and a tool unit; ABSENT on an
2760
+ * older engine. A pool larger than the signed-in instances is seated SHORT and disclosed here
2761
+ * (`seated < requested`, `missing`, `shortfall`), never refused. Guard with `== null`.
2762
+ */
2763
+ pool?: UnitPoolSeating | null;
2649
2764
  /** @deprecated api-types 0.36.0 — the engine emits `routingMethod`; removed in 0.37. */
2650
2765
  routing_method?: 'council' | 'degraded' | 'evaluator_distinct' | 'tool' | 'teamed';
2651
2766
  /** @deprecated api-types 0.36.0 — the engine emits `agreementPct`; removed in 0.37. */
@@ -4340,6 +4455,12 @@ export type PhaseExecutor =
4340
4455
  export interface PhaseDef {
4341
4456
  id: string;
4342
4457
  kind: StageKindPhase;
4458
+ /**
4459
+ * (crew#894, wicked-core#810) The phase's worker pool, `1..=4` (absent = 1): one creator plus
4460
+ * `pool - 1` monitors, inside a TEAM run only. A user workflow declaring `pool > 1` is refused at
4461
+ * registration (`pool outside a team run`), and so is a value outside `1..=4` (`pool out of range`).
4462
+ */
4463
+ pool?: number;
4343
4464
  /** How the phase executes. Omitted = Agent (engine default). Tool phases bypass the council and
4344
4465
  * run `cmd` directly. */
4345
4466
  executor?: PhaseExecutor;
@@ -5372,7 +5493,12 @@ export interface InteractionRequest {
5372
5493
  reviewing_ord: number | null;
5373
5494
  prompt: string;
5374
5495
  status: 'open' | 'answered' | 'expired' | 'cancelled';
5375
- /** The decision payload (JSON text, e.g. `{"approve":true,"amend":null}`) once resolved. */
5496
+ /**
5497
+ * The decision payload (JSON text, e.g. `{"approve":true,"amend":null}`) once resolved. Its
5498
+ * `action` names the arm; `"floor_fix"` (crew#891, wicked-core#782) replaces `"approve"` when an
5499
+ * approve with a note at a read-only phase's floor gate was taken as a floor fix — it IS an
5500
+ * approve.
5501
+ */
5376
5502
  answer: string | null;
5377
5503
  /** Unix millis. */
5378
5504
  created_at: number;
@@ -7501,6 +7627,10 @@ export interface TeamPlanStep {
7501
7627
  added_by?: 'plan' | 'floor' | (string & {});
7502
7628
  floor_reason?: string;
7503
7629
  late?: boolean;
7630
+ /** (crew#894, wicked-core#810) The step's worker pool. A plan step may only LOWER the catalog
7631
+ * phase's pool; a raise is refused (`wicked.team.plan.refused`, reason `pool_raised`). Omitted
7632
+ * when unset. */
7633
+ pool?: number;
7504
7634
  }
7505
7635
 
7506
7636
  export interface TeamPlanOverride {
@@ -7585,6 +7715,8 @@ export type TeamPlanAcceptedPayload = TeamEnvelope & {
7585
7715
  export type TeamPlanRefusedPayload = TeamEnvelope & {
7586
7716
  proposal_id: string;
7587
7717
  base_rev: number | null;
7718
+ /** The engine's refusal reason, verbatim — e.g. `pool_raised` (crew#894, wicked-core#810: a plan
7719
+ * step raised a phase's `pool`; a step may only lower it). */
7588
7720
  reason: string;
7589
7721
  };
7590
7722
 
@@ -7621,6 +7753,9 @@ export type TeamStepClaimedPayload = TeamEnvelope & {
7621
7753
  baseline_tree: string | null;
7622
7754
  repo: { workdir: string; git_dir: string } | null;
7623
7755
  code_graph_db: string | null;
7756
+ /** (crew#894, wicked-core#810) The monitor seat instances summoned beside the claiming creator
7757
+ * (a pool > 1). Omitted when empty. */
7758
+ monitors?: string[];
7624
7759
  };
7625
7760
 
7626
7761
  export type TeamCheckpointReachedPayload = TeamEnvelope & {
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.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",