feat(ts-sdk): add restart() and autoDeleteSeconds to Sandbox#1122
feat(ts-sdk): add restart() and autoDeleteSeconds to Sandbox#1122berstpander wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
整体看下来没有发现阻断合并的问题。实现范围清晰, 有一个小的可用性问题: 另外建议补一下 本地验证说明:我尝试运行 |
… add autoDeleteSeconds tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
重新看了最新更新,上一轮提到的 但现在文档里有一个新的状态语义问题:README 在 建议把 README 示例改成 |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
已完善 |
Summary
restart()method toSandboxclass, matching Python SDK behavior: POST/restart, then poll until alive with error stage detectionwaitForAlive()private helper fromstart()to share polling logic betweenstart()andrestart()(OOP reuse)parseErrorMessageFromStatus()to detect failed/timeout stages during restart polling (mirrors Python's_parse_error_message_from_status)getStatus()to supportincludeAllStatesparameterautoDeleteSecondsoptional field toSandboxConfigwith>= 0validation, included instart_asyncrequest bodyTest plan
restart(): no sandboxId guard, 4xxx/5xxx error codes, generic error, timeout, happy path, failed-stage detectionnpm linkin rockcliCloses #1121