@clawos-dev/clawd 0.2.768 → 0.2.769
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/cli.cjs +11 -3
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -57884,6 +57884,7 @@ function createA2aHost(deps) {
|
|
|
57884
57884
|
if (ref.kind === "device") return { kind: "local", deviceId: ref.deviceId, personaId: ref.personaId };
|
|
57885
57885
|
const p3 = deps.persona(ref.personaId);
|
|
57886
57886
|
if (!p3) throw new ClawdError(ERROR_CODES.INVALID_PARAM, `\u672C\u673A\u6CA1\u6709 persona ${ref.personaId}\uFF1B\u8054\u7CFB\u4EBA\u8BBE\u5907\u4E0A\u7684\u5199\u6210 <personaId>@<deviceId>\uFF0C\u4E91\u4E0A\u7684\u5199\u6210 cloud:<personaId>`);
|
|
57887
|
+
if (p3.cloud?.environment === "integration") throw new ClawdError(ERROR_CODES.INVALID_PARAM, `${ref.personaId} \u662F\u6D4B\u8BD5\u53D1\u5E03\u955C\u50CF\uFF0CA2A \u4E0D\u652F\u6301\uFF1B\u8BF7\u6D3E\u7ED9\u6B63\u5F0F\u73AF\u5883\u7684 persona`);
|
|
57887
57888
|
return p3.cloud ? { kind: "cloud", personaId: p3.cloud.personaId } : { kind: "local", deviceId: deps.deviceId(), personaId: ref.personaId };
|
|
57888
57889
|
}
|
|
57889
57890
|
function checkTopicGate(call) {
|
|
@@ -57897,7 +57898,8 @@ function createA2aHost(deps) {
|
|
|
57897
57898
|
if (ref.kind === "device") return m3.personaId === ref.personaId && m3.deviceId === ref.deviceId;
|
|
57898
57899
|
if (m3.deviceId && m3.deviceId !== me2) return false;
|
|
57899
57900
|
if (m3.personaId === ref.personaId) return true;
|
|
57900
|
-
|
|
57901
|
+
const mirror = deps.persona(m3.personaId)?.cloud;
|
|
57902
|
+
return ref.kind === "cloud" && mirror?.environment !== "integration" && mirror?.personaId === ref.personaId;
|
|
57901
57903
|
});
|
|
57902
57904
|
if (!ok2) throw new ClawdError(ERROR_CODES.INVALID_PARAM, `${call.target} is not a member of the channel behind topic ${topicId} \u2014\u2014 \u5148\u628A\u5B83\u52A0\u8FDB\u9891\u9053\u518D\u6D3E\u6D3B`);
|
|
57903
57905
|
}
|
|
@@ -58094,6 +58096,12 @@ function createA2aHost(deps) {
|
|
|
58094
58096
|
};
|
|
58095
58097
|
}
|
|
58096
58098
|
|
|
58099
|
+
// src/a2a/cloud-mirror.ts
|
|
58100
|
+
function pickCloudMirror(personas, cloudPersonaId) {
|
|
58101
|
+
const mirrors = personas.filter((p3) => p3.cloud?.personaId === cloudPersonaId);
|
|
58102
|
+
return mirrors.find((p3) => p3.cloud?.environment !== "integration") ?? mirrors[0];
|
|
58103
|
+
}
|
|
58104
|
+
|
|
58097
58105
|
// src/a2a/handlers.ts
|
|
58098
58106
|
init_protocol();
|
|
58099
58107
|
var argsOf = (frame) => {
|
|
@@ -76696,7 +76704,7 @@ function computeMethodAccess(args) {
|
|
|
76696
76704
|
}
|
|
76697
76705
|
|
|
76698
76706
|
// src/version.ts
|
|
76699
|
-
var version = "0.2.
|
|
76707
|
+
var version = "0.2.769".length > 0 ? "0.2.769" : "dev";
|
|
76700
76708
|
|
|
76701
76709
|
// src/cli-probe/probe.ts
|
|
76702
76710
|
var fs87 = __toESM(require("fs"), 1);
|
|
@@ -80554,7 +80562,7 @@ async function startDaemon(config) {
|
|
|
80554
80562
|
injectResult: (sid, text) => manager.injectIntoSession(sid, text, "a2a-result"),
|
|
80555
80563
|
// 云 worker 会话挂到发起会话下面:本机要有这个云 persona 的镜像(会话 cwd / 引擎从它来),没有就只留在台账里
|
|
80556
80564
|
mountCloudWorker: (view, initiator) => {
|
|
80557
|
-
const mirror = personaRegistry.list()
|
|
80565
|
+
const mirror = pickCloudMirror(personaRegistry.list(), view.targetPersonaId);
|
|
80558
80566
|
if (!mirror || !view.executorSessionRef) return null;
|
|
80559
80567
|
try {
|
|
80560
80568
|
const { response, broadcast } = manager.create(
|