Skip to content

PR 4: remove deprecated provider packages from workspace - #25

Merged
rgarcia merged 2 commits into
mainfrom
hypeship/pr4-remove-deprecated-packages
Jun 12, 2026
Merged

PR 4: remove deprecated provider packages from workspace#25
rgarcia merged 2 commits into
mainfrom
hypeship/pr4-remove-deprecated-packages

Conversation

@rgarcia

@rgarcia rgarcia commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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.

  • delete packages/cua-translator, packages/cua-openai, packages/cua-anthropic, packages/cua-gemini, packages/cua-tzafon, packages/cua-yutori
  • drop their entries from root package.json workspaces and tsconfig.json references
  • rewrite the README workspace tree, mermaid diagram, package table, "How it works", and project layout to describe the cua-ai / cua-agent / cua-cli surface that actually ships
  • rewrite docs/architecture.md so the design invariants, layers, per-package responsibilities, and component-map mermaid match the cua-ai + cua-agent split
  • update .agents/skills/update-docs/SKILL.md so source-of-truth checks point at the surviving packages

CI workflows already only reference cua-ai and cua-agent by package name, so no workflow edits were required. TZAFON_API_KEY / YUTORI_API_KEY env vars stay wired through CI: the tzafon and yutori providers live inside the frozen packages/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-side npm deprecate of 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, no package-lock.json):

  • npm install — succeeds, no warnings about missing workspaces
  • npm run build — green (cua-ai, tsc -b, cua-agent, ptywright native)
  • npm test --workspace @onkernel/cua-ai — 13 files, 88 tests passing
  • npm test --workspace @onkernel/cua-agent -- --exclude \"**/*.live.test.ts\" — 4 files, 28 tests passing
  • npm test --workspace @onkernel/cua-cli (with PTYWRIGHT_REQUIRED=1) — 7 files, 33 tests passing (including the 4 ptywright TUI scenarios)
  • grep -r cua-translator|cua-openai|cua-anthropic|cua-gemini|cua-tzafon|cua-yutori over the repo only matches the migration plan itself

Note

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, and ptywright as the only shipped packages.

README, docs/architecture.md, docs/DESIGN.md, and .agents/skills/update-docs/SKILL.md are rewritten so public docs describe the cua-ai / cua-agent split (CuaRuntimeSpec, buildCuaHarness, resolveCuaRuntimeSpec) instead of per-provider /pi packages and ComputerTranslator. 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.

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 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 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
@rgarcia
rgarcia marked this pull request as ready for review June 12, 2026 06:23
@firetiger-agent

Copy link
Copy Markdown

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 cua-ai / cua-agent architecture. Docs and architecture diagrams are updated to reflect what actually ships.

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: npm install + npm run build + all 149 tests (cua-ai: 88, cua-agent: 28, cua-cli: 33) pass green, with no "missing workspace" warnings.

Risks:

  • Lockfile mismatch — if package-lock.json was not regenerated cleanly, npm ci fails in CI with a lockfile error; alert if any CI install step exits non-zero.
  • Surviving import of deleted paths — a build-time error if any test or script still imports @onkernel/cua-openai etc.; alert if CI build fails with MODULE_NOT_FOUND for a deleted package name.
  • npm registry consumers — downstream users of the published @onkernel/cua-* packages are unaffected by this monorepo change (registry-side deprecation is an intentional out-of-scope follow-up); no alert needed.

Status updates will be posted automatically on this PR as monitoring progresses.

View monitor

@rgarcia
rgarcia merged commit a1e89dd into main Jun 12, 2026
6 checks passed
@rgarcia
rgarcia deleted the hypeship/pr4-remove-deprecated-packages branch June 12, 2026 06:25
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