wicked-crew-api-types 0.107.0 → 0.109.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 +149 -14
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2038,6 +2038,10 @@ export interface AssuranceReceipt {
2038
2038
  * run does not require QE acceptance (or on an older engine). A waived or skipped one is also a
2039
2039
  * `skipped[]` entry (reason `qe_waived_by_score` | `qe_skipped_by_operator`). */
2040
2040
  qe?: QeAcceptanceDecision;
2041
+ /** (api-types 0.109.0, core#888) The councils this decision's disputes convened, each with WHO
2042
+ * decided (`seats`) and the draw's `seed`. ABSENT when none was convened (the routine case) or on
2043
+ * an older engine. A delivery receipt lists every council of the run. */
2044
+ councils?: TeamDispute[];
2041
2045
  }
2042
2046
 
2043
2047
  /**
@@ -5110,6 +5114,21 @@ export interface SystemSettings {
5110
5114
  * the engine default `~/.wicked-worker`.
5111
5115
  */
5112
5116
  worker_config_root?: string;
5117
+ /**
5118
+ * (api-types 0.109.0, operator ruling 2026-10-11) How many seats a council convenes — councils
5119
+ * sit only on concrete decisions (a team dispute). Integer 1..9, default 3; the seats are drawn
5120
+ * AT RANDOM from the run's eligible seats (not benched, not a party to the dispute), distinct
5121
+ * model families first, and the draw's seats + seed ride the gate's receipt
5122
+ * (`AssuranceReceipt.councils`). The daemon exports it as `WICKED_COUNCIL_SIZE` at boot and on
5123
+ * every change; the engine reads it per council. Absent = the default.
5124
+ */
5125
+ councilSize?: number;
5126
+ /**
5127
+ * (api-types 0.109.0) Milliseconds between two council seat spawns of one ballot, so a council
5128
+ * never forks every heavy CLI at once. Integer 0..30000, default 3000 (`0` = all at once).
5129
+ * Exported as `WICKED_COUNCIL_SPAWN_STAGGER_MS`, read per council. Absent = the default.
5130
+ */
5131
+ councilSpawnStaggerMs?: number;
5113
5132
  /*
5114
5133
  * There is NO skills setting (skills keystone, api-types 0.28.0). The daemon-owned skills root is
5115
5134
  * `<state home>/skills` — the directory holding `manifest.json`, `baseline/<hash>/`, `effective/`,
@@ -8433,8 +8452,28 @@ export type TeamCouncilRuledPayload = TeamEnvelope & {
8433
8452
  dissent: string[];
8434
8453
  returned: number;
8435
8454
  seated: number;
8455
+ /** (api-types 0.109.0, core#888) The seats drawn onto the council, the draw's seed, and the
8456
+ * eligible seats it was drawn from. ABSENT when nothing was convened or on an older engine. */
8457
+ seats?: string[];
8458
+ seed?: number;
8459
+ eligible?: string[];
8436
8460
  };
8437
8461
 
8462
+ /**
8463
+ * A one-off council's verdict on a dispute (DES-001 §6.3). (api-types 0.109.0, core#888) `seats`
8464
+ * names WHO decided — the seats drawn onto the council (empty when none was convened, or on an
8465
+ * older engine) — and `seed` is the random draw's seed: re-drawing with it seats the same council.
8466
+ * `seed` is ABSENT when no council was drawn or on an older engine.
8467
+ */
8468
+ export interface TeamDispute {
8469
+ verdict: 'yes' | 'no' | 'no_verdict' | (string & {});
8470
+ agreementPct: number | null;
8471
+ dissent: number | null;
8472
+ seats: string[];
8473
+ seed?: number;
8474
+ reason: string | null;
8475
+ }
8476
+
8438
8477
  /** DES-001 §7 `teamLedger.findings[]` (camelCase). */
8439
8478
  export interface TeamLedgerFinding {
8440
8479
  findingId: string;
@@ -8454,13 +8493,7 @@ export interface TeamLedgerFinding {
8454
8493
  status: 'accepted' | 'declined' | 'withdrawn' | 'unanswered' | 'superseded' | (string & {});
8455
8494
  workerReason: string | null;
8456
8495
  monitorReply: { kind: 'hold' | 'withdraw' | (string & {}); reason: string } | null;
8457
- dispute: {
8458
- verdict: 'yes' | 'no' | 'no_verdict' | (string & {});
8459
- agreementPct: number | null;
8460
- dissent: number | null;
8461
- seats: string[];
8462
- reason: string | null;
8463
- } | null;
8496
+ dispute: TeamDispute | null;
8464
8497
  /**
8465
8498
  * (T6, api-types 0.42.0) The enclosing location the finding id is minted over (git's funcname
8466
8499
  * heuristic). Omitted when file-level.
@@ -10088,7 +10121,8 @@ export type EditorPermission =
10088
10121
  * fetched at `entry_url` (`GET /editors/:id/:version/entry`, the §8.2 headers, re-hashed per serve).
10089
10122
  * First-party editors ship inside studio's bundle (`<studio dist>/editors/<id>/editor.json` +
10090
10123
  * `index.html`, ids `wicked-*`) and are discovered at boot; third-party editors arrive as garden
10091
- * packs and cannot be installed before the install-time conformance run (EP-C8).
10124
+ * packs (`source: 'pack'`), installed by the operator once garden's `pack check` and the
10125
+ * install-time conformance run have both passed.
10092
10126
  */
10093
10127
  export interface EditorView {
10094
10128
  id: string;
@@ -10107,20 +10141,52 @@ export interface EditorView {
10107
10141
  bytes: number;
10108
10142
  first_party: boolean;
10109
10143
  enabled: boolean;
10110
- source: 'studio-bundle';
10144
+ /** `studio-bundle`: first-party, shipped with studio. `pack`: a third-party pack the operator installed. */
10145
+ source: 'studio-bundle' | 'pack';
10111
10146
  entry_url: string;
10112
10147
  }
10113
10148
 
10114
10149
  /** `GET /editors` (operator+). */
10115
10150
  export interface ListEditorsResponse {
10116
10151
  editors: EditorView[];
10117
- /** Why `POST /editors` answers 501 today: third-party installs wait on EP-C8. */
10118
- installs: 'refused_until_conformance';
10152
+ /** `conformance_required`: `POST /editors` installs a pack only after garden's `pack check` and the
10153
+ * install-time conformance run pass (`refused_until_conformance` before the install surface: every install was refused). */
10154
+ installs: 'conformance_required' | 'refused_until_conformance';
10119
10155
  }
10120
10156
 
10121
10157
  /** `POST /editors` body (human-only): a pack directory holding `wicked-pack.json`. */
10122
10158
  export interface InstallEditorBody {
10123
10159
  packRoot: string;
10160
+ /** Install it on (the default; an update keeps the editor's current switch) or off. */
10161
+ enabled?: boolean;
10162
+ }
10163
+
10164
+ /** `POST /editors` → 200: the pack's editors are installed (or updated in place) and listed. */
10165
+ export interface InstallEditorResponse {
10166
+ installed: true;
10167
+ /** The pack was installed before; its editors were replaced (a new hash asks for its grants again). */
10168
+ updated: boolean;
10169
+ editors: EditorView[];
10170
+ check: PackCheckResult;
10171
+ conformance: EditorConformanceSummary;
10172
+ }
10173
+
10174
+ /** What the install-time conformance run found (garden `scripts/editor/conformance.py`). */
10175
+ export interface EditorConformanceSummary {
10176
+ ok: boolean;
10177
+ at: string;
10178
+ /** Per editor: the version and entry sha256 the run tested (an install requires both to be the installed ones). */
10179
+ editors: Array<{ id: string; version: string; sha256: string; ok: boolean; cases: Record<string, { ok: boolean }>; gaps: string[] }>;
10180
+ /** Set when the run could not happen (no headless browser, no garden with the runner). */
10181
+ error?: string;
10182
+ }
10183
+
10184
+ /** `POST /editors` → 422 when the conformance run failed or could not run (fail closed). */
10185
+ export interface InstallEditorNotConformant {
10186
+ code: 'editor_not_conformant' | 'conformance_unavailable';
10187
+ error: string;
10188
+ check: PackCheckResult;
10189
+ conformance: EditorConformanceSummary;
10124
10190
  }
10125
10191
 
10126
10192
  /** One finding of garden's `pack check --json`. */
@@ -10139,11 +10205,12 @@ export interface PackCheckResult {
10139
10205
  }
10140
10206
 
10141
10207
  /**
10142
- * `POST /editors` → 501: the pack passed garden's gate, and this is what the install WOULD ask the
10143
- * operator to approve (§3.2 "Add these") once third-party installs open (EP-C8). Nothing was written.
10208
+ * `POST /editors` → 501: the pack passed garden's gate but also ships skills or blocks, whose own
10209
+ * approval (§3.2 "Add these") is not built yet; this is what it would ask the operator to approve.
10210
+ * Nothing was written. (`third_party_editors_not_available` before the install surface: every pack was refused.)
10144
10211
  */
10145
10212
  export interface InstallEditorRefusal {
10146
- code: 'third_party_editors_not_available';
10213
+ code: 'pack_ships_skills_or_blocks' | 'third_party_editors_not_available';
10147
10214
  error: string;
10148
10215
  check: PackCheckResult;
10149
10216
  pack: {
@@ -10299,3 +10366,71 @@ export interface ProductComposeResponse {
10299
10366
  /** How many requirements the draft was handed. */
10300
10367
  requirements: number;
10301
10368
  }
10369
+
10370
+ // ── learn schedules (DES-learn-workflow §5) ────────────────────────────────────────────────────
10371
+
10372
+ /** A learn schedule's last outcome: `launched` while its run is open; `refused` = the launch failed. */
10373
+ export type LearnScheduleOutcome = 'launched' | 'refused' | 'completed' | 'failed' | 'cancelled';
10374
+
10375
+ /** One learned topic's refresh schedule (`GET /learn/schedules`). `id` = `<repoRef>:<slug>`. */
10376
+ export interface LearnSchedule {
10377
+ id: string;
10378
+ repoRef: string;
10379
+ /** The topic's directory under `.wicked/knowledge/`. */
10380
+ slug: string;
10381
+ /** The topic in plain words (the refresh run's intent names it). */
10382
+ topic: string;
10383
+ projectId?: string;
10384
+ /** Interval, 24..2160 hours. */
10385
+ everyHours: number;
10386
+ enabled: boolean;
10387
+ /** ISO-8601. Missed intervals coalesce into one launch. */
10388
+ nextDueAt: string;
10389
+ lastRunId: string | null;
10390
+ lastRunAt: string | null;
10391
+ lastOutcome: LearnScheduleOutcome | null;
10392
+ /** Consecutive refused launches (backoff = min(2^failures, 24) h). */
10393
+ failures: number;
10394
+ lastError: string | null;
10395
+ /** The git tree id of `.wicked/knowledge/<slug>` last indexed into estate (null = never). */
10396
+ indexedTree: string | null;
10397
+ createdAt: string;
10398
+ updatedAt: string;
10399
+ }
10400
+
10401
+ export interface LearnSchedulesResponse {
10402
+ schedules: LearnSchedule[];
10403
+ }
10404
+
10405
+ /** `PUT /learn/schedules/:id` (`:id` must equal `<repoRef>:<slug>`). */
10406
+ export interface LearnSchedulePutBody {
10407
+ repoRef: string;
10408
+ slug: string;
10409
+ topic: string;
10410
+ everyHours: number;
10411
+ enabled?: boolean;
10412
+ projectId?: string;
10413
+ }
10414
+
10415
+ /** One learned topic of a repository (`GET /learn/topics?repoRef=`), read from `.wicked/knowledge/<slug>/`. */
10416
+ export interface LearnTopic {
10417
+ slug: string;
10418
+ title: string;
10419
+ kind: 'topic' | 'event';
10420
+ /** topic.json `refreshed_at` (else `created_at`), ISO-8601; null when absent. */
10421
+ refreshedAt: string | null;
10422
+ claims: { active: number; superseded: number; contradicted: number; retired: number };
10423
+ /** The oldest `last_verified` among active claims (ISO-8601), null when none. */
10424
+ oldestVerifiedAt: string | null;
10425
+ /** Active claims not re-verified within the staleness window (2 intervals when scheduled, else 60 days). */
10426
+ staleActive: number;
10427
+ /** Distinct source URLs across the ledger. */
10428
+ sources: number;
10429
+ /** A plain-words reason a file could not be read, else null. */
10430
+ problem: string | null;
10431
+ }
10432
+
10433
+ export interface LearnTopicsResponse {
10434
+ repoRef: string;
10435
+ topics: LearnTopic[];
10436
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-crew-api-types",
3
- "version": "0.107.0",
3
+ "version": "0.109.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",