fix(daytona): bump @daytonaio/sdk, supplement sandboxClass/warmPoolId - #18
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CI status note: The code itself is verified independent of the lockfile: I manually staged the real published
|
There was a problem hiding this comment.
All reported issues were addressed
You’re at about 94% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…bump Regenerated on sf-mini via `npm install --package-lock-only --ignore-scripts` because finn-mini's npm is currently broken (fresh invocations hang past 10s). The wire-supplement lane could not regenerate in place. Only version deltas: @daytonaio/sdk 0.180 -> 0.205.1 (the lane's intentional bump), plus ambient transitive updates from npm resolving the fresh tree. Unblocks PR #18 CI. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Session-Id: f56857b6-e478-4e59-8347-a6ff75eda70a
@daytonaio/sdk was pinned to 0.180.0 (2026-05-24), 25 minor versions stale against 0.205.1 (2026-08-20). Diffing published sandbox.d.ts across versions plus sdk-typescript/src/Sandbox.ts at daytona/clients HEAD found: autoDestroyAt, autoPauseInterval, and spot already ship on the public Sandbox class as of 0.200.0-0.205.0 — the bump alone covers them. sandboxClass and warmPoolId exist on the low-level DTOs but are never copied onto the Sandbox class by processSandboxDto(), even at HEAD today — a real, narrower gap than initially reported. Adds src/daytona/wire-supplement.ts, a small opt-in supplement that fetches just those two fields via the sandboxApi reach pattern runtime.ts already uses for detached create, exposed as DaytonaRuntime.getWireSupplement(). Verified against the real published 0.180.0-0.205.1 packages and daytona/clients HEAD (network fetched directly; npm itself is hung on this host, unrelated to this change - full tsc --noEmit and the full repo test suite both pass against manually-staged 0.205.1 packages). Breaking-change scan across the 25-version gap covered every method this adapter calls (create/get/list/start/stop/delete, process exec and session methods, fs upload/download, getUserHomeDir) - all signatures unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKnyrbCWt7pGerVyqpHQVD Session-Id: 6aa037d4-d436-4903-abe6-d7efe59f29e7 Session-Id: c910de84-ae88-49ad-a6f5-373b7b55f6dc
daytona/clients#207. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKnyrbCWt7pGerVyqpHQVD Session-Id: 6aa037d4-d436-4903-abe6-d7efe59f29e7 Session-Id: c910de84-ae88-49ad-a6f5-373b7b55f6dc
…bump Regenerated on sf-mini via `npm install --package-lock-only --ignore-scripts` because finn-mini's npm is currently broken (fresh invocations hang past 10s). The wire-supplement lane could not regenerate in place. Only version deltas: @daytonaio/sdk 0.180 -> 0.205.1 (the lane's intentional bump), plus ambient transitive updates from npm resolving the fresh tree. Unblocks PR #18 CI. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Session-Id: f56857b6-e478-4e59-8347-a6ff75eda70a Session-Id: c910de84-ae88-49ad-a6f5-373b7b55f6dc
f8b3798 to
80c0c3c
Compare
Status update — worker on
|
Resolves conflicts between the microsandbox provider adapter and main's concurrent agent37 adapter, port capability-modes feature (#17), and daytona sdk bump (#18): - types.ts / port.ts: both branches independently added ExecResult.truncated / RunScriptResult.truncated with contradictory doc claims (this branch: an absent flag guarantees completeness; main: absent means "not reported," not a completeness guarantee). Kept main's weaker, provider-agnostic contract since it's the correct baseline for a type shared across adapters of varying capability; microsandbox's stronger internal guarantee is preserved as an implementation-level comment in runtime.ts, not the type contract. - index.ts: purely additive - concatenated the microsandbox and agent37 export blocks. - package.json / package-lock.json: took main's @daytonaio/sdk range bump (>=0.205.0 <0.206.0) and added the microsandbox peer dependency on top; hand-merged the lockfile's alphabetical package block (@socket.io vs @superradcompany) since npm is hung host-wide on this node right now. - README.md: auto-merged cleanly, both provider sections intact. No functional changes to microsandbox/runtime.ts itself. Session-Id: e9385da2-3504-42c7-9668-5f0129c683dd
Summary
Track 4 wire-supplement lane. Original charter (relayed via
sandbox-lead-claude-0820b) claimed 5 Daytona wire fields (autoDestroyAt,autoPauseInterval,sandboxClass,spot,warmPoolId) were entirely missing from@daytona/api-client's SDK types. Independently re-verified against the real upstream (daytona/clientson GitHub, npm registry) before writing any code — that premise didn't hold:autoDestroyAt,autoPauseInterval,spot(+spotEvictedAt) already ship on the publicSandboxclass as of@daytonaio/sdk0.200.0–0.205.0. Our repo was just pinned to 0.180.0 (2026-05-24), 25 minor versions / ~3 months stale against latest 0.205.1 (2026-08-20). A dependency bump alone covers these three.sandboxClass,warmPoolIdare a real, narrower gap: present on the low-level@daytona/api-clientDTOs, butsdk-typescript'sprocessSandboxDto()never copies them onto the publicSandboxclass — confirmed againstdaytona/clientsHEAD today, not just our stale pin. This needs the small supplement below.Filing the originally-briefed "5 fields missing" issue upstream would have misrepresented
daytona/clients' own already-shipped work (#192"feat: spot gpus" etc.) to a real maintainer. Revised scope signed off bysandbox-lead-claude-0820bbefore any code was written.Changes
package.json: bump@daytonaio/sdkpeer/dev dependency from>=0.180.0 <0.181.0/^0.180.0to>=0.205.0 <0.206.0/^0.205.1.src/daytona/wire-supplement.ts(new):fetchDaytonaWireSupplement()fetchessandboxClass+warmPoolIdvia the low-levelsandboxApi.getSandbox()— the same reach patternruntime.tsalready uses for detached create — since the SDK'sSandboxclass drops both.src/daytona/runtime.ts: exposes it asDaytonaRuntime.getWireSupplement(handle). Opt-in, not merged into the sharedRuntimeHandle/WorkflowRuntimetypes — this is Daytona-specific, not something to generalize across providers.src/index.ts: barrel-exportsfetchDaytonaWireSupplement/DaytonaWireSupplement.README.md: new "Daytona wire-supplement" section (matching the existing "E2B runtime contract" convention — this repo documents providers inline in the README, not adocs/folder) explaining the gap, retirement path, and linking the upstream tracking issue.src/daytona/runtime.test.ts):getWireSupplement(present + absent field cases) against a fakedsandboxApi.DAYTONA_API_KEY-gated smoke suite with a MUST-FIRE/MUST-NOT-FIRE pair: asserts the live wire response still carriessandboxClass(fails if Daytona drops it), and asserts the SDK's ownSandboxclass still exposesautoDestroyAt/autoPauseInterval/spot(fails if a future SDK regresses those).warmPoolIdisn't asserted live — it's only set for unclaimed warm-pool members, which the ordinary smoke sandbox isn't; asserting it would require standing up a warm-pool sandbox, out of scope here.Breaking-change scan
Walked every
daytona/clientsPR merged since 0.180.0's publish date against every method this adapter calls:create/get/list/start/stop/delete,process.executeCommand/createSession/executeSessionCommand/getSession/getSessionCommand/getSessionCommandLogs,fs.uploadFile/downloadFile/getUserHomeDir. All confirmed unchanged by diffing the currentsdk-typescriptsource directly, not just changelogs. The one PR touching error codes (#149) was TypeScript-SDK-only-already-had-it; the change propagated other-language SDKs, no TS impact. Full details in the commit message.Verification
npmitself hangs indefinitely on this host (evennpm --version, unrelated to this change — confirmed hanging in an empty scratch dir too, and multiple other agents'pnpm/npmprocesses on this machine are also stuck; looks like host-level resource contention across the fleet, not this change). Worked around it: manually staged the real published@daytonaio/sdk@0.205.1+@daytona/api-client@0.205.1(+ transitive deps) intonode_modulesvia direct registrycurl(registry access works fine, only thenpmbinary itself hangs), then ran the compiler/test runner directly:node node_modules/typescript/bin/tsc -p tsconfig.json --noEmit— clean, zero errors, fullsrc/tree, strict mode.node --import tsx --test "src/**/*.test.ts"— 201 pass, 0 fail, 4 skipped (theDAYTONA_API_KEY/other-provider-key-gated smoke tests — no live credential available yet).Please still run
npm ci && npm testin CI/your own environment before merge as a sanity check — I could not use the repo's own tooling to verify this, only a manual dependency-staging workaround.Upstream
Filed against
daytona/clients(the real repo —daytonaio/api-clientas originally briefed doesn't exist): daytona/clients#207Out of scope (left alone)
daytona-lifecycle-fix-0820's exec-dead-after-restart bug (lane/daytona-lifecycle-fix-0820, PR fix(daytona): recover exec after sandbox restart #14) — untouched.