@deepstrike/sdk 0.2.48 → 0.2.49
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.
|
@@ -30,17 +30,18 @@ export type HarnessRuntimePatch = Pick<RuntimeOptions, "maxTurns" | "maxTotalTok
|
|
|
30
30
|
export type SurfaceTier = "auto" | "screened" | "human";
|
|
31
31
|
/**
|
|
32
32
|
* Map an editable surface to its promotion tier. Maintained HERE beside the whitelist so a surface can
|
|
33
|
-
* never be whitelisted without also being assigned a tier (spec
|
|
33
|
+
* never be whitelisted without also being assigned a tier (the spec's same-place maintenance rule):
|
|
34
34
|
* - "auto" (Tier A): every `runtime.*` whitelist surface. Typed validation + the capability
|
|
35
|
-
* ceiling invariant + the
|
|
35
|
+
* ceiling invariant + the acceptance rule already guard them, so promotion is fully
|
|
36
36
|
* automatic — there is no free text and no injection surface.
|
|
37
37
|
* - "screened" (Tier B): `instructions.*` and `nudges`. Free text can smuggle instructions
|
|
38
38
|
* (persistent prompt-injection laundered through the evidence loop), so a screen runs
|
|
39
39
|
* before promotion.
|
|
40
|
-
* - "human" (Tier C): reserved for capability-WIDENING surfaces. None exist
|
|
41
|
-
* semantics make widening structurally inexpressible — but the enum value exists so a
|
|
42
|
-
* surface cannot be added without consciously assigning it a tier (and
|
|
43
|
-
* human gate). `surfaceTier` therefore never returns "human"
|
|
40
|
+
* - "human" (Tier C): reserved for capability-WIDENING surfaces. None currently exist — intersection
|
|
41
|
+
* semantics make widening structurally inexpressible — but the enum value exists so a new
|
|
42
|
+
* capability-widening surface cannot be added without consciously assigning it a tier (and
|
|
43
|
+
* building the human gate). `surfaceTier` therefore never returns "human" today — no
|
|
44
|
+
* capability-widening surface is expressible.
|
|
44
45
|
* An unknown surface / slot / runtime key THROWS (same discipline as applySurfaceEdit): a surface with
|
|
45
46
|
* no tier must never fall through to auto-promotion.
|
|
46
47
|
*/
|
|
@@ -55,7 +56,7 @@ export interface HarnessManifest {
|
|
|
55
56
|
* Opaque isolation key — host decides its semantics (user / tenant / agent-group). Orthogonal to
|
|
56
57
|
* `modelProfile` (never concatenate the two — that reprises the identity-scoping bug class); absent
|
|
57
58
|
* ⇒ the host treats it as `"default"`. It rides canonical JSON, so digests domain-separate by scope,
|
|
58
|
-
* but an absent scope leaves a
|
|
59
|
+
* but an absent scope leaves a pre-scope manifest's digest byte-identical (canonicalJson skips
|
|
59
60
|
* undefined). Becomes a lineage directory name downstream, hence the path-safe character bound.
|
|
60
61
|
*/
|
|
61
62
|
scope?: string;
|
|
@@ -71,9 +72,9 @@ export interface HarnessManifest {
|
|
|
71
72
|
rationale?: string;
|
|
72
73
|
deltaHeldIn?: number;
|
|
73
74
|
deltaHeldOut?: number;
|
|
74
|
-
/** Promotion tier of the driving edit
|
|
75
|
+
/** Promotion tier of the driving edit. */
|
|
75
76
|
tier?: SurfaceTier;
|
|
76
|
-
/** Injection-screen verdict — present only for a screened (Tier B) promotion
|
|
77
|
+
/** Injection-screen verdict — present only for a screened (Tier B) promotion. */
|
|
77
78
|
screenVerdict?: "pass" | "screened_out";
|
|
78
79
|
};
|
|
79
80
|
}
|
package/dist/harness/manifest.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Self-Harness
|
|
2
|
+
* Self-Harness editable surfaces — the harness face as DATA.
|
|
3
3
|
*
|
|
4
4
|
* A `HarnessManifest` is a versioned, hashable lineage node: the editable surfaces a fixed model may
|
|
5
5
|
* rewrite about its OWN harness — instruction slots, nudge rules, and a whitelisted `RuntimeOptions`
|
|
@@ -64,17 +64,18 @@ const MAX_TOOL_ID_CHARS = 128;
|
|
|
64
64
|
const MAX_TOOL_LIST_ENTRIES = 128;
|
|
65
65
|
/**
|
|
66
66
|
* Map an editable surface to its promotion tier. Maintained HERE beside the whitelist so a surface can
|
|
67
|
-
* never be whitelisted without also being assigned a tier (spec
|
|
67
|
+
* never be whitelisted without also being assigned a tier (the spec's same-place maintenance rule):
|
|
68
68
|
* - "auto" (Tier A): every `runtime.*` whitelist surface. Typed validation + the capability
|
|
69
|
-
* ceiling invariant + the
|
|
69
|
+
* ceiling invariant + the acceptance rule already guard them, so promotion is fully
|
|
70
70
|
* automatic — there is no free text and no injection surface.
|
|
71
71
|
* - "screened" (Tier B): `instructions.*` and `nudges`. Free text can smuggle instructions
|
|
72
72
|
* (persistent prompt-injection laundered through the evidence loop), so a screen runs
|
|
73
73
|
* before promotion.
|
|
74
|
-
* - "human" (Tier C): reserved for capability-WIDENING surfaces. None exist
|
|
75
|
-
* semantics make widening structurally inexpressible — but the enum value exists so a
|
|
76
|
-
* surface cannot be added without consciously assigning it a tier (and
|
|
77
|
-
* human gate). `surfaceTier` therefore never returns "human"
|
|
74
|
+
* - "human" (Tier C): reserved for capability-WIDENING surfaces. None currently exist — intersection
|
|
75
|
+
* semantics make widening structurally inexpressible — but the enum value exists so a new
|
|
76
|
+
* capability-widening surface cannot be added without consciously assigning it a tier (and
|
|
77
|
+
* building the human gate). `surfaceTier` therefore never returns "human" today — no
|
|
78
|
+
* capability-widening surface is expressible.
|
|
78
79
|
* An unknown surface / slot / runtime key THROWS (same discipline as applySurfaceEdit): a surface with
|
|
79
80
|
* no tier must never fall through to auto-promotion.
|
|
80
81
|
*/
|
package/dist/harness/nudge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Self-Harness
|
|
2
|
+
* Self-Harness nudge rules — declarative event→note rules (the runtime control-policy surface).
|
|
3
3
|
*
|
|
4
4
|
* A `NudgeRule` says "when this session event fires, push this note to the model". It generalizes the
|
|
5
5
|
* two hard-coded precedents (EntropyWatch.notify_model, the RepeatFuse STOP text) into data the
|
package/dist/harness/public.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { AttemptLoop, RuntimeAttemptBody, continueSession, freshWithFeedback, freshWithDigest, } from "./harness.js";
|
|
3
3
|
export { VerdictFnJudge, LlmEvalJudge, HybridJudge } from "./judge.js";
|
|
4
4
|
export { judge } from "../runtime/eval.js";
|
|
5
|
-
// Self-Harness
|
|
5
|
+
// Self-Harness editable surfaces: the harness face as data (manifest lineage + declarative event→note rules). The
|
|
6
6
|
// lab layer loads these through the compiled dist, so they live on this public barrel.
|
|
7
7
|
export { composeSystemPrompt, manifestDigest, applyManifest, applyPatch, validateManifest, surfaceTier, } from "./manifest.js";
|
|
8
8
|
export { NudgeEngine, validateNudgeRules } from "./nudge.js";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// Mirrors the kernel's EXPOSURE_EXEMPT_META_TOOLS invariant: kernel-owned meta surfaces are
|
|
2
|
+
// never narrowed away by a tool allow-list. `read_result` is runner-resolved before reaching any
|
|
3
|
+
// plane today, but the lists must not drift.
|
|
4
|
+
const DEFAULT_META_TOOLS = new Set(["skill", "memory", "knowledge", "update_plan", "read_result"]);
|
|
2
5
|
/** Wraps an execution plane, allowing only manifest-permitted tool IDs (+ meta-tools). */
|
|
3
6
|
export class FilteredExecutionPlane {
|
|
4
7
|
inner;
|
package/dist/runtime/runner.d.ts
CHANGED
|
@@ -144,12 +144,12 @@ export interface RuntimeOptions {
|
|
|
144
144
|
phase?: "initial" | "renewal";
|
|
145
145
|
}) => Promise<MemoryQuery[] | undefined> | MemoryQuery[] | undefined;
|
|
146
146
|
systemPrompt?: string;
|
|
147
|
-
/** Self-Harness
|
|
147
|
+
/** Self-Harness instruction surface: the four instruction slots (bootstrap/execution/verification/failureRecovery)
|
|
148
148
|
* composed onto `systemPrompt` in fixed order at option normalization. The kernel still sees ONE
|
|
149
149
|
* system prompt; this is the editable instruction surface the self-harness loop rewrites. Absent ⇒
|
|
150
150
|
* `systemPrompt` is used verbatim (zero behavior difference). */
|
|
151
151
|
instructions?: InstructionProfile;
|
|
152
|
-
/** Self-Harness
|
|
152
|
+
/** Self-Harness nudge surface: declarative event→note rules. On each matching session event a rendered note
|
|
153
153
|
* is pushed through the `injectNote` signal channel (same path as `onToolResult`'s `{note}`).
|
|
154
154
|
* ≤16 rules, validated at construction. Absent/empty ⇒ no engine, no append wrapping, zero
|
|
155
155
|
* behavior difference. */
|
|
@@ -307,7 +307,7 @@ export interface RuntimeOptions {
|
|
|
307
307
|
/** Passed to kernel start_run for role/isolation metadata. */
|
|
308
308
|
runSpec?: AgentRunSpec;
|
|
309
309
|
/** P0-A tool gating: a static per-run tool profile — only these tool ids (plus the
|
|
310
|
-
* skill/memory/knowledge/update_plan meta-tools) are exposed to the model each turn.
|
|
310
|
+
* skill/memory/knowledge/update_plan/read_result meta-tools) are exposed to the model each turn.
|
|
311
311
|
* Sugar that lowers to the same `capability_filter` sub-agents use; byte-stable across
|
|
312
312
|
* the run, so it never busts the prompt-cache prefix. Augments `runSpec`'s filter when
|
|
313
313
|
* both are set; synthesizes a minimal run spec when `runSpec` is absent. Omitted/empty
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepstrike/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "DeepStrike Node.js SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@anthropic-ai/sdk": "^0.99.0",
|
|
75
|
-
"@deepstrike/core": "0.2.
|
|
75
|
+
"@deepstrike/core": "0.2.49",
|
|
76
76
|
"@google/generative-ai": "^0.24.1",
|
|
77
77
|
"openai": "^5.23.2"
|
|
78
78
|
},
|