wicked-crew-api-types 0.92.0 → 0.95.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 +147 -4
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -539,6 +539,25 @@ export interface AgentSession {
539
539
  * before the field: check `GET /health.capabilities.runChatId` before grouping runs by chat.
540
540
  */
541
541
  chat_id?: string;
542
+ /**
543
+ * (crew#552) The onboarding run this run was CHAINED from (a `capture-learnings` run the daemon
544
+ * launched when that onboarding completed) — read back from the `run.launched` entry after a
545
+ * restart. ABSENT on every other run. The live `/ws` frame is `runChained {session, from, workflow}`.
546
+ */
547
+ chained_from?: string;
548
+ /**
549
+ * (crew#854) `true` on a run an ASK launched (DES-ASK-TEAM-CHAT-001 §3: the chat's path), read back
550
+ * from the `run.launched` trail entry after a restart. ABSENT — never `false` — on any other run
551
+ * and on a daemon before the field.
552
+ */
553
+ ask_path?: true;
554
+ /**
555
+ * (crew#854) `true` while an ask path waits at its TURN gate: `awaiting_human` after an answer
556
+ * step, with no creator step on the run. The next message in the chat is the answer (it continues
557
+ * the path) — a skin draws no gate row and counts nothing as needing you. ABSENT otherwise: a
558
+ * gate at a creator or research step, or after Continue in Build, is a real gate.
559
+ */
560
+ ask_turn?: true;
542
561
  /**
543
562
  * The engine's plan state (wicked-core `TeamPlanState`, DES-TEAMING-002 §8.4-§8.6; api-types
544
563
  * 0.46.0 types the engine field) — present on a run launched from a PLAN or a PRESET, ABSENT on
@@ -1413,6 +1432,30 @@ export interface CoreEvent {
1413
1432
  * named live, and a bundle assembled after a run cannot describe it in different
1414
1433
  * words than the operator watched it happen in. (FINDING-014)
1415
1434
  */
1435
+ /**
1436
+ * The engine's ORPHAN frame (wicked-core `RunOrphaned`, core#124; named here additively for
1437
+ * crew#830). Written to a run's durable event log at actor bootstrap for every session the store
1438
+ * still calls `executing` that the new process restored no worker for — the daemon died mid-run.
1439
+ * It is a REPORT, not a terminal: the run stays `executing` and resumable (`qe/acceptance.ts` keeps
1440
+ * it out of the terminal set on purpose). A trail that ENDS on this frame is a run nobody is
1441
+ * running; a live run's trail continues past it.
1442
+ *
1443
+ * The daemon acts on it at boot: every `executing` run whose trail ends on `runOrphaned` is resumed
1444
+ * once through the engine's `resumeRun` (the same path as `POST /runs/:id/resume`) and the resume is
1445
+ * recorded in the audit trail as `run.resumed` by the `daemon` actor with
1446
+ * `detail: { via: 'boot', status, ord? }` — `via: 'boot'` is what tells it apart from an operator's
1447
+ * manual resume (`detail: { status }`, actor = the caller).
1448
+ */
1449
+ export type RunOrphanedFrame = {
1450
+ type: 'runOrphaned';
1451
+ /** The orphaned run's id. */
1452
+ session: string;
1453
+ /** The cursor unit's 1-based ord (the cursor position when the units could not be read). */
1454
+ ord: number;
1455
+ /** The remedy, spelled out: `POST /api/v1/runs/<id>/resume`. */
1456
+ detail: string;
1457
+ };
1458
+
1416
1459
  /**
1417
1460
  * The stall watchdog's DETECTION frame (crew#287; api-types 0.18.0 — previously daemon-local).
1418
1461
  * DAEMON-SYNTHETIC: broadcast straight to `/ws` when a run in `executing` has been silent on the
@@ -1482,9 +1525,12 @@ export type WorkerStallEscalatedFrame = {
1482
1525
  * `evaluating` — the worker returned and its gate evaluation is in flight, a reassign would start
1483
1526
  * a second creator; `evaluator_distinct` — every other seat is one evaluator ≠ creator forbids
1484
1527
  * (see `avoided`), so the unit was left for a human; `no_output` (outcome `exhausted`) — the
1485
- * reassigned seat produced nothing past a startup banner.
1528
+ * reassigned seat produced nothing past a startup banner; `no_eligible_seat` (crew#833; additive)
1529
+ * — every other seat is one this run BENCHED (see `benched`: quota exhausted, signed out — a seat
1530
+ * the engine already failed over away from) or one evaluator ≠ creator forbids (see `avoided`),
1531
+ * so the unit was left for a human rather than dispatched to a seat known to fail.
1486
1532
  */
1487
- reason?: 'tool_unit' | 'evaluating' | 'evaluator_distinct' | 'no_output';
1533
+ reason?: 'tool_unit' | 'evaluating' | 'evaluator_distinct' | 'no_output' | 'no_eligible_seat';
1488
1534
  /**
1489
1535
  * The seats the failover pick excluded under evaluator ≠ creator (crew#638; additive): a
1490
1536
  * creator cursor avoids the run's evaluator seats, an evaluator cursor the seats that built its
@@ -1492,6 +1538,13 @@ export type WorkerStallEscalatedFrame = {
1492
1538
  * reassign that skipped one and on a `reason: 'evaluator_distinct'` notify; absent otherwise.
1493
1539
  */
1494
1540
  avoided?: string[];
1541
+ /**
1542
+ * The pool seats the failover pick excluded because THIS RUN benched them (crew#833; additive):
1543
+ * `AgentSession.benched_seats` keys — a seat the engine failed over away from (quota exhausted,
1544
+ * signed out, dead) is never a failover target in the same run. Present on an `ok` reassign that
1545
+ * skipped one and on a `reason: 'no_eligible_seat'` notify; absent otherwise.
1546
+ */
1547
+ benched?: string[];
1495
1548
  };
