chore: mark @aictrl/plugin private; stop publishing from CLI release#67
Conversation
…LI release The npm name @aictrl/plugin is used by a separate telemetry-delivery package with its own release cadence. Our monorepo's packages/plugin (the plugin-author SDK — types + the tool() factory) was colliding on the name, which is how v0.3.3 got stuck: the CLI publish workflow attempted to republish @aictrl/plugin@1.2.16 but npm already has 2.0.0 from the telemetry package, so the real-version publish hit ENEEDAUTH. Changes: - Rename workspace package to @aictrl/plugin-sdk; reset to 0.1.0 for a fresh start. - Update all internal imports (8 source files in packages/cli/src/, 3 in .opencode/tool/) and tests. - packages/cli/src/config/config.ts auto-install now targets @aictrl/plugin-sdk in user project package.json. - Remove the 'Publish @aictrl/plugin' step from the CLI release workflow. @aictrl/plugin-sdk releases on its own cadence — manual bootstrap publish from a dev machine, subsequent updates independent of CLI releases. Avoids re-doing OIDC trusted publisher setup per CLI release and stops conflating two unrelated packages. - CONTRIBUTING.md documents the separation. User impact: plugin authors currently depending on @aictrl/plugin (the SDK, not the telemetry one) should migrate to @aictrl/plugin-sdk. User projects with existing @aictrl/plugin entries keep working on the disk they have; the CLI will add @aictrl/plugin-sdk on next run. Verified: typecheck 6/6 green, 1275 tests pass, 7 skip, 0 fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Review: Rename
|
|
Now let me build the manifests and compute sharding:Now let me build the manifests and compute sharding:Good. S for bug hunter = 32 (≤ 1000), so N = 1 shard. Total subagents = 3. Let me prepare the inline data and dispatch all 3 subagents in parallel.Now dispatching all 3 subagents in parallel:## Code Review: PR #67 — Rename @aictrl/plugin → @aictrl/plugin-sdk Breaking Changes & Migration IssuesMAJOR |
MINOR |
Test CoverageMINOR | The test for Security & ConsistencyNo findings from the Security or Consistency reviews. All import renames are mechanical and consistent across the codebase. |
Addresses the PR review finding that installDependencies was adding @aictrl/plugin-sdk but leaving an orphaned @aictrl/plugin entry behind, which would cause bun install to fetch the unrelated telemetry package. - installDependencies now deletes dependencies["@aictrl/plugin"] during the same write pass that adds @aictrl/plugin-sdk. - needsInstall treats presence of the legacy key as 'install needed' so the migration runs on the next CLI invocation for existing users. - New test asserts the migration behaviour end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Review: Rename
|
…ojects Plugin extension is first-party only. The CLI embeds plugin types at runtime, so user plugin projects don't need an npm dep for the SDK at all — dropping the whole @aictrl/plugin-sdk auto-install dance. Changes: - Mark packages/plugin as "private": true so it can't be accidentally published. Workspace-only henceforth. - installDependencies: stop adding @aictrl/plugin-sdk. Scrub both the legacy @aictrl/plugin and @aictrl/plugin-sdk keys from user package.json (migrating existing installs off the old names). Still runs bun install for user-declared deps like cowsay. - needsInstall: simpler — only trigger on missing node_modules (handled above) or legacy @aictrl/plugin* key present (migration path). - Drop now-unused Installation / PackageRegistry imports from config.ts. - Update the migration test to assert both keys are stripped. Typecheck 6/6 green; 1276 tests pass, 7 skip, 0 fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
With packages/plugin marked private and never published, the npm name collision with the telemetry @aictrl/plugin is moot. Dropping the -sdk suffix — the workspace name just needs to be unique inside the repo, and @aictrl/plugin matches the directory name and existing import habit. Typecheck green; 1275 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
S = 81, so N = 1 bug-hunter subagent. Total subagents: 3 (Security + Consistency + 1 Bug Hunter). Let me extract the patches for each manifest.Now I'll dispatch all 3 subagents in parallel.## Code Review: PR #67 Refactor: rename @aictrl/plugin → @aictrl/plugin-sdk + decouple from CLI release SecurityNo issues found. The rename touches auth-related imports but only changes package specifiers ( ConsistencyNo issues found. All 19 files consistently replace the old package name. Import style, naming conventions, and file placement follow existing patterns. The new migration test covers the legacy key cleanup. Bugs & Breaking ChangesNo issues found. The migration logic in
The test suite covers the migration path. Result: No findings. Clean rename across all files. |
Unblocks v0.3.3 and gets rid of the recurring npm publish drama for the plugin package.
The workspace `@aictrl/plugin` (at `packages/plugin`) is the first-party plugin-author SDK — types + the `tool()` factory. It's consumed internally by `packages/cli/` (8 files) and `.opencode/tool/` (3 files). Types ship embedded in the compiled CLI binary at runtime, so there's no reason to publish it to npm.
The npm name `@aictrl/plugin` is actually used by a separate telemetry-delivery package (2.0.0) on its own release cadence. Our publish workflow was colliding with it — it tried to push `1.2.16` over the real `2.0.0`, which hit `ENEEDAUTH` because the trusted publisher isn't set up for our package under that name. That's how v0.3.3 got stuck.
Changes
No code rename needed — the workspace name stays `@aictrl/plugin` (it was briefly renamed to `@aictrl/plugin-sdk` earlier in the branch, then reverted once we confirmed it's private and internal-only).
User impact
Users with existing plugin projects that have `@aictrl/plugin` (version `1.2.16` or similar, added by older CLIs) in their `package.json` will have it automatically removed on next CLI run. Their local plugin code keeps working because the CLI binary provides the types at runtime.
Follow-up after merge
Test plan
🤖 Generated with Claude Code