wicked-crew 0.7.33 → 0.7.34

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 (48) hide show
  1. package/dist/api/eval-sample.d.ts +18 -18
  2. package/dist/api/governance-steering.d.ts +4 -4
  3. package/dist/api/routes.d.ts +15 -8
  4. package/dist/api/routes.d.ts.map +1 -1
  5. package/dist/api/routes.js +114 -5
  6. package/dist/api/routes.js.map +1 -1
  7. package/dist/api/server.d.ts.map +1 -1
  8. package/dist/api/server.js +44 -0
  9. package/dist/api/server.js.map +1 -1
  10. package/dist/api/skills.d.ts.map +1 -1
  11. package/dist/api/skills.js +12 -3
  12. package/dist/api/skills.js.map +1 -1
  13. package/dist/campaigns/routes.d.ts +14 -14
  14. package/dist/cli/index.js +17 -0
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/core/adapter.d.ts +6 -0
  17. package/dist/core/adapter.d.ts.map +1 -1
  18. package/dist/core/adapter.js +26 -0
  19. package/dist/core/adapter.js.map +1 -1
  20. package/dist/core/engine-roster.d.ts +28 -0
  21. package/dist/core/engine-roster.d.ts.map +1 -1
  22. package/dist/core/engine-roster.js +28 -0
  23. package/dist/core/engine-roster.js.map +1 -1
  24. package/dist/core/types.d.ts.map +1 -1
  25. package/dist/core/types.js +6 -0
  26. package/dist/core/types.js.map +1 -1
  27. package/dist/projects/state-home-preflight.d.ts +163 -0
  28. package/dist/projects/state-home-preflight.d.ts.map +1 -0
  29. package/dist/projects/state-home-preflight.js +310 -0
  30. package/dist/projects/state-home-preflight.js.map +1 -0
  31. package/dist/projects/state-home-registry.d.ts +25 -0
  32. package/dist/projects/state-home-registry.d.ts.map +1 -0
  33. package/dist/projects/state-home-registry.js +50 -0
  34. package/dist/projects/state-home-registry.js.map +1 -0
  35. package/dist/skills/base-skill.d.ts +92 -0
  36. package/dist/skills/base-skill.d.ts.map +1 -0
  37. package/dist/skills/base-skill.js +105 -0
  38. package/dist/skills/base-skill.js.map +1 -0
  39. package/dist/skills/runtime.d.ts +36 -1
  40. package/dist/skills/runtime.d.ts.map +1 -1
  41. package/dist/skills/runtime.js +93 -5
  42. package/dist/skills/runtime.js.map +1 -1
  43. package/dist/skills/store.d.ts +11 -0
  44. package/dist/skills/store.d.ts.map +1 -1
  45. package/dist/skills/store.js +16 -0
  46. package/dist/skills/store.js.map +1 -1
  47. package/endpoint-manifest.json +1 -0
  48. package/package.json +2 -2
@@ -23,14 +23,14 @@ export const EvalSignalsSchema: z.ZodObject<{
23
23
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
24
24
  content: z.ZodOptional<z.ZodString>;
25
25
  }, "strict", z.ZodTypeAny, {
26
- content?: string | undefined;
27
26
  tool?: string | undefined;
28
27
  files?: string[] | undefined;
28
+ content?: string | undefined;
29
29
  phase?: string | undefined;
30
30
  }, {
31
- content?: string | undefined;
32
31
  tool?: string | undefined;
33
32
  files?: string[] | undefined;
33
+ content?: string | undefined;
34
34
  phase?: string | undefined;
35
35
  }>;
