Skip to content

chore(apps): remove TypeScript cloud SDK#738

Merged
DorianZheng merged 1 commit into
feat/box-curated-image-bootfrom
codex/remove-ts-cloud-sdk
Jun 11, 2026
Merged

chore(apps): remove TypeScript cloud SDK#738
DorianZheng merged 1 commit into
feat/box-curated-image-bootfrom
codex/remove-ts-cloud-sdk

Conversation

@law-chain-hot

@law-chain-hot law-chain-hot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the publishable apps/libs/sdk-typescript project and its Nx/build references.
  • Replace Dashboard's prior @boxlite-ai/sdk usage with a Dashboard-private cloudBox adapter backed by generated REST clients.
  • Remove TypeScript Cloud SDK playground snippets so the UI no longer teaches users to install @boxlite-ai/sdk.

Why This Touches Many Files

The large diff is not because the delete itself is complicated. It is because apps/libs/sdk-typescript had two roles mixed together: it was a customer-facing package, and Dashboard was also importing it as an internal cloud box facade.

Legend:

  • *** DELETE TARGET *** = the package this PR removes.
  • *** REMOVED USER SURFACE *** = user-facing code/docs path removed because it advertised that package.
  • [kept] = still exists after this PR.
  • [new internal] = Dashboard-only replacement, not a public SDK.
BEFORE

*** REMOVED USER SURFACE ***
+------------------------------------------------+
| Playground TypeScript snippet                  |
| tells users: npm install @boxlite-ai/sdk       |
+-------------------------+----------------------+
                          |
                          | teaches users this package exists
                          v
+------------------------------------------------+      imports       +------------------------------------------------+
| Dashboard Playground                           | -----------------> | *** DELETE TARGET ***                          |
| hooks/providers/VNC/snippets                   |                    | apps/libs/sdk-typescript                       |
|                                                |                    | public package: @boxlite-ai/sdk                |
+------------------------------------------------+                    +-------------------------+----------------------+
                                                                                              |
                                                                                              | wraps
                                                                                              v
                                                                             +------------------------------------------------+
                                                                             | [kept] generated REST API clients             |
                                                                             | api-client / toolbox-api-client               |
                                                                             +-------------------------+----------------------+
                                                                                                       |
                                                                                                       | HTTP
                                                                                                       v
                                                                             +------------------------------------------------+
                                                                             | [kept] BoxLite API / toolbox runtime          |
                                                                             +------------------------------------------------+

Build graph tied to the delete target:
Dashboard tsconfig alias -> Vite SDK alias/polyfills -> Nx dependency -> Docker COPY -> eslint exception
AFTER

*** REMOVED USER SURFACE ***
+------------------------------------------------+
| Playground TypeScript snippet                  |
| npm install @boxlite-ai/sdk                    |
|                                                |
| STATUS: DELETED                                |
+------------------------------------------------+

*** DELETE TARGET ***
+------------------------------------------------+
| apps/libs/sdk-typescript                       |
| public package: @boxlite-ai/sdk                |
|                                                |
| STATUS: DELETED                                |
+------------------------------------------------+

Dashboard internal path, after removing the public SDK dependency:

+------------------------------------------------+      imports       +------------------------------------------------+
| [kept] Dashboard Playground                    | -----------------> | [new internal] Dashboard-private cloudBox       |
| hooks/providers/VNC/snippets                   |                    | apps/dashboard/src/lib/cloudBox.ts             |
|                                                |                    | small adapter; not published to customers      |
+------------------------------------------------+                    +-------------------------+----------------------+
                                                                                              |
                                                                                              | calls
                                                                                              v
                                                                             +------------------------------------------------+
                                                                             | [kept] generated REST API clients             |
                                                                             | api-client / toolbox-api-client               |
                                                                             +-------------------------+----------------------+
                                                                                                       |
                                                                                                       | HTTP
                                                                                                       v
                                                                             +------------------------------------------------+
                                                                             | [kept] BoxLite API / toolbox runtime          |
                                                                             +------------------------------------------------+

