@chatu-ai/builder-sdk 0.7.5 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -197,6 +197,17 @@ export interface BuilderClient {
197
197
  ready?: boolean;
198
198
  cleaned?: boolean;
199
199
  }>;
200
+ /** 休眠:保存快照后关闭 Pod(下次进入/发消息自动唤醒) */
201
+ hibernate(conversationId: string): Promise<{
202
+ ok: boolean;
203
+ state?: string;
204
+ skipped?: boolean;
205
+ }>;
206
+ /** 强制关闭 Pod:不做新快照,立即删除(沙箱卡死时用;保留已有快照) */
207
+ terminate(conversationId: string): Promise<{
208
+ ok: boolean;
209
+ state?: string;
210
+ }>;
200
211
  };
201
212
  versions: {
202
213
  list(conversationId: string, opts?: {
package/dist/client.js CHANGED
@@ -61,6 +61,8 @@ export function createBuilderClient(options) {
61
61
  share: (id, ttlHours) => req(`/${id}/preview-share`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ ttlHours }) }),
62
62
  revokeShare: (id, token) => req(`/${id}/preview-share/revoke`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ token }) }),
63
63
  restartDevServer: (id, opts) => req(`/${id}/devserver/restart?clean=${opts?.clean ? 'true' : 'false'}`, { method: 'POST' }),
64
+ hibernate: id => req(`/sandbox/${id}/hibernate`, { method: 'POST' }),
65
+ terminate: id => req(`/sandbox/${id}/terminate`, { method: 'POST' }),
64
66
  },
65
67
  versions: {
66
68
  // 服务端形状:{ versions: VersionInfo[] }(runtime 透传)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatu-ai/builder-sdk",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "ChatU Builder client SDK core: REST + streaming client, zod event schemas, seq resume",
5
5
  "license": "MIT",
6
6
  "type": "module",