wicked-core-ts 0.7.44 → 0.7.46

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 (2) hide show
  1. package/index.d.ts +59 -6
  2. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -136,6 +136,14 @@ export interface LaunchOptions {
136
136
  * on the roster REJECTS the launch. The roster is re-ordered so the pick is first.
137
137
  */
138
138
  primary?: string
139
+ /**
140
+ * (core#850, EX-01/EX-02) The EXPLICIT opt-in to reduced assurance: the run may evaluate on its
141
+ * creator's seat and pass a pinned gate whose judge had no distinct seat — both disclosed on every
142
+ * receipt (`sessionStarted.assurance.mode: "reduced"`, `gateEvaluated.assurance`). Omit (or
143
+ * `false`) and a creator-seat evaluator is refused at distribution (`NoEligibleSeat`) and a gate
144
+ * whose required judge was skipped holds (`judge_unavailable`).
145
+ */
146
+ reducedAssurance?: boolean
139
147
  }
140
148
  /**
141
149
  * A handle to a wicked-core runtime. Construct with [`Core::spawn`] (production engine: real
@@ -369,9 +377,13 @@ export declare class Core {
369
377
  * `{ source, reason, claim_id?, rule_ids?, denied_tool?, phase? }`. A rejected unit keeps its
370
378
  * PARTIAL output here, flagged; a unit denied BEFORE any output existed answers with an
371
379
  * explicit failure record (`output` absent, `denial` carrying the claim id / firing rule ids /
372
- * denied tool) instead of `null`.
380
+ * denied tool) instead of `null`. (core#791) Every record also names its `attempt`, and
381
+ * `attempts` lists each attempt that left an output record; pass `attempt` to read that
382
+ * attempt's own bytes (`resolution: "superseded"` when a later attempt replaced it,
383
+ * `"unresolved"` when it ended without a resolution record — `phase_status` is then its step
384
+ * status, e.g. `timed_out`). Without `attempt` the resolution record is read as before.
373
385
  */
374
- unitTranscript(unitId: string): Promise<string>
386
+ unitTranscript(unitId: string, attempt?: number | undefined | null): Promise<string>
375
387
  /**
376
388
  * A run's recorded event history, oldest first, as a JSON array. Each entry is the SAME tagged
377
389
  * object the `/ws` stream carries ([`CoreEvent::to_json`]) plus the durable log's envelope — a
@@ -661,17 +673,28 @@ export declare class Core {
661
673
  * engine round-trips the steering fields instead of silently dropping them.
662
674
  */
663
675
  steeringImport(batchJson: string): Promise<string>
676
+ /**
677
+ * What this host can contain, known before any run (core#678 item 1 — the boot probe,
678
+ * cached), as a JSON object: `{ platform, armed, tool: "sandbox-exec"|"bwrap"|null,
679
+ * reason: "no_launcher"|"cannot_arm"|null, reasonText, unsandboxedOptIn,
680
+ * verifyFloor: "contained"|"uncontained"|"refused" }`. `refused` means every check-running
681
+ * verify floor on this host will deny (no OS write boundary and no
682
+ * `WICKED_REPO_CHECKS_UNSANDBOXED=1`): crew's diagnostics and studio say so before a run.
683
+ */
684
+ hostBoundary(): Promise<string>
664
685
  /**
665
686
  * Governance rules eval — run an eval corpus through the REAL SELECT→DECIDE gate path and
666
687
  * 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
688
+ * `args_json` is `{ type?, corpus?, knowledgeDb?, memoryDb?, dbPath }` (camelCase keys are the PINNED
668
689
  * binding contract): `type` slices the corpus to one of the 7 steering types; `corpus`
669
690
  * names an estate knowledge scope (`evals:<name>` — a corpus landed by
670
691
  * [`Core::governance_corpus_import`]) or, omitted, selects the compiled-in default corpus;
671
692
  * `knowledgeDb` powers embedding gap hints (absent/unusable ⇒ the report carries
672
693
  * `degraded: "facet-only"` — an honest downgrade to keyword hints, never fabricated
673
- * similarity); `dbPath` is the rules store, opened READ-ONLY — this call never goes through
674
- * the single-writer actor and never writes either store.
694
+ * similarity); `memoryDb` (core#397) is the estate memory store the memory axis recalls from,
695
+ * opened READ-ONLY (absent ⇒ the report's `memory` is `null`, and a sample that declares
696
+ * memories rejects the run); `dbPath` is the rules store, opened READ-ONLY — this call never
697
+ * goes through the single-writer actor and never writes any store.
675
698
  *
676
699
  * Resolves to the `EvalReport` JSON exactly as the engine serializes it (snake_case — crew
677
700
  * passes it through verbatim as the pinned wire contract):
@@ -683,6 +706,10 @@ export declare class Core {
683
706
  * partitions the decide-lane rules eligible for the run (narrowed to `type` when given) by
684
707
  * whether any sample fired them; `recall_only` counts the effect-less rules the gate never
685
708
  * fires (core#395 — zero decide-lane rules means the verdicts are the corpus split).
709
+ * (core#397) The MEMORY axis: each result carries `memory: { surfaced, missing,
710
+ * unexpected_surfaced, verdict } | null` (null when the sample declares no memories), and the
711
+ * report carries `memory: { summary: { total, caught, gaps, false_positives }, coverage } |
712
+ * null` (null when no `memoryDb` was given) — both ALWAYS present, never absent.
686
713
  *
687
714
  * Fail-closed: malformed args, an unknown steering type, a corpus name outside the
688
715
  * `evals:` scope, or a missing store reject the Promise with the engine's reason — crew maps
@@ -1075,10 +1102,36 @@ export declare class Subscription {
1075
1102
  * the very seat of) the CLI that created the work the unit depends on.
1076
1103
  * core#759 (additive): an awaitingHuman with `gateKind: 'team_dispute'` carries
1077
1104
  * `choices: ['approve', 'request_changes', 'reject']` and `recommended: 1` (send the finding
1078
- * back). Every other gate kind carries NEITHER key (absent, never null).
1105
+ * back). Every other gate kind carries NEITHER key (absent, never null), except a
1106
+ * `consent` gate with a dry-run plan (core#820, below).
1079
1107
  * core#759 follow-up (additive): that team_dispute awaitingHuman also carries `findingIds`
1080
1108
  * (the unresolved HIGH finding ids the dispute is about, as `gate.opened` names them); absent
1081
1109
  * for every other gate kind.
1110
+ * core#820 (additive): an awaitingHuman with `gateKind: 'consent'` whose gated unit depends on a
1111
+ * dry-run plan carries `choices` (`'consent:<id>'` per plan choice, then `'reject'`), `recommended`
1112
+ * (the default, program-owned choice), `choiceLabels` and `writeTargets` (both keyed by choice
1113
+ * token; each target `{path, what, cli?, operatorOwned}`, `reject` → `[]`), `writePlanOrd` and,
1114
+ * when the plan names any, `writeTargetsSkipped` (`{cli, why}[]`). With no plan it carries only
1115
+ * `writeTargetsMissing` (why nothing is listed). Answer with `action: 'consent:<id>'`, approve
1116
+ * (= the default) or reject.
1117
+ * core#762 / core#418 (additive, new events): `acpTurnSettled` {session, ord, attempt, cliKey,
1118
+ * quietSecs, outputBytes} — the bridge sent no stopReason for quietSecs after the worker's final
1119
+ * message with no tool call open, so the ENGINE ended the turn and kept its output as the
1120
+ * attempt's result (a watchdog seeing it does not reassign; WICKED_ACP_SETTLE_SECS, default 600,
1121
+ * 0 = off). `acpProcessRestarted` {session, ord, attempt, cliKey, reason, ms} — the session that
1122
+ * opened replaces one the engine closed itself (reason `posture_switch` |
1123
+ * `fenced_unit_quiesced` | `turn_settled`); ms is the cold-start cost.
1124
+ * core#850 (additive; EX-01..EX-05): sessionStarted carries `assurance: {mode: 'full' | 'reduced',
1125
+ * required: string[]}` — the run's contract (`required` ⊆ `distinct_evaluator`, `judge`,
1126
+ * `qe_acceptance`; a workflow's `required_instruments`, else the first two; `reduced` only when
1127
+ * the launch set `reducedAssurance`, and it waives only the first two). gateEvaluated and
1128
+ * deliverLiftEvaluated carry `assurance: {mode, required, ran: string[], skipped: {instrument,
1129
+ * reason, detail: string | null}[], creator, evaluator, judge, tree: string | null, attempt}` —
1130
+ * instruments `pinned_validator` | `repo_checks` | `judge` | `evaluator_pass` |
1131
+ * `distinct_evaluator`, reasons `reduced_assurance` | `no_distinct_seat` | `no_boundary` |
1132
+ * `error` | `not_applicable`; the delivery receipt aggregates every gate of the run. A gate whose required judge was
1133
+ * skipped now denies under `judge_unavailable`; an evaluator pass that errored denies under
1134
+ * `denial.source === 'evaluator_error'`.
1082
1135
  */
1083
1136
  export interface CoreEventJson {
1084
1137
  type: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-core-ts",
3
- "version": "0.7.44",
3
+ "version": "0.7.46",
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.44",
47
- "wicked-core-ts-darwin-x64": "0.7.44",
48
- "wicked-core-ts-linux-arm64-gnu": "0.7.44",
49
- "wicked-core-ts-linux-x64-gnu": "0.7.44",
50
- "wicked-core-ts-win32-x64-msvc": "0.7.44"
46
+ "wicked-core-ts-darwin-arm64": "0.7.46",
47
+ "wicked-core-ts-darwin-x64": "0.7.46",
48
+ "wicked-core-ts-linux-arm64-gnu": "0.7.46",
49
+ "wicked-core-ts-linux-x64-gnu": "0.7.46",
50
+ "wicked-core-ts-win32-x64-msvc": "0.7.46"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@napi-rs/cli": "^2.18.4",