Build graph cleanup after deleting the target:
No @boxlite-ai/sdk alias -> no SDK Vite polyfills -> no Nx build edge -> no Docker COPY -> no SDK lint exception

So the diff fans out into four necessary buckets:

  1. Delete the public SDK project itself: apps/libs/sdk-typescript/**.
  2. Keep Dashboard working by replacing SDK imports with apps/dashboard/src/lib/cloudBox.ts.
  3. Stop advertising the removed SDK in Playground code snippets.
  4. Remove build-system references that would otherwise point at a deleted project.

Verification

  • NX_DAEMON=false corepack yarn nx build dashboard --configuration=development --nxBail=true --output-style=stream
  • NX_DAEMON=false corepack yarn nx build api --configuration=development --nxBail=true --output-style=stream
  • make lint:apps
  • rg -n "@boxlite-ai/sdk|sdk-typescript" . -S

@law-chain-hot law-chain-hot requested a review from a team as a code owner June 11, 2026 13:58
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 84ebb817-96fe-4a0e-9483-b69757657b49

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remove-ts-cloud-sdk

Comment @coderabbitai help to get the list of available commands and usage tips.

@DorianZheng DorianZheng merged commit 2f5aac6 into feat/box-curated-image-boot Jun 11, 2026
3 checks passed
@DorianZheng DorianZheng deleted the codex/remove-ts-cloud-sdk branch June 11, 2026 14:20
G4614 added a commit that referenced this pull request Jun 12, 2026
apps/libs/sdk-typescript was deleted in #738 (merged into #735 in this
branch). The Dockerfile.source COPY line was kept by mistake and broke
the Deploy API image build:

  failed to compute cache key: failed to calculate checksum of ref ...
  "/apps/libs/sdk-typescript": not found

The remaining 4 libs (runner-api-client, api-client, analytics-api-client,
toolbox-api-client) are what the API actually imports at runtime.
DorianZheng pushed a commit that referenced this pull request Jun 12, 2026
…main)" (#743) (#751)

Reverts #743. Restores `apps/libs/sdk-typescript` and the dashboard
cloudBox usage to the pre-#743 state (clean `git revert` of ad155d9, no
manual edits).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added TypeScript code snippet support to the Playground alongside
existing Python support.
* Introduced the BoxLite TypeScript SDK (`@boxlite-ai/sdk`), a new
package providing APIs for box management, file operations, git
workflows, code execution, and desktop automation.

* **Refactor**
* Migrated internal dashboard box operations to use the new SDK client
library.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
pull Bot pushed a commit to CrazyForks/boxlite that referenced this pull request Jun 12, 2026
…o main) (boxlite-ai#743)

## Summary
- Re-applies boxlite-ai#738 onto `main`. boxlite-ai#738 was merged with base
`feat/box-curated-image-boot` by mistake, so its content never reached
`main`.
- Removes the publishable `apps/libs/sdk-typescript` project and its
Nx/build references.
- Replaces Dashboard's `@boxlite-ai/sdk` usage with the
Dashboard-private `cloudBox` adapter backed by generated REST clients.
- Removes TypeScript Cloud SDK playground snippets so the UI no longer
teaches users to install `@boxlite-ai/sdk`.

## Differences from boxlite-ai#738
Cherry-pick of squash commit `2f5aac6b` with three conflict resolutions
against current `main`:
- `PlaygroundProvider.tsx`: kept the `cloudBox` import side;
`Image.debianSlim('3.13')` → `{ image: 'base' }` (identical to the boxlite-ai#738
resolved tree).
- `apps/dashboard/.storybook/main.ts`: removed a stale `@boxlite-ai/sdk`
vite alias added on `main` after boxlite-ai#738 branched.


## Architecture Context: why delete + rewrite (not a rename)

```
                BEFORE                                     AFTER
   ┌────────────────┐  ┌─────────────┐         ┌──────────────────────┐
   │ A. Dashboard   │  │ External TS │         │ A. Dashboard          │   External TS users
   └───────┬────────┘  │    users    │         │  ├ UI components      │        │
           │           └──────┬──────┘         │  ├ hooks              │        │
   ┌───────▼──────────────────▼──────┐         │  └ lib/cloudBox.ts ★NEW│       │
   │ B. @boxlite-ai/sdk             │          │    (458-line private  │        │
   │   (apps/libs/sdk-typescript)   │ DELETED  │     adapter)          │        │
   │   9.8k lines, Daytona-derived  │          └──────────┬────────────┘        │
   └───────────────┬───────────────┘                      │                     │
   ┌───────────────▼───────────────┐          ┌───────────▼─────────────────────▼──┐
   │ C. @boxlite-ai/api-client     │          │ C. @boxlite-ai/api-client          │
   │   (generated from OpenAPI)    │          │   (unchanged, still published)     │
   └───────────────┬───────────────┘          └───────────────┬────────────────────┘
                   ▼                                          ▼
              REST API (apps/api)                        REST API (apps/api)
```

**What each layer is.** `api-client` is machine-generated from the API's
OpenAPI
spec — it only knows how to call endpoints. The deleted SDK (B) and the
new
`cloudBox.ts` are the *handwritten glue* above it: form-params → DTO
mapping,
poll-until-started, attaching `.process`/`.fs` helpers to box objects.
Glue
logic is not in the OpenAPI contract, so it cannot be generated.

**Why `cloudBox.ts` is `added`, not `renamed`.** It is a from-scratch
minimal
reimplementation of the <5% of the SDK the Dashboard actually used: 458
lines
vs the SDK's 9.8k, only ~9 identical lines with the old `Box.ts`
(`git diff -M20%` detects no rename). Marking it a rename would wrongly
suggest
the full SDK class hierarchy survived.

**Why delete the SDK at all.**
1. *Provenance*: it is Daytona-derived AGPL code in a repo that competes
with
   Daytona — licensing and optics liability.
2. *Maintenance*: every API change (renames, DTO removals, client regen)
had to
   sweep 9.8k lines to serve a single internal consumer using <5% of it.
3. *Strategy*: our public SDK story is the dual-mode native SDKs
(Python/Node/Go/C, embedded engine + optional REST). A parallel
cloud-only
   TS SDK was a competing second "official way".

**What external users keep.** The cloud REST API is unchanged; the
generated
clients (`@boxlite-ai/api-client`, `api-client-go`) remain published.
Only the
convenience wrapper is gone.

**Known follow-ups (out of scope here).**
- `cloudBox.ts` still carries the Daytona AGPL header — needs a
clean-room pass.
- Dead tail to remove once Playground is officially retired: hidden
Playground
routes, `toolbox-api-client` TS package (zero runtime callers), and the
  computer-use/git sections of `cloudBox.ts`.

## Verification
- `vite build --minify false` error set diffed against an `origin/main`
baseline worktree: no new errors beyond pre-existing `main` failures
(line-number shifts only).
- Note: `dashboard:build` is currently broken on `main` itself
(lightningcss minify + `@boxlite-ai/api-client` resolution), unrelated
to this change.

## Relation to boxlite-ai#735
`feat/box-curated-image-boot` (boxlite-ai#735) will be rebuilt on top of this
branch so its diff contains only the curated-image work.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Dashboard now uses the CloudBox-backed API client for box creation and
session flows.

* **Bug Fixes**
* Refactored creation/loading flows to improve reliability when creating
or loading boxes.

* **Removed Features**
* TypeScript code snippet generation removed — Python is now the sole
generated language.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
law-chain-hot added a commit that referenced this pull request Jun 13, 2026
- Remove the publishable apps/libs/sdk-typescript project and its
Nx/build references.
- Replace Dashboard's prior @boxlite-ai/sdk usage with a
Dashboard-private cloudBox adapter backed by generated REST clients.
- Remove TypeScript Cloud SDK playground snippets so the UI no longer
teaches users to install @boxlite-ai/sdk.

The large diff is not because the delete itself is complicated. It is
because `apps/libs/sdk-typescript` had two roles mixed together: it was
a customer-facing package, and Dashboard was also importing it as an
internal cloud box facade.

Legend:
- `*** DELETE TARGET ***` = the package this PR removes.
- `*** REMOVED USER SURFACE ***` = user-facing code/docs path removed
because it advertised that package.
- `[kept]` = still exists after this PR.
- `[new internal]` = Dashboard-only replacement, not a public SDK.

```text
BEFORE

*** REMOVED USER SURFACE ***
+------------------------------------------------+
| Playground TypeScript snippet                  |
| tells users: npm install @boxlite-ai/sdk       |
+-------------------------+----------------------+
                          |
                          | teaches users this package exists
                          v
+------------------------------------------------+      imports       +------------------------------------------------+
| Dashboard Playground                           | -----------------> | *** DELETE TARGET ***                          |
| hooks/providers/VNC/snippets                   |                    | apps/libs/sdk-typescript                       |
|                                                |                    | public package: @boxlite-ai/sdk                |
+------------------------------------------------+                    +-------------------------+----------------------+
                                                                                              |
                                                                                              | wraps
                                                                                              v
                                                                             +------------------------------------------------+
                                                                             | [kept] generated REST API clients             |
                                                                             | api-client / toolbox-api-client               |
                                                                             +-------------------------+----------------------+
                                                                                                       |
                                                                                                       | HTTP
                                                                                                       v
                                                                             +------------------------------------------------+
                                                                             | [kept] BoxLite API / toolbox runtime          |
                                                                             +------------------------------------------------+

Build graph tied to the delete target:
Dashboard tsconfig alias -> Vite SDK alias/polyfills -> Nx dependency -> Docker COPY -> eslint exception
```

```text
AFTER

*** REMOVED USER SURFACE ***
+------------------------------------------------+
| Playground TypeScript snippet                  |
| npm install @boxlite-ai/sdk                    |
|                                                |
| STATUS: DELETED                                |
+------------------------------------------------+

*** DELETE TARGET ***
+------------------------------------------------+
| apps/libs/sdk-typescript                       |
| public package: @boxlite-ai/sdk                |
|                                                |
| STATUS: DELETED                                |
+------------------------------------------------+

Dashboard internal path, after removing the public SDK dependency:

+------------------------------------------------+      imports       +------------------------------------------------+
| [kept] Dashboard Playground                    | -----------------> | [new internal] Dashboard-private cloudBox       |
| hooks/providers/VNC/snippets                   |                    | apps/dashboard/src/lib/cloudBox.ts             |
|                                                |                    | small adapter; not published to customers      |
+------------------------------------------------+                    +-------------------------+----------------------+
                                                                                              |
                                                                                              | calls
                                                                                              v
                                                                             +------------------------------------------------+
                                                                             | [kept] generated REST API clients             |
                                                                             | api-client / toolbox-api-client               |
                                                                             +-------------------------+----------------------+
                                                                                                       |
                                                                                                       | HTTP
                                                                                                       v
                                                                             +------------------------------------------------+
                                                                             | [kept] BoxLite API / toolbox runtime          |
                                                                             +------------------------------------------------+

Build graph cleanup after deleting the target:
No @boxlite-ai/sdk alias -> no SDK Vite polyfills -> no Nx build edge -> no Docker COPY -> no SDK lint exception
```

So the diff fans out into four necessary buckets:

1. Delete the public SDK project itself: `apps/libs/sdk-typescript/**`.
2. Keep Dashboard working by replacing SDK imports with
`apps/dashboard/src/lib/cloudBox.ts`.
3. Stop advertising the removed SDK in Playground code snippets.
4. Remove build-system references that would otherwise point at a
deleted project.

- NX_DAEMON=false corepack yarn nx build dashboard
--configuration=development --nxBail=true --output-style=stream
- NX_DAEMON=false corepack yarn nx build api --configuration=development
--nxBail=true --output-style=stream
- make lint:apps
- rg -n "@boxlite-ai/sdk|sdk-typescript" . -S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants