wicked-crew-api-types 0.100.0 → 0.101.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 +195 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -739,6 +739,32 @@ export interface WorkUnit {
739
739
  /** (crew#894) How that pool was seated, once distributed (see {@link UnitPoolSeating}). ABSENT
740
740
  * for a pool of 1 and before distribution. */
741
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;
742
768
  }
743
769
 
744
770
  /**
@@ -1285,7 +1311,10 @@ export interface GateDecision {
1285
1311
  | 'targeted'
1286
1312
  | 'accept_partial'
1287
1313
  | 'accept_suggestion'
1288
- | 'amend_intent';
1314
+ | 'amend_intent'
1315
+ /** (core#820) A `consent` gate's choice from its dry-run plan (`awaitingHuman.choices`), with
1316
+ * `approve: true`: `consent:worker` (the default), `consent:operator`, …; `reject` declines. */
1317
+ | `consent:${string}`;
1289
1318
  /**
1290
1319
  * Where an approve's `amend` lands (api-types 0.38.0, additive; same release as `action`).
1291
1320
  * Absent = `'cursor'` (today: the gated unit's description). `'creator'` — the first creator
@@ -1377,6 +1406,24 @@ export interface CoreEvent {
1377
1406
  * ABSENT ⇒ nothing is preselected.
1378
1407
  */
1379
1408
  recommended?: number;
1409
+ /**
1410
+ * `awaitingHuman{gateKind: 'consent'}` (core#820): the answer tokens the gate offers, from the
1411
+ * dry-run plan the gated unit depends on (`consent:<id>`…, `reject` last); `recommended` is then
1412
+ * the index of the plan's default choice. ABSENT on every other gate, and on a consent gate with
1413
+ * no plan (see `writeTargetsMissing`).
1414
+ */
1415
+ choices?: string[];
1416
+ /** `awaitingHuman{gateKind: 'consent'}` (core#820): each token's label (`reject` → "Decline"). */
1417
+ choiceLabels?: Record<string, string>;
1418
+ /** `awaitingHuman{gateKind: 'consent'}` (core#820): what each token would write (`reject` → `[]`). */
1419
+ writeTargets?: Record<string, ConsentWriteTarget[]>;
1420
+ /** `awaitingHuman{gateKind: 'consent'}` (core#820): the ord of the dry-run unit the plan came from. */
1421
+ writePlanOrd?: number;
1422
+ /** `awaitingHuman{gateKind: 'consent'}` (core#820): CLIs the plan leaves out, and why. */
1423
+ writeTargetsSkipped?: Array<{ cli: string; why: string }>;
1424
+ /** `awaitingHuman{gateKind: 'consent'}` (core#820): why no write targets are listed (no dry run
1425
+ * ran before the gate, or it printed no plan); the gate is then a plain approve / reject. */
1426
+ writeTargetsMissing?: string;
1380
1427
  /** PTY terminal frames (`terminalOpened`/`terminalOutput`/`terminalExited`): the terminal id. */
1381
1428
  id?: string;
1382
1429
  /**
@@ -5366,6 +5413,9 @@ export interface InteractiveDocSummary {
5366
5413
  name: string;
5367
5414
  /** Manifest `kind`; a manifest without one lists as `doc`. */
5368
5415
  kind: 'doc' | 'html' | 'source' | 'demo';
5416
+ /** Manifest `style` (the bridge's set: `web` | `ppt` | `brochure` | `doc`); ABSENT when the
5417
+ * manifest carries none (the bridge renders that as `web`). */
5418
+ style?: 'web' | 'ppt' | 'brochure' | 'doc' | (string & {});
5369
5419
  /** Head version. */
5370
5420
  head: number;
5371
5421
  /** Lineage size. */
@@ -5436,6 +5486,16 @@ export interface InteractiveDocIndexRow {
5436
5486
  kinds: InteractiveSeamKind[];
5437
5487
  /** The governed runs those seams launched for it (ledger order) — the doc ↔ run binding. */
5438
5488
  runs: string[];
5489
+ /** (crew#896) Manifest `style`, as the per-project list relays it; ABSENT when the manifest
5490
+ * carries none. */
5491
+ style?: 'web' | 'ppt' | 'brochure' | 'doc' | (string & {});
5492
+ /**
5493
+ * (crew#896) The repository grounding the draft seam resolved for this document, read from the
5494
+ * same `crew-grounding.json` sidecar the per-project list reads (see
5495
+ * {@link InteractiveDocSummary.grounding}). ABSENT until a draft launch resolved it, and on a
5496
+ * daemon before api-types 0.100.1.
5497
+ */
5498
+ grounding?: InteractiveDocGrounding;
5439
5499
  }
