@chatu-ai/builder-sdk 0.8.1 → 0.8.2
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 +39 -0
- package/dist/client.js +1 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -116,6 +116,43 @@ export interface DataUsage {
|
|
|
116
116
|
rates?: Record<string, number>;
|
|
117
117
|
error?: string;
|
|
118
118
|
}
|
|
119
|
+
/** 沙箱诊断信息(技术方案 08):用于判断 Pod 是否已使用最新镜像、是否加载了预期能力 */
|
|
120
|
+
export interface SandboxMeta {
|
|
121
|
+
ok: boolean;
|
|
122
|
+
sandbox?: {
|
|
123
|
+
sandboxId?: string;
|
|
124
|
+
state?: string;
|
|
125
|
+
podName?: string | null;
|
|
126
|
+
machineType?: string | null;
|
|
127
|
+
createdAt?: string | null;
|
|
128
|
+
lastActivity?: string | null;
|
|
129
|
+
lastAgentActivity?: string | null;
|
|
130
|
+
hasSnapshot?: boolean;
|
|
131
|
+
snapshotKey?: string | null;
|
|
132
|
+
};
|
|
133
|
+
/** 平台当前配置的 Builder 镜像(与 runtime.version 对照可判断 Pod 是否为最新) */
|
|
134
|
+
configuredImage?: string | null;
|
|
135
|
+
runtime?: {
|
|
136
|
+
ok?: boolean;
|
|
137
|
+
error?: string;
|
|
138
|
+
message?: string;
|
|
139
|
+
version?: string | null;
|
|
140
|
+
image?: string | null;
|
|
141
|
+
node?: string;
|
|
142
|
+
startedAt?: string;
|
|
143
|
+
uptimeMs?: number;
|
|
144
|
+
workspaceDir?: string;
|
|
145
|
+
appSdkVersion?: string | null;
|
|
146
|
+
skills?: string[];
|
|
147
|
+
clis?: Record<string, string | null>;
|
|
148
|
+
devServer?: Record<string, unknown>;
|
|
149
|
+
agent?: {
|
|
150
|
+
executing?: boolean;
|
|
151
|
+
xid?: string | null;
|
|
152
|
+
sinceMs?: number | null;
|
|
153
|
+
};
|
|
154
|
+
} | null;
|
|
155
|
+
}
|
|
119
156
|
export type FunctionProvider = 'aliyun-fc' | 'tencent-scf' | 'volc-vefaas';
|
|
120
157
|
/** 函数计算部署(技术方案 17):凭据二选一 credentialId(凭据库 aliyun/tencent/volcengine)或 accessKeyId+accessKeySecret */
|
|
121
158
|
export interface FunctionDeployInput {
|
|
@@ -251,6 +288,8 @@ export interface BuilderClient {
|
|
|
251
288
|
ok: boolean;
|
|
252
289
|
state?: string;
|
|
253
290
|
}>;
|
|
291
|
+
/** 沙箱诊断信息:编排侧(状态/Pod/机型/时间/快照)+ runtime(版本/Node/Skills/CLI)+ 平台配置镜像 */
|
|
292
|
+
meta(conversationId: string): Promise<SandboxMeta>;
|
|
254
293
|
};
|
|
255
294
|
versions: {
|
|
256
295
|
list(conversationId: string, opts?: {
|
package/dist/client.js
CHANGED
|
@@ -63,6 +63,7 @@ export function createBuilderClient(options) {
|
|
|
63
63
|
restartDevServer: (id, opts) => req(`/${id}/devserver/restart?clean=${opts?.clean ? 'true' : 'false'}`, { method: 'POST' }),
|
|
64
64
|
hibernate: id => req(`/sandbox/${id}/hibernate`, { method: 'POST' }),
|
|
65
65
|
terminate: id => req(`/sandbox/${id}/terminate`, { method: 'POST' }),
|
|
66
|
+
meta: id => req(`/sandbox/${id}/meta`),
|
|
66
67
|
},
|
|
67
68
|
versions: {
|
|
68
69
|
// 服务端形状:{ versions: VersionInfo[] }(runtime 透传)
|