Skip to content

fix(release): package built-in computer-use files inside the TUI crate - #5890

Merged
Hmbown merged 1 commit into
mainfrom
fix/v0912-crate-bundle-20260905
Sep 5, 2026
Merged

fix(release): package built-in computer-use files inside the TUI crate#5890
Hmbown merged 1 commit into
mainfrom
fix/v0912-crate-bundle-20260905

Conversation

@Hmbown

@Hmbown Hmbown commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

Cargo could not publish codewhale-tui@0.9.12: its 16 embedded computer-use files lived outside the crate root and were missing from the package tarball. Move the existing bundle into the TUI crate and update its source, test, CI, documentation, and ignore paths. All 16 embedded runtime files remain byte-identical to the original release.

The founder approved publishing the repaired TUI crate from this commit while preserving the original v0.9.12 tag and release binaries. This PR brings that packaging correction onto main.

Testing

  • Original package verification failed with 16 missing-file errors before upload.
  • cargo package --locked -p codewhale-tui -p codewhale-app-server -p codewhale-cli: passes, including unpacked package builds.
  • Plugin npm test: 31 passed, 0 failed.
  • cargo fmt --all -- --check: passes.
  • Final tarball has all 16 original embedded files, verified byte-for-byte.
  • Full workspace tests and hosted CI were not run locally. Root npm test and npm run check:web scripts do not exist in this Rust repository.

No-Issue: immediate packaging defect reproduced and repaired during the approved v0.9.12 registry publication.


Note

Low Risk
Path and reference updates for an existing embedded bundle; no logic or security-surface changes beyond fixing crate publish layout.

Overview
Fixes codewhale-tui crate packaging so the 16 include_str!-embedded computer-use runtime files live under the crate at crates/tui/plugins/computer-use instead of repo-root plugins/computer-use, which cargo package omitted from the publish tarball.

builtin.rs now embeds from ../../plugins/computer-use/ (in-crate). CI runs plugin tests from the new path; .gitignore, README, manifest validation test, and Extensions UI source_reference strings are updated to match. No runtime behavior change—path and packaging alignment only; bundle content stays the same.

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

Cargo publication of v0.9.12 stopped at codewhale-tui after 18 crates:
its 16 include_str! paths reached outside the package root, so the
verified tarball could not compile. Move the existing plugin into the
TUI package and update every source, test, CI, documentation, and ignore
reference. Keep one canonical bundle, with all 16 embedded runtime files
byte-identical to the v0.9.12 release payload.

Validation:
- Original cargo publish --locked -p codewhale-tui: FAIL, 16 missing-file
  errors; Cargo refused the upload.
- Corrected cargo package --locked --allow-dirty -p codewhale-tui: PASS,
  including compilation of the unpacked library and binary.
- npm test in crates/tui/plugins/computer-use: 31 passed; 0 failed.
- Embedded payload comparison: 16/16 original files identical in source
  and in the verified Cargo tarball.
- cargo fmt --all -- --check: PASS.
- Coordination npm test && npm run check:web gate: unavailable here;
  this Rust repository defines neither root script (both report Missing
  script). No broad-suite or hosted-CI pass is claimed.

This is a local packaging repair based on dcd4c20. It does not move
the published v0.9.12 tag or alter the already-published release binaries.
Copilot AI lite review requested due to automatic review settings September 5, 2026 11:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T11:32:38.920263Z 05241f4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Sep 5, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_0ea83933-6d7c-4dd9-8a31-10eb3f72eba7)

@claude

claude Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Hmbown's task in 2m 8s —— View job


Claude's Review

  • Gather context (diff against parent commit dcd4c20, changed files)
  • Understand the request (code review of the crate-relocation fix)
  • Review correctness of the crate-relocation change
  • Review provider/model/route safety implications (N/A — no provider/model code touched)
  • Check for reuse/simplification issues
  • Check test coverage
  • Check security implications
  • Post final review

Summary

This is a clean, narrowly-scoped fix: it moves the computer-use plugin bundle from repo-root plugins/computer-use into crates/tui/plugins/computer-use so cargo package -p codewhale-tui actually includes the 16 files the crate embeds via include_str!. All file moves are pure renames (0/0 diffs), and every reference to the old path was updated in lockstep.

