@clawos-dev/clawd 0.2.552 → 0.2.553
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/app-builder-plugin/mcp-server.cjs +7 -1
- package/dist/cli.cjs +36 -10
- package/dist/dispatch/mcp-server.cjs +4 -0
- package/dist/persona-defaults/persona-app-builder/mcp/clawd-app-builder/mcp-server.cjs +7 -1
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/mcp-server.cjs +7 -1
- package/dist/share-ui/assets/{guest-C7Ou9JHX.js → guest-CqERmFni.js} +115 -115
- package/dist/share-ui/guest.html +1 -1
- package/package.json +1 -1
|
@@ -24715,6 +24715,10 @@ var INNER_TAG_NAMES = "clawd-dispatch-task|clawd-dispatch-result|brief|detail|fi
|
|
|
24715
24715
|
var INNER_TAG_ESCAPE_RE = new RegExp(`<(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24716
24716
|
var INNER_TAG_UNESCAPE_RE = new RegExp(`<\\\\(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24717
24717
|
|
|
24718
|
+
// ../protocol/src/tool-family.ts
|
|
24719
|
+
var CLOUD_TOOL_SUFFIX = "-cloud";
|
|
24720
|
+
var CODEX_CLOUD_TOOL_ID = `codex${CLOUD_TOOL_SUFFIX}`;
|
|
24721
|
+
|
|
24718
24722
|
// src/deploy/deploy-file.ts
|
|
24719
24723
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
24720
24724
|
var import_node_path3 = __toESM(require("path"), 1);
|
|
@@ -24876,7 +24880,7 @@ var L = [
|
|
|
24876
24880
|
" rm -rf persona/.git",
|
|
24877
24881
|
" node clawos/cloud-host/provision/build-image.mjs \\",
|
|
24878
24882
|
" --manifest persona/.clawd/deploy.json \\",
|
|
24879
|
-
' --from "$REGISTRY/$IMAGE_NAME:base" \\',
|
|
24883
|
+
' --from "$REGISTRY/$IMAGE_NAME:base-${{ steps.plan.outputs.engine }}" \\',
|
|
24880
24884
|
" --persona-dir persona \\",
|
|
24881
24885
|
// persona 在镜像里落 /clawd/personas/<id>/(与本机同构),id 是 gateway 登记的名字;同 smoke / register 用的那个输出
|
|
24882
24886
|
" --persona-id '${{ steps.plan.outputs.persona_id }}' \\",
|
|
@@ -24928,6 +24932,7 @@ var L = [
|
|
|
24928
24932
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
24929
24933
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
24930
24934
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
24935
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
24931
24936
|
" --connectors '${{ steps.plan.outputs.connectors }}' \\",
|
|
24932
24937
|
" --run-number '${{ github.run_number }}'",
|
|
24933
24938
|
"",
|
|
@@ -24952,6 +24957,7 @@ var L = [
|
|
|
24952
24957
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
24953
24958
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
24954
24959
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
24960
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
24955
24961
|
" --connectors '${{ steps.plan.outputs.connectors }}'",
|
|
24956
24962
|
""
|
|
24957
24963
|
];
|
package/dist/cli.cjs
CHANGED
|
@@ -9718,11 +9718,12 @@ function isCodexFamily(tool) {
|
|
|
9718
9718
|
function isRpcAgentTool(tool) {
|
|
9719
9719
|
return isCodexFamily(tool) || tool === PI_TOOL_ID;
|
|
9720
9720
|
}
|
|
9721
|
-
var CODEX_CLOUD_TOOL_ID, PI_TOOL_ID;
|
|
9721
|
+
var CLOUD_TOOL_SUFFIX, CODEX_CLOUD_TOOL_ID, PI_TOOL_ID;
|
|
9722
9722
|
var init_tool_family = __esm({
|
|
9723
9723
|
"../protocol/src/tool-family.ts"() {
|
|
9724
9724
|
"use strict";
|
|
9725
|
-
|
|
9725
|
+
CLOUD_TOOL_SUFFIX = "-cloud";
|
|
9726
|
+
CODEX_CLOUD_TOOL_ID = `codex${CLOUD_TOOL_SUFFIX}`;
|
|
9726
9727
|
PI_TOOL_ID = "pi";
|
|
9727
9728
|
}
|
|
9728
9729
|
});
|
|
@@ -51856,6 +51857,7 @@ function driveCodexThread(opts) {
|
|
|
51856
51857
|
...translateNotification(method, params)
|
|
51857
51858
|
] : [];
|
|
51858
51859
|
if (events.length) sink.pushEvents(events);
|
|
51860
|
+
if (route === "foreground" && method === "turn/completed") opts.onTurnCompleted?.();
|
|
51859
51861
|
},
|
|
51860
51862
|
onServerRequest: (id, method, params) => {
|
|
51861
51863
|
const p3 = params ?? {};
|
|
@@ -59305,7 +59307,7 @@ var L2 = [
|
|
|
59305
59307
|
" rm -rf persona/.git",
|
|
59306
59308
|
" node clawos/cloud-host/provision/build-image.mjs \\",
|
|
59307
59309
|
" --manifest persona/.clawd/deploy.json \\",
|
|
59308
|
-
' --from "$REGISTRY/$IMAGE_NAME:base" \\',
|
|
59310
|
+
' --from "$REGISTRY/$IMAGE_NAME:base-${{ steps.plan.outputs.engine }}" \\',
|
|
59309
59311
|
" --persona-dir persona \\",
|
|
59310
59312
|
// persona 在镜像里落 /clawd/personas/<id>/(与本机同构),id 是 gateway 登记的名字;同 smoke / register 用的那个输出
|
|
59311
59313
|
" --persona-id '${{ steps.plan.outputs.persona_id }}' \\",
|
|
@@ -59357,6 +59359,7 @@ var L2 = [
|
|
|
59357
59359
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
59358
59360
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
59359
59361
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
59362
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
59360
59363
|
" --connectors '${{ steps.plan.outputs.connectors }}' \\",
|
|
59361
59364
|
" --run-number '${{ github.run_number }}'",
|
|
59362
59365
|
"",
|
|
@@ -59381,6 +59384,7 @@ var L2 = [
|
|
|
59381
59384
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
59382
59385
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
59383
59386
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
59387
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
59384
59388
|
" --connectors '${{ steps.plan.outputs.connectors }}'",
|
|
59385
59389
|
""
|
|
59386
59390
|
];
|
|
@@ -62488,6 +62492,7 @@ var GATEWAY_ROUTES = {
|
|
|
62488
62492
|
healthz: () => "/healthz",
|
|
62489
62493
|
session: (personaId2) => `/p/${encodeURIComponent(personaId2)}/session`,
|
|
62490
62494
|
sessionSend: (personaId2, sessionId) => `/p/${encodeURIComponent(personaId2)}/session/${encodeURIComponent(sessionId)}`,
|
|
62495
|
+
sessionMirror: (personaId2, sessionId) => `/p/${encodeURIComponent(personaId2)}/session/${encodeURIComponent(sessionId)}/mirror`,
|
|
62491
62496
|
// 调用方自己那块盘的用量(design 2026-09-19-cloud-volume-usage §3.3):同样按人、不挂 persona
|
|
62492
62497
|
volume: () => "/me/volume"
|
|
62493
62498
|
};
|
|
@@ -62504,7 +62509,7 @@ function cloudPersonaToFile(p3) {
|
|
|
62504
62509
|
return {
|
|
62505
62510
|
personaId: p3.personaId + CLOUD_PERSONA_ID_SUFFIX,
|
|
62506
62511
|
label: p3.personaId,
|
|
62507
|
-
tool:
|
|
62512
|
+
tool: p3.engine + CLOUD_TOOL_SUFFIX,
|
|
62508
62513
|
...p3.model ? { model: p3.model } : {},
|
|
62509
62514
|
...p3.effort ? { effort: p3.effort } : {},
|
|
62510
62515
|
public: false,
|
|
@@ -62552,9 +62557,14 @@ var CloudGatewayClient = class {
|
|
|
62552
62557
|
for (const raw of rows) {
|
|
62553
62558
|
const d2 = raw;
|
|
62554
62559
|
if (d2.kind !== "official" || typeof d2.personaId !== "string") continue;
|
|
62560
|
+
if (typeof d2.engine !== "string" || !d2.engine) {
|
|
62561
|
+
this.deps.logger?.warn("cloud persona row has no engine, skipped", { personaId: d2.personaId });
|
|
62562
|
+
continue;
|
|
62563
|
+
}
|
|
62555
62564
|
out.push({
|
|
62556
62565
|
personaId: d2.personaId,
|
|
62557
62566
|
gatewayUrl,
|
|
62567
|
+
engine: d2.engine,
|
|
62558
62568
|
...typeof d2.image === "string" ? { image: d2.image } : {},
|
|
62559
62569
|
...typeof d2.model === "string" && d2.model ? { model: d2.model } : {},
|
|
62560
62570
|
...typeof d2.effort === "string" && d2.effort ? { effort: d2.effort } : {},
|
|
@@ -62577,14 +62587,17 @@ var CloudGatewayClient = class {
|
|
|
62577
62587
|
/**
|
|
62578
62588
|
* 会话通道。返回的行流在 Pod 就绪前就能 write:写入先攒着,收到 `ready` 控制行后按序 POST 出去——
|
|
62579
62589
|
* 编排那头一构造就发 initialize,不用知道 Pod 还在起。
|
|
62590
|
+
* `toolSessionId`:调用方预分配的引擎会话 id(pi 的 --session-id;codex 的 thread id 是协议内的、不传),进 open 的 body `engineSessionId`
|
|
62591
|
+
* (契约 2026-09-18 §3.2)。
|
|
62580
62592
|
*/
|
|
62581
|
-
async openSession(personaId2) {
|
|
62593
|
+
async openSession(personaId2, opts = {}) {
|
|
62582
62594
|
const { apiKey, gatewayUrl } = await this.credentials();
|
|
62583
62595
|
return openHttpLineStream({
|
|
62584
62596
|
fetchImpl: this.fetchImpl,
|
|
62585
62597
|
gatewayUrl,
|
|
62586
62598
|
apiKey,
|
|
62587
62599
|
personaId: personaId2,
|
|
62600
|
+
...opts.toolSessionId ? { engineSessionId: opts.toolSessionId } : {},
|
|
62588
62601
|
logger: this.deps.logger
|
|
62589
62602
|
});
|
|
62590
62603
|
}
|
|
@@ -62629,7 +62642,7 @@ function parseControlLine(line) {
|
|
|
62629
62642
|
}
|
|
62630
62643
|
}
|
|
62631
62644
|
function openHttpLineStream(opts) {
|
|
62632
|
-
const { fetchImpl, gatewayUrl, apiKey, personaId: personaId2, logger } = opts;
|
|
62645
|
+
const { fetchImpl, gatewayUrl, apiKey, personaId: personaId2, engineSessionId, logger } = opts;
|
|
62633
62646
|
const headers = { authorization: `Bearer ${apiKey}`, "content-type": "application/json" };
|
|
62634
62647
|
const ac = new AbortController();
|
|
62635
62648
|
const lineCbs = [];
|
|
@@ -62686,7 +62699,7 @@ function openHttpLineStream(opts) {
|
|
|
62686
62699
|
res = await fetchImpl(gatewayUrl + GATEWAY_ROUTES.session(personaId2), {
|
|
62687
62700
|
method: "POST",
|
|
62688
62701
|
headers,
|
|
62689
|
-
body:
|
|
62702
|
+
body: JSON.stringify(engineSessionId ? { engineSessionId } : {}),
|
|
62690
62703
|
signal: ac.signal
|
|
62691
62704
|
});
|
|
62692
62705
|
} catch (e) {
|
|
@@ -62782,6 +62795,16 @@ function openHttpLineStream(opts) {
|
|
|
62782
62795
|
close: () => {
|
|
62783
62796
|
ac.abort();
|
|
62784
62797
|
finish();
|
|
62798
|
+
},
|
|
62799
|
+
mirror: async () => {
|
|
62800
|
+
if (closed || !sessionId) return;
|
|
62801
|
+
const url = gatewayUrl + GATEWAY_ROUTES.sessionMirror(personaId2, sessionId);
|
|
62802
|
+
try {
|
|
62803
|
+
const res = await fetchImpl(url, { method: "POST", headers, body: "" });
|
|
62804
|
+
if (!res.ok) logger?.warn("cloud session mirror failed", { status: res.status });
|
|
62805
|
+
} catch (e) {
|
|
62806
|
+
if (!closed) logger?.warn("cloud session mirror error", { message: e.message });
|
|
62807
|
+
}
|
|
62785
62808
|
}
|
|
62786
62809
|
};
|
|
62787
62810
|
}
|
|
@@ -62928,6 +62951,7 @@ function createCloudCodexSession(ctx, sink, deps) {
|
|
|
62928
62951
|
paths.catch(() => {
|
|
62929
62952
|
});
|
|
62930
62953
|
stream.onClose(() => rejectPaths(new Error("\u4E91\u4E0A\u901A\u9053\u5728 ready \u4E4B\u524D\u5173\u4E86\uFF0C\u62FF\u4E0D\u5230 Pod \u8DEF\u5F84")));
|
|
62954
|
+
let channel = null;
|
|
62931
62955
|
const driver = driveCodexThread({
|
|
62932
62956
|
ctx,
|
|
62933
62957
|
sink,
|
|
@@ -62937,7 +62961,8 @@ function createCloudCodexSession(ctx, sink, deps) {
|
|
|
62937
62961
|
imageInput: cloudImageInput(deps),
|
|
62938
62962
|
// skills 在 Pod 里由 persona 目录自带,本机路径对它没意义
|
|
62939
62963
|
// 「让对端走人」= 断开下行流,gateway 收到就删 Job;信号对 Pod 没有意义
|
|
62940
|
-
kill: () => stream.close()
|
|
62964
|
+
kill: () => stream.close(),
|
|
62965
|
+
onTurnCompleted: () => void channel?.mirror()
|
|
62941
62966
|
});
|
|
62942
62967
|
if (!personaId2) {
|
|
62943
62968
|
queueMicrotask(() => {
|
|
@@ -62947,7 +62972,8 @@ function createCloudCodexSession(ctx, sink, deps) {
|
|
|
62947
62972
|
return driver.session;
|
|
62948
62973
|
}
|
|
62949
62974
|
void deps.client.openSession(personaId2).then(
|
|
62950
|
-
(
|
|
62975
|
+
(opened) => {
|
|
62976
|
+
channel = opened;
|
|
62951
62977
|
channel.onControl((c2) => {
|
|
62952
62978
|
if (c2.kind === "ready") {
|
|
62953
62979
|
resolvePaths({ personaDir: c2.personaDir, workDir: c2.workDir });
|
|
@@ -70975,7 +71001,7 @@ function computeMethodAccess(args) {
|
|
|
70975
71001
|
}
|
|
70976
71002
|
|
|
70977
71003
|
// src/version.ts
|
|
70978
|
-
var version = "0.2.
|
|
71004
|
+
var version = "0.2.553".length > 0 ? "0.2.553" : "dev";
|
|
70979
71005
|
|
|
70980
71006
|
// src/cli-probe/probe.ts
|
|
70981
71007
|
var fs78 = __toESM(require("fs"), 1);
|
|
@@ -24529,6 +24529,10 @@ var INNER_TAG_NAMES = "clawd-dispatch-task|clawd-dispatch-result|brief|detail|fi
|
|
|
24529
24529
|
var INNER_TAG_ESCAPE_RE = new RegExp(`<(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24530
24530
|
var INNER_TAG_UNESCAPE_RE = new RegExp(`<\\\\(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24531
24531
|
|
|
24532
|
+
// ../protocol/src/tool-family.ts
|
|
24533
|
+
var CLOUD_TOOL_SUFFIX = "-cloud";
|
|
24534
|
+
var CODEX_CLOUD_TOOL_ID = `codex${CLOUD_TOOL_SUFFIX}`;
|
|
24535
|
+
|
|
24532
24536
|
// src/tools/claude-history.ts
|
|
24533
24537
|
var import_node_crypto = __toESM(require("crypto"), 1);
|
|
24534
24538
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
@@ -24715,6 +24715,10 @@ var INNER_TAG_NAMES = "clawd-dispatch-task|clawd-dispatch-result|brief|detail|fi
|
|
|
24715
24715
|
var INNER_TAG_ESCAPE_RE = new RegExp(`<(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24716
24716
|
var INNER_TAG_UNESCAPE_RE = new RegExp(`<\\\\(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24717
24717
|
|
|
24718
|
+
// ../protocol/src/tool-family.ts
|
|
24719
|
+
var CLOUD_TOOL_SUFFIX = "-cloud";
|
|
24720
|
+
var CODEX_CLOUD_TOOL_ID = `codex${CLOUD_TOOL_SUFFIX}`;
|
|
24721
|
+
|
|
24718
24722
|
// src/deploy/deploy-file.ts
|
|
24719
24723
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
24720
24724
|
var import_node_path3 = __toESM(require("path"), 1);
|
|
@@ -24876,7 +24880,7 @@ var L = [
|
|
|
24876
24880
|
" rm -rf persona/.git",
|
|
24877
24881
|
" node clawos/cloud-host/provision/build-image.mjs \\",
|
|
24878
24882
|
" --manifest persona/.clawd/deploy.json \\",
|
|
24879
|
-
' --from "$REGISTRY/$IMAGE_NAME:base" \\',
|
|
24883
|
+
' --from "$REGISTRY/$IMAGE_NAME:base-${{ steps.plan.outputs.engine }}" \\',
|
|
24880
24884
|
" --persona-dir persona \\",
|
|
24881
24885
|
// persona 在镜像里落 /clawd/personas/<id>/(与本机同构),id 是 gateway 登记的名字;同 smoke / register 用的那个输出
|
|
24882
24886
|
" --persona-id '${{ steps.plan.outputs.persona_id }}' \\",
|
|
@@ -24928,6 +24932,7 @@ var L = [
|
|
|
24928
24932
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
24929
24933
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
24930
24934
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
24935
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
24931
24936
|
" --connectors '${{ steps.plan.outputs.connectors }}' \\",
|
|
24932
24937
|
" --run-number '${{ github.run_number }}'",
|
|
24933
24938
|
"",
|
|
@@ -24952,6 +24957,7 @@ var L = [
|
|
|
24952
24957
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
24953
24958
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
24954
24959
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
24960
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
24955
24961
|
" --connectors '${{ steps.plan.outputs.connectors }}'",
|
|
24956
24962
|
""
|
|
24957
24963
|
];
|
|
@@ -24715,6 +24715,10 @@ var INNER_TAG_NAMES = "clawd-dispatch-task|clawd-dispatch-result|brief|detail|fi
|
|
|
24715
24715
|
var INNER_TAG_ESCAPE_RE = new RegExp(`<(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24716
24716
|
var INNER_TAG_UNESCAPE_RE = new RegExp(`<\\\\(\\\\*)(/?)(${INNER_TAG_NAMES})\\b`, "g");
|
|
24717
24717
|
|
|
24718
|
+
// ../protocol/src/tool-family.ts
|
|
24719
|
+
var CLOUD_TOOL_SUFFIX = "-cloud";
|
|
24720
|
+
var CODEX_CLOUD_TOOL_ID = `codex${CLOUD_TOOL_SUFFIX}`;
|
|
24721
|
+
|
|
24718
24722
|
// src/deploy/deploy-file.ts
|
|
24719
24723
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
24720
24724
|
var import_node_path3 = __toESM(require("path"), 1);
|
|
@@ -24876,7 +24880,7 @@ var L = [
|
|
|
24876
24880
|
" rm -rf persona/.git",
|
|
24877
24881
|
" node clawos/cloud-host/provision/build-image.mjs \\",
|
|
24878
24882
|
" --manifest persona/.clawd/deploy.json \\",
|
|
24879
|
-
' --from "$REGISTRY/$IMAGE_NAME:base" \\',
|
|
24883
|
+
' --from "$REGISTRY/$IMAGE_NAME:base-${{ steps.plan.outputs.engine }}" \\',
|
|
24880
24884
|
" --persona-dir persona \\",
|
|
24881
24885
|
// persona 在镜像里落 /clawd/personas/<id>/(与本机同构),id 是 gateway 登记的名字;同 smoke / register 用的那个输出
|
|
24882
24886
|
" --persona-id '${{ steps.plan.outputs.persona_id }}' \\",
|
|
@@ -24928,6 +24932,7 @@ var L = [
|
|
|
24928
24932
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
24929
24933
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
24930
24934
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
24935
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
24931
24936
|
" --connectors '${{ steps.plan.outputs.connectors }}' \\",
|
|
24932
24937
|
" --run-number '${{ github.run_number }}'",
|
|
24933
24938
|
"",
|
|
@@ -24952,6 +24957,7 @@ var L = [
|
|
|
24952
24957
|
" --model '${{ steps.plan.outputs.model }}' \\",
|
|
24953
24958
|
" --effort '${{ steps.plan.outputs.effort }}' \\",
|
|
24954
24959
|
" --size '${{ steps.plan.outputs.size }}' \\",
|
|
24960
|
+
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
24955
24961
|
" --connectors '${{ steps.plan.outputs.connectors }}'",
|
|
24956
24962
|
""
|
|
24957
24963
|
];
|