@theokit/sdk 4.46.0 → 4.47.0
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/CHANGELOG.md +25 -0
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -1
- package/dist/index.d.ts +65 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.47.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d511e6a: `resolveTrustPosture` — decide what a project directory is allowed to switch on.
|
|
8
|
+
|
|
9
|
+
A product that reads a repository must answer this before it builds anything: are that repository's
|
|
10
|
+
hooks honoured, are its MCP servers started, do its instructions enter the persona? The stakes are
|
|
11
|
+
not configuration-shaped — a hook is arbitrary command execution on every tool call, and an MCP
|
|
12
|
+
server is an external process SPAWNED while the agent is built, before any per-tool approval exists
|
|
13
|
+
to refuse it.
|
|
14
|
+
|
|
15
|
+
The arithmetic is small; the invariant is the point. Untrusted means EVERY declared capability is
|
|
16
|
+
off, and `allows` is built FROM the declared list, so a product that adds a ninth capability cannot
|
|
17
|
+
forget to gate it. That failure is invisible when it happens: the new capability simply works in a
|
|
18
|
+
directory where it should not.
|
|
19
|
+
|
|
20
|
+
It deliberately does NOT decide what "trusted" means. Where the record lives, what the environment
|
|
21
|
+
variable is called, whether a legacy alias is honoured — all the consumer's, because all of it is
|
|
22
|
+
that product's vocabulary. `source` is reported (`env` / `store` / `default`) because "trusted
|
|
23
|
+
because the operator recorded this directory" and "trusted because a blanket switch is on" are
|
|
24
|
+
different facts, and only the second stays on across every directory the process opens.
|
|
25
|
+
|
|
26
|
+
Additive. Nothing calls it yet.
|
|
27
|
+
|
|
3
28
|
## 4.46.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2188,6 +2188,15 @@ function safeStringify(v) {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
}
|
|
2190
2190
|
|
|
2191
|
+
// src/trust-posture.ts
|
|
2192
|
+
function resolveTrustPosture(input) {
|
|
2193
|
+
const source = input.envOverride === true ? "env" : input.isTrusted() ? "store" : "default";
|
|
2194
|
+
const level = source === "default" ? "untrusted" : "trusted";
|
|
2195
|
+
const granted = level === "trusted";
|
|
2196
|
+
const allows = Object.fromEntries(input.capabilities.map((key) => [key, granted]));
|
|
2197
|
+
return { level, source, allows };
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2191
2200
|
Object.defineProperty(exports, "GOAL_CONTINUATION_MARKER", {
|
|
2192
2201
|
enumerable: true,
|
|
2193
2202
|
get: function () { return chunkOBA6YK2R_cjs.GOAL_CONTINUATION_MARKER; }
|
|
@@ -2350,6 +2359,7 @@ exports.mkMemoryId = mkMemoryId;
|
|
|
2350
2359
|
exports.normalizeSchema = normalizeSchema;
|
|
2351
2360
|
exports.normalizeUsage = normalizeUsage;
|
|
2352
2361
|
exports.preflightCheck = preflightCheck;
|
|
2362
|
+
exports.resolveTrustPosture = resolveTrustPosture;
|
|
2353
2363
|
exports.runGoalLoop = runGoalLoop;
|
|
2354
2364
|
exports.scopedConversationId = scopedConversationId;
|
|
2355
2365
|
exports.sessionScopePrefix = sessionScopePrefix;
|