Collapse the packages into @onkernel/loop - #85
Open
rgarcia wants to merge 2 commits into
Open
Conversation
Merge @onkernel/cua-ai, @onkernel/cua-agent, and @onkernel/cua-pi-extension into one package. The tree follows the framework-neutral boundary rather than the old package boundary: src/core is the neutral core exported as ".", src/pi is the pi binding exported as "./pi", and src/pi-extension is registered through the package's own pi.extensions field. Rename Cua* to Loop*, or to a plain domain name where the concept is computer use rather than this product, and move tool identities from cua.*.v1 to kloop.*.v1. Model-facing tool names are unchanged. Drop the pi-ai re-export from the package root, replace the two release workflows with one, and update the docs and the release skill.
The native action probe still looked for its fixture under packages/ai, so a real xai probe failed from the repo root, and the docs skill still described the three-package layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three packages become one.
@onkernel/cua-ai,@onkernel/cua-agent, and@onkernel/cua-pi-extensionmerge into@onkernel/loop, arranged along the framework-neutral boundary rather than the old package boundary. No behavior changes: this is restructuring plus renaming.packages/ptywrightis untouched.Tree
Exports:
.→ the neutral core./pi→ the pi binding"pi": { "extensions": ["./src/pi-extension/index.ts"] }— pi reads the extension's TypeScript directly through jiti, sofilesshipssrcalongsidedistThe catalog compiler, tool menu, and tool manager live in
core/with type-level pi imports (Api,Model,Tool,AgentTool). Strict boundary enforcement — core importing nothing from pi — is a follow-up; this change adds no new runtime pi imports tocore/.Rename rules applied
Cua*→Loop*(CuaToolCatalog→LoopToolCatalog,CuaExecutionResources→LoopExecutionResources,compileCuaToolCatalog→compileLoopToolCatalog,CUA_*→LOOP_*).CuaAction→ComputerUseAction,CuaBrowserAction→BrowserAction,CuaComputerAction→ComputerAction,CuaNativeSurface→ComputerUseNativeSurface.cua→kloop,.v1suffix kept —cua.browser.snapshot.v1→kloop.browser.snapshot.v1. Model-facing tool names (browser_snapshot,browser_act, …) are unchanged. Transcripts recorded against an older build no longer resume; the package is pre-release and no migration is provided.packages/ai/src/cua.ts→packages/loop/src/core/tools.ts).LOOP_E2E_LIVEreplacesCUA_E2E_LIVE.Other changes
@earendil-works/pi-ai. Consumers compose with pi libraries directly; internal files importModel,Context, andApifrom pi../pistill re-exports@earendil-works/pi-agent-core, as@onkernel/cua-agentdid — dropping that is a behavior change and belongs with the auth follow-up.npm run typecheckno longer needs a prebuild, because the package's tsconfig maps its own name at source.release-cua-ai.ymlandrelease-cua-agent.ymlbecomerelease-loop.yml(tag prefixloop/v). The first publish under the new name is manual — npm binds a trusted publisher to a (repository, workflow filename) pair and a new name has none — so the workflow shape is in place but trusted-publisher config is deferred.docs/,README.md, the package README, and the repo skills are updated. The retired packages' unreleased changelog entries are folded into the merged changelog so nothing unshipped is lost.packages/loop/scripts/native-action-probe.tslooks for its fixture underpackages/loop/examples/; the old path no longer exists.Decision:
api-keys.tsstays in the exported surfaceIt stays, under
./pi(packages/loop/src/pi/api-keys.ts), and is still exported. It resolves credentials per provider for pi-resolved models, so it is pi-coupled rather than neutral. Six examples and the provider preflight consume it, and inheriting auth from pi is a deferred follow-up — removing the export now would break consumers twice for a surface that is about to change anyway.Verification
From a clean
rm -rf dist dist-tsc dist-publishedandnpm ci:No suite regressed. The three old unit runs covered 32 files (11 ai with 1 integration excluded, 18 agent with 2 live excluded, 6 extension) and the merged run covers the same 32;
it/testblock counts match exactly at 365.Also verified:
npm ciagainst the regenerated lockfile,npm pack --dry-runshipsdist/index.js,dist/pi/index.js, andsrc/pi-extension/*.ts, and the native action probe loads its fixture from both the repo root and the package directory (it now fails on provider auth, not a missing file).ptywright's native Zig build was not run locally; CI builds and tests it.Note
High Risk
Large breaking rename and package consolidation affects every import, publish tag, and CI path; mistaken export or tarball layout would break npm consumers and pi extension loading despite claimed behavior parity.
Overview
Merges
@onkernel/cua-ai,@onkernel/cua-agent, and@onkernel/cua-pi-extensioninto a single@onkernel/looppackage arranged bysrc/core(catalog + Kernel execution),src/pi(attach/models/providers), andsrc/pi-extension(pi session integration). Workspaces, lockfile, and root build/typecheck scripts now target onlypackages/loopplus dev-onlyptywright.Breaking consumer surface: imports move to
@onkernel/loopand@onkernel/loop/pi; product renames (compileLoopToolCatalog,loop.toolsets,LoopExecutionResources, etc.) and domain renames (ComputerUseAction); stable tool identity namespacecua.*→kloop.*(model-facing tool names unchanged). The package root no longer re-exports@earendil-works/pi-ai. Live e2e env isLOOP_E2E_LIVE; pi CLI docs use--browser-toolsandpi install npm:@onkernel/loop.Release & CI: per-package unit jobs and
release-cua-ai.yml/release-cua-agent.ymlare removed in favor of one loop unit job (build, test, pack, ESM smoke on.and./pi) andrelease-loop.ymlon tagsloop/v*. Docs, agent skills, and npm release notes describe the single-package flow; retired package trees are deleted from the repo.Reviewed by Cursor Bugbot for commit 986ea0f. Bugbot is set up for automated code reviews on this repo. Configure here.