36
36
  export const EvalSampleSchema: z.ZodObject<{
@@ -44,36 +44,36 @@ export const EvalSampleSchema: z.ZodObject<{
44
44
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
45
45
  content: z.ZodOptional<z.ZodString>;
46
46
  }, "strict", z.ZodTypeAny, {
47
- content?: string | undefined;
48
47
  tool?: string | undefined;
49
48
  files?: string[] | undefined;
49
+ content?: string | undefined;
50
50
  phase?: string | undefined;
51
51
  }, {
52
- content?: string | undefined;
53
52
  tool?: string | undefined;
54
53
  files?: string[] | undefined;
54
+ content?: string | undefined;
55
55
  phase?: string | undefined;
56
56
  }>;
57
57
  }, "strict", z.ZodTypeAny, {
58
- id: string;
59
58
  kind: "good" | "bad";
59
+ id: string;
60
60
  description: string;
61
61
  steering_type: string;
62
62
  signals: {
63
- content?: string | undefined;
64
63
  tool?: string | undefined;
65
64
  files?: string[] | undefined;
65
+ content?: string | undefined;
66
66
  phase?: string | undefined;
67
67
  };
68
68
  }, {
69
- id: string;
70
69
  kind: "good" | "bad";
70
+ id: string;
71
71
  description: string;
72
72
  steering_type: string;
73
73
  signals: {
74
- content?: string | undefined;
75
74
  tool?: string | undefined;
76
75
  files?: string[] | undefined;
76
+ content?: string | undefined;
77
77
  phase?: string | undefined;
78
78
  };
79
79
  }>;
@@ -90,64 +90,64 @@ export const ImportEvalCorpusSchema: z.ZodObject<{
90
90
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
91
91
  content: z.ZodOptional<z.ZodString>;
92
92
  }, "strict", z.ZodTypeAny, {
93
- content?: string | undefined;
94
93
  tool?: string | undefined;
95
94
  files?: string[] | undefined;
95
+ content?: string | undefined;
96
96
  phase?: string | undefined;
97
97
  }, {
98
- content?: string | undefined;
99
98
  tool?: string | undefined;
100
99
  files?: string[] | undefined;
100
+ content?: string | undefined;
101
101
  phase?: string | undefined;
102
102
  }>;
103
103
  }, "strict", z.ZodTypeAny, {
104
- id: string;
105
104
  kind: "good" | "bad";
105
+ id: string;
106
106
  description: string;
107
107
  steering_type: string;
108
108
  signals: {
109
- content?: string | undefined;
110
109
  tool?: string | undefined;
111
110
  files?: string[] | undefined;
111
+ content?: string | undefined;
112
112
  phase?: string | undefined;
113
113
  };
114
114
  }, {
115
- id: string;
116
115
  kind: "good" | "bad";
116
+ id: string;
117
117
  description: string;
118
118
  steering_type: string;
119
119
  signals: {
120
- content?: string | undefined;
121
120
  tool?: string | undefined;
122
121
  files?: string[] | undefined;
122
+ content?: string | undefined;
123
123
  phase?: string | undefined;
124
124
  };
125
125
  }>, "many">;
