wicked-crew-api-types 0.146.0 → 0.148.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 +118 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -29,7 +29,12 @@
|
|
|
29
29
|
// ── Identity / actor contract (task #88, locked decision #6) ───────────────────
|
|
30
30
|
|
|
31
31
|
/** What kind of principal an actor is: a person (OAuth/OIDC or local operator), a workload, or an internal process. */
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Who acted. `plugin` (program DES-PLUGIN-EVENTS §3.4; spike 3): a studio plugin acting as itself, id
|
|
34
|
+
* `plugin:<id>@<version>`. Its trust is never above `observer` (read-only), and its only write is to its own section of
|
|
35
|
+
* a run's working document — never as a person, and never a gate, a launch or a steer.
|
|
36
|
+
*/
|
|
37
|
+
export type ActorKind = 'human' | 'agent' | 'system' | 'plugin';
|
|
33
38
|
|
|
34
39
|
/**
|
|
35
40
|
* The minimal trust ladder: `admin` > `operator` > `observer`.
|
|
@@ -336,6 +341,94 @@ export interface HealthCapabilities {
|
|
|
336
341
|
* `false`: hide the schedules view.
|
|
337
342
|
*/
|
|
338
343
|
schedules?: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* (api-types 0.148.0, power mode spike 3) A run's working document is served: `GET|POST /runs/:id/working-doc`
|
|
346
|
+
* and `POST /runs/:id/working-doc/versions` ({@link WorkingDocView}). ABSENT on an older daemon — read as `false`.
|
|
347
|
+
*/
|
|
348
|
+
workingDoc?: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// ── A run's working document (program DES-POWER-MODE §8.3, §9; api-types 0.148.0) ──────────────────
|
|
352
|
+
|
|
353
|
+
/** The working document's sections, in order. */
|
|
354
|
+
export type WorkingDocSectionId = 'goal' | 'approach' | 'decisions' | 'constraints' | 'questions' | 'next';
|
|
355
|
+
|
|
356
|
+
/** Who wrote a version: a person (the operator), a plugin's own generated lines, or crew (the first version). */
|
|
357
|
+
export type WorkingDocAuthor =
|
|
358
|
+
| { kind: 'human'; id: string }
|
|
359
|
+
| { kind: 'plugin'; id: string }
|
|
360
|
+
| { kind: 'system'; id: 'crew' };
|
|
361
|
+
|
|
362
|
+
/** One version of the working document, as crew attributed it. */
|
|
363
|
+
export interface WorkingDocTrailEntry {
|
|
364
|
+
version: number;
|
|
365
|
+
parent: number | null;
|
|
366
|
+
author: WorkingDocAuthor;
|
|
367
|
+
/** The plugin that hosted a person's edit (`plugin:<id>@<version>`), or null. */
|
|
368
|
+
surface: string | null;
|
|
369
|
+
sections: WorkingDocSectionId[];
|
|
370
|
+
/** Unix millis. */
|
|
371
|
+
at: number;
|
|
372
|
+
/** The steering note this version made, or null (a plugin's lines and Decisions / Open questions never steer). */
|
|
373
|
+
steerId: string | null;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/** One steering note a person's version became. It rides the next step's prompt (the operator inject); it never
|
|
377
|
+
* answers, skips or changes a gate, check, review or QE step. */
|
|
378
|
+
export interface WorkingDocSteer {
|
|
379
|
+
id: string;
|
|
380
|
+
version: number;
|
|
381
|
+
sections: WorkingDocSectionId[];
|
|
382
|
+
/** `next`: the next step, once. `standing`: Constraints and steering, re-sent before every later step until a
|
|
383
|
+
* later edit replaces it. */
|
|
384
|
+
kind: 'next' | 'standing';
|
|
385
|
+
/** Exactly what was sent. */
|
|
386
|
+
note: string;
|
|
387
|
+
at: number;
|
|
388
|
+
by: string;
|
|
389
|
+
/** When the engine took it (queued for the next step), or null. */
|
|
390
|
+
queuedAt: number | null;
|
|
391
|
+
/** The step whose prompt carried it. */
|
|
392
|
+
pickedUp: { ord: number | null; step: string | null; at: number } | null;
|
|
393
|
+
/** Why it was not sent (the job had ended, the engine refused), or null. */
|
|
394
|
+
error: string | null;
|
|
395
|
+
supersededBy?: string | null;
|
|
396
|
+
renewals?: number;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/** `GET /runs/:id/working-doc` (and the body of `POST /runs/:id/working-doc`). */
|
|
400
|
+
export interface WorkingDocView {
|
|
401
|
+
runId: string;
|
|
402
|
+
/** Null until the run has one. The document is a wicked-interactive document of kind `phase-report`. */
|
|
403
|
+
doc: { projectId: string; docId: string; head: number } | null;
|
|
404
|
+
sections: Record<WorkingDocSectionId, string> | null;
|
|
405
|
+
labels: Record<WorkingDocSectionId, string>;
|
|
406
|
+
trail: WorkingDocTrailEntry[];
|
|
407
|
+
steers: WorkingDocSteer[];
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/** `POST /runs/:id/working-doc/versions`. `author: 'operator'` only from a person; `author: 'plugin'` writes only the
|
|
411
|
+
* plugin's own section (`decisions`). 409 `{head}` when the document moved since `base`. */
|
|
412
|
+
export interface ProposeWorkingDocRequest {
|
|
413
|
+
base: number;
|
|
414
|
+
sections: Partial<Record<WorkingDocSectionId, string>>;
|
|
415
|
+
author: 'operator' | 'plugin';
|
|
416
|
+
plugin?: { id: string; version: string };
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export interface ProposeWorkingDocResponse {
|
|
420
|
+
/** Null when nothing changed. */
|
|
421
|
+
version: number | null;
|
|
422
|
+
unchanged: boolean;
|
|
423
|
+
steer: WorkingDocSteer | null;
|
|
424
|
+
view: WorkingDocView;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/** `/ws` frame: a run's working document changed (a version, a steer, a pickup). Re-read `GET /runs/:id/working-doc`. */
|
|
428
|
+
export interface WorkingDocChangedEvent {
|
|
429
|
+
type: 'workingDocChanged';
|
|
430
|
+
session: string;
|
|
431
|
+
head: number | null;
|
|
339
432
|
}
|
|
340
433
|
|
|
341
434
|
/** One `GET /health.warnings[]` entry (additive; wicked-core#411 / wicked-crew#497). */
|
|
@@ -1902,6 +1995,12 @@ export interface LaunchPlan {
|
|
|
1902
1995
|
*/
|
|
1903
1996
|
export interface ReassignRequest {
|
|
1904
1997
|
cli?: string;
|
|
1998
|
+
/**
|
|
1999
|
+
* An operator note that rides the retry as the gate approve's amendment (crew#1153). Only a run
|
|
2000
|
+
* parked at a gate takes one — on an executing run a note is a 400. Trimmed; blank counts as
|
|
2001
|
+
* absent; over 8192 UTF-8 bytes is a 400.
|
|
2002
|
+
*/
|
|
2003
|
+
note?: string;
|
|
1905
2004
|
}
|
|
1906
2005
|
|
|
1907
2006
|
/**
|
|
@@ -2278,6 +2377,13 @@ export type WorkerStallEscalatedFrame = {
|
|
|
2278
2377
|
* so the unit was left for a human rather than dispatched to a seat known to fail.
|
|
2279
2378
|
*/
|
|
2280
2379
|
reason?: 'tool_unit' | 'evaluating' | 'evaluator_distinct' | 'no_output' | 'no_eligible_seat';
|
|
2380
|
+
/**
|
|
2381
|
+
* (api-types 0.147.0, crew#972; additive) `true` when the SILENT-TURN rung acted: the cursor
|
|
2382
|
+
* unit's seat had streamed no output at all since its dispatch for `workerSilentTurnMinutes`
|
|
2383
|
+
* (default 8), and neither the daemon's process tree nor the seat's container was busy. Absent
|
|
2384
|
+
* when the 15/30-minute ladder acted.
|
|
2385
|
+
*/
|
|
2386
|
+
silentTurn?: true;
|
|
2281
2387
|
/**
|
|
2282
2388
|
* The seats the failover pick excluded under evaluator ≠ creator (crew#638; additive): a
|
|
2283
2389
|
* creator cursor avoids the run's evaluator seats, an evaluator cursor the seats that built its
|
|
@@ -5879,6 +5985,17 @@ export interface SystemSettings {
|
|
|
5879
5985
|
* Ignored when `workerStallEscalateAction` is `'notify'`.
|
|
5880
5986
|
*/
|
|
5881
5987
|
workerStallMaxEscalations?: number;
|
|
5988
|
+
/**
|
|
5989
|
+
* The SILENT-TURN rung of the escalation ladder (api-types 0.147.0, crew#972): minutes a seat's
|
|
5990
|
+
* turn may go with NO streamed output at all since its dispatch before the watchdog acts early —
|
|
5991
|
+
* the same action and budget as {@link workerStallEscalateMinutes}, the frame flagged
|
|
5992
|
+
* `silentTurn: true`. Integer 0..1440; `0` = off; absent = the daemon default (8). It applies only
|
|
5993
|
+
* while escalation is armed, only before the seat's first output, never once the worker returned
|
|
5994
|
+
* (its gate evaluation in flight) and never to a tool unit. A run whose own processes or the
|
|
5995
|
+
* seat's container burn CPU (a test runner, a build) is not silent, as for the ladder. Rig run
|
|
5996
|
+
* 115fabdb: a codex review sat 30 min with no output and ~1 s of seat CPU; pi then did it in 2.
|
|
5997
|
+
*/
|
|
5998
|
+
workerSilentTurnMinutes?: number;
|
|
5882
5999
|
/**
|
|
5883
6000
|
* SKIN-OWNED preference blobs (crew#323). The settings store is shared: alongside the
|
|
5884
6001
|
* engine's keys it carries the studio's own state — `studio.appearance` (accent/logo/theme),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-crew-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.148.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",
|