1496
1549
 
1497
1550
  export interface RecordedEvent extends CoreEvent {
@@ -3071,6 +3124,14 @@ export interface SkillsManifestResponse {
3071
3124
  * `manifest.baseline`: different = Refresh baseline, then Publish.
3072
3125
  */
3073
3126
  installed?: InstalledPlugin | null;
3127
+ /**
3128
+ * Whether a `POST /skills/publish` is running on the daemon right now (crew#852; api-types
3129
+ * 0.94.0) — its validate / hash / stage / lock run paced on the event loop, so this read answers
3130
+ * while it runs, and `current` names the PREVIOUS generation until the publish commits and flips
3131
+ * it (a reader sees the old generation or the new one, never half). A second publish in that
3132
+ * window is the 2xx `publish-in-flight` envelope. Absent on a daemon older than 0.8.4.
3133
+ */
3134
+ publishing?: boolean;
3074
3135
  }
3075
3136
 
3076
3137
  /** `SkillsManifestResponse.installed` — the live plugin's identity (wicked-studio#388). */
@@ -4403,6 +4464,13 @@ export interface SystemSettings {
4403
4464
  * launches (those are always `'none'`).
4404
4465
  */
4405
4466
  deliverDefault?: 'pr' | 'none';
4467
+ /**
4468
+ * (crew#552) Whether a completed onboarding run chains a `capture-learnings` run for the same
4469
+ * repo (filed in the onboarding run's project; proposals stay human-gated). Absent reads as
4470
+ * `true`; `false` switches the chain off. A one-off opt-out is `autoCapture: false` on
4471
+ * `POST /repos` / `POST /repos/:id/onboard`.
4472
+ */
4473
+ onboardingAutoCapture?: boolean;
4406
4474
  /**
4407
4475
  * The BASE skill every governed agent unit follows (crew#554 / wicked-core#468; additive): the
4408
4476
  * frontmatter name the daemon exports as the engine-config default `WICKED_BASE_SKILL_REF`, so
@@ -4435,6 +4503,16 @@ export interface SystemSettings {
4435
4503
  * `GH_TOKEN`; `GET /settings` returns this login and no secret ever.
4436
4504
  */
4437
4505
  deliverIdentityLogin?: string;
4506
+ /**
4507
+ * (crew#737) A PUSH IDENTITY PER REGISTERED REPOSITORY: repo id → the GitHub login its deliveries
4508
+ * push as, winning over {@link deliverIdentityLogin}. The deliver phase reads that account's OWN
4509
+ * gh token for the phase (`gh auth token --user`), so another tool switching gh's machine-wide
4510
+ * active account mid-run does not change who pushes; an account gh is not signed in as is named
4511
+ * on the deliver gate card before approval and refused by the phase. A repo absent (or `''`)
4512
+ * falls back to the daemon-wide identity, else the CLI's active account. Logins only — never a
4513
+ * token. `PUT /settings` replaces the whole map; `{}` clears it.
4514
+ */
4515
+ deliverIdentityByRepo?: Record<string, string>;
4438
4516
  /**
4439
4517
  * The stall watchdog's DETECTION threshold (crew#287; api-types 0.18.0 — previously a
4440
4518
  * daemon-local extension): minutes a run in `executing` may go without ANY engine event on the
@@ -4682,6 +4760,12 @@ export interface Project {
4682
4760
  * route boundary, so the wire carries ONE project shape. Always present on a read.
4683
4761
  */
4684
4762
  interactiveRoot?: string | null;
4763
+ /**
4764
+ * (crew#552) This project's override of the `onboardingAutoCapture` setting — whether a completed
4765
+ * onboarding of a repo filed here chains `capture-learnings`. `null` ⇒ the daemon setting applies.
4766
+ * Held crew-side like {@link interactiveRoot}; always present on a read.
4767
+ */
4768
+ autoCapture?: boolean | null;
4685
4769
  [k: string]: unknown;
4686
4770
  }
4687
4771
 
@@ -4728,6 +4812,8 @@ export interface UpdateProjectBody {
4728
4812
  /** DES-MERGE-001 §7.1 — bind this project to a wicked-interactive docs root.
4729
4813
  * `null` clears the binding back to the shared default root. */
4730
4814
  interactiveRoot?: string | null;
4815
+ /** (crew#552) Override `onboardingAutoCapture` for this project; `null` clears it back to the setting. */
4816
+ autoCapture?: boolean | null;
4731
4817
  }
4732
4818
 
4733
4819
  /** `POST /projects/:id/members` body. */
@@ -4930,6 +5016,43 @@ export interface InteractiveStatusPosted {
4930
5016
  /** Wave 6: the unit (ord) the line narrates — the latest unit-scoped engine frame's `ord`, so a
4931
5017
  * skin renders one council at a time. Absent before the first unit-scoped frame. */
4932
5018
  unit_ord?: number;
5019
+ /**
5020
+ * crew#512 (api-types 0.93.0): the document's repository grounding as data — present on exactly
5021
+ * ONE frame per draft launch, the same `working` frame whose `message` is the "Grounded on …" /
5022
+ * "Requested repository … skipped." narration (the text stays, for a skin that renders the
5023
+ * transcript only). A skin keys a persistent header chip off this and never parses the sentence.
5024
+ * Absent on every other frame, on a pre-0.93 daemon, and when the project has no repositories.
5025
+ */
5026
+ grounding?: InteractiveDocGrounding;
5027
+ }
5028
+
5029
+ /**
5030
+ * Where a document is grounded and why (crew#512; api-types 0.93.0) — the structured twin of the
5031
+ * draft seam's "Grounded on …" narration (`groundingNarration`, doc-grounding.ts). Rides the one
5032
+ * `InteractiveStatusPosted` frame that carries the narration and, once recorded, the document's
5033
+ * `InteractiveDocSummary` row — the same object in both places, from the `crew-grounding.json`
5034
+ * sidecar beside the document.
5035
+ */
5036
+ export interface InteractiveDocGrounding {
5037
+ /** Registry ids of the repositories the launch grounded on — the worker reads an offline snapshot
5038
+ * of each. `[]` = not repository-grounded (brief + code graph only). Names resolve through `GET /repos`. */
5039
+ repo_refs: string[];
5040
+ /** Why those: `named` — `repo_ref(s)` on the create request; `brief` — the brief names member repos;
5041
+ * `sole-member` — the project's only repository; `none` — nothing named, nothing inferred. */
5042
+ source: 'named' | 'brief' | 'sole-member' | 'none';
5043
+ /** Requested repositories that grounded nothing, with why (the narration's "skipped" clauses). */
5044
+ skipped: InteractiveDocGroundingSkip[];
5045
+ /** How many repositories the project has — the "1 of N" in a chip; `0` for a repo-less project. */
5046
+ member_count: number;
5047
+ }
5048
+
5049
+ /** One repository a launch did not ground on, as spelled on the request (or its registry id). */
5050
+ export interface InteractiveDocGroundingSkip {
5051
+ ref: string;
5052
+ /** `not-a-member` — not (or no longer) a project member; `ambiguous` — several members share that
5053
+ * name, the registry id disambiguates; `unsnapshotable` — a member whose offline snapshot failed
5054
+ * (too large, unreadable, …), so the task names it but the worker has no copy. */
5055
+ reason: 'not-a-member' | 'ambiguous' | 'unsnapshotable';
4933
5056
  }
4934
5057
 
4935
5058
  // ── EP-C2: a document's checks — the four reviewers (api-types 0.88.0) ─────────────────────────
@@ -5013,6 +5136,14 @@ export interface InteractiveDocSummary {
5013
5136
  retired_at?: string;
5014
5137
  /** The crew project this row was listed under — the mount's `:projectId`. */
5015
5138
  projectId: string;
5139
+ /**
5140
+ * crew#512 (api-types 0.93.0): the repository grounding the draft seam resolved for this document,
5141
+ * read from the `crew-grounding.json` sidecar beside it — the same object the launch's status
5142
+ * frame carried, so a reopened document shows its chip without replaying the thread. Absent
5143
+ * until a draft launch resolved it (a document still generating, one created before this release, an
5144
+ * unfiled document) and on a pre-0.93 daemon.
5145
+ */
5146
+ grounding?: InteractiveDocGrounding;
5016
5147
  }
5017
5148
 
5018
5149
  /**
@@ -6245,7 +6376,10 @@ export interface GovernanceReplayOutcome {
6245
6376
  alreadyPresent: number | null;
6246
6377
  failed: number;
6247
6378
  dryRun: boolean;
6248
- /** The same-event conflation caveat the CLI prints, or `null`. */
6379
+ /** The caveat the CLI prints, or `null`: on a dry run, that the outbox's untimestamped (pre-stamp) entries
6380
+ * cannot be ordered by a replay — they land in file order, and byte-identical unstamped lines share one
6381
+ * replay id (crew#829; `null` when every entry is stamped); on a real replay, the same-event conflation
6382
+ * caveat when entries were `alreadyPresent` and the outbox held unstamped lines. */
6249
6383
  note: string | null;
6250
6384
  /** Dry run only: the outbox fold (the `/diagnostics` dead-letter block minus the legacy pointer). */
6251
6385
  fold?: Omit<DiagnosticsGovernanceDeadletters, 'legacyOutbox'>;
@@ -7781,8 +7915,17 @@ export interface WatchFeedResponse {
7781
7915
  * `watch_finding.cleared` frames would: Fixed, Dismissed, rolled up). api-types 0.73.0.
7782
7916
  */
7783
7917
  cleared?: WatchFindingCleared[];
7784
- /** Present with `run=` only. */
7918
+ /**
7919
+ * Present with `run=` only. On an ENDED run (crew#828) an entry that saw nothing to judge says
7920
+ * "nothing to check: …", never the in-progress "… yet".
7921
+ */
7785
7922
  coverage?: WatchCoverage[];
7923
+ /**
7924
+ * (crew#828) With `run=` only, and only when the run ENDED having recorded no events at all (it ran
7925
+ * before the checks existed, or ungoverned): ONE line for the whole coverage block, which a skin
7926
+ * renders instead of the per-entry rows (each of those carries the same reason). ABSENT otherwise.
7927
+ */
7928
+ coverage_summary?: { state: 'no_evidence'; reason: string };
7786
7929
  }
7787
7930
 
7788
7931
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.92.0",
3
+ "version": "0.95.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",