wicked-core-ts 0.7.2 → 0.7.4
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/index.d.ts +55 -2
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -169,6 +169,41 @@ export declare class Core {
|
|
|
169
169
|
* `decline`/`cancel`. Resolves to `"ok"` on success, rejects if no matching elicitation exists.
|
|
170
170
|
*/
|
|
171
171
|
resolveElicitation(runId: string, elicitationId: string, action: string, response?: any | undefined | null): Promise<string>
|
|
172
|
+
/**
|
|
173
|
+
* Validate + launch a campaign — a DAG of Runs (DES-CAMPAIGN-001). `defJson` is a
|
|
174
|
+
* `CampaignDef` JSON object in the engine wire shape (snake_case): `{ id, name?, nodes:
|
|
175
|
+
* [{ node_id, run_spec: { problem, clis, entity_mode, human_confirm?, repo_ref?,
|
|
176
|
+
* workflow_id? } }], edges?: [{ from, to, condition? }], policy?, max_concurrency }`.
|
|
177
|
+
* Resolves to the campaign id. Fire-and-forget: independent nodes dispatch immediately and
|
|
178
|
+
* progress arrives as the `campaign*` CoreEvents — `subscribe()` first. Rejects a cycle /
|
|
179
|
+
* empty / duplicate-edge / unknown-edge-endpoint def at launch, before anything persists.
|
|
180
|
+
*/
|
|
181
|
+
launchCampaign(defJson: string): Promise<string>
|
|
182
|
+
/**
|
|
183
|
+
* Resume a campaign from its persisted state (after a pause, crash, or a fresh process) —
|
|
184
|
+
* the scheduler re-derives the ready set from the persisted node statuses and re-attaches
|
|
185
|
+
* any mid-run node, never re-running a completed node. Resolves to the campaign status
|
|
186
|
+
* token (`running` | `paused` | `completed` | `partially_completed` | `failed` |
|
|
187
|
+
* `cancelled`); rejects for an unknown id.
|
|
188
|
+
*/
|
|
189
|
+
resumeCampaign(id: string): Promise<string>
|
|
190
|
+
/**
|
|
191
|
+
* Cancel a campaign — cancel every in-flight node's Run and mark the rest `Cancelled`.
|
|
192
|
+
* Resolves to the campaign status token; rejects for an unknown id.
|
|
193
|
+
*/
|
|
194
|
+
cancelCampaign(id: string): Promise<string>
|
|
195
|
+
/**
|
|
196
|
+
* A campaign's full state — the DAG (embedded def), per-node statuses, per-node run ids and
|
|
197
|
+
* attempt counters — as a JSON `Campaign` object (engine wire shape, snake_case), or the
|
|
198
|
+
* JSON literal `null` when the id is unknown. The read a DAG/scoreboard view builds from.
|
|
199
|
+
*/
|
|
200
|
+
campaignDetail(id: string): Promise<string>
|
|
201
|
+
/**
|
|
202
|
+
* Every campaign on the store, as a JSON array of `Campaign` objects. Read-only store
|
|
203
|
+
* connection (the `project_list` pattern) — the single-writer actor is not involved, so a
|
|
204
|
+
* long campaign list cannot queue behind dispatch work.
|
|
205
|
+
*/
|
|
206
|
+
campaignList(): Promise<string>
|
|
172
207
|
/** The agent session ids currently on the store, as a JSON array of strings. */
|
|
173
208
|
sessions(): Promise<string>
|
|
174
209
|
/**
|
|
@@ -280,6 +315,22 @@ export declare class Core {
|
|
|
280
315
|
listConformanceRules(): Promise<string>
|
|
281
316
|
/** All conformance claims (governance decisions) on the store, as a JSON array. */
|
|
282
317
|
listConformanceClaims(): Promise<string>
|
|
318
|
+
/**
|
|
319
|
+
* The AW-23 / arch-R23 population/connection scoreboard — the wiki-health report that tells
|
|
320
|
+
* a POPULATED rule corpus from an ingested-once-and-decaying one: rule counts, typing
|
|
321
|
+
* coverage, connection (ref-resolution) coverage, enforcement evidence, recall volume.
|
|
322
|
+
* Resolves to the SAME JSON `wicked-core rules scoreboard --json` emits (a pretty-printed
|
|
323
|
+
* `Scoreboard` object) — one report shape for CLI operators and crew/studio consumers alike.
|
|
324
|
+
*
|
|
325
|
+
* `docsDir` mirrors the CLI's `--dir`: typing coverage is doc-side (`enforcement_class`
|
|
326
|
+
* lives in frontmatter, never on the rule node), so it needs the SAME docs root
|
|
327
|
+
* `rules ingest --dir` used; omit it and the report says `typing.available: false`,
|
|
328
|
+
* honestly, in-band — never a fake 0% or 100%. `ambiguityCap` mirrors `--ambiguity-cap`
|
|
329
|
+
* (default 5; must be ≥ 1 — fails closed on 0, like the CLI). Strictly a REPORT over a
|
|
330
|
+
* read-only connection: it never blocks the single-writer actor, and residue gating stays
|
|
331
|
+
* `rules drift`'s job.
|
|
332
|
+
*/
|
|
333
|
+
governanceScoreboard(docsDir?: string | undefined | null, ambiguityCap?: number | undefined | null): Promise<string>
|
|
283
334
|
/**
|
|
284
335
|
* Upsert a governance policy. `policy_json` is a JSON-serialized `Policy` object
|
|
285
336
|
* (fields: id, kind, applies_to, effect, trigger, severity, criteria, rule, obligations).
|
|
@@ -349,8 +400,10 @@ export declare class Core {
|
|
|
349
400
|
* bookkeeping store (FINDING-009). `get_coverage_report` above reads `self.db_path` (the daemon
|
|
350
401
|
* `core.db`), which holds run/governance nodes but none of a repo's domain/requirement nodes, so
|
|
351
402
|
* it reports a vacuous `coverage: 1.0` over an empty denominator and cannot name a repo. This
|
|
352
|
-
* resolves the repo from the registry, opens its `code_graph_db` (
|
|
353
|
-
*
|
|
403
|
+
* resolves the repo from the registry, opens its `code_graph_db` (the engine-resolved path
|
|
404
|
+
* every consumer shares — the legacy in-tree `<root>/.codegraph/estate.db` for a repo that
|
|
405
|
+
* already has one, else the estate home's `<estate_root>/<key>/estate.db`; see wicked-core's
|
|
406
|
+
* `code_graph.rs` ADR), and recomputes over it. An unknown `repo_ref` is an
|
|
354
407
|
* ERROR, never a silent vacuous report — the caller must name a real repo.
|
|
355
408
|
* Resolves to the coverage report as a JSON string (`ts_return_type` pins it — the crew adapter
|
|
356
409
|
* used to cast away an `unknown` here; #225 review).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-core-ts",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Node/TypeScript bindings (napi-rs) for wicked-core: drive the in-process orchestration engine from JS/TS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"smoke:all": "node smoke.mjs && node smoke-lifecycle.mjs && node smoke-terminal.mjs"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"wicked-core-ts-darwin-arm64": "0.7.
|
|
45
|
-
"wicked-core-ts-darwin-x64": "0.7.
|
|
46
|
-
"wicked-core-ts-linux-arm64-gnu": "0.7.
|
|
47
|
-
"wicked-core-ts-linux-x64-gnu": "0.7.
|
|
48
|
-
"wicked-core-ts-win32-x64-msvc": "0.7.
|
|
44
|
+
"wicked-core-ts-darwin-arm64": "0.7.4",
|
|
45
|
+
"wicked-core-ts-darwin-x64": "0.7.4",
|
|
46
|
+
"wicked-core-ts-linux-arm64-gnu": "0.7.4",
|
|
47
|
+
"wicked-core-ts-linux-x64-gnu": "0.7.4",
|
|
48
|
+
"wicked-core-ts-win32-x64-msvc": "0.7.4"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@napi-rs/cli": "^2.18.4"
|