wicked-crew 0.7.1 → 0.7.3
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/dist/api/delivery-index.d.ts +61 -0
- package/dist/api/delivery-index.d.ts.map +1 -0
- package/dist/api/delivery-index.js +87 -0
- package/dist/api/delivery-index.js.map +1 -0
- package/dist/api/governance-steering.d.ts +139 -0
- package/dist/api/governance-steering.d.ts.map +1 -0
- package/dist/api/governance-steering.js +302 -0
- package/dist/api/governance-steering.js.map +1 -0
- package/dist/api/governance-wiki.d.ts +28 -0
- package/dist/api/governance-wiki.d.ts.map +1 -0
- package/dist/api/governance-wiki.js +97 -0
- package/dist/api/governance-wiki.js.map +1 -0
- package/dist/api/routes.d.ts +21 -16
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +196 -10
- package/dist/api/routes.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +56 -1
- package/dist/api/server.js.map +1 -1
- package/dist/api/testing.d.ts +117 -0
- package/dist/api/testing.d.ts.map +1 -0
- package/dist/api/testing.js +152 -0
- package/dist/api/testing.js.map +1 -0
- package/dist/campaign/supervision.d.ts +296 -0
- package/dist/campaign/supervision.d.ts.map +1 -0
- package/dist/campaign/supervision.js +515 -0
- package/dist/campaign/supervision.js.map +1 -0
- package/dist/campaigns/plan.d.ts +64 -0
- package/dist/campaigns/plan.d.ts.map +1 -0
- package/dist/campaigns/plan.js +201 -0
- package/dist/campaigns/plan.js.map +1 -0
- package/dist/campaigns/routes.d.ts +28 -0
- package/dist/campaigns/routes.d.ts.map +1 -0
- package/dist/campaigns/routes.js +177 -0
- package/dist/campaigns/routes.js.map +1 -0
- package/dist/core/adapter.d.ts +160 -1
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +300 -1
- package/dist/core/adapter.js.map +1 -1
- package/dist/projects/routes.d.ts +4 -4
- package/dist/qe/acceptance.d.ts +20 -1
- package/dist/qe/acceptance.d.ts.map +1 -1
- package/dist/qe/acceptance.js +32 -0
- package/dist/qe/acceptance.js.map +1 -1
- package/dist/qe/conformance.d.ts +158 -0
- package/dist/qe/conformance.d.ts.map +1 -0
- package/dist/qe/conformance.js +244 -0
- package/dist/qe/conformance.js.map +1 -0
- package/dist/studio/assets/index-BAW9rqNT.css +32 -0
- package/dist/studio/assets/index-UahdRwF7.js +532 -0
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +4387 -0
- package/endpoint-manifest.json +154 -9
- package/package.json +3 -3
- package/dist/studio/assets/index-D-BFUYnY.js +0 -530
- package/dist/studio/assets/index-D6S9zUtO.css +0 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/core/adapter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACd,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/core/adapter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,EACd,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACZ,MAAM,YAAY,CAAC;AAgDpB;6FAC6F;AAC7F,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAYD;;;;;;;kGAOkG;AAClG,wBAAgB,oBAAoB,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|
package/dist/core/adapter.js
CHANGED
|
@@ -8,6 +8,7 @@ import { randomUUID } from 'node:crypto';
|
|
|
8
8
|
import { DEFAULT_SETTINGS } from './types.js';
|
|
9
9
|
import { execCapped } from './exec.js';
|
|
10
10
|
import { composeDeliverWorkflow, DELIVER_PHASE_ID } from './deliver.js';
|
|
11
|
+
import { CAMPAIGN_WORKFLOW_PREFIX } from '../campaigns/plan.js';
|
|
11
12
|
import { composeDeliverableFloor } from './deliverable-floor.js';
|
|
12
13
|
/** Resolved path under the user's home directory. */
|
|
13
14
|
function wickedDir(...parts) {
|
|
@@ -82,6 +83,11 @@ export function readOverlayWorkflows(dir, builtinIds) {
|
|
|
82
83
|
const id = file.slice(0, -'.json'.length);
|
|
83
84
|
if (builtinIds.has(id))
|
|
84
85
|
continue; // a built-in overlay, not a user workflow
|
|
86
|
+
// A composed campaign-node workflow (TH-9): persisted here so the Rust actor reloads it at
|
|
87
|
+
// startup (a fresh-process resumeCampaign re-dispatches pending nodes by workflow id), but
|
|
88
|
+
// it is one node's private plumbing, not a user workflow — keep it out of the catalog.
|
|
89
|
+
if (id.startsWith(CAMPAIGN_WORKFLOW_PREFIX))
|
|
90
|
+
continue;
|
|
85
91
|
try {
|
|
86
92
|
const def = JSON.parse(readFileSync(join(dir, file), 'utf8'));
|
|
87
93
|
if (def && typeof def.id === 'string' && Array.isArray(def.phases))
|
|
@@ -305,6 +311,26 @@ export const BUILTIN_WORKFLOWS = [
|
|
|
305
311
|
{ id: 'store', kind: 'build', gate_type: 'value', gate: 'auto', executes_code: false, verified_evidence: false, required_deliverables: [], depends_on: ['gather'], role: 'creator', skill_ref: null, allowed_skills: [], validator_pin: null },
|
|
306
312
|
],
|
|
307
313
|
},
|
|
314
|
+
{
|
|
315
|
+
// "Add with chat" for the Steering surface (STEERING program) — the dedicated entry point
|
|
316
|
+
// behind POST /governance/steering/author. TH-12 propose-as-gate: the run analyzes the
|
|
317
|
+
// operator's intent + the named files/dirs, then the TERMINAL `propose` phase emits the
|
|
318
|
+
// PROPOSED steering rules and its unconditional human gate pauses the run `awaiting_human`
|
|
319
|
+
// (core evaluates a terminal phase's own gate before finalize — seam finding #4), so the
|
|
320
|
+
// operator approves/amends/rejects via the standard POST /runs/:id/gate. Approved rules land
|
|
321
|
+
// through the governed rules CRUD with `provenance.source: "chat"` — the run itself must
|
|
322
|
+
// never write the store, which is why both phases say so out loud.
|
|
323
|
+
//
|
|
324
|
+
// Crew-authored drop-in (like `chat`): NOT in CORE_SEEDED_WORKFLOWS, so launchRun's
|
|
325
|
+
// `_writeBuiltinOverlay` write is the only way core resolves the id — the same delivery
|
|
326
|
+
// mechanism every crew drop-in uses.
|
|
327
|
+
id: 'steering-author',
|
|
328
|
+
is_system: true,
|
|
329
|
+
phases: [
|
|
330
|
+
{ id: 'analyze', kind: 'recon', instructions: 'Read the operator intent and every file or directory listed in the problem statement. Identify candidate steering rules: durable, prescriptive statements a coding agent must follow, each classified into one steering type (architecture, development, security, testing, operations, compliance, design-ux). For each candidate note the statement, steering type, severity, and the evidence in the source material. Analysis only — do not write any rule to any store, and do not emit final rule JSON yet.', gate_type: 'value', gate: 'auto', executes_code: false, verified_evidence: false, required_deliverables: [], depends_on: [], role: 'neutral', skill_ref: null, allowed_skills: [], validator_pin: null },
|
|
331
|
+
{ id: 'propose', kind: 'recon', instructions: 'From the prior analysis, emit the PROPOSED steering rules as one JSON array. Each entry is a conformance-rule object: id (PAT-<digits> for rule_type "pattern", POL-<digits> for "policy"), rule_type, statement, severity (info|warn|error|critical), confidence (0..1), targets, steering_type (default to the type named in the problem statement), provenance {"source":"chat"}, and — only where the source material supports them — the enforcement fields applies_to, excludes, weight, effect, trigger, obligations, criteria. This output is a PROPOSAL for the human gate: rules land in the store only after approval, via the governance rules API — do not write them yourself.', gate_type: 'value', gate: { human_confirm: { unconditional: true } }, executes_code: false, verified_evidence: false, required_deliverables: [], depends_on: ['analyze'], role: 'creator', skill_ref: null, allowed_skills: [], validator_pin: null },
|
|
332
|
+
],
|
|
333
|
+
},
|
|
308
334
|
{
|
|
309
335
|
id: 'collab',
|
|
310
336
|
is_system: true,
|
|
@@ -393,6 +419,65 @@ export class ElicitationUnsupportedError extends Error {
|
|
|
393
419
|
this.name = 'ElicitationUnsupportedError';
|
|
394
420
|
}
|
|
395
421
|
}
|
|
422
|
+
/**
|
|
423
|
+
* The campaign surface (DES-CAMPAIGN-001 / TH-9) is not available in this deployment — the
|
|
424
|
+
* installed wicked-core-ts predates the campaign bindings. Typed for the same reason as
|
|
425
|
+
* `ChatUnsupportedError`: the routes answer 501 ("upgrade the engine") on this, never 400
|
|
426
|
+
* ("fix your request"). Gated on METHOD PRESENCE rather than a version floor because the
|
|
427
|
+
* bindings ship in the next core-ts release whose number is the release train's to pick —
|
|
428
|
+
* a presence check is true on whatever version actually carries them.
|
|
429
|
+
*/
|
|
430
|
+
export class CampaignsUnsupportedError extends Error {
|
|
431
|
+
constructor(what) {
|
|
432
|
+
super(`${what} is not supported by this wicked-core build (the installed wicked-core-ts has ` +
|
|
433
|
+
'no campaign bindings — upgrade it to a release carrying launchCampaign)');
|
|
434
|
+
this.name = 'CampaignsUnsupportedError';
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* The wiki scoreboard (AW-23 / wiki-mgmt) is not available in this deployment — the installed
|
|
439
|
+
* wicked-core-ts predates the `governanceScoreboard` binding (ships in ≥ 0.7.4). Typed for the
|
|
440
|
+
* same reason as `ChatUnsupportedError`: the route answers 501 ("upgrade the engine") on this,
|
|
441
|
+
* never 400 ("fix your request"). Gated on METHOD PRESENCE, the campaigns doctrine — true on
|
|
442
|
+
* whatever release actually carries the binding.
|
|
443
|
+
*/
|
|
444
|
+
/**
|
|
445
|
+
* The unified steering-rule model (STEERING program) is not available in this deployment —
|
|
446
|
+
* wicked-core-ts predates the `steeringImport` binding (ships in ≥ 0.7.5, alongside the model
|
|
447
|
+
* merge). Typed for the same reason as `ChatUnsupportedError`: the routes answer 501 ("upgrade
|
|
448
|
+
* the engine") on this, never 400 ("fix your request") — and never the WORSE failure of passing
|
|
449
|
+
* a steering-field write through to an engine that would silently drop the fields.
|
|
450
|
+
*/
|
|
451
|
+
export class SteeringUnsupportedError extends Error {
|
|
452
|
+
constructor(what) {
|
|
453
|
+
super(`${what} is not supported by this wicked-core build (the installed wicked-core-ts addon ` +
|
|
454
|
+
'has no steeringImport binding — upgrade it to a release carrying the unified steering ' +
|
|
455
|
+
'model, >= 0.7.5)');
|
|
456
|
+
this.name = 'SteeringUnsupportedError';
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* The installed engine addon predates the governance-evals surface (crew-testing; the
|
|
461
|
+
* `governanceEvals` + `governanceCorpusImport` bindings ship with wicked-core-ts 0.7.5, which is
|
|
462
|
+
* unreleased at the time this seam lands). Typed for the same reason as `SteeringUnsupportedError`:
|
|
463
|
+
* the testing routes answer 501 ("upgrade the engine") on this, never 400 ("fix your request") —
|
|
464
|
+
* and they must not crash a daemon running against the released 0.7.4 addon.
|
|
465
|
+
*/
|
|
466
|
+
export class GovernanceEvalsUnsupportedError extends Error {
|
|
467
|
+
constructor(what) {
|
|
468
|
+
super(`${what} is not supported by this wicked-core build (the installed wicked-core-ts addon ` +
|
|
469
|
+
'has no governanceEvals binding — upgrade it to a release carrying the governance ' +
|
|
470
|
+
'evals surface, >= 0.7.5)');
|
|
471
|
+
this.name = 'GovernanceEvalsUnsupportedError';
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
export class GovernanceScoreboardUnsupportedError extends Error {
|
|
475
|
+
constructor(what) {
|
|
476
|
+
super(`${what} is not supported by this wicked-core build (the installed wicked-core-ts has ` +
|
|
477
|
+
'no governanceScoreboard binding — upgrade it to a release carrying it, >= 0.7.4)');
|
|
478
|
+
this.name = 'GovernanceScoreboardUnsupportedError';
|
|
479
|
+
}
|
|
480
|
+
}
|
|
396
481
|
/** The engine's own way of reporting a build that cannot do chat, raised at call time. */
|
|
397
482
|
const ENGINE_CHAT_UNSUPPORTED = /chat unsupported/i;
|
|
398
483
|
/**
|
|
@@ -481,6 +566,14 @@ export class CoreAdapter {
|
|
|
481
566
|
closed = false;
|
|
482
567
|
/** Built-in workflow ids whose overlay JSON has been written this process lifetime. */
|
|
483
568
|
_builtinOverlayWritten = new Set();
|
|
569
|
+
/**
|
|
570
|
+
* The estate db the Core actor was spawned over (`CoreAdapterOptions.dbPath` — the `--db`
|
|
571
|
+
* flag / `~/.wicked-crew/core.db` default). Kept because some engine bindings take the db
|
|
572
|
+
* path as an ARG rather than reading the actor's own handle (`governanceEvals` runs its evals
|
|
573
|
+
* over a read-only connection to this same store); crew resolves it here, the one place the
|
|
574
|
+
* path is already known, so no route grows a second spelling of where the store lives.
|
|
575
|
+
*/
|
|
576
|
+
dbPath;
|
|
484
577
|
/** `true` when this adapter armed the event-driven exec seam (for readiness/reporting). */
|
|
485
578
|
engineExec;
|
|
486
579
|
/** The bus db the exec seam runs over when armed (else `undefined`). */
|
|
@@ -527,6 +620,7 @@ export class CoreAdapter {
|
|
|
527
620
|
process.env['WICKED_CORE_EXE'] = wcExe;
|
|
528
621
|
}
|
|
529
622
|
this.stub = opts.stub === true;
|
|
623
|
+
this.dbPath = opts.dbPath;
|
|
530
624
|
this.core = this.stub ? Core.spawnStub(opts.dbPath) : Core.spawn(opts.dbPath);
|
|
531
625
|
// The ONE subscribe() for the process. Error-first callback (index.d.ts:56):
|
|
532
626
|
// one JSON string per CoreEvent, in emission order. A throw in a listener is
|
|
@@ -734,6 +828,77 @@ export class CoreAdapter {
|
|
|
734
828
|
cancelRun(runId) {
|
|
735
829
|
return this.core.cancelRun(runId);
|
|
736
830
|
}
|
|
831
|
+
// ── Campaigns (DES-CAMPAIGN-001 / crew#342 + TH-9) ─────────────────────────
|
|
832
|
+
// The engine is the campaign store — durable, single-writer, crash-resumable (its Campaign
|
|
833
|
+
// rows persist beside AgentSessions on the same estate substrate). Crew keeps NO shadow copy:
|
|
834
|
+
// every read below asks the engine, so a daemon restart or a second daemon over the same db
|
|
835
|
+
// sees the same campaigns. `launchCampaign` is gated on METHOD PRESENCE (not a version floor)
|
|
836
|
+
// because the bindings ship in whatever core-ts release the train cuts next.
|
|
837
|
+
/** Whether the installed engine addon carries the campaign bindings. */
|
|
838
|
+
campaignsSupported() {
|
|
839
|
+
return typeof this.core.launchCampaign === 'function';
|
|
840
|
+
}
|
|
841
|
+
/** Guard: the campaign binding surface, or a typed 501-shaped refusal naming the action. */
|
|
842
|
+
_campaigns(what) {
|
|
843
|
+
if (typeof this.core.launchCampaign !== 'function' ||
|
|
844
|
+
typeof this.core.resumeCampaign !== 'function' ||
|
|
845
|
+
typeof this.core.cancelCampaign !== 'function' ||
|
|
846
|
+
typeof this.core.campaignDetail !== 'function' ||
|
|
847
|
+
typeof this.core.campaignList !== 'function') {
|
|
848
|
+
throw new CampaignsUnsupportedError(what);
|
|
849
|
+
}
|
|
850
|
+
return this.core;
|
|
851
|
+
}
|
|
852
|
+
/** Validate + launch a campaign DAG → the campaign id. `def` is the ENGINE wire shape
|
|
853
|
+
* (snake_case) — `campaigns/plan.ts` is the one producer of it in this daemon.
|
|
854
|
+
*
|
|
855
|
+
* `workflows` are the composed per-node Tool workflows the def's run_specs reference; they
|
|
856
|
+
* are armed FIRST (hot-register + overlay persist) so the engine can resolve them both now
|
|
857
|
+
* and after a restart — a campaign is durable, so its node workflows must be too. Unlike a
|
|
858
|
+
* deliver-composed def they are NOT purely ephemeral (`_armPerRunWorkflow`), and unlike a
|
|
859
|
+
* user workflow they never enter `userWorkflows` or the catalog (the hydration filter in
|
|
860
|
+
* `readOverlayWorkflows` skips the `campaign-` prefix). */
|
|
861
|
+
async launchCampaign(def, workflows = []) {
|
|
862
|
+
const surface = this._campaigns('Launching a campaign');
|
|
863
|
+
for (const wf of workflows) {
|
|
864
|
+
await this._armCampaignWorkflow(wf);
|
|
865
|
+
}
|
|
866
|
+
return surface.launchCampaign(JSON.stringify(def));
|
|
867
|
+
}
|
|
868
|
+
/** Arm one composed campaign-node workflow: validate-then-persist (the FINDING-002 ordering —
|
|
869
|
+
* core's parser is the authority and runs BEFORE the overlay write), overlay file for
|
|
870
|
+
* restart durability, no `userWorkflows` entry. */
|
|
871
|
+
async _armCampaignWorkflow(def) {
|
|
872
|
+
const core = this.core;
|
|
873
|
+
const register = core['registerWorkflow'];
|
|
874
|
+
if (typeof register !== 'function') {
|
|
875
|
+
// Unreachable on any addon that carries launchCampaign (registerWorkflow predates it by
|
|
876
|
+
// several releases), but the guard keeps the failure loud if that ever un-holds.
|
|
877
|
+
throw new CampaignsUnsupportedError('Arming a campaign node workflow');
|
|
878
|
+
}
|
|
879
|
+
await register.call(this.core, JSON.stringify(def));
|
|
880
|
+
const dir = workflowOverlayDir();
|
|
881
|
+
await mkdir(dir, { recursive: true });
|
|
882
|
+
await writeFile(join(dir, `${def.id}.json`), JSON.stringify(def, null, 2), 'utf8');
|
|
883
|
+
}
|
|
884
|
+
/** Resume a campaign from its persisted state → the campaign status token. */
|
|
885
|
+
resumeCampaign(id) {
|
|
886
|
+
return this._campaigns('Resuming a campaign').resumeCampaign(id);
|
|
887
|
+
}
|
|
888
|
+
/** Cancel a campaign (in-flight node Runs cancelled, the rest marked) → the status token. */
|
|
889
|
+
cancelCampaign(id) {
|
|
890
|
+
return this._campaigns('Cancelling a campaign').cancelCampaign(id);
|
|
891
|
+
}
|
|
892
|
+
/** A campaign's full persisted state (DAG + node statuses + run ids), or `null` when unknown. */
|
|
893
|
+
async campaignDetail(id) {
|
|
894
|
+
const raw = await this._campaigns('Reading a campaign').campaignDetail(id);
|
|
895
|
+
return parseEngineJson(raw, 'campaignDetail');
|
|
896
|
+
}
|
|
897
|
+
/** Every campaign on the store. */
|
|
898
|
+
async campaignList() {
|
|
899
|
+
const raw = await this._campaigns('Listing campaigns').campaignList();
|
|
900
|
+
return parseEngineJson(raw, 'campaignList');
|
|
901
|
+
}
|
|
737
902
|
/**
|
|
738
903
|
* Archive (or unarchive) a TERMINAL run (crew#265) — write-off, not delete. Resolves `true`
|
|
739
904
|
* when the session existed, `false` for an unknown id (→ 404); REJECTS when the run is
|
|
@@ -1120,7 +1285,11 @@ export class CoreAdapter {
|
|
|
1120
1285
|
}
|
|
1121
1286
|
/** All conformance rules on the store. */
|
|
1122
1287
|
async listConformanceRules() {
|
|
1123
|
-
|
|
1288
|
+
// includeRetired=true: the BROWSE surface defaults to status=all and filters in the route, so
|
|
1289
|
+
// the fetch must not silently withdraw retired rows (a steering engine's default excludes
|
|
1290
|
+
// them — with the bare call, `?status=retired` / `include_retired=true` answered [] for every
|
|
1291
|
+
// engine-retired rule, a vacuous facet). Pre-0.7.5 bindings ignore the extra args.
|
|
1292
|
+
return JSON.parse(await this.core.listConformanceRules(null, true));
|
|
1124
1293
|
}
|
|
1125
1294
|
/** All recorded conformance claims (governance decisions). */
|
|
1126
1295
|
async listConformanceClaims() {
|
|
@@ -1192,6 +1361,136 @@ export class CoreAdapter {
|
|
|
1192
1361
|
const json = await this.core.recallRulesPreview(JSON.stringify(cleanQuery));
|
|
1193
1362
|
return JSON.parse(json);
|
|
1194
1363
|
}
|
|
1364
|
+
// ── Governance wiki management (wiki-mgmt) ─────────────────────────────────
|
|
1365
|
+
/** Whether the installed engine addon carries the AW-23 scoreboard binding (core-ts ≥ 0.7.4). */
|
|
1366
|
+
wikiScoreboardSupported() {
|
|
1367
|
+
return typeof this.core.governanceScoreboard === 'function';
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* The wiki population/connection scoreboard (AW-23 / arch-R23) — typed %, resolving %,
|
|
1371
|
+
* enforcement evidence, and an in-band honesty marker for what cannot be measured. Read-only
|
|
1372
|
+
* on the engine side (`open_store_ro`), so it never blocks the single-writer actor.
|
|
1373
|
+
*
|
|
1374
|
+
* `docsRoot` is the same docs root `rules ingest --dir` used; omitted, the typing half reports
|
|
1375
|
+
* `available: false` with the reason — an honest in-band answer, not an error.
|
|
1376
|
+
*
|
|
1377
|
+
* Presence-gated (the campaigns doctrine): throws {@link GovernanceScoreboardUnsupportedError}
|
|
1378
|
+
* on an addon that predates the binding, which the route maps to 501 ("upgrade the engine").
|
|
1379
|
+
*/
|
|
1380
|
+
async governanceScoreboard(docsRoot) {
|
|
1381
|
+
const fn = this.core.governanceScoreboard;
|
|
1382
|
+
if (typeof fn !== 'function') {
|
|
1383
|
+
throw new GovernanceScoreboardUnsupportedError('Reading the governance wiki scoreboard');
|
|
1384
|
+
}
|
|
1385
|
+
return parseEngineJson(await fn.call(this.core, docsRoot ?? null), 'governanceScoreboard');
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* How many `RuleSet` rows (doctrine domain parents, AW-13) the store holds — or `null` when
|
|
1389
|
+
* this engine build cannot count them (no `listRuleSets` binding yet).
|
|
1390
|
+
*
|
|
1391
|
+
* `null` rather than `0` on purpose (the `runEvents` doctrine): "no rulesets" is a real answer
|
|
1392
|
+
* about an unseeded store, and "I cannot count" must never impersonate it — the wiki meta's
|
|
1393
|
+
* empty state would otherwise report a seeded store as empty and point the operator at a
|
|
1394
|
+
* runbook they already ran.
|
|
1395
|
+
*/
|
|
1396
|
+
async countRuleSets() {
|
|
1397
|
+
const fn = this.core.listRuleSets;
|
|
1398
|
+
if (typeof fn !== 'function')
|
|
1399
|
+
return null;
|
|
1400
|
+
const rows = parseEngineJson(await fn.call(this.core), 'listRuleSets');
|
|
1401
|
+
return Array.isArray(rows) ? rows.length : null;
|
|
1402
|
+
}
|
|
1403
|
+
// ── Steering (STEERING program — the unified steering-rule model) ───────────
|
|
1404
|
+
/**
|
|
1405
|
+
* Whether the installed engine addon carries the unified steering-rule model (core-ts ≥ 0.7.5).
|
|
1406
|
+
*
|
|
1407
|
+
* The sentinel is the `steeringImport` binding, which ships WITH the model merge — see the
|
|
1408
|
+
* `GovernanceMethods` comment. Consulted by the routes before: filtering rules by
|
|
1409
|
+
* `?type=` (rows on an old engine carry no `steering_type`, so an empty answer would
|
|
1410
|
+
* impersonate "no rules of that type"); accepting a rule write that carries steering fields
|
|
1411
|
+
* (an old engine would silently drop them — the extraWriteRoots doctrine); and folding the
|
|
1412
|
+
* legacy policy write surface (410 only once the unified store exists to point at).
|
|
1413
|
+
*/
|
|
1414
|
+
steeringSupported() {
|
|
1415
|
+
return typeof this.core.steeringImport === 'function';
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Batch-import steering rules (frontmattered markdown docs and/or ready rule JSON) through the
|
|
1419
|
+
* engine's ingest normalize/validate path — the SAME path `rules ingest --dir` runs, on the
|
|
1420
|
+
* single-writer actor (the daemon must never open the store for writes itself). Fail-closed
|
|
1421
|
+
* PER ENTRY: one bad entry rejects alone with its reason in that entry's result row, the rest
|
|
1422
|
+
* still land. `defaultType` is the page's inferred steering type, applied to entries that
|
|
1423
|
+
* omit one.
|
|
1424
|
+
*
|
|
1425
|
+
* Presence-gated (the campaigns doctrine): throws {@link SteeringUnsupportedError} on an addon
|
|
1426
|
+
* that predates the binding, which the route maps to 501 ("upgrade the engine").
|
|
1427
|
+
*/
|
|
1428
|
+
async importSteeringRules(entries, defaultType) {
|
|
1429
|
+
const fn = this.core.steeringImport;
|
|
1430
|
+
if (typeof fn !== 'function') {
|
|
1431
|
+
throw new SteeringUnsupportedError('Importing steering rules');
|
|
1432
|
+
}
|
|
1433
|
+
const rows = parseEngineJson(await fn.call(this.core, JSON.stringify({ default_type: defaultType ?? null, entries })), 'steeringImport');
|
|
1434
|
+
// Rust spells an absent `Option` as `null` unless the engine adds `skip_serializing_if`;
|
|
1435
|
+
// crew's published wire type (`SteeringImportResult.name/ids/error?`) spells absence as an
|
|
1436
|
+
// ABSENT KEY. Pin the shape on OUR side of the seam — strip null-valued keys — so the HTTP
|
|
1437
|
+
// response honors the contract whichever spelling the installed addon ships.
|
|
1438
|
+
return rows.map((r) => Object.fromEntries(Object.entries(r).filter(([, v]) => v !== null)));
|
|
1439
|
+
}
|
|
1440
|
+
// ── Testing (crew-testing) — governance evals over the steering-rule store ──
|
|
1441
|
+
/**
|
|
1442
|
+
* Whether the installed engine addon carries the governance-evals surface (core-ts ≥ 0.7.5,
|
|
1443
|
+
* unreleased at the time this seam lands). The sentinel is the `governanceEvals` binding —
|
|
1444
|
+
* for the WHOLE evals seam, corpus import included: the two bindings ship together, and a
|
|
1445
|
+
* daemon running against the released 0.7.4 addon must answer 501 on both routes, never crash.
|
|
1446
|
+
*/
|
|
1447
|
+
governanceEvalsSupported() {
|
|
1448
|
+
return typeof this.core.governanceEvals === 'function';
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Run the governance evals: every sample of the corpus (`corpus` = an `evals:<name>` estate
|
|
1452
|
+
* scope minted by {@link importGovernanceCorpus}; omitted = the engine's built-in default
|
|
1453
|
+
* corpus) is pushed through the decide path and compared to what its `kind` says SHOULD have
|
|
1454
|
+
* happened. Resolves the engine's serde report — snake_case field names, passed to the wire
|
|
1455
|
+
* verbatim (the pinned crew/studio contract).
|
|
1456
|
+
*
|
|
1457
|
+
* `dbPath` rides the args because the eval run opens its own read-only connection to the
|
|
1458
|
+
* steering store — the SAME store this adapter's actor writes (`this.dbPath`, the one spelling
|
|
1459
|
+
* of where it lives). `knowledgeDb` is deliberately omitted: crew configures no separate
|
|
1460
|
+
* knowledge db (the knowledge store is the engine's single-writer sidecar, derived from its
|
|
1461
|
+
* own config exactly as the steering ingest path derives it).
|
|
1462
|
+
*
|
|
1463
|
+
* Presence-gated (the campaigns doctrine): throws {@link GovernanceEvalsUnsupportedError} on
|
|
1464
|
+
* an addon that predates the binding, which the route maps to 501 ("upgrade the engine").
|
|
1465
|
+
*/
|
|
1466
|
+
async runGovernanceEvals(args) {
|
|
1467
|
+
const fn = this.core.governanceEvals;
|
|
1468
|
+
if (typeof fn !== 'function') {
|
|
1469
|
+
throw new GovernanceEvalsUnsupportedError('Running governance evals');
|
|
1470
|
+
}
|
|
1471
|
+
const payload = {
|
|
1472
|
+
...(args.type !== undefined ? { type: args.type } : {}),
|
|
1473
|
+
...(args.corpus !== undefined ? { corpus: args.corpus } : {}),
|
|
1474
|
+
dbPath: this.dbPath,
|
|
1475
|
+
};
|
|
1476
|
+
return parseEngineJson(await fn.call(this.core, JSON.stringify(payload)), 'governanceEvals');
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* Import a named eval corpus into the knowledge store under the `evals:<name>` scope (the
|
|
1480
|
+
* string a later {@link runGovernanceEvals} names as `corpus`). `knowledgeDb` is omitted for
|
|
1481
|
+
* the same reason as in {@link runGovernanceEvals} — the engine derives its own sidecar.
|
|
1482
|
+
*
|
|
1483
|
+
* Gated on the `governanceEvals` sentinel as well as the binding itself: the two ship
|
|
1484
|
+
* together, and importing a corpus no engine on this host can ever run would be a trap, not
|
|
1485
|
+
* a feature (the steering author-route doctrine).
|
|
1486
|
+
*/
|
|
1487
|
+
async importGovernanceCorpus(name, samples) {
|
|
1488
|
+
const importFn = this.core.governanceCorpusImport;
|
|
1489
|
+
if (typeof this.core.governanceEvals !== 'function' || typeof importFn !== 'function') {
|
|
1490
|
+
throw new GovernanceEvalsUnsupportedError('Importing an eval corpus');
|
|
1491
|
+
}
|
|
1492
|
+
return parseEngineJson(await importFn.call(this.core, JSON.stringify({ name, samples })), 'governanceCorpusImport');
|
|
1493
|
+
}
|
|
1195
1494
|
// ── Workflow viewer + builder (crew#44) ────────────────────────────────────
|
|
1196
1495
|
// Built-ins are static TypeScript mirrors of workflow.rs. User-registered
|
|
1197
1496
|
// workflows are added to `userWorkflows` and persisted to disk; the Rust actor
|