Terret gives a coding host a typed way to run work on your machine while you set the limits on what that work can do. The host can open a workspace, start a turn, and follow its progress through MCP. Terret adapts those same jobs to Grok Build or dsh.
The host drives typed Scala jobs such as open, run, and status, plus native tools such as remove_worktree. Terret exposes their input and result schemas through MCP. For downstream tools, find searches the configured .mcp.json catalog for granted matches. call takes an explicit server and tool name plus a JSON object as text, and checks the grant again before dispatch. Dispatch is deterministic: the host names the target and policy decides whether it is granted. Search ranking and tool results can vary. See the job and tool contracts.
- A server-set ceiling. The default
Closedpolicy grants workspace reads only. WithRunCommandsgranted, Terret confines the Grok ACP commands it launches at the OS level, with writes and network separately gated. macOS Seatbelt denies reads and writes to protected personal folders such as Desktop, Documents, and Downloads by default; explicit workspace and root grants can restore scoped access subject to macOS controls. The Grok process itself runs outside this shell sandbox. Permission ceiling · Sandbox rules - Out-of-band approval. With
terret.passkey.mcpStepUp = true(defaultfalse), mutating MCP tools require a fresh passkey assertion. With a watch listener and a compatible passkey origin configured, a headless HTTP MCP call can wait while the signed-in owner reviews it and approves that one call with a passkey, such as Touch ID on a supported Mac. Watch steering, additional passkey enrollment, and mutating HTTP job routes require a fresh assertion independently of the flag. Watch approvals and enrollment · Step-up contract - GitHub credentials stay with the service. Terret runs the granted GitHub jobs with the service token outside the session sandbox. GitHub read and write grants are separate and both are off by default. GitHub security contract
open can create a linked Git checkout under terret.worktreeRoot; remove_worktree removes a managed checkout and keeps the branch. Sessions stream events, and compatible MCP Apps hosts can show a read-only Scala.js session card and subscribe to live state. The card calls no tools. With SpawnSubagents granted, a helper stays inside its parent session's confinement.
Grok Build is the default adapter. Local Grok launches can select a model from your Grok config, including a model served at a local endpoint or a Bedrock provider configured with an SSO credential helper. Model configuration
Set an HTTP key source, then run from this repository:
./histos run appPoint your host at http://127.0.0.1:8080/mcp with the configured key in the x-terret-key header. Terret reads ~/.config/terret/terret.conf at startup. See the config page for the full file and restart instructions, or the docs site for the latest stable install coordinates.
Histos uses solve mode for this checkout. It resolves floating -SNAPSHOT dependencies from Sonatype's Maven snapshots repository, so a fresh build can pick up newer artifacts without a source change.
flowchart LR
host[MCP host] --> mcp[MCP inbound]
mcp --> core[terret core]
core --> adapter[adapter]
adapter --> harness[harness]
adapter -.-> sandbox[Grok ACP command sandbox]
- Docs site: attach a host, jobs, the watch page, events, the permission ceiling, config, and operations
- DESIGN.md: decisions
- ROADMAP.md: which phase is open
- LICENSE: Apache License 2.0