126
126
  }, "strict", z.ZodTypeAny, {
127
127
  name: string;
128
128
  samples: {
129
- id: string;
130
129
  kind: "good" | "bad";
130
+ id: string;
131
131
  description: string;
132
132
  steering_type: string;
133
133
  signals: {
134
- content?: string | undefined;
135
134
  tool?: string | undefined;
136
135
  files?: string[] | undefined;
136
+ content?: string | undefined;
137
137
  phase?: string | undefined;
138
138
  };
139
139
  }[];
140
140
  }, {
141
141
  name: string;
142
142
  samples: {
143
- id: string;
144
143
  kind: "good" | "bad";
144
+ id: string;
145
145
  description: string;
146
146
  steering_type: string;
147
147
  signals: {
148
- content?: string | undefined;
149
148
  tool?: string | undefined;
150
149
  files?: string[] | undefined;
150
+ content?: string | undefined;
151
151
  phase?: string | undefined;
152
152
  };
153
153
  }[];
@@ -93,11 +93,11 @@ export declare const SteeringAuthorSchema: z.ZodObject<{
93
93
  name: z.ZodString;
94
94
  content: z.ZodString;
95
95
  }, "strict", z.ZodTypeAny, {
96
- content: string;
97
96
  name: string;
98
- }, {
99
97
  content: string;
98
+ }, {
100
99
  name: string;
100
+ content: string;
101
101
  }>, "many">>;
102
102
  repoRef: z.ZodOptional<z.ZodString>;
103
103
  sessionId: z.ZodOptional<z.ZodString>;
@@ -107,8 +107,8 @@ export declare const SteeringAuthorSchema: z.ZodObject<{
107
107
  repoRef?: string | undefined;
108
108
  paths?: string[] | undefined;
109
109
  documents?: {
110
- content: string;
111
110
  name: string;
111
+ content: string;
112
112
  }[] | undefined;
113
113
  sessionId?: string | undefined;
114
114
  }, {
@@ -117,8 +117,8 @@ export declare const SteeringAuthorSchema: z.ZodObject<{
117
117
  repoRef?: string | undefined;
118
118
  paths?: string[] | undefined;
119
119
  documents?: {
120
- content: string;
121
120
  name: string;
121
+ content: string;
122
122
  }[] | undefined;
123
123
  sessionId?: string | undefined;
124
124
  }>;
@@ -14,6 +14,7 @@ import { DocRunIndex } from '../interactive/doc-run-index.js';
14
14
  import { TestSetIndex } from '../qe/test-sets.js';
15
15
  import { type ProjectRoutesDeps } from '../projects/routes.js';
16
16
  import { type SkillsRuntime } from '../skills/runtime.js';
17
+ import { type StateHomeWatch } from '../projects/state-home-preflight.js';
17
18
  import type { EvalRunStore } from './eval-store.js';
18
19
  import { InteractiveBridgePool } from '../interactive/bridge-pool.js';
19
20
  import type { DocGroundingStore } from '../interactive/doc-grounding.js';
@@ -136,7 +137,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
136
137
  retryOf?: string | undefined;
137
138
  entityMode?: "shared" | "isolated" | undefined;
138
139
  humanConfirm?: string | undefined;
139
- deliverGate?: "human" | "auto" | undefined;
140
+ deliverGate?: "auto" | "human" | undefined;
140
141
  }, {
141
142
  problem: string;
142
143
  workflow?: string | undefined;
@@ -150,7 +151,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
150
151
  retryOf?: string | undefined;
151
152
  entityMode?: "shared" | "isolated" | undefined;
152
153
  humanConfirm?: string | undefined;
153
- deliverGate?: "human" | "auto" | undefined;
154
+ deliverGate?: "auto" | "human" | undefined;
154
155
  }>, {
155
156
  problem: string;
156
157
  workflow?: string | undefined;
@@ -164,7 +165,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
164
165
  retryOf?: string | undefined;
165
166
  entityMode?: "shared" | "isolated" | undefined;
166
167
  humanConfirm?: string | undefined;
167
- deliverGate?: "human" | "auto" | undefined;
168
+ deliverGate?: "auto" | "human" | undefined;
168
169
  }, {
169
170
  problem: string;
170
171
  workflow?: string | undefined;
@@ -178,7 +179,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
178
179
  retryOf?: string | undefined;
179
180
  entityMode?: "shared" | "isolated" | undefined;
180
181
  humanConfirm?: string | undefined;
181
- deliverGate?: "human" | "auto" | undefined;
182
+ deliverGate?: "auto" | "human" | undefined;
182
183
  }>, {
183
184
  problem: string;
184
185
  workflow?: string | undefined;
@@ -192,7 +193,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
192
193
  retryOf?: string | undefined;
193
194
  entityMode?: "shared" | "isolated" | undefined;
194
195
  humanConfirm?: string | undefined;
195
- deliverGate?: "human" | "auto" | undefined;
196
+ deliverGate?: "auto" | "human" | undefined;
196
197
  }, {
197
198
  problem: string;
198
199
  workflow?: string | undefined;
@@ -206,7 +207,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
206
207
  retryOf?: string | undefined;
207
208
  entityMode?: "shared" | "isolated" | undefined;
208
209
  humanConfirm?: string | undefined;
209
- deliverGate?: "human" | "auto" | undefined;
210
+ deliverGate?: "auto" | "human" | undefined;
210
211
  }>, {
211
212
  problem: string;
212
213
  workflow?: string | undefined;
@@ -220,7 +221,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
220
221
  retryOf?: string | undefined;
221
222
  entityMode?: "shared" | "isolated" | undefined;
222
223
  humanConfirm?: string | undefined;
223
- deliverGate?: "human" | "auto" | undefined;
224
+ deliverGate?: "auto" | "human" | undefined;
224
225
  }, {
225
226
  problem: string;
226
227
  workflow?: string | undefined;
@@ -234,7 +235,7 @@ export declare const LaunchSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodO
234
235
  retryOf?: string | undefined;
235
236
  entityMode?: "shared" | "isolated" | undefined;
236
237
  humanConfirm?: string | undefined;
237
- deliverGate?: "human" | "auto" | undefined;
238
+ deliverGate?: "auto" | "human" | undefined;
238
239
  }>;
239
240
  export declare const GateSchema: z.ZodObject<{
240
241
  approve: z.ZodBoolean;
@@ -414,6 +415,12 @@ export interface RuntimeDeps {
414
415
  * (seeded from the installed plugin, published); a directly-driven route set gets none and
415
416
  * `/skills*` answers 503 unless a test injects one over a fixture root. */
416
417
  skills?: SkillsRuntime;
418
+ /** The live state-home classification (wicked-core#411 / crew#497) — `createServer` surveys the
419
+ * daemon state home at boot and hands the watch here; the routes re-survey on demand, report it
420
+ * on `/diagnostics.stateHome` + `/health.warnings`, and answer `POST /runs` 409 while a handed
421
+ * snapshot derives a state home with an entry the fence cannot classify. A directly-driven route
422
+ * set (tests) gets none: no survey, no warning, no gate — never a fabricated clean answer. */
423
+ stateHome?: StateHomeWatch;
417
424
  /** The document ↔ run binding (wave 6, F-4R2-006) read off the interactive seams' handoff ledgers —
418
425
  * `createServer` builds one over the four ledger sources; a directly-driven route set gets an
419
426
  * EMPTY one (`document_id: null` on every run). */
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/api/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,EAAmD,WAAW,EAA4E,MAAM,oBAAoB,CAAC;AAE5K,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EAET,WAAW,EAEZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAInD,OAAO,KAAK,EAEV,eAAe,EAWf,YAAY,EACb,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAA6B,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,cAAc,EAMf,MAAM,iBAAiB,CAAC;AAYzB,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAYtF,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAe,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM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AAgB,EAIlC,YAAY,GAAE,WAA+B,EAG7C,QAAQ,GAAE,iBAAqF,EAK/F,QAAQ,GAAE,YAA0D,EAGpE,OAAO,GAAE,WAAgB,GACxB,IAAI,CAqjHN"}
@@ -35,6 +35,9 @@ import { isSteeringAuthorRun, landSteeringProposal } from './steering-landing.js
35
35
  import { registerTestingRoutes } from './testing.js';
36
36
  import { registerSkillsRoutes } from './skills.js';
37
37
  import { disabledSkillsHealth } from '../skills/runtime.js';
38
+ import { STATE_HOME_BLOCKER_CODE, STATE_HOME_REMEDY, isEngineStateHomeRefusal, stateHomeBlockerBody, } from '../projects/state-home-preflight.js';
39
+ import { BASE_SKILL_POLICIES, BASE_SKILL_REF_SHAPE } from '../skills/base-skill.js';
40
+ import { noEligibleSeatBody, parseNoEligibleSeat } from '../core/engine-roster.js';
38
41
  import { ProjectSettingsStore } from '../projects/settings.js';
39
42
  import { boundOrigin, InteractiveBridgePool } from '../interactive/bridge-pool.js';
40
43
  import { composeDeliverText, factsFromRun, framedDeliverText, runUrlFor } from '../core/deliver-text.js';
@@ -632,7 +635,26 @@ runtime = {}) {
632
635
  const capabilities = typeof adapter.engineCapabilities === 'function'
633
636
  ? adapter.engineCapabilities()
634
637
  : { deliverGate: false };
635
- return { status: 'ok', version: PKG_VERSION, ping, capabilities };
638
+ // wicked-core#411 / crew#497: the state-home blocker rides the health probe as a WARNING. The
639
+ // daemon still SERVES (status stays ok — studio must load and show the blocker) but refuses to
640
+ // launch while the state home holds an entry the worker Read fence cannot classify. Re-surveyed
641
+ // per probe (two readdirs) so an entry that appears after boot is reported without a restart;
642
+ // the field is ABSENT when there is nothing to say, and on a route set booted without the watch.
643
+ const stateHome = runtime.stateHome !== undefined ? await runtime.stateHome.refresh() : null;
644
+ const warnings = stateHome === null
645
+ ? []
646
+ : stateHome.findings.map((f) => ({ kind: f.kind, severity: f.severity, message: f.message }));
647
+ // crew#554: the BASE skill posture for the next launch — the composer's confirm line
648
+ // ("discipline skill: <name> gen N" / "MISSING — …"). Cached by the skills runtime: no I/O.
649
+ const baseSkill = runtime.skills?.baseSkill() ?? null;
650
+ return {
651
+ status: 'ok',
652
+ version: PKG_VERSION,
653
+ ping,
654
+ capabilities,
655
+ baseSkill,
656
+ ...(warnings.length > 0 ? { warnings } : {}),
657
+ };
636
658
  });
637
659
  // The daemon's self-knowledge surface (diagnostics): what is deployed, what it stores, what
638
660
  // has gone wrong recently, and whether ACP is really working across the CLIs — the answer
@@ -680,6 +702,11 @@ runtime = {}) {
680
702
  // Is the governance evidence LANDING (crew#495): the store, the records on it, the dead
681
703
  // letters — with a `governance.deadletter` finding the moment the outbox holds one.
682
704
  governance,
705
+ // The state-home classification (wicked-core#411 / crew#497): which state home the worker
706
+ // Read fence classifies, every entry it cannot classify there (top level and skills root),
707
+ // who classified (the engine, or crew's registry copy on an older addon) and whether that
708
+ // refuses launches — re-surveyed per read. `null` on a route set booted without the watch.
709
+ stateHome: runtime.stateHome !== undefined ? await runtime.stateHome.refresh() : null,
683
710
  };
