visionclaw 0.1.204 → 0.1.205-beta.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 (315) hide show
  1. package/dist/agent/model-provider.js +1 -1
  2. package/dist/agent/model-provider.js.map +1 -1
  3. package/dist/agent/session-manager.d.ts +2 -0
  4. package/dist/agent/session-manager.d.ts.map +1 -1
  5. package/dist/agent/session-manager.js +3 -1
  6. package/dist/agent/session-manager.js.map +1 -1
  7. package/dist/agent/stream-handler.d.ts.map +1 -1
  8. package/dist/agent/stream-handler.js +1 -0
  9. package/dist/agent/stream-handler.js.map +1 -1
  10. package/dist/builtin-skills/fin-app/SKILL.md +54 -6
  11. package/dist/tools/notify.d.ts.map +1 -1
  12. package/dist/tools/notify.js +52 -7
  13. package/dist/tools/notify.js.map +1 -1
  14. package/dist-agent/bundle.cjs +61 -19
  15. package/package.json +1 -1
  16. package/dist/agent/applied-credential-signature.d.ts +0 -53
  17. package/dist/agent/applied-credential-signature.d.ts.map +0 -1
  18. package/dist/agent/applied-credential-signature.js +0 -137
  19. package/dist/agent/applied-credential-signature.js.map +0 -1
  20. package/dist/agent/engines/client-factory.d.ts +0 -63
  21. package/dist/agent/engines/client-factory.d.ts.map +0 -1
  22. package/dist/agent/engines/client-factory.js +0 -382
  23. package/dist/agent/engines/client-factory.js.map +0 -1
  24. package/dist/agent/engines/engine.d.ts +0 -8
  25. package/dist/agent/engines/engine.d.ts.map +0 -1
  26. package/dist/agent/engines/engine.js +0 -15
  27. package/dist/agent/engines/engine.js.map +0 -1
  28. package/dist/agent/engines/openai/file-session.d.ts +0 -19
  29. package/dist/agent/engines/openai/file-session.d.ts.map +0 -1
  30. package/dist/agent/engines/openai/file-session.js +0 -78
  31. package/dist/agent/engines/openai/file-session.js.map +0 -1
  32. package/dist/agent/engines/openai/file-tools.d.ts +0 -35
  33. package/dist/agent/engines/openai/file-tools.d.ts.map +0 -1
  34. package/dist/agent/engines/openai/file-tools.js +0 -194
  35. package/dist/agent/engines/openai/file-tools.js.map +0 -1
  36. package/dist/agent/engines/openai/session.d.ts +0 -55
  37. package/dist/agent/engines/openai/session.d.ts.map +0 -1
  38. package/dist/agent/engines/openai/session.js +0 -447
  39. package/dist/agent/engines/openai/session.js.map +0 -1
  40. package/dist/agent/engines/openai/tools.d.ts +0 -15
  41. package/dist/agent/engines/openai/tools.d.ts.map +0 -1
  42. package/dist/agent/engines/openai/tools.js +0 -221
  43. package/dist/agent/engines/openai/tools.js.map +0 -1
  44. package/dist/agent/engines/pi/session.d.ts +0 -49
  45. package/dist/agent/engines/pi/session.d.ts.map +0 -1
  46. package/dist/agent/engines/pi/session.js +0 -309
  47. package/dist/agent/engines/pi/session.js.map +0 -1
  48. package/dist/agent/memory-preload.d.ts +0 -55
  49. package/dist/agent/memory-preload.d.ts.map +0 -1
  50. package/dist/agent/memory-preload.js +0 -166
  51. package/dist/agent/memory-preload.js.map +0 -1
  52. package/dist/agent/providers/claude/cli-resolver.d.ts +0 -16
  53. package/dist/agent/providers/claude/cli-resolver.d.ts.map +0 -1
  54. package/dist/agent/providers/claude/cli-resolver.js +0 -83
  55. package/dist/agent/providers/claude/cli-resolver.js.map +0 -1
  56. package/dist/agent/providers/claude/session-browser-policy.d.ts +0 -9
  57. package/dist/agent/providers/claude/session-browser-policy.d.ts.map +0 -1
  58. package/dist/agent/providers/claude/session-browser-policy.js +0 -49
  59. package/dist/agent/providers/claude/session-browser-policy.js.map +0 -1
  60. package/dist/agent/providers/claude/session.d.ts +0 -304
  61. package/dist/agent/providers/claude/session.d.ts.map +0 -1
  62. package/dist/agent/providers/claude/session.js +0 -1236
  63. package/dist/agent/providers/claude/session.js.map +0 -1
  64. package/dist/agent/providers/client-factory.d.ts +0 -60
  65. package/dist/agent/providers/client-factory.d.ts.map +0 -1
  66. package/dist/agent/providers/client-factory.js +0 -400
  67. package/dist/agent/providers/client-factory.js.map +0 -1
  68. package/dist/agent/providers/openai/file-session.d.ts +0 -19
  69. package/dist/agent/providers/openai/file-session.d.ts.map +0 -1
  70. package/dist/agent/providers/openai/file-session.js +0 -78
  71. package/dist/agent/providers/openai/file-session.js.map +0 -1
  72. package/dist/agent/providers/openai/session.d.ts +0 -55
  73. package/dist/agent/providers/openai/session.d.ts.map +0 -1
  74. package/dist/agent/providers/openai/session.js +0 -447
  75. package/dist/agent/providers/openai/session.js.map +0 -1
  76. package/dist/agent/providers/openai/tools.d.ts +0 -15
  77. package/dist/agent/providers/openai/tools.d.ts.map +0 -1
  78. package/dist/agent/providers/openai/tools.js +0 -229
  79. package/dist/agent/providers/openai/tools.js.map +0 -1
  80. package/dist/agent/providers/session-types.d.ts +0 -153
  81. package/dist/agent/providers/session-types.d.ts.map +0 -1
  82. package/dist/agent/providers/session-types.js +0 -2
  83. package/dist/agent/providers/session-types.js.map +0 -1
  84. package/dist/agent/providers/system-prompt-log.d.ts +0 -9
  85. package/dist/agent/providers/system-prompt-log.d.ts.map +0 -1
  86. package/dist/agent/providers/system-prompt-log.js +0 -46
  87. package/dist/agent/providers/system-prompt-log.js.map +0 -1
  88. package/dist/agent/transcript-backfill.d.ts +0 -54
  89. package/dist/agent/transcript-backfill.d.ts.map +0 -1
  90. package/dist/agent/transcript-backfill.js +0 -604
  91. package/dist/agent/transcript-backfill.js.map +0 -1
  92. package/dist/agent/transcript-indexer.d.ts +0 -200
  93. package/dist/agent/transcript-indexer.d.ts.map +0 -1
  94. package/dist/agent/transcript-indexer.js +0 -775
  95. package/dist/agent/transcript-indexer.js.map +0 -1
  96. package/dist/agent/transcript-memory-migrations.d.ts +0 -25
  97. package/dist/agent/transcript-memory-migrations.d.ts.map +0 -1
  98. package/dist/agent/transcript-memory-migrations.js +0 -87
  99. package/dist/agent/transcript-memory-migrations.js.map +0 -1
  100. package/dist/agent/tunnel-credential-handler.d.ts +0 -90
  101. package/dist/agent/tunnel-credential-handler.d.ts.map +0 -1
  102. package/dist/agent/tunnel-credential-handler.js +0 -162
  103. package/dist/agent/tunnel-credential-handler.js.map +0 -1
  104. package/dist/agent/usage-backfill-handler.d.ts +0 -18
  105. package/dist/agent/usage-backfill-handler.d.ts.map +0 -1
  106. package/dist/agent/usage-backfill-handler.js +0 -69
  107. package/dist/agent/usage-backfill-handler.js.map +0 -1
  108. package/dist/agent/usage-gate.d.ts +0 -25
  109. package/dist/agent/usage-gate.d.ts.map +0 -1
  110. package/dist/agent/usage-gate.js +0 -83
  111. package/dist/agent/usage-gate.js.map +0 -1
  112. package/dist/agent/usage-handler.d.ts +0 -7
  113. package/dist/agent/usage-handler.d.ts.map +0 -1
  114. package/dist/agent/usage-handler.js +0 -28
  115. package/dist/agent/usage-handler.js.map +0 -1
  116. package/dist/agent/usage-report-builder.d.ts +0 -26
  117. package/dist/agent/usage-report-builder.d.ts.map +0 -1
  118. package/dist/agent/usage-report-builder.js +0 -80
  119. package/dist/agent/usage-report-builder.js.map +0 -1
  120. package/dist/agent/usage-report-queue.d.ts +0 -26
  121. package/dist/agent/usage-report-queue.d.ts.map +0 -1
  122. package/dist/agent/usage-report-queue.js +0 -199
  123. package/dist/agent/usage-report-queue.js.map +0 -1
  124. package/dist/agent/usage-report-types.d.ts +0 -41
  125. package/dist/agent/usage-report-types.d.ts.map +0 -1
  126. package/dist/agent/usage-report-types.js +0 -2
  127. package/dist/agent/usage-report-types.js.map +0 -1
  128. package/dist/agent/usage-reporter.d.ts +0 -31
  129. package/dist/agent/usage-reporter.d.ts.map +0 -1
  130. package/dist/agent/usage-reporter.js +0 -102
  131. package/dist/agent/usage-reporter.js.map +0 -1
  132. package/dist/agent/wake-cycle-tool-tracker.d.ts +0 -39
  133. package/dist/agent/wake-cycle-tool-tracker.d.ts.map +0 -1
  134. package/dist/agent/wake-cycle-tool-tracker.js +0 -72
  135. package/dist/agent/wake-cycle-tool-tracker.js.map +0 -1
  136. package/dist/billing/payg-handler.d.ts +0 -29
  137. package/dist/billing/payg-handler.d.ts.map +0 -1
  138. package/dist/billing/payg-handler.js +0 -92
  139. package/dist/billing/payg-handler.js.map +0 -1
  140. package/dist/billing/payment-handler.d.ts +0 -24
  141. package/dist/billing/payment-handler.d.ts.map +0 -1
  142. package/dist/billing/payment-handler.js +0 -101
  143. package/dist/billing/payment-handler.js.map +0 -1
  144. package/dist/builtin-skills/catalog/phone-adb-automation/SKILL.md +0 -412
  145. package/dist/builtin-skills/catalog/phone-adb-automation/phone_input.sh +0 -132
  146. package/dist/builtin-skills/catalog/phone-adb-automation/phone_launch.sh +0 -166
  147. package/dist/builtin-skills/catalog/phone-adb-automation/phone_screenshot.sh +0 -87
  148. package/dist/builtin-skills/catalog/phone-adb-automation/phone_security_kbd.py +0 -174
  149. package/dist/builtin-skills/catalog/phone-adb-automation/phone_setup.sh +0 -274
  150. package/dist/builtin-skills/catalog/phone-adb-automation/phone_swipe.sh +0 -111
  151. package/dist/builtin-skills/catalog/phone-adb-automation/phone_tap.sh +0 -87
  152. package/dist/builtin-skills/catalog/phone-adb-automation/phone_ui_parse.py +0 -176
  153. package/dist/builtin-skills/catalog/phone-adb-automation/phone_wake_unlock.sh +0 -67
  154. package/dist/builtin-skills/transcribe-audio/SKILL.md +0 -122
  155. package/dist/channels/web.d.ts +0 -40
  156. package/dist/channels/web.d.ts.map +0 -1
  157. package/dist/channels/web.js +0 -137
  158. package/dist/channels/web.js.map +0 -1
  159. package/dist/data-processing/convert-demo-cli.d.ts +0 -7
  160. package/dist/data-processing/convert-demo-cli.d.ts.map +0 -1
  161. package/dist/data-processing/convert-demo-cli.js +0 -30
  162. package/dist/data-processing/convert-demo-cli.js.map +0 -1
  163. package/dist/data-processing/convert-demo.d.ts +0 -26
  164. package/dist/data-processing/convert-demo.d.ts.map +0 -1
  165. package/dist/data-processing/convert-demo.js +0 -233
  166. package/dist/data-processing/convert-demo.js.map +0 -1
  167. package/dist/obs/auth.d.ts +0 -45
  168. package/dist/obs/auth.d.ts.map +0 -1
  169. package/dist/obs/auth.js +0 -181
  170. package/dist/obs/auth.js.map +0 -1
  171. package/dist/obs/rdp/icons/icons/app_windows.svg +0 -4
  172. package/dist/obs/rdp/icons/icons/clip_get.svg +0 -4
  173. package/dist/obs/rdp/icons/icons/clip_send.svg +0 -4
  174. package/dist/obs/rdp/icons/icons/clip_shared.svg +0 -4
  175. package/dist/obs/rdp/icons/icons/clipboard.svg +0 -4
  176. package/dist/obs/rdp/icons/icons/clipboard_shared.svg +0 -4
  177. package/dist/obs/rdp/icons/icons/control.svg +0 -4
  178. package/dist/obs/rdp/icons/icons/desktop.svg +0 -4
  179. package/dist/obs/rdp/icons/icons/display.svg +0 -4
  180. package/dist/obs/rdp/icons/icons/launchpad.svg +0 -4
  181. package/dist/obs/rdp/icons/icons/mission_control.svg +0 -4
  182. package/dist/obs/rdp/icons/icons/screenshot.svg +0 -4
  183. package/dist/obs/rdp/icons/icons/zoom_actual.svg +0 -4
  184. package/dist/obs/rdp/icons/icons/zoom_fit.svg +0 -4
  185. package/dist/obs/rdp/icons/icons/zoom_in.svg +0 -4
  186. package/dist/obs/rdp/icons/icons/zoom_out.svg +0 -4
  187. package/dist/obs/tunnel-telemetry.d.ts +0 -46
  188. package/dist/obs/tunnel-telemetry.d.ts.map +0 -1
  189. package/dist/obs/tunnel-telemetry.js +0 -70
  190. package/dist/obs/tunnel-telemetry.js.map +0 -1
  191. package/dist/onboarding/cloudflared-cert.d.ts +0 -15
  192. package/dist/onboarding/cloudflared-cert.d.ts.map +0 -1
  193. package/dist/onboarding/cloudflared-cert.js +0 -57
  194. package/dist/onboarding/cloudflared-cert.js.map +0 -1
  195. package/dist/phonecall-credentials.d.ts +0 -21
  196. package/dist/phonecall-credentials.d.ts.map +0 -1
  197. package/dist/phonecall-credentials.js +0 -34
  198. package/dist/phonecall-credentials.js.map +0 -1
  199. package/dist/realtime/agent-bridge.d.ts +0 -7
  200. package/dist/realtime/agent-bridge.d.ts.map +0 -1
  201. package/dist/realtime/agent-bridge.js +0 -31
  202. package/dist/realtime/agent-bridge.js.map +0 -1
  203. package/dist/realtime/assets/index.html +0 -1058
  204. package/dist/realtime/assets/samples/alloy.mp3 +0 -0
  205. package/dist/realtime/assets/samples/ash.mp3 +0 -0
  206. package/dist/realtime/assets/samples/ballad.mp3 +0 -0
  207. package/dist/realtime/assets/samples/cedar.mp3 +0 -0
  208. package/dist/realtime/assets/samples/coral.mp3 +0 -0
  209. package/dist/realtime/assets/samples/echo.mp3 +0 -0
  210. package/dist/realtime/assets/samples/marin.mp3 +0 -0
  211. package/dist/realtime/assets/samples/sage.mp3 +0 -0
  212. package/dist/realtime/assets/samples/shimmer.mp3 +0 -0
  213. package/dist/realtime/assets/samples/verse.mp3 +0 -0
  214. package/dist/realtime/context.d.ts +0 -14
  215. package/dist/realtime/context.d.ts.map +0 -1
  216. package/dist/realtime/context.js +0 -153
  217. package/dist/realtime/context.js.map +0 -1
  218. package/dist/realtime/http-helpers.d.ts +0 -5
  219. package/dist/realtime/http-helpers.d.ts.map +0 -1
  220. package/dist/realtime/http-helpers.js +0 -29
  221. package/dist/realtime/http-helpers.js.map +0 -1
  222. package/dist/realtime/index.d.ts +0 -62
  223. package/dist/realtime/index.d.ts.map +0 -1
  224. package/dist/realtime/index.js +0 -94
  225. package/dist/realtime/index.js.map +0 -1
  226. package/dist/realtime/server.d.ts +0 -6
  227. package/dist/realtime/server.d.ts.map +0 -1
  228. package/dist/realtime/server.js +0 -479
  229. package/dist/realtime/server.js.map +0 -1
  230. package/dist/realtime/telegram-auth.d.ts +0 -2
  231. package/dist/realtime/telegram-auth.d.ts.map +0 -1
  232. package/dist/realtime/telegram-auth.js +0 -24
  233. package/dist/realtime/telegram-auth.js.map +0 -1
  234. package/dist/realtime/tools.d.ts +0 -829
  235. package/dist/realtime/tools.d.ts.map +0 -1
  236. package/dist/realtime/tools.js +0 -611
  237. package/dist/realtime/tools.js.map +0 -1
  238. package/dist/realtime/types.d.ts +0 -62
  239. package/dist/realtime/types.d.ts.map +0 -1
  240. package/dist/realtime/types.js +0 -3
  241. package/dist/realtime/types.js.map +0 -1
  242. package/dist/realtime/voice-summarizer.d.ts +0 -4
  243. package/dist/realtime/voice-summarizer.d.ts.map +0 -1
  244. package/dist/realtime/voice-summarizer.js +0 -123
  245. package/dist/realtime/voice-summarizer.js.map +0 -1
  246. package/dist/realtime/websocket.d.ts +0 -7
  247. package/dist/realtime/websocket.d.ts.map +0 -1
  248. package/dist/realtime/websocket.js +0 -65
  249. package/dist/realtime/websocket.js.map +0 -1
  250. package/dist/service/gbox-tun.d.ts +0 -14
  251. package/dist/service/gbox-tun.d.ts.map +0 -1
  252. package/dist/service/gbox-tun.js +0 -315
  253. package/dist/service/gbox-tun.js.map +0 -1
  254. package/dist/skills/installed.d.ts +0 -11
  255. package/dist/skills/installed.d.ts.map +0 -1
  256. package/dist/skills/installed.js +0 -35
  257. package/dist/skills/installed.js.map +0 -1
  258. package/dist/tools/card.d.ts +0 -11
  259. package/dist/tools/card.d.ts.map +0 -1
  260. package/dist/tools/card.js +0 -87
  261. package/dist/tools/card.js.map +0 -1
  262. package/dist/tools/coordinate-resolver.d.ts +0 -30
  263. package/dist/tools/coordinate-resolver.d.ts.map +0 -1
  264. package/dist/tools/coordinate-resolver.js +0 -104
  265. package/dist/tools/coordinate-resolver.js.map +0 -1
  266. package/dist/tools/stock-data.d.ts +0 -70
  267. package/dist/tools/stock-data.d.ts.map +0 -1
  268. package/dist/tools/stock-data.js +0 -596
  269. package/dist/tools/stock-data.js.map +0 -1
  270. package/dist/tools/webapp.d.ts +0 -30
  271. package/dist/tools/webapp.d.ts.map +0 -1
  272. package/dist/tools/webapp.js +0 -114
  273. package/dist/tools/webapp.js.map +0 -1
  274. package/dist/utils/wechat-monitor.d.ts +0 -21
  275. package/dist/utils/wechat-monitor.d.ts.map +0 -1
  276. package/dist/utils/wechat-monitor.js +0 -88
  277. package/dist/utils/wechat-monitor.js.map +0 -1
  278. package/dist/webapp/index.d.ts +0 -28
  279. package/dist/webapp/index.d.ts.map +0 -1
  280. package/dist/webapp/index.js +0 -75
  281. package/dist/webapp/index.js.map +0 -1
  282. package/dist/webapp/server.d.ts +0 -32
  283. package/dist/webapp/server.d.ts.map +0 -1
  284. package/dist/webapp/server.js +0 -375
  285. package/dist/webapp/server.js.map +0 -1
  286. package/dist/webapp/storage.d.ts +0 -64
  287. package/dist/webapp/storage.d.ts.map +0 -1
  288. package/dist/webapp/storage.js +0 -103
  289. package/dist/webapp/storage.js.map +0 -1
  290. package/dist/webapp/ui.d.ts +0 -2
  291. package/dist/webapp/ui.d.ts.map +0 -1
  292. package/dist/webapp/ui.js +0 -319
  293. package/dist/webapp/ui.js.map +0 -1
  294. package/dist-agent/assets/index.html +0 -1058
  295. package/dist-agent/assets/samples/alloy.mp3 +0 -0
  296. package/dist-agent/assets/samples/ash.mp3 +0 -0
  297. package/dist-agent/assets/samples/ballad.mp3 +0 -0
  298. package/dist-agent/assets/samples/cedar.mp3 +0 -0
  299. package/dist-agent/assets/samples/coral.mp3 +0 -0
  300. package/dist-agent/assets/samples/echo.mp3 +0 -0
  301. package/dist-agent/assets/samples/marin.mp3 +0 -0
  302. package/dist-agent/assets/samples/sage.mp3 +0 -0
  303. package/dist-agent/assets/samples/shimmer.mp3 +0 -0
  304. package/dist-agent/assets/samples/verse.mp3 +0 -0
  305. package/dist-agent/realtime/assets/index.html +0 -1058
  306. package/dist-agent/realtime/assets/samples/alloy.mp3 +0 -0
  307. package/dist-agent/realtime/assets/samples/ash.mp3 +0 -0
  308. package/dist-agent/realtime/assets/samples/ballad.mp3 +0 -0
  309. package/dist-agent/realtime/assets/samples/cedar.mp3 +0 -0
  310. package/dist-agent/realtime/assets/samples/coral.mp3 +0 -0
  311. package/dist-agent/realtime/assets/samples/echo.mp3 +0 -0
  312. package/dist-agent/realtime/assets/samples/marin.mp3 +0 -0
  313. package/dist-agent/realtime/assets/samples/sage.mp3 +0 -0
  314. package/dist-agent/realtime/assets/samples/shimmer.mp3 +0 -0
  315. package/dist-agent/realtime/assets/samples/verse.mp3 +0 -0
