Skip to content

Rename packages/cua-cli to packages/cli - #26

Merged
rgarcia merged 1 commit into
mainfrom
hypeship/rename-cua-cli-to-cli
Jun 12, 2026
Merged

Rename packages/cua-cli to packages/cli#26
rgarcia merged 1 commit into
mainfrom
hypeship/rename-cua-cli-to-cli

Conversation

@rgarcia

@rgarcia rgarcia commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

PR 1 of 3 in the cua-cli follow-up series. Moves the CLI workspace
directory from packages/cua-cli to packages/cli. The npm package
name (@onkernel/cua-cli), the published binary name (cua), and the
workspace name all stay unchanged — only the directory path changes.

Changes

  • git mv packages/cua-cli packages/cli (preserves file history).
  • Updated path references in: root package.json workspaces, root
    tsconfig.json project references, bin/cua wrapper, README.md
    workspace tree / workspace table / project-layout tree / CLI-reference
    link, docs/architecture.md prose and mermaid diagram, and
    .agents/skills/update-docs/SKILL.md's CLI runtime flow note.
  • package-lock.json regenerated as a mechanical 3-line workspace path
    rename (no other entries touched).
  • Historical plan documents (docs/cua-cli-harness-migration.md and
    .cursor/plans/cua-ai-agent.md) keep their prose as-is. skills/cua-cli/
    is a separate skill directory unrelated to the package and is left in
    place. Tests under packages/cli/test/ use cua-cli-* tmpdir prefixes
    that derive from the package name (which is unchanged) rather than the
    directory path, so they're left as-is.
  • .github/workflows/ci.yml only references the unchanged workspace
    name @onkernel/cua-cli; no path filters or working-directory entries
    needed updating.

Tests

  • npm test --workspace @onkernel/cua-cli — 29 passed, 4 TUI fixture
    tests skipped (require ptywright native zig build; same as on main).
  • tsc -b build for the cli workspace succeeds end-to-end.
  • Preexisting environmental issue unchanged: a ./bin/cua --help invocation
    errors with ERR_MODULE_NOT_FOUND for ./cli-harness because the
    TypeScript emit uses extensionless ESM imports — same on main, not
    introduced by this PR. The bin/cua wrapper is slated for removal in
    the next PR of this series.
  • The ptywright build:native step (Ghostty/Zig combine_archives) also
    fails in this sandbox; reproduces identically on main and is not
    related to this rename.

Out of scope

This is part of a 3-PR series. Subsequent PRs handle additional cleanup
and the npm release plumbing.


Note

Low Risk
Path-only rename with no runtime or API changes; risk is limited to missed path references, and CI still targets @onkernel/cua-cli by workspace name.

Overview
Renames the CLI workspace directory from packages/cua-cli to packages/cli while keeping the npm package name @onkernel/cua-cli, the cua binary, and workspace script targets unchanged.

Build and workspace wiring now point at the new path: root package.json workspaces, tsconfig.json project references, package-lock.json workspace/link entries, and bin/cua (packages/cli/dist/cli.js).

Docs and agent skills were updated so trees, links, and architecture notes reference packages/cli (README workspace table, project layout, CLI README link, docs/architecture.md prose and mermaid paths, .agents/skills/update-docs/SKILL.md CLI runtime flow list). Historical plan docs and skills/cua-cli/ were left as-is per PR scope.

Reviewed by Cursor Bugbot for commit 66a25ed. Bugbot is set up for automated code reviews on this repo. Configure here.

Move the CLI workspace directory to packages/cli. The npm package name
(@onkernel/cua-cli), binary name (cua), and workspace identity are all
unchanged. Updates root package.json workspaces, tsconfig project
references, package-lock.json paths, bin/cua wrapper, README workspace
table and Mermaid diagram, docs/architecture.md prose and diagram, and
the update-docs skill's CLI runtime flow note. Historical plan documents
(docs/cua-cli-harness-migration.md, .cursor/plans/cua-ai-agent.md) keep
their prose as-is. Tests under packages/cli still pass (29 passed, 4
TUI fixture tests skipped without ptywright native build).