Correctness verification

  • crates/tui/src/plugins/builtin.rs:50include_str! macro path changed from "../../../../plugins/computer-use/" (4 levels up from crates/tui/src/plugins/ to repo root) to "../../plugins/computer-use/" (2 levels up to crates/tui/). I traced both path arithmetics manually against the file's actual location — both are correct for their respective plugin locations. ✅
  • crates/tui/src/plugins/manifest.rs:2305-2308 — test root path updated from CARGO_MANIFEST_DIR/../../plugins/computer-use to CARGO_MANIFEST_DIR/plugins/computer-use. Since CARGO_MANIFEST_DIR for this crate is crates/tui, the new path correctly resolves to crates/tui/plugins/computer-use. ✅
  • crates/tui/src/tui/views/extensions.rs:405source_reference string updated to the new path. Confirmed via the field's own doc comment (extensions.rs:124) that this is display provenance only, not a filesystem reference, so this is a safe, cosmetic update. ✅
  • .github/workflows/ci.yml:252 and .gitignore:164 — both updated consistently; I grepped the full repo for lingering plugins/computer-use references outside the renamed directory and found none. ✅
  • No Cargo.toml include/exclude list exists for codewhale-tui, so the crate uses Cargo's default packaging (git-tracked files under the package root), meaning the relocated bundle will now legitimately ship in the tarball — this directly addresses the root cause described in the PR body.