684
711
  });
685
712
  // Who am I talking to the daemon as? (task #88). In local mode this is
@@ -1025,10 +1052,13 @@ runtime = {}) {
1025
1052
  requestType: 'LaunchRunBody',
1026
1053
  responseType: '{ runId: string }',
1027
1054
  // 404/409: unknown project / unknown campaignId (wicked-studio#27) /
1028
- // archived-or-synthesized project + busy engine (see the catch below); 400: zod
1029
- // reject or a retryOf naming no existing run; 501: campaignId attach on an engine
1030
- // addon without the campaign bindings ("upgrade the engine").
1031
- statusCodes: [201, 400, 404, 409, 501],
1055
+ // archived-or-synthesized project + busy engine + the state-home blocker
1056
+ // (`state_home_unregistered`) + a roster with no eligible seat (`no_eligible_seat`,
1057
+ // wicked-core#461 — see the catch below); 400: zod reject or a retryOf naming no
1058
+ // existing run; 422: the base-skill intake refusal (`base_skill_refused`, crew#554);
1059
+ // 501: campaignId attach on an engine addon without the campaign bindings ("upgrade
1060
+ // the engine").
1061
+ statusCodes: [201, 400, 404, 409, 422, 501],
1032
1062
  },
1033
1063
  },
1034
1064
  }, async (req, reply) => {
@@ -1037,6 +1067,18 @@ runtime = {}) {
1037
1067
  return reply.code(400).send(invalidBody(parsed.error, 'Invalid request body'));
1038
1068
  }
