volute 0.36.0 → 0.37.1

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.
Files changed (140) hide show
  1. package/dist/{accept-ZBDVVCEU.js → accept-AHAOUFBK.js} +4 -4
  2. package/dist/{activity-events-PWOGSMRL.js → activity-events-N6HCHU4P.js} +4 -4
  3. package/dist/{ai-service-GSZWIETO.js → ai-service-C2YNARGH.js} +5 -5
  4. package/dist/{api-client-3A77HMH7.js → api-client-LC5YRA32.js} +1 -1
  5. package/dist/{archive-Y2YEOCGB.js → archive-AWIJTVQV.js} +4 -4
  6. package/dist/{auth-YTQME4EV.js → auth-2QOOPMBX.js} +5 -5
  7. package/dist/{bridge-PXIO6PS2.js → bridge-F3ZJEKDN.js} +4 -4
  8. package/dist/{chat-ED7YOGKO.js → chat-5Y4FD77E.js} +9 -9
  9. package/dist/{chunk-75AJ54GM.js → chunk-2NHRJ3YO.js} +1 -1
  10. package/dist/{chunk-PJ4IPTIN.js → chunk-3F7XK5Q7.js} +1 -1
  11. package/dist/{chunk-6F3YNULE.js → chunk-4L2Q7IP5.js} +16 -16
  12. package/dist/{chunk-IIWF2IPD.js → chunk-5DPRTREW.js} +3 -3
  13. package/dist/{chunk-X2J7QUFH.js → chunk-7AZQFSOV.js} +1 -1
  14. package/dist/{chunk-NUX47Y2V.js → chunk-A6FLW5XD.js} +1 -1
  15. package/dist/{chunk-SWW6AUVW.js → chunk-BIEWHAAM.js} +1 -1
  16. package/dist/{chunk-TWAN7ZNO.js → chunk-CF4SO5L3.js} +3 -3
  17. package/dist/{chunk-7PTQGPJY.js → chunk-CJ26DXZL.js} +1 -1
  18. package/dist/{chunk-PY557GDR.js → chunk-GVVVMZ4J.js} +1 -1
  19. package/dist/chunk-K3NQKI34.js +10 -0
  20. package/dist/{chunk-BOLJUV77.js → chunk-KXXJYY62.js} +4 -4
  21. package/dist/chunk-LIIX2MOM.js +853 -0
  22. package/dist/chunk-LQ6Z4FXN.js +87 -0
  23. package/dist/{chunk-N2AUHW4C.js → chunk-MQRS4J24.js} +2 -2
  24. package/dist/{chunk-B35VNNSS.js → chunk-N42QMDID.js} +2 -2
  25. package/dist/{chunk-M5RYAA5I.js → chunk-ORNY3MZR.js} +4 -4
  26. package/dist/{chunk-YDBAY3NA.js → chunk-PMMHVSCR.js} +1 -1
  27. package/dist/{chunk-GBDVNPN2.js → chunk-QJGLTPAP.js} +8 -8
  28. package/dist/{chunk-DQ7VBXAP.js → chunk-RUIVWCYY.js} +122 -81
  29. package/dist/{chunk-L72WYMF7.js → chunk-SNW2NPP4.js} +1 -1
  30. package/dist/chunk-SZJWC2GA.js +125 -0
  31. package/dist/{chunk-DJT5Y4UF.js → chunk-TNZ5XQA4.js} +2 -2
  32. package/dist/{chunk-DMV5P2LU.js → chunk-UIM5NHPP.js} +3 -3
  33. package/dist/{chunk-ZTVKQOU7.js → chunk-WC635OPK.js} +1 -1
  34. package/dist/{chunk-YTWZORJN.js → chunk-XLBQYIHH.js} +1 -1
  35. package/dist/cli.js +24 -24
  36. package/dist/{clock-HSEKS5AR.js → clock-BMLJ2TR6.js} +8 -8
  37. package/dist/{cloud-sync-BOCZSDIA.js → cloud-sync-EZKCEIBX.js} +18 -18
  38. package/dist/{config-UTS7QULS.js → config-QB7W3Z7P.js} +4 -4
  39. package/dist/connectors/discord-bridge.js +1 -1
  40. package/dist/connectors/slack-bridge.js +1 -1
  41. package/dist/connectors/telegram-bridge.js +1 -1
  42. package/dist/{conversations-HH3CJD4E.js → conversations-G6YRSABR.js} +5 -5
  43. package/dist/{create-5BPOOJAN.js → create-C3BBFYV7.js} +4 -4
  44. package/dist/{create-QBEPSD2Z.js → create-PN73742N.js} +4 -4
  45. package/dist/{daemon-client-RVIKXGFQ.js → daemon-client-2MIPKY3E.js} +1 -1
  46. package/dist/{daemon-restart-SIR3UR4B.js → daemon-restart-S6SOD3C5.js} +11 -11
  47. package/dist/daemon.js +392 -1101
  48. package/dist/db-CBOCDYVA.js +9 -0
  49. package/dist/{db-BDMH4SZ2.js → db-IJL6B26S.js} +1 -1
  50. package/dist/{delete-L5PAVDGQ.js → delete-NLXES2C7.js} +3 -3
  51. package/dist/delivery-manager-3I7CA734.js +30 -0
  52. package/dist/{delivery-router-VSULHXNH.js → delivery-router-QTFEZ26O.js} +4 -4
  53. package/dist/down-25L2RKCQ.js +17 -0
  54. package/dist/echo-text-IWAQKNTC.js +31 -0
  55. package/dist/{env-E4XHO2BI.js → env-IQ6Q2333.js} +6 -6
  56. package/dist/exec-ONYZEA5B.js +17 -0
  57. package/dist/{export-HTFOHOKL.js → export-JPDBQESV.js} +6 -6
  58. package/dist/{extension-AKZ46YSL.js → extension-LZYHBNLV.js} +4 -4
  59. package/dist/{extensions-OOSFVH7U.js → extensions-PCOXTHNM.js} +17 -17
  60. package/dist/{files-H2YLRD37.js → files-LAQ3NXQK.js} +7 -7
  61. package/dist/{import-OL5BZX7S.js → import-EROF27RH.js} +11 -10
  62. package/dist/{isolation-N74RWOUX.js → isolation-G5J3MTKU.js} +4 -4
  63. package/dist/{join-DF5XSJAC.js → join-6SZCA5FX.js} +3 -3
  64. package/dist/{list-GJ4RUQQT.js → list-KHJZJPEJ.js} +4 -4
  65. package/dist/{login-JXRVMBRB.js → login-F6YMAVLE.js} +6 -6
  66. package/dist/{login-GOTAYLXP.js → login-GYTH67ES.js} +4 -4
  67. package/dist/{logout-FW243JBU.js → logout-HHPH52KZ.js} +6 -6
  68. package/dist/{logout-6KIA74EV.js → logout-YHQLOFLR.js} +4 -4
  69. package/dist/message-delivery-NWL7XEIX.js +40 -0
  70. package/dist/{mind-6VJJHF65.js → mind-MM2IYMJ3.js} +19 -19
  71. package/dist/{mind-activity-tracker-66UVYIFW.js → mind-activity-tracker-42ENM32S.js} +5 -5
  72. package/dist/{mind-history-MII2SK7F.js → mind-history-WHCNZ6I5.js} +5 -5
  73. package/dist/{mind-list-GEWHWAL4.js → mind-list-H3HC2ZRG.js} +4 -4
  74. package/dist/mind-manager-VOEQ2IZL.js +30 -0
  75. package/dist/{mind-profile-DCBDVF5B.js → mind-profile-7VYRJGFZ.js} +2 -2
  76. package/dist/mind-service-WRTOQSAL.js +36 -0
  77. package/dist/{mind-sleep-ITCF6OQA.js → mind-sleep-ZL5ZXFTM.js} +4 -4
  78. package/dist/{mind-status-X4SX3YUG.js → mind-status-ZWULKOUO.js} +4 -4
  79. package/dist/{mind-wake-KXMKMGWX.js → mind-wake-HK5ORGUK.js} +4 -4
  80. package/dist/{package-3W2MEXHB.js → package-TA6IHIED.js} +2 -2
  81. package/dist/{read-ZUDG4JWU.js → read-CP7MYMJQ.js} +4 -4
  82. package/dist/{read-stdin-3X5VYKNS.js → read-stdin-4B5UYPPM.js} +1 -1
  83. package/dist/{register-SB7NXCOE.js → register-XOBFEMI4.js} +4 -4
  84. package/dist/{registry-YPHK534W.js → registry-KMELPC3X.js} +3 -3
  85. package/dist/{reject-MUR2KWJ4.js → reject-43AGXB6B.js} +4 -4
  86. package/dist/{restart-5EGG4JXU.js → restart-O5QIYQJT.js} +5 -5
  87. package/dist/{sandbox-LP6YRAXS.js → sandbox-PQYEICEF.js} +5 -5
  88. package/dist/scheduler-355E746X.js +30 -0
  89. package/dist/{schema-MISD3JFG.js → schema-K575EBPE.js} +2 -2
  90. package/dist/{seed-CEC4RC23.js → seed-6S4Z6TAM.js} +2 -2
  91. package/dist/{seed-check-KJNTL72M.js → seed-check-HZPVFJKZ.js} +2 -2
  92. package/dist/{seed-cmd-WTTG7SRQ.js → seed-cmd-CBWLJWYD.js} +4 -4
  93. package/dist/{seed-create-M6RCC6RP.js → seed-create-NT6DG4SE.js} +6 -6
  94. package/dist/{seed-sprout-ZKCHFJKH.js → seed-sprout-GQLSK4EF.js} +14 -14
  95. package/dist/{send-LXUT2GGR.js → send-7CIP5GLS.js} +8 -8
  96. package/dist/{service-M6N3RUYU.js → service-YMHWPDXW.js} +6 -6
  97. package/dist/{setup-PJOF5UV5.js → setup-APNN7KJB.js} +32 -37
  98. package/dist/{setup-PMJHCZQX.js → setup-PF7JSFMO.js} +4 -4
  99. package/dist/{skill-TAAKEYBV.js → skill-ICN6Y2ZF.js} +6 -6
  100. package/dist/{skills-2PTRTBQP.js → skills-ZFVNN4TU.js} +7 -7
  101. package/dist/sleep-manager-PBOIEBJZ.js +34 -0
  102. package/dist/{spirit-6KVDIROQ.js → spirit-4QOYM33G.js} +9 -9
  103. package/dist/{split-AWVOYOPZ.js → split-5YBEQTBF.js} +3 -3
  104. package/dist/{sprout-WX2FFYLP.js → sprout-UDLZPMEO.js} +2 -2
  105. package/dist/{src-QEOLMAYC.js → src-LT6ZBYYX.js} +2 -2
  106. package/dist/{src-GW6FP6VL.js → src-O4PRLMKM.js} +1 -1
  107. package/dist/{src-FQE4BHRG.js → src-OYWRPLC6.js} +1 -1
  108. package/dist/{start-3UXOPXQG.js → start-LMXXRR3X.js} +5 -5
  109. package/dist/{status-3IVSLJDN.js → status-MC2P7DBG.js} +7 -7
  110. package/dist/{stop-3XYIBGFM.js → stop-TWDKVEUX.js} +5 -5
  111. package/dist/system-chat-7AIN3U5M.js +34 -0
  112. package/dist/{systems-O43WGQY6.js → systems-Y2WZV2K4.js} +7 -7
  113. package/dist/{tailscale-DZU4WM3E.js → tailscale-LTYNKIPZ.js} +3 -3
  114. package/dist/{template-hash-6ITI3WC4.js → template-hash-SSIBEEYK.js} +1 -1
  115. package/dist/up-4T32B7OB.js +19 -0
  116. package/dist/{update-RIQYUPVN.js → update-UOP2INF2.js} +7 -7
  117. package/dist/{update-check-4TIJKVGD.js → update-check-IKS7SGK5.js} +4 -4
  118. package/dist/{upgrade-ZMDGC7M2.js → upgrade-RXFZR5FI.js} +3 -3
  119. package/dist/{variant-QWL2WSRI.js → variant-HHDTW74J.js} +1 -1
  120. package/dist/{version-notify-UXSHBZ35.js → version-notify-NCRIN5QK.js} +18 -18
  121. package/dist/{volute-config-V7UFFBG3.js → volute-config-TS62GS6A.js} +1 -1
  122. package/dist/web-assets/assets/{index-C-eYso8Y.js → index-B3xLeex8.js} +16 -16
  123. package/dist/web-assets/assets/{index-CCv_fSte.css → index-Dr4A90Lo.css} +1 -1
  124. package/dist/web-assets/index.html +2 -2
  125. package/package.json +1 -1
  126. package/templates/_base/src/lib/context-breakdown.ts +22 -16
  127. package/dist/chunk-7KJOFUNN.js +0 -22
  128. package/dist/chunk-PZYJBOQP.js +0 -207
  129. package/dist/db-URORGSXQ.js +0 -9
  130. package/dist/delivery-manager-WTGIPBGY.js +0 -30
  131. package/dist/down-DGGLZ5TA.js +0 -17
  132. package/dist/exec-X3C6ZZTQ.js +0 -17
  133. package/dist/lib-DYEZMGW7.js +0 -6588
  134. package/dist/message-delivery-YORUXKDQ.js +0 -40
  135. package/dist/mind-manager-TJ2SUPRX.js +0 -30
  136. package/dist/mind-service-E7FM2WZF.js +0 -36
  137. package/dist/scheduler-FRJ5DK24.js +0 -30
  138. package/dist/sleep-manager-WAZWMFJT.js +0 -34
  139. package/dist/system-chat-2IFS5HCX.js +0 -34
  140. package/dist/up-4SCIUIMG.js +0 -19