5440
5500
 
5441
5501
  /** A project docs root the listing could not read (api-types 0.36.0). */
@@ -5574,8 +5634,21 @@ export interface ChatScopeRepo {
5574
5634
  name: string;
5575
5635
  /** The registered root path — the read root the seats are pointed at. */
5576
5636
  rootPath: string;
5637
+ /**
5638
+ * (crew#899) What opening the chat found for this checkout against its upstream: `current`,
5639
+ * `refreshed` (fast-forwarded `commits` to `upstream`, because the tree was clean and had no
5640
+ * commits of its own), or `stale` (`behind` commits, NOT refreshed, `reason` says why; the seats
5641
+ * are told). ABSENT when the root is not a checkout with an upstream, and on an older daemon.
5642
+ */
5643
+ freshness?: ChatCheckoutFreshness;
5577
5644
  }
5578
5645
 
5646
+ /** {@link ChatScopeRepo.freshness} (crew#899). */
5647
+ export type ChatCheckoutFreshness =
5648
+ | { state: 'current'; upstream: string }
5649
+ | { state: 'refreshed'; upstream: string; commits: number }
5650
+ | { state: 'stale'; upstream: string; behind: number; reason: string };
5651
+
5579
5652
  /**
5580
5653
  * What a chat's seats can see — decided at `POST /chats`, stated to the seats in their scratch
5581
5654
  * root's `AGENTS.md` / `CLAUDE.md`, and returned to the caller so the UI can show it. Additive:
@@ -8495,6 +8568,13 @@ export interface CatalogEntry {
8495
8568
  skill_ref: string | null;
8496
8569
  /** The entry's one-line description; `null` when it has none. */
8497
8570
  description: string | null;
8571
+ /**
8572
+ * (wicked-core#816) The entry's worker pool (`PhaseDef::pool_size()`): the most a plan step of
8573
+ * this entry may ask for, since the planner refuses a raise as `pool_raised`; a step may only
8574
+ * lower it. The engine always sends it (1 when the entry declares none). ABSENT from an engine
8575
+ * before core-ts carries #816: read absent as 1.
8576
+ */
8577
+ pool?: number;
8498
8578
  }
8499
8579
 
8500
8580
  /** `GET /catalog`. */
@@ -9639,3 +9719,117 @@ export interface EditorGrantsResponse {
9639
9719
  firstParty: boolean;
9640
9720
  grants: EditorGrant[];
9641
9721
  }
