Sandbox and Skills¶
tether.sandbox¶
Deterministic security sandbox for Tether (workspace jail, env scrubbing, Linux bwrap).
SandboxViolationError
¶
Bases: PermissionError
Raised when a tool call violates the deterministic SandboxPolicy.
SandboxPolicy
dataclass
¶
Deterministic security envelope enforced by the harness (never by the LLM).
attenuate(child_profile=None, child_network=None)
¶
Create a child SandboxPolicy that can only narrow (never escalate) privileges.
resolve_safe_path(raw_path, *, write=False)
¶
Resolve a path and enforce workspace confinement + sensitive-file protection.
scrub_env(base_env=None)
¶
Return a sanitized environment: allowlist only, so unknown secrets never leak.
validate_bash_command(cmd)
¶
Deterministically validate a shell command against sandbox rules.
execute_bash_with_code(cmd, stdin=None)
async
¶
Execute a shell command in the deterministic sandbox and return (returncode, output).
execute_bash(cmd, stdin=None)
async
¶
Execute a shell command inside the deterministic sandbox.
tether.skills¶
Progressive Skill discovery, YAML frontmatter parser, and companion tools.py loader.
SkillLoader
¶
Discovers and loads skills from ./skills/ and ~/.tether/skills/.
parse_skill_markdown(raw_text, default_name, source_path=None)
¶
Parse a Markdown file with optional YAML frontmatter into a Skill object.
make_skill_tool(loader, mux)
¶
Create the progressive skill tool (skill list | load <name>).
tether.retro¶
Offline post-mortem (tether retro): distill session friction into tiny Skill rules.
parse_rules(text, existing='')
¶
Keep <=MAX_RULES bullets within the token cap, dropping ones already in existing.