Skip to content

install.js silently no-ops OpenCode surface install (references undefined shared.harnessInstall) — no hooks/skills/commands ever registered with OpenCode #1

Description

@tbille

Summary

After installing @a5c-ai/babysitter-opencode@6.0.2 (reproduced identically on 6.0.3-staging.bf012dbb7bff), the plugin bundle is copied into .opencode/plugins/babysitter/, but none of it is ever wired into OpenCode's actual discovery mechanisms. No babysitter hooks fire, no babysitter skills appear in <available_skills>, and no /babysitter:* command is registered as an OpenCode slash command.

Root cause

bin/install.js:

shared.copyPluginBundle(PACKAGE_ROOT, pluginRoot);
shared.ensureMarketplaceEntry(marketplacePath, pluginRoot);
if (typeof shared.harnessInstall === 'function') {
  shared.harnessInstall(PACKAGE_ROOT, pluginRoot);
}

install-shared.js never defines or exports a function named harnessInstall, so this is a permanent no-op. Confirmed directly:

$ node -e "const s=require('./bin/install-shared.js'); console.log('harnessInstall' in s)"
false

The correct OpenCode-specific logic already exists in install-shared.js but is never called from the install entrypoint:

  • installOpenCodeSurface(packageRoot, openCodeHome) would copy skills/* up to .opencode/skills/<name>/SKILL.md (the path OpenCode scans per https://opencode.ai/docs/skills) and merge hooks into a top-level .opencode/hooks.json.
  • writeIndexJs(pluginRoot) would write .opencode/plugins/babysitter/index.js, the JS entry point OpenCode's plugin loader needs (OpenCode only auto-loads JS/TS files directly, per https://opencode.ai/docs/plugins — it doesn't read plugin.json/hooks.json manifests). This is currently only invoked from installAccomplishSurface, never from the standard OpenCode CLI install path.

Separately: even after fixing harnessInstall, there is no code path anywhere in install-shared.js that copies commands/*.md out to .opencode/commands/ (the only location OpenCode's command scanner reads — flat .md files, per https://opencode.ai/docs/commands). So bundled /babysitter:* commands can never surface as real OpenCode slash commands; they're just docs sitting in an unreachable plugin subdirectory.

Repro

npx --yes @a5c-ai/babysitter-opencode@6.0.2 install --workspace <project>
find <project>/.opencode/plugins/babysitter -maxdepth 1
# -> commands/ hooks/ plugin.json skills/ versions.json (no index.js)
find <project>/.opencode/skills 2>/dev/null    # does not exist
cat <project>/.opencode/hooks.json 2>/dev/null # does not exist

Expected

After install, OpenCode should load babysitter hooks, list babysitter skills in <available_skills>, and ideally expose /babysitter:* as real slash commands.

Environment

  • @a5c-ai/babysitter-opencode: 6.0.2 (also reproduced on 6.0.3-staging.bf012dbb7bff)
  • @a5c-ai/babysitter-sdk (CLI): 6.0.2
  • OS: macOS (darwin)

Suggested fix

Replace the dead harnessInstall check in bin/install.js with direct calls to shared.installOpenCodeSurface(...) and shared.writeIndexJs(pluginRoot), and add a step copying commands/*.md into .opencode/commands/ (e.g. flattened as babysitter-doctor.md) so they register as real OpenCode slash commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions