wicked-crew-api-types 0.92.0 → 0.94.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 +93 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1413,6 +1413,30 @@ export interface CoreEvent {
1413
1413
  * named live, and a bundle assembled after a run cannot describe it in different
1414
1414
  * words than the operator watched it happen in. (FINDING-014)
1415
1415
  */
1416
+ /**
1417
+ * The engine's ORPHAN frame (wicked-core `RunOrphaned`, core#124; named here additively for
1418
+ * crew#830). Written to a run's durable event log at actor bootstrap for every session the store
1419
+ * still calls `executing` that the new process restored no worker for — the daemon died mid-run.
1420
+ * It is a REPORT, not a terminal: the run stays `executing` and resumable (`qe/acceptance.ts` keeps
1421
+ * it out of the terminal set on purpose). A trail that ENDS on this frame is a run nobody is
1422
+ * running; a live run's trail continues past it.
1423
+ *
1424
+ * The daemon acts on it at boot: every `executing` run whose trail ends on `runOrphaned` is resumed
1425
+ * once through the engine's `resumeRun` (the same path as `POST /runs/:id/resume`) and the resume is
1426
+ * recorded in the audit trail as `run.resumed` by the `daemon` actor with
1427
+ * `detail: { via: 'boot', status, ord? }` — `via: 'boot'` is what tells it apart from an operator's
1428
+ * manual resume (`detail: { status }`, actor = the caller).
1429
+ */
1430
+ export type RunOrphanedFrame = {
1431
+ type: 'runOrphaned';
1432
+ /** The orphaned run's id. */
1433
+ session: string;
1434
+ /** The cursor unit's 1-based ord (the cursor position when the units could not be read). */
1435
+ ord: number;
1436
+ /** The remedy, spelled out: `POST /api/v1/runs/<id>/resume`. */
1437
+ detail: string;
1438
+ };
1439
+
1416
1440
  /**
1417
1441
  * The stall watchdog's DETECTION frame (crew#287; api-types 0.18.0 — previously daemon-local).
1418
1442
  * DAEMON-SYNTHETIC: broadcast straight to `/ws` when a run in `executing` has been silent on the
@@ -1482,9 +1506,12 @@ export type WorkerStallEscalatedFrame = {
1482
1506
  * `evaluating` — the worker returned and its gate evaluation is in flight, a reassign would start
1483
1507
  * a second creator; `evaluator_distinct` — every other seat is one evaluator ≠ creator forbids
1484
1508
  * (see `avoided`), so the unit was left for a human; `no_output` (outcome `exhausted`) — the
1485
- * reassigned seat produced nothing past a startup banner.
1509
+ * reassigned seat produced nothing past a startup banner; `no_eligible_seat` (crew#833; additive)
1510
+ * — every other seat is one this run BENCHED (see `benched`: quota exhausted, signed out — a seat
1511
+ * the engine already failed over away from) or one evaluator ≠ creator forbids (see `avoided`),
1512
+ * so the unit was left for a human rather than dispatched to a seat known to fail.
1486
1513
  */
1487
- reason?: 'tool_unit' | 'evaluating' | 'evaluator_distinct' | 'no_output';
1514
+ reason?: 'tool_unit' | 'evaluating' | 'evaluator_distinct' | 'no_output' | 'no_eligible_seat';
1488
1515
  /**
1489
1516
  * The seats the failover pick excluded under evaluator ≠ creator (crew#638; additive): a
1490
1517
  * creator cursor avoids the run's evaluator seats, an evaluator cursor the seats that built its
@@ -1492,6 +1519,13 @@ export type WorkerStallEscalatedFrame = {
1492
1519
  * reassign that skipped one and on a `reason: 'evaluator_distinct'` notify; absent otherwise.
1493
1520
  */
1494
1521
  avoided?: string[];
1522
+ /**
1523
+ * The pool seats the failover pick excluded because THIS RUN benched them (crew#833; additive):
1524
+ * `AgentSession.benched_seats` keys — a seat the engine failed over away from (quota exhausted,
1525
+ * signed out, dead) is never a failover target in the same run. Present on an `ok` reassign that
1526
+ * skipped one and on a `reason: 'no_eligible_seat'` notify; absent otherwise.
1527
+ */
1528
+ benched?: string[];
1495
1529
  };
1496
1530
 
1497
1531
  export interface RecordedEvent extends CoreEvent {
@@ -3071,6 +3105,14 @@ export interface SkillsManifestResponse {
3071
3105
  * `manifest.baseline`: different = Refresh baseline, then Publish.
3072
3106
  */
3073
3107
  installed?: InstalledPlugin | null;
3108
+ /**
3109
+ * Whether a `POST /skills/publish` is running on the daemon right now (crew#852; api-types
3110
+ * 0.94.0) — its validate / hash / stage / lock run paced on the event loop, so this read answers
3111
+ * while it runs, and `current` names the PREVIOUS generation until the publish commits and flips
3112
+ * it (a reader sees the old generation or the new one, never half). A second publish in that
3113
+ * window is the 2xx `publish-in-flight` envelope. Absent on a daemon older than 0.8.4.
3114
+ */
3115
+ publishing?: boolean;
3074
3116
  }
3075
3117
 
3076
3118
  /** `SkillsManifestResponse.installed` — the live plugin's identity (wicked-studio#388). */
@@ -4930,6 +4972,43 @@ export interface InteractiveStatusPosted {
4930
4972
  /** Wave 6: the unit (ord) the line narrates — the latest unit-scoped engine frame's `ord`, so a
4931
4973
  * skin renders one council at a time. Absent before the first unit-scoped frame. */
4932
4974
  unit_ord?: number;
4975
+ /**
4976
+ * crew#512 (api-types 0.93.0): the document's repository grounding as data — present on exactly
4977
+ * ONE frame per draft launch, the same `working` frame whose `message` is the "Grounded on …" /
4978
+ * "Requested repository … skipped." narration (the text stays, for a skin that renders the
4979
+ * transcript only). A skin keys a persistent header chip off this and never parses the sentence.
4980
+ * Absent on every other frame, on a pre-0.93 daemon, and when the project has no repositories.
4981
+ */
4982
+ grounding?: InteractiveDocGrounding;
4983
+ }
4984
+
4985
+ /**
4986
+ * Where a document is grounded and why (crew#512; api-types 0.93.0) — the structured twin of the
4987
+ * draft seam's "Grounded on …" narration (`groundingNarration`, doc-grounding.ts). Rides the one
4988
+ * `InteractiveStatusPosted` frame that carries the narration and, once recorded, the document's
4989
+ * `InteractiveDocSummary` row — the same object in both places, from the `crew-grounding.json`
4990
+ * sidecar beside the document.
4991
+ */
4992
+ export interface InteractiveDocGrounding {
4993
+ /** Registry ids of the repositories the launch grounded on — the worker reads an offline snapshot
4994
+ * of each. `[]` = not repository-grounded (brief + code graph only). Names resolve through `GET /repos`. */
4995
+ repo_refs: string[];
4996
+ /** Why those: `named` — `repo_ref(s)` on the create request; `brief` — the brief names member repos;
4997
+ * `sole-member` — the project's only repository; `none` — nothing named, nothing inferred. */
4998
+ source: 'named' | 'brief' | 'sole-member' | 'none';
4999
+ /** Requested repositories that grounded nothing, with why (the narration's "skipped" clauses). */
5000
+ skipped: InteractiveDocGroundingSkip[];
5001
+ /** How many repositories the project has — the "1 of N" in a chip; `0` for a repo-less project. */
5002
+ member_count: number;
5003
+ }
5004
+
5005
+ /** One repository a launch did not ground on, as spelled on the request (or its registry id). */
5006
+ export interface InteractiveDocGroundingSkip {
5007
+ ref: string;
5008
+ /** `not-a-member` — not (or no longer) a project member; `ambiguous` — several members share that
5009
+ * name, the registry id disambiguates; `unsnapshotable` — a member whose offline snapshot failed
5010
+ * (too large, unreadable, …), so the task names it but the worker has no copy. */
5011
+ reason: 'not-a-member' | 'ambiguous' | 'unsnapshotable';
4933
5012
  }
4934
5013
 
4935
5014
  // ── EP-C2: a document's checks — the four reviewers (api-types 0.88.0) ─────────────────────────
@@ -5013,6 +5092,14 @@ export interface InteractiveDocSummary {
5013
5092
  retired_at?: string;
5014
5093
  /** The crew project this row was listed under — the mount's `:projectId`. */
5015
5094
  projectId: string;
5095
+ /**
5096
+ * crew#512 (api-types 0.93.0): the repository grounding the draft seam resolved for this document,
5097
+ * read from the `crew-grounding.json` sidecar beside it — the same object the launch's status
5098
+ * frame carried, so a reopened document shows its chip without replaying the thread. Absent
5099
+ * until a draft launch resolved it (a document still generating, one created before this release, an
5100
+ * unfiled document) and on a pre-0.93 daemon.
5101
+ */
5102
+ grounding?: InteractiveDocGrounding;
5016
5103
  }
5017
5104
 
5018
5105
  /**
@@ -6245,7 +6332,10 @@ export interface GovernanceReplayOutcome {
6245
6332
  alreadyPresent: number | null;
6246
6333
  failed: number;
6247
6334
  dryRun: boolean;
6248
- /** The same-event conflation caveat the CLI prints, or `null`. */
6335
+ /** The caveat the CLI prints, or `null`: on a dry run, that the outbox's untimestamped (pre-stamp) entries
6336
+ * cannot be ordered by a replay — they land in file order, and byte-identical unstamped lines share one
6337
+ * replay id (crew#829; `null` when every entry is stamped); on a real replay, the same-event conflation
6338
+ * caveat when entries were `alreadyPresent` and the outbox held unstamped lines. */
6249
6339
  note: string | null;
6250
6340
  /** Dry run only: the outbox fold (the `/diagnostics` dead-letter block minus the legacy pointer). */
6251
6341
  fold?: Omit<DiagnosticsGovernanceDeadletters, 'legacyOutbox'>;
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.94.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",