PR 4: remove deprecated provider packages from workspace - #25
Conversation
Deletes packages/cua-{translator,openai,anthropic,gemini,tzafon,yutori}
now that cua-cli is fully migrated to CuaAgentHarness + pi 0.79. Updates
the root package.json workspaces, root tsconfig references, README
(workspace tree, mermaid, package table, How-it-works, project layout),
docs/architecture.md, and the update-docs authoring skill to match.
Registry-side `npm deprecate` of the published packages is an explicit
manual follow-up; this PR is a clean local removal so the repo only
ships cua-ai, cua-agent, cua-cli, and ptywright.
rgarcia
left a comment
There was a problem hiding this comment.
Reviewed against the PR 4 section of docs/cua-cli-harness-migration.md. Independently verified on a clean checkout of this branch: npm ci (against the committed lockfile), npm run build (zig on PATH for the ptywright native addon), and all three suites — cua-ai 88/88, cua-agent 28/28 (live excluded), cua-cli 33/33 with PTYWRIGHT_REQUIRED=1. All green.
Plan adherence is good: the six packages are deleted cleanly (pure deletions, no stray additions), root package.json workspaces and tsconfig.json references are pruned, the repo-wide grep for the deleted package names only hits the migration plan itself, no edits under packages/agent or packages/ai, and no registry action was taken. The "no CI workflow edits needed" call checks out — ci.yml and the release workflows only reference cua-ai/cua-agent/ptywright/cua-cli, and the TZAFON_API_KEY/YUTORI_API_KEY env vars belong to the frozen packages/ai integration and agent e2e jobs. The rewritten README/architecture.md/SKILL.md file references all resolve to real files (harness*.ts, print.ts, output/harness-jsonl.ts, tui/main.ts), and the named cua-ai exports (resolveCuaRuntimeSpec, requireCuaEnvApiKeyForModel, etc.) all exist.
Findings:
major — package-lock.json was regenerated from scratch, not pruned. The test plan ("no package-lock.json") confirms the lockfile was deleted and rebuilt. Beyond removing the deleted packages and their orphaned deps, this re-resolved ~112 unrelated transitive dependencies, none of which is mentioned in the PR description: runtime deps (openai 6.26.0→6.42.0 at the root, @anthropic-ai/sdk 0.90.0→0.91.1, @mistralai/mistralai 1.14.1→2.2.1 — a major), and dev toolchain (vitest 3.2.4→3.2.6, esbuild 0.27→0.28, rollup, vite, tsx, cac 6→7, tinyexec 0.3→1.2, get-tsconfig 4.14.0→5.0.0-beta.5 — a prerelease). packages/ai and packages/agent are frozen for this migration, but this silently changes the resolved dependency graph CI and the release workflows install for them. Everything passes with the new resolution (verified), so this isn't a correctness blocker — it's unreviewed dependency drift smuggled into a removal PR, and any regression in the live e2e jobs would be misattributed to it. Suggested fix: git checkout main -- package-lock.json && npm install so the lock diff is removal-only; land a dependency refresh as its own PR if wanted. (lockfileVersion is 3 on both sides, so regeneration wasn't format-motivated.)
minor — docs/DESIGN.md "Follow-up Direction" is now stale. Lines 67–74 still list "migrate @onkernel/cua-cli to consume @onkernel/cua-ai and @onkernel/cua-agent", "remove the old provider-specific packages", and "remove the old translator package" as expected follow-up work — all three are complete as of this PR. The plan's PR 4 scope includes stale references under docs/; this one was missed because it doesn't contain the literal package names. Rewrite or drop the section.
nit — root README "CLI reference" pointer still promises a "configuration schema, and provider routing rules" (line ~164). packages/cua-cli/README.md now says "Configuration is by environment variable. There is no config file." — the phrasing is left over from the TOML-config era. One-line wording fix.
nit — cli-harness.ts is missing from both rewritten module inventories. .agents/skills/update-docs/SKILL.md's "CLI runtime flow" list and docs/architecture.md's cua-cli responsibilities enumerate cli.ts, harness*.ts, print.ts, action/, output/harness-jsonl.ts, tui/ but skip packages/cua-cli/src/cli-harness.ts, which is the non-interactive dispatch layer sitting between them.
No blockers. Once the lockfile diff is reduced to removal-only (and ideally the two doc touch-ups), this is good to merge.
- restore package-lock.json from main and prune only the deleted workspace entries, so dependency versions for cua-ai and cua-agent stay untouched - rewrite docs/DESIGN.md "Follow-up Direction" to describe the shipped surface instead of completed work - reword README CLI reference pointer; the cua-cli README is now env-var driven - add cli-harness.ts to the CLI runtime flow inventory in docs/architecture.md and .agents/skills/update-docs/SKILL.md
|
Created a monitoring plan for this PR. What this PR does: Removes six deprecated legacy provider packages from the cua monorepo workspace, completing the migration to the Intended effect: No production telemetry signal exists for this change — it is a build-time workspace cleanup with no runtime behavior changes. Confirmation comes from CI: Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |
Summary
Fourth and final PR in the cua-cli → CuaAgentHarness migration. After PRs 1-3 moved cua-cli onto cua-agent + pi 0.79 and dropped every dependency on the legacy provider packages, this PR deletes the now-orphaned packages from the workspace.
packages/cua-translator,packages/cua-openai,packages/cua-anthropic,packages/cua-gemini,packages/cua-tzafon,packages/cua-yutoripackage.jsonworkspacesandtsconfig.jsonreferencesdocs/architecture.mdso the design invariants, layers, per-package responsibilities, and component-map mermaid match the cua-ai + cua-agent split.agents/skills/update-docs/SKILL.mdso source-of-truth checks point at the surviving packagesCI workflows already only reference cua-ai and cua-agent by package name, so no workflow edits were required.
TZAFON_API_KEY/YUTORI_API_KEYenv vars stay wired through CI: thetzafonandyutoriproviders live inside the frozenpackages/ai, which still tests them.Plan reference
PR 4 in
docs/cua-cli-harness-migration.md(lines 199-207). Out of scope (intentional, called out in the plan): registry-sidenpm deprecateof the published@onkernel/cua-*provider packages — that needs publish rights and is a manual follow-up.Test plan
Run from a clean checkout (no
node_modules, nopackage-lock.json):npm install— succeeds, no warnings about missing workspacesnpm run build— green (cua-ai, tsc -b, cua-agent, ptywright native)npm test --workspace @onkernel/cua-ai— 13 files, 88 tests passingnpm test --workspace @onkernel/cua-agent -- --exclude \"**/*.live.test.ts\"— 4 files, 28 tests passingnpm test --workspace @onkernel/cua-cli(withPTYWRIGHT_REQUIRED=1) — 7 files, 33 tests passing (including the 4 ptywright TUI scenarios)cua-translator|cua-openai|cua-anthropic|cua-gemini|cua-tzafon|cua-yutoriover the repo only matches the migration plan itselfNote
Low Risk
Docs-only and workspace cleanup after the CLI harness migration; no changes to runtime packages beyond removing dead code paths.
Overview
Removes the legacy monorepo packages (
cua-translator,cua-openai,cua-anthropic,cua-gemini,cua-tzafon,cua-yutori) from the workspace and lockfile, leaving@onkernel/cua-ai,@onkernel/cua-agent,@onkernel/cua-cli, andptywrightas the only shipped packages.README,
docs/architecture.md,docs/DESIGN.md, and.agents/skills/update-docs/SKILL.mdare rewritten so public docs describe the cua-ai / cua-agent split (CuaRuntimeSpec,buildCuaHarness,resolveCuaRuntimeSpec) instead of per-provider/pipackages andComputerTranslator. Deprecated provider READMEs and source trees are deleted with the packages.Reviewed by Cursor Bugbot for commit bdffee6. Bugbot is set up for automated code reviews on this repo. Configure here.