Repository navigation
0.2.0: deploy an adapter into a workspace, in place
deploy — the second half of hermit's OpenCode request.
0.1.x could only convert: emit a configuration into a directory of its own, which
you then copied into a project. This release adds the other route, which is what
hermit issue #35 and the
roadmap in #37 §3 ask for.
pip install https://github.com/argszero/hermit-opencode/releases/download/0.2.0/hermit_opencode-0.2.0-py3-none-any.whl
hermit-opencode deploy path/to/adapter --workspace /path/to/your/projectWhat deploy writes
The same four parts convert emits, in place: .opencode/context.md and its
instructions entry, .opencode/skills/, .opencode/agents/ (mode: subagent),
and opencode.json's mcp entry. Plus .opencode/adapter/ — its copy of the
adapter, namespaced there because a project may already have an adapter/
directory — and .opencode/hermit-opencode.json, the record that makes a
workspace this tool's own.
How it treats a tree that is not its own
- It merges
opencode.json; it never replaces it. Your other keys, your own
instructionsentries and your other MCP servers stay. - It refuses a workspace it did not create, and
--forceadopts one, printing
which of its own files that adoption overwrote ("adopted": ["opencode.json"]). - It never deletes anything. A role or skill an earlier deploy wrote and the
adapter no longer declares stays where it is; removing it is yours to do. - Two refusals hold even with
--force, because merging is the only thing it does
to your files and both mean it cannot merge: anopencode.jsonthat is not valid
JSON, and one whoseinstructionsormcpkey holds the wrong type. It stops
and names the file instead of overwriting what it could not read. - No managed block in
AGENTS.md— the context travels as.opencode/context.md
throughinstructions, which OpenCode combines with yourAGENTS.md, so your
file is never edited. No lifecyclehooks(refused, asconvertrefuses them,
unless--allow-lossy), no container isolation, no per-taskcontext_tool.
convert and 0.1.x's command spelling are unchanged: hermit-opencode <adapter> --output DIR still converts.
Which hermit this needs
Hermit is needed only for the tool server, and the mcp entry requires one that
reads the .hermit/adapter.yaml + exports.yaml layout: hermit-harness 0.2.0
or later, from PyPI.
pip install "hermit-harness>=0.2.0"
python -c "from hermit.adapter import manifest; print(manifest.MANIFEST)" # .hermit/adapter.yamlhermit-harness 0.1.0 cannot serve the embedded adapter: its manifest reader wants
adapter.yaml at the adapter root, the layout hermit replaced in its own #41.
Nothing in convert or deploy needs hermit at all; only the server does.
What was verified
- 25 tests pass, no network and no hermit installed. The new ones cover the
four paths that matter in somebody else's tree: a fresh deploy; a second deploy
that is byte-identical and leaves a user file, a user skill and the audit log
untouched; a workspace this tool did not create, refused with nothing written;
and--forceadopting one and reporting what it overwrote. - A real deployment, then a real MCP exchange. A project holding its own
main.pyandAGENTS.mdwas adopted with--force; both survived byte for byte.
Themcpcommand the deploy emitted was then run from the workspace with
cwd: ".",PYTHONPATHcleared, underhermit-harness 0.2.0from PyPI:
initialize/tools/list/tools/callreturned
count_words('one two three') -> {"count": 3}, exit 0, and appended to
.opencode/audit/tool-calls.jsonlinside the workspace. - The deployed
opencode.jsonvalidates againsthttps://opencode.ai/config.json
(Draft202012, schema vendored in the repository), withcwd: "."and no absolute
path anywhere in it. - The install command at the top was run from a clean virtualenv with
PYTHONPATHcleared, soPyYAML 6.0.3was genuinely fetched; bothconvertand
deploythen ran from that install.
What was NOT verified
No live OpenCode session has ever loaded this output — convert's or
deploy's. No OpenCode credentials or model backend were available, so the
end-to-end path stops at the MCP server: the configuration is schema-valid and its
server command works, but "OpenCode started, read .opencode/, and used the skill
and subagent" is unproven. A schema-valid configuration is not a loaded one.
deploy deserves that caveat more than convert does, because it writes into a
project you already have. Run it first in a fresh directory, or in a tree under
version control.
Assets
hermit_opencode-0.2.0-py3-none-any.whl— sha256853b8097f5f3783ad8515b42007f2a89fc707161a1c350ac3e97fff0f3c56fd8hermit_opencode-0.2.0.tar.gz— sha2568c984a0d233c84e196ed7a98461a82268d49b614fdd2914f434660d9c231f246
0.1.1's tag and release are untouched. Its corrected notes still apply to that
version, including the withdrawal of the "install hermit from git" advice.