9722
+
9723
+ /** (core#820) One file or directory a consent choice would write, as the install's dry run
9724
+ * resolved it on the daemon host (`awaitingHuman.writeTargets`). */
9725
+ export interface ConsentWriteTarget {
9726
+ path: string;
9727
+ /** What the file is ("claude MCP config"). */
9728
+ what: string;
9729
+ /** The CLI it configures, when it is a CLI's file. */
9730
+ cli?: string;
9731
+ /** The path is the operator's OWN (outside every program-owned root). */
9732
+ operatorOwned: boolean;
9733
+ }
9734
+
9735
+ // ── Project aggregates (crew#371; GET /projects/:id/{requirements,domain,coverage}) ──────────────
9736
+ /** Each `crew.repo` member is one row, never dropped: `ok`, `absent` (nothing generated or indexed
9737
+ * yet), `error`, or `dangling` (a member whose registry record is gone). `reason` says why for
9738
+ * every state but `ok`. */
9739
+ export type ProjectAggregateRowState = 'ok' | 'absent' | 'error' | 'dangling';
9740
+
9741
+ export interface ProjectAggregateRowBase {
9742
+ repo: { id: string; name: string | null };
9743
+ state: ProjectAggregateRowState;
9744
+ reason?: string;
9745
+ }
9746
+
9747
+ export interface ProjectAggregateTotals {
9748
+ repos: number;
9749
+ ok: number;
9750
+ absent: number;
9751
+ errors: number;
9752
+ dangling: number;
9753
+ }
9754
+
9755
+ /** One repo's part of `GET /projects/:id/requirements`. */
9756
+ export interface ProjectRequirementsRow extends ProjectAggregateRowBase {
9757
+ /** Requirements matching the query in this repo (`0` unless `ok`). */
9758
+ total: number;
9759
+ /** This repo's whole corpus (`0` unless `ok`). */
9760
+ corpus: number;
9761
+ orphanedOverrides: number;
9762
+ /** This repo's part of the requested window; `[]` when the window lies in other repos. */
9763
+ items: RequirementSummary[];
9764
+ }
9765
+
9766
+ /**
9767
+ * `GET /projects/:id/requirements?q&risk&category&domain&offset&limit` (crew#371): the same query as
9768
+ * `GET /repos/:id/requirements`, over every repo of the project. `offset`/`limit` (max 200) page a
9769
+ * GLOBAL window over the repos in membership order; each row's `total` says how many of its
9770
+ * requirements match. The synthesized `default` project has no members (empty rows).
9771
+ */
9772
+ export interface ProjectRequirementsResponse {
9773
+ projectId: string;
9774
+ totals: ProjectAggregateTotals & { total: number; corpus: number };
9775
+ offset: number;
9776
+ limit: number;
9777
+ rows: ProjectRequirementsRow[];
9778
+ }
9779
+
9780
+ /** One domain of a repo's `requirements_graph.json`, summarised. */
9781
+ export interface ProjectDomainSummary {
9782
+ name: string;
9783
+ description: string | null;
9784
+ requirements: number;
9785
+ entities: number;
9786
+ }
9787
+
9788
+ export interface ProjectDomainRow extends ProjectAggregateRowBase {
9789
+ domains: ProjectDomainSummary[];
9790
+ }
9791
+
9792
+ /** `GET /projects/:id/domain` (crew#371): per-repo domain summaries and the merged domain list.
9793
+ * Full graphs stay on `GET /repos/:id/domain-graph`; coverage is `GET /projects/:id/coverage`. */
9794
+ export interface ProjectDomainResponse {
9795
+ projectId: string;
9796
+ totals: ProjectAggregateTotals & { domains: number; requirements: number; entities: number };
9797
+ merged: Array<{ name: string; repoIds: string[]; requirements: number; entities: number }>;
9798
+ rows: ProjectDomainRow[];
9799
+ }
9800
+
9801
+ export interface ProjectCoverageRow extends ProjectAggregateRowBase {
9802
+ /** The repo's report WITHOUT `unaccounted_nodes` (their count is `unaccounted`; the list is on
9803
+ * `GET /governance/coverage?repo=`). `null` unless `ok`. */
9804
+ report: Omit<CoverageReport, 'unaccounted_nodes'> | null;
9805
+ }
9806
+
9807
+ /** `GET /projects/:id/coverage` (crew#371): each repo's own coverage report; `totals.coverage` is
9808
+ * sum(resolved) / sum(behavior_bearing) over the `ok` rows, `null` when that is 0/0. */
9809
+ export interface ProjectCoverageResponse {
9810
+ projectId: string;
9811
+ totals: ProjectAggregateTotals & { behavior_bearing: number; resolved: number; coverage: number | null };
9812
+ rows: ProjectCoverageRow[];
9813
+ }
9814
+
9815
+ // ── Product compose (crew#372; POST /projects/:id/product/compose) ──────────────────────────────
9816
+ /**
9817
+ * Draft epics → features → stories from selected requirements of the project (at most 40). The
9818
+ * daemon re-reads each one from its repo's artifact (an unknown or foreign ref is a 400 naming it,
9819
+ * nothing launched) and launches a governed run through `POST /runs`: a `produce` draft step, then
9820
+ * a `review` evaluator with a human gate; `deliver: "none"`. The draft ends with one fenced JSON
9821
+ * plan `{epics:[{title, features:[{title, requirementRefs:[{repoId,key}], stories:[{title,
9822
+ * acceptance:[…]}]}]}]}`. `POST /runs`' own refusals are relayed with their status.
9823
+ */
9824
+ export interface ProductComposeBody {
9825
+ requirements: Array<{ repoId: string; key: string }>;
9826
+ /** The operator's steer for the draft (≤ 500 chars). */
9827
+ instructions?: string;
9828
+ }
9829
+
9830
+ /** `POST /projects/:id/product/compose` 202. */
9831
+ export interface ProductComposeResponse {
9832
+ runId: string;
9833
+ /** How many requirements the draft was handed. */
9834
+ requirements: number;
9835
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.100.0",
3
+ "version": "0.101.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",