wicked-core-ts 0.7.43 → 0.7.45
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 +65 -6
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -369,9 +369,13 @@ export declare class Core {
|
|
|
369
369
|
* `{ source, reason, claim_id?, rule_ids?, denied_tool?, phase? }`. A rejected unit keeps its
|
|
370
370
|
* PARTIAL output here, flagged; a unit denied BEFORE any output existed answers with an
|
|
371
371
|
* explicit failure record (`output` absent, `denial` carrying the claim id / firing rule ids /
|
|
372
|
-
* denied tool) instead of `null`.
|
|
372
|
+
* denied tool) instead of `null`. (core#791) Every record also names its `attempt`, and
|
|
373
|
+
* `attempts` lists each attempt that left an output record; pass `attempt` to read that
|
|
374
|
+
* attempt's own bytes (`resolution: "superseded"` when a later attempt replaced it,
|
|
375
|
+
* `"unresolved"` when it ended without a resolution record — `phase_status` is then its step
|
|
376
|
+
* status, e.g. `timed_out`). Without `attempt` the resolution record is read as before.
|
|
373
377
|
*/
|
|
374
|
-
unitTranscript(unitId: string): Promise<string>
|
|
378
|
+
unitTranscript(unitId: string, attempt?: number | undefined | null): Promise<string>
|
|
375
379
|
/**
|
|
376
380
|
* A run's recorded event history, oldest first, as a JSON array. Each entry is the SAME tagged
|
|
377
381
|
* object the `/ws` stream carries ([`CoreEvent::to_json`]) plus the durable log's envelope — a
|
|
@@ -661,17 +665,28 @@ export declare class Core {
|
|
|
661
665
|
* engine round-trips the steering fields instead of silently dropping them.
|
|
662
666
|
*/
|
|
663
667
|
steeringImport(batchJson: string): Promise<string>
|
|
668
|
+
/**
|
|
669
|
+
* What this host can contain, known before any run (core#678 item 1 — the boot probe,
|
|
670
|
+
* cached), as a JSON object: `{ platform, armed, tool: "sandbox-exec"|"bwrap"|null,
|
|
671
|
+
* reason: "no_launcher"|"cannot_arm"|null, reasonText, unsandboxedOptIn,
|
|
672
|
+
* verifyFloor: "contained"|"uncontained"|"refused" }`. `refused` means every check-running
|
|
673
|
+
* verify floor on this host will deny (no OS write boundary and no
|
|
674
|
+
* `WICKED_REPO_CHECKS_UNSANDBOXED=1`): crew's diagnostics and studio say so before a run.
|
|
675
|
+
*/
|
|
676
|
+
hostBoundary(): Promise<string>
|
|
664
677
|
/**
|
|
665
678
|
* Governance rules eval — run an eval corpus through the REAL SELECT→DECIDE gate path and
|
|
666
679
|
* score every sample (the engine seam behind crew's `POST /api/v1/testing/evals/run`).
|
|
667
|
-
* `args_json` is `{ type?, corpus?, knowledgeDb?, dbPath }` (camelCase keys are the PINNED
|
|
680
|
+
* `args_json` is `{ type?, corpus?, knowledgeDb?, memoryDb?, dbPath }` (camelCase keys are the PINNED
|
|
668
681
|
* binding contract): `type` slices the corpus to one of the 7 steering types; `corpus`
|
|
669
682
|
* names an estate knowledge scope (`evals:<name>` — a corpus landed by
|
|
670
683
|
* [`Core::governance_corpus_import`]) or, omitted, selects the compiled-in default corpus;
|
|
671
684
|
* `knowledgeDb` powers embedding gap hints (absent/unusable ⇒ the report carries
|
|
672
685
|
* `degraded: "facet-only"` — an honest downgrade to keyword hints, never fabricated
|
|
673
|
-
* similarity); `
|
|
674
|
-
*
|
|
686
|
+
* similarity); `memoryDb` (core#397) is the estate memory store the memory axis recalls from,
|
|
687
|
+
* opened READ-ONLY (absent ⇒ the report's `memory` is `null`, and a sample that declares
|
|
688
|
+
* memories rejects the run); `dbPath` is the rules store, opened READ-ONLY — this call never
|
|
689
|
+
* goes through the single-writer actor and never writes any store.
|
|
675
690
|
*
|
|
676
691
|
* Resolves to the `EvalReport` JSON exactly as the engine serializes it (snake_case — crew
|
|
677
692
|
* passes it through verbatim as the pinned wire contract):
|
|
@@ -683,6 +698,10 @@ export declare class Core {
|
|
|
683
698
|
* partitions the decide-lane rules eligible for the run (narrowed to `type` when given) by
|
|
684
699
|
* whether any sample fired them; `recall_only` counts the effect-less rules the gate never
|
|
685
700
|
* fires (core#395 — zero decide-lane rules means the verdicts are the corpus split).
|
|
701
|
+
* (core#397) The MEMORY axis: each result carries `memory: { surfaced, missing,
|
|
702
|
+
* unexpected_surfaced, verdict } | null` (null when the sample declares no memories), and the
|
|
703
|
+
* report carries `memory: { summary: { total, caught, gaps, false_positives }, coverage } |
|
|
704
|
+
* null` (null when no `memoryDb` was given) — both ALWAYS present, never absent.
|
|
686
705
|
*
|
|
687
706
|
* Fail-closed: malformed args, an unknown steering type, a corpus name outside the
|
|
688
707
|
* `evals:` scope, or a missing store reject the Promise with the engine's reason — crew maps
|
|
@@ -1016,6 +1035,8 @@ export declare class Subscription {
|
|
|
1016
1035
|
* `'pre_existing_in_sandbox'` (`'floor_env_mismatch'` is no longer produced); libtest ids are
|
|
1017
1036
|
* qualified by binary (`test t::name [-p crate --lib]`); every `checks[]` entry carries
|
|
1018
1037
|
* `envCannotRun: string[]` and `reruns: CheckRun[]` (each re-run's `boundNote` carries the host load).
|
|
1038
|
+
* core#810 (additive): unitDistributed.pool (UnitPoolSeatingJson | null — a phase's worker pool,
|
|
1039
|
+
* one creator plus monitors, with any shortfall disclosed as requested/seated/missing).
|
|
1019
1040
|
* core#461/#591 (additive): unitDistributed.distinctnessFallback ('creator_seat' |
|
|
1020
1041
|
* 'same_cli_instance' | null — the evaluator ≠ creator fallback as a field, see
|
|
1021
1042
|
* UnitDistributedEventJson); gateEscalated.condition
|
|
@@ -1073,10 +1094,25 @@ export declare class Subscription {
|
|
|
1073
1094
|
* the very seat of) the CLI that created the work the unit depends on.
|
|
1074
1095
|
* core#759 (additive): an awaitingHuman with `gateKind: 'team_dispute'` carries
|
|
1075
1096
|
* `choices: ['approve', 'request_changes', 'reject']` and `recommended: 1` (send the finding
|
|
1076
|
-
* back). Every other gate kind carries NEITHER key (absent, never null)
|
|
1097
|
+
* back). Every other gate kind carries NEITHER key (absent, never null), except a
|
|
1098
|
+
* `consent` gate with a dry-run plan (core#820, below).
|
|
1077
1099
|
* core#759 follow-up (additive): that team_dispute awaitingHuman also carries `findingIds`
|
|
1078
1100
|
* (the unresolved HIGH finding ids the dispute is about, as `gate.opened` names them); absent
|
|
1079
1101
|
* for every other gate kind.
|
|
1102
|
+
* core#820 (additive): an awaitingHuman with `gateKind: 'consent'` whose gated unit depends on a
|
|
1103
|
+
* dry-run plan carries `choices` (`'consent:<id>'` per plan choice, then `'reject'`), `recommended`
|
|
1104
|
+
* (the default, program-owned choice), `choiceLabels` and `writeTargets` (both keyed by choice
|
|
1105
|
+
* token; each target `{path, what, cli?, operatorOwned}`, `reject` → `[]`), `writePlanOrd` and,
|
|
1106
|
+
* when the plan names any, `writeTargetsSkipped` (`{cli, why}[]`). With no plan it carries only
|
|
1107
|
+
* `writeTargetsMissing` (why nothing is listed). Answer with `action: 'consent:<id>'`, approve
|
|
1108
|
+
* (= the default) or reject.
|
|
1109
|
+
* core#762 / core#418 (additive, new events): `acpTurnSettled` {session, ord, attempt, cliKey,
|
|
1110
|
+
* quietSecs, outputBytes} — the bridge sent no stopReason for quietSecs after the worker's final
|
|
1111
|
+
* message with no tool call open, so the ENGINE ended the turn and kept its output as the
|
|
1112
|
+
* attempt's result (a watchdog seeing it does not reassign; WICKED_ACP_SETTLE_SECS, default 600,
|
|
1113
|
+
* 0 = off). `acpProcessRestarted` {session, ord, attempt, cliKey, reason, ms} — the session that
|
|
1114
|
+
* opened replaces one the engine closed itself (reason `posture_switch` |
|
|
1115
|
+
* `fenced_unit_quiesced` | `turn_settled`); ms is the cold-start cost.
|
|
1080
1116
|
*/
|
|
1081
1117
|
export interface CoreEventJson {
|
|
1082
1118
|
type: string
|
|
@@ -1139,6 +1175,29 @@ export interface UnitDistributedEventJson extends CoreEventJson {
|
|
|
1139
1175
|
* disclosure. The seat the unit stays on is therefore always a still-eligible one. Additive.
|
|
1140
1176
|
*/
|
|
1141
1177
|
distinctnessFallback: 'creator_seat' | 'same_cli_instance' | null
|
|
1178
|
+
/**
|
|
1179
|
+
* (core#810) How the unit's worker POOL was filled — one creator plus `requested − 1` monitors
|
|
1180
|
+
* from DISTINCT signed-in seat instances (never the creator's own, never the run's PA).
|
|
1181
|
+
* `null` for a pool of 1 (the default) and a tool unit. A pool larger than what is signed in
|
|
1182
|
+
* is seated SHORT and disclosed — never refused: `seated < requested`, `missing` names the
|
|
1183
|
+
* configured instances that are not signed in, `shortfall` says why. Monitors watch an
|
|
1184
|
+
* attempt only on a team run; any other unit reports `seated: 1` with the reason. Additive.
|
|
1185
|
+
*/
|
|
1186
|
+
pool: UnitPoolSeatingJson | null
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
/** (core#810) {@link UnitDistributedEventJson.pool}: a unit's worker-pool fill. */
|
|
1190
|
+
export interface UnitPoolSeatingJson {
|
|
1191
|
+
/** The phase's `pool` (after any plan step lowered it). */
|
|
1192
|
+
requested: number
|
|
1193
|
+
/** Seats filled: the creator plus `monitors.length`. */
|
|
1194
|
+
seated: number
|
|
1195
|
+
/** The monitor seat instances, in the order the team supervisor summons them. */
|
|
1196
|
+
monitors: string[]
|
|
1197
|
+
/** Configured instances that could have filled the shortfall but are not signed in. */
|
|
1198
|
+
missing: string[]
|
|
1199
|
+
/** Why `seated < requested`; `null` when the pool was filled. */
|
|
1200
|
+
shortfall: string | null
|
|
1142
1201
|
}
|
|
1143
1202
|
|
|
1144
1203
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-core-ts",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.45",
|
|
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.7.
|
|
47
|
-
"wicked-core-ts-darwin-x64": "0.7.
|
|
48
|
-
"wicked-core-ts-linux-arm64-gnu": "0.7.
|
|
49
|
-
"wicked-core-ts-linux-x64-gnu": "0.7.
|
|
50
|
-
"wicked-core-ts-win32-x64-msvc": "0.7.
|
|
46
|
+
"wicked-core-ts-darwin-arm64": "0.7.45",
|
|
47
|
+
"wicked-core-ts-darwin-x64": "0.7.45",
|
|
48
|
+
"wicked-core-ts-linux-arm64-gnu": "0.7.45",
|
|
49
|
+
"wicked-core-ts-linux-x64-gnu": "0.7.45",
|
|
50
|
+
"wicked-core-ts-win32-x64-msvc": "0.7.45"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@napi-rs/cli": "^2.18.4",
|