Isolated configuration, an approval-gated policy, a Hu Tao agent and theme, cross-platform lifecycle tools, and a ZITADEL-protected control plane — without forking OpenCode's agent loop.
The departed leave no instructions.
Only the living can choose what comes next.
Everything OpenCode already does well, it keeps doing. The harness wraps it in a hardened, isolated, lifecycle-managed shell.
A production-minded persona — finish the job, never fabricate, verify with real output. Ships with a wine-and-parchment terminal theme.
Shell, edits, grep, and external-directory access require approval. Destructive commands and secret-path reads are denied. Fail-closed enforcement via checksummed inline config.
Atomic install, update, rollback, and uninstall on Linux, macOS, and Windows. Versioned releases with pointer-based activation and per-install locking.
Administrator-only BFF with OIDC Authorization Code + PKCE. Server-side sessions with ID rotation. Allowlisted, schema-validated upstream responses. CSRF-protected mutations.
JSONL audit records of session lifecycle and tool execution — no prompts, no file content. Optional journald duplication outside service-user control.
Config, state, data, cache, and audit logs live under ~/.hutao. A normal OpenCode installation is left untouched. Override every path with environment variables.
From a trusted local checkout for now. Versioned release installation will be available once Forgejo and signing are set up.
The installer pins OpenCode 1.18.4 and verifies
its SHA-256 digest. It stages and validates all 14 payload files before
activation, atomically advances the current pointer,
and preserves previous for rollback.
The browser never touches OpenCode directly. Caddy terminates TLS; the BFF and OpenCode bind to loopback only.
The hutao shim reads the marked
HUTAO_HOME, resolves the
current pointer to a versioned
release, exports the checksummed enforced-policy.json
through OPENCODE_CONFIG_CONTENT,
and invokes the pinned OpenCode binary by absolute path.
Defense in depth — not a sandbox. Every layer fails closed.
.env, .env.*, credential files — blocked at read. .env.example remains readable.rm -rf, mkfs, dd if=, volume deletion, hard Git reset, and more.administrator role required.enforced-policy.json is missing, the launcher refuses to start.Every namespace is separate. A normal OpenCode installation is untouched.
| Item | Default path |
|---|---|
| Harness home | ~/.hutao |
| Active release | ~/.hutao/current |
| OpenCode config | ~/.hutao/current/config |
| Config namespace | ~/.hutao/xdg-config |
| State namespace | ~/.hutao/xdg-state |
| Data | ~/.hutao/data |
| Cache | ~/.hutao/cache |
| Audit log | ~/.hutao/state/audit.jsonl |
| Versioned runtimes | ~/.hutao/releases/<release>/runtime |
| Config backups | ~/.hutao/backups |
Override with HUTAO_HOME,
HUTAO_CONFIG_HOME,
HUTAO_STATE_HOME,
HUTAO_DATA_HOME,
HUTAO_CACHE_HOME,
HUTAO_AUDIT_LOG.
No network self-updater. Updates require a locally verified installer with a trusted SHA-256.