@@ -20785,7 +20785,7 @@ var require_prompts3 = __commonJS({
20785
20785
 
20786
20786
  // dist/utils/version-check.js
20787
20787
  function isBundled() {
20788
- const v14 = "0.1.204";
20788
+ const v14 = "0.1.205-beta.1";
20789
20789
  return typeof v14 === "string" && v14 !== "undefined";
20790
20790
  }
20791
20791
  function getPackageRoot() {
@@ -20802,7 +20802,7 @@ function getInstallationInfo() {
20802
20802
  };
20803
20803
  }
20804
20804
  function getCurrentVersion() {
20805
- const bundledVersion = "0.1.204";
20805
+ const bundledVersion = "0.1.205-beta.1";
20806
20806
  if (bundledVersion && bundledVersion !== "undefined") {
20807
20807
  return bundledVersion;
20808
20808
  }
@@ -928037,7 +928037,7 @@ function resolvePiSideCallModel(config3, options2 = {}) {
928037
928037
  model: {
928038
928038
  id: modelId,
928039
928039
  name: modelId,
928040
- api: "openai-completions",
928040
+ api: "openai-responses",
928041
928041
  provider: config3.provider,
928042
928042
  baseUrl,
928043
928043
  reasoning: false,
@@ -953457,6 +953457,27 @@ function resolveOwnerTargetForChannel(channel, targets) {
953457
953457
  function resolveDefaultOwnerTarget(config3, ownerConfig) {
953458
953458
  return resolveOwnerPrimaryTarget(config3, ownerConfig) ?? resolveOwnerFallbackChain(config3, ownerConfig)[0];
953459
953459
  }
953460
+ function normalizeEmailAddress(value2) {
953461
+ if (!value2)
953462
+ return void 0;
953463
+ const trimmed = value2.trim();
953464
+ const angleAddress = /<\s*([^<>\s]+@[^<>\s]+)\s*>/.exec(trimmed)?.[1];
953465
+ const candidate = (angleAddress ?? trimmed).trim().toLowerCase();
953466
+ return /^[^\s<>@]+@[^\s<>@]+$/.test(candidate) ? candidate : void 0;
953467
+ }
953468
+ function emailAddressesMatch(left, right) {
953469
+ const a13 = normalizeEmailAddress(left);
953470
+ const b16 = normalizeEmailAddress(right);
953471
+ if (!a13 || !b16)
953472
+ return false;
953473
+ if (a13 === b16)
953474
+ return true;
953475
+ const withoutPlusTag = (address) => {
953476
+ const [local, domain3] = address.split("@");
953477
+ return `${local.split("+", 1)[0]}@${domain3}`;
953478
+ };
953479
+ return withoutPlusTag(a13) === withoutPlusTag(b16);
953480
+ }
953460
953481
  async function sendUserNotification(args) {
953461
953482
  const state4 = getAgentState();
953462
953483
  const { ownerConfig, config: config3 } = state4;
@@ -953466,14 +953487,25 @@ async function sendUserNotification(args) {
953466
953487
  ...resolveOwnerFallbackChain(config3, ownerConfig),
953467
953488
  ...listBoundOwnerChannels(config3, ownerConfig)
953468
953489
  ];
953469
- const channel = normalizeChannelName(args.channel ?? defaultOwnerTarget?.channel ?? "telegram");
953470
- let replyTarget = args.to ? state4.replyMap.get(`${channel}::${args.to}`) : void 0;
953471
- if (!replyTarget && !args.to && state4.currentTaskReplyTarget?.channel === channel) {
953490
+ let requestedChannel = args.channel;
953491
+ let requestedTo = args.to;
953492
+ const taskTarget = state4.currentTaskReplyTarget;
953493
+ const taskSenderEmail = normalizeEmailAddress(taskTarget?.sender);
953494
+ const ownerEmail = normalizeEmailAddress(ownerConfig.ownerEmail);
953495
+ const externalGmailTask = normalizeChannelName(taskTarget?.channel ?? "") === "gmail" && taskSenderEmail !== void 0 && ownerEmail !== void 0 && !emailAddressesMatch(taskSenderEmail, ownerEmail);
953496
+ const wouldEmailOwner = normalizeChannelName(requestedChannel ?? "") === "gmail" && emailAddressesMatch(requestedTo, ownerEmail);
953497
+ if (externalGmailTask && wouldEmailOwner) {
953498
+ requestedChannel = void 0;
953499
+ requestedTo = void 0;
953500
+ }
953501
+ const channel = normalizeChannelName(requestedChannel ?? defaultOwnerTarget?.channel ?? "telegram");
953502
+ let replyTarget = requestedTo ? state4.replyMap.get(`${channel}::${requestedTo}`) : void 0;
953503
+ if (!replyTarget && !requestedTo && state4.currentTaskReplyTarget?.channel === channel) {
953472
953504
  replyTarget = state4.currentTaskReplyTarget;
953473
953505
  }
953474
953506
  const groupLikeTaskTarget = state4.currentTaskReplyTarget?.channel === channel && state4.currentTaskReplyTarget.isGroupLike ? state4.currentTaskReplyTarget : void 0;
953475
- const explicitChannelOwnerTarget = args.channel ? resolveOwnerTargetForChannel(channel, ownerTargets) : defaultOwnerTarget;
953476
- const to2 = args.to ?? replyTarget?.sender ?? (groupLikeTaskTarget ? void 0 : explicitChannelOwnerTarget?.to);
953507
+ const explicitChannelOwnerTarget = requestedChannel ? resolveOwnerTargetForChannel(channel, ownerTargets) : defaultOwnerTarget;
953508
+ const to2 = requestedTo ?? replyTarget?.sender ?? (groupLikeTaskTarget ? void 0 : explicitChannelOwnerTarget?.to);
953477
953509
  if (!to2) {
953478
953510
  return {
953479
953511
  content: [
@@ -953529,7 +953561,7 @@ async function sendUserNotification(args) {
953529
953561
  replyTo: replyTarget?.replyContext,
953530
953562
  logContext: "notify_user message"
953531
953563
  };
953532
- const shouldFallbackAcrossOwnerTargets = !args.channel && !args.to && !replyTarget && !groupLikeTaskTarget;
953564
+ const shouldFallbackAcrossOwnerTargets = !requestedChannel && !requestedTo && !replyTarget && !groupLikeTaskTarget;
953533
953565
  const discordFallbackTargets = listBoundOwnerChannels(config3, ownerConfig).filter((target) => target.channel === "discord" && isUsableOutboundTarget(target));
953534
953566
  const attempts = shouldFallbackAcrossOwnerTargets ? [
953535
953567
  ...defaultOwnerTarget ? [defaultOwnerTarget] : [],
@@ -990817,7 +990849,7 @@ var init_browser_launcher = __esm({
990817
990849
 
990818
990850
  // dist/utils/playwriter-relay.js
990819
990851
  function isBundled2() {
990820
- const v14 = "0.1.204";
990852
+ const v14 = "0.1.205-beta.1";
990821
990853
  return typeof v14 === "string" && v14 !== "undefined";
990822
990854
  }
990823
990855
  function resolveRelayEntryPath() {
@@ -990852,7 +990884,7 @@ function getPm2RelayProcess() {
990852
990884
  }
990853
990885
  }
990854
990886
  function pm2Start(entryPath, host, port) {
990855
- const versionStr = "0.1.204";
990887
+ const versionStr = "0.1.205-beta.1";
990856
990888
  (0, import_node_child_process19.execFileSync)("pm2", ["start", entryPath, "--name", PM2_PROCESS_NAME, "--update-env"], {
990857
990889
  encoding: "utf-8",
990858
990890
  stdio: "pipe",
@@ -990878,7 +990910,7 @@ function pm2Delete() {
990878
990910
  }
990879
990911
  }
990880
990912
  function pm2Restart(host, port) {
990881
- const versionStr = "0.1.204";
990913
+ const versionStr = "0.1.205-beta.1";
990882
990914
  (0, import_node_child_process19.execFileSync)("pm2", ["restart", PM2_PROCESS_NAME, "--update-env"], {
990883
990915
  encoding: "utf-8",
990884
990916
  stdio: "pipe",
@@ -991048,7 +991080,7 @@ function reconcilePlaywriterRelay(host = "127.0.0.1", port = 19988) {
991048
991080
  pm2Restart(host, port);
991049
991081
  return;
991050
991082
  }
991051
- const currentVersion = "0.1.204";
991083
+ const currentVersion = "0.1.205-beta.1";
991052
991084
  if (currentEnv.VISIONCLAW_VERSION && currentEnv.VISIONCLAW_VERSION !== currentVersion) {
991053
991085
  logger.system(`Playwriter relay: VisionClaw version changed (${currentEnv.VISIONCLAW_VERSION} \u2192 ${currentVersion}), recreating`);
991054
991086
  pm2Delete();
@@ -1242966,7 +1242998,7 @@ When you receive a memo marked \`[Coding task complete]\`, immediately notify th
1242966
1242998
  "[Coding task complete]",
1242967
1242999
  req.memo,
1242968
1243000
  "",
1242969
- "Action required: notify the owner now via `notify_user` with a concise completion summary. Include any important outcome, files changed, validation performed, and any remaining caveats from the memo. Do not just call `finish` without notifying the owner."
1243001
+ req.ownerNotified ? "The coding session already notified the owner via `notify_user`. Do not send another completion summary unless there is material new information." : "Action required: notify the owner now via `notify_user` with a concise completion summary. Include any important outcome, files changed, validation performed, and any remaining caveats from the memo. Do not just call `finish` without notifying the owner."
1242970
1243002
  ].join("\n") : req.memo;
1242971
1243003
  addMemo(currentMode, req.target, memo);
1242972
1243004
  }
@@ -1377550,6 +1377582,15 @@ var init_login_qr = __esm({
1377550
1377582
  }
1377551
1377583
  });
1377552
1377584
 
1377585
+ // node_modules/openclaw/plugin-sdk.js
1377586
+ function normalizeAccountId2(id3) {
1377587
+ return id3.replace(/[^a-z0-9-]/gi, "-").toLowerCase();
1377588
+ }
1377589
+ var init_plugin_sdk2 = __esm({
1377590
+ "node_modules/openclaw/plugin-sdk.js"() {
1377591
+ }
1377592
+ });
1377593
+
1377553
1377594
  // dist/tos-storage.js
1377554
1377595
  function createTosClient(credentials, bucket, endpointOverride) {
1377555
1377596
  const _require = (0, import_node_module8.createRequire)(__importMetaUrl);
@@ -1386795,7 +1386836,7 @@ function registerCommandHandlers(deps) {
1386795
1386836
  await channelManager.sendMessage(req.channel, req.sender, t8("cmd.weixin.failed", getLocale(), result.message));
1386796
1386837
  return;
1386797
1386838
  }
1386798
- const accountId = normalizeAccountId(result.accountId);
1386839
+ const accountId = normalizeAccountId2(result.accountId);
1386799
1386840
  saveWeixinAccount(accountId, {
1386800
1386841
  token: result.botToken,
1386801
1386842
  baseUrl: result.baseUrl,
@@ -1387331,7 +1387372,7 @@ var init_command_handlers = __esm({
1387331
1387372
  init_activity_tracker();
1387332
1387373
  init_accounts();
1387333
1387374
  init_login_qr();
1387334
- init_plugin_sdk();
1387375
+ init_plugin_sdk2();
1387335
1387376
  init_restart();
1387336
1387377
  init_owner_channel_resolver();
1387337
1387378
  }
@@ -1391973,7 +1392014,8 @@ async function processAgentStream(queryStream, session, activityTracker, session
1391973
1392014
  memo: input.memo ?? "",
1391974
1392015
  reason: input.reason === "complete" ? "complete" : "handoff",
1391975
1392016
  forwardMessage: input.forward_message ?? "",
1391976
- cwd: input.cwd
1392017
+ cwd: input.cwd,
1392018
+ ownerNotified: notifyUserCalled
1391977
1392019
  });
1391978
1392020
  finishCalled = true;
1391979
1392021
  session.closeInput();
@@ -1401626,7 +1401668,7 @@ ${result.message}`);
1401626
1401668
  if (!result.connected || !result.accountId) {
1401627
1401669
  process.exit(1);
1401628
1401670
  }
1401629
- const accountId = normalizeAccountId(result.accountId);
1401671
+ const accountId = normalizeAccountId2(result.accountId);
1401630
1401672
  saveWeixinAccount(accountId, {
1401631
1401673
  token: result.botToken,
1401632
1401674
  baseUrl: result.baseUrl,
@@ -1401659,7 +1401701,7 @@ var init_weixin_login = __esm({
1401659
1401701
  "use strict";
1401660
1401702
  init_accounts();
1401661
1401703
  init_login_qr();
1401662
- init_plugin_sdk();
1401704
+ init_plugin_sdk2();
1401663
1401705
  init_config();
1401664
1401706
  }
1401665
1401707
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visionclaw",
3
- "version": "0.1.204",
3
+ "version": "0.1.205-beta.1",
4
4
  "description": "A personal assistant agent that runs on your desktop, receives commands from messaging channels, and executes tasks autonomously.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,53 +0,0 @@
1
- /**
2
- * Applied-credential signature manifest.
3
- *
4
- * Persisted alongside materialised tunnel credentials at
5
- * `<profileTunnelDir>/.applied-signature.json`. Records the signature
6
- * the server handed us with the last bundle we successfully applied.
7
- *
8
- * The manifest is the *only* piece of state the agent has to remember
9
- * across process restarts about credential bundles — everything else
10
- * (creds JSON, config.yml) is reconstructable from a fresh server
11
- * delivery. The signature is opaque to us; we just echo it back on the
12
- * next heartbeat so the server can decide whether to re-ship the body.
13
- *
14
- * Self-healing properties (intentional):
15
- * - Manifest missing on disk → no signature sent → server sends
16
- * bundle → we re-apply and rewrite the manifest. Recovers any
17
- * install where the manifest was deleted but credentials weren't,
18
- * or vice versa.
19
- * - Manifest present but probe says no live tunnel files → we treat
20
- * the manifest as unusable (return null from `loadIfValid`), the
21
- * next heartbeat goes signature-free, the server re-ships the
22
- * bundle, and we land back in a coherent state.
23
- * - Process restart with everything intact → manifest signature is
24
- * sent on the startup heartbeat, server replies with no
25
- * `credentialBundle`, no disk writes, no tunnel restart.
26
- */
27
- /**
28
- * Read the persisted signature, if any. Returns `null` when the file
29
- * does not exist, fails to parse, has the wrong shape, or refers to a
30
- * tunnel state that no longer matches what's on disk.
31
- *
32
- * The on-disk-coherence check (`probeLocalTunnelCredential()`) is what
33
- * gives us self-healing: a stranded manifest from a wiped tunnel dir
34
- * gets ignored, forcing a fresh bundle on the next heartbeat.
35
- */
36
- export declare function loadAppliedSignatureIfValid(): string | null;
37
- /**
38
- * Persist the signature for the most recently applied bundle. Best-
39
- * effort: a write failure is logged but does not throw, since the
40
- * worst case is just an extra full-bundle delivery on the next
41
- * heartbeat.
42
- *
43
- * The file is written with 0o600 to match the credentials sitting next
44
- * to it; the directory itself is already 0o700 from
45
- * `runtime-credentials.ts`.
46
- */
47
- export declare function writeAppliedSignature(signature: string): void;
48
- /**
49
- * Forget the persisted signature. Used by tests; production code never
50
- * needs to delete it explicitly because writes overwrite in place.
51
- */
52
- export declare function __clearAppliedSignatureForTests(): void;
53
- //# sourceMappingURL=applied-credential-signature.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"applied-credential-signature.d.ts","sourceRoot":"","sources":["../../src/agent/applied-credential-signature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAwBH;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,GAAG,IAAI,CA2C3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAgC7D;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAMtD"}
@@ -1,137 +0,0 @@
1
- /**
2
- * Applied-credential signature manifest.
3
- *
4
- * Persisted alongside materialised tunnel credentials at
5
- * `<profileTunnelDir>/.applied-signature.json`. Records the signature
6
- * the server handed us with the last bundle we successfully applied.
7
- *
8
- * The manifest is the *only* piece of state the agent has to remember
9
- * across process restarts about credential bundles — everything else
10
- * (creds JSON, config.yml) is reconstructable from a fresh server
11
- * delivery. The signature is opaque to us; we just echo it back on the
12
- * next heartbeat so the server can decide whether to re-ship the body.
13
- *
14
- * Self-healing properties (intentional):
15
- * - Manifest missing on disk → no signature sent → server sends
16
- * bundle → we re-apply and rewrite the manifest. Recovers any
17
- * install where the manifest was deleted but credentials weren't,
18
- * or vice versa.
19
- * - Manifest present but probe says no live tunnel files → we treat
20
- * the manifest as unusable (return null from `loadIfValid`), the
21
- * next heartbeat goes signature-free, the server re-ships the
22
- * bundle, and we land back in a coherent state.
23
- * - Process restart with everything intact → manifest signature is
24
- * sent on the startup heartbeat, server replies with no
25
- * `credentialBundle`, no disk writes, no tunnel restart.
26
- */
27
- import fs from "node:fs";
28
- import path from "node:path";
29
- import { getProfileTunnelDir } from "../config/index.js";
30
- import { probeLocalTunnelCredential } from "./runtime-credentials.js";
31
- import { logger } from "../logger.js";
32
- const MANIFEST_FILENAME = ".applied-signature.json";
33
- const MANIFEST_VERSION = 1;
34
- function getManifestPath() {
35
- return path.join(getProfileTunnelDir(), MANIFEST_FILENAME);
36
- }
37
- /**
38
- * Read the persisted signature, if any. Returns `null` when the file
39
- * does not exist, fails to parse, has the wrong shape, or refers to a
40
- * tunnel state that no longer matches what's on disk.
41
- *
42
- * The on-disk-coherence check (`probeLocalTunnelCredential()`) is what
43
- * gives us self-healing: a stranded manifest from a wiped tunnel dir
44
- * gets ignored, forcing a fresh bundle on the next heartbeat.
45
- */
46
- export function loadAppliedSignatureIfValid() {
47
- const manifestPath = getManifestPath();
48
- if (!fs.existsSync(manifestPath))
49
- return null;
50
- let raw;
51
- try {
52
- raw = fs.readFileSync(manifestPath, "utf-8");
53
- }
54
- catch (err) {
55
- logger.warn(`Applied-signature manifest unreadable: ${err instanceof Error ? err.message : String(err)}`);
56
- return null;
57
- }
58
- let parsed;
59
- try {
60
- parsed = JSON.parse(raw);
61
- }
62
- catch {
63
- logger.warn(`Applied-signature manifest malformed; ignoring`);
64
- return null;
65
- }
66
- if (!parsed ||
67
- typeof parsed !== "object" ||
68
- !("signature" in parsed) ||
69
- typeof parsed.signature !== "string" ||
70
- parsed.signature.trim() === "") {
71
- return null;
72
- }
73
- const signature = parsed.signature.trim();
74
- // Coherence: a manifest is only meaningful when the credentials it
75
- // refers to actually still exist on disk. If the tunnel files were
76
- // wiped (e.g. operator deleted `~/.visionclaw/profiles/default/tunnel`)
77
- // the stored signature lies about our state, so pretend we have none
78
- // and let the server reissue the bundle.
79
- if (probeLocalTunnelCredential() === null) {
80
- return null;
81
- }
82
- return signature;
83
- }
84
- /**
85
- * Persist the signature for the most recently applied bundle. Best-
86
- * effort: a write failure is logged but does not throw, since the
87
- * worst case is just an extra full-bundle delivery on the next
88
- * heartbeat.
89
- *
90
- * The file is written with 0o600 to match the credentials sitting next
91
- * to it; the directory itself is already 0o700 from
92
- * `runtime-credentials.ts`.
93
- */
94
- export function writeAppliedSignature(signature) {
95
- if (typeof signature !== "string" || signature.trim() === "")
96
- return;
97
- const manifestPath = getManifestPath();
98
- const dir = path.dirname(manifestPath);
99
- try {
100
- fs.mkdirSync(dir, { recursive: true });
101
- }
102
- catch {
103
- // best-effort; the credential apply path will have created it
104
- }
105
- const payload = {
106
- version: MANIFEST_VERSION,
107
- signature: signature.trim(),
108
- appliedAt: new Date().toISOString(),
109
- };
110
- try {
111
- fs.writeFileSync(manifestPath, JSON.stringify(payload, null, 2), "utf-8");
112
- if (process.platform !== "win32") {
113
- try {
114
- fs.chmodSync(manifestPath, 0o600);
115
- }
116
- catch {
117
- // best-effort; directory perms still protect
118
- }
119
- }
120
- }
121
- catch (err) {
122
- logger.warn(`Failed to persist applied-signature manifest: ${err instanceof Error ? err.message : String(err)}`);
123
- }
124
- }
125
- /**
126
- * Forget the persisted signature. Used by tests; production code never
127
- * needs to delete it explicitly because writes overwrite in place.
128
- */
129
- export function __clearAppliedSignatureForTests() {
130
- try {
131
- fs.rmSync(getManifestPath(), { force: true });
132
- }
133
- catch {
134
- // ignore
135
- }
136
- }
137
- //# sourceMappingURL=applied-credential-signature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"applied-credential-signature.js","sourceRoot":"","sources":["../../src/agent/applied-credential-signature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CA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O,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,IAAI,CACT,iDAAiD,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACpG,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,+BAA+B;IAC7C,IAAI,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;AACH,CAAC"}
@@ -1,63 +0,0 @@
1
- /**
2
- * Factory for creating the correct Anthropic client (direct API vs Bedrock)
3
- * and resolving provider-specific model IDs.
4
- */
5
- import Anthropic from "@anthropic-ai/sdk";
6
- import OpenAI, { AzureOpenAI } from "openai";
7
- import { type Model, type Provider, type VisionClawConfig } from "../../config/types.js";
8
- export declare const OPENAI_MODEL = "gpt-5.5";
9
- export declare const AZURE_OPENAI_API_VERSION = "preview";
10
- export declare function isOpenAIProvider(provider: Provider): provider is "openai" | "azure-openai";
11
- /**
12
- * True for any GPT-family model (e.g. "gpt-5.5", future "gpt-6", "gpt-5.5-mini").
13
- * Routing to the OpenAI Agents SDK only depends on the family, not the exact
14
- * version, so we match by prefix instead of pinning to a single literal.
15
- */
16
- export declare function isGptModel(model: Model | undefined): boolean;
17
- export declare function getProviderLabel(provider: Provider): string;
18
- export declare function getRuntimeLabel(config: VisionClawConfig): string;
19
- /**
20
- * Create an Anthropic-compatible client based on the provider in the config.
21
- *
22
- * - `"anthropic"`: uses the direct API with `anthropicApiKey`.
23
- * - `"bedrock"`: uses `AnthropicBedrock` with explicit AWS credentials when
24
- * provided, otherwise falls back to the default AWS credential provider chain.
25
- */
26
- export declare function createClient(config: VisionClawConfig): Anthropic;
27
- export declare function hasProviderCredentials(provider: Provider, config: VisionClawConfig): boolean;
28
- export declare function createOpenAIClient(config: VisionClawConfig): OpenAI | AzureOpenAI;
29
- export declare function configureOpenAIProvider(config: VisionClawConfig): void;
30
- /**
31
- * Return the correct model identifier for direct SDK calls
32
- * (fast-responder, tool-alarm-evaluator, etc.).
33
- *
34
- * Agent SDK `query()` calls do NOT need this - the SDK maps models
35
- * internally when `CLAUDE_CODE_USE_BEDROCK=1` or `CLAUDE_CODE_USE_VERTEX=1` is set.
36
- */
37
- export declare function getModelId(config: VisionClawConfig): string;
38
- /**
39
- * Return the Sonnet model identifier for lightweight side-calls
40
- * (fast-responder, etc.) that don't need the full Opus model.
41
- * For non-Claude providers, falls back to the main model.
42
- */
43
- export declare function getFastResponderModelId(config: VisionClawConfig): string;
44
- /**
45
- * Build the `env` record for the Agent SDK `query()` options.
46
- *
47
- * - Anthropic: passes `ANTHROPIC_API_KEY`.
48
- * - Bedrock: passes `CLAUDE_CODE_USE_BEDROCK`, `AWS_REGION`,
49
- * `AWS_BEARER_TOKEN_BEDROCK` (for the Claude Code CLI), and IAM
50
- * credentials when available.
51
- * - Vertex: passes `CLAUDE_CODE_USE_VERTEX`, `CLOUD_ML_REGION`,
52
- * and `GOOGLE_APPLICATION_CREDENTIALS` for service account auth.
53
- */
54
- export declare function buildAgentEnv(config: VisionClawConfig): Record<string, string | undefined>;
55
- /**
56
- * Start the API logging proxy if running in dev mode with the Anthropic
57
- * or 9Router provider. No-ops (and returns immediately) in production,
58
- * for Bedrock (which bypasses ANTHROPIC_BASE_URL), or for OpenAI providers.
59
- *
60
- * Call once at startup, before the first `buildAgentEnv()` call.
61
- */
62
- export declare function maybeStartApiProxy(config: VisionClawConfig): Promise<void>;
63
- //# sourceMappingURL=client-factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-factory.d.ts","sourceRoot":"","sources":["../../../src/agent/engines/client-factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAG1C,OAAO,MAAM,EAAE,EAAE,WAAW,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