wicked-crew-api-types 0.6.0 → 0.8.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 +71 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -161,6 +161,23 @@ export interface AgentSession {
|
|
|
161
161
|
archived_at: number | null;
|
|
162
162
|
/** Optional operator note recorded at archival. */
|
|
163
163
|
archive_note: string | null;
|
|
164
|
+
/**
|
|
165
|
+
* The project this run is filed into (DES-UX-001 §8.2, CREW-UX-2; api-types 0.8.0) —
|
|
166
|
+
* populated by the crew server from the membership record at DTO assembly on BOTH
|
|
167
|
+
* `GET /runs` and `GET /runs/:id`, so clients no longer re-derive the run→project join.
|
|
168
|
+
*
|
|
169
|
+
* `null` = genuinely unfiled (the synthesized `default` project); ABSENT = a pre-0.8.0
|
|
170
|
+
* server that never joins. Read with `== null` only if "unfiled" and "old server" may
|
|
171
|
+
* collapse for your surface; a project chip should render only on `typeof === 'string'`.
|
|
172
|
+
*/
|
|
173
|
+
project_id?: string | null;
|
|
174
|
+
/**
|
|
175
|
+
* Retry lineage (DES-UX-001 §8.3, CREW-UX-3; api-types 0.8.0): the id of the run this run
|
|
176
|
+
* was launched as a retry of (`LaunchRunBody.retryOf`, validated at launch to name an
|
|
177
|
+
* existing run). ABSENT — never `null` — when the run is not a retry: absence is the one
|
|
178
|
+
* spelling of "no lineage", so `'retry_of' in session` and `!== undefined` agree.
|
|
179
|
+
*/
|
|
180
|
+
retry_of?: string;
|
|
164
181
|
}
|
|
165
182
|
|
|
166
183
|
/** An ordered unit of work within a run (`WorkUnit`). */
|
|
@@ -288,6 +305,39 @@ export interface OpenPathBody {
|
|
|
288
305
|
runId?: string;
|
|
289
306
|
}
|
|
290
307
|
|
|
308
|
+
/**
|
|
309
|
+
* Response of `GET /runs/:id/files?path=<abs>` (DES-FEEDBACK-002 CREW-1) — a capped, read-only
|
|
310
|
+
* file read contained against the SAME root set `POST /open` validates (run workdir + extra
|
|
311
|
+
* write roots + registered repo roots). 404 unknown run / missing file; 400 non-absolute path;
|
|
312
|
+
* 403 outside every allowed root (fail-closed, symlink-safe).
|
|
313
|
+
*/
|
|
314
|
+
export interface RunFileContent {
|
|
315
|
+
/** The resolved absolute path that was served. */
|
|
316
|
+
path: string;
|
|
317
|
+
/** UTF-8 file text — the first 512 KB when `truncated`, `""` when `binary`. */
|
|
318
|
+
content: string;
|
|
319
|
+
/** The file's FULL size in bytes (not the served slice's). */
|
|
320
|
+
size: number;
|
|
321
|
+
/** The file exceeds the 512 KB cap and `content` holds only the first 512 KB. */
|
|
322
|
+
truncated: boolean;
|
|
323
|
+
/** NUL byte in the first 8 KB — render "binary file · open externally", never the content. */
|
|
324
|
+
binary: boolean;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Response of `GET /runs/:id/diff` / `GET /runs/:id/diff?path=<abs>` (DES-FEEDBACK-002 CREW-1) —
|
|
329
|
+
* the run worktree's unified diff against HEAD (staged + unstaged), with untracked files appended
|
|
330
|
+
* as all-addition `--no-index` hunks. `diff: ""` = clean tree (a real answer, not an error).
|
|
331
|
+
* 404 unknown run; 409 when the run has no workdir or it no longer exists; with `path`, the same
|
|
332
|
+
* 400/403 containment as `RunFileContent`.
|
|
333
|
+
*/
|
|
334
|
+
export interface RunDiff {
|
|
335
|
+
/** Unified diff text (`git diff --no-color --no-ext-diff HEAD`), cut at 1 MB when `truncated`. */
|
|
336
|
+
diff: string;
|
|
337
|
+
/** The diff exceeded the 1 MB output cap and was cut. */
|
|
338
|
+
truncated: boolean;
|
|
339
|
+
}
|
|
340
|
+
|
|
291
341
|
/** The daemon's cached open-gate record (`GET /runs/:id/gate`, DES-STUDIO-001 §3.3). */
|
|
292
342
|
export interface GateInfo {
|
|
293
343
|
runId: string;
|
|
@@ -886,6 +936,27 @@ export interface LaunchRunBody {
|
|
|
886
936
|
* (4xx) — never a silent unfiled run. Omit for an unfiled run (the synthesized `default`).
|
|
887
937
|
*/
|
|
888
938
|
projectId?: string;
|
|
939
|
+
/**
|
|
940
|
+
* Delivery mode (crew#293). `"pr"` ⇒ the daemon appends a hardened deliver Tool phase (push
|
|
941
|
+
* the run's branch, rebase onto origin's default branch, `gh pr create`; the PR URL is the
|
|
942
|
+
* phase output's last line) to a PER-RUN copy of the selected workflow def — the shared def
|
|
943
|
+
* is never mutated, and merge stays human. Requires `workflow`; sending `deliver` without it
|
|
944
|
+
* is a 400. Omit ⇒ no delivery phase.
|
|
945
|
+
*
|
|
946
|
+
* NOTE for the next api-types release: added daemon-side first (workspace copy, 0.6.0 +
|
|
947
|
+
* crew#293) — fold into the published `LaunchRunBody` when 0.7.0 cuts. Optional, so the
|
|
948
|
+
* field is forward-additive on the wire (DES-STUDIO-001 §5.1).
|
|
949
|
+
*/
|
|
950
|
+
deliver?: 'pr';
|
|
951
|
+
/**
|
|
952
|
+
* Retry lineage (DES-UX-001 §8.3, CREW-UX-3; api-types 0.8.0): the id of the run this
|
|
953
|
+
* launch retries. Must name an EXISTING run id — an unknown id fails the launch (400 with
|
|
954
|
+
* a named error), never a silently unrecorded lineage. The daemon persists it, echoes it
|
|
955
|
+
* as `AgentSession.retry_of`, and carries it in the `run.launched` audit entry's detail,
|
|
956
|
+
* so provenance renders "retry of {id}" from the system of record, not prompt equality.
|
|
957
|
+
* Omit when the launch is not a retry.
|
|
958
|
+
*/
|
|
959
|
+
retryOf?: string;
|
|
889
960
|
}
|
|
890
961
|
|
|
891
962
|
// ── 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.8.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",
|