wicked-crew-api-types 0.7.0 → 0.10.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 +67 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -161,6 +161,35 @@ 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;
181
+ /**
182
+ * Durable operator guidance (DES-UX-002 §7.2 — spec'd there as CREW-UX-4, shipped as
183
+ * CREW-UX-7; api-types 0.9.0): the ONE pre-gate note upserted via `PUT /runs/:id/guidance`,
184
+ * populated at DTO assembly on both `GET /runs` and `GET /runs/:id`. ABSENT — never `null`
185
+ * or `''` — when no note is set (never set, cleared, or a pre-0.9.0 server), so old clients
186
+ * are unaffected and `'guidance' in session` and `!== undefined` agree.
187
+ *
188
+ * Operator-visible context ONLY: the governance gate never reads this field; the amend text
189
+ * at gate decision (`GateDecision.amend`) remains the one injection point. Skins use it to
190
+ * pre-populate the steer textarea when a gate arrives.
191
+ */
192
+ guidance?: string;
164
193
  }
165
194
 
166
195
  /** An ordered unit of work within a run (`WorkUnit`). */
@@ -931,6 +960,32 @@ export interface LaunchRunBody {
931
960
  * field is forward-additive on the wire (DES-STUDIO-001 §5.1).
932
961
  */
933
962
  deliver?: 'pr';
963
+ /**
964
+ * Retry lineage (DES-UX-001 §8.3, CREW-UX-3; api-types 0.8.0): the id of the run this
965
+ * launch retries. Must name an EXISTING run id — an unknown id fails the launch (400 with
966
+ * a named error), never a silently unrecorded lineage. The daemon persists it, echoes it
967
+ * as `AgentSession.retry_of`, and carries it in the `run.launched` audit entry's detail,
968
+ * so provenance renders "retry of {id}" from the system of record, not prompt equality.
969
+ * Omit when the launch is not a retry.
970
+ */
971
+ retryOf?: string;
972
+ }
973
+
974
+ /**
975
+ * Body for `PUT /runs/:id/guidance` (DES-UX-002 §7.2, CREW-UX-7; api-types 0.9.0) — upsert the
976
+ * run's ONE durable operator guidance note. `text: ''` CLEARS the note (the DTO field returns
977
+ * to absent). Capped at 8192 UTF-8 bytes — beyond it the daemon answers 400 with a named
978
+ * error. An unknown run is a 404. The write is audit-trailed (`action: 'guidance.set'` with
979
+ * the authenticated actor) and survives daemon restart.
980
+ */
981
+ export interface SetGuidanceBody {
982
+ text: string;
983
+ }
984
+
985
+ /** Response of `PUT /runs/:id/guidance` — echoes what was stored (`''` after a clear). */
986
+ export interface SetGuidanceResult {
987
+ runId: string;
988
+ guidance: string;
934
989
  }
935
990
 
936
991
  // ── Governance types (crew#40/41) ──────────────────────────────────────────────
@@ -1122,6 +1177,18 @@ export interface SystemSettings {
1122
1177
  * the engine default `~/.wicked-worker`.
1123
1178
  */
1124
1179
  worker_config_root?: string;
1180
+ /**
1181
+ * SKIN-OWNED preference blobs (crew#323). The settings store is shared: alongside the
1182
+ * engine's keys it carries the studio's own state — `studio.appearance` (accent/logo/theme),
1183
+ * `studio.notifications` (desktop-notification opt-in) — which the daemon persists and
1184
+ * returns VERBATIM without ever interpreting them.
1185
+ *
1186
+ * `PUT /settings` accepts a key matching `^studio\.[a-z][a-z0-9-]*$` whose value is
1187
+ * JSON-serializable and at most 512KB of JSON; it answers 400 naming the key otherwise.
1188
+ * Any other unrecognized key is still dropped from the patch (request bodies are
1189
+ * forward-additive, §5.1), so a skin's own state MUST ride this namespace to persist.
1190
+ */
1191
+ [key: `studio.${string}`]: unknown;
1125
1192
  }
1126
1193
 
1127
1194
  // ── Requirements management (server-side search + overrides; crew api/requirements.ts) ──
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.7.0",
3
+ "version": "0.10.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",