wicked-crew-api-types 0.186.0 → 0.191.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 +411 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -259,6 +259,12 @@ export interface HealthCapabilities {
259
259
  * send the field (its strict launch schema 400s on it) and do not call the preview.
260
260
  */
261
261
  linkedIssuesExclude?: boolean;
262
+ /**
263
+ * (api-types 0.187.0, DES-PM-001 PM-1) This daemon serves project-management sources: the `pm` registration field,
264
+ * the human-only `/tracker-links` routes (and `/tracker-links/issues`), `GET /sources/:name/trackers`, the tracker
265
+ * set in linked issues (`LinkedIssuesPreviewBody.projectId`), and `/runs/:id/tracker-actions`. Absent = none of it.
266
+ */
267
+ trackerLinks?: boolean;
262
268
  /**
263
269
  * Repo-bound runs get an EVIDENCE ROOT for walkthroughs (WT-W1, api-types 0.74.0): the engine
264
270
  * addon takes `LaunchOptions.evidenceRoot` (wicked-core-ts ≥ 0.7.35), so a walkthrough step on a
@@ -353,6 +359,13 @@ export interface HealthCapabilities {
353
359
  * ABSENT on an older daemon: read as `false` and hide the switch.
354
360
  */
355
361
  powerMode?: boolean | undefined;
362
+ /**
363
+ * (api-types 0.188.0, crew#1139) A `plan_approval` approval carries the operator's note: `GateDecision.amend`
364
+ * on `{approve: true}` or `{approve: true, plan}` at a plan gate lands on the first creator step the plan
365
+ * releases (else its first step) as `unitReworkAmended`. ABSENT or `false` (an engine without it refuses the
366
+ * note): offer no note field on the plan card.
367
+ */
368
+ planGateNote?: boolean | undefined;
356
369
  /**
357
370
  * (api-types 0.156.0, DES-VOICE) Voice mode's routes are served: `GET /voice/status`, `POST|DELETE /voice/model`,
358
371
  * `POST /voice/transcribe` and `GET|PUT /voice/dashboard`. Whether transcription can run NOW (the engine and
@@ -2456,6 +2469,18 @@ export interface GateDecision {
2456
2469
  * `operator_judgment` then applies). Refused (409, gate left open) at every other gate and on a
2457
2470
  * run that does not require QE acceptance. Engine: wicked-core-ts after 0.16.3. */
2458
2471
  | 'skip_qe'
2472
+ /** (api-types 0.190.0, DES-RULE-CHECK-001 S2) At a `rules_unchecked` gate (a steering rule no
2473
+ * judge ruled on), with `approve: true` and no `amend` / `amendScope` / `plan`: RE-RUN THE RULE
2474
+ * CHECK on the same work (the step's seat does not run again; every verdict whose rule and
2475
+ * evidence are unchanged is reused). The engine refuses it at any other gate (409). */
2476
+ | 'retry_rules'
2477
+ /** (api-types 0.190.0) SKIP UNCHECKED STEERING RULES, each with the person's written reason in
2478
+ * {@link GateDecision.skipRules} (required), `approve: true`, no `amend` / `amendScope` / `plan`;
2479
+ * then the check re-runs. A skipped rule's row is `skipped`, labelled with its reason on the
2480
+ * gate receipt and the delivery. Only a rule the gate holds as `unchecked` can be skipped (a
2481
+ * `broken` one denies); the human operator's call alone (a seat or standing order: 403
2482
+ * `human_operator_only`). Refused (409, gate left open) at any other gate. */
2483
+ | 'skip_rules'
2459
2484
  /** (core#820) A `consent` gate's choice from its dry-run plan (`awaitingHuman.choices`), with
2460
2485
  * `approve: true`: `consent:worker` (the default), `consent:operator`, …; `reject` declines. */
2461
2486
  | `consent:${string}`;
@@ -2464,7 +2489,8 @@ export interface GateDecision {
2464
2489
  * Absent = `'cursor'` (today: the gated unit's description). `'creator'` — the first creator
2465
2490
  * phase at or after the cursor receives it (`unitReworkAmended{scope: 'creator'}`) while the
2466
2491
  * cursor dispatches unamended: the intake steer that must reach the fix phase, not triage.
2467
- * Identical text already present on the target is not appended twice.
2492
+ * Identical text already present on the target is not appended twice. At a `plan_approval` gate
2493
+ * it does not apply (api-types 0.188.0): the note lands as {@link GateDecision.plan} says.
2468
2494
  */
2469
2495
  amendScope?: 'cursor' | 'creator';
2470
2496
  /**
@@ -2473,8 +2499,16 @@ export interface GateDecision {
2473
2499
  * `plan.proposed{by:"human", kind:"edit"}`, floor-fills it (phases below the floor are ADDED,
2474
2500
  * never refused) and accepts it as the next `plan_rev` — or refuses it (`plan.refused`) and
2475
2501
  * re-opens the gate under a new `gate_id`, answering `awaiting_human`. Requires `approve: true`
2476
- * and `action` omitted or `'edit_plan'`; `amend` / `amendScope` do not apply. A plain approve
2477
- * (no `plan`) releases the held plan as it is; `approve: false` rejects (cancels).
2502
+ * and `action` omitted or `'edit_plan'`; no `amendScope` (a 400). A plain approve (no `plan`)
2503
+ * releases the held plan as it is; `approve: false` rejects (cancels).
2504
+ *
2505
+ * THE OPERATOR'S NOTE (api-types 0.188.0, crew#1139; {@link HealthCapabilities.planGateNote}): `amend`
2506
+ * on a plan gate's approve, with or without `plan`, is carried to the steps the plan releases. It lands
2507
+ * once the answer applies (after an edit's re-plan, so on the edited plan's units) on the FIRST CREATOR
2508
+ * step at or after the cursor (`unitReworkAmended{scope: 'creator'}`), else on the cursor step
2509
+ * (`scope: 'cursor'`), and the gate's recorded answer carries it. A refused edit re-opens the gate and
2510
+ * lands nothing. An engine without it answers 501 for a note beside `plan` and 409 for one on a plain
2511
+ * approve, with the gate left open.
2478
2512
  */
2479
2513
  plan?: LaunchPlan;
2480
2514
  /**
@@ -2510,6 +2544,9 @@ export interface GateDecision {
2510
2544
  * draft, **409** `draft_changed` when an id is not in the draft as it reads now (the gate stays open).
2511
2545
  */
2512
2546
  keepRules?: string[];
2547
+ /** (api-types 0.190.0) With `action: 'skip_rules'` (and only with it): each unchecked rule to
2548
+ * skip, with the person's written reason (both non-empty, no rule twice). */
2549
+ skipRules?: RuleSkipAnswer[];
2513
2550
  }
2514
2551
 
2515
2552
  /**
@@ -3278,6 +3315,50 @@ export interface AssuranceReceipt {
3278
3315
  * ABSENT when every judge was the run's own (the routine case) or on an older engine. A unit
3279
3316
  * receipt carries at most one; a delivery receipt lists the run's. */
3280
3317
  judgeFallbacks?: JudgeFallback[];
3318
+ /** (api-types 0.190.0, DES-RULE-CHECK-001 S2) Every steering rule in force and its verdict at this
3319
+ * gate (the review step's rule check), or, on a delivery receipt, the worst row per rule across
3320
+ * the run's gates. ABSENT when no rule check ran (not a review gate, no rule store, no change, an
3321
+ * older engine). Deny-dominates: a `broken` row denied the gate, an `unchecked` row held it. */
3322
+ rules?: RuleVerdict[];
3323
+ }
3324
+
3325
+ /** (api-types 0.190.0) A steering rule's verdict: `kept` · `broken` · `n_a` (not applicable) ·
3326
+ * `unchecked` (no judge ruled; holds the gate) · `skipped` (the operator skipped it, with a reason;
3327
+ * a confirmed waiver reads `waived by instruction (…), confirmed by <who>: <reason>`) · `waived`
3328
+ * (the person's own instruction conflicts with the rule: holds the gate until the person confirms
3329
+ * it with a reason through `skip_rules`; never kept, never skipped silently) · `deferred` (api-types
3330
+ * 0.191.0: the rule's subject only exists at delivery, by recorded fact: obligations
3331
+ * `evidence:delivery` or `applies_to` naming only the deliver step; it does not hold review or QE,
3332
+ * and the deliver step's receipt carries its verdict on the pull request's text). */
3333
+ export type RuleVerdictStatus = 'kept' | 'broken' | 'n_a' | 'unchecked' | 'skipped' | 'waived' | 'deferred';
3334
+ /** How it was reached: `fact` (a recorded fact ruled it out) · `judge` (a seat distinct from the
3335
+ * creators ruled) · `machine` (an engine check, e.g. `check:test-fails-on-base`) · `cache` (an
3336
+ * earlier verdict on the same rule and evidence) · `operator` (skipped) · `none` (unchecked). */
3337
+ export type RuleVerdictHow = 'fact' | 'judge' | 'machine' | 'cache' | 'operator' | 'none';
3338
+
3339
+ /** (api-types 0.190.0) One steering rule's row on an assurance receipt. */
3340
+ export interface RuleVerdict {
3341
+ ruleId: string;
3342
+ status: RuleVerdictStatus;
3343
+ how: RuleVerdictHow;
3344
+ /** Why, in words: the fact, the cite, the skip's reason (`skipped by <who>: <reason>`), or why nobody ruled. */
3345
+ reason: string;
3346
+ /** The evidence the judge or the machine check cited, when one ruled. */
3347
+ cite?: string;
3348
+ /** The seat that ruled. */
3349
+ judge?: string;
3350
+ /** SHA-256 of the rule's judged content (statement, criteria, obligations, facets). */
3351
+ ruleKey: string;
3352
+ /** SHA-256 of the evidence the verdict read; absent on a `fact` row. */
3353
+ evidenceKey?: string;
3354
+ }
3355
+
3356
+ /** (api-types 0.190.0) One skip in a `skip_rules` gate answer. */
3357
+ export interface RuleSkipAnswer {
3358
+ /** The unchecked rule's id. */
3359
+ id: string;
3360
+ /** The person's written reason (labelled on the run, the gate and the delivery). */
3361
+ reason: string;
3281
3362
  }
3282
3363
 
3283
3364
  /**
@@ -3604,7 +3685,10 @@ export interface GateEscalatedEvent {
3604
3685
  * (0.7.27) · `governance` · `same_seat_evaluator` (a `dead_seat` condition: the review ran on its
3605
3686
  * builder's seat — core-ts 0.7.46, EX-01) · `evaluator_error` · `judge_unavailable` (a
3606
3687
  * `judge_unavailable` condition; since core-ts 0.7.46 also a required judge with no distinct
3607
- * seat — EX-02). `""` (EMPTY) = a hook veto whose source identity was folded away
3688
+ * seat — EX-02) · `rule_check` (a `rule_broken` condition: a steering rule the review's rule check
3689
+ * found broken, api-types 0.190.0) · `rules_unchecked` (a `rules_unchecked` condition: a rule no
3690
+ * judge ruled on, answered by `retry_rules` / `skip_rules`). `""` (EMPTY) = a hook veto whose
3691
+ * source identity was folded away
3608
3692
  * (`actor.rs` `boundary_deny` arm with no structured denial) — a reader keys copy on
3609
3693
  * `(condition, denialSource)` and treats `""` beside `boundary_deny` as input governance.
3610
3694
  */
@@ -6034,6 +6118,11 @@ export interface LinkedIssuesPreviewBody {
6034
6118
  problem: string;
6035
6119
  repoRef?: string;
6036
6120
  excludeLinkedIssues?: string[];
6121
+ /**
6122
+ * (api-types 0.187.0, DES-PM-001 §3.2) The project the launch is filed in: with a registered PM source, a
6123
+ * reference resolves only through the tracker set of this project and `repoRef`.
6124
+ */
6125
+ projectId?: string;
6037
6126
  }
6038
6127
 
6039
6128
  /** The `POST /linked-issues/preview` 200 body: the same reading `POST /runs` does, nothing launched. */
@@ -6064,6 +6153,23 @@ export interface LinkedIssue {
6064
6153
  chars?: number;
6065
6154
  /** (crew#825; additive) `true` when the launch left this ref out (`excludeLinkedIssues`). */
6066
6155
  excluded?: true;
6156
+ /**
6157
+ * (api-types 0.187.0, DES-PM-001 §3.2, Q-PM5) Read through a registered PM source: the tracker that admitted it,
6158
+ * that source's registry name, and its system. Absent on the daemon's `gh` path (no GitHub source registered).
6159
+ */
6160
+ trackerId?: string;
6161
+ source?: string;
6162
+ system?: PmSystem;
6163
+ /**
6164
+ * (api-types 0.187.0) Why it was not read, as a code: `not_linked` (no tracker of the run's project or repos has
6165
+ * it), `ambiguous` (two trackers in the set share the key: pick one, which writes `<source>:<KEY-N>`), `hidden`
6166
+ * (the source's Agents switches keep this project out), `query_off`, `unavailable` (the vendor could not be
6167
+ * read), `not_found`. To pick among `ambiguous` candidates, write `<source>:<KEY-N>` (two sources) or
6168
+ * `<source>@<tenant>:<KEY-N>` (two sites behind one source).
6169
+ */
6170
+ code?: 'not_linked' | 'ambiguous' | 'hidden' | 'query_off' | 'unavailable' | 'not_found';
6171
+ /** (api-types 0.187.0) `ambiguous` only: the trackers that share the key, for the composer to pick from. */
6172
+ candidates?: Array<{ source: string; tenant: string; tenantLabel?: string; key: string; trackerId: string }>;
6067
6173
  }
6068
6174
 
6069
6175
  /** The `POST /runs` 201 body. `linkedIssues` (crew#627, additive) is present when the intent of a
@@ -7392,6 +7498,10 @@ export interface WorkflowCatalogInput {
7392
7498
  * How a client starts an entry: `run` = `POST /runs {workflow}`; `demo` = `POST /projects/:id/demo`;
7393
7499
  * `compose` = `POST /projects/:id/product/compose` (draft epics); `document` = a new interactive document
7394
7500
  * of that style (its draft run); `chat` = a chat on its own page; `none` = nothing to launch (coming soon).
7501
+ * (api-types 0.187.0, additive) `app` = a new app by chat: `POST /apps` in the project, then the words as its
7502
+ * first turn, `POST /apps/:app/turns` (DES-APPS-001 §6.2); offered only where `GET /health.capabilities.apps.turns`
7503
+ * is true; `repo` = register a repository, which onboards it (`POST /repos`; studio's Add a repository). A
7504
+ * client that does not know a kind shows the entry and does not start it.
7395
7505
  */
7396
7506
  export type WorkflowCatalogLaunch =
7397
7507
  | { kind: 'run'; workflow: string }
@@ -7399,6 +7509,8 @@ export type WorkflowCatalogLaunch =
7399
7509
  | { kind: 'compose' }
7400
7510
  | { kind: 'document'; style: 'web' | 'doc' | 'ppt' | 'brochure' }
7401
7511
  | { kind: 'chat' }
7512
+ | { kind: 'app' }
7513
+ | { kind: 'repo' }
7402
7514
  | { kind: 'none' };
7403
7515
 
7404
7516
  /** The requesting operator's use of an entry (scope: {@link WorkflowCatalogResponse.usage}). */
@@ -12497,6 +12609,35 @@ export interface McpServerConfigBody {
12497
12609
  * response, log, audit entry or file.
12498
12610
  */
12499
12611
  secret?: string;
12612
+ /**
12613
+ * (api-types 0.187.0, DES-PM-001 §3) `mcp-http` and `mcp-stdio` only: this server is a project-management
12614
+ * system's own MCP server (GitHub's `github-mcp-server`, the Atlassian remote server). Its calls then go through
12615
+ * crew's data gate with resource bindings (§3.1), and trackers of it can be linked to projects and repos. A
12616
+ * human operator's only, at the preview and at the save (else 403 `pm_source_human_only`). PM-1 registers `github`
12617
+ * and `jira`; a re-save of a PM source must name the same system (409 `pm_marker_fixed`).
12618
+ */
12619
+ pm?: { system: 'github' | 'jira' };
12620
+ }
12621
+
12622
+ /** (api-types 0.187.0, DES-PM-001 §1) The project-management system a registry entry is. PM-1 registers `github` and `jira`. */
12623
+ export interface McpPmMarker {
12624
+ system: PmSystem;
12625
+ }
12626
+
12627
+ /** (api-types 0.187.0) A project-management system. `gitlab` and `ado` are wave PM-2: a registration naming them is a 400 today. */
12628
+ export type PmSystem = 'github' | 'jira' | 'gitlab' | 'ado';
12629
+
12630
+ /**
12631
+ * (api-types 0.187.0, DES-PM-001 §3.1) A PM tool's resource binding as crew holds it: crew's binding for the tool
12632
+ * (`policy`, e.g. `jira/getJiraIssue@1`), bound to the schema it was reviewed against. In force only while both
12633
+ * match: a changed schema, or a new binding-policy version, makes the tool unavailable to agents until a person
12634
+ * saves the server again. `null` = crew has no binding for this tool, so no agent may use it.
12635
+ */
12636
+ export interface McpToolBinding {
12637
+ policy: string;
12638
+ schemaHash: string;
12639
+ /** Whether it is in force now (the saved schema is the reviewed one and the policy is crew's current one). */
12640
+ inForce: boolean;
12500
12641
  }
12501
12642
 
12502
12643
  /**
@@ -12554,6 +12695,8 @@ export interface McpTool {
12554
12695
  observedSchemaHash: string;
12555
12696
  /** (api-types 0.183.0) The disclosure class in force; `null` = none reviewed for the saved schema. */
12556
12697
  disclosure: McpToolDisclosure | null;
12698
+ /** (api-types 0.187.0) PM entries only: the tool's resource binding; `null` = unbound, so unavailable to agents. */
12699
+ binding?: McpToolBinding | null;
12557
12700
  }
12558
12701
 
12559
12702
  export interface McpServer {
@@ -12602,6 +12745,13 @@ export interface McpServer {
12602
12745
  policyVersion?: string;
12603
12746
  /** (api-types 0.183.0) Data sources only: the agent switches (defaults filled in). */
12604
12747
  agents?: McpSourceAgents;
12748
+ /** (api-types 0.187.0, DES-PM-001) A project-management system's server: its system. */
12749
+ pm?: McpPmMarker;
12750
+ /**
12751
+ * (api-types 0.187.0) PM entries only: the trackers linked to projects or repos, with their links (read-only
12752
+ * here; written only through `POST`/`DELETE /tracker-links`).
12753
+ */
12754
+ trackers?: TrackerLink[];
12605
12755
  /**
12606
12756
  * (api-types 0.174.0) `mcp-http` and `rest` only: the ranges confirmed for this server's
12607
12757
  * connections. A server saved before 0.174.0 shows what crew re-derived for it: the IP literal or
@@ -12657,6 +12807,8 @@ export interface McpServerAgentView {
12657
12807
  tools: Array<{ name: string; subject: string; class: McpToolClass; disclosure: McpToolDisclosure | null; enabled: boolean; status: McpToolStatus }>;
12658
12808
  /** Data sources only. */
12659
12809
  agents?: { see: boolean; query: boolean };
12810
+ /** (api-types 0.187.0) PM entries only. */
12811
+ pm?: McpPmMarker;
12660
12812
  }
12661
12813
 
12662
12814
  /** (api-types 0.183.0) `GET /mcp/servers?view=agent`, and `GET /mcp/servers` for any non-human actor. */
@@ -12741,6 +12893,8 @@ export interface McpPreviewTool {
12741
12893
  * class while its schema is unchanged, crew's own class for a tool of crew's Toolbox configuration, else `null`.
12742
12894
  */
12743
12895
  disclosure: McpToolDisclosure | null;
12896
+ /** (api-types 0.187.0) PM entries only: the binding a save gives the tool; `null` = crew has none, so agents never get it. */
12897
+ binding?: { policy: string } | null;
12744
12898
  }
12745
12899
 
12746
12900
  /**
@@ -13655,8 +13809,15 @@ export interface KnowledgeShapeRecord {
13655
13809
  /** (api-types 0.186.0) A node of the Knowledge map. `key` is `<store>:<id>` (`source:`, `repo:`, `knowledge:`, `estate:`). */
13656
13810
  export interface KnowledgeMapNode {
13657
13811
  key: string;
13658
- kind: 'source' | 'table' | 'shape' | 'code' | 'repo' | 'knowledge';
13812
+ /**
13813
+ * (api-types 0.187.0, DES-PM-001 §3.4) `tracker`: a linked tracker; `project`: a studio project a tracker is
13814
+ * `tracked_in`; `issue`: an issue a run addresses (an `issue_ref`, only its key); `run`: the job that addresses it;
13815
+ * `pr`: the pull request that run delivered (`closes` the issue; `repo` names its repo).
13816
+ */
13817
+ kind: 'source' | 'table' | 'shape' | 'code' | 'repo' | 'knowledge' | 'tracker' | 'project' | 'issue' | 'run' | 'pr';
13659
13818
  label: string;
13819
+ /** (api-types 0.187.0) A tracker node's PM source (registry name) and key. */
13820
+ tracker?: { source: string; key: string };
13660
13821
  /** A table's source name. */
13661
13822
  source?: string;
13662
13823
  /** A code entity's repo id. */
@@ -13699,6 +13860,171 @@ export interface KnowledgeMapResponse {
13699
13860
  notes: string[];
13700
13861
  }
13701
13862
 
13863
+ // ── Project-management trackers (DES-PM-001 rev 4, PM-1; api-types 0.187.0) ───────────────────────────────
13864
+
13865
+ /**
13866
+ * What a tracker link points at: a studio project (`proj_…`) or a registered repo. A tracker linked to a repo is in
13867
+ * the tracker set of every project that repo belongs to, and of any run that targets it; a tracker linked to a
13868
+ * project reaches only units filed in that project, never another project through a shared repo (§3.2).
13869
+ */
13870
+ export type TrackerLinkTarget = { kind: 'project'; id: string } | { kind: 'repo'; id: string };
13871
+
13872
+ /**
13873
+ * One link of one tracker (§3.3). A tracker is (source, tenant, key): one project inside one tenant of a registered PM
13874
+ * system (a Jira project on one site, a GitHub repo's issues). Ids are derived: `trk_` + 16 hex of
13875
+ * sha256(source id, tenant, key) and `tl_` + 16 hex of sha256(tracker id, kind, id), so linking twice is one link.
13876
+ */
13877
+ export interface TrackerLink {
13878
+ /** `tl_<hash16>` */
13879
+ id: string;
13880
+ /** `trk_<hash16>` */
13881
+ trackerId: string;
13882
+ /** The PM source's registry name, for display. */
13883
+ source: string;
13884
+ /** The PM source's registry id. */
13885
+ sourceId: string;
13886
+ system: PmSystem;
13887
+ /** Jira: the site's `cloudId`; GitHub: the host (`github.com`). */
13888
+ tenant: string;
13889
+ /** The tenant as a person reads it (a Jira site's name or URL host); absent when not known. */
13890
+ tenantLabel?: string;
13891
+ /** Jira: the project key (`PROJA`); GitHub: `owner/repo`. */
13892
+ key: string;
13893
+ /** The vendor's name for it, at most 120 characters. Vendor text: render it as text. */
13894
+ label: string;
13895
+ target: TrackerLinkTarget;
13896
+ linkedAt: string;
13897
+ /** The person who linked it (the actor id). */
13898
+ linkedBy: string;
13899
+ /** Whether estate holds the link yet (Understand follows when it lands; access follows the registry at once). */
13900
+ projection: 'current' | 'pending' | 'failed';
13901
+ }
13902
+
13903
+ /** `POST /tracker-links` (human-only). */
13904
+ export interface CreateTrackerLinkBody {
13905
+ /** The PM source's registry name. */
13906
+ source: string;
13907
+ tenant: string;
13908
+ key: string;
13909
+ target: TrackerLinkTarget;
13910
+ }
13911
+
13912
+ /**
13913
+ * `GET /tracker-links?project=<id>`, `?repo=<id>`, or both (human-only; 403 `tracker_links_human_only` for any other
13914
+ * actor). With both, `links` + `viaRepos` are the tracker set a run in that project targeting that repo would have.
13915
+ */
13916
+ export interface TrackerLinksResponse {
13917
+ target: { project?: string; repo?: string };
13918
+ /** Linked to the target itself (the project, or with only `repo`, that repo). */
13919
+ links: TrackerLink[];
13920
+ /** With a project: the links of its member repos (and of `repo`, when given), each marked with the repo it comes through. */
13921
+ viaRepos: Array<TrackerLink & { viaRepo: string }>;
13922
+ /** With only a repo: the projects the repo is in (its links reach each of them). */
13923
+ projects: Array<{ id: string; name: string }>;
13924
+ /** With a project: for each PM source with a link here, whether its Agents switches let this project see / query it. */
13925
+ agents: Array<{ source: string; see: boolean; query: boolean }>;
13926
+ }
13927
+
13928
+ /**
13929
+ * `GET /sources/:name/trackers?q=<text>&cursor=<c>&tenant=<t>` (human-only): one page of the projects the PM source
13930
+ * lists NOW (a live read with the source's own credential), each with its links. `next` is the following page's
13931
+ * cursor, `null` at the end. 503 `source_unavailable` when the vendor cannot be reached; 409 `not_a_tracker` for a
13932
+ * source that is not a PM system.
13933
+ */
13934
+ export interface SourceTrackersResponse {
13935
+ name: string;
13936
+ trackers: Array<{ tenant: string; tenantLabel?: string; key: string; label: string; links: TrackerLink[] }>;
13937
+ next: string | null;
13938
+ }
13939
+
13940
+ /**
13941
+ * `GET /tracker-links/issues?project=<id>&repo=<id>&q=<text>` (human-only): for "Start a job from an issue" (§6 step 1),
13942
+ * the issues of each tracker in the tracker set that project and repo would give a run (under the sources' Agents
13943
+ * switches), read live through the same bindings and response projectors an agent's reads go through. `key` is the
13944
+ * reference a launch intent takes (`PROJA-12`, `owner/repo#212`). A tracker that cannot be read says why in `error`
13945
+ * (`query_off`, `unavailable`, `tool_unbound`) and has no issues.
13946
+ */
13947
+ export interface TrackerIssuesResponse {
13948
+ trackers: Array<{
13949
+ trackerId: string;
13950
+ source: string;
13951
+ system: PmSystem;
13952
+ key: string;
13953
+ label: string;
13954
+ tenantLabel?: string;
13955
+ via: { kind: 'project' } | { kind: 'repo'; id: string };
13956
+ /** Jira: the site's cloudId; GitHub: the host. */
13957
+ tenant: string;
13958
+ /** `ref`: the reference a launch intent takes for it (`<source>@<tenant>:KEY-N` when two trackers share the key). */
13959
+ issues: Array<{ key: string; ref: string; title: string; state: string | null }>;
13960
+ error?: string;
13961
+ }>;
13962
+ }
13963
+
13964
+ /**
13965
+ * (DES-PM-001 §5) A governed action on an issue of a run's tracker set: a comment, a transition, or both on one card.
13966
+ * `POST /runs/:id/tracker-actions` (human-only). Without `confirm` it does NOTHING and answers the card (exactly what
13967
+ * would be posted, as whom, from and to which state, and the link that admits the issue) and its `actionHash`; with
13968
+ * `confirm` equal to that hash it does exactly that. An issue outside the run's tracker set has no card: 404
13969
+ * `issue_not_in_tracker_set`. Recorded against the run and audited `knowledge.tracker.action`.
13970
+ */
13971
+ export interface TrackerActionBody {
13972
+ /**
13973
+ * Jira `PROJA-1` (`<source>:PROJA-1` or `<source>@<cloudId>:PROJA-1` picks one of several trackers with that key);
13974
+ * GitHub `owner/repo#42` (or `#42` for the run's own repo).
13975
+ */
13976
+ issue: string;
13977
+ /** The exact comment text (at most 8,000 characters). */
13978
+ comment?: string;
13979
+ /** The state to move it to, by name: a Jira transition's target status (`In Review`), or GitHub `closed` / `open`. */
13980
+ transition?: string;
13981
+ confirm?: string;
13982
+ }
13983
+
13984
+ export interface TrackerActionCard {
13985
+ runId: string;
13986
+ source: string;
13987
+ system: PmSystem;
13988
+ tenant: string;
13989
+ tenantLabel?: string;
13990
+ /** The issue as the tracker names it (`PROJA-1`, `owner/repo#42`). */
13991
+ issue: string;
13992
+ /** The issue's title; vendor text, render it as text. `null` when it could not be read. */
13993
+ title: string | null;
13994
+ /** Who the tracker will say did it (the registered credential's account), `null` when it could not be read. */
13995
+ identity: string | null;
13996
+ comment?: string;
13997
+ transition?: {
13998
+ from: string | null;
13999
+ to: string;
14000
+ /** The states mapped to `todo` / `doing` / `done` (Jira status categories; GitHub open = todo, closed = done). */
14001
+ mapped: { from: 'todo' | 'doing' | 'done' | null; to: 'todo' | 'doing' | 'done' | null };
14002
+ };
14003
+ /** The link that admits the issue for this run: to its project, or through one of its repos. */
14004
+ admittedBy: { kind: 'project'; id: string } | { kind: 'repo'; id: string };
14005
+ }
14006
+
14007
+ export type TrackerActionResponse =
14008
+ | { done: false; card: TrackerActionCard; actionHash: string }
14009
+ | {
14010
+ done: true;
14011
+ card: TrackerActionCard;
14012
+ at: string;
14013
+ /** Each part as it went; a transition after a failed comment is not attempted. */
14014
+ results: Array<{ part: 'comment' | 'transition'; ok: boolean; error?: string }>;
14015
+ };
14016
+
14017
+ /**
14018
+ * `GET /runs/:id/tracker-actions` (human-only): the issues this run addresses (resolved at launch through its tracker
14019
+ * set) that a governed action can be proposed for, each with the link that still admits it (`null`: no longer in the
14020
+ * run's tracker set, so no card).
14021
+ */
14022
+ export interface RunTrackerIssuesResponse {
14023
+ runId: string;
14024
+ /** `ref`: the reference `POST` takes for it (`<source>@<tenant>:KEY-N` when two trackers of the run's set share the key). */
14025
+ issues: Array<{ issue: string; ref: string; source: string; system: PmSystem; trackerId: string; admittedBy: TrackerActionCard['admittedBy'] | null }>;
14026
+ }
14027
+
13702
14028
  /**
13703
14029
  * `POST /sources/:name/test-call` (G6) — human operator only. Without `confirm` it sends NOTHING and
13704
14030
  * answers the exact request it would send and its `requestHash`; with `confirm` equal to that hash it
@@ -15428,8 +15754,12 @@ export interface AppLinkComponent extends AppComponentBase {
15428
15754
  to: AppLinkTarget;
15429
15755
  }
15430
15756
 
15431
- /** A source kind a query reads; it names the text file: `sql` `.sql`, `graphql` `.graphql`, else `.json`. */
15432
- export type AppQueryKind = 'sql' | 'graphql' | 'rest' | 'mcp' | 'crew';
15757
+ /**
15758
+ * A source kind a query reads; it names the text file: `sql` `.sql`, `graphql` `.graphql`, else `.json`.
15759
+ * (api-types 0.189.0) `recall` reads the system's KNOWLEDGE (DES-KNOWLEDGE-DATA-001 §9.1) in the app's own project,
15760
+ * on the reserved source `estate`: its text is an {@link AppRecallQueryText}. Studio-hosted only: Publish refuses it.
15761
+ */
15762
+ export type AppQueryKind = 'sql' | 'graphql' | 'rest' | 'mcp' | 'crew' | 'recall';
15433
15763
 
15434
15764
  /** A declared output column's type. A value the source cannot confirm is validated on every row (DES §7.2). */
15435
15765
  export type AppColumnType = 'string' | 'number' | 'integer' | 'boolean' | 'date' | 'datetime';
@@ -15615,6 +15945,80 @@ export interface AppCrewQueryText {
15615
15945
  query: Record<string, AppQueryArg>;
15616
15946
  }
15617
15947
 
15948
+ /**
15949
+ * (api-types 0.189.0, DES-KNOWLEDGE-DATA-001 §9.1) `queries/<id>.json` of a `recall` query (source `estate`): one
15950
+ * read of the knowledge the APP'S project may see (crew computes `visible` from the app's project, never from the
15951
+ * request, and re-checks every item before release). `from` names what is read:
15952
+ *
15953
+ * - `knowledge`: documents, source structure and approved data shapes (estate recall); needs `query`; `source`
15954
+ * keeps only what was derived from that registry source;
15955
+ * - `memories`: what the project remembers (estate memory recall, the project's facet); needs `query`;
15956
+ * - `steering`: the active steering rules that apply to the project; `query` keeps rules whose statement holds its
15957
+ * words;
15958
+ * - `tables`: one registry source's tables as estate holds them (structure, never rows), with each table's approved
15959
+ * data shape (its text says what the table joins); needs `source`, takes no `query`.
15960
+ *
15961
+ * Rows have the columns of {@link AppRecallColumns} for that `from` (an app's `output` declares a subset, with
15962
+ * exactly these types); with `group` they are `key` (string) and `count` (integer) per value of that column instead.
15963
+ * `limit` is 1-50 (default 20). Text from a source's structure is marked `untrusted`.
15964
+ */
15965
+ export interface AppRecallQueryText {
15966
+ from: AppRecallFrom;
15967
+ /**
15968
+ * The words recalled: a literal of 1-200 characters, or the query's ONE parameter (a string, never viewer-bound:
15969
+ * no `from`), which a search filter binds.
15970
+ */
15971
+ query?: AppQueryArg;
15972
+ /** A registry source name (`tables`: required; `knowledge`: optional). */
15973
+ source?: string;
15974
+ group?: 'kind' | 'source' | 'severity';
15975
+ limit?: number;
15976
+ }
15977
+
15978
+ export type AppRecallFrom = 'knowledge' | 'memories' | 'steering' | 'tables';
15979
+
15980
+ /**
15981
+ * (api-types 0.189.0) The columns a `recall` query answers, per `from`, with their types. Every `from` has `title`,
15982
+ * `content`, `cite` (where it came from: `memory:<id>`, `rule:<id>`, `src:<source>/<table>`, a document's
15983
+ * provenance) and `kind` (document, table, shape or note; a memory's tier; a rule's steering type).
15984
+ */
15985
+ export interface AppRecallColumns {
15986
+ knowledge: 'title' | 'content' | 'cite' | 'kind' | 'source' | 'score' | 'untrusted';
15987
+ memories: 'title' | 'content' | 'cite' | 'kind' | 'score';
15988
+ steering: 'title' | 'content' | 'cite' | 'kind' | 'severity';
15989
+ tables: 'title' | 'content' | 'cite' | 'kind' | 'columns' | 'shape' | 'untrusted';
15990
+ }
15991
+
15992
+ /**
15993
+ * (api-types 0.189.0) `GET /knowledge/summary?project=<id>` (a HUMAN operator): what knowledge an app in that project
15994
+ * can be built on, as counts and registry names only (never a row, a document's text or a memory's words). The same
15995
+ * summary is in the apps builder's knowledge package, so a suggestion never names knowledge the builder cannot use.
15996
+ */
15997
+ export interface KnowledgeSummaryResponse {
15998
+ projectId: string;
15999
+ /** The data sources the project may see (the agents switch `see`), in name order. */
16000
+ sources: Array<{
16001
+ name: string;
16002
+ /** Its structure is in estate under its current description (a `tables` query can read it). */
16003
+ described: boolean;
16004
+ /** Agents may read its rows for this project. */
16005
+ query: boolean;
16006
+ /**
16007
+ * Approved data shapes on it that the project may see, each verified against estate's own node and deps, counted
16008
+ * up to 5. `null` = the count could not be established (the review queue or a shape's node could not be read, or
16009
+ * the summary's budget ran out before enough were checked): unknown, not zero.
16010
+ */
16011
+ shapes: number | null;
16012
+ }>;
16013
+ /**
16014
+ * Memories a recall in this project can reach (every facet of a memory must match the project's: faceted to it, or
16015
+ * to nothing), working memories left out (an app's memory recall leaves them out too). `null` = estate did not answer.
16016
+ */
16017
+ memories: { project: number; shared: number } | null;
16018
+ /** Active steering rules that apply to this project, by steering type. `null` = the engine did not answer. */
16019
+ steering: { total: number; byType: Partial<Record<SteeringType, number>> } | null;
16020
+ }
16021
+
15618
16022
  // How a query's text binds its parameters (api-types 0.176.0): SQL `$n` (Postgres) and the n-th `?` (MySQL,
15619
16023
  // SQLite) bind the n-th parameter in the order `params.properties` declares them, and every declared
15620
16024
  // parameter is used; GraphQL variables are the parameters by name; `.json` texts name them in `AppQueryArg`s.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.186.0",
3
+ "version": "0.191.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",