1039
1069
  const b = parsed.data;
1070
+ // wicked-core#411 / crew#497: the state-home blocker, judged BEFORE anything is resolved or
1071
+ // committed. While the handed skills snapshot derives a state home with an entry the worker
1072
+ // Read fence cannot classify, the engine refuses this launch at intake (and an engine before
1073
+ // that fix refused it at the run's first worker, after councils and the intake gate) — so the
1074
+ // daemon answers the typed 409 itself, naming every entry and the remedy, until they are gone.
1075
+ // Re-surveyed per launch: the entries named are the ones there NOW.
1076
+ if (runtime.stateHome !== undefined) {
1077
+ const stateHome = await runtime.stateHome.refresh();
1078
+ if (stateHome.refusesLaunches) {
1079
+ return reply.code(409).send(stateHomeBlockerBody(stateHome));
1080
+ }
1081
+ }
1040
1082
  const input = {
1041
1083
  problem: b.problem,
1042
1084
  sessionId: b.sessionId ?? randomUUID(),
@@ -1195,6 +1237,34 @@ runtime = {}) {
1195
1237
  }
1196
1238
  catch (err) {
1197
1239
  const msg = message(err);
1240
+ // The engine's own intake refusal (wicked-core#411 `StateHomeConfigError`) is a configuration
1241
+ // error, not a malformed request: the same typed 409 the pre-check above answers, over a fresh
1242
+ // survey — the pre-check saw a clean state home (or an addon that could not classify), the
1243
+ // engine did not.
1244
+ if (isEngineStateHomeRefusal(msg)) {
1245
+ const stateHome = runtime.stateHome !== undefined ? await runtime.stateHome.refresh() : null;
1246
+ return reply
1247
+ .code(409)
1248
+ .send(stateHome !== null && stateHome.unregistered.length > 0
1249
+ ? stateHomeBlockerBody(stateHome)
1250
+ : {
1251
+ error: msg,
1252
+ code: STATE_HOME_BLOCKER_CODE,
1253
+ stateHome: stateHome?.stateHome ?? null,
1254
+ unregistered: [],
1255
+ remedy: STATE_HOME_REMEDY,
1256
+ });
1257
+ }
1258
+ // wicked-core#461 / crew#556: the engine's typed `NoEligibleSeat` intake refusal — the plan
1259
+ // needs a seat and every seat of the roster was benched by the launcher (signed out / quota /
1260
+ // not installed). A 409 with a typed body, not the 400 the generic arm below answered: the
1261
+ // request is well-formed and succeeds unchanged once a seat is signed in — the conflict is
1262
+ // with the roster's standing (the `state_home_unregistered` rule) — and not a 5xx: the engine
1263
+ // is healthy and said no, naming every seat and its cause.
1264
+ const noSeat = parseNoEligibleSeat(msg);
1265
+ if (noSeat !== null) {
1266
+ return reply.code(409).send(noEligibleSeatBody(msg, noSeat));
1267
+ }
1198
1268
  // An unknown/archived project is a state conflict on a real resource, not a malformed
1199
1269
  // request: 404/409 per the projects error mapping; anything else keeps the launch 400/409.
1200
1270
  if (b.projectId !== undefined && /project.*not registered/i.test(msg)) {
@@ -1203,6 +1273,17 @@ runtime = {}) {
1203
1273
  if (b.projectId !== undefined && /archived|'default'|synthesized/i.test(msg)) {
1204
1274
  return reply.code(409).send({ error: msg });
1205
1275
  }
1276
+ // crew#554 / wicked-core#468: the engine refused the launch AT INTAKE because the handed
1277
+ // skills snapshot lacks the run's BASE skill (`SkillsError::BaseSkillRefused` — the message
1278
+ // names the skill and "refused at intake"). Nothing was planned or persisted. A typed 422 so a
1279
+ // composer renders a clear card (skill, policy, remedy) instead of a generic launch 400.
1280
+ if (/\bbase skill\b.*\brefused at intake\b/is.test(msg)) {
1281
+ const posture = runtime.skills?.baseSkill() ?? null;
1282
+ const remedy = posture !== null && posture.inCatalog
1283
+ ? `the skill is in the catalog — POST /skills/publish hands it to the next launch; or set baseSkillPolicy "warn" (PUT /settings) to run without the discipline directive`
1284
+ : `install a wicked-garden that ships the skill, POST /skills/refresh-baseline, then POST /skills/publish; or set baseSkillPolicy "warn" (PUT /settings) to run without the discipline directive`;
1285
+ return reply.code(422).send({ code: 'base_skill_refused', error: msg, baseSkill: posture, remedy });
1286
+ }
1206
1287
  const busy = /busy|in flight|already/i.test(msg);
1207
1288
  return reply.code(busy ? 409 : 400).send({ error: msg });
1208
1289
  }
@@ -3309,6 +3390,26 @@ runtime = {}) {
3309
3390
  .send({ error: "deliverDefault must be 'pr' or 'none'" });
3310
3391
  }
