wicked-crew-api-types 0.3.0 → 0.4.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 +37 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -221,6 +221,26 @@ export interface OnboardRef {
221
221
  runId: string | null;
222
222
  }
223
223
 
224
+ /**
225
+ * Runtime health of one council seat (crew#274).
226
+ *
227
+ * Derived by the daemon from the live CoreEvent stream — NEVER from config. The roster is
228
+ * declarative: every configured CLI stays listed and enabled in `clis.toml`; quota/auth/runtime
229
+ * errors are runtime state the platform detects and displays as `inactive` + the error excerpt.
230
+ * Recovery is automatic: a captured-ok unit output for the seat, or an exit-0 `version_probe`
231
+ * from the daemon's low-frequency recovery probe, flips the seat back to `active` and clears
232
+ * the message — no operator hand-edit involved.
233
+ */
234
+ export interface SeatHealth {
235
+ status: 'active' | 'inactive';
236
+ /** Bounded excerpt of the last seat-level error; present while `inactive`. */
237
+ message?: string;
238
+ /** When the seat entered its current status (ISO-8601). */
239
+ since: string;
240
+ /** When the last seat-level error was observed (ISO-8601), if any was. */
241
+ lastErrorAt?: string;
242
+ }
243
+
224
244
  /**
225
245
  * A council seat (`AgenticCli`) as returned by `GET /roster`. Only the fields
226
246
  * the launch form uses are named; the index signature keeps the (large) rest of
@@ -232,9 +252,26 @@ export interface RosterSeat {
232
252
  binary: string;
233
253
  enabled_for_council: boolean;
234
254
  category?: string;
255
+ /**
256
+ * Runtime health (crew#274). Additive: absent on a daemon predating the field, and safe to
257
+ * round-trip into `clisJson` (the engine's `AgenticCli` deserializer ignores unknown fields).
258
+ * Absent-or-default reads as `active` with no message.
259
+ */
260
+ health?: SeatHealth;
235
261
  [k: string]: unknown;
236
262
  }
237
263
 
264
+ /** Body for `POST /open` — open a file/folder with the OS default application (crew#273). */
265
+ export interface OpenPathBody {
266
+ /**
267
+ * ABSOLUTE path to open. Validated daemon-side: it must resolve inside the run's workdir /
268
+ * extra write roots (when `runId` is given) or a registered repo root — never an arbitrary path.
269
+ */
270
+ path: string;
271
+ /** Widen validation to this run's workdir + extra write roots. Unknown id ⇒ 404. */
272
+ runId?: string;
273
+ }
274
+
238
275
  /** The daemon's cached open-gate record (`GET /runs/:id/gate`, DES-STUDIO-001 §3.3). */
239
276
  export interface GateInfo {
240
277
  runId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "The wire contract of the wicked-crew daemon's /api/v1 REST surface and /ws CoreEvent frames — types only, zero runtime",
5
5
  "type": "module",
6
6
  "types": "./index.d.ts",