@clawos-dev/clawd 0.2.543 → 0.2.544
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 +14 -6
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -62522,6 +62522,10 @@ var CloudGatewayClient = class {
|
|
|
62522
62522
|
}
|
|
62523
62523
|
async listPersonas() {
|
|
62524
62524
|
const { gatewayUrl } = await this.locate();
|
|
62525
|
+
return this.fetchDeployments(gatewayUrl);
|
|
62526
|
+
}
|
|
62527
|
+
/** /healthz 的登记表 → official 行。gatewayUrl 由调用方定:listPersonas 从中心拿,personaConnectors 用 persona 文件里的 */
|
|
62528
|
+
async fetchDeployments(gatewayUrl) {
|
|
62525
62529
|
const res = await this.fetchImpl(gatewayUrl + GATEWAY_ROUTES.healthz());
|
|
62526
62530
|
if (!res.ok) throw new Error(`gateway /healthz \u56DE ${res.status}`);
|
|
62527
62531
|
const body = await res.json();
|
|
@@ -62543,9 +62547,13 @@ var CloudGatewayClient = class {
|
|
|
62543
62547
|
}
|
|
62544
62548
|
return out;
|
|
62545
62549
|
}
|
|
62546
|
-
/**
|
|
62547
|
-
|
|
62548
|
-
|
|
62550
|
+
/**
|
|
62551
|
+
* gateway 登记行上这个 persona(gateway 名)装了哪些连接器;没这行 = 空。
|
|
62552
|
+
* gatewayUrl 从 persona 文件的 cloud.gatewayUrl 来,**不经 locate()**:那一跳只为拿同一个地址,
|
|
62553
|
+
* 远端网络下白等 ~1s(design 2026-09-19-cloud-connectors-skip-locate)。/healthz 不看票,这里也不要求登录。
|
|
62554
|
+
*/
|
|
62555
|
+
async personaConnectors(gatewayPersonaId, gatewayUrl) {
|
|
62556
|
+
const list = await this.fetchDeployments(trimSlash(gatewayUrl));
|
|
62549
62557
|
return list.find((p3) => p3.personaId === gatewayPersonaId)?.connectors ?? [];
|
|
62550
62558
|
}
|
|
62551
62559
|
/**
|
|
@@ -70582,7 +70590,7 @@ function buildCloudConnectorsHandlers(deps) {
|
|
|
70582
70590
|
const persona = deps.getPersona(personaId2);
|
|
70583
70591
|
if (!persona) throw new ClawdError(ERROR_CODES.PERSONA_NOT_FOUND, `PERSONA_NOT_FOUND: \u6CA1\u6709\u8FD9\u4E2A persona\uFF08${personaId2}\uFF09`);
|
|
70584
70592
|
if (!persona.cloud) throw invalid2(`${personaId2} \u4E0D\u662F\u4E91\u4E0A persona\uFF0C\u6CA1\u6709\u8FDE\u63A5\u5668\u533A`);
|
|
70585
|
-
const all = await deps.gatewayConnectors(persona.cloud.personaId);
|
|
70593
|
+
const all = await deps.gatewayConnectors(persona.cloud.personaId, persona.cloud.gatewayUrl);
|
|
70586
70594
|
return { gatewayPersonaId: persona.cloud.personaId, connectors: all.filter((c2) => c2.credentialSource === "personal") };
|
|
70587
70595
|
}
|
|
70588
70596
|
const list = async (frame, _client, ctx) => {
|
|
@@ -70919,7 +70927,7 @@ function computeMethodAccess(args) {
|
|
|
70919
70927
|
}
|
|
70920
70928
|
|
|
70921
70929
|
// src/version.ts
|
|
70922
|
-
var version = "0.2.
|
|
70930
|
+
var version = "0.2.544".length > 0 ? "0.2.544" : "dev";
|
|
70923
70931
|
|
|
70924
70932
|
// src/cli-probe/probe.ts
|
|
70925
70933
|
var fs78 = __toESM(require("fs"), 1);
|
|
@@ -74508,7 +74516,7 @@ async function startDaemon(config) {
|
|
|
74508
74516
|
// 连没连上问中心。登录票只在 daemon 内部传给中心,与 apiKeyClient 同一条纪律。
|
|
74509
74517
|
cloudConnectors: {
|
|
74510
74518
|
getPersona: (personaId2) => personaRegistry.get(personaId2),
|
|
74511
|
-
gatewayConnectors: (gatewayPersonaId) => cloudGateway.personaConnectors(gatewayPersonaId),
|
|
74519
|
+
gatewayConnectors: (gatewayPersonaId, gatewayUrl) => cloudGateway.personaConnectors(gatewayPersonaId, gatewayUrl),
|
|
74512
74520
|
getLoginPass: () => ownerIdentityStore.read()?.loginPass ?? null,
|
|
74513
74521
|
central: {
|
|
74514
74522
|
mine: (args) => centralConnectorsMine({ api: config.clawosApi ?? DEFAULT_CLAWOS_API, ...args }),
|