@clawos-dev/clawd 0.2.435 → 0.2.436

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 CHANGED
@@ -8845,6 +8845,10 @@ var init_methods = __esm({
8845
8845
  summary: "\u7F6E\u9876 / \u53D6\u6D88\u7F6E\u9876\u8054\u7CFB\u4EBA",
8846
8846
  args: ContactPinArgsSchema
8847
8847
  },
8848
+ "org:peers": {
8849
+ summary: "\u540C\u7EC4\u7EC7\u6210\u5458\u5FEB\u7167\uFF08\u542B\u8FD8\u6CA1\u8FDE\u4E0A\u7684\uFF09\u3002owner-only\uFF1B\u6570\u636E\u6765\u81EA\u6700\u8FD1\u4E00\u8F6E org auto-mesh \u62C9\u53D6\uFF0Cdaemon \u5185\u5B58\u7F13\u5B58",
8850
+ args: NO_ARGS
8851
+ },
8848
8852
  "contact:setNote": {
8849
8853
  summary: "\u7ED9\u8054\u7CFB\u4EBA\uFF08\u5BF9\u65B9\u8BBE\u5907\uFF09\u5199\u5907\u6CE8\u3002owner \u672C\u5730\u79C1\u8BB0\uFF0C\u4E0D\u540C\u6B65\u7ED9\u5BF9\u65B9\uFF1B\u4E00\u4EBA\u591A\u8BBE\u5907\u65F6\u7528\u6765\u533A\u5206\u54EA\u53F0\u662F\u54EA\u53F0",
8850
8854
  args: ContactSetNoteArgsSchema
@@ -60183,8 +60187,13 @@ async function fetchOrgPeers(opts) {
60183
60187
  const body = await res.json();
60184
60188
  return body.items ?? [];
60185
60189
  }
60190
+ var lastPeers = [];
60191
+ function getCachedOrgPeers() {
60192
+ return lastPeers;
60193
+ }
60186
60194
  async function syncOrgMesh(deps) {
60187
60195
  const peers = await deps.fetchPeers();
60196
+ lastPeers = peers;
60188
60197
  if (peers.length === 0) {
60189
60198
  deps.log("org-mesh: \u4E0D\u5728\u4EFB\u4F55\u7EC4\u7EC7\uFF08\u6216\u7EC4\u91CC\u53EA\u6709\u81EA\u5DF1\uFF09\uFF0C\u8DF3\u8FC7");
60190
60199
  deps.onProgress?.({ total: 0, done: 0, connected: 0, failed: 0, active: false });
@@ -62131,6 +62140,12 @@ function buildContactHandlers(deps) {
62131
62140
  }
62132
62141
  };
62133
62142
  };
62143
+ const orgPeers = async (_frame, _client, ctx) => {
62144
+ ensureOwner2(ctx);
62145
+ return {
62146
+ response: { type: "org:peers:ok", peers: getCachedOrgPeers() }
62147
+ };
62148
+ };
62134
62149
  const remove = async (frame, _client, ctx) => {
62135
62150
  ensureOwner2(ctx);
62136
62151
  const args = parseArgs2(ContactRemoveArgsSchema, frame, "contact:remove");
@@ -62198,6 +62213,7 @@ function buildContactHandlers(deps) {
62198
62213
  "contact:list": list,
62199
62214
  "contact:pin": pin,
62200
62215
  "contact:setNote": setNote,
62216
+ "org:peers": orgPeers,
62201
62217
  "contact:remove": remove,
62202
62218
  "contact:handshake": handshake
62203
62219
  };
@@ -62383,6 +62399,7 @@ var METHOD_GRANT_MAP = {
62383
62399
  "contact:list": ADMIN_ANY,
62384
62400
  "contact:pin": ADMIN_ANY,
62385
62401
  "contact:setNote": ADMIN_ANY,
62402
+ "org:peers": ADMIN_ANY,
62386
62403
  "contact:remove": ADMIN_ANY,
62387
62404
  // contact:setRemoteAccess (owner UI 配远程访问授权):ADMIN_ANY
62388
62405
  // (对齐 inbox:postMessage 的"能连上=有 auth,业务在 handler 校"模式)
@@ -62634,7 +62651,7 @@ function computeMethodAccess(args) {
62634
62651
  }
62635
62652
 
62636
62653
  // src/version.ts
62637
- var version = "0.2.435".length > 0 ? "0.2.435" : "dev";
62654
+ var version = "0.2.436".length > 0 ? "0.2.436" : "dev";
62638
62655
 
62639
62656
  // src/cli-probe/probe.ts
62640
62657
  var fs65 = __toESM(require("fs"), 1);
@@ -23905,6 +23905,10 @@ var METHOD_DOCS = {
23905
23905
  summary: "\u7F6E\u9876 / \u53D6\u6D88\u7F6E\u9876\u8054\u7CFB\u4EBA",
23906
23906
  args: ContactPinArgsSchema
23907
23907
  },
23908
+ "org:peers": {
23909
+ summary: "\u540C\u7EC4\u7EC7\u6210\u5458\u5FEB\u7167\uFF08\u542B\u8FD8\u6CA1\u8FDE\u4E0A\u7684\uFF09\u3002owner-only\uFF1B\u6570\u636E\u6765\u81EA\u6700\u8FD1\u4E00\u8F6E org auto-mesh \u62C9\u53D6\uFF0Cdaemon \u5185\u5B58\u7F13\u5B58",
23910
+ args: NO_ARGS
23911
+ },
23908
23912
  "contact:setNote": {
23909
23913
  summary: "\u7ED9\u8054\u7CFB\u4EBA\uFF08\u5BF9\u65B9\u8BBE\u5907\uFF09\u5199\u5907\u6CE8\u3002owner \u672C\u5730\u79C1\u8BB0\uFF0C\u4E0D\u540C\u6B65\u7ED9\u5BF9\u65B9\uFF1B\u4E00\u4EBA\u591A\u8BBE\u5907\u65F6\u7528\u6765\u533A\u5206\u54EA\u53F0\u662F\u54EA\u53F0",
23910
23914
  args: ContactSetNoteArgsSchema