@rgarcia rgarcia left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full diff, checked out the branch, and independently re-verified. Approving — no blockers or majors.

Verified

  • Renames: all 41 package files are 100%-similarity renames; git log --follow traces history through the move.
  • Reference sweep: independent grep -rn for packages/cua-cli and cua-cli/ path forms across the repo (including hidden dirs .agents, .github, .cursor) finds only .cursor/plans/cua-ai-agent.md:5 — a historical plan document, correctly left as-is. Remaining cua-cli mentions are the unchanged package name (@onkernel/cua-cli), the binary identity, or the separate skills/cua-cli/ skill directory (which still exists at that path, so README lines 307/313/324 remain correct).
  • CI: read .github/workflows/ci.yml end-to-end — the cli-unit job and all others reference the workspace by name (npm test --workspace @onkernel/cua-cli), never by path; ptywright cache keys only hash packages/ptywright/**. No workflow changes needed, as claimed.
  • Lockfile: diff vs main is exactly the 3 mechanical path lines. npm ci (what CI runs) succeeds against the hand-edited lockfile. I confirmed the 411-line prune an unconstrained npm install produces is identical on main — it's orphaned transitive deps from the earlier package removals, so deferring that cleanup keeps this diff mechanical. Good call.
  • Build + tests: npm run build TS steps succeed; npm test --workspace @onkernel/cua-cli → 29 passed, 4 skipped (TUI fixtures need the ptywright native binding; the zig combine_archives failure reproduces identically on main in this environment — CI builds it with its own zig toolchain, unaffected by this rename).
  • bin/cua: the path fix is correct — the wrapper now resolves packages/cli/dist/cli.js. ./bin/cua --help exits 1, but I confirmed the identical ERR_MODULE_NOT_FOUND: ./cli-harness failure on main: dist/cli.js is emitted with extensionless relative ESM imports that plain node rejects (masked in tests because vitest resolves TS sources directly). Preexisting, not introduced here.
  • Judgment calls: leaving skills/cua-cli/ in place, keeping cua-cli-* tmpdir prefixes in tests (derived from the package name, not the path), and not touching the historical plan docs are all consistent with the rename-the-directory-only scope.

Findings

  1. minor (preexisting, for the series): dist/cli.js can't run under plain node due to extensionless relative ESM imports (./cli-harness, ./action/prompts, ...). Harmless to this PR and the wrapper is slated for deletion next, but the release PR will ship "bin": "./dist/cli.js" — an npm-installed cua would hit the same crash. Worth fixing (emit .js extensions or bundle the CLI) before publishing.
  2. nit: the PR body lists a README "Mermaid block" among the updated path references, but the README mermaid uses package-name nodes and was correctly untouched (the updated mermaid is in docs/architecture.md). Cosmetic description inaccuracy only.

@rgarcia
rgarcia marked this pull request as ready for review June 12, 2026 14:34
@rgarcia
rgarcia merged commit c720368 into main Jun 12, 2026
6 checks passed
@rgarcia
rgarcia deleted the hypeship/rename-cua-cli-to-cli branch June 12, 2026 14:34
@firetiger-agent

Copy link
Copy Markdown

Created a monitoring plan for this PR.

What this PR does: Internal repository reorganization — renames the CLI package directory from packages/cua-cli to packages/cli with no change to the published package name, binary name, or any user-facing behavior.

Intended effect: No production telemetry signal exists for this change. The cua CLI package name (@onkernel/cua-cli) and binary name (cua) are unchanged; the directory path is invisible to users after npm install. Confirmation comes from CI green and tsc -b succeeding — both verified in the PR.

Risks:

  • CI workflow breakci.yml references the workspace name @onkernel/cua-cli (unchanged), so no path filters needed updating; alert if CI fails on merge.
  • bin/cua wrapper pathbin/cua now points to packages/cli/dist/cli.js; alert if any developer symlink breaks after pulling (local dev only, not production).

No post-merge monitoring window required; this change carries no runtime blast radius.

View monitor

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