@theokit/sdk 4.44.0 → 4.45.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 +45 -0
- package/dist/index.cjs +34 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -1
- package/dist/index.d.ts +59 -1
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.45.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f9a29f5: `applySecurityFloor` — a lower-trust configuration layer may tighten a security setting, never loosen it.
|
|
8
|
+
|
|
9
|
+
Layered configuration usually resolves last-wins, and for the keys that decide confinement that is a
|
|
10
|
+
hole: a project layer outranks the user's own file, so a cloned repository can hand itself the most
|
|
11
|
+
permissive sandbox and the operator's global choice loses silently, at the moment the directory is
|
|
12
|
+
opened. Nothing fails; the confinement is simply gone.
|
|
13
|
+
|
|
14
|
+
The rule is generic and the vocabulary is not, so the vocabulary is parameters: which values count
|
|
15
|
+
as more permissive, which layers are restricted, and which layer is the operator's explicit
|
|
16
|
+
override. A second product supplies its own without inheriting the first's words.
|
|
17
|
+
|
|
18
|
+
The override is returned verbatim even when outside the vocabulary — validating the operator's flag
|
|
19
|
+
is the consumer's job, and silently dropping an unrecognised one is worse than passing it through. A
|
|
20
|
+
value outside the vocabulary in a RESTRICTED layer is ignored instead: a typo in a repository's
|
|
21
|
+
config must neither become the effective setting nor read as maximally permissive.
|
|
22
|
+
|
|
23
|
+
Additive. Nothing calls it yet.
|
|
24
|
+
|
|
25
|
+
## 4.44.1
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 0cabe27: `pnpm release` now verifies its tags reached the remote instead of trusting an exit code.
|
|
30
|
+
|
|
31
|
+
`changeset publish` creates one annotated tag per published package and pushes them, then reports
|
|
32
|
+
success on its own exit code — and an exit code is not evidence a ref transferred.
|
|
33
|
+
|
|
34
|
+
Measured 2026-08-11: `git push` contacts the remote BEFORE `pre-push` runs, `pre-push` runs the full
|
|
35
|
+
`pnpm validate` for around eleven minutes, and by the time the transfer begins the server has
|
|
36
|
+
dropped the idle connection. Git dies of SIGPIPE (exit 141) silently — no error text, nothing
|
|
37
|
+
transferred, output ending in `✓ pre-push gates passed`. A missing release tag is not noticed that
|
|
38
|
+
day; it is noticed weeks later by whoever is bisecting.
|
|
39
|
+
|
|
40
|
+
`scripts/verify-release-refs.mjs` compares the tags at a revision against `git ls-remote`, and is
|
|
41
|
+
wired into `pnpm release` after `changeset publish` rather than offered as a wrapper — a wrapper
|
|
42
|
+
only helps whoever remembers to call it.
|
|
43
|
+
|
|
44
|
+
Three distinct exit codes, because collapsing them is the failure being removed: `0` verified,
|
|
45
|
+
`1` a tag never reached the remote, `2` could not check (unreachable remote, or a revision that does
|
|
46
|
+
not resolve).
|
|
47
|
+
|
|
3
48
|
## 4.44.0
|
|
4
49
|
|
|
5
50
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1621,6 +1621,39 @@ var Security = class {
|
|
|
1621
1621
|
}
|
|
1622
1622
|
};
|
|
1623
1623
|
|
|
1624
|
+
// src/security-floor.ts
|
|
1625
|
+
function permissivenessOf(order, value) {
|
|
1626
|
+
if (value === void 0) return -1;
|
|
1627
|
+
return order.indexOf(value);
|
|
1628
|
+
}
|
|
1629
|
+
function baseline(input) {
|
|
1630
|
+
const { restricted, override, layers } = input;
|
|
1631
|
+
let value;
|
|
1632
|
+
for (const [name, candidate] of Object.entries(layers)) {
|
|
1633
|
+
if (name === override || restricted.includes(name)) continue;
|
|
1634
|
+
if (candidate !== void 0) value = candidate;
|
|
1635
|
+
}
|
|
1636
|
+
return value;
|
|
1637
|
+
}
|
|
1638
|
+
function tightenOnly(input, start) {
|
|
1639
|
+
const { permissiveness, restricted, layers } = input;
|
|
1640
|
+
let resolved = start;
|
|
1641
|
+
let ceiling = permissivenessOf(permissiveness, start);
|
|
1642
|
+
for (const layer of restricted) {
|
|
1643
|
+
const candidate = layers[layer];
|
|
1644
|
+
if (candidate === void 0) continue;
|
|
1645
|
+
const level = permissivenessOf(permissiveness, candidate);
|
|
1646
|
+
if (level < 0) continue;
|
|
1647
|
+
if (ceiling >= 0 && level > ceiling) continue;
|
|
1648
|
+
resolved = candidate;
|
|
1649
|
+
ceiling = level;
|
|
1650
|
+
}
|
|
1651
|
+
return resolved;
|
|
1652
|
+
}
|
|
1653
|
+
function applySecurityFloor(input) {
|
|
1654
|
+
return input.layers[input.override] ?? tightenOnly(input, baseline(input));
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1624
1657
|
// src/session-scope.ts
|
|
1625
1658
|
function scopedConversationId(scope, id) {
|
|
1626
1659
|
return `${scope}__${id}`;
|
|
@@ -2267,6 +2300,7 @@ exports.Theokit = Theokit;
|
|
|
2267
2300
|
exports.TokenLimiter = TokenLimiter;
|
|
2268
2301
|
exports.UnicodeNormalizer = UnicodeNormalizer;
|
|
2269
2302
|
exports.applyMode = applyMode;
|
|
2303
|
+
exports.applySecurityFloor = applySecurityFloor;
|
|
2270
2304
|
exports.chargeAndCheckThresholds = chargeAndCheckThresholds;
|
|
2271
2305
|
exports.createCounterBudgetTracker = createCounterBudgetTracker;
|
|
2272
2306
|
exports.estimateTokens = estimateTokens;
|