Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

refactor(cua-driver): remove the Fleet adapters and the @trycua/fleet package (CUA-1836) (#5456)

Francesco Bonaccid3579a1881c7
diff --git a/.github/releases/README.md b/.github/releases/README.md
index 8e2bb835d1..51632a5111 100644
--- a/.github/releases/README.md
+++ b/.github/releases/README.md
@@ -77,8 +77,8 @@ and bump type. Cua Sandbox's draft is published by hand, which starts its PyPI
workflow; the others publish themselves.
Not on Release Please: the Docker images (`docker-*-v*`, still on
-**Legacy packages: Bump Version**, with no GitHub release pages), `@trycua/fleet`
-and `cua-fleet` (Fleets is shut down), the OS images (`linux-image-v*`,
+**Legacy packages: Bump Version**, with no GitHub release pages), `cua-fleet`
+(Fleets is shut down), the OS images (`linux-image-v*`,
`omarchy-image-v*` and the image pipelines' own date versions), and the
`cua-install-latest`/`cua-spaces-latest` rolling feeds.
diff --git a/.github/workflows/cd-ts-fleet.yml b/.github/workflows/cd-ts-fleet.yml
deleted file mode 100644
index be06ba14b7..0000000000
--- a/.github/workflows/cd-ts-fleet.yml
+++ /dev/null
@@ -1,88 +0,0 @@
-name: "CD: @trycua/fleet (npm)"
-
-on:
- push:
- tags:
- - "npm-fleet-v*"
- workflow_dispatch:
- inputs:
- version:
- description: "Version to publish (default: from package.json)"
- required: false
- default: ""
- workflow_call:
- inputs:
- version:
- description: "Version to publish (default: from package.json)"
- required: false
- type: string
- default: ""
-
-permissions:
- id-token: write
- contents: write
-
-env:
- # Cua programs and packages run here never send usage telemetry.
- CUA_TELEMETRY: "0"
- DO_NOT_TRACK: "1"
-
-jobs:
- prepare:
- runs-on: ubuntu-latest
- outputs:
- version: ${{ steps.get-version.outputs.version }}
- tag: ${{ steps.get-version.outputs.tag }}
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
-
- - name: Determine version
- id: get-version
- run: |
- # Check inputs.version first (works for workflow_call)
- if [ -n "${{ inputs.version }}" ]; then
- VERSION="${{ inputs.version }}"
- elif [ "${{ github.event_name }}" == "push" ]; then
- # Extract version from tag
- if [[ "${{ github.ref }}" =~ ^refs/tags/npm-fleet-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
- VERSION=${BASH_REMATCH[1]}
- else
- echo "ERROR: Invalid tag format for npm-fleet"
- exit 1
- fi
- elif [ -n "${{ github.event.inputs.version }}" ]; then
- VERSION="${{ github.event.inputs.version }}"
- else
- # Read from package.json
- VERSION=$(node -p "require('./libs/typescript/fleet/package.json').version")
- fi
-
- echo "Fleet version: $VERSION"
- echo "version=${VERSION}" >> $GITHUB_OUTPUT
- echo "tag=npm-fleet-v${VERSION}" >> $GITHUB_OUTPUT
-
- publish:
- needs: prepare
- uses: ./.github/workflows/ts-reusable-publish.yml
- with:
- package_name: "fleet"
- package_dir: "libs/typescript/fleet"
- package_manager: "pnpm"
- version: ${{ needs.prepare.outputs.version }}
- secrets:
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
-
- create-release:
- needs: [prepare, publish]
- uses: ./.github/workflows/release-github-reusable.yml
- with:
- tag_name: ${{ needs.prepare.outputs.tag }}
- release_name: "@trycua/fleet v${{ needs.prepare.outputs.version }}"
- module_path: "libs/typescript/fleet"
- body: |
- ## Installation
-
- ```bash
- npm install @trycua/fleet
- ```
diff --git a/.github/workflows/ci-check-docs.yml b/.github/workflows/ci-check-docs.yml
index d6cb78b859..2a00b84196 100644
--- a/.github/workflows/ci-check-docs.yml
+++ b/.github/workflows/ci-check-docs.yml
@@ -9,7 +9,6 @@ on:
- "libs/lume/src/**"
- "libs/python/cua-sandbox/**"
- "libs/cua/python/pyproject.toml"
- - "libs/typescript/fleet/package.json"
- "libs/cua-driver/hyprland-plugin/packaging/release/profiles/omarchy-stable-20260910.json"
- "docs/content/docs/cua-driver/reference/**"
- "docs/content/docs/lume/reference/**"
diff --git a/.github/workflows/ci-cua-driver-contract-clients.yml b/.github/workflows/ci-cua-driver-contract-clients.yml
index e4fee353ab..13db902472 100644
--- a/.github/workflows/ci-cua-driver-contract-clients.yml
+++ b/.github/workflows/ci-cua-driver-contract-clients.yml
@@ -379,7 +379,6 @@ jobs:
tar -tzf "/tmp/cua-driver-npm/trycua-cua-driver-$VERSION.tgz" > /tmp/cua-driver-npm/contents.txt
grep -F 'package/dist/embedded.js' /tmp/cua-driver-npm/contents.txt
grep -F 'package/dist/electron.js' /tmp/cua-driver-npm/contents.txt
- grep -F 'package/dist/fleet.js' /tmp/cua-driver-npm/contents.txt
tar -tzf "/tmp/cua-driver-npm/trycua-cua-driver-linux-x64-gnu-$VERSION.tgz" | \
grep -F 'package/libcua_driver_sdk.so'
tar -tzf "/tmp/cua-driver-npm/trycua-cua-driver-linux-x64-gnu-$VERSION.tgz" | \
@@ -391,7 +390,7 @@ jobs:
cp "$GITHUB_WORKSPACE/libs/cua-driver/compat-fixtures/apps/typescript/app.mjs" .
node app.mjs
node --input-type=module -e \
- "const sdk = await import('@trycua/cua-driver'); const embedded = await import('@trycua/cua-driver/embedded'); const fleet = await import('@trycua/cua-driver/fleet'); if (embedded.EmbeddedCuaDriverHost !== sdk.EmbeddedCuaDriverHost || typeof fleet.connectFleetDriver !== 'function') process.exit(1)"
+ "const sdk = await import('@trycua/cua-driver'); const embedded = await import('@trycua/cua-driver/embedded'); if (embedded.EmbeddedCuaDriverHost !== sdk.EmbeddedCuaDriverHost) process.exit(1)"
- name: Install Python agent SDK example dependencies
working-directory: libs/cua-driver/examples/agent-sdks
diff --git a/.github/workflows/claude-auto-fix.yml b/.github/workflows/claude-auto-fix.yml
index efdba0c32d..4e64b22f67 100644
--- a/.github/workflows/claude-auto-fix.yml
+++ b/.github/workflows/claude-auto-fix.yml
@@ -233,7 +233,7 @@ jobs:
REPOSITORY STRUCTURE:
This is a Python/TypeScript monorepo managed with uv (Python) and pnpm (TypeScript).
- libs/python/ - Python packages: agent, core, som, bench-ui
- - libs/typescript/ - TypeScript packages: core, fleet, agent, playground
+ - libs/typescript/ - TypeScript packages: core, agent, playground
- Python requires: >=3.12,<3.14
- Package manager: uv (Python), pnpm@10 (TypeScript)
- Build backend: pdm-backend (Python)
diff --git a/.github/workflows/release-bump-version.yml b/.github/workflows/release-bump-version.yml
index abd6bf2048..6401a14549 100644
--- a/.github/workflows/release-bump-version.yml
+++ b/.github/workflows/release-bump-version.yml
@@ -8,7 +8,6 @@ on:
required: true
type: choice
options:
- - npm/fleet
- docker/cuabot
- docker/kasm
- docker/xfce-cua
@@ -63,10 +62,6 @@ jobs:
id: package
run: |
case "${{ inputs.service }}" in
- "npm/fleet")
- echo "directory=libs/typescript/fleet" >> $GITHUB_OUTPUT
- echo "type=npm" >> $GITHUB_OUTPUT
- ;;
"docker/cuabot")
echo "directory=libs/cuabot" >> $GITHUB_OUTPUT
echo "type=docker" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/release-on-merge.yml b/.github/workflows/release-on-merge.yml
index 5a659bd176..0cb4054484 100644
--- a/.github/workflows/release-on-merge.yml
+++ b/.github/workflows/release-on-merge.yml
@@ -86,7 +86,6 @@ jobs:
# Map paths to publishable services
declare -A PATH_TO_SERVICE=(
- ["libs/typescript/fleet/"]="npm/fleet"
["libs/xfce-cua/"]="docker/xfce-cua"
["libs/xfce/"]="docker/xfce"
["libs/kasm/"]="docker/kasm"
diff --git a/.github/workflows/ts-reusable-build.yml b/.github/workflows/ts-reusable-build.yml
index c9d56cfa26..82b5f35628 100644
--- a/.github/workflows/ts-reusable-build.yml
+++ b/.github/workflows/ts-reusable-build.yml
@@ -8,7 +8,7 @@ on:
required: true
type: string
package_dir:
- description: "Directory containing the package relative to workspace root (e.g., libs/typescript/fleet)"
+ description: "Directory containing the package relative to workspace root (e.g., libs/typescript/core)"
required: true
type: string
package_manager:
diff --git a/.github/workflows/ts-reusable-publish.yml b/.github/workflows/ts-reusable-publish.yml
index a7fc55aabe..12e2f94cf7 100644
--- a/.github/workflows/ts-reusable-publish.yml
+++ b/.github/workflows/ts-reusable-publish.yml
@@ -8,7 +8,7 @@ on:
required: true
type: string
package_dir:
- description: "Directory containing the package relative to workspace root (e.g., libs/typescript/fleet)"
+ description: "Directory containing the package relative to workspace root (e.g., libs/typescript/core)"
required: true
type: string
package_manager:
diff --git a/LICENSING.md b/LICENSING.md
index 96ea0cc4ae..63c3d3a738 100644
--- a/LICENSING.md
+++ b/LICENSING.md
@@ -65,7 +65,6 @@ notices declare.
| [`libs/python/cua-sandbox/LICENSE`](libs/python/cua-sandbox/LICENSE) | MIT | Package; `THIRD_PARTY_NOTICES.md` beside it lists derived code |
| [`libs/python/som/LICENSE`](libs/python/som/LICENSE) | AGPL-3.0-or-later | Package; `-or-later` per `pyproject.toml` |
| [`libs/typescript/core/LICENSE`](libs/typescript/core/LICENSE) | MIT | Package |
-| [`libs/typescript/fleet/LICENSE`](libs/typescript/fleet/LICENSE) | MIT | Package |
| [`libs/cua-driver/rust/crates/cua-perception/tests/quality-corpus/LICENSE`](libs/cua-driver/rust/crates/cua-perception/tests/quality-corpus/LICENSE) | MIT | Test corpus; Cua-authored synthetic data (see its `PROVENANCE.md`) |
| [`libs/cua-driver/rust/crates/cua-perception/models/licenses/AGPL-3.0-only.txt`](libs/cua-driver/rust/crates/cua-perception/models/licenses/AGPL-3.0-only.txt) | AGPL-3.0-only | Third-party model licence text; see [`THIRD_PARTY_NOTICES.md`](libs/cua-driver/rust/crates/cua-perception/models/THIRD_PARTY_NOTICES.md) |
| [`libs/cua-driver/rust/crates/cua-perception/models/licenses/Apache-2.0.txt`](libs/cua-driver/rust/crates/cua-perception/models/licenses/Apache-2.0.txt) | Apache-2.0 | Third-party model licence text; see [`THIRD_PARTY_NOTICES.md`](libs/cua-driver/rust/crates/cua-perception/models/THIRD_PARTY_NOTICES.md) |
diff --git a/libs/cua-driver/docs/mcp-candidate-qualification.md b/libs/cua-driver/docs/mcp-candidate-qualification.md
index 3ac8a3aa2b..16ec310bfa 100644
--- a/libs/cua-driver/docs/mcp-candidate-qualification.md
+++ b/libs/cua-driver/docs/mcp-candidate-qualification.md
@@ -4,8 +4,8 @@ The `CI: Driver MCP candidate` workflow builds the exact pull-request head
on hosted Linux and Windows runners. It runs the envelope receiver and service
tests, then uploads unsigned development binaries with their source SHA,
toolchain, build profile, version, and SHA256 hashes. It has read-only repository
-permissions and no Fleet credentials. It does not publish a release, install a
-product, change an image, or connect to a Fleet computer.
+permissions and no cloud credentials. It does not publish a release, install a
+product, change an image, or connect to a guest computer.
These artifacts support separately authorized disposable-guest tests. Check the
workflow repository, source SHA, successful jobs, and every binary hash before
@@ -14,10 +14,10 @@ source build can report the same package version as a released binary.
## Live test gate
-For each selected Linux and Windows Fleet image:
+For each selected Linux and Windows guest image:
1. Record the immutable image reference and installed Driver, cua-spacesd,
- and MCP-wrapper versions. Use an owned disposable claim and namespace with
+ and MCP-wrapper versions. Use an owned disposable guest with
explicit resource limits and verified cleanup ownership.
2. Stage the exact candidate separately. Preserve the guest cua-spacesd. Start Driver
in the guest's interactive desktop session through its existing socket or
@@ -32,7 +32,7 @@ For each selected Linux and Windows Fleet image:
5. Verify independent sessions, cancellation without claiming rollback, stale
session rejection after replacement, access rejection, and continued
cua-spacesd functionality. Verify receiver and MCP-session cleanup
- independently from Fleet resource cleanup.
+ independently from guest resource cleanup.
6. Delete only the task-owned resources and confirm their absence. Preserve
failure and cleanup evidence, including any incomplete result.
diff --git a/libs/cua-driver/docs/mcp-envelope-carrier.md b/libs/cua-driver/docs/mcp-envelope-carrier.md
index 5758b5a0fe..9a3f5cb671 100644
--- a/libs/cua-driver/docs/mcp-envelope-carrier.md
+++ b/libs/cua-driver/docs/mcp-envelope-carrier.md
@@ -1,7 +1,7 @@
# Typed Driver envelopes over MCP
This opt-in candidate implements the [accepted RFC 2512 transport addendum](../../../rfcs/2512-mcp-envelope-carrier.md).
-It is not a released SDK feature or a qualification of an existing Fleet image.
+It is not a released SDK feature or a qualification of an existing guest image.
The extension carries the canonical Driver envelopes through an existing MCP
transport. It does not replace cua-spacesd, add agent tools, or open a port.
@@ -81,8 +81,8 @@ EOF, output failure, or task cancellation invalidates owned receivers before
aborting transport work. Closing a proxy stream does not shut down a shared
daemon. Direct stdio still shuts down its owned runtime. Interrupted native
effects can outlive the request: cancellation is not rollback, and unknown
-completion remains unknown. Closing the MCP HTTP session is not Fleet claim or
-pool cleanup.
+completion remains unknown. Closing the MCP HTTP session is not guest resource
+cleanup.
## Verification and release gate
diff --git a/libs/cua-driver/docs/private-envelope-http.md b/libs/cua-driver/docs/private-envelope-http.md
index 66adde9ead..88df4d4e67 100644
--- a/libs/cua-driver/docs/private-envelope-http.md
+++ b/libs/cua-driver/docs/private-envelope-http.md
@@ -5,9 +5,9 @@ disabled unless the trusted launcher sets `CUA_DRIVER_ENVELOPE_HTTP_PORT` to a
nonzero port. It binds only to `127.0.0.1` and fails startup if binding fails.
No non-loopback binding option is provided.
-This is an implementation contract, not a released Fleet setup guide. A later
-image/service change must connect the loopback endpoint to Fleet's existing
-authorized private named-service route. Do not expose this endpoint directly:
+This is an implementation contract, not a released setup guide. A later
+image/service change must connect the loopback endpoint to an existing
+authorized private service route. Do not expose this endpoint directly:
it does not authenticate callers. IDs and generations are lifecycle markers,
not credentials. The carrier introduces no bearer token or pairing scheme.
@@ -49,7 +49,7 @@ The SDK treats compatibility-call and trusted-session manifests separately;
this carrier neither inherits the former nor exposes the latter. This is a
carrier limitation, not a change to the SDK's per-session manifest contract.
Managed and user policies remain binding.
-This option does not authorize public exposure, alter Fleet authorization,
+This option does not authorize public exposure, alter service authorization,
or change existing cua-spacesd sessions.
`capabilities` contains `minimum_envelope_version`, `maximum_envelope_version`,
@@ -71,7 +71,7 @@ returned canonical Driver root already owns one bound session.
Close is idempotent and retains the closed request ledger until idle removal.
Idle reaping skips active exchanges. Shutdown cancels the listener and its
connection tasks and closes owned sessions. It does not shut down the shared
-Driver runtime or cua-spacesd, release a Fleet claim, or delete a pool.
+Driver runtime or cua-spacesd, or release the guest it runs in.
## Verification boundary
@@ -83,6 +83,6 @@ exchange load, and oversized responses. Run them from `libs/cua-driver/rust`:
cargo test -p cua-driver --bin cua-driver driver_service_http --locked
```
-These tests do not establish guest network isolation, Fleet authorization,
+These tests do not establish guest network isolation, service authorization,
image packaging, real desktop effects, or compatibility with a released Python
client. Those remain explicit integration and qualification gates.
diff --git a/libs/cua-driver/docs/sdk-rust-source-of-truth-and-uniffi-evaluation-plan.md b/libs/cua-driver/docs/sdk-rust-source-of-truth-and-uniffi-evaluation-plan.md
index 19c71617b6..d868933b12 100644
--- a/libs/cua-driver/docs/sdk-rust-source-of-truth-and-uniffi-evaluation-plan.md
+++ b/libs/cua-driver/docs/sdk-rust-source-of-truth-and-uniffi-evaluation-plan.md
@@ -6,6 +6,10 @@ Applies to: PR #2341 and follow-up SDK/runtime work
Primary objective: eliminate manual contract/runtime bookkeeping before publishing the Python and TypeScript SDKs
+> Note (18 Oct 2026): Cua Cloud (Fleets) ended on 18 Oct 2026 and its source
+> was removed from this repository. The Fleet comparisons below are historical
+> evidence and refer to source that now exists only in git history.
+
Decision rationale: [Cua Driver integration surfaces: MCP/CLI and SDK bindings](why-cua-driver-uses-mcp-instead-of-uniffi.md)
> **Final decision update (2026-07-21):** the evaluation below records the
diff --git a/libs/cua-driver/docs/shared-fleet-mcp-client.md b/libs/cua-driver/docs/shared-fleet-mcp-client.md
deleted file mode 100644
index 74086126c7..0000000000
--- a/libs/cua-driver/docs/shared-fleet-mcp-client.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# Typed Driver through an existing Fleet connection
-
-This candidate shares the typed MCP client in Rust. UniFFI exposes the same
-Driver contract to Python and TypeScript. The language adapters forward HTTP
-bytes through an existing authenticated Fleet client; they do not implement MCP.
-
-The examples require candidate bindings and their matching native library. They
-are not available in Driver 0.26.1. Do not install that release and expect these
-entry points to exist. Package release and image qualification are separate
-from this implementation.
-
-## Requirements and ownership
-
-- Keep the authenticated Fleet client and claim alive until Driver closes.
-- Select a service advertised by the claimed sandbox, normally `mcp`.
-- The guest must advertise `ai.cua.driver.envelopes` v1 on MCP protocol
- `2025-06-18`. An ordinary MCP tools endpoint is insufficient.
-- The guest's trusted launcher owns permissions. Connecting does not elevate
- permissions or promise identical capabilities on all operating systems.
-- The typed TypeScript SDK requires Node. This does not add a browser-native
- Driver SDK or change Fleet's browser entry point.
-
-The application owns claim release and pool/template deletion. Closing Driver
-closes only its receiver and MCP session, not the computer or shared daemon.
-Always save needed output before deleting capacity. Cancellation does not undo
-desktop actions; a lost response can leave completion unknown.
-
-## TypeScript: Fleet plus Driver
-
-There is no TypeScript Sandbox SDK. Given an authenticated Fleet `client` and
-an application-owned `claim`, use the optional Driver entry point:
-
-```typescript
-import { connectFleetDriver } from '@trycua/cua-driver/fleet';
-
-try {
- const sandbox = await client.waitClaim(claim);
- const connection = await connectFleetDriver({
- client,
- sandbox,
- service: 'mcp',
- });
- try {
- const result = await connection.driver.getScreenSize({ session: undefined });
- console.log(result.text);
- } finally {
- await connection.close();
- }
-} finally {
- await client.deleteClaim(claim);
-}
-```
-
-`connection.driver` is the canonical `CuaDriverLike`, not a list of MCP tool
-wrappers. `connection.sessionName` provides the host-bound public label for
-typed inputs that require a session. It is not a credential or permission grant.
-An optional `signal` requests connection teardown; await `close()` to observe
-its result before releasing the Fleet claim. No reconnect or action retry is
-performed after cancellation, replacement, or an uncertain response.
-
-## Python: direct Fleet use
-
-The optional module imports Fleet only when constructing the adapter. Given an
-authenticated Python Fleet client and an application-owned claim:
-
-```python
-from cua_driver import GetScreenSizeInput
-from cua_driver.fleet import open_fleet_mcp_driver_channel
-
-try:
- sandbox = await client.wait_claim(claim)
- channel = open_fleet_mcp_driver_channel(client, sandbox, service="mcp")
- try:
- await channel.open()
- driver = channel.driver()
- result = await driver.get_screen_size(GetScreenSizeInput(session=None))
- print(result.text)
- finally:
- await channel.close()
-finally:
- await client.delete_claim(claim)
-```
-
-Constructing the channel before awaiting `open()` lets the owner close it even
-if initialization is interrupted. The shared Rust implementation tracks late
-initialization and cleanup. If cleanup cannot be confirmed within its bounds,
-the connection reports that uncertainty rather than claiming guest deletion.
-
-## Python Sandbox convenience
-
-The separately staged Sandbox migration preserves its existing API:
-
-```python
-async with pool.claim(service="server") as sb:
- await sb.shell.run("uname -a") # Served by cua-spacesd.
- async with sb.driver.connect(service="mcp", transport="mcp") as driver:
- result = await driver.get_screen_size(GetScreenSizeInput(session=None))
-```
-
-Sandbox closes its Driver connections before disconnecting the Fleet transport.
-Its direct-envelope path and existing spacesd-backed interfaces are unchanged.
-The migration must not ship until a Driver release containing the shared client
-is available and Sandbox's optional dependency and lockfile select that release.
-
-## Validation scope
-
-Synthetic service fixtures test Rust protocol handling and both generated
-bindings without operating a desktop. They prove negotiation, typed calls,
-session isolation, cancellation, malformed responses, and owned cleanup. They
-do not qualify a Fleet image or replace Linux/Windows guest tests at the final
-candidate revision. Existing published images and production routing are not
-modified by this client.
diff --git a/libs/cua-driver/docs/typed-guest-envelope.md b/libs/cua-driver/docs/typed-guest-envelope.md
index 0861443669..b0f391bc50 100644
--- a/libs/cua-driver/docs/typed-guest-envelope.md
+++ b/libs/cua-driver/docs/typed-guest-envelope.md
@@ -2,7 +2,7 @@
This is the receiver foundation for the narrow slice accepted in
[RFC #2512](https://github.com/trycua/cua/issues/2512#issuecomment-5579029576).
-It is not a released guest endpoint or a Fleet connection recipe.
+It is not a released guest endpoint or a connection recipe.
`DriverEnvelopeReceiver` dispatches the existing version-1 Driver envelopes
through a canonical `CuaDriverSession`. A trusted guest host creates the session
@@ -25,7 +25,7 @@ The receiver opens no listener and verifies no credentials. A carrier must:
- Never automatically replay actions or silently reconnect to another guest.
The following carrier/binding changes must supply these properties before any
-Fleet or local-guest capability is advertised. An existing MCP endpoint does
+remote or local-guest capability is advertised. An existing MCP endpoint does
not implement the typed envelope carrier.
## First-slice operations
@@ -62,7 +62,7 @@ a native effect may outlive a dropped future. A lost exchange future also
closes the session. Cancellation cannot promise to undo input already delivered.
Closing a receiver is idempotent. It closes only its session, not the shared
-Driver runtime, cua-spacesd, Fleet claim, pool, or local VM. Existing
+Driver runtime, cua-spacesd, remote guest, or local VM. Existing
cua-spacesd and Sandbox APIs are unchanged.
## Verification
@@ -77,5 +77,5 @@ cargo test -p cua-driver-sdk --locked remote_receiver::tests -- --test-threads=1
Fake-executor tests observe dispatch counts, exact results, cancellation races,
generation mismatches, replay refusal, ledger capacity, and isolated cleanup.
They do not prove HTTP authorization, real guest desktop control, cross-platform
-delivery, image packaging, or Fleet cleanup. Those require the subsequent
+delivery, image packaging, or guest cleanup. Those require the subsequent
carrier and exact-candidate guest qualification steps.
diff --git a/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.md b/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.md
index 1ada52c262..b26e46830a 100644
--- a/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.md
+++ b/libs/cua-driver/docs/why-cua-driver-uses-mcp-instead-of-uniffi.md
@@ -4,6 +4,11 @@ Status: superseded in part by RFC 2447
Decision date: 2026-07-21
+> Note (18 Oct 2026): Cua Cloud (Fleets) ended on 18 Oct 2026 and its source
+> was removed from this repository. The Fleet references below are the
+> historical evidence for this decision; the Fleet source paths and commits
+> they cite resolve only in git history.
+
> This document preserves the rationale for the 0.11.0 daemon-client SDK.
> [RFC 2447](../../../rfcs/2447-cua-driver-native-core-and-mcp-adapter.md)
> keeps MCP as the agent boundary but replaces the imported SDK topology with a
@@ -161,19 +166,19 @@ application
```
Fleet's Rust SDK contains behavior that would otherwise be repeated in every
-language. For example, [`client.rs`](../../fleet/sdk/src/client.rs) owns client
-configuration and namespace lifecycle locks. [`transport.rs`](../../fleet/sdk/src/transport.rs)
+language. For example, `client.rs` owns client
+configuration and namespace lifecycle locks. `transport.rs`
owns OAuth token caching and refresh. The pool, claim, and service modules own
polling, request construction, validation, and lifecycle rules.
-The host language supplies an [`HttpClient`](../../fleet/sdk/src/transport.rs)
+The host language supplies an `HttpClient`
callback. This lets Python, Swift, Kotlin, Ruby, or TypeScript use a suitable
HTTP implementation while Rust keeps the product behavior. UniFFI therefore
replaces substantial duplicated implementations, and the shared library is the
component the language API is meant to call.
Fleet also has a mature checked-in generation path for Python, Kotlin, Swift,
-and Ruby. Its [`generate-sdk-bindings.sh`](../../fleet/scripts/generate-sdk-bindings.sh)
+and Ruby. Its `generate-sdk-bindings.sh`
script pins UniFFI through the Rust workspace, generates into temporary roots,
tracks owned files, and checks drift.
diff --git a/libs/cua-driver/hyprland-plugin/README.md b/libs/cua-driver/hyprland-plugin/README.md
index 74d25736a6..425519a7bf 100644
--- a/libs/cua-driver/hyprland-plugin/README.md
+++ b/libs/cua-driver/hyprland-plugin/README.md
@@ -273,7 +273,7 @@ protocol; it does not replace the driver's tool policy or process lifecycle.
## Acceptance path
-The Fleet release path requires focused protocol and security tests, the
+The release path requires focused protocol and security tests, the
repository's complete native Linux harness, bounded qualified-app compatibility
and isolation evidence, review and merge, compatible release artifacts, and
image packaging and lifecycle validation. Source-built proof does not establish
@@ -281,9 +281,9 @@ that the released package or final image works.
Physical-host support requires a separate acceptance run on the exact
Hyprland/plugin pair, with focus, z-order, cursor, input-isolation, and
-fixture-state evidence. Fleet evidence does not establish physical-host parity;
+fixture-state evidence. VM evidence does not establish physical-host parity;
that separate support claim is not a prerequisite for publishing a validated
-Fleet image.
+VM image.
The exact initial host acceptance baseline is:
diff --git a/libs/cua-driver/hyprland-plugin/docs/desktop-state-validation.md b/libs/cua-driver/hyprland-plugin/docs/desktop-state-validation.md
index cb17f3fcc3..550ecfecd8 100644
--- a/libs/cua-driver/hyprland-plugin/docs/desktop-state-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/desktop-state-validation.md
@@ -1,5 +1,8 @@
# Desktop-state safety validation
+> Note (18 Oct 2026): Cua Cloud (Fleets) ended on 18 Oct 2026. This is a dated
+> record of validation run on it; the Fleet references below are historical.
+
On 2026-09-05, five matched fault-only controls and five Driver MCP background
drag episodes passed in a disposable Omarchy Cua Fleet VM. Moving, resizing,
locking, turning the display off, or destroying the target cancelled the
diff --git a/libs/cua-driver/hyprland-plugin/docs/input-validation.md b/libs/cua-driver/hyprland-plugin/docs/input-validation.md
index 705cf2c2d4..8b37539f63 100644
--- a/libs/cua-driver/hyprland-plugin/docs/input-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/input-validation.md
@@ -1,5 +1,8 @@
# Isolated-input VM validation
+> Note (18 Oct 2026): Cua Cloud (Fleets) ended on 18 Oct 2026. This is a dated
+> record of validation run on it; the Fleet references below are historical.
+
This is the historical single-seat record. The later
[concurrent real-app validation](realapp-validation.md) covers two independent
lanes, Calc and Inkscape, moving-primary measurement, Cancel, and Stop on a
diff --git a/libs/cua-driver/hyprland-plugin/docs/lifecycle-validation.md b/libs/cua-driver/hyprland-plugin/docs/lifecycle-validation.md
index cc52f534d4..e046e32bb4 100644
--- a/libs/cua-driver/hyprland-plugin/docs/lifecycle-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/lifecycle-validation.md
@@ -1,5 +1,8 @@
# Held-input lifecycle validation
+> Note (18 Oct 2026): Cua Cloud (Fleets) ended on 18 Oct 2026. This is a dated
+> record of validation run on it; the Fleet references below are historical.
+
On 2026-09-05, the experimental Hyprland input path released a held background
button after operator Stop, agent disconnect, lease expiry, and plugin unload.
The recorded runs observed release in 18-62 ms, with the expiry interval measured
diff --git a/libs/cua-driver/hyprland-plugin/docs/production-proof.md b/libs/cua-driver/hyprland-plugin/docs/production-proof.md
index 1a83b93eaa..422ef9fef8 100644
--- a/libs/cua-driver/hyprland-plugin/docs/production-proof.md
+++ b/libs/cua-driver/hyprland-plugin/docs/production-proof.md
@@ -39,7 +39,7 @@ assertions and evidence requirements intact, and preserve failed results.
This addendum records a strategy change, not completed native certification.
Exact package versions, operation limits, existing Driver policy, and the
-separate release/package/Fleet requirements remain in force.
+separate release/package/image requirements remain in force.
## Bounded real-app smoke
diff --git a/libs/cua-driver/hyprland-plugin/docs/realapp-validation.md b/libs/cua-driver/hyprland-plugin/docs/realapp-validation.md
index ea87afdd58..2907d9f692 100644
--- a/libs/cua-driver/hyprland-plugin/docs/realapp-validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/realapp-validation.md
@@ -1,5 +1,8 @@
# Concurrent real-app input validation
+> Note (18 Oct 2026): Cua Cloud (Fleets) ended on 18 Oct 2026. This is a dated
+> record of validation run on it; the Fleet references below are historical.
+
On 2026-09-05, two independent Cua Driver MCP connections edited LibreOffice
Calc and Inkscape in an Omarchy Fleet VM while a foreground fixture retained
the primary pointer grab. Concurrent drags overlapped for 1.49-1.77 seconds.
diff --git a/libs/cua-driver/hyprland-plugin/docs/validation.md b/libs/cua-driver/hyprland-plugin/docs/validation.md
index 718abf25f8..caea66b80a 100644
--- a/libs/cua-driver/hyprland-plugin/docs/validation.md
+++ b/libs/cua-driver/hyprland-plugin/docs/validation.md
@@ -1,5 +1,8 @@
# Discovery foundation validation
+> Note (18 Oct 2026): Cua Cloud (Fleets) ended on 18 Oct 2026. This is a dated
+> record of validation run on it; the Fleet references below are historical.
+
The discovery-only plugin passed a native build and lifecycle checks on Cua
Cloud Fleet on September 4, 2026. These results support review of the foundation;
the full promotion gates in [the test plan](../tests/README.md) remain open.
diff --git a/libs/cua-driver/hyprland-plugin/packaging/arch/README.md b/libs/cua-driver/hyprland-plugin/packaging/arch/README.md
index f8b10d95aa..01981ef89d 100644
--- a/libs/cua-driver/hyprland-plugin/packaging/arch/README.md
+++ b/libs/cua-driver/hyprland-plugin/packaging/arch/README.md
@@ -41,17 +41,17 @@ loading it again. An exact dependency conflict is intentional protection
against carrying a stale compositor ABI module forward.
This is deliberately a monorepo-local development recipe, not an AUR or clean
-chroot source package. Fleet must make the recorded candidate source available
+chroot source package. The image build must make the recorded candidate source available
at `CUA_SOURCE_ROOT` and record its Git SHA. Build with the same compiler family
and version used for Hyprland; matching the package, headers, full Hyprland ABI
fingerprint, and C++26 language mode does not make different C++ toolchains
interchangeable.
-Fleet images should consume this same monorepo recipe or a derived reviewed
+VM images should consume this same monorepo recipe or a derived reviewed
recipe, pin the image's exact Hyprland package, and keep the plugin unloaded by
default. The initial acceptance image must match Omarchy `4.0.2-1`, Hyprland
`0.56.2`, xdg-desktop-portal-hyprland `1.4.1`, Cua Driver `0.23.2`, and a
UWSM/SDDM session. This packages a discovery-only plugin; isolated background
input is not available in stable `0.23.2` or nightly. See
-`../../tests/README.md` for the required Fleet and subsequent bare-metal
+`../../tests/README.md` for the required VM and subsequent bare-metal
promotion evidence.
diff --git a/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md b/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md
index 56d8cbded9..e10cbc529b 100644
--- a/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md
+++ b/libs/cua-driver/hyprland-plugin/protocol/host-authority-boundary.md
@@ -94,6 +94,6 @@ provenance. Test both an instrumented candidate and an uninstrumented package.
Keep unproven and refused cells explicit.
Review and merge the implementation chain, then publish and verify Driver and
-compatible plugin artifacts before building the final Fleet image. Source
-candidates can be tested in disposable Fleet instances before release; that is
+compatible plugin artifacts before building the final VM image. Source
+candidates can be tested in disposable VM instances before release; that is
pre-release validation, not a final supported image.
diff --git a/libs/cua-driver/hyprland-plugin/tests/README.md b/libs/cua-driver/hyprland-plugin/tests/README.md
index 12b3f874da..2f22e1cf4a 100644
--- a/libs/cua-driver/hyprland-plugin/tests/README.md
+++ b/libs/cua-driver/hyprland-plugin/tests/README.md
@@ -107,7 +107,7 @@ logs. The JSON result distinguishes this check from application delivery and
physical input isolation. It does not certify package installation, direct DRM
startup, arbitrary ABI combinations, or the complete driver desktop matrix.
Hosted CI tests the runner's cleanup/error paths with mocks; native results
-require running it in the Fleet guest or another declared Wayland environment.
+require running it in the VM guest or another declared Wayland environment.
## Held-input lifecycle faults
@@ -131,7 +131,7 @@ brief desktop-transition revocation, or real multi-process lane behavior.
The [native reliability record](../docs/lifecycle-validation.md) identifies the tested
source, measured results, recordings, setup failures, and remaining limits.
-Run `input_lifecycle_live.py` only in a disposable Fleet guest with the
+Run `input_lifecycle_live.py` only in a disposable VM guest with the
experimental build explicitly loaded, a source-built Driver service started
with `--permission-mode unrestricted --dangerously-bypass-approvals`, and two
native GTK fixtures. The normal build does not support this test.
@@ -267,7 +267,7 @@ contains five matched fault/control pairs, artifact identities, measured
cancellation and cleanup times, retained failures, and limits.
`desktop_state_live.py` is a focused experimental safety test, not the canonical
-desktop matrix. It requires a disposable Fleet guest, the explicitly loaded
+desktop matrix. It requires a disposable VM guest, the explicitly loaded
input experiment, and a source-built Driver service with unrestricted
permissions. Use native GTK raw-event fixtures and keep their journals and
Wayland wire logs. The helper refuses an arbitrary process as its target.
@@ -331,9 +331,9 @@ observed by the compositor loop; they do not prove that an off/on transition
entirely between samples is latched. Atomic key packets provide recovery
evidence, not an interrupted held-key-stream guarantee.
-## Fleet packaging lane
+## VM packaging lane
-Build an Omarchy/Arch Fleet image from the monorepo source using
+Build an Omarchy/Arch VM image from the monorepo source using
`packaging/arch/PKGBUILD`. Record the source SHA, exact Hyprland package version,
plugin package version, module digest, and image identity. The lane must prove:
@@ -347,7 +347,7 @@ plugin package version, module digest, and image identity. The lane must prove:
- all discovery-only mutation refusals under fixture-state, focus, z-order,
cursor, and input-leak oracles.
-The Fleet lane must also identify whether each client is a one-shot process or
+The VM lane must also identify whether each client is a one-shot process or
a long-lived process created inside the graphical session. A process launched
outside that session and given copied display variables is not equivalent
evidence. Chromium and Electron rows must record their effective Ozone backend
@@ -355,19 +355,19 @@ and confirm they render and expose the intended fixture before testing a
refusal.
Run the repository's ordinary Linux source/unit checks and relevant Cua Driver
-catalogs on the exact candidate SHA. Fleet validates reproducible packaging and
+catalogs on the exact candidate SHA. The VM lane validates reproducible packaging and
lifecycle behavior; it is not the final hardware claim.
## Physical Omarchy final gate
-After the Fleet packaging lane passes, and before any capability or release
+After the VM packaging lane passes, and before any capability or release
claim, repeat the candidate package on a bare-metal Omarchy machine using the
exact Hyprland/plugin pair. Record status before load, after load, after
discovery, after refused mutations, after unload, and after a compositor
restart. Independently verify application state, focus, z-order, cursor
position, and absence of primary-seat or unrelated-window input.
-The physical run is the final acceptance gate. VM, nested compositor, or Fleet
+The physical run is the final acceptance gate. VM or nested compositor
success cannot replace it. If the candidate SHA, Hyprland package, protocol,
packaging, mutation behavior, or harness changes afterward, rerun the evidence
affected by that change before promotion.
@@ -397,7 +397,7 @@ windows unchanged.
| One-shot graphical-session client | Launch one fresh process from the real graphical-session environment, complete discovery negotiation, receive typed mutation refusal, and exit cleanly without relying on state from another invocation. |
| Long-lived graphical-session client | Launch inside the real graphical session, negotiate discovery, survive repeated calls, detect compositor/plugin restart and the stale connection, reconnect and negotiate the new epoch, then receive typed mutation refusal. |
-The bare-metal result is the final certification after Fleet. A missing row,
+The bare-metal result is the final certification after the VM lane. A missing row,
an untyped failure, a black frame treated as capture success, focus or cursor
movement, input leakage, or a client that cannot reconnect fails certification.
diff --git a/libs/cua-driver/python/README.md b/libs/cua-driver/python/README.md
index 72019c939d..59ae448583 100644
--- a/libs/cua-driver/python/README.md
+++ b/libs/cua-driver/python/README.md
@@ -11,11 +11,8 @@ This package is for client applications importing Cua Driver as an SDK:
from cua_driver import CuaDriver
```
-It does not contain a Python MCP protocol implementation. The optional
-`cua_driver.fleet` module forwards service bytes to the shared Rust typed-MCP
-client. See [the candidate Fleet connection guide](../docs/shared-fleet-mcp-client.md)
-for prerequisites, ownership, and release limits. Agents already have runtime-neutral
-MCP clients and should configure the bundled server directly:
+It does not contain a Python MCP protocol implementation. Agents already have
+runtime-neutral MCP clients and should configure the bundled server directly:
```text
cua-driver mcp
diff --git a/libs/cua-driver/python/src/cua_driver/fleet.py b/libs/cua-driver/python/src/cua_driver/fleet.py
deleted file mode 100644
index 5285238854..0000000000
--- a/libs/cua-driver/python/src/cua_driver/fleet.py
+++ /dev/null
@@ -1,79 +0,0 @@
-"""Optional byte adapter for a caller-owned Fleet client and live sandbox target.
-
-Importing this module does not import Fleet. The caller retains the claim and
-client, and must close the Driver channel before releasing either of them.
-"""
-
-from __future__ import annotations
-
-import asyncio
-import copy
-import math
-import uuid
-
-from . import (
- DriverServiceHeader,
- DriverServiceResponse,
- DriverServiceTransport,
- DriverServiceTransportError,
- open_mcp_driver_channel,
-)
-
-
-_FLEET_DRIVER_MAX_RESPONSE_BYTES = 16 * 1024 * 1024
-
-
-def open_fleet_mcp_driver_channel(client, sandbox, *, service="mcp"):
- """Create a shared channel bound to an existing authenticated Fleet target.
-
- Await ``channel.open()``, use ``channel.driver()`` and
- ``channel.public_session()``, then await ``channel.close()`` before releasing
- the claim. This function never acquires credentials or releases Fleet state.
- """
- if not isinstance(service, str) or service not in sandbox.services:
- raise ValueError("Fleet sandbox does not expose the requested Driver service")
- if not callable(getattr(client, "service_request", None)):
- raise TypeError("Fleet client must provide service_request")
- from fleet_sdk import HttpHeader, HttpRequestBuilder
-
- loop = asyncio.get_running_loop()
- target = copy.deepcopy(sandbox)
- service_request = client.service_request
-
- class FleetServiceTransport(DriverServiceTransport):
- async def send(self, request):
- try:
- if asyncio.get_running_loop() is not loop:
- raise RuntimeError
- http_request = (
- HttpRequestBuilder()
- .method(request.method)
- .url("https://service.invalid" + request.path)
- .headers(
- [
- HttpHeader(name=header.name, value=header.value)
- for header in request.headers
- ]
- )
- .body(request.body)
- .timeout_secs(max(1, math.ceil(request.timeout_ms / 1000)))
- .max_response_bytes(_FLEET_DRIVER_MAX_RESPONSE_BYTES)
- .build()
- )
- response = await service_request(target, service, request.path, http_request)
- if len(response.body) > _FLEET_DRIVER_MAX_RESPONSE_BYTES:
- raise RuntimeError("Fleet Driver response exceeds the configured size limit")
- return DriverServiceResponse(
- status=response.status,
- headers=[
- DriverServiceHeader(name=header.name, value=header.value)
- for header in response.headers
- ],
- body=response.body,
- )
- except Exception:
- raise DriverServiceTransportError.Failed(
- "Fleet Driver service transport failed; completion is unknown"
- ) from None
-
- return open_mcp_driver_channel(FleetServiceTransport(), uuid.uuid4().hex)
diff --git a/libs/cua-driver/python/tests/test_fleet.py b/libs/cua-driver/python/tests/test_fleet.py
deleted file mode 100644
index fc55e8505c..0000000000
--- a/libs/cua-driver/python/tests/test_fleet.py
+++ /dev/null
@@ -1,256 +0,0 @@
-"""Thin Fleet adapter contracts without requiring a native library."""
-
-import asyncio
-import importlib.util
-import json
-from pathlib import Path
-import sys
-from types import SimpleNamespace
-
-import pytest
-
-
-def adapter(monkeypatch):
- channels = []
-
- def create(transport, principal):
- channel = SimpleNamespace(transport=transport, principal=principal)
- channels.append(channel)
- return channel
-
- sdk = SimpleNamespace(
- DriverServiceHeader=SimpleNamespace,
- DriverServiceResponse=SimpleNamespace,
- DriverServiceTransport=object,
- DriverServiceTransportError=SimpleNamespace(Failed=RuntimeError),
- open_mcp_driver_channel=create,
- )
- monkeypatch.setitem(sys.modules, "cua_driver", sdk)
- path = Path(__file__).parents[1] / "src/cua_driver/fleet.py"
- spec = importlib.util.spec_from_file_location("cua_driver.fleet", path)
- module = importlib.util.module_from_spec(spec)
- spec.loader.exec_module(module)
-
- class Builder:
- def __init__(self):
- self.values = {}
-
- def __getattr__(self, name):
- def field(value):
- self.values[name] = value
- return self
-
- return field
-
- def build(self):
- return SimpleNamespace(**self.values)
-
- monkeypatch.setitem(
- sys.modules,
- "fleet_sdk",
- SimpleNamespace(HttpHeader=SimpleNamespace, HttpRequestBuilder=Builder),
- )
- return module, channels
-
-
-def test_byte_mapping_and_caller_ownership(adapter):
- async def check():
- module, channels = adapter
- seen = []
-
- async def request(*args):
- seen.append(args)
- return SimpleNamespace(
- status=207,
- body=b"\x00\xff",
- headers=[
- SimpleNamespace(name="x-test", value="a"),
- SimpleNamespace(name="x-test", value="b"),
- ],
- )
-
- client = SimpleNamespace(service_request=request)
- sandbox = SimpleNamespace(services=["mcp"])
- channel = module.open_fleet_mcp_driver_channel(client, sandbox)
- result = await channel.transport.send(
- SimpleNamespace(
- method="POST",
- path="/mcp",
- body=b"\xff\x00",
- timeout_ms=1234,
- headers=[SimpleNamespace(name="x-test", value="c")],
- )
- )
- assert seen[0][:3] == (sandbox, "mcp", "/mcp")
- sent = seen[0][3]
- assert sent.body == b"\xff\x00" and sent.timeout_secs == 2
- assert sent.max_response_bytes == 16 * 1024 * 1024
- assert sent.url == "https://service.invalid/mcp"
- assert sent.headers[0].value == "c"
- assert result.body == b"\x00\xff" and result.status == 207
- assert [h.value for h in result.headers] == ["a", "b"]
- other = module.open_fleet_mcp_driver_channel(client, sandbox)
- assert channel.principal != other.principal
- assert channels == [channel, other]
-
- asyncio.run(check())
-
-
-def test_target_validation_precedes_open(adapter):
- module, channels = adapter
- with pytest.raises(ValueError, match="does not expose"):
- module.open_fleet_mcp_driver_channel(object(), SimpleNamespace(services=[]))
- with pytest.raises(TypeError, match="service_request"):
- module.open_fleet_mcp_driver_channel(object(), SimpleNamespace(services=["mcp"]))
- assert not channels
-
-
-def test_transport_errors_are_sanitized_and_cancellation_propagates(adapter):
- async def check():
- module, _ = adapter
-
- failure = RuntimeError("private diagnostic")
-
- async def fail(*args):
- raise failure
-
- client = SimpleNamespace(service_request=fail)
- channel = module.open_fleet_mcp_driver_channel(client, SimpleNamespace(services=["mcp"]))
- request = SimpleNamespace(method="POST", path="/mcp", body=b"", timeout_ms=1, headers=[])
- with pytest.raises(RuntimeError, match="completion is unknown") as error:
- await channel.transport.send(request)
- assert "private" not in str(error.value)
-
- failure = asyncio.CancelledError()
- with pytest.raises(asyncio.CancelledError):
- await channel.transport.send(request)
-
- asyncio.run(check())
-
-
-def test_oversized_response_is_rejected_without_exposing_contents(adapter):
- async def check():
- module, _ = adapter
- secret = b"private-response-fragment"
-
- async def oversized(*args):
- request = args[3]
- assert request.max_response_bytes == 16 * 1024 * 1024
- return SimpleNamespace(
- status=200,
- headers=[],
- body=secret + bytes(16 * 1024 * 1024 + 1 - len(secret)),
- )
-
- channel = module.open_fleet_mcp_driver_channel(
- SimpleNamespace(service_request=oversized), SimpleNamespace(services=["mcp"])
- )
- request = SimpleNamespace(method="POST", path="/mcp", body=b"", timeout_ms=1, headers=[])
- with pytest.raises(RuntimeError, match="completion is unknown") as error:
- await channel.transport.send(request)
- assert secret.decode() not in str(error.value)
-
- asyncio.run(check())
-
-
-def test_response_exactly_at_limit_is_accepted(adapter):
- async def check():
- module, _ = adapter
- body = bytes(16 * 1024 * 1024)
-
- async def exact_limit(*args):
- request = args[3]
- assert request.max_response_bytes == len(body)
- return SimpleNamespace(status=200, headers=[], body=body)
-
- channel = module.open_fleet_mcp_driver_channel(
- SimpleNamespace(service_request=exact_limit), SimpleNamespace(services=["mcp"])
- )
- request = SimpleNamespace(method="POST", path="/mcp", body=b"", timeout_ms=1, headers=[])
- response = await channel.transport.send(request)
- assert response.body is body
-
- asyncio.run(check())
-
-
-def test_real_generated_channel_uses_fleet_records_and_frozen_target():
- import cua_driver as sdk
- from cua_driver.fleet import open_fleet_mcp_driver_channel
- from fleet_sdk import HttpHeader, HttpResponse, Sandbox
-
- async def check():
- events = []
- target = Sandbox(namespace="fixture", claim="claim", name="guest", services=["mcp"])
-
- async def service_request(bound, service, path, request):
- assert bound.name == "guest" and bound.services == ["mcp"]
- assert service == "mcp" and path == "/mcp"
- rpc = json.loads(request.body) if request.body else {}
- method = rpc.get("method")
- events.append(method or request.method)
- headers = [HttpHeader(name="content-type", value="application/json")]
- if method == "initialize":
- headers.append(HttpHeader(name="Mcp-Session-Id", value="fleet-session"))
- result = {
- "protocolVersion": "2025-06-18",
- "capabilities": {"experimental": {"ai.cua.driver.envelopes": {"version": 1}}},
- }
- elif method == "notifications/initialized" or request.method == "DELETE":
- return HttpResponse(status=202, headers=[], body=b"")
- elif method == "cua/driver/v1/open":
- result = {
- "connection_id": "receiver",
- "generation": "generation",
- "public_session": "host-session",
- "capabilities": {
- "minimum_envelope_version": 1,
- "maximum_envelope_version": 1,
- "supports_cancellation": True,
- },
- }
- elif method == "cua/driver/v1/exchange":
- envelope = rpc["params"]["envelope"]
- result = {
- "envelope_version": 1,
- "request_id": envelope["request_id"],
- "ok": True,
- "completion_known": True,
- "result": {
- "content": [{"type": "text", "text": "fleet-native"}],
- "isError": False,
- },
- }
- else:
- assert method == "cua/driver/v1/close"
- result = {"ok": True}
- return HttpResponse(
- status=200,
- headers=headers,
- body=json.dumps({"jsonrpc": "2.0", "id": rpc["id"], "result": result}).encode(),
- )
-
- client = SimpleNamespace(service_request=service_request)
- channel = open_fleet_mcp_driver_channel(client, target)
- target.name = "different-guest"
- target.services.clear()
- client.service_request = None
- try:
- await channel.open()
- driver = channel.driver()
- assert type(driver) is sdk.CuaDriver
- assert channel.public_session() == "host-session"
- result = await driver.get_screen_size(sdk.GetScreenSizeInput(session=None))
- assert result.text == "fleet-native"
- finally:
- await channel.close()
- assert events == [
- "initialize",
- "notifications/initialized",
- "cua/driver/v1/open",
- "cua/driver/v1/exchange",
- "cua/driver/v1/close",
- "DELETE",
- ]
-
- asyncio.run(check())
diff --git a/libs/cua-driver/rust/Skills/cua-driver/LINUX.md b/libs/cua-driver/rust/Skills/cua-driver/LINUX.md
index 025f0b2ea7..5364943c21 100644
--- a/libs/cua-driver/rust/Skills/cua-driver/LINUX.md
+++ b/libs/cua-driver/rust/Skills/cua-driver/LINUX.md
@@ -360,10 +360,10 @@ uninstrumented module hash are unchanged at
`1133a06e4f205cf80188a7ac9e41102f37611fea`. The proof covers recorded actions
and observation intervals, not every application operation or release package.
Portable tests and historical experiments do not replace complete native
-harness acceptance. Compatible release artifacts and final Fleet image
+harness acceptance. Compatible release artifacts and final image
packaging and lifecycle validation require separate evidence. Physical Omarchy
parity requires separate acceptance; it is not a gate for publishing a validated
-Fleet image.
+image.
## Quick triage
diff --git a/libs/cua-driver/rust/crates/cua-driver-sdk/src/remote.rs b/libs/cua-driver/rust/crates/cua-driver-sdk/src/remote.rs
index ed9a2ca2db..5b1309c98e 100644
--- a/libs/cua-driver/rust/crates/cua-driver-sdk/src/remote.rs
+++ b/libs/cua-driver/rust/crates/cua-driver-sdk/src/remote.rs
@@ -1,6 +1,6 @@
//! Transport-free remote Driver connection backend.
//!
-//! A carrier (gRPC, HTTP/2, Fleet, or another authenticated channel) implements
+//! A carrier (gRPC, HTTP/2, or another authenticated channel) implements
//! [`DriverEnvelopeChannel`]. The SDK continues to expose the same typed
//! `CuaDriver` methods and never depends on that carrier.
diff --git a/libs/cua-driver/rust/crates/cua-driver/src/driver_service_http.rs b/libs/cua-driver/rust/crates/cua-driver/src/driver_service_http.rs
index 5f616aea23..57e02e1ca0 100644
--- a/libs/cua-driver/rust/crates/cua-driver/src/driver_service_http.rs
+++ b/libs/cua-driver/rust/crates/cua-driver/src/driver_service_http.rs
@@ -2,7 +2,7 @@
//!
//! This loopback endpoint is NOT an authentication boundary. A trusted upstream
//! service must authorize and forward requests inside the guest before any later
-//! Fleet exposure; packaging and exposure require a separate explicit change.
+//! exposure; packaging and exposure require a separate explicit change.
//! Connection IDs and generations are routing/lifecycle markers, not credentials.
//! Each connection already has a host-bound root session; independent bound
//! sessions are unsupported. No request supplies permission options or paths.
diff --git a/libs/cua-driver/typescript/README.md b/libs/cua-driver/typescript/README.md
index a9b9b68540..bb34bcd3f2 100644
--- a/libs/cua-driver/typescript/README.md
+++ b/libs/cua-driver/typescript/README.md
@@ -14,11 +14,8 @@ import { CuaDriver } from "@trycua/cua-driver"
organizational `/embedded` entrypoint; they are the same generated Rust object.
The `/electron` entrypoint is a thin compatibility naming layer over the same
generated macOS permission functions. The package does not contain a TypeScript
-MCP protocol implementation. The optional `/fleet` entrypoint forwards service
-bytes to the shared Rust typed-MCP client and returns the canonical Driver.
-See [the candidate Fleet connection guide](../docs/shared-fleet-mcp-client.md)
-for prerequisites, ownership, and release limits. Agents already have
-runtime-neutral MCP clients and should configure the executable directly:
+MCP protocol implementation. Agents already have runtime-neutral MCP clients
+and should configure the executable directly:
```text
cua-driver mcp
diff --git a/libs/cua-driver/typescript/package-lock.json b/libs/cua-driver/typescript/package-lock.json
index 291b385cbe..5b205af8d0 100644
--- a/libs/cua-driver/typescript/package-lock.json
+++ b/libs/cua-driver/typescript/package-lock.json
@@ -17,7 +17,6 @@
"@ubjs/node": "0.31.0-3"
},
"devDependencies": {
- "@trycua/fleet": "0.1.2",
"@types/node": "^22.0.0",
"electron": "43.7.6",
"typescript": "^5.7.0",
@@ -55,16 +54,6 @@
"undici": "^7.24.4"
}
},
- "node_modules/@trycua/fleet": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@trycua/fleet/-/fleet-0.1.2.tgz",
- "integrity": "sha512-60XZVFKkrwceuQ47HnrYfSK7iuBV4wFUBqiIb1XxiBKrerDgGNzV0Putk2y4y5fCW3WYpGzT0vvV+MekSASiag==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@ubjs/core": "0.31.0-3"
- }
- },
"node_modules/@types/node": {
"version": "22.20.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz",
diff --git a/libs/cua-driver/typescript/package.json b/libs/cua-driver/typescript/package.json
index 30d5d96d58..2490d7480e 100644
--- a/libs/cua-driver/typescript/package.json
+++ b/libs/cua-driver/typescript/package.json
@@ -22,10 +22,6 @@
"./electron": {
"types": "./dist/electron.d.ts",
"import": "./dist/electron.js"
- },
- "./fleet": {
- "types": "./dist/fleet.d.ts",
- "import": "./dist/fleet.js"
}
},
"files": [
@@ -35,8 +31,6 @@
"dist/embedded.d.ts",
"dist/electron.js",
"dist/electron.d.ts",
- "dist/fleet.js",
- "dist/fleet.d.ts",
"dist/native",
"README.md",
"dist/daemon.js",
@@ -48,14 +42,13 @@
"scripts": {
"build": "tsc -p tsconfig.json",
"prepack": "npm run build",
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext test/fleet-types.ts test/cursor-effects-types.ts",
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext test/cursor-effects-types.ts",
"test": "npm run build && node --test test/*.test.mjs",
"generate:uniffi": "node ../scripts/generate-uniffi-bindings.mjs",
"generate:uniffi:check": "node ../scripts/generate-uniffi-bindings.mjs --check",
"stage:uniffi": "node ../scripts/stage-uniffi-library.mjs"
},
"devDependencies": {
- "@trycua/fleet": "0.1.2",
"@types/node": "^22.0.0",
"electron": "43.7.6",
"typescript": "^5.7.0",
diff --git a/libs/cua-driver/typescript/src/fleet.ts b/libs/cua-driver/typescript/src/fleet.ts
deleted file mode 100644
index 0dea1d0b31..0000000000
--- a/libs/cua-driver/typescript/src/fleet.ts
+++ /dev/null
@@ -1,157 +0,0 @@
-/** Node-only composition of an existing Fleet client and the shared Rust Driver. */
-import { randomUUID } from 'node:crypto';
-import {
- openMcpDriverChannel,
- DriverServiceTransportError,
- type CuaDriverLike,
- type DriverServiceRequest,
- type DriverServiceResponse,
-} from './index.js';
-
-const FLEET_DRIVER_MAX_RESPONSE_BYTES = 16n * 1024n * 1024n;
-
-/** Structural subset of Fleet's generated Sandbox record. */
-export interface FleetDriverSandbox {
- namespace: string;
- claim: string;
- name: string;
- services: string[];
-}
-
-/** Compatible with the generated Fleet client; no shared native pointers. */
-export interface FleetDriverClient {
- serviceRequest(
- sandbox: FleetDriverSandbox,
- service: string,
- path: string,
- request: {
- method: string;
- url: string;
- headers: { name: string; value: string }[];
- body?: ArrayBuffer;
- timeoutSecs?: bigint;
- maxResponseBytes?: bigint;
- },
- options?: { signal: AbortSignal }
- ): Promise<{
- status: number;
- headers: { name: string; value: string }[];
- body: ArrayBuffer;
- }>;
-}
-
-export interface FleetDriverConnection {
- readonly driver: CuaDriverLike;
- readonly sessionName: string;
- /** Close before releasing the Fleet claim. This never releases the claim. */
- close(): Promise<void>;
-}
-
-/**
- * Connect to an advertised service on the caller's live Fleet claim.
- * The caller owns the client and claim, and must await close before releasing
- * either. Abort closes this connection; it does not undo desktop actions.
- */
-export async function connectFleetDriver({
- client,
- sandbox,
- service = 'mcp',
- signal,
-}: {
- client: FleetDriverClient;
- sandbox: FleetDriverSandbox;
- service?: string;
- signal?: AbortSignal;
-}): Promise<FleetDriverConnection> {
- const target: FleetDriverSandbox = {
- namespace: sandbox.namespace,
- claim: sandbox.claim,
- name: sandbox.name,
- services: [...sandbox.services],
- };
- if (!target.services.includes(service)) {
- throw new Error('Fleet sandbox does not advertise the requested Driver service');
- }
- if (signal?.aborted) throw new Error('Fleet Driver connection aborted');
- const serviceRequest = client.serviceRequest.bind(client);
- let closing: Promise<void> | undefined;
-
- async function send(request: DriverServiceRequest): Promise<DriverServiceResponse> {
- // Keep routing authority in Fleet even if the native boundary changes.
- if (
- !request.path.startsWith('/') ||
- request.path.length > 2048 ||
- request.path.startsWith('//') ||
- /[\\?#\s%]/u.test(request.path) ||
- request.path.split('/').some((part) => part === '.' || part === '..') ||
- request.timeoutMs <= 0n ||
- request.timeoutMs > 2_147_483_647n
- ) {
- throw new DriverServiceTransportError.Failed({
- reason: 'Invalid bounded Driver service request',
- });
- }
- const controller = new AbortController();
- const timeout = setTimeout(() => controller.abort(), Number(request.timeoutMs));
- let onAbort: () => void = () => {};
- const aborted = new Promise<never>((_, reject) => {
- onAbort = () => reject(new Error('Fleet Driver service request canceled'));
- controller.signal.addEventListener('abort', onAbort, { once: true });
- });
- try {
- const response = await Promise.race([
- serviceRequest(
- { ...target, services: [...target.services] },
- service,
- request.path,
- {
- method: request.method,
- url: `https://service.invalid${request.path}`,
- headers: request.headers.map((header) => ({ ...header })),
- body: request.body,
- timeoutSecs: (request.timeoutMs + 999n) / 1000n,
- maxResponseBytes: FLEET_DRIVER_MAX_RESPONSE_BYTES,
- },
- { signal: controller.signal }
- ),
- aborted,
- ]);
- if (BigInt(response.body.byteLength) > FLEET_DRIVER_MAX_RESPONSE_BYTES) {
- throw new Error('Fleet Driver response exceeds the configured size limit');
- }
- return response;
- } catch {
- // Native callback errors must not expose Fleet credentials or response bodies.
- throw new DriverServiceTransportError.Failed({
- reason: 'Fleet Driver service request failed',
- });
- } finally {
- clearTimeout(timeout);
- controller.signal.removeEventListener('abort', onAbort);
- }
- }
-
- const channel = openMcpDriverChannel({ send }, `fleet:${randomUUID()}`);
- const close = (): Promise<void> => {
- if (!closing) {
- signal?.removeEventListener('abort', onAbort);
- // Retain the promise so cancellation cannot orphan cleanup or hide errors
- // from a later explicit close. Rust bounds its own session teardown.
- closing = channel.close();
- }
- return closing;
- };
- const onAbort = () => {
- void close().catch(() => {});
- };
- signal?.addEventListener('abort', onAbort, { once: true });
- try {
- if (signal?.aborted) throw new Error('Fleet Driver connection aborted');
- await channel.open();
- if (signal?.aborted || closing) throw new Error('Fleet Driver connection aborted');
- return Object.freeze({ driver: channel.driver(), sessionName: channel.publicSession(), close });
- } catch (error) {
- await close();
- throw error;
- }
-}
diff --git a/libs/cua-driver/typescript/test/fleet-types.ts b/libs/cua-driver/typescript/test/fleet-types.ts
deleted file mode 100644
index 8f83583968..0000000000
--- a/libs/cua-driver/typescript/test/fleet-types.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import type { CyclopsClientLike, Sandbox } from '@trycua/fleet/node';
-import type { FleetDriverClient, FleetDriverSandbox } from '../src/fleet.js';
-
-declare const client: CyclopsClientLike;
-declare const sandbox: Sandbox;
-
-// Keep the adapter assignable from the published Fleet API, not just mocks.
-const compatibleClient: FleetDriverClient = client;
-const compatibleSandbox: FleetDriverSandbox = sandbox;
-void compatibleClient;
-void compatibleSandbox;
diff --git a/libs/cua-driver/typescript/test/fleet.test.mjs b/libs/cua-driver/typescript/test/fleet.test.mjs
deleted file mode 100644
index ad26114b1e..0000000000
--- a/libs/cua-driver/typescript/test/fleet.test.mjs
+++ /dev/null
@@ -1,297 +0,0 @@
-import assert from 'node:assert/strict';
-import { existsSync } from 'node:fs';
-import { test } from 'node:test';
-import { fileURLToPath } from 'node:url';
-
-const triple =
- process.platform === 'darwin'
- ? `darwin-${process.arch}`
- : process.platform === 'win32'
- ? `win32-${process.arch}-msvc`
- : `linux-${process.arch}-${process.report.getReport().header.glibcVersionRuntime ? 'gnu' : 'musl'}`;
-const library =
- process.platform === 'darwin'
- ? 'libcua_driver_sdk.dylib'
- : process.platform === 'win32'
- ? 'cua_driver_sdk.dll'
- : 'libcua_driver_sdk.so';
-const nativeAvailable = existsSync(
- fileURLToPath(new URL(`../node_modules/@trycua/cua-driver-${triple}/${library}`, import.meta.url))
-);
-const encoder = new TextEncoder();
-const decoder = new TextDecoder();
-const bytes = (value) => encoder.encode(value).buffer;
-const TRANSPORT_FAILED = 'MCP Driver transport failed; completion is unknown';
-
-function fixture({ sse = false } = {}) {
- const sandbox = {
- namespace: 'tenant',
- claim: 'claim',
- name: 'guest',
- services: ['mcp', 'server'],
- };
- const calls = [];
- const sessions = new Set();
- let sequence = 0;
- const client = {
- async serviceRequest(target, service, path, request, options) {
- assert.deepEqual(target, {
- namespace: 'tenant',
- claim: 'claim',
- name: 'guest',
- services: ['mcp', 'server'],
- });
- assert.equal(service, 'mcp');
- assert.equal(path, '/mcp');
- assert.equal(request.url, 'https://service.invalid/mcp');
- assert.equal(typeof request.timeoutSecs, 'bigint');
- assert.equal(request.maxResponseBytes, 16n * 1024n * 1024n);
- assert.ok(options.signal instanceof AbortSignal);
- assert.ok(request.body instanceof ArrayBuffer);
- const rpc = request.body.byteLength ? JSON.parse(decoder.decode(request.body)) : null;
- const headers = Object.fromEntries(
- request.headers.map(({ name, value }) => [name.toLowerCase(), value])
- );
- calls.push({ target, service, path, request, rpc });
- if (client.intercept) await client.intercept(rpc, options.signal);
- if (request.method === 'DELETE') {
- sessions.delete(headers['mcp-session-id']);
- return { status: 200, headers: [], body: new ArrayBuffer(0) };
- }
- let result;
- const responseHeaders = [];
- if (rpc.method === 'initialize') {
- const session = `http-${++sequence}`;
- sessions.add(session);
- responseHeaders.push({ name: 'Mcp-Session-Id', value: session });
- result = {
- protocolVersion: '2025-06-18',
- capabilities: { experimental: { 'ai.cua.driver.envelopes': { version: 1 } } },
- };
- } else {
- const session = headers['mcp-session-id'];
- assert.ok(sessions.has(session));
- if (rpc.method === 'notifications/initialized') {
- return { status: 202, headers: [], body: new ArrayBuffer(0) };
- }
- if (rpc.method === 'cua/driver/v1/open') {
- result = {
- connection_id: session,
- generation: `gen-${session}`,
- public_session: 'guest-label',
- capabilities: {
- minimum_envelope_version: 1,
- maximum_envelope_version: 1,
- supports_cancellation: true,
- },
- };
- } else if (rpc.method === 'cua/driver/v1/exchange') {
- result = {
- envelope_version: 1,
- request_id: rpc.params.envelope.request_id,
- ok: true,
- result: { content: [{ type: 'text', text: 'typed-fleet-fixture' }], isError: false },
- completion_known: true,
- };
- } else {
- assert.ok(['cua/driver/v1/close', 'cua/driver/v1/cancel'].includes(rpc.method));
- result = { ok: true };
- }
- }
- const json = JSON.stringify({ jsonrpc: '2.0', id: rpc.id, result });
- responseHeaders.push({
- name: 'Content-Type',
- value: sse ? 'text/event-stream' : 'application/json',
- });
- let body = bytes(sse ? `event: message\r\ndata: ${json}\r\n\r\n` : json);
- if (client.nextResponseBytes !== undefined) {
- assert.equal(sse, false);
- assert.ok(body.byteLength <= client.nextResponseBytes);
- const padded = new Uint8Array(client.nextResponseBytes);
- padded.set(new Uint8Array(body));
- padded.fill(0x20, body.byteLength);
- body = padded.buffer;
- client.nextResponseBytes = undefined;
- }
- return {
- status: 200,
- headers: responseHeaders,
- body,
- };
- },
- };
- return { client, sandbox, calls, sessions };
-}
-
-for (const sse of [false, true]) {
- test(
- `Fleet returns the actual typed Rust Driver (${sse ? 'SSE' : 'JSON'})`,
- { skip: !nativeAvailable },
- async () => {
- const { CuaDriver } = await import('@trycua/cua-driver');
- const { connectFleetDriver } = await import('@trycua/cua-driver/fleet');
- const f = fixture({ sse });
- const connection = await connectFleetDriver(f);
- try {
- assert.ok(connection.driver instanceof CuaDriver);
- f.sandbox.name = 'different-guest';
- f.sandbox.services.length = 0;
- const result = await connection.driver.getScreenSize({});
- assert.equal(result.text, 'typed-fleet-fixture');
- assert.equal(f.calls.at(-1).rpc.params.envelope.name, 'get_screen_size');
- assert.ok(connection.sessionName);
- } finally {
- const closing = connection.close();
- assert.equal(connection.close(), closing);
- await closing;
- }
- assert.equal(f.sessions.size, 0);
- const count = f.calls.length;
- await assert.rejects(connection.driver.getScreenSize({}));
- assert.equal(f.calls.length, count);
- }
- );
-}
-
-test(
- 'Fleet rejects unadvertised service and pre-aborted connections before requests',
- { skip: !nativeAvailable },
- async () => {
- const { connectFleetDriver } = await import('@trycua/cua-driver/fleet');
- const f = fixture();
- await assert.rejects(connectFleetDriver({ ...f, service: 'missing' }), /does not advertise/);
- await assert.rejects(connectFleetDriver({ ...f, signal: AbortSignal.abort() }), /aborted/);
- assert.equal(f.calls.length, 0);
- }
-);
-
-test(
- 'Fleet callback errors exclude sensitive diagnostics',
- { skip: !nativeAvailable },
- async () => {
- const { connectFleetDriver } = await import('@trycua/cua-driver/fleet');
- const f = fixture();
- f.client.intercept = () => {
- throw new Error('secret-token-private-response');
- };
- await assert.rejects(connectFleetDriver(f), (error) => {
- // The adapter converts the throw into a declared transport failure. Without
- // that, the callback error panics in Rust and the reason becomes a drain timeout.
- assert.deepEqual(error.inner, { reason: TRANSPORT_FAILED });
- assert.doesNotMatch(String(error), /secret-token-private-response/);
- assert.doesNotMatch(JSON.stringify(error), /secret-token-private-response/);
- return true;
- });
- }
-);
-
-test(
- 'Fleet rejects oversized responses without exposing their contents',
- { skip: !nativeAvailable },
- async () => {
- const { connectFleetDriver } = await import('@trycua/cua-driver/fleet');
- const secret = 'private-response-fragment';
- const body = new Uint8Array(16 * 1024 * 1024 + 1);
- body.set(encoder.encode(secret));
- const client = {
- async serviceRequest(_target, _service, _path, request) {
- assert.equal(request.maxResponseBytes, 16n * 1024n * 1024n);
- return { status: 200, headers: [], body: body.buffer };
- },
- };
- await assert.rejects(
- connectFleetDriver({
- client,
- sandbox: { namespace: 'tenant', claim: 'claim', name: 'guest', services: ['mcp'] },
- }),
- (error) => {
- // The adapter enforces the limit as a transport failure before Rust parses
- // the body; Rust's own limit would report a malformed negotiation instead.
- assert.deepEqual(error.inner, { reason: TRANSPORT_FAILED });
- assert.doesNotMatch(String(error), new RegExp(secret));
- assert.doesNotMatch(JSON.stringify(error), new RegExp(secret));
- return true;
- }
- );
- }
-);
-
-test(
- 'Fleet accepts a response exactly at the configured limit',
- { skip: !nativeAvailable },
- async () => {
- const { connectFleetDriver } = await import('@trycua/cua-driver/fleet');
- const f = fixture();
- f.client.nextResponseBytes = 16 * 1024 * 1024;
- const connection = await connectFleetDriver(f);
- assert.equal(f.client.nextResponseBytes, undefined);
- await connection.close();
- }
-);
-
-test(
- 'aborting a Fleet connection lets Rust cancel and drain before closing',
- { skip: !nativeAvailable, timeout: 10_000 },
- async () => {
- const { connectFleetDriver } = await import('@trycua/cua-driver/fleet');
- const f = fixture();
- const controller = new AbortController();
- const connection = await connectFleetDriver({ ...f, signal: controller.signal });
- let started;
- const pending = new Promise((resolve) => {
- started = resolve;
- });
- let callbackSignal;
- let release;
- const delayed = new Promise((resolve) => {
- release = resolve;
- });
- f.client.intercept = (rpc, signal) => {
- if (rpc?.method === 'cua/driver/v1/exchange') {
- callbackSignal = signal;
- started();
- return delayed;
- }
- if (rpc?.method === 'cua/driver/v1/cancel') release();
- };
- const action = connection.driver.getScreenSize({});
- const rejected = assert.rejects(action);
- await pending;
- controller.abort();
- await connection.close();
- await rejected;
- assert.equal(callbackSignal.aborted, false);
- assert.equal(f.sessions.size, 0);
- }
-);
-
-test(
- 'aborting during receiver open cannot return a live late Driver',
- { skip: !nativeAvailable, timeout: 10_000 },
- async () => {
- const { connectFleetDriver } = await import('@trycua/cua-driver/fleet');
- const f = fixture();
- const controller = new AbortController();
- let started;
- const pending = new Promise((resolve) => {
- started = resolve;
- });
- let release;
- const delayed = new Promise((resolve) => {
- release = resolve;
- });
- f.client.intercept = (rpc) => {
- if (rpc?.method === 'cua/driver/v1/open') {
- started();
- return delayed;
- }
- };
- const opening = connectFleetDriver({ ...f, signal: controller.signal });
- const rejected = assert.rejects(opening);
- await pending;
- controller.abort();
- release();
- await rejected;
- assert.equal(f.sessions.size, 0);
- }
-);
diff --git a/libs/typescript/README.md b/libs/typescript/README.md
index 3e7441d812..1f275aa4b3 100644
--- a/libs/typescript/README.md
+++ b/libs/typescript/README.md
@@ -2,12 +2,11 @@
pnpm workspace for the Cua TypeScript packages:
-| Package | Purpose |
-| -------------------- | ----------------------------------------------------------------------- |
-| `@trycua/core` | Shared telemetry and utilities |
-| `@trycua/agent` | Client for Cua agent proxies (HTTP/HTTPS or peer-to-peer) |
-| `@trycua/fleet` | Browser and Node.js SDK for Fleet templates, pools, claims and services |
-| `@trycua/playground` | Reusable playground UI for computer-use agents |
+| Package | Purpose |
+| -------------------- | --------------------------------------------------------- |
+| `@trycua/core` | Shared telemetry and utilities |
+| `@trycua/agent` | Client for Cua agent proxies (HTTP/HTTPS or peer-to-peer) |
+| `@trycua/playground` | Reusable playground UI for computer-use agents |
Sandboxes, spacesd control (screen, input, shell, files), Spaces and
streaming are in the cua SDK's npm package `@trycua/cua`, built from
@@ -20,7 +19,7 @@ Requires Node.js 20+ and pnpm.
```bash
pnpm install
pnpm build # builds @trycua/core
-pnpm --filter @trycua/fleet build # or any other package
+pnpm --filter @trycua/agent build # or any other package
pnpm test # all packages
pnpm typecheck
pnpm lint # prettier --check; lint:fix to write
diff --git a/libs/typescript/fleet/.bumpversion.cfg b/libs/typescript/fleet/.bumpversion.cfg
deleted file mode 100644
index 6a8172ee25..0000000000
--- a/libs/typescript/fleet/.bumpversion.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-[bumpversion]
-current_version = 0.1.2
-commit = True
-tag = True
-tag_name = npm-fleet-v{new_version}
-message = Bump @trycua/fleet to v{new_version}
-
-[bumpversion:file:package.json]
-search = "version": "{current_version}"
-replace = "version": "{new_version}"
diff --git a/libs/typescript/fleet/LICENSE b/libs/typescript/fleet/LICENSE
deleted file mode 100644
index b8b198ce3e..0000000000
--- a/libs/typescript/fleet/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2025 Cua AI, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/libs/typescript/fleet/README.md b/libs/typescript/fleet/README.md
deleted file mode 100644
index 6c040d57db..0000000000
--- a/libs/typescript/fleet/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# @trycua/fleet
-
-Browser and Node.js WebAssembly bindings for the Cua Fleet control plane. Both
-entry points expose the generated lifecycle client used to create templates,
-pools, claims, and authenticated requests to sandbox services.
-
-The package is built from the public Fleet mirror in
-[`libs/fleet`](../../fleet). That mirror is synchronized from the canonical
-Fleet repository, so the npm release and public SDK source share one repository
-and release history.
-
-## Install
-
-```bash
-npm install @trycua/fleet
-```
-
-## Browser
-
-```ts
-import {
- CyclopsClient,
- CyclopsTokenProviderConfigurationBuilder,
- uniffiInitAsync,
-} from '@trycua/fleet/browser';
-
-await uniffiInitAsync();
-const configuration = new CyclopsTokenProviderConfigurationBuilder()
- .baseUrl('https://run.cua.ai')
- .poolPollIntervalMs(5_000n)
- .poolPollLimit(120)
- .claimPollIntervalMs(5_000n)
- .claimPollLimit(120)
- .build();
-const client = CyclopsClient.connectBrowserWithAccessToken(configuration, accessToken);
-```
-
-## Node.js
-
-The Node entry loads the same WASM artifact from disk and supplies a fetch-based
-UniFFI HTTP transport, so it does not require a platform-specific native
-`libcyclops_sdk`.
-
-```ts
-import { CyclopsTokenProviderConfigurationBuilder, createFleetClient } from '@trycua/fleet/node';
-
-const configuration = new CyclopsTokenProviderConfigurationBuilder()
- .baseUrl('https://run.cua.ai')
- .poolPollIntervalMs(5_000n)
- .poolPollLimit(120)
- .claimPollIntervalMs(5_000n)
- .claimPollLimit(120)
- .build();
-const client = await createFleetClient(configuration, accessToken);
-```
-
-The package root uses conditional exports: browser-aware bundlers receive the
-browser entry and Node.js receives the Node entry. Explicit subpath imports are
-recommended for application code and tests.
-
-## Development
-
-```bash
-pnpm --dir libs/typescript/fleet build
-pnpm --dir libs/typescript/fleet pack:check
-```
-
-The build regenerates the browser UniFFI binding from `libs/fleet`, compiles the
-pinned Rust SDK to WebAssembly, and emits both ESM entry points plus TypeScript
-declarations.
-
-## Links
-
-- Website: [cua.ai](https://cua.ai)
-- Documentation: [docs.trycua.com](https://docs.trycua.com)
-- Repository: [github.com/trycua/cua](https://github.com/trycua/cua)
-- Issues: [github.com/trycua/cua/issues](https://github.com/trycua/cua/issues)
diff --git a/libs/typescript/fleet/package.json b/libs/typescript/fleet/package.json
deleted file mode 100644
index 79be2134ae..0000000000
--- a/libs/typescript/fleet/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "name": "@trycua/fleet",
- "version": "0.1.2",
- "packageManager": "[email protected]",
- "description": "Browser and WebAssembly SDK for Cua Fleet sandbox lifecycle management",
- "type": "module",
- "license": "MIT",
- "homepage": "https://github.com/trycua/cua/tree/main/libs/typescript/fleet",
- "bugs": {
- "url": "https://github.com/trycua/cua/issues"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/trycua/cua.git",
- "directory": "libs/typescript/fleet"
- },
- "author": "cua",
- "keywords": [
- "computer-use",
- "sandbox",
- "agents",
- "fleet",
- "orchestration",
- "automation"
- ],
- "files": [
- "dist"
- ],
- "main": "./dist/node.js",
- "module": "./dist/node.js",
- "types": "./dist/node.d.ts",
- "exports": {
- ".": {
- "types": "./dist/node.d.ts",
- "browser": "./dist/browser.js",
- "node": "./dist/node.js",
- "import": "./dist/node.js"
- },
- "./browser": {
- "types": "./dist/browser.d.ts",
- "import": "./dist/browser.js"
- },
- "./node": {
- "types": "./dist/node.d.ts",
- "import": "./dist/node.js"
- },
- "./package.json": "./package.json"
- },
- "publishConfig": {
- "access": "public"
- },
- "scripts": {
- "build": "node ./scripts/build.mjs",
- "test": "node --test ./tests/*.test.mjs",
- "pack:check": "pnpm run build && npm pack --dry-run"
- },
- "dependencies": {
- "@ubjs/core": "0.31.0-3"
- },
- "devDependencies": {
- "esbuild": "^0.27.0",
- "typescript": "^5.9.0",
- "@types/node": "^22.15.17"
- },
- "browser": "./dist/browser.js"
-}
diff --git a/libs/typescript/fleet/scripts/build.mjs b/libs/typescript/fleet/scripts/build.mjs
deleted file mode 100644
index fc050b1dc5..0000000000
--- a/libs/typescript/fleet/scripts/build.mjs
+++ /dev/null
@@ -1,349 +0,0 @@
-import { execFileSync, spawnSync } from 'node:child_process';
-import { cpSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
-import { dirname, join, resolve } from 'node:path';
-import { fileURLToPath } from 'node:url';
-
-const packageDirectory = resolve(dirname(fileURLToPath(import.meta.url)), '..');
-const repositoryRoot = resolve(packageDirectory, '../../..');
-const bindingDirectory = join(repositoryRoot, 'libs/fleet/sdk-bindings/ts-uniffi-browser');
-const generatedDirectory = join(bindingDirectory, 'ts');
-const browserEntry = join(generatedDirectory, 'package.browser.ts');
-const nodeEntry = join(generatedDirectory, 'package.node.ts');
-const distributionDirectory = join(packageDirectory, 'dist');
-const declarationsDirectory = join(distributionDirectory, '.declarations');
-const rustToolchainFile = join(repositoryRoot, 'libs/fleet/rust-toolchain.toml');
-const rustToolchainMatch = readFileSync(rustToolchainFile, 'utf8').match(
- /^channel\s*=\s*"([^"]+)"/m
-);
-if (!rustToolchainMatch) {
- throw new Error(`Could not read the Rust channel from ${rustToolchainFile}`);
-}
-const rustToolchain = rustToolchainMatch[1];
-const wasmBindgenVersion = '0.2.126';
-
-export const RESPONSE_LIMIT_ERROR = 'HTTP response exceeds configured size limit';
-
-export function createTimeoutSignal(timeoutMs, timeoutFactory = AbortSignal.timeout) {
- if (typeof timeoutFactory === 'function') {
- return { signal: timeoutFactory(timeoutMs), dispose() {} };
- }
-
- const controller = new AbortController();
- const timer = setTimeout(
- () => controller.abort(new DOMException('Timed out', 'TimeoutError')),
- timeoutMs
- );
- timer.unref?.();
- return {
- signal: controller.signal,
- dispose() {
- clearTimeout(timer);
- },
- };
-}
-
-export function composeAbortSignals(signals, signalFactory = AbortSignal.any) {
- const activeSignals = signals.filter((signal) => signal !== undefined);
- if (activeSignals.length < 2) {
- return { signal: activeSignals[0], dispose() {} };
- }
- if (typeof signalFactory === 'function') {
- return { signal: signalFactory(activeSignals), dispose() {} };
- }
-
- const controller = new AbortController();
- const onAbort = (event) => controller.abort(event.target.reason);
- for (const signal of activeSignals) {
- if (signal.aborted) {
- controller.abort(signal.reason);
- break;
- }
- signal.addEventListener('abort', onAbort, { once: true });
- }
- return {
- signal: controller.signal,
- dispose() {
- for (const signal of activeSignals) {
- signal.removeEventListener('abort', onAbort);
- }
- },
- };
-}
-
-export async function readResponseBody(response, maxResponseBytes) {
- if (response.body === null) {
- return new ArrayBuffer(0);
- }
-
- const reader = response.body.getReader();
- const chunks = [];
- let totalBytes = 0;
- let totalBytesBigInt = 0n;
- while (true) {
- const { done, value } = await reader.read();
- if (done) {
- break;
- }
- const chunk = value instanceof Uint8Array ? value : new Uint8Array(value);
- const nextTotalBytes = totalBytes + chunk.byteLength;
- const nextTotalBytesBigInt = totalBytesBigInt + BigInt(chunk.byteLength);
- if (
- maxResponseBytes !== undefined &&
- maxResponseBytes !== null &&
- nextTotalBytesBigInt > maxResponseBytes
- ) {
- try {
- await reader.cancel();
- } catch {
- // Preserve the stable, sanitized limit error even if cancellation fails.
- }
- throw new Error(RESPONSE_LIMIT_ERROR);
- }
- chunks.push(chunk);
- totalBytes = nextTotalBytes;
- totalBytesBigInt = nextTotalBytesBigInt;
- }
-
- const body = new Uint8Array(totalBytes);
- let offset = 0;
- for (const chunk of chunks) {
- body.set(chunk, offset);
- offset += chunk.byteLength;
- }
- return body.buffer;
-}
-
-export async function executeFetchRequest(request, callerSignal, fetchImplementation = fetch) {
- const timeout =
- request.timeoutSecs !== undefined && request.timeoutSecs !== null
- ? createTimeoutSignal(Number(request.timeoutSecs) * 1_000)
- : undefined;
- const combinedSignal = composeAbortSignals([callerSignal, timeout?.signal]);
- try {
- const response = await fetchImplementation(request.url, {
- method: request.method,
- headers: request.headers.map(({ name, value }) => [name, value]),
- body: request.body,
- signal: combinedSignal.signal,
- redirect: 'manual',
- });
- return {
- status: response.status,
- headers: [...response.headers].map(([name, value]) => ({ name, value })),
- body: await readResponseBody(response, request.maxResponseBytes),
- };
- } finally {
- combinedSignal.dispose();
- timeout?.dispose();
- }
-}
-
-const sharedExports = `
-export * from './cyclops_sdk_schema'
-export * from './fleet_sdk'
-
-import * as cyclops_sdk_schema from './cyclops_sdk_schema'
-import * as fleet_sdk from './fleet_sdk'
-import initAsync from './wasm-bindgen/index.js'
-import wasmPath from './wasm-bindgen/index_bg.wasm'
-
-let initialization: Promise<void> | undefined
-
-function initializeBindings(): void {
- cyclops_sdk_schema.default.initialize()
- fleet_sdk.default.initialize()
-}
-
-export default {
- cyclops_sdk_schema,
- fleet_sdk,
-}
-`;
-
-const browserSource = `${sharedExports}
-export function uniffiInitAsync(): Promise<void> {
- initialization ??= (async () => {
- await initAsync({ module_or_path: new URL(wasmPath as unknown as string, import.meta.url) })
- initializeBindings()
- })()
- return initialization
-}
-`;
-
-const nodeSource = `
-import { readFile } from 'node:fs/promises'
-import type { HttpClient, HttpRequest, HttpResponse } from './fleet_sdk'
-${sharedExports}
-
-const RESPONSE_LIMIT_ERROR = ${JSON.stringify(RESPONSE_LIMIT_ERROR)}
-
-${createTimeoutSignal.toString()}
-
-${composeAbortSignals.toString()}
-
-${readResponseBody.toString()}
-
-${executeFetchRequest.toString()}
-
-export class FetchHttpClient implements HttpClient {
- async execute(
- request: HttpRequest,
- asyncOpts_?: { signal: AbortSignal },
- ): Promise<HttpResponse> {
- return executeFetchRequest(
- request as HttpRequest & { maxResponseBytes?: bigint },
- asyncOpts_?.signal,
- )
- }
-}
-
-export function uniffiInitAsync(): Promise<void> {
- initialization ??= (async () => {
- const wasm = await readFile(new URL(wasmPath as unknown as string, import.meta.url))
- await initAsync({ module_or_path: wasm })
- initializeBindings()
- })()
- return initialization
-}
-
-export async function createFleetClient(
- configuration: fleet_sdk.CyclopsTokenProviderConfiguration,
- accessToken: string,
-): Promise<fleet_sdk.CyclopsClient> {
- await uniffiInitAsync()
- return fleet_sdk.CyclopsClient.connectWithAccessToken(
- configuration,
- accessToken,
- new FetchHttpClient(),
- ) as fleet_sdk.CyclopsClient
-}
-`;
-
-function run(command, args, workingDirectory = packageDirectory) {
- execFileSync(command, args, {
- cwd: workingDirectory,
- stdio: 'inherit',
- });
-}
-
-function hasWasmBindgenVersion() {
- const result = spawnSync('wasm-bindgen', ['--version'], {
- encoding: 'utf8',
- });
- return result.status === 0 && result.stdout.trim() === `wasm-bindgen ${wasmBindgenVersion}`;
-}
-
-function normalizeDeclarationImports(source) {
- return source
- .replaceAll('.//', './')
- .replace(/(from\s+['"])(\.\/[^'"]+?)(['"])/g, (_match, prefix, specifier, suffix) => {
- return `${prefix}${specifier.endsWith('.js') ? specifier : `${specifier}.js`}${suffix}`;
- });
-}
-
-async function main() {
- const { build } = await import('esbuild');
-
- rmSync(distributionDirectory, { force: true, recursive: true });
- mkdirSync(distributionDirectory, { recursive: true });
-
- run('rustup', ['toolchain', 'install', rustToolchain, '--profile', 'minimal']);
- run('rustup', ['target', 'add', 'wasm32-unknown-unknown', '--toolchain', rustToolchain]);
- if (!hasWasmBindgenVersion()) {
- run('cargo', [
- `+${rustToolchain}`,
- 'install',
- 'wasm-bindgen-cli',
- '--version',
- wasmBindgenVersion,
- '--locked',
- ]);
- }
-
- run('npm', ['ci'], bindingDirectory);
- run('npm', ['run', 'build:wasm'], bindingDirectory);
- writeFileSync(browserEntry, browserSource);
- writeFileSync(nodeEntry, nodeSource);
-
- try {
- await build({
- entryPoints: { browser: browserEntry },
- bundle: true,
- format: 'esm',
- platform: 'browser',
- target: ['es2022'],
- outdir: distributionDirectory,
- assetNames: 'fleet',
- loader: {
- '.wasm': 'file',
- },
- });
-
- await build({
- entryPoints: { node: nodeEntry },
- bundle: true,
- format: 'esm',
- platform: 'node',
- target: ['node20'],
- outdir: distributionDirectory,
- assetNames: 'fleet',
- loader: {
- '.wasm': 'file',
- },
- });
-
- const typescript = join(packageDirectory, 'node_modules/.bin/tsc');
- run(typescript, [
- '--declaration',
- '--emitDeclarationOnly',
- '--outDir',
- declarationsDirectory,
- '--module',
- 'esnext',
- '--moduleResolution',
- 'bundler',
- '--target',
- 'es2022',
- '--types',
- 'node',
- '--skipLibCheck',
- '--allowArbitraryExtensions',
- 'true',
- browserEntry,
- nodeEntry,
- ]);
-
- const declarationFiles = [
- 'cyclops_sdk_schema-ffi.d.ts',
- 'cyclops_sdk_schema.d.ts',
- 'fleet_sdk-ffi.d.ts',
- 'fleet_sdk.d.ts',
- ];
- for (const file of declarationFiles) {
- cpSync(join(declarationsDirectory, file), join(distributionDirectory, file));
- }
- renameSync(
- join(declarationsDirectory, 'package.browser.d.ts'),
- join(distributionDirectory, 'browser.d.ts')
- );
- renameSync(
- join(declarationsDirectory, 'package.node.d.ts'),
- join(distributionDirectory, 'node.d.ts')
- );
- for (const file of [...declarationFiles, 'browser.d.ts', 'node.d.ts']) {
- const declarationPath = join(distributionDirectory, file);
- writeFileSync(
- declarationPath,
- normalizeDeclarationImports(readFileSync(declarationPath, 'utf8'))
- );
- }
- } finally {
- rmSync(browserEntry, { force: true });
- rmSync(nodeEntry, { force: true });
- rmSync(declarationsDirectory, { force: true, recursive: true });
- }
-}
-
-if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
- await main();
-}
diff --git a/libs/typescript/fleet/tests/fetch-http-client.test.mjs b/libs/typescript/fleet/tests/fetch-http-client.test.mjs
deleted file mode 100644
index 60c0e94fd4..0000000000
--- a/libs/typescript/fleet/tests/fetch-http-client.test.mjs
+++ /dev/null
@@ -1,207 +0,0 @@
-import assert from 'node:assert/strict';
-import test from 'node:test';
-
-import {
- RESPONSE_LIMIT_ERROR,
- composeAbortSignals,
- createTimeoutSignal,
- executeFetchRequest,
-} from '../scripts/build.mjs';
-
-const encoder = new TextEncoder();
-const decoder = new TextDecoder();
-
-function request(overrides = {}) {
- return {
- method: 'GET',
- url: 'https://example.invalid/resource',
- headers: [],
- ...overrides,
- };
-}
-
-function chunkedResponse(chunks, headers = {}) {
- return new Response(
- new ReadableStream({
- start(controller) {
- for (const chunk of chunks) {
- controller.enqueue(encoder.encode(chunk));
- }
- controller.close();
- },
- }),
- { status: 200, headers }
- );
-}
-
-function fetchReturning(response) {
- return async () => response;
-}
-
-function fetchUntilAborted(_url, { signal }) {
- return new Promise((resolve, reject) => {
- if (signal?.aborted) {
- reject(signal.reason);
- return;
- }
- signal?.addEventListener('abort', () => reject(signal.reason), { once: true });
- });
-}
-
-test('accepts an exact-size chunked body without Content-Length', async () => {
- const result = await executeFetchRequest(
- request({ maxResponseBytes: 6n }),
- undefined,
- fetchReturning(chunkedResponse(['ab', 'cdef']))
- );
-
- assert.equal(decoder.decode(result.body), 'abcdef');
-});
-
-test('rejects a chunked body as soon as it exceeds the limit', async () => {
- await assert.rejects(
- executeFetchRequest(
- request({ maxResponseBytes: 5n }),
- undefined,
- fetchReturning(chunkedResponse(['abc', 'def']))
- ),
- { message: RESPONSE_LIMIT_ERROR }
- );
-});
-
-test('uses streamed bytes rather than a lying Content-Length', async () => {
- const response = chunkedResponse(['ab', 'cd'], { 'content-length': '1' });
-
- await assert.rejects(
- executeFetchRequest(request({ maxResponseBytes: 3n }), undefined, fetchReturning(response)),
- { message: RESPONSE_LIMIT_ERROR }
- );
-});
-
-test('leaves response size unlimited when maxResponseBytes is omitted', async () => {
- const result = await executeFetchRequest(
- request(),
- undefined,
- fetchReturning(chunkedResponse(['un', 'limited']))
- );
-
- assert.equal(decoder.decode(result.body), 'unlimited');
-});
-
-test('treats maxResponseBytes zero as an empty-body-only limit', async () => {
- const empty = await executeFetchRequest(
- request({ maxResponseBytes: 0n }),
- undefined,
- fetchReturning(chunkedResponse([]))
- );
- assert.equal(empty.body.byteLength, 0);
-
- await assert.rejects(
- executeFetchRequest(
- request({ maxResponseBytes: 0n }),
- undefined,
- fetchReturning(chunkedResponse(['x']))
- ),
- { message: RESPONSE_LIMIT_ERROR }
- );
-});
-
-test('cancels the reader and does not leak response details on overflow', async () => {
- const secret = 'customer-token-and-body';
- let cancelled = false;
- const response = new Response(
- new ReadableStream({
- start(controller) {
- controller.enqueue(encoder.encode(secret));
- },
- cancel() {
- cancelled = true;
- throw new Error(`cancel failed: ${secret}`);
- },
- })
- );
-
- const error = await executeFetchRequest(
- request({
- url: `https://example.invalid/resource?token=${secret}`,
- maxResponseBytes: 1n,
- }),
- undefined,
- fetchReturning(response)
- ).then(
- () => assert.fail('expected the response limit to reject'),
- (caught) => caught
- );
-
- assert.equal(cancelled, true);
- assert.equal(error.message, RESPONSE_LIMIT_ERROR);
- assert.equal(error.message.includes(secret), false);
-});
-
-test('caller cancellation remains effective when a timeout is configured', async () => {
- const controller = new AbortController();
- const pending = executeFetchRequest(
- request({ timeoutSecs: 10n }),
- controller.signal,
- fetchUntilAborted
- );
- controller.abort(new DOMException('caller cancelled', 'AbortError'));
-
- await assert.rejects(pending, { name: 'AbortError' });
-});
-
-test('caller cancellation remains effective while the response body is streaming', async () => {
- const controller = new AbortController();
- const streamingFetch = async (_url, { signal }) =>
- new Response(
- new ReadableStream({
- start(bodyController) {
- bodyController.enqueue(encoder.encode('partial'));
- signal.addEventListener('abort', () => bodyController.error(signal.reason), {
- once: true,
- });
- },
- })
- );
- const pending = executeFetchRequest(
- request({ timeoutSecs: 10n }),
- controller.signal,
- streamingFetch
- );
- controller.abort(new DOMException('caller cancelled', 'AbortError'));
-
- await assert.rejects(pending, { name: 'AbortError' });
-});
-
-test('configured timeout aborts a pending request', async () => {
- await assert.rejects(
- executeFetchRequest(request({ timeoutSecs: 1n }), undefined, fetchUntilAborted),
- { name: 'TimeoutError' }
- );
-});
-
-test('timeoutSecs zero is an explicit immediate timeout', async () => {
- await assert.rejects(
- executeFetchRequest(request({ timeoutSecs: 0n }), undefined, fetchUntilAborted),
- { name: 'TimeoutError' }
- );
-});
-
-test('signal composition fallback preserves either abort source', () => {
- const caller = new AbortController();
- const timeout = new AbortController();
- const combined = composeAbortSignals([caller.signal, timeout.signal], null);
-
- timeout.abort(new DOMException('timed out', 'TimeoutError'));
- assert.equal(combined.signal.aborted, true);
- assert.equal(combined.signal.reason.name, 'TimeoutError');
- combined.dispose();
-});
-
-test('timeout fallback aborts without AbortSignal.timeout', async () => {
- const timeout = createTimeoutSignal(1, null);
- await new Promise((resolve) => timeout.signal.addEventListener('abort', resolve, { once: true }));
-
- assert.equal(timeout.signal.reason.name, 'TimeoutError');
- timeout.dispose();
-});
diff --git a/libs/typescript/package.json b/libs/typescript/package.json
index 927e146402..e5f38e968d 100644
--- a/libs/typescript/package.json
+++ b/libs/typescript/package.json
@@ -14,8 +14,7 @@
"test": "pnpm -r test",
"typecheck": "pnpm build:core && pnpm -r typecheck",
"format": "prettier --write .",
- "format:check": "prettier --check .",
- "build:fleet": "pnpm --filter @trycua/fleet build"
+ "format:check": "prettier --check ."
},
"packageManager": "[email protected]",
"devDependencies": {
diff --git a/libs/typescript/pnpm-lock.yaml b/libs/typescript/pnpm-lock.yaml
index ae0aa4da92..66e32d8cff 100644
--- a/libs/typescript/pnpm-lock.yaml
+++ b/libs/typescript/pnpm-lock.yaml
@@ -120,22 +120,6 @@ importers:
specifier: 4.1.0
- fleet:
- dependencies:
- '@ubjs/core':
- specifier: 0.31.0-3
- version: 0.31.0-3
- devDependencies:
- '@types/node':
- specifier: ^22.15.17
- version: 22.19.8
- esbuild:
- specifier: ^0.27.0
- version: 0.27.2
- typescript:
- specifier: ^5.9.0
- version: 5.9.3
-
playground:
dependencies:
'@radix-ui/react-dialog':
@@ -1129,9 +1113,6 @@ packages:
resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
- resolution: {integrity: sha512-39XrJgUZ2VVb561sSnkXPhczNoeBsNiSRArecsV0JE7CJq69ajFkcn9/tBAUS2NpgHkLIDU+z6Ks2+1wXnboxg==}
-
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
deprecated: Potential CWE-502 - Update to 1.3.1 or higher
@@ -2906,8 +2887,6 @@ snapshots:
dependencies:
'@types/node': 22.19.8
- '@ubjs/[email protected]': {}
-
'@ungap/[email protected]': {}
'@vitest/[email protected]':
diff --git a/libs/typescript/pnpm-workspace.yaml b/libs/typescript/pnpm-workspace.yaml
index ca809f3727..3939fa41ea 100644
--- a/libs/typescript/pnpm-workspace.yaml
+++ b/libs/typescript/pnpm-workspace.yaml
@@ -1,7 +1,6 @@
packages:
- "core"
- "agent"
- - "fleet"
- "playground"
- "cursor-motion"
diff --git a/scripts/docs-generators/config.json b/scripts/docs-generators/config.json
index 94f24d1572..a244e594e4 100644
--- a/scripts/docs-generators/config.json
+++ b/scripts/docs-generators/config.json
@@ -162,7 +162,6 @@
"generatorScript": "scripts/docs-generators/sandbox.ts",
"watchPaths": [
"libs/cua/python/pyproject.toml",
- "libs/typescript/fleet/package.json",
"libs/cua-driver/hyprland-plugin/packaging/release/profiles/omarchy-stable-20260910.json",
"scripts/docs-generators/sandbox-facts.json",
"scripts/docs-generators/sandbox-facts.schema.json",