wicked-crew-api-types 0.5.1 → 0.7.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 +54 -0
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -288,6 +288,39 @@ export interface OpenPathBody {
288
288
  runId?: string;
289
289
  }
290
290
 
291
+ /**
292
+ * Response of `GET /runs/:id/files?path=<abs>` (DES-FEEDBACK-002 CREW-1) — a capped, read-only
293
+ * file read contained against the SAME root set `POST /open` validates (run workdir + extra
294
+ * write roots + registered repo roots). 404 unknown run / missing file; 400 non-absolute path;
295
+ * 403 outside every allowed root (fail-closed, symlink-safe).
296
+ */
297
+ export interface RunFileContent {
298
+ /** The resolved absolute path that was served. */
299
+ path: string;
300
+ /** UTF-8 file text — the first 512 KB when `truncated`, `""` when `binary`. */
301
+ content: string;
302
+ /** The file's FULL size in bytes (not the served slice's). */
303
+ size: number;
304
+ /** The file exceeds the 512 KB cap and `content` holds only the first 512 KB. */
305
+ truncated: boolean;
306
+ /** NUL byte in the first 8 KB — render "binary file · open externally", never the content. */
307
+ binary: boolean;
308
+ }
309
+
310
+ /**
311
+ * Response of `GET /runs/:id/diff` / `GET /runs/:id/diff?path=<abs>` (DES-FEEDBACK-002 CREW-1) —
312
+ * the run worktree's unified diff against HEAD (staged + unstaged), with untracked files appended
313
+ * as all-addition `--no-index` hunks. `diff: ""` = clean tree (a real answer, not an error).
314
+ * 404 unknown run; 409 when the run has no workdir or it no longer exists; with `path`, the same
315
+ * 400/403 containment as `RunFileContent`.
316
+ */
317
+ export interface RunDiff {
318
+ /** Unified diff text (`git diff --no-color --no-ext-diff HEAD`), cut at 1 MB when `truncated`. */
319
+ diff: string;
320
+ /** The diff exceeded the 1 MB output cap and was cut. */
321
+ truncated: boolean;
322
+ }
323
+
291
324
  /** The daemon's cached open-gate record (`GET /runs/:id/gate`, DES-STUDIO-001 §3.3). */
292
325
  export interface GateInfo {
293
326
  runId: string;
@@ -886,6 +919,18 @@ export interface LaunchRunBody {
886
919
  * (4xx) — never a silent unfiled run. Omit for an unfiled run (the synthesized `default`).
887
920
  */
888
921
  projectId?: string;
922
+ /**
923
+ * Delivery mode (crew#293). `"pr"` ⇒ the daemon appends a hardened deliver Tool phase (push
924
+ * the run's branch, rebase onto origin's default branch, `gh pr create`; the PR URL is the
925
+ * phase output's last line) to a PER-RUN copy of the selected workflow def — the shared def
926
+ * is never mutated, and merge stays human. Requires `workflow`; sending `deliver` without it
927
+ * is a 400. Omit ⇒ no delivery phase.
928
+ *
929
+ * NOTE for the next api-types release: added daemon-side first (workspace copy, 0.6.0 +
930
+ * crew#293) — fold into the published `LaunchRunBody` when 0.7.0 cuts. Optional, so the
931
+ * field is forward-additive on the wire (DES-STUDIO-001 §5.1).
932
+ */
933
+ deliver?: 'pr';
889
934
  }
890
935
 
891
936
  // ── Governance types (crew#40/41) ──────────────────────────────────────────────
@@ -1172,6 +1217,12 @@ export interface Project {
1172
1217
  created_at: number;
1173
1218
  /** Unix millis. */
1174
1219
  updated_at: number;
1220
+ /**
1221
+ * DES-MERGE-001 §7.1 — the wicked-interactive docs root this project speaks to; `null` ⇒
1222
+ * the shared default root (ADR-0025). Held crew-side and merged onto the engine's row at the
1223
+ * route boundary, so the wire carries ONE project shape. Always present on a read.
1224
+ */
1225
+ interactiveRoot?: string | null;
1175
1226
  [k: string]: unknown;
1176
1227
  }
1177
1228
 
@@ -1215,6 +1266,9 @@ export interface UpdateProjectBody {
1215
1266
  /** `""` clears the description. */
1216
1267
  description?: string;
1217
1268
  status?: ProjectLifecycle;
1269
+ /** DES-MERGE-001 §7.1 — bind this project to a wicked-interactive docs root.
1270
+ * `null` clears the binding back to the shared default root. */
1271
+ interactiveRoot?: string | null;
1218
1272
  }
1219
1273
 
1220
1274
  /** `POST /projects/:id/members` body. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.5.1",
4
- "description": "The wire contract of the wicked-crew daemon's /api/v1 REST surface and /ws CoreEvent frames — types only, zero runtime",
3
+ "version": "0.7.0",
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",
7
7
  "exports": {