twsrt 3.2.0__tar.gz → 3.3.1__tar.gz
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.
- {twsrt-3.2.0 → twsrt-3.3.1}/PKG-INFO +10 -8
- {twsrt-3.2.0 → twsrt-3.3.1}/README.md +9 -7
- {twsrt-3.2.0 → twsrt-3.3.1}/pyproject.toml +2 -2
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/bin/cli.py +25 -20
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/config.py +24 -2
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/sources.py +5 -1
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt.egg-info/PKG-INFO +10 -8
- {twsrt-3.2.0 → twsrt-3.3.1}/setup.cfg +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/__init__.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/bin/__init__.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/__init__.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/agent.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/claude.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/codex.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/composition.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/copilot.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/doctor.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/jsonc.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/models.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/probe.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/profiles.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt/lib/symlink.py +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt.egg-info/SOURCES.txt +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt.egg-info/dependency_links.txt +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt.egg-info/entry_points.txt +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt.egg-info/requires.txt +0 -0
- {twsrt-3.2.0 → twsrt-3.3.1}/src/twsrt.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: twsrt
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: Agent security configuration generator — translates canonical security rules into agent-specific configs
|
|
5
5
|
Author-email: sysid <sysid@gmx.de>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -213,7 +213,7 @@ from a plain terminal
|
|
|
213
213
|
|
|
214
214
|
| Term | Meaning |
|
|
215
215
|
|---|---|
|
|
216
|
-
| Source kind | A canonical document type: `srt` (filesystem and network policy) and `bash` (command allow/ask/deny lists) |
|
|
216
|
+
| Source kind | A canonical document type: `srt` (filesystem and network policy, required) and `bash` (command allow/ask/deny lists, optional) |
|
|
217
217
|
| Fragment | One named `.jsonc` file holding a slice of policy for one source kind. Fragments never include each other |
|
|
218
218
|
| Profile | An ordered selection of fragments per source kind; may `extend` other profiles. `default_profile` applies when `-p` is omitted |
|
|
219
219
|
| Target | An agent config file translated from the canonical output |
|
|
@@ -233,7 +233,7 @@ path = "srt/base.jsonc"
|
|
|
233
233
|
[sources.srt.fragments.work]
|
|
234
234
|
path = "srt/work.jsonc"
|
|
235
235
|
|
|
236
|
-
[sources.bash] # output omitted: bash-rules.json next to config.toml
|
|
236
|
+
[sources.bash] # optional; output omitted: bash-rules.json next to config.toml
|
|
237
237
|
[sources.bash.fragments.base]
|
|
238
238
|
path = "bash/base.jsonc"
|
|
239
239
|
|
|
@@ -269,10 +269,12 @@ allowUnsandboxedCommands = false
|
|
|
269
269
|
enabled = false
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
Only `schema_version`, `default_profile`,
|
|
273
|
-
|
|
274
|
-
`
|
|
275
|
-
|
|
272
|
+
Only `schema_version`, `default_profile`, `[sources.srt]` and one profile are
|
|
273
|
+
required. Without `[sources.bash]` no command rules exist: nothing is compiled
|
|
274
|
+
to `bash-rules.json` and no agent gets Bash allow/ask/deny entries; a profile
|
|
275
|
+
must then not name `bash`. `config --init` writes exactly the required keys,
|
|
276
|
+
plus `[sandbox_overrides.yolo]`, and leaves every other key, `[sources.bash]`
|
|
277
|
+
included, commented out with its default value.
|
|
276
278
|
|
|
277
279
|
`output` is optional per source kind and defaults to `srt-settings.json` /
|
|
278
280
|
`bash-rules.json` next to `config.toml`. srt itself reads only
|
|
@@ -342,7 +344,7 @@ repository and loaded per launch instead of the global files:
|
|
|
342
344
|
```
|
|
343
345
|
twsrt generate claude -w -p slim --project
|
|
344
346
|
→ ./.twsrt/srt-settings.json canonical srt (instead of ~/.srt-settings.json)
|
|
345
|
-
→ ./.twsrt/bash-rules.json canonical bash
|
|
347
|
+
→ ./.twsrt/bash-rules.json canonical bash (only with [sources.bash])
|
|
346
348
|
→ ./.twsrt/claude-settings[.yolo].json Claude target (instead of ~/.claude/settings.full.json)
|
|
347
349
|
→ ./.twsrt/.gitignore "*"
|
|
348
350
|
stdout: the absolute .twsrt directory
|
|
@@ -199,7 +199,7 @@ from a plain terminal
|
|
|
199
199
|
|
|
200
200
|
| Term | Meaning |
|
|
201
201
|
|---|---|
|
|
202
|
-
| Source kind | A canonical document type: `srt` (filesystem and network policy) and `bash` (command allow/ask/deny lists) |
|
|
202
|
+
| Source kind | A canonical document type: `srt` (filesystem and network policy, required) and `bash` (command allow/ask/deny lists, optional) |
|
|
203
203
|
| Fragment | One named `.jsonc` file holding a slice of policy for one source kind. Fragments never include each other |
|
|
204
204
|
| Profile | An ordered selection of fragments per source kind; may `extend` other profiles. `default_profile` applies when `-p` is omitted |
|
|
205
205
|
| Target | An agent config file translated from the canonical output |
|
|
@@ -219,7 +219,7 @@ path = "srt/base.jsonc"
|
|
|
219
219
|
[sources.srt.fragments.work]
|
|
220
220
|
path = "srt/work.jsonc"
|
|
221
221
|
|
|
222
|
-
[sources.bash] # output omitted: bash-rules.json next to config.toml
|
|
222
|
+
[sources.bash] # optional; output omitted: bash-rules.json next to config.toml
|
|
223
223
|
[sources.bash.fragments.base]
|
|
224
224
|
path = "bash/base.jsonc"
|
|
225
225
|
|
|
@@ -255,10 +255,12 @@ allowUnsandboxedCommands = false
|
|
|
255
255
|
enabled = false
|
|
256
256
|
```
|
|
257
257
|
|
|
258
|
-
Only `schema_version`, `default_profile`,
|
|
259
|
-
|
|
260
|
-
`
|
|
261
|
-
|
|
258
|
+
Only `schema_version`, `default_profile`, `[sources.srt]` and one profile are
|
|
259
|
+
required. Without `[sources.bash]` no command rules exist: nothing is compiled
|
|
260
|
+
to `bash-rules.json` and no agent gets Bash allow/ask/deny entries; a profile
|
|
261
|
+
must then not name `bash`. `config --init` writes exactly the required keys,
|
|
262
|
+
plus `[sandbox_overrides.yolo]`, and leaves every other key, `[sources.bash]`
|
|
263
|
+
included, commented out with its default value.
|
|
262
264
|
|
|
263
265
|
`output` is optional per source kind and defaults to `srt-settings.json` /
|
|
264
266
|
`bash-rules.json` next to `config.toml`. srt itself reads only
|
|
@@ -328,7 +330,7 @@ repository and loaded per launch instead of the global files:
|
|
|
328
330
|
```
|
|
329
331
|
twsrt generate claude -w -p slim --project
|
|
330
332
|
→ ./.twsrt/srt-settings.json canonical srt (instead of ~/.srt-settings.json)
|
|
331
|
-
→ ./.twsrt/bash-rules.json canonical bash
|
|
333
|
+
→ ./.twsrt/bash-rules.json canonical bash (only with [sources.bash])
|
|
332
334
|
→ ./.twsrt/claude-settings[.yolo].json Claude target (instead of ~/.claude/settings.full.json)
|
|
333
335
|
→ ./.twsrt/.gitignore "*"
|
|
334
336
|
stdout: the absolute .twsrt directory
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "twsrt"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.3.1"
|
|
4
4
|
description = "Agent security configuration generator — translates canonical security rules into agent-specific configs"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "BSD-3-Clause"
|
|
@@ -45,7 +45,7 @@ dev = [
|
|
|
45
45
|
]
|
|
46
46
|
|
|
47
47
|
[tool.bumpversion]
|
|
48
|
-
current_version = "3.
|
|
48
|
+
current_version = "3.3.1"
|
|
49
49
|
commit = true
|
|
50
50
|
tag = false
|
|
51
51
|
tag_name = "v{new_version}"
|
|
@@ -21,7 +21,7 @@ from twsrt.lib.models import (
|
|
|
21
21
|
yolo_path,
|
|
22
22
|
)
|
|
23
23
|
|
|
24
|
-
__version__ = "3.
|
|
24
|
+
__version__ = "3.3.1"
|
|
25
25
|
|
|
26
26
|
app = typer.Typer(
|
|
27
27
|
name="twsrt",
|
|
@@ -158,9 +158,9 @@ default_profile = "default"
|
|
|
158
158
|
# -----------------------------------------------------------------------------
|
|
159
159
|
# Canonical source kinds
|
|
160
160
|
# -----------------------------------------------------------------------------
|
|
161
|
-
#
|
|
162
|
-
#
|
|
163
|
-
#
|
|
161
|
+
# srt is required; bash is optional. Each kind has one generated strict-JSON
|
|
162
|
+
# output and one or more named JSONC fragments. Output paths must be distinct
|
|
163
|
+
# and must not be the same path as any input fragment.
|
|
164
164
|
# `output` is optional and defaults to a file next to this config.toml.
|
|
165
165
|
|
|
166
166
|
[sources.srt]
|
|
@@ -178,13 +178,17 @@ path = "srt/base.jsonc"
|
|
|
178
178
|
# [sources.srt.fragments.work]
|
|
179
179
|
# path = "srt/work.jsonc"
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
#
|
|
183
|
-
#
|
|
184
|
-
#
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
181
|
+
# Optional agent command policy (allow/ask/deny Bash rules). Without it, no
|
|
182
|
+
# command rules are generated. To enable, uncomment this table, its base
|
|
183
|
+
# fragment and `bash = ["base"]` in [profiles.default]; the values shown are
|
|
184
|
+
# the defaults.
|
|
185
|
+
# [sources.bash]
|
|
186
|
+
# # Compiled command-policy JSON consumed by the agent generators.
|
|
187
|
+
# # Default: bash-rules.json next to this file.
|
|
188
|
+
# # output = "bash-rules.json"
|
|
189
|
+
#
|
|
190
|
+
# [sources.bash.fragments.base]
|
|
191
|
+
# path = "bash/base.jsonc"
|
|
188
192
|
|
|
189
193
|
# Additional Bash fragment example:
|
|
190
194
|
# [sources.bash.fragments.work]
|
|
@@ -194,13 +198,14 @@ path = "bash/base.jsonc"
|
|
|
194
198
|
# -----------------------------------------------------------------------------
|
|
195
199
|
# Profiles
|
|
196
200
|
# -----------------------------------------------------------------------------
|
|
197
|
-
# A resolved profile must select at least one fragment for every
|
|
201
|
+
# A resolved profile must select at least one fragment for every configured
|
|
202
|
+
# source kind, and may name only configured kinds.
|
|
198
203
|
# Parents resolve before children; repeated fragment names are deduplicated.
|
|
199
204
|
# Inheritance adds compatible fragments—it does not override conflicting values.
|
|
200
205
|
|
|
201
206
|
[profiles.default]
|
|
202
207
|
srt = ["base"]
|
|
203
|
-
bash = ["base"]
|
|
208
|
+
# bash = ["base"]
|
|
204
209
|
|
|
205
210
|
# Profile inheritance and additional selection example:
|
|
206
211
|
# [profiles.work]
|
|
@@ -408,7 +413,7 @@ def edit(
|
|
|
408
413
|
Fragments are never compiled before opening, so one with a syntax error
|
|
409
414
|
still opens -- that is exactly when you need an editor.
|
|
410
415
|
"""
|
|
411
|
-
from twsrt.lib.config import load_config
|
|
416
|
+
from twsrt.lib.config import load_config, source_kind_error
|
|
412
417
|
from twsrt.lib.profiles import resolve_profile
|
|
413
418
|
|
|
414
419
|
config_path: Path = ctx.obj["config_path"]
|
|
@@ -427,8 +432,7 @@ def edit(
|
|
|
427
432
|
raise typer.Exit(1)
|
|
428
433
|
|
|
429
434
|
if kind != "all" and kind not in config.sources:
|
|
430
|
-
|
|
431
|
-
_error(f"Unknown source kind {kind!r}; available: {available}")
|
|
435
|
+
_error(source_kind_error(kind, config.sources))
|
|
432
436
|
raise typer.Exit(1)
|
|
433
437
|
|
|
434
438
|
# config.sources order, so srt precedes bash exactly as config.toml reads.
|
|
@@ -805,6 +809,8 @@ def show(
|
|
|
805
809
|
write for the profile. Agent and --yolo do not change canonical
|
|
806
810
|
documents, so neither is accepted here.
|
|
807
811
|
"""
|
|
812
|
+
from twsrt.lib.config import source_kind_error
|
|
813
|
+
|
|
808
814
|
try:
|
|
809
815
|
_, compiled = _compile(ctx.obj["config_path"], profile, yolo=False)
|
|
810
816
|
except (OSError, ValueError) as exc:
|
|
@@ -813,8 +819,7 @@ def show(
|
|
|
813
819
|
raise typer.Exit(1)
|
|
814
820
|
|
|
815
821
|
if kind not in compiled.documents:
|
|
816
|
-
|
|
817
|
-
_error(f"Unknown source kind {kind!r}; available: {available}")
|
|
822
|
+
_error(source_kind_error(kind, compiled.documents))
|
|
818
823
|
raise typer.Exit(1)
|
|
819
824
|
|
|
820
825
|
typer.echo(_serialize(compiled.documents[kind].document), nl=False)
|
|
@@ -1242,9 +1247,9 @@ def _compile(
|
|
|
1242
1247
|
config = load_config(config_path)
|
|
1243
1248
|
extra_deny_write: list[str] = []
|
|
1244
1249
|
if twsrt_dir is not None:
|
|
1245
|
-
for kind,
|
|
1250
|
+
for kind, source in list(config.sources.items()):
|
|
1246
1251
|
config.sources[kind] = replace(
|
|
1247
|
-
|
|
1252
|
+
source, output_path=twsrt_dir / DEFAULT_OUTPUT_NAMES[kind]
|
|
1248
1253
|
)
|
|
1249
1254
|
# Claude hot-reloads --settings: an agent able to write here could
|
|
1250
1255
|
# loosen its own policy mid-session.
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import tomllib
|
|
6
|
+
from collections.abc import Iterable
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
from typing import Any, cast
|
|
8
9
|
|
|
@@ -16,11 +17,24 @@ from twsrt.lib.models import (
|
|
|
16
17
|
|
|
17
18
|
SCHEMA_VERSION = 1
|
|
18
19
|
SOURCE_KINDS = ("srt", "bash")
|
|
20
|
+
# srt is the sandbox itself. bash is optional: without it no command rules
|
|
21
|
+
# exist and every bash code path is skipped.
|
|
22
|
+
REQUIRED_SOURCE_KINDS = ("srt",)
|
|
19
23
|
# Canonical output file names: next to config.toml when [sources.<kind>].output
|
|
20
24
|
# is omitted, and inside ./.twsrt/ under `generate --project`.
|
|
21
25
|
DEFAULT_OUTPUT_NAMES = {"srt": "srt-settings.json", "bash": "bash-rules.json"}
|
|
22
26
|
|
|
23
27
|
|
|
28
|
+
def source_kind_error(kind: str, configured: Iterable[str]) -> str:
|
|
29
|
+
"""Why *kind* cannot be used: registered but not configured, or unknown."""
|
|
30
|
+
if kind in SOURCE_KINDS:
|
|
31
|
+
return (
|
|
32
|
+
f"Source kind {kind!r} not configured: add [sources.{kind}] to config.toml"
|
|
33
|
+
)
|
|
34
|
+
available = ", ".join(sorted(configured))
|
|
35
|
+
return f"Unknown source kind {kind!r}; available: {available}"
|
|
36
|
+
|
|
37
|
+
|
|
24
38
|
def load_config(config_path: Path) -> AppConfig:
|
|
25
39
|
"""Load and validate the canonical twsrt configuration."""
|
|
26
40
|
if not config_path.exists():
|
|
@@ -69,7 +83,8 @@ def load_config(config_path: Path) -> AppConfig:
|
|
|
69
83
|
# orchestration consumes config.sources instead of these compatibility
|
|
70
84
|
# accessors.
|
|
71
85
|
config.srt_path = sources["srt"].output_path
|
|
72
|
-
|
|
86
|
+
if "bash" in sources:
|
|
87
|
+
config.bash_rules_path = sources["bash"].output_path
|
|
73
88
|
_apply_target_paths(config, targets, base_dir)
|
|
74
89
|
config.sandbox_overrides = dict(data.get("sandbox_overrides", {}))
|
|
75
90
|
config.claude_sync = _build_claude_sync(data.get("claude_sync"))
|
|
@@ -148,7 +163,7 @@ def _build_sources(raw: dict[str, Any], base_dir: Path) -> dict[str, CanonicalSo
|
|
|
148
163
|
fragments=fragments,
|
|
149
164
|
)
|
|
150
165
|
|
|
151
|
-
missing = [kind for kind in
|
|
166
|
+
missing = [kind for kind in REQUIRED_SOURCE_KINDS if kind not in sources]
|
|
152
167
|
if missing:
|
|
153
168
|
raise ValueError(f"Missing canonical source kind(s): {', '.join(missing)}")
|
|
154
169
|
return sources
|
|
@@ -196,6 +211,13 @@ def _build_profiles(
|
|
|
196
211
|
if not isinstance(blob, dict):
|
|
197
212
|
raise ValueError(f"profiles.{name} must be a table")
|
|
198
213
|
profile_blob = cast(dict[str, Any], blob)
|
|
214
|
+
unconfigured = set(profile_blob) & (set(SOURCE_KINDS) - set(sources))
|
|
215
|
+
if unconfigured:
|
|
216
|
+
kind = min(unconfigured)
|
|
217
|
+
raise ValueError(
|
|
218
|
+
f"profiles.{name}: source kind {kind!r} not configured; add "
|
|
219
|
+
f"[sources.{kind}] or remove profiles.{name}.{kind}"
|
|
220
|
+
)
|
|
199
221
|
unknown = set(profile_blob) - {"extends", *sources}
|
|
200
222
|
if unknown:
|
|
201
223
|
raise ValueError(
|
|
@@ -26,12 +26,14 @@ _NETWORK_CONFIG_KEYS = (
|
|
|
26
26
|
"allowUnixSockets",
|
|
27
27
|
"allowAllUnixSockets",
|
|
28
28
|
"allowLocalBinding",
|
|
29
|
+
"allowMachLookup",
|
|
29
30
|
"httpProxyPort",
|
|
30
31
|
"socksProxyPort",
|
|
31
32
|
)
|
|
32
33
|
_FILESYSTEM_CONFIG_KEYS = ("allowWrite", "denyWrite", "denyRead")
|
|
33
34
|
_SANDBOX_CONFIG_KEYS = (
|
|
34
35
|
"enabled",
|
|
36
|
+
"allowPty",
|
|
35
37
|
"enableWeakerNetworkIsolation",
|
|
36
38
|
"enableWeakerNestedSandbox",
|
|
37
39
|
"ignoreViolations",
|
|
@@ -84,7 +86,9 @@ def compile_sources(
|
|
|
84
86
|
)
|
|
85
87
|
|
|
86
88
|
srt_result = parse_srt_document(documents["srt"].document)
|
|
87
|
-
bash_rules =
|
|
89
|
+
bash_rules = (
|
|
90
|
+
parse_bash_document(documents["bash"].document) if "bash" in documents else []
|
|
91
|
+
)
|
|
88
92
|
return CompilationResult(
|
|
89
93
|
profile_name=profile.name,
|
|
90
94
|
documents=documents,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: twsrt
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: Agent security configuration generator — translates canonical security rules into agent-specific configs
|
|
5
5
|
Author-email: sysid <sysid@gmx.de>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -213,7 +213,7 @@ from a plain terminal
|
|
|
213
213
|
|
|
214
214
|
| Term | Meaning |
|
|
215
215
|
|---|---|
|
|
216
|
-
| Source kind | A canonical document type: `srt` (filesystem and network policy) and `bash` (command allow/ask/deny lists) |
|
|
216
|
+
| Source kind | A canonical document type: `srt` (filesystem and network policy, required) and `bash` (command allow/ask/deny lists, optional) |
|
|
217
217
|
| Fragment | One named `.jsonc` file holding a slice of policy for one source kind. Fragments never include each other |
|
|
218
218
|
| Profile | An ordered selection of fragments per source kind; may `extend` other profiles. `default_profile` applies when `-p` is omitted |
|
|
219
219
|
| Target | An agent config file translated from the canonical output |
|
|
@@ -233,7 +233,7 @@ path = "srt/base.jsonc"
|
|
|
233
233
|
[sources.srt.fragments.work]
|
|
234
234
|
path = "srt/work.jsonc"
|
|
235
235
|
|
|
236
|
-
[sources.bash] # output omitted: bash-rules.json next to config.toml
|
|
236
|
+
[sources.bash] # optional; output omitted: bash-rules.json next to config.toml
|
|
237
237
|
[sources.bash.fragments.base]
|
|
238
238
|
path = "bash/base.jsonc"
|
|
239
239
|
|
|
@@ -269,10 +269,12 @@ allowUnsandboxedCommands = false
|
|
|
269
269
|
enabled = false
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
Only `schema_version`, `default_profile`,
|
|
273
|
-
|
|
274
|
-
`
|
|
275
|
-
|
|
272
|
+
Only `schema_version`, `default_profile`, `[sources.srt]` and one profile are
|
|
273
|
+
required. Without `[sources.bash]` no command rules exist: nothing is compiled
|
|
274
|
+
to `bash-rules.json` and no agent gets Bash allow/ask/deny entries; a profile
|
|
275
|
+
must then not name `bash`. `config --init` writes exactly the required keys,
|
|
276
|
+
plus `[sandbox_overrides.yolo]`, and leaves every other key, `[sources.bash]`
|
|
277
|
+
included, commented out with its default value.
|
|
276
278
|
|
|
277
279
|
`output` is optional per source kind and defaults to `srt-settings.json` /
|
|
278
280
|
`bash-rules.json` next to `config.toml`. srt itself reads only
|
|
@@ -342,7 +344,7 @@ repository and loaded per launch instead of the global files:
|
|
|
342
344
|
```
|
|
343
345
|
twsrt generate claude -w -p slim --project
|
|
344
346
|
→ ./.twsrt/srt-settings.json canonical srt (instead of ~/.srt-settings.json)
|
|
345
|
-
→ ./.twsrt/bash-rules.json canonical bash
|
|
347
|
+
→ ./.twsrt/bash-rules.json canonical bash (only with [sources.bash])
|
|
346
348
|
→ ./.twsrt/claude-settings[.yolo].json Claude target (instead of ~/.claude/settings.full.json)
|
|
347
349
|
→ ./.twsrt/.gitignore "*"
|
|
348
350
|
stdout: the absolute .twsrt directory
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|