@chatu-ai/builder-sdk 0.8.3 → 0.8.4

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
@@ -157,6 +157,28 @@ export interface SandboxMeta {
157
157
  };
158
158
  } | null;
159
159
  }
160
+ /** 沙箱启动进度:step 0 调度 1 网络 2 拉镜像 3 启动容器 4 健康检查 5 就绪 */
161
+ export interface SandboxStartup {
162
+ ok: boolean;
163
+ state?: string;
164
+ exists?: boolean;
165
+ phase?: string | null;
166
+ ready?: boolean;
167
+ containerState?: string | null;
168
+ startedAt?: string | null;
169
+ elapsedMs?: number;
170
+ step?: number;
171
+ percent?: number;
172
+ etaSeconds?: number;
173
+ detail?: string | null;
174
+ events?: Array<{
175
+ type: string;
176
+ reason: string;
177
+ message: string;
178
+ time?: string | null;
179
+ count?: number;
180
+ }>;
181
+ }
160
182
  export type FunctionProvider = 'aliyun-fc' | 'tencent-scf' | 'volc-vefaas';
161
183
  /** 函数计算部署(技术方案 17):凭据二选一 credentialId(凭据库 aliyun/tencent/volcengine)或 accessKeyId+accessKeySecret */
162
184
  export interface FunctionDeployInput {
@@ -294,6 +316,8 @@ export interface BuilderClient {
294
316
  }>;
295
317
  /** 沙箱诊断信息:编排侧(状态/Pod/机型/时间/快照)+ runtime(版本/Node/Skills/CLI)+ 平台配置镜像 */
296
318
  meta(conversationId: string): Promise<SandboxMeta>;
319
+ /** 启动进度(Pod 事件推导):沙箱创建/恢复期间轮询展示 */
320
+ startup(conversationId: string): Promise<SandboxStartup>;
297
321
  };
298
322
  versions: {
299
323
  list(conversationId: string, opts?: {
package/dist/client.js CHANGED
@@ -64,6 +64,7 @@ export function createBuilderClient(options) {
64
64
  hibernate: id => req(`/sandbox/${id}/hibernate`, { method: 'POST' }),
65
65
  terminate: id => req(`/sandbox/${id}/terminate`, { method: 'POST' }),
66
66
  meta: id => req(`/sandbox/${id}/meta`),
67
+ startup: id => req(`/sandbox/${id}/startup`),
67
68
  },
68
69
  versions: {
69
70
  // 服务端形状:{ versions: VersionInfo[] }(runtime 透传)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatu-ai/builder-sdk",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "ChatU Builder client SDK core: REST + streaming client, zod event schemas, seq resume",
5
5
  "license": "MIT",
6
6
  "type": "module",