feat(sdk,cli): sandbox TTL support#74
Merged
Merged
Conversation
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
…ebase Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 71 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client-side support for the new sandbox TTL (maximum time to live) feature.
What TTL is
A wall-clock deadline after which a sandbox is destroyed regardless of its state (started, stopped, paused, archived). Class-agnostic and orthogonal to the idle-based intervals — no mutual exclusivity, no ephemeral/class gating.
API surface (all SDKs + CLI + MCP)
ttlMinutes— input-only create parameter (minutes;0= disabled). Client-side validated as a non-negative integer. Never stored or returned on the sandbox object.expiresAt— read-only field on the sandbox object, mapped from the DTO. Only set when a TTL is configured.setTtl(minutes)— re-anchors the deadline from the current time (sliding, so it can extend or shorten the remaining lifetime);0disables.daytona sandbox create --ttl <minutes>; MCP:ttlMinutesarg on thecreate_sandboxtool.Setter semantics
refreshData()/refresh_data(), which populatesexpiresAt.Per-language surface:
ttlMinutessandbox.expiresAtsandbox.setTtl()ttl_minutessandbox.expires_atsandbox.set_ttl()TtlMinutesSandbox.ExpiresAtttlMinutesgetExpiresAt()setTtl(int)ttl_minutes#expires_at#ttl_minutes=Generated clients
openapi-specs/api.jsonsynced with the new API surface; allapi-client*regenerated (setTtloperation,CreateSandbox.ttlMinutes,Sandbox.expiresAt). Regeneration is byte-stable against the committed spec.Summary by cubic
Add sandbox TTL across SDKs and CLI. Users can set a wall-clock expiration that destroys a sandbox when it elapses; the deadline is exposed as
autoDestroyAt.New Features
/sandbox/{sandboxIdOrName}/ttl/{ttlMinutes}(setTtl).openapi-specs/api.jsonupdated; allapi-client*regenerated.ttlMinutesand read-onlyautoDestroyAtinsdk-typescript,sdk-python(sync/async),sdk-java,sdk-ruby,sdk-go. Setters: TypeScriptsandbox.setTtl(minutes), Pythonsandbox.set_ttl(minutes)/async_sandbox.set_ttl(minutes), Javasandbox.setTtl(int), Rubysandbox.ttl_minutes = minutes; Go exposesAutoDestroyAtand acceptsTtlMinuteson create.0disables TTL. Setter re-anchors from now; server computes the deadline. CallrefreshData()/refresh_data()/#refreshto read updatedautoDestroyAt.daytona sandbox create --ttl <minutes>; MCPcreate_sandboxsupportsttlMinutes.autoDestroyAt.Refactors
expiresAttoautoDestroyAtacross SDKs, API clients, and docs.AutoDestroyAt; minor cleanup.Sandbox.setTtlvalidates non-negative input and delegates to the API without mutating local state; Java SDK docs fixed/clarified for TTL andgetAutoDestroyAt().Written for commit 340ee6b. Summary will update on new commits.