wicked-core-ts 0.15.31 → 0.15.33
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 +41 -18
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -250,6 +250,13 @@ export declare class Core {
|
|
|
250
250
|
* approval. napi drops undeclared trailing arguments, so a skin keys on this static first.
|
|
251
251
|
*/
|
|
252
252
|
static supportsPlanSendBack(): boolean
|
|
253
|
+
/**
|
|
254
|
+
* (program context-block-core) Whether this addon takes a run's context block:
|
|
255
|
+
* `setRunContext`, the `runContextSet` / `runContextDelivered` events and the session's
|
|
256
|
+
* `run_context`. An older addon has no `setRunContext`, so crew keys on this static first and
|
|
257
|
+
* keeps its standing note without it.
|
|
258
|
+
*/
|
|
259
|
+
static supportsRunContext(): boolean
|
|
253
260
|
/**
|
|
254
261
|
* (program DES-POWER-MODE) Whether this addon runs power mode: `LaunchOptions.power`,
|
|
255
262
|
* `setPowerMode`, `raiseRigor`, `answerPowerPause` and the power events. An older addon
|
|
@@ -423,9 +430,12 @@ export declare class Core {
|
|
|
423
430
|
* token. Safe whether the run is executing or paused.
|
|
424
431
|
*/
|
|
425
432
|
cancelRun(runId: string): Promise<string>
|
|
426
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* The unit a bound MCP token belongs to: `{runId, ord, attempt, seat, timeoutSecs}`; rejects
|
|
435
|
+
* `invalid_token: …`. Records and emits nothing (crew queues asks per run before opening).
|
|
436
|
+
*/
|
|
427
437
|
askUnit(token: string): Promise<string>
|
|
428
|
-
/** Open an operator question with `{token, question, choices?, recommended?}`. */
|
|
438
|
+
/** Open an operator question with `{token, question, choices?, recommended?, multi?: {min?, max?}}`. */
|
|
429
439
|
openAsk(requestJson: string): Promise<string>
|
|
430
440
|
/** Close an unanswered question (`timeout` or `teardown`); false if already resolved. */
|
|
431
441
|
closeAsk(elicitationId: string, reason: string): Promise<boolean>
|
|
@@ -558,7 +568,9 @@ export declare class Core {
|
|
|
558
568
|
/**
|
|
559
569
|
* The presets a launch in `projectId` sees (null ⇒ the global set), sorted by name, as a JSON
|
|
560
570
|
* array of `Preset` objects: every global preset (built-ins included, `created_by: "builtin"`),
|
|
561
|
-
* with a project row replacing the global row of the same name.
|
|
571
|
+
* with a project row replacing the global row of the same name. (DES-CHAT-FIRST-001 C2) A
|
|
572
|
+
* built-in row also carries `title`, `summary` and `use_when` (2–4 phrases); a saved preset
|
|
573
|
+
* carries none of the three keys, and an older engine never sends them.
|
|
562
574
|
*/
|
|
563
575
|
listPresets(projectId?: string | undefined | null): Promise<string>
|
|
564
576
|
/**
|
|
@@ -975,6 +987,17 @@ export declare class Core {
|
|
|
975
987
|
* `guard_error: …`. Static, like `evaluateMcpCall`.
|
|
976
988
|
*/
|
|
977
989
|
static listMcpTools(requestJson: string): Promise<string>
|
|
990
|
+
/**
|
|
991
|
+
* (DES-RULE-CHECK-001, S1) Which in-force rules a job is checked against. `args_json` is `{ rules:
|
|
992
|
+
* [ConformanceRule…], job: { workflow?, steps?: [{ tokens, kind? }], kinds?, project?, languages?, frameworks?,
|
|
993
|
+
* layers?, diff? } }`; resolves to `{ matches: [{ rule_id, status: "applies"|"may_apply"|"not_applicable", facts:
|
|
994
|
+
* [{ kind, detail }] }] }`: one match per rule, none dropped, in reading order. "not_applicable" is only ever a
|
|
995
|
+
* recorded fact (no step of the job selects it, with the gate's literal tokens; tool tokens the MCP and editor gates
|
|
996
|
+
* judge per call; another project; a facet or trigger the
|
|
997
|
+
* job's diff does not meet); an unknown fact decides nothing. Pure: no store, no model. Rejects with
|
|
998
|
+
* `bad_request: …`. Static, like `evaluateMcpCall`.
|
|
999
|
+
*/
|
|
1000
|
+
static matchRules(argsJson: string): Promise<string>
|
|
978
1001
|
/**
|
|
979
1002
|
* (crew#1337) Judge ONE brokered MCP call for the token's unit with the SAME evaluation
|
|
980
1003
|
* `evaluateMcpCall` runs, WITH its arguments (an argument-triggered rule fires), and record
|
|
@@ -986,19 +1009,6 @@ export declare class Core {
|
|
|
986
1009
|
* `evaluateMcpCall`.
|
|
987
1010
|
*/
|
|
988
1011
|
static judgeMcpCall(requestJson: string): Promise<string>
|
|
989
|
-
/**
|
|
990
|
-
* (DES-RULE-CHECK-001, S1) Which in-force rules a job is checked against. `args_json` is `{ rules:
|
|
991
|
-
* [ConformanceRule…], job: { workflow?, steps?: [{ tokens, kind? }], kinds?, project?, languages?, frameworks?,
|
|
992
|
-
* layers?, diff? } }`; resolves to `{ matches: [{ rule_id, status: "applies"|"may_apply"|"not_applicable", facts:
|
|
993
|
-
* [{ kind, detail }] }] }`: one match per rule, none dropped, in reading order. "not_applicable" is only ever a
|
|
994
|
-
* recorded fact (no step of the job selects it, with the gate's literal tokens; tool tokens the MCP and editor gates
|
|
995
|
-
* judge per call; another project; a facet or trigger the
|
|
996
|
-
* job's diff does not meet); an unknown fact decides nothing. Pure: no store, no model. Rejects with
|
|
997
|
-
* `bad_request: …`. Static, like `evaluateMcpCall`. (DES-RULE-CHECK-001) `job.repo` (the job's repository
|
|
998
|
-
* id or name) and `job.paths` (changed files): a rule whose `statement` or `source_ref` document names
|
|
999
|
-
* the repository, or whose statement names a changed file, applies — so send each rule's `statement`.
|
|
1000
|
-
*/
|
|
1001
|
-
static matchRules(argsJson: string): Promise<string>
|
|
1002
1012
|
/**
|
|
1003
1013
|
* (core#1018) The estate relay's scope for a token: crew's broker relays a container seat's
|
|
1004
1014
|
* `mcp:estate/<tool>` calls to the host's estate and scopes them by this. `request_json` is
|
|
@@ -1073,8 +1083,12 @@ export declare class Core {
|
|
|
1073
1083
|
* ONE registered repo's requirements graph, read from that repo's OWN estate store (the source
|
|
1074
1084
|
* of truth `domain-graph` persists into; never a file in the checkout), with its coverage label
|
|
1075
1085
|
* recomputed from the store's own counts against the configured minimum. Resolves to a JSON
|
|
1076
|
-
* string `{ "graph": <domain-model document | null>, "coverage": {...}
|
|
1077
|
-
*
|
|
1086
|
+
* string `{ "graph": <domain-model document | null>, "coverage": {...}, "build": { generation,
|
|
1087
|
+
* coverage } | null, "rows": { <domain>: { <REQ-NNN>: { real, uncounted: null | "structural" |
|
|
1088
|
+
* "not_product" | "unindexed" } } } | null }`: `graph` is the last build (null until a build
|
|
1089
|
+
* reached the minimum), `coverage` the store now, `build` the label that build persisted, `rows`
|
|
1090
|
+
* the engine's verdict on each listed row that recorded its unit (same pass as `coverage`). An
|
|
1091
|
+
* unknown `repo_ref` REJECTS.
|
|
1078
1092
|
*/
|
|
1079
1093
|
getRequirementsGraphForRepo(repoRef: string): Promise<string>
|
|
1080
1094
|
/**
|
|
@@ -1116,6 +1130,15 @@ export declare class Core {
|
|
|
1116
1130
|
* warning. Fires [`CoreEvent::WorkerMessageInjected`] for each successful write.
|
|
1117
1131
|
*/
|
|
1118
1132
|
injectWorkerMessage(runId: string, message: string, target: string): Promise<unknown>
|
|
1133
|
+
/**
|
|
1134
|
+
* (program context-block-core) Replace a run's context block WHOLE: `contextJson` is
|
|
1135
|
+
* `{ version, sections: [{ id: "goal"|"approach"|"constraints", text, author: { kind: "human",
|
|
1136
|
+
* id }, version }], set_by: { kind: "human"|"system", id } }`. Resolves to `{ version,
|
|
1137
|
+
* accepted }` (an older or equal version is a no-op, `accepted: false`). Rejects with
|
|
1138
|
+
* `bad_request:` (a section not a person's, oversize, blank, unknown; never clipped),
|
|
1139
|
+
* `not_found:` or `conflict:` (the run has ended).
|
|
1140
|
+
*/
|
|
1141
|
+
setRunContext(runId: string, contextJson: string): Promise<string>
|
|
1119
1142
|
/**
|
|
1120
1143
|
* (program DES-POWER-MODE) Flip a run's power switch. Resolves to the run's power state as
|
|
1121
1144
|
* JSON (`PowerState`, camelCase). Rejects with `not_found:` / `conflict:` / `refused:`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-core-ts",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.33",
|
|
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": {
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"typecheck": "tsc --noEmit -p types-test/tsconfig.json"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"wicked-core-ts-darwin-arm64": "0.15.
|
|
47
|
-
"wicked-core-ts-darwin-x64": "0.15.
|
|
48
|
-
"wicked-core-ts-linux-arm64-gnu": "0.15.
|
|
49
|
-
"wicked-core-ts-linux-x64-gnu": "0.15.
|
|
50
|
-
"wicked-core-ts-win32-x64-msvc": "0.15.
|
|
46
|
+
"wicked-core-ts-darwin-arm64": "0.15.33",
|
|
47
|
+
"wicked-core-ts-darwin-x64": "0.15.33",
|
|
48
|
+
"wicked-core-ts-linux-arm64-gnu": "0.15.33",
|
|
49
|
+
"wicked-core-ts-linux-x64-gnu": "0.15.33",
|
|
50
|
+
"wicked-core-ts-win32-x64-msvc": "0.15.33"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@napi-rs/cli": "^2.18.4",
|