@jjanczur/tyran 0.1.49 → 0.1.50
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +51 -0
- package/README.md +1 -1
- package/hooks/scripts/policy-gate.mjs +34 -8
- package/hooks/scripts/usage-gate.mjs +5 -1
- package/package.json +1 -1
- package/scripts/doctor.mjs +7 -2
- package/scripts/scan-repo.mjs +5 -4
- package/scripts/schema.mjs +14 -4
- package/scripts/settings.mjs +26 -6
- package/skills/setup/SKILL.md +3 -2
- package/templates/config.yaml +15 -8
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{
|
|
12
12
|
"name": "tyran",
|
|
13
13
|
"description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.50",
|
|
15
15
|
"source": "./",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Jacek Janczura",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tyran",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
4
4
|
"description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jacek Janczura",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.50 — 2026-11-19
|
|
4
|
+
|
|
5
|
+
### `boundaries.kernel: allow` — no floor in a bypassPermissions session
|
|
6
|
+
|
|
7
|
+
An operator asked for a way to remove the last distinction: when they start a
|
|
8
|
+
session in bypass mode, agents should be able to edit any file, the gates
|
|
9
|
+
included. Until now no setting could do that. `preset: open` and every flag
|
|
10
|
+
stopped at the floor: `hooks/**`, `.tyran/policies/**`,
|
|
11
|
+
`.claude/settings*.json` and `.tyran/STOP`.
|
|
12
|
+
|
|
13
|
+
The new key `boundaries.kernel` (`refuse` | `allow`, default `refuse`) removes
|
|
14
|
+
the floor and every path class in the policy for paths inside the repository,
|
|
15
|
+
on the write tools and in the text of a shell command. It counts only when the
|
|
16
|
+
call's `permission_mode` is `bypassPermissions`. Both are required. The key
|
|
17
|
+
alone does nothing in `default`, `acceptEdits` or `plan`, so an overnight resume
|
|
18
|
+
(`acceptEdits`) never gets it. Bypass alone does nothing, so an install that
|
|
19
|
+
runs in bypass and never set the key keeps its floor. Subagents inherit the
|
|
20
|
+
session's mode. No preset sets the key, so a repo already on `preset: open`
|
|
21
|
+
gains nothing by updating.
|
|
22
|
+
|
|
23
|
+
`.tyran/STOP` is included, by the operator's choice: under the unlock an agent
|
|
24
|
+
can clear the brake.
|
|
25
|
+
|
|
26
|
+
What it does not change: secret scanning at commit and push; the credential,
|
|
27
|
+
outside-repo and push rules, which keep their own flags; the other hooks.
|
|
28
|
+
|
|
29
|
+
The cost: `.tyran/config.yaml` is class `AUTO`. Inside a bypass session an
|
|
30
|
+
agent can write `kernel: allow` itself and edit the gates on its next call. In
|
|
31
|
+
bypass the key is a default, not a lock. `docs/configuration.md` says so.
|
|
32
|
+
|
|
33
|
+
Also: doctor's `boundaries-relaxed` names what `kernel` opens, the Settings tab
|
|
34
|
+
has the knob, and `scan-repo` and `templates/config.yaml` write `kernel: refuse`.
|
|
35
|
+
|
|
36
|
+
### `usage-gate` reads `warn` before the pause marker
|
|
37
|
+
|
|
38
|
+
The second half of the 0.1.49 fix. The gate read `limits.mode: warn` only when
|
|
39
|
+
no marker existed, so a marker already on disk, from `pause` mode or from
|
|
40
|
+
0.1.48, still refused every unattended session in the repo. It now returns PASS
|
|
41
|
+
for any mode other than `pause` before it reads the marker. The marker is
|
|
42
|
+
ignored, not deleted; `overnight.mjs cancel --clear` still removes it.
|
|
43
|
+
|
|
44
|
+
Both gate changes are in `hooks/scripts/`, which is KERNEL in this repository,
|
|
45
|
+
and were applied by hand.
|
|
46
|
+
|
|
47
|
+
Five new tests. The kernel key needs both conditions; the test names its two
|
|
48
|
+
mutants (drop either check), which were not run because the gate is KERNEL
|
|
49
|
+
here. It opens the floor for every actor and tool, and nothing else. No preset
|
|
50
|
+
moves it; that mutant (`kernel: 'allow'` in the open preset) was run and goes
|
|
51
|
+
red. An active marker under `warn` passes while the same marker under `pause`
|
|
52
|
+
still denies; on the unpatched gate that test is red.
|
|
53
|
+
|
|
3
54
|
## 0.1.49 — 2026-11-14
|
|
4
55
|
|
|
5
56
|
### `limits.mode: warn` no longer writes a pause marker that blocks the whole repo
|
package/README.md
CHANGED
|
@@ -329,7 +329,7 @@ enforces the cap (3947 of 5000 characters). What each one assumes, when it
|
|
|
329
329
|
fires and who invokes it, is in
|
|
330
330
|
[skills and agents](https://jjanczur.github.io/tyran/skills/); the prompts
|
|
331
331
|
themselves are in [`skills/`](skills/) and [`agents/`](agents/). Behind all of
|
|
332
|
-
it:
|
|
332
|
+
it: 1721 unit tests, run with `node --test "tests/**/*.test.mjs"`.
|
|
333
333
|
|
|
334
334
|
## Documentation
|
|
335
335
|
|
|
@@ -1113,8 +1113,22 @@ export async function decide({ input, runner = runChild, startedAt = Date.now(),
|
|
|
1113
1113
|
const askable = actor === 'main' && field(input, 'permission_mode') === 'acceptEdits';
|
|
1114
1114
|
|
|
1115
1115
|
const boundaries = await loadBoundaries(root);
|
|
1116
|
+
// `boundaries.kernel: allow` is the operator taking the floor out, and it
|
|
1117
|
+
// counts only in a session a human started with --permission-mode
|
|
1118
|
+
// bypassPermissions. Both, because each alone says less than the operator
|
|
1119
|
+
// meant: the key alone would reach an overnight resume (acceptEdits) or a
|
|
1120
|
+
// subagent of a supervised session, and bypass alone would reach every
|
|
1121
|
+
// install that runs in bypass and never chose this. Subagents inherit the
|
|
1122
|
+
// session's mode (measured, see SUPERVISED_MODES), so the actors doing the
|
|
1123
|
+
// work are covered.
|
|
1124
|
+
//
|
|
1125
|
+
// STATED, NOT HIDDEN: config.yaml is class AUTO, so inside a bypass session
|
|
1126
|
+
// an agent can write `kernel: allow` itself and be unlocked on its next
|
|
1127
|
+
// call. The key constrains every OTHER mode; in bypass it is a default, not
|
|
1128
|
+
// a lock. docs/configuration.md says the same.
|
|
1129
|
+
const kernelOpen = boundaries.kernel === 'allow' && field(input, 'permission_mode') === 'bypassPermissions';
|
|
1116
1130
|
|
|
1117
|
-
if (toolName === 'Bash') return await decideBash({ input, toolInput, root, runner, budget, boundaries });
|
|
1131
|
+
if (toolName === 'Bash') return await decideBash({ input, toolInput, root, runner, budget, boundaries, kernelOpen });
|
|
1118
1132
|
|
|
1119
1133
|
const targets = pathTargets(toolInput);
|
|
1120
1134
|
const isWriteTool = typeof toolName === 'string' && WRITE_TOOLS.includes(toolName);
|
|
@@ -1234,6 +1248,12 @@ export async function decide({ input, runner = runChild, startedAt = Date.now(),
|
|
|
1234
1248
|
if (normalized !== null && decidingRule(policy, normalized) === null && !isGoverned(normalized)) {
|
|
1235
1249
|
continue;
|
|
1236
1250
|
}
|
|
1251
|
+
// The one setting below the floor. Inside the repository, every class and
|
|
1252
|
+
// every floor path stands down: hooks/**, .tyran/policies/**,
|
|
1253
|
+
// .claude/settings*.json and .tyran/STOP included, the last by the
|
|
1254
|
+
// operator's explicit choice. Outside the repository `outside_repo` still
|
|
1255
|
+
// decides, above.
|
|
1256
|
+
if (kernelOpen && normalized !== null) continue;
|
|
1237
1257
|
// The floor is consulted BEFORE the flag, so no ordering of settings can
|
|
1238
1258
|
// reach the files that enforce every other boundary.
|
|
1239
1259
|
const relaxClasses =
|
|
@@ -1446,8 +1466,10 @@ export const SHELL_PROTECTED_GLOBS = Object.freeze([
|
|
|
1446
1466
|
]);
|
|
1447
1467
|
|
|
1448
1468
|
/**
|
|
1449
|
-
* Paths no `boundaries:` setting can reach, checked before
|
|
1450
|
-
* consulted.
|
|
1469
|
+
* Paths no `boundaries:` setting but one can reach, checked before
|
|
1470
|
+
* `path_classes` is consulted. The one is `kernel: allow` in a
|
|
1471
|
+
* bypassPermissions session (see `kernelOpen` in `decide`), and no preset
|
|
1472
|
+
* sets it.
|
|
1451
1473
|
*
|
|
1452
1474
|
* `SHELL_PROTECTED_GLOBS` is already "the files that switch every gate off":
|
|
1453
1475
|
* the enforcement hooks, the policy that classifies them, and the settings
|
|
@@ -1924,7 +1946,7 @@ function refuseShellPaths(findings, command = '', allowCredentials = false) {
|
|
|
1924
1946
|
return { decision: 'deny', reason: lines.join('\n') };
|
|
1925
1947
|
}
|
|
1926
1948
|
|
|
1927
|
-
async function decideBash({ input, toolInput, root, runner, budget, boundaries }) {
|
|
1949
|
+
async function decideBash({ input, toolInput, root, runner, budget, boundaries, kernelOpen = false }) {
|
|
1928
1950
|
const command = field(toolInput, 'command');
|
|
1929
1951
|
if (typeof command !== 'string') {
|
|
1930
1952
|
return {
|
|
@@ -1945,10 +1967,13 @@ async function decideBash({ input, toolInput, root, runner, budget, boundaries }
|
|
|
1945
1967
|
// check that only runs once a policy loads is a check an unconfigured repo
|
|
1946
1968
|
// does not have.
|
|
1947
1969
|
// `credentials: allow` drops the CREDENTIAL findings and nothing else. A
|
|
1948
|
-
// kernel finding is a path that protects the gate, and
|
|
1949
|
-
//
|
|
1970
|
+
// kernel finding is a path that protects the gate, and only `kernelOpen`
|
|
1971
|
+
// (`kernel: allow` in a bypassPermissions session) drops those — which is
|
|
1972
|
+
// why this filters the list rather than skipping the call.
|
|
1950
1973
|
const findings = shellPathFindings(command, startDir, root).filter(
|
|
1951
|
-
(f) =>
|
|
1974
|
+
(f) =>
|
|
1975
|
+
!(f.kind === 'credential' && boundaries.credentials === 'allow') &&
|
|
1976
|
+
!(f.kind === 'kernel' && kernelOpen),
|
|
1952
1977
|
);
|
|
1953
1978
|
// The exemption SKIPS this refusal; it does not return PASS. A `git log` that
|
|
1954
1979
|
// names a protected path still travels the deployment class and every other
|
|
@@ -2173,7 +2198,8 @@ export async function handle({ input, runner, startedAt, env }) {
|
|
|
2173
2198
|
'tyran policy-gate: approved without asking. This repository sets `boundaries.prompts: skip` ' +
|
|
2174
2199
|
'in .tyran/config.yaml, so a tool call no gate objects to is auto-approved.\n' +
|
|
2175
2200
|
'What this does NOT reach: a refusal from any other gate still wins, so secret scanning at ' +
|
|
2176
|
-
'commit and push is unaffected, and so are the paths that protect the gates themselves
|
|
2201
|
+
'commit and push is unaffected, and so are the paths that protect the gates themselves ' +
|
|
2202
|
+
'unless `boundaries.kernel: allow` is set and this session runs in bypassPermissions.',
|
|
2177
2203
|
};
|
|
2178
2204
|
} catch (err) {
|
|
2179
2205
|
if (err instanceof PolicyFailure) {
|
|
@@ -436,6 +436,11 @@ export function decide(
|
|
|
436
436
|
|
|
437
437
|
const limits = readLimitsFn(repoRoot);
|
|
438
438
|
if (limits === null) return PASS;
|
|
439
|
+
// `warn` never denies, marker or not, so it is read BEFORE the marker. The
|
|
440
|
+
// marker is per repo and the account is per session: a marker that binds
|
|
441
|
+
// under `warn` refuses sessions on accounts with quota left. Until 0.1.50
|
|
442
|
+
// this check sat below, on the no-marker branch only.
|
|
443
|
+
if (limits.mode !== 'pause') return PASS;
|
|
439
444
|
|
|
440
445
|
const nowMs = now();
|
|
441
446
|
let marker = readMarkerFn(repoRoot, nowMs);
|
|
@@ -445,7 +450,6 @@ export function decide(
|
|
|
445
450
|
if (sidecar === null) return PASS; // no telemetry = unknown = open
|
|
446
451
|
const tripped = trippedWindow(sidecar, limits);
|
|
447
452
|
if (tripped === null) return PASS;
|
|
448
|
-
if (limits.mode === 'warn') return PASS; // surfacing is doctor's job
|
|
449
453
|
if (!isUnsupervised(input)) return PASS; // never bind the operator
|
|
450
454
|
const journal = locate(repoRoot);
|
|
451
455
|
marker = markerOf(tripped, limits, nowMs, field(input, 'session_id'), journal.init ? forJournal(journal.init) : null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jjanczur/tyran",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
4
4
|
"description": "Command-line scripts for the Tyran task conductor (doctor, journal, schema, and repo tooling) for CI and terminals outside Claude Code. Installing this package does NOT install the Claude Code plugin — add that separately with `/plugin marketplace add jjanczur/tyran` inside Claude Code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
package/scripts/doctor.mjs
CHANGED
|
@@ -2049,8 +2049,13 @@ export function runStateChecks({
|
|
|
2049
2049
|
'boundaries-relaxed',
|
|
2050
2050
|
show(configPath),
|
|
2051
2051
|
`boundaries: ${relaxed.join(', ')} ${relaxed.length === 1 ? 'is' : 'are'} turned down, so the policy gate ` +
|
|
2052
|
-
'no longer refuses what they cover.
|
|
2053
|
-
|
|
2052
|
+
'no longer refuses what they cover. ' +
|
|
2053
|
+
(relaxed.includes('kernel')
|
|
2054
|
+
? 'kernel: allow means a session started with --permission-mode bypassPermissions may edit the ' +
|
|
2055
|
+
'enforcement hooks, .tyran/policies, .claude/settings*.json and .tyran/STOP. Secret scanning at ' +
|
|
2056
|
+
'commit and push is unaffected'
|
|
2057
|
+
: 'Secret scanning at commit and push, the enforcement hooks, .claude/settings.json and ' +
|
|
2058
|
+
'.tyran/STOP are unaffected — only boundaries.kernel reaches those, and only in bypassPermissions'),
|
|
2054
2059
|
`node scripts/schema.mjs validate config ${sq(configPath)} # then edit boundaries: to tighten`,
|
|
2055
2060
|
),
|
|
2056
2061
|
);
|
package/scripts/scan-repo.mjs
CHANGED
|
@@ -565,10 +565,11 @@ export function renderConfig(config) {
|
|
|
565
565
|
'# where the most agents run.\n' +
|
|
566
566
|
'#\n' +
|
|
567
567
|
'# GIVING AGENTS MORE ROOM: `boundaries:` below is the one place the policy\n' +
|
|
568
|
-
'# gate can be turned down. `preset: open` relaxes all
|
|
569
|
-
'# closest thing to running with permissions skipped. Secret
|
|
570
|
-
'# commit and push
|
|
571
|
-
'# `.tyran/STOP` are
|
|
568
|
+
'# gate can be turned down. `preset: open` relaxes all but `kernel` at\n' +
|
|
569
|
+
'# once — the closest thing to running with permissions skipped. Secret\n' +
|
|
570
|
+
'# scanning at commit and push is never reachable. The enforcement hooks,\n' +
|
|
571
|
+
'# `.claude/settings.json` and `.tyran/STOP` are reachable only with\n' +
|
|
572
|
+
'# `kernel: allow` AND a session started in bypassPermissions mode.\n' +
|
|
572
573
|
'# See docs/configuration.md.\n' +
|
|
573
574
|
'#\n' +
|
|
574
575
|
'# Validate: node scripts/schema.mjs validate config .tyran/config.yaml\n' +
|
package/scripts/schema.mjs
CHANGED
|
@@ -51,14 +51,24 @@ export const KNOWLEDGE_KINDS = Object.freeze(['fact', 'convention', 'gotcha', 'c
|
|
|
51
51
|
export const BOUNDARY_PRESETS = Object.freeze(['strict', 'open']);
|
|
52
52
|
export const BOUNDARY_VALUES = Object.freeze(['refuse', 'allow']);
|
|
53
53
|
export const BOUNDARY_PROMPTS = Object.freeze(['ask', 'skip']);
|
|
54
|
-
/**
|
|
55
|
-
|
|
54
|
+
/**
|
|
55
|
+
* The refusal flags, in the order they are documented.
|
|
56
|
+
*
|
|
57
|
+
* `kernel` is last and is the one no preset moves: it reaches the files that
|
|
58
|
+
* enforce every other flag in this list (`hooks/**`, `.tyran/policies/**`,
|
|
59
|
+
* `.claude/settings*.json`, `.tyran/STOP`), and the gate honours it only in a
|
|
60
|
+
* session a human started with `--permission-mode bypassPermissions`. An
|
|
61
|
+
* install that already says `preset: open` must not gain kernel writes by
|
|
62
|
+
* updating, so it is spelled out or it is `refuse`.
|
|
63
|
+
*/
|
|
64
|
+
export const BOUNDARY_FLAGS = Object.freeze(['outside_repo', 'credentials', 'path_classes', 'push', 'kernel']);
|
|
56
65
|
/** Every key legal inside the block. */
|
|
57
66
|
export const BOUNDARY_KEYS = Object.freeze(['preset', ...BOUNDARY_FLAGS, 'prompts']);
|
|
58
67
|
/** What each preset resolves to before per-key overrides are applied. */
|
|
59
68
|
const BOUNDARY_BY_PRESET = Object.freeze({
|
|
60
|
-
strict: Object.freeze({ outside_repo: 'refuse', credentials: 'refuse', path_classes: 'refuse', push: 'refuse', prompts: 'ask' }),
|
|
61
|
-
|
|
69
|
+
strict: Object.freeze({ outside_repo: 'refuse', credentials: 'refuse', path_classes: 'refuse', push: 'refuse', kernel: 'refuse', prompts: 'ask' }),
|
|
70
|
+
// `kernel: 'refuse'` under open too, on purpose: see BOUNDARY_FLAGS.
|
|
71
|
+
open: Object.freeze({ outside_repo: 'allow', credentials: 'allow', path_classes: 'allow', push: 'allow', kernel: 'refuse', prompts: 'skip' }),
|
|
62
72
|
});
|
|
63
73
|
/** The safe answer, used for an absent block and for every value the schema rejects. */
|
|
64
74
|
export const BOUNDARIES_STRICT = BOUNDARY_BY_PRESET.strict;
|
package/scripts/settings.mjs
CHANGED
|
@@ -127,17 +127,17 @@ export const GROUPS = Object.freeze([
|
|
|
127
127
|
id: 'boundaries',
|
|
128
128
|
title: 'What agents may touch',
|
|
129
129
|
blurb:
|
|
130
|
-
'How far the policy gate turns its refusals down. Everything here starts at the strict setting, and every move toward the looser one asks you to confirm it a second time.
|
|
130
|
+
'How far the policy gate turns its refusals down. Everything here starts at the strict setting, and every move toward the looser one asks you to confirm it a second time. Secret scanning at commit and push is NOT on this screen because no setting reaches it. The enforcement hooks, the file that registers them and the STOP brake are reached only by "The gates themselves", and only in a session started in bypassPermissions mode.',
|
|
131
131
|
settings: [
|
|
132
132
|
{
|
|
133
133
|
id: 'boundaries.preset',
|
|
134
134
|
path: ['boundaries', 'preset'],
|
|
135
135
|
label: 'Preset',
|
|
136
|
-
help: 'The one switch. "Open" turns every boundary below to its loose setting at once — the closest thing Tyran has to running Claude Code with permissions skipped. Anything you set individually below wins over the preset.',
|
|
136
|
+
help: 'The one switch. "Open" turns every boundary below except "The gates themselves" to its loose setting at once — the closest thing Tyran has to running Claude Code with permissions skipped. Anything you set individually below wins over the preset.',
|
|
137
137
|
explain: {
|
|
138
138
|
what: 'The master position for every boundary in this group at once.',
|
|
139
139
|
changes: 'Flips outside-repo access, credential reads, your path rules, push checks and permission prompts together; any boundary you set individually below overrides it.',
|
|
140
|
-
effect: 'On "open", agents move without friction and without asking —
|
|
140
|
+
effect: 'On "open", agents move without friction and without asking — secret scanning, the hooks, their registry and the STOP brake still hold; only "The gates themselves" below reaches the last three.',
|
|
141
141
|
},
|
|
142
142
|
widening: {
|
|
143
143
|
scale: 'preset',
|
|
@@ -146,7 +146,7 @@ export const GROUPS = Object.freeze([
|
|
|
146
146
|
},
|
|
147
147
|
...choice(BOUNDARY_PRESETS, {
|
|
148
148
|
strict: 'Every boundary on. This is what Tyran has always done.',
|
|
149
|
-
open: 'Every boundary below turned down at once.',
|
|
149
|
+
open: 'Every boundary below except the gates themselves turned down at once.',
|
|
150
150
|
}),
|
|
151
151
|
},
|
|
152
152
|
{
|
|
@@ -192,10 +192,10 @@ export const GROUPS = Object.freeze([
|
|
|
192
192
|
id: 'boundaries.path_classes',
|
|
193
193
|
path: ['boundaries', 'path_classes'],
|
|
194
194
|
label: 'Your own path rules',
|
|
195
|
-
help: 'The AUTO / GATED / KERNEL rules in the policy below. Allowing this makes them advisory: a subagent may write a path you gated. The
|
|
195
|
+
help: 'The AUTO / GATED / KERNEL rules in the policy below. Allowing this makes them advisory: a subagent may write a path you gated. The paths that protect the gate itself stay refused whatever this says; only "The gates themselves" reaches them.',
|
|
196
196
|
explain: {
|
|
197
197
|
what: 'Whether the AUTO / GATED / KERNEL classes in the autonomy policy further down this page are enforced on writes.',
|
|
198
|
-
changes: 'On "allow" they become advisory: a subagent may write a path you gated, and only the
|
|
198
|
+
changes: 'On "allow" they become advisory: a subagent may write a path you gated, and only the self-protecting paths still refuse.',
|
|
199
199
|
effect: 'Turning this off removes the distinction the policy exists to draw — everything an agent can reach becomes effectively AUTO.',
|
|
200
200
|
},
|
|
201
201
|
widening: {
|
|
@@ -227,6 +227,26 @@ export const GROUPS = Object.freeze([
|
|
|
227
227
|
allow: 'Any push is allowed, including the irreversible ones.',
|
|
228
228
|
}),
|
|
229
229
|
},
|
|
230
|
+
{
|
|
231
|
+
id: 'boundaries.kernel',
|
|
232
|
+
path: ['boundaries', 'kernel'],
|
|
233
|
+
label: 'The gates themselves',
|
|
234
|
+
help: 'The enforcement hooks, the autonomy policy, .claude/settings*.json and .tyran/STOP. "Allow" counts only in a session you started with --permission-mode bypassPermissions; in every other mode these stay refused. The "Open" preset never sets this.',
|
|
235
|
+
explain: {
|
|
236
|
+
what: 'Whether an agent may edit the files that enforce every other boundary on this page, in a bypassPermissions session.',
|
|
237
|
+
changes: 'On "allow", a bypassPermissions session may write hooks/**, .tyran/policies/**, .claude/settings*.json and .tyran/STOP, from any tool. Other modes are unchanged.',
|
|
238
|
+
effect: 'In that session nothing on this page is a boundary any more: an agent can edit or remove the gates, and clear your STOP brake.',
|
|
239
|
+
},
|
|
240
|
+
widening: {
|
|
241
|
+
scale: 'boundary',
|
|
242
|
+
consequence:
|
|
243
|
+
'In a bypassPermissions session agents may edit the enforcement hooks, the policy, the hook registry and the STOP brake.',
|
|
244
|
+
},
|
|
245
|
+
...choice(BOUNDARY_VALUES, {
|
|
246
|
+
refuse: 'The gates and your brake are edited by hand, outside a session.',
|
|
247
|
+
allow: 'A bypassPermissions session may edit the gates and the brake.',
|
|
248
|
+
}),
|
|
249
|
+
},
|
|
230
250
|
{
|
|
231
251
|
id: 'boundaries.prompts',
|
|
232
252
|
path: ['boundaries', 'prompts'],
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -259,8 +259,9 @@ value asks for a confirmation.
|
|
|
259
259
|
|
|
260
260
|
Say the floor in the same breath, because it is what makes the offer safe to
|
|
261
261
|
make: secret scanning at commit and push, the enforcement hooks,
|
|
262
|
-
`.claude/settings.json` and `.tyran/STOP` are unreachable from
|
|
263
|
-
|
|
262
|
+
`.claude/settings.json` and `.tyran/STOP` are unreachable from the preset.
|
|
263
|
+
Only a separate `kernel: allow` key, honoured only in a bypassPermissions
|
|
264
|
+
session, reaches the last three. Do not mention that key unless asked.
|
|
264
265
|
|
|
265
266
|
**Do not recommend a value, and do not ask which they want.** Strict is
|
|
266
267
|
already written and already correct; this is a pointer for the operator who
|
package/templates/config.yaml
CHANGED
|
@@ -47,28 +47,35 @@ shared_zones: []
|
|
|
47
47
|
# strict one, which is what Tyran did before this block existed — nothing is
|
|
48
48
|
# relaxed by having it in the file, only made editable from the Settings tab.
|
|
49
49
|
#
|
|
50
|
-
# preset: strict | open one switch. `open` sets
|
|
51
|
-
# is the closest thing to
|
|
52
|
-
#
|
|
50
|
+
# preset: strict | open one switch. `open` sets the first four below and
|
|
51
|
+
# `prompts` at once, and is the closest thing to
|
|
52
|
+
# running with permissions skipped. It never sets
|
|
53
|
+
# `kernel`. Anything you set explicitly wins over it.
|
|
53
54
|
# outside_repo refuse | allow — files outside this repository
|
|
54
55
|
# credentials refuse | allow — .env, keys, ~/.ssh, ~/.aws
|
|
55
56
|
# path_classes refuse | allow — the GATED/KERNEL rules you wrote
|
|
56
57
|
# push refuse | allow — the deployment class on git push
|
|
58
|
+
# kernel refuse | allow — the enforcement hooks, the policy,
|
|
59
|
+
# .claude/settings*.json and .tyran/STOP. `allow`
|
|
60
|
+
# counts ONLY in a session started with
|
|
61
|
+
# --permission-mode bypassPermissions.
|
|
57
62
|
# prompts ask | skip — skip Claude Code's own prompts
|
|
58
63
|
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
# `.tyran/STOP`.
|
|
64
|
+
# Unless `kernel: allow` AND a bypassPermissions session, nothing here reaches
|
|
65
|
+
# the enforcement hooks, `.tyran/policies/`, `.claude/settings.json` or
|
|
66
|
+
# `.tyran/STOP`. No setting reaches secret scanning at commit and push. A
|
|
67
|
+
# refusal from any gate still wins over an auto-approval.
|
|
62
68
|
#
|
|
63
69
|
# This file is class AUTO, so an agent can widen these itself — the same trade
|
|
64
|
-
# `autonomy:` above already makes
|
|
65
|
-
#
|
|
70
|
+
# `autonomy:` above already makes. That includes `kernel`: in a bypass session
|
|
71
|
+
# an agent can set it and then edit the gates. See docs/configuration.md.
|
|
66
72
|
boundaries:
|
|
67
73
|
preset: strict
|
|
68
74
|
outside_repo: refuse
|
|
69
75
|
credentials: refuse
|
|
70
76
|
path_classes: refuse
|
|
71
77
|
push: refuse
|
|
78
|
+
kernel: refuse
|
|
72
79
|
prompts: ask
|
|
73
80
|
|
|
74
81
|
# Overnight mode — pause autonomous work near the subscription usage limits
|