@@ -8,8 +8,8 @@
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
10
  <link href="https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:wght@300;400;700&family=Fira+Code:wght@300;400;500;600&family=Averia+Sans+Libre:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap" rel="stylesheet" />
11
- <script type="module" crossorigin src="/assets/index-C-eYso8Y.js"></script>
12
- <link rel="stylesheet" crossorigin href="/assets/index-CCv_fSte.css">
11
+ <script type="module" crossorigin src="/assets/index-B3xLeex8.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/assets/index-Dr4A90Lo.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volute",
3
- "version": "0.36.0",
3
+ "version": "0.37.1",
4
4
  "description": "CLI for creating and managing self-modifying AI minds powered by the Claude Agent SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -2,25 +2,31 @@ import { readdirSync, readFileSync, statSync } from "node:fs";
2
2
  import { resolve } from "node:path";
3
3
  import type { ContextBreakdown } from "./volute-server.js";
4
4
 
5
- // Lazy-loaded tokenizer — first call loads the encoding (~100ms), subsequent calls are fast
5
+ // Async tokenizer — import fires at module load; falls back to character estimation if unavailable or still loading
6
6
  let _countTokens: ((text: string) => number) | null = null;
7
+ let _tokenizerLoading = false;
7
8
 
8
- function countTokens(text: string): number {
9
- if (!_countTokens) {
10
- try {
11
- // eslint-disable-next-line @typescript-eslint/no-require-imports
12
- const mod = require("@anthropic-ai/tokenizer");
13
- _countTokens = mod.countTokens;
14
- } catch (err) {
15
- // Tokenizer not installed — fall back to character estimation
16
- console.warn(
17
- "context-breakdown: @anthropic-ai/tokenizer not available, using character estimation:",
18
- err instanceof Error ? err.message : err,
19
- );
20
- _countTokens = (t: string) => Math.round(t.length / 3.5);
21
- }
9
+ async function loadTokenizer(): Promise<void> {
10
+ if (_tokenizerLoading) return;
11
+ _tokenizerLoading = true;
12
+ try {
13
+ const mod = await import("@anthropic-ai/tokenizer");
14
+ _countTokens = mod.countTokens;
15
+ } catch (err) {
16
+ // Tokenizer not installed — fall back to character estimation
17
+ console.warn(
18
+ "context-breakdown: @anthropic-ai/tokenizer not available, using character estimation:",
19
+ err instanceof Error ? err.message : err,
20
+ );
22
21
  }
23
- return _countTokens!(text);
22
+ }
23
+
24
+ // Kick off async tokenizer load at import time
25
+ loadTokenizer();
26
+
27
+ function countTokens(text: string): number {
28
+ if (!_countTokens) return Math.round(text.length / 3.5);
29
+ return _countTokens(text);
24
30
  }
25
31
 
26
32
  // --- Claude JSONL parser ---
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
- }) : x)(function(x) {
7
- if (typeof require !== "undefined") return require.apply(this, arguments);
8
- throw Error('Dynamic require of "' + x + '" is not supported');
9
- });
10
- var __commonJS = (cb, mod) => function __require2() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
- };
13
- var __export = (target, all) => {
14
- for (var name in all)
15
- __defProp(target, name, { get: all[name], enumerable: true });
16
- };
17
-
18
- export {
19
- __require,
20
- __commonJS,
21
- __export
22
- };
@@ -1,207 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- readEnv,
4
- sharedEnvPath,
5
- writeEnv
6
- } from "./chunk-YDBAY3NA.js";
7
- import {
8
- logger_default
9
- } from "./chunk-T2TP6ZC6.js";
10
- import {
11
- voluteSystemDir
12
- } from "./chunk-75AJ54GM.js";
13
-
14
- // packages/daemon/src/lib/template/import-utils.ts
15
- import { existsSync as existsSync2, mkdirSync, readdirSync, readFileSync as readFileSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
16
- import { homedir } from "os";
17
- import { basename, resolve as resolve2 } from "path";
18
-
19
- // packages/daemon/src/lib/bridges/bridges.ts
20
- import { existsSync, readFileSync, writeFileSync } from "fs";
21
- import { resolve } from "path";
22
- function bridgesPath() {
23
- return resolve(voluteSystemDir(), "bridges.json");
24
- }
25
- function readBridgesConfig() {
26
- const path = bridgesPath();
27
- if (!existsSync(path)) return {};
28
- try {
29
- return JSON.parse(readFileSync(path, "utf-8"));
30
- } catch (err) {
31
- logger_default.error(
32
- `bridges.json is corrupt or unreadable at ${path} \u2014 all bridges disabled`,
33
- logger_default.errorData(err)
34
- );
35
- return {};
36
- }
37
- }
38
- function writeBridgesConfig(config) {
39
- writeFileSync(bridgesPath(), `${JSON.stringify(config, null, 2)}
40
- `, { mode: 384 });
41
- }
42
- function getBridgeConfig(platform) {
43
- const config = readBridgesConfig();
44
- return config[platform] ?? null;
45
- }
46
- function setBridgeConfig(platform, bridge) {
47
- const config = readBridgesConfig();
48
- config[platform] = bridge;
49
- writeBridgesConfig(config);
50
- }
51
- function removeBridgeConfig(platform) {
52
- const config = readBridgesConfig();
53
- delete config[platform];
54
- writeBridgesConfig(config);
55
- }
56
- function setChannelMapping(platform, externalChannel, voluteChannel) {
57
- const config = readBridgesConfig();
58
- const bridge = config[platform];
59
- if (!bridge) throw new Error(`Bridge not configured for ${platform}`);
60
- bridge.channelMappings[externalChannel] = voluteChannel;
61
- writeBridgesConfig(config);
62
- }
63
- function removeChannelMapping(platform, externalChannel) {
64
- const config = readBridgesConfig();
65
- const bridge = config[platform];
66
- if (!bridge) return;
67
- delete bridge.channelMappings[externalChannel];
68
- writeBridgesConfig(config);
69
- }
70
- function resolveChannelMapping(platform, externalChannel) {
71
- const bridge = getBridgeConfig(platform);
72
- if (!bridge) return null;
73
- return bridge.channelMappings[externalChannel] ?? null;
74
- }
75
- function findBridgeForChannel(voluteChannelName) {
76
- const config = readBridgesConfig();
77
- for (const [platform, bridge] of Object.entries(config)) {
78
- if (!bridge.enabled) continue;
79
- for (const [external, volute] of Object.entries(bridge.channelMappings)) {
80
- if (volute === voluteChannelName) {
81
- return { platform, externalChannel: external };
82
- }
83
- }
84
- }
85
- return null;
86
- }
87
-
88
- // packages/daemon/src/lib/template/import-utils.ts
89
- function findOpenClawSession(workspaceDir) {
90
- const ocAgentsDir = resolve2(homedir(), ".openclaw/agents");
91
- if (!existsSync2(ocAgentsDir)) return void 0;
92
- const matches = [];
93
- try {
94
- for (const entry of readdirSync(ocAgentsDir)) {
95
- const sessionsDir = resolve2(ocAgentsDir, entry, "sessions");
96
- if (!existsSync2(sessionsDir)) continue;
97
- for (const file of readdirSync(sessionsDir)) {
98
- if (!file.endsWith(".jsonl")) continue;
99
- const fullPath = resolve2(sessionsDir, file);
100
- if (sessionMatchesWorkspace(fullPath, workspaceDir)) {
101
- matches.push({ path: fullPath, mtime: statSync(fullPath).mtimeMs });
102
- }
103
- }
104
- }
105
- } catch (err) {
106
- console.warn("Warning: error scanning OpenClaw sessions:", err);
107
- return void 0;
108
- }
109
- if (matches.length === 0) return void 0;
110
- matches.sort((a, b) => b.mtime - a.mtime);
111
- console.log(`Found session: ${matches[0].path}`);
112
- return matches[0].path;
113
- }
114
- function sessionMatchesWorkspace(sessionPath, workspaceDir) {
115
- try {
116
- const fd = readFileSync2(sessionPath, "utf-8");
117
- const firstLine = fd.slice(0, fd.indexOf("\n"));
118
- const header = JSON.parse(firstLine);
119
- return header.type === "session" && resolve2(header.cwd) === resolve2(workspaceDir);
120
- } catch {
121
- return false;
122
- }
123
- }
124
- function importPiSession(sessionFile, mindDirPath) {
125
- const homeDir = resolve2(mindDirPath, "home");
126
- const piSessionDir = resolve2(mindDirPath, ".mind/pi-sessions/main");
127
- mkdirSync(piSessionDir, { recursive: true });
128
- const content = readFileSync2(sessionFile, "utf-8");
129
- const lines = content.trim().split("\n");
130
- try {
131
- const header = JSON.parse(lines[0]);
132
- if (header.type === "session") {
133
- header.cwd = homeDir;
134
- lines[0] = JSON.stringify(header);
135
- }
136
- } catch {
137
- }
138
- const filename = basename(sessionFile);
139
- const destPath = resolve2(piSessionDir, filename);
140
- writeFileSync2(destPath, `${lines.join("\n")}
141
- `);
142
- console.log(`Imported session (${lines.length} entries)`);
143
- }
144
- function importOpenClawConnectors(name, _mindDirPath) {
145
- const configPath = resolve2(homedir(), ".openclaw/openclaw.json");
146
- if (!existsSync2(configPath)) return;
147
- let config;
148
- try {
149
- config = JSON.parse(readFileSync2(configPath, "utf-8"));
150
- } catch (err) {
151
- console.warn("Warning: failed to parse openclaw.json:", err);
152
- return;
153
- }
154
- const discord = config.channels?.discord;
155
- if (!discord?.enabled || !discord.token) return;
156
- const envPath = sharedEnvPath();
157
- const env = readEnv(envPath);
158
- if (!env.DISCORD_TOKEN) {
159
- env.DISCORD_TOKEN = discord.token;
160
- writeEnv(envPath, env);
161
- }
162
- const channelMappings = {};
163
- if (discord.guilds) {
164
- for (const guild of Object.values(discord.guilds)) {
165
- if (!guild.channels) continue;
166
- for (const [channelName, ch] of Object.entries(guild.channels)) {
167
- if (ch.allow) {
168
- channelMappings[channelName] = channelName;
169
- }
170
- }
171
- }
172
- }
173
- setBridgeConfig("discord", {
174
- enabled: true,
175
- defaultMind: name,
176
- channelMappings
177
- });
178
- console.log(`Imported Discord as system bridge (default mind: ${name})`);
179
- if (Object.keys(channelMappings).length > 0) {
180
- console.log(`Mapped channels: ${Object.keys(channelMappings).join(", ")}`);
181
- }
182
- }
183
- function parseNameFromIdentity(identity) {
184
- const match = identity.match(/\*\*Name:\*\*\s*(.+)/);
185
- if (match) {
186
- const raw = match[1].trim();
187
- if (!raw || raw.startsWith("*") || raw.startsWith("(")) return void 0;
188
- return raw.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9.-]/g, "");
189
- }
190
- return void 0;
191
- }
192
-
193
- export {
194
- readBridgesConfig,
195
- getBridgeConfig,
196
- setBridgeConfig,
197
- removeBridgeConfig,
198
- setChannelMapping,
199
- removeChannelMapping,
200
- resolveChannelMapping,
201
- findBridgeForChannel,
202
- findOpenClawSession,
203
- sessionMatchesWorkspace,
204
- importPiSession,
205
- importOpenClawConnectors,
206
- parseNameFromIdentity
207
- };
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- getDb
4
- } from "./chunk-75AJ54GM.js";
5
- import "./chunk-7PTQGPJY.js";
6
- import "./chunk-7KJOFUNN.js";
7
- export {
8
- getDb
9
- };
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- DeliveryManager,
4
- getDeliveryManager,
5
- initDeliveryManager
6
- } from "./chunk-DQ7VBXAP.js";
7
- import "./chunk-6F3YNULE.js";
8
- import "./chunk-46DYYHN6.js";
9
- import "./chunk-GBDVNPN2.js";
10
- import "./chunk-PY557GDR.js";
11
- import "./chunk-DMV5P2LU.js";
12
- import "./chunk-IIWF2IPD.js";
13
- import "./chunk-B35VNNSS.js";
14
- import "./chunk-CU6OFXMM.js";
15
- import "./chunk-BOLJUV77.js";
16
- import "./chunk-X2J7QUFH.js";
17
- import "./chunk-YDBAY3NA.js";
18
- import "./chunk-M5RYAA5I.js";
19
- import "./chunk-T2TP6ZC6.js";
20
- import "./chunk-PJ4IPTIN.js";
21
- import "./chunk-L72WYMF7.js";
22
- import "./chunk-NUX47Y2V.js";
23
- import "./chunk-75AJ54GM.js";
24
- import "./chunk-7PTQGPJY.js";
25
- import "./chunk-7KJOFUNN.js";
26
- export {
27
- DeliveryManager,
28
- getDeliveryManager,
29
- initDeliveryManager
30
- };
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- run,
4
- stopDaemon
5
- } from "./chunk-N2AUHW4C.js";
6
- import "./chunk-DJT5Y4UF.js";
7
- import "./chunk-TXSA4Q3V.js";
8
- import "./chunk-O7IGP7ZW.js";
9
- import "./chunk-PJ4IPTIN.js";
10
- import "./chunk-L72WYMF7.js";
11
- import "./chunk-75AJ54GM.js";
12
- import "./chunk-7PTQGPJY.js";
13
- import "./chunk-7KJOFUNN.js";
14
- export {
15
- run,
16
- stopDaemon
17
- };
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- exec,
4
- execInherit,
5
- gitExec,
6
- resolveVoluteBin
7
- } from "./chunk-PJ4IPTIN.js";
8
- import "./chunk-L72WYMF7.js";
9
- import "./chunk-75AJ54GM.js";
10
- import "./chunk-7PTQGPJY.js";
11
- import "./chunk-7KJOFUNN.js";
12
- export {
13
- exec,
14
- execInherit,
15
- gitExec,
16
- resolveVoluteBin
17
- };