Problem
install.sh writes govern.mjs to disk via an embedded heredoc:
cat > "$PLUGIN_DIR/bin/govern.mjs" << 'GOVERN'
#!/usr/bin/env node
import { readFileSync } from "fs";
...the entire govern.mjs source baked inline as a string literal...
GOVERN
The heredoc content is a copy of govern.mjs from a much earlier version (v0.3.0 — pre-PostToolUse, pre-error-categorization, pre-scoped-token-injection). When bin/govern.mjs was updated to v0.5.0 (then v0.5.1), the heredoc was NOT updated.
Net effect: anyone running the canonical install path
curl -sf https://agenticcontrolplane.com/install.sh | bash
gets v0.3.0 of the hook, not the latest. The plugin repo's bin/govern.mjs is effectively dead code — it's the canonical source on GitHub but doesn't reach users.
Two install.sh files exist
There are two divergent copies:
claude-code-acp-plugin/install.sh (the plugin repo)
agenticcontrolplane.com/install.sh (the marketing site, served at the URL above)
They're not symlinked or kept in sync. Both need updating for any user-facing change.
Suggested fix
Refactor install.sh to fetch govern.mjs from the plugin repo at install time rather than inlining it. Two reasonable approaches:
- Fetch from
https://raw.githubusercontent.com/davidcrowe/claude-code-acp-plugin/main/bin/govern.mjs (always-latest)
- Pin to a tagged release:
https://raw.githubusercontent.com/davidcrowe/claude-code-acp-plugin/v0.5.1/bin/govern.mjs
Option 2 (pinned) is safer — install.sh references a known-good version, controlled by tag.
Either way, both copies of install.sh need to be unified, ideally by symlinking the marketing-site copy to the plugin repo's, or by introducing a sync step in CI.
Acceptance criteria
Related
- gatewaystack-connect#114 (cross-arch credential brokering epic)
- gatewaystack-connect#115 (Phase 1, which depends on getting users onto v0.5.x)
Problem
install.shwritesgovern.mjsto disk via an embedded heredoc:The heredoc content is a copy of
govern.mjsfrom a much earlier version (v0.3.0 — pre-PostToolUse, pre-error-categorization, pre-scoped-token-injection). Whenbin/govern.mjswas updated to v0.5.0 (then v0.5.1), the heredoc was NOT updated.Net effect: anyone running the canonical install path
curl -sf https://agenticcontrolplane.com/install.sh | bashgets v0.3.0 of the hook, not the latest. The plugin repo's
bin/govern.mjsis effectively dead code — it's the canonical source on GitHub but doesn't reach users.Two install.sh files exist
There are two divergent copies:
claude-code-acp-plugin/install.sh(the plugin repo)agenticcontrolplane.com/install.sh(the marketing site, served at the URL above)They're not symlinked or kept in sync. Both need updating for any user-facing change.
Suggested fix
Refactor
install.shto fetchgovern.mjsfrom the plugin repo at install time rather than inlining it. Two reasonable approaches:https://raw.githubusercontent.com/davidcrowe/claude-code-acp-plugin/main/bin/govern.mjs(always-latest)https://raw.githubusercontent.com/davidcrowe/claude-code-acp-plugin/v0.5.1/bin/govern.mjsOption 2 (pinned) is safer — install.sh references a known-good version, controlled by tag.
Either way, both copies of install.sh need to be unified, ideally by symlinking the marketing-site copy to the plugin repo's, or by introducing a sync step in CI.
Acceptance criteria
install.shfetchesgovern.mjsfrom a known source rather than inlining itclaude-code-acp-plugin/install.shandagenticcontrolplane.com/install.share kept in sync (symlink, sync script, or shared origin)~/.acp/govern.mjsmatches the canonical source for the current versionRelated