3311
3392
  }
3393
+ // baseSkillRef / baseSkillPolicy (crew#554 / wicked-core#468): the discipline skill EVERY
3394
+ // governed unit is told to follow, and what a snapshot without it means. Both decide whether
3395
+ // launches carry the directive or are refused at intake, so a typo is a 400, never a silently
3396
+ // dropped key. The name is exported to the engine verbatim: a skill-name shape only.
3397
+ if (Object.hasOwn(patch, 'baseSkillRef')) {
3398
+ const r = patch.baseSkillRef;
3399
+ if (typeof r !== 'string' || !BASE_SKILL_REF_SHAPE.test(r.trim())) {
3400
+ return reply.code(400).send({
3401
+ error: 'baseSkillRef must be a skill name (lowercase letters, digits, "-", "_", ":", ".", up to 128 chars — e.g. "wicked-garden-governed-worker"), or "" to turn the base skill off',
3402
+ });
3403
+ }
3404
+ }
3405
+ if (Object.hasOwn(patch, 'baseSkillPolicy')) {
3406
+ const p = patch.baseSkillPolicy;
3407
+ if (typeof p !== 'string' || !BASE_SKILL_POLICIES.has(p)) {
3408
+ return reply.code(400).send({
3409
+ error: "baseSkillPolicy must be 'warn' (runs proceed without a missing base skill, with a diagnostics warning) or 'require' (the engine refuses launches at intake until the published snapshot holds it)",
3410
+ });
3411
+ }
3412
+ }
3312
3413
  // Skin-owned keys (crew#323): allowed through, but VALIDATED rather than trusted. The
3313
3414
  // daemon does not read these values, so the only two things it can check are the two that
3314
3415
  // can hurt it — a value it cannot persist, and a value big enough to bloat settings.json.
@@ -3349,6 +3450,8 @@ runtime = {}) {
3349
3450
  'workerStallEscalateAction',
3350
3451
  'workerStallMaxEscalations',
3351
3452
  'deliverDefault',
3453
+ 'baseSkillRef',
3454
+ 'baseSkillPolicy',
3352
3455
  ];
3353
3456
  const safe = {};
3354
3457
  for (const key of allowed) {
@@ -3374,6 +3477,12 @@ runtime = {}) {
3374
3477
  // WICKED_WORKER_HOME per worker spawn — never cached — so this alone makes the change live
3375
3478
  // at the next spawn: no daemon restart, no engine restart.
3376
3479
  applyWorkerConfigRoot(settings.worker_config_root);
3480
+ // Re-judge and re-export the BASE skill (crew#554) — the engine reads WICKED_BASE_SKILL_REF at
3481
+ // intake, per launch, so this alone makes a changed name or policy live at the next launch.
3482
+ // Only when the patch named either key: an unrelated settings write must not re-log the seam.
3483
+ if (Object.hasOwn(safe, 'baseSkillRef') || Object.hasOwn(safe, 'baseSkillPolicy')) {
3484
+ runtime.skills?.configureBaseSkill(settings);
3485
+ }
3377
3486
  // (No skills re-apply: the skills root is not a setting — skills/runtime.ts, codex round 5.)
3378
3487
  // `changed` names every persisted key, engine and `studio.*` alike; `ignored` (present only
3379
3488
  // when there is one) is where a dropped unknown key stops being invisible.