I was not able to execute cargo test/cargo package in this sandboxed environment (command execution required approval that wasn't available), so I verified the path arithmetic and cross-references statically rather than by rerunning the build. The PR description's reported local results (cargo package pass, 16/16 byte-identical files, npm test 31/31, cargo fmt --check pass) are consistent with what the diff shows.

Other checks

  • Provider/model/route safety: not applicable — no provider selection, model routing, or prefix-parsing code is touched.
  • Reuse/simplification: none needed; this is a minimal, mechanical relocation with no new abstractions.
  • Tests: no new test coverage needed — the existing bundled_computer_use_plugin_validates test and the plugin's own npm test suite (31 tests) already cover this bundle and were updated to the new path rather than duplicated.
  • Security: no change in trust boundaries; the doc comment in builtin.rs correctly reiterates that this is not a second install path and that discovery/trust/enablement are unchanged.

No issues found. This looks like a straightforward, correct packaging fix.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Confirmed runtime bugs include a destructive temp-dir deletion in hdc file reads and incorrect mouse-down behavior on Windows/Linux backends.

Pull request overview

This PR fixes a Cargo packaging issue by relocating the built-in computer-use plugin bundle under the codewhale-tui crate so its embedded/runtime files are included in the published crate tarball, and updates references + CI/tests accordingly.

Changes:

  • Move/update all references to the bundled plugin path to crates/tui/plugins/computer-use (TUI product catalog, docs, tests).
  • Add/relocate the plugin’s Node-based test suites, smoke scripts, and MCP server sources under the TUI crate.
  • Update repo ignore + CI workflow to run the plugin tests from the new location.
File summaries
File Description
crates/tui/src/tui/views/extensions.rs Updates plugin source reference path shown in the TUI UI/catalog.
crates/tui/src/plugins/manifest.rs Adjusts bundled-plugin validation test to new in-crate path.
crates/tui/src/plugins/builtin.rs Updates embedded file include paths and docs to in-crate bundle location.
crates/tui/plugins/computer-use/tests/server-protocol.test.mjs Adds end-to-end MCP stdio protocol tests against a real server process.
crates/tui/plugins/computer-use/tests/registry.test.mjs Adds registry persistence/validation tests for multi-computer support.
crates/tui/plugins/computer-use/tests/manifest.test.mjs Adds packaging/contract validation for plugin.json + mcp.json + bundle layout.
crates/tui/plugins/computer-use/tests/exec-transport.test.mjs Adds exec/transport safety tests (timeouts, ENOENT handling, path safety).
crates/tui/plugins/computer-use/tests/backends.test.mjs Adds backend coverage tests (harmony parsing, linux fail-closed probing, win32 surface).
crates/tui/plugins/computer-use/src/transport.mjs Implements transport/executor selection and ssh/hdc support for remote execution.
crates/tui/plugins/computer-use/src/tools.mjs Defines the single source of truth for tool schemas and name mappings.
crates/tui/plugins/computer-use/src/remote-runtime.mjs Provides a consistent exec facade for local vs. remote agent runtime.
crates/tui/plugins/computer-use/src/registry.mjs Implements the on-disk computer registry and active-computer switching semantics.
crates/tui/plugins/computer-use/src/exec.mjs Adds dependency-free process execution helper (spawn + timeout + capture).
crates/tui/plugins/computer-use/src/backends/win32.mjs Adds Windows backend implementation via PowerShell/.NET + user32 input.
crates/tui/plugins/computer-use/src/backends/linux.mjs Adds Linux backend implementation (X11/Wayland tool probing + actions).
crates/tui/plugins/computer-use/src/backends/harmonyos.mjs Adds HarmonyOS backend implementation via hdc + uitest + snapshots.
crates/tui/plugins/computer-use/src/backends/darwin.mjs Adds macOS backend implementation (JXA + screencapture + CoreGraphics).
crates/tui/plugins/computer-use/skills/recording/SKILL.md Adds recording-focused skill documentation for the plugin toolset.
crates/tui/plugins/computer-use/skills/computer-use/SKILL.md Adds core “computer-use” skill documentation and usage guidance.
crates/tui/plugins/computer-use/scripts/smoke.mjs Adds an end-to-end local smoke runner that produces receipts.
crates/tui/plugins/computer-use/README.md Updates bundle location documentation to the in-crate path.
crates/tui/plugins/computer-use/plugin.json Adds the plugin manifest describing the bundle + Codewhale extension metadata.
crates/tui/plugins/computer-use/package.json Adds Node test/smoke scripts and engine requirements for the plugin bundle.
crates/tui/plugins/computer-use/mcp/server.mjs Adds the MCP stdio server implementation (tool dispatch, state, switching).
crates/tui/plugins/computer-use/mcp.json Adds MCP server declaration (stdio node entrypoint) for consumers.
crates/tui/plugins/computer-use/commands/computer.md Adds the /computer command definition and behavioral contract.
crates/tui/plugins/computer-use/agent.mjs Adds the ssh remote agent with an explicit allow-list.
.gitignore Updates ignore path for plugin smoke receipts under the new location.
.github/workflows/ci.yml Updates CI to run plugin npm test from the new in-crate directory.
Review details
  • Files reviewed: 5/29 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codewhale-agent codewhale-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Codewhale review

PR moves the embedded computer-use plugin bundle from the repository-root plugins/computer-use directory into crates/tui/plugins/computer-use and updates the include_str! path, manifest validation test path, CI path, gitignore path, docs, and UI source reference. The core crate-relative path changes are correct and resolve at compile time.

Findings

  • [WARNING] README command block likely still points at the old plugin path (crates/tui/plugins/computer-use/README.md:96)
    The README prose path was updated to crates/tui/plugins/computer-use, but the adjacent bash usage block is outside the diff and appears unchanged. If it still contains cd plugins/computer-use, readers following the documentation from the new location will get an invalid path after the directory move.
  • [INFO] No full workspace automated test run for this path move
    The PR verifies cargo package --locked and the plugin npm test suite, but does not run the full workspace tests or hosted CI. The change is path-only and low risk, but a workspace test run would provide additional confidence.

Assessment

The core packaging fix is correct: the embedded files now live under the TUI crate root, and the updated include_str! and manifest test paths resolve correctly from crates/tui. CI, gitignore, and UI reference updates are consistent. Before merging, confirm the README command block and any other references to the old plugins/computer-use path were updated; otherwise this is low risk.


Advisory review by Codewhale (codewhale review --pr 5890 --post, head 05241f4095462bcd62fff84709f0a811bafae7d4). Line-specific findings are also posted as inline review comments; mechanical fixes arrive as committable suggestions you can apply from the Files tab. CODEOWNERS approval still governs merge.

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.

2 participants