Skip to content

feat: pin plugin to CLI v3.0 (Rust)#180

Merged
kengio merged 1 commit into
mainfrom
feat/cli-v3-compat
May 20, 2026
Merged

feat: pin plugin to CLI v3.0 (Rust)#180
kengio merged 1 commit into
mainfrom
feat/cli-v3-compat

Conversation

@kengio
Copy link
Copy Markdown
Collaborator

@kengio kengio commented May 20, 2026

Summary

  • Bumps plugin version 2.4.133.0.0-alpha.1 in .claude/plugins/onebrain/.claude-plugin/plugin.json
  • Declares hard CLI dependency via new requires.cli: ">=3.0.0-alpha.1" field — refuses to load against the Bun-era v2.x CLI
  • PLUGIN-CHANGELOG.md gains a v3.0.0-alpha.1 entry naming the CLI rewrite, the parity audit, and the deferred Node-on-PATH follow-up

Why a major bump (and why -alpha.1)

The v3 CLI is a complete Rust rewrite of the previous Bun/TypeScript binary. All 13 subcommands referenced by plugin skills (session-init, checkpoint stop, checkpoint reset, orphan-scan, vault-sync, register-hooks, register-schedule, qmd-reindex, run-skill, update, plus --version) retain parity per the v3.0.0-alpha.1 smoke test, so existing skill prose continues to work unchanged. The major bump signals to consumers that downgrading the CLI to 2.x is unsupported under this plugin release. The -alpha.1 suffix mirrors the upstream CLI tag and marks this as a prerelease while v3.0 stabilises — matches the existing convention where the plugin's last v1→v2 jump also rode a CLI transition.

Audit findings (deferred to follow-up)

grep -rn "bun \|node " .claude/plugins/onebrain surfaced:

  • No bun run, bun build, or bun test invocations in any plugin file. Two references to bun install -g … in skills/qmd/SKILL.md and skills/update/SKILL.md are documentation of user-side install commands, not plugin shell-outs — safe.
  • node -e "…" shell-outs in 6 files, all sharing the same justification comment: "Node is reliably on PATH because the OneBrain CLI requires it." The Rust CLI no longer carries Node as a transitive dependency, so this assumption no longer holds:
    • skills/qmd/SKILL.md (basename + crypto.randomBytes for collection-name generation)
    • skills/update/SKILL.md (mkdir for 07-logs/ subfolders)
    • skills/reorganize/SKILL.md (mkdir for target subfolders)
    • skills/import/SKILL.md + skills/import/references/{image,pdf,video}-handler.md (mkdir + file stat for attachment dirs)
    • startup/scripts/open-in-obsidian.sh (URL-encoding the vault path)

Per the minimal-changes rule these are flagged, not fixed, in this PR. Each call site has a portable fallback path documented inline (mkdir -p / PowerShell New-Item / cmd mkdir), so most still work on machines where Node happens to be installed — but the "guaranteed" claim needs to be retired and the Node calls replaced with a CLI subcommand (e.g. onebrain util mkdir, onebrain util urlencode) in a follow-up.

Test plan

  • Install plugin into a fresh vault with CLI v3.0.0-alpha.1 — verify plugin.json parses and the plugin loads
  • Verify requires.cli gate: install CLI v2.3.3 alongside this plugin and confirm Claude Code refuses to load it (or warns)
  • Smoke test /daily, /wrapup, /doctor, /qmd setup against a v3.0 CLI to confirm parity holds end-to-end
  • Cross-check that no node-dependent skill silently fails on a Node-free machine (manual / follow-up PR)

Bumps plugin version 2.4.13 -> 3.0.0-alpha.1 and declares a hard
requirement on the Rust CLI rewrite via the new requires.cli field
in plugin.json.

Major bump rationale: the v3 CLI replaces the Bun/TypeScript binary
with a native Rust executable. All 13 subcommands referenced by
plugin skills retain parity with v2.3.3 (smoke-tested), so existing
skill prose continues to work unchanged. The version jump signals
to consumers that downgrading the CLI back to 2.x is unsupported
under this plugin release.

Audit of plugin shell-outs surfaced one follow-up: several skills
and startup/scripts/open-in-obsidian.sh shell out to `node -e ...`
with the comment "Node is reliably on PATH because the OneBrain CLI
requires it." The Rust CLI no longer carries Node as a transitive
dependency, so this assumption is broken. Per the minimal-changes
rule, this is documented in PLUGIN-CHANGELOG and deferred to a
dedicated follow-up PR rather than rewritten here.
@kengio kengio merged commit 7d368f9 into main May 20, 2026
1 check passed
@kengio kengio deleted the feat/cli-v3-compat branch May 20, 2026 03:39
kengio added a commit that referenced this pull request May 20, 2026
)

Reverts commit 7d368f9.

PR #180 declared a hard `requires.cli: '>=3.0.0-alpha.1'` and bumped
the plugin version 2.4.13 -> 3.0.0-alpha.1 ahead of the CLI's actual
GA. Reasoning at the time: signal that downgrading the CLI to the v2.x
Bun binary is unsupported under the new plugin.

In practice this lands too early:

- The v3 CLI is still pre-GA (v3.0.0-alpha.5 at time of this commit).
  Anyone on a clean install picks up the plugin via vault-sync and
  then trips the version check until they manually update the CLI.
- The plugin itself still works against both Bun v2.3.3 and the Rust
  alpha series — there's no skill that actually requires v3-only
  behaviour today.
- Coupling plugin version 3.0.0-alpha.1 to the CLI alpha confuses the
  versioning story: plugin alpha + CLI alpha both at .alpha.1, drifting
  separately as each repo bumps.

This commit restores the pre-PR-#180 plugin.json shape (no
`requires.cli` field, no `version: 3.0.0-alpha.1`) and bumps the
plugin to v2.4.14 to record the revert. The CLI-v3 pin will be
re-applied — likely as `requires.cli: '>=3.0.0'` — once the CLI's
v3.0.0 GA tag ships.
kengio added a commit that referenced this pull request May 20, 2026
PR #181 reverted PR #180 and added a PLUGIN-CHANGELOG v2.4.14 entry,
but the plugin.json bump from 2.4.13 → 2.4.14 was missed during the
amend pass (Edit tool blocked on a Read-required precondition that
got dismissed in the noise). Result: PLUGIN-CHANGELOG advertises
v2.4.14 while plugin.json still reports v2.4.13.

This was caught when running /update against a vault on plugin
v2.4.13 — the version-check step (read upstream plugin.json + compare)
returned 'Already up to date' instead of triggering the v2.4.14 sync.

One-line bump to restore consistency. No code or config change beyond
the version field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant