wicked-crew-api-types 0.86.0 → 0.88.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 +91 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1797,8 +1797,15 @@ export interface GovernanceHookFiredEvent {
1797
1797
  ord: number;
1798
1798
  attempt: number;
1799
1799
  toolName: string;
1800
- decision: 'allow' | 'deny';
1800
+ /** `allow_with_conditions` (typed from api-types 0.87.0): the engine permits with obligations. */
1801
+ decision: 'allow' | 'deny' | 'allow_with_conditions';
1801
1802
  denyingPolicy: string | null;
1803
+ /**
1804
+ * (TR-W2, wicked-core-ts >= 0.7.35; api-types 0.87.0) EVERY steering rule that fired on this
1805
+ * call, whatever the decision — the `warn` class included, which an allow decision used to drop.
1806
+ * The watch registry's `risky-call` entry projects the warn-effect ones. Absent on an older engine.
1807
+ */
1808
+ firedPolicies?: string[];
1802
1809
  }
1803
1810
 
1804
1811
  /** P2 — a pinned deterministic validator was attached; confirms the governance floor is armed. */
@@ -2102,6 +2109,32 @@ export type RepoChecksEvaluatedEvent = {
2102
2109
  * `typecheck`/`lint`/`test` script, …) — the reason an empty `checks` is empty; `null` when
2103
2110
  * detection succeeded. */
2104
2111
  detectError?: string | null;
2112
+ /**
2113
+ * (wicked-core#469; typed here from api-types 0.87.0) How the floor ended: `passed` | `failed` |
2114
+ * `timed_out` | `not_run`. A floor that did not finish, or could not run at all (no write
2115
+ * boundary — see `sandboxError`), is never "its checks failed". Absent on an older engine.
2116
+ */
2117
+ outcome?: string;
2118
+ /**
2119
+ * (wicked-core#467; typed here from api-types 0.87.0) Whose floor this was: `creator` (the seat
2120
+ * handed back output and the engine ran the repo checks on its tree — a failing one is the
2121
+ * structural "handed back as finished, its own checks failed", TR-W6) or `verify` (the
2122
+ * code-verifying unit's, and the deliver re-check). Absent on an older engine.
2123
+ */
2124
+ floor?: string;
2125
+ /**
2126
+ * (wicked-core#467) A creator transcript's "pre-existing failure" claim, judged against the
2127
+ * baseline diff: `verdict` is `claim_rejected` | `claim_confirmed` | `unverified`. `null` when no
2128
+ * claim was made or the floor was green.
2129
+ */
2130
+ claim?: { phrase: string; check: string; verdict: string } | null;
2131
+ /**
2132
+ * (TR-W1b, wicked-core-ts >= 0.7.35) The repo-relative paths the step changed, `git diff-tree
2133
+ * --name-status` baseline → floor tree. Absent when the tree did not change; capped at 200 with
2134
+ * `changedTruncated: true`.
2135
+ */
2136
+ changed?: Array<{ status: string; path: string }>;
2137
+ changedTruncated?: boolean;
2105
2138
  };
2106
2139
 
2107
2140
  // ── wicked-core#431 gate / deliver evidence (F-3R2-013 / -010 / -009; api-types 0.33.0) ──────────
@@ -4869,6 +4902,63 @@ export interface InteractiveStatusPosted {
4869
4902
  unit_ord?: number;
4870
4903
  }
4871
4904
 
4905
+ // ── EP-C2: a document's checks — the four reviewers (api-types 0.88.0) ─────────────────────────
4906
+
4907
+ /** The four reviewers, by `wicked.interactive.review.requested`'s schema id (Intent = `match`, Quality = `qe`). */
4908
+ export type DocReviewerId = 'match' | 'a11y' | 'copy' | 'qe';
4909
+
4910
+ /** Where a document check came from, in the checks panel's words. */
4911
+ export type DocCheckSource = 'review:intent' | 'review:a11y' | 'review:copy' | 'review:quality';
4912
+
4913
+ /** One thing a reviewer found. A finding never edits the document; fixing it is the operator's choice. */
4914
+ export interface DocCheckFinding {
4915
+ /** The `data-wid` the finding is about; `null` = unanchored (the host says so, and checks the anchor against its own inventory). */
4916
+ wid: string | null;
4917
+ severity: 'low' | 'medium' | 'high';
4918
+ sentence: string;
4919
+ }
4920
+
4921
+ /**
4922
+ * One reviewer's verdict on one saved version of a document — a wicked-ledger verdict row, stamped
4923
+ * with the crew run that produced it (`run_id`). There is no second verdict store.
4924
+ */
4925
+ export interface DocCheck {
4926
+ /** The ledger verdict row's id. */
4927
+ id: string;
4928
+ source: DocCheckSource;
4929
+ reviewer: DocReviewerId;
4930
+ /** The version that was reviewed. A check on an older version than the one asked for is shown "on version N". */
4931
+ version: number;
4932
+ /** `pass` (nothing needs changing) · `fail` (changes asked for) · `inconclusive` (the reviewer could not run). */
4933
+ state: 'pass' | 'fail' | 'inconclusive';
4934
+ /** One plain sentence: why this state. */
4935
+ sentence: string;
4936
+ findings: DocCheckFinding[];
4937
+ /**
4938
+ * Who reviewed. `evaluator` is true only when the document's authoring runs are on record AND the
4939
+ * reviewing seat is not one of their seats — shown, never inferred. `author_known: false` (a version
4940
+ * the operator typed, or runs no longer on record) means no seat could be excluded, and says so.
4941
+ */
4942
+ by: { seat: string | null; evaluator: boolean; excluded_seats: string[]; author_known: boolean };
4943
+ /** The skill the reviewer loaded; `null` when it worked from the built-in rubric (the skill is not installed). */
4944
+ skill: string | null;
4945
+ run_id: string;
4946
+ /** ISO-8601: when the verdict was recorded. */
4947
+ at: string;
4948
+ }
4949
+
4950
+ /**
4951
+ * `GET /projects/:projectId/interactive/docs/:doc/checks?version=` → 200. Per reviewer, the newest
4952
+ * verdict at or below `version` (every version when omitted) — so a newer review replaces an older
4953
+ * one, and an older one stays visible until then. `checks: []` = never reviewed.
4954
+ */
4955
+ export interface DocChecksResponse {
4956
+ document_id: string;
4957
+ /** The `version` asked for; `null` when the query named none. */
4958
+ version: number | null;
4959
+ checks: DocCheck[];
4960
+ }
4961
+
4872
4962
  /**
4873
4963
  * One row of `GET /projects/:projectId/interactive/api/docs` (crew#472) — the bridge's own
4874
4964
  * `GET /api/docs` row (interactive's `listDocs` shape, relayed field-for-field) stamped with the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.86.0",
3
+ "version": "0.88.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",