@chatu-ai/builder-sdk 0.9.6 → 0.9.7

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
@@ -435,6 +435,15 @@ export interface BuilderClient {
435
435
  signal?: AbortSignal;
436
436
  }): AsyncIterable<FunctionDeployStreamEvent>;
437
437
  };
438
+ /**
439
+ * 生成事件里的单条消息全文(技术方案 22 S2):平台把超大的工具结果改为"预览 + 引用"下发,
440
+ * 前端展开时用 `chatuRef`(`{xid}/{seq}`)回取完整内容。
441
+ */
442
+ runMessage(conversationId: string, xid: string, seq: number): Promise<{
443
+ ok: boolean;
444
+ error?: string;
445
+ message?: Record<string, unknown>;
446
+ }>;
438
447
  /** 沙箱终端(001/09 P2-A):执行一条命令并流式回输出;AI 生成中会被拒绝(409) */
439
448
  exec(conversationId: string, command: string, opts?: {
440
449
  timeoutMs?: number;
package/dist/client.js CHANGED
@@ -105,6 +105,7 @@ export function createBuilderClient(options) {
105
105
  deployFunctionStream: (id, input, o) => readNamedSse(`${restBase}/${id}/export/deploy-function/stream`, auth.apply({ method: 'POST', headers: { 'content-type': 'application/json', accept: 'text/event-stream' }, body: JSON.stringify(input), signal: o?.signal }), doFetch),
106
106
  deployStream: (id, input, o) => readNamedSse(`${restBase}/${id}/export/deploy/stream`, auth.apply({ method: 'POST', headers: { 'content-type': 'application/json', accept: 'text/event-stream' }, body: JSON.stringify(input), signal: o?.signal }), doFetch),
107
107
  },
108
+ runMessage: (id, xid, seq) => req(`/${id}/runs/${encPath(xid)}/messages/${seq}`),
108
109
  exec: (id, command, o) => readNamedSse(`${restBase}/${id}/exec/stream`, auth.apply({ method: 'POST', headers: { 'content-type': 'application/json', accept: 'text/event-stream' }, body: JSON.stringify({ command, timeoutMs: o?.timeoutMs }), signal: o?.signal }), doFetch),
109
110
  data: {
110
111
  access: id => req(`/${id}/data-access`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatu-ai/builder-sdk",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "ChatU Builder client SDK core: REST + streaming client, zod event schemas, seq resume",
5
5
  "license": "MIT",
6
6
  "type": "module",