wicked-crew-api-types 0.100.1 → 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.
- package/index.d.ts +149 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1311,7 +1311,10 @@ export interface GateDecision {
|
|
|
1311
1311
|
| 'targeted'
|
|
1312
1312
|
| 'accept_partial'
|
|
1313
1313
|
| 'accept_suggestion'
|
|
1314
|
-
| '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}`;
|
|
1315
1318
|
/**
|
|
1316
1319
|
* Where an approve's `amend` lands (api-types 0.38.0, additive; same release as `action`).
|
|
1317
1320
|
* Absent = `'cursor'` (today: the gated unit's description). `'creator'` — the first creator
|
|
@@ -1403,6 +1406,24 @@ export interface CoreEvent {
|
|
|
1403
1406
|
* ABSENT ⇒ nothing is preselected.
|
|
1404
1407
|
*/
|
|
1405
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;
|
|
1406
1427
|
/** PTY terminal frames (`terminalOpened`/`terminalOutput`/`terminalExited`): the terminal id. */
|
|
1407
1428
|
id?: string;
|
|
1408
1429
|
/**
|
|
@@ -5613,8 +5634,21 @@ export interface ChatScopeRepo {
|
|
|
5613
5634
|
name: string;
|
|
5614
5635
|
/** The registered root path — the read root the seats are pointed at. */
|
|
5615
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;
|
|
5616
5644
|
}
|
|
5617
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
|
+
|
|
5618
5652
|
/**
|
|
5619
5653
|
* What a chat's seats can see — decided at `POST /chats`, stated to the seats in their scratch
|
|
5620
5654
|
* root's `AGENTS.md` / `CLAUDE.md`, and returned to the caller so the UI can show it. Additive:
|
|
@@ -9685,3 +9719,117 @@ export interface EditorGrantsResponse {
|
|
|
9685
9719
|
firstParty: boolean;
|
|
9686
9720
|
grants: EditorGrant[];
|
|
9687
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.
|
|
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",
|