- adapters/opencode/adapter.sh: replace python3 template substitution with
pure bash (while-read loop with case matching), removing python3 dependency
- adapters/lib.sh: should_include now falls back to plain YAML key read for
files without frontmatter delimiters (fixes hook .yaml exclude: support)
- tests/run.sh: check source return code, report failures
- tests/regression/run.sh: use mktemp + trap cleanup instead of fixed /tmp paths
- tests/regression/run.sh: include .mcp.json in regression comparison
- tests/regression/take-snapshot.sh: use --platform flag instead of stale scripted input
- adapters/opencode/templates/plugin-stub.js.tmpl: include stdout in hook block error message
build: add platform_dir and dispatcher_name to all hook wrapper/plugin templates
feat(hooks): platform-aware path checks using platform_dir and dispatcher_name from JSON input
test: update regression snapshot for platform-aware hook wrappers and scripts
Co-Authored-By: win0na <winnie@winneon.moe>
feat(opencode): config-merge.sh with formatting-preserving JSON merge
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
build(opencode): source config-merge.sh from adapter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(install): use oc_config_merge for opencode.json instead of overwrite
Source config-merge.sh from install scripts for opencode platform so
user keys in opencode.json are preserved on reinstall and update.
Fix in-place merge by writing to a temp file before moving to output.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: restore adapter_build() contract, revert function renames
Both adapters now export adapter_build() and adapter_translate_*() as
the uniform public contract. scripts/build.sh sources one adapter and
calls adapter_build uniformly. Private helpers (_oc_*) and vocabulary
tables (cc_capability_to_tools, oc_capability_to_permission, etc.)
retain their prefixes. CC regression and OC unit tests all pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(tests): restore test_oc_ prefix on adapter_build end-to-end test
Co-Authored-By: win0na <winnie@winneon.moe>
feat(lib.sh): add install_plugins helper for opencode JS plugins
build(adapters): opencode adapter skeleton with capability/event tables
build(opencode): adapter_translate_dispatcher (DISPATCHER.md → AGENTS.md)
build(opencode): adapter_translate_references and adapter_translate_skills
Implements Task 4 and Task 5:
- adapter_translate_references: Copies reference markdown files to .opencode/references/
- adapter_translate_skills: Copies skill SKILL.md files to .opencode/skills/<name>/ with exclude filtering
Both functions respect framework filtering via should_include().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
build(opencode): adapter_translate_agents with capability→permission mapping
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
build(opencode): bash-executor template for spawning hook scripts
build(opencode): plugin-stub template for mbifc-hooks.js
build(opencode): adapter_translate_hooks with JS plugin generation
Implements _oc_hook_registry_json and adapter_translate_hooks in the
opencode adapter. Copies hook scripts to .opencode/hooks/, generates a
single .opencode/plugins/mbifc-hooks.js by inlining bash-executor.js and
synthesising a hook registry from *.hook.yaml files. Uses python3 for
template substitution to safely handle multi-line JS content. Adds 3
unit tests (copies scripts, registry entries, noop when no hooks dir).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
build(opencode): adapter_translate_mcp with local/remote handling
build(opencode): adapter_finalize and complete adapter_build wiring
Add adapter_finalize placeholder and wire adapter_translate_mcp into
adapter_build; add end-to-end integration test (14/14 pass).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(launchme): branch on --framework for opencode install layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(updateme): branch on --framework for opencode install layout
Mirror the same case "$FRAMEWORK" block from launchme.sh: framework-specific
DIST_COMPONENTS_DIR, VAULT_COMPONENTS_DIR, DISPATCHER_SRC/DST, MCP_SRC/DST,
HAS_PLUGINS; conditional install_plugins; conditional install_settings;
framework-aware vault-setup check; framework-neutral summary messages.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>