wicked-crew-api-types 0.6.0 → 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.
- package/index.d.ts +45 -0
- package/package.json +1 -1
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) ──────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-crew-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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",
|