@circuitwall/jarela 2.3.0 → 2.4.0

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 (208) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +4 -4
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  13. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  16. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +7 -0
  19. package/.next/standalone/.next/server/app/api/v1/access/route.js +7 -0
  20. package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +7 -0
  21. package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +17 -5
  22. package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +7 -0
  23. package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +17 -5
  24. package/.next/standalone/.next/server/app/api/v1/agents/route.js +7 -0
  25. package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +7 -0
  26. package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +7 -0
  27. package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +7 -0
  28. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +26 -32
  29. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +18 -7
  31. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +18 -7
  32. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +26 -32
  33. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +27 -33
  35. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +26 -32
  37. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +28 -12
  39. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +28 -12
  40. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +26 -32
  41. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +9 -2
  43. package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/v1/bridges/route.js +19 -7
  45. package/.next/standalone/.next/server/app/api/v1/bridges/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +17 -5
  47. package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +7 -0
  48. package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +7 -0
  49. package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +7 -0
  50. package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +7 -0
  51. package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +7 -0
  52. package/.next/standalone/.next/server/app/api/v1/events/route.js +26 -32
  53. package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +7 -0
  55. package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +7 -0
  56. package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +7 -0
  57. package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +7 -0
  58. package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +7 -0
  59. package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +7 -0
  60. package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +7 -0
  61. package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +7 -0
  62. package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +7 -0
  63. package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +7 -0
  64. package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +7 -0
  65. package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +7 -0
  66. package/.next/standalone/.next/server/app/api/v1/health/route.js +17 -5
  67. package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +7 -0
  68. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +7 -0
  69. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +7 -0
  70. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +7 -0
  71. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +7 -0
  72. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +7 -0
  73. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +7 -0
  74. package/.next/standalone/.next/server/app/api/v1/integrations/route.js +7 -0
  75. package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +17 -5
  76. package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +7 -0
  77. package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +17 -5
  78. package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +17 -5
  79. package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +7 -0
  80. package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +7 -0
  81. package/.next/standalone/.next/server/app/api/v1/memory/route.js +7 -0
  82. package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +7 -0
  83. package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +7 -0
  84. package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +7 -0
  85. package/.next/standalone/.next/server/app/api/v1/models/route.js +7 -0
  86. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +27 -12
  87. package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +7 -0
  88. package/.next/standalone/.next/server/app/api/v1/profile/route.js +7 -0
  89. package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +7 -0
  90. package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +7 -0
  91. package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +7 -0
  92. package/.next/standalone/.next/server/app/api/v1/providers/route.js +7 -0
  93. package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +7 -0
  94. package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +7 -0
  95. package/.next/standalone/.next/server/app/api/v1/redaction/route.js +7 -0
  96. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +17 -5
  97. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +7 -0
  98. package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +7 -0
  99. package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +7 -0
  100. package/.next/standalone/.next/server/app/api/v1/security/state/route.js +7 -0
  101. package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +7 -0
  102. package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +7 -0
  103. package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +7 -0
  104. package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +7 -0
  105. package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +7 -0
  106. package/.next/standalone/.next/server/app/api/v1/skills/route.js +7 -0
  107. package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +7 -0
  108. package/.next/standalone/.next/server/app/api/v1/tasks/route.js +7 -0
  109. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +7 -0
  110. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +12 -6
  111. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +7 -0
  112. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +0 -1
  113. package/.next/standalone/.next/server/app/api/v1/threads/route.js +17 -5
  114. package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
  115. package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +17 -5
  116. package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +17 -5
  117. package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +17 -5
  118. package/.next/standalone/.next/server/app/page.js +322 -275
  119. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/setup/page.js +8 -0
  121. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app-paths-manifest.json +4 -4
  123. package/.next/standalone/.next/server/chunks/1388.js +106 -36
  124. package/.next/standalone/.next/server/chunks/2068.js +47 -10
  125. package/.next/standalone/.next/server/chunks/210.js +6 -6
  126. package/.next/standalone/.next/server/chunks/2447.js +10 -5
  127. package/.next/standalone/.next/server/chunks/2471.js +17 -17
  128. package/.next/standalone/.next/server/chunks/3042.js +10 -8
  129. package/.next/standalone/.next/server/chunks/{4540.js → 309.js} +104 -38
  130. package/.next/standalone/.next/server/chunks/{2350.js → 3272.js} +104 -37
  131. package/.next/standalone/.next/server/chunks/3399.js +525 -525
  132. package/.next/standalone/.next/server/chunks/3524.js +150 -67
  133. package/.next/standalone/.next/server/chunks/4189.js +1 -1
  134. package/.next/standalone/.next/server/chunks/4508.js +2 -2
  135. package/.next/standalone/.next/server/chunks/46.js +73 -28
  136. package/.next/standalone/.next/server/chunks/5908.js +63 -42
  137. package/.next/standalone/.next/server/chunks/6142.js +10 -2
  138. package/.next/standalone/.next/server/chunks/6649.js +1 -1
  139. package/.next/standalone/.next/server/chunks/8461.js +10 -8
  140. package/.next/standalone/.next/server/chunks/9032.js +5 -5
  141. package/.next/standalone/.next/server/chunks/9164.js +435 -176
  142. package/.next/standalone/.next/server/chunks/9304.js +51 -12
  143. package/.next/standalone/.next/server/chunks/{423.js → 9590.js} +66 -21
  144. package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
  145. package/.next/standalone/.next/server/middleware.js +71 -18
  146. package/.next/standalone/.next/server/pages/404.html +2 -2
  147. package/.next/standalone/.next/server/pages/500.html +1 -1
  148. package/.next/standalone/.next/server/preview-props.json +3 -3
  149. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  150. package/.next/standalone/.next/static/chunks/app/{page-213a623b37226452.js → page-04748847c6ff866f.js} +171 -132
  151. package/.next/standalone/.next/static/css/{312542a5725ba0d5.css → 2669e8744cc8c212.css} +2 -2
  152. package/.next/standalone/docs/adoption/changesets.json +49 -0
  153. package/.next/standalone/package.json +1 -1
  154. package/CHANGELOG.md +19 -0
  155. package/app/api/v1/threads/[thread_id]/run/route.ts +0 -1
  156. package/components/chat/MessageBubble.tsx +12 -0
  157. package/components/integrations/NetworkSection.tsx +2 -2
  158. package/lib/agents/citation-checker.test.ts +40 -2
  159. package/lib/agents/citation-checker.ts +56 -11
  160. package/lib/agents/context-boundary.ts +5 -6
  161. package/lib/agents/instruction-edits.test.ts +120 -0
  162. package/lib/agents/instruction-edits.ts +65 -42
  163. package/lib/agents/prepare/request.ts +0 -2
  164. package/lib/agents/prepare/system-prompt.test.ts +10 -0
  165. package/lib/agents/prepare/system-prompt.ts +8 -2
  166. package/lib/agents/proposals.test.ts +76 -0
  167. package/lib/agents/proposals.ts +13 -5
  168. package/lib/agents/run-thread.auto-boundary.test.ts +125 -5
  169. package/lib/agents/run-thread.ts +24 -9
  170. package/lib/agents/sqlite-checkpoint-saver.test.ts +91 -0
  171. package/lib/agents/warm-summary-background.ts +22 -2
  172. package/lib/agents/warm-topics.test.ts +155 -1
  173. package/lib/agents/warm-topics.ts +27 -7
  174. package/lib/bridges/dispatcher.ts +1 -0
  175. package/lib/bridges/message-role.test.ts +81 -0
  176. package/lib/bridges/message-role.ts +23 -10
  177. package/lib/bridges/types.ts +6 -0
  178. package/lib/bridges/whatsapp-link.test.ts +32 -0
  179. package/lib/bridges/whatsapp-link.ts +21 -0
  180. package/lib/bridges/whatsapp.inbound.test.ts +239 -0
  181. package/lib/bridges/whatsapp.sender.test.ts +80 -1
  182. package/lib/bridges/whatsapp.ts +76 -38
  183. package/lib/pricing/snapshot.test.ts +70 -0
  184. package/lib/pricing/snapshot.ts +10 -2
  185. package/lib/proxy/dispatcher.test.ts +119 -1
  186. package/lib/proxy/dispatcher.ts +22 -9
  187. package/lib/stores/agent-configs.ts +10 -5
  188. package/lib/stores/bridges.test.ts +81 -0
  189. package/lib/stores/bridges.ts +9 -8
  190. package/lib/stores/proxy-config.test.ts +120 -0
  191. package/lib/stores/proxy-config.ts +22 -4
  192. package/lib/stores/threads.ts +12 -8
  193. package/lib/tools/communications/calendar.test.ts +43 -2
  194. package/lib/tools/communications/calendar.ts +2 -0
  195. package/lib/tools/communications/gmail.test.ts +51 -1
  196. package/lib/tools/communications/gmail.ts +44 -2
  197. package/lib/tools/communications/outlook-calendar.ts +2 -0
  198. package/lib/tools/communications/outlook.test.ts +33 -2
  199. package/lib/tools/communications/outlook.ts +2 -0
  200. package/lib/tools/filesystem/edit-match.test.ts +133 -0
  201. package/lib/tools/filesystem/edit-match.ts +7 -2
  202. package/lib/tools/support/result-refs.test.ts +131 -0
  203. package/lib/tools/support/result-refs.ts +41 -9
  204. package/lib/utils/source-link.test.ts +51 -0
  205. package/lib/utils/source-link.ts +45 -0
  206. package/package.json +1 -1
  207. /package/.next/standalone/.next/static/{bMRK5y3ruT7c3WtBfCQOG → hwujW4hR1b-r3k5WdMxZO}/_buildManifest.js +0 -0
  208. /package/.next/standalone/.next/static/{bMRK5y3ruT7c3WtBfCQOG → hwujW4hR1b-r3k5WdMxZO}/_ssgManifest.js +0 -0
@@ -3042,7 +3042,7 @@ module.exports = require("node:http");
3042
3042
  /***/ 38084:
3043
3043
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
3044
3044
 
3045
- Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 90801));
3045
+ Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 60095));
3046
3046
  ;
3047
3047
  Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 26751));
3048
3048
 
@@ -3256,249 +3256,7 @@ function() { throw new Error("Attempted to call AppShell() from the server but A
3256
3256
 
3257
3257
  /***/ }),
3258
3258
 
3259
- /***/ 63033:
3260
- /***/ ((module) => {
3261
-
3262
- "use strict";
3263
- module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
3264
-
3265
- /***/ }),
3266
-
3267
- /***/ 71000:
3268
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3269
-
3270
- "use strict";
3271
-
3272
- Object.defineProperty(exports, "__esModule", ({
3273
- value: true
3274
- }));
3275
- Object.defineProperty(exports, "addPathPrefix", ({
3276
- enumerable: true,
3277
- get: function() {
3278
- return addPathPrefix;
3279
- }
3280
- }));
3281
- const _parsepath = __webpack_require__(10571);
3282
- function addPathPrefix(path, prefix) {
3283
- if (!path.startsWith('/') || !prefix) {
3284
- return path;
3285
- }
3286
- const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
3287
- return `${prefix}${pathname}${query}${hash}`;
3288
- } //# sourceMappingURL=add-path-prefix.js.map
3289
-
3290
-
3291
- /***/ }),
3292
-
3293
- /***/ 73024:
3294
- /***/ ((module) => {
3295
-
3296
- "use strict";
3297
- module.exports = require("node:fs");
3298
-
3299
- /***/ }),
3300
-
3301
- /***/ 73136:
3302
- /***/ ((module) => {
3303
-
3304
- "use strict";
3305
- module.exports = require("node:url");
3306
-
3307
- /***/ }),
3308
-
3309
- /***/ 75729:
3310
- /***/ ((module, exports, __webpack_require__) => {
3311
-
3312
- "use strict";
3313
-
3314
- Object.defineProperty(exports, "__esModule", ({
3315
- value: true
3316
- }));
3317
- Object.defineProperty(exports, "addBasePath", ({
3318
- enumerable: true,
3319
- get: function() {
3320
- return addBasePath;
3321
- }
3322
- }));
3323
- const _addpathprefix = __webpack_require__(71000);
3324
- const _normalizetrailingslash = __webpack_require__(34956);
3325
- const basePath = false || '';
3326
- function addBasePath(path, required) {
3327
- return (0, _normalizetrailingslash.normalizePathTrailingSlash)( false ? 0 : (0, _addpathprefix.addPathPrefix)(path, basePath));
3328
- }
3329
- if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
3330
- Object.defineProperty(exports.default, '__esModule', {
3331
- value: true
3332
- });
3333
- Object.assign(exports.default, exports);
3334
- module.exports = exports.default;
3335
- } //# sourceMappingURL=add-base-path.js.map
3336
-
3337
-
3338
- /***/ }),
3339
-
3340
- /***/ 75919:
3341
- /***/ ((module) => {
3342
-
3343
- "use strict";
3344
- module.exports = require("node:worker_threads");
3345
-
3346
- /***/ }),
3347
-
3348
- /***/ 76760:
3349
- /***/ ((module) => {
3350
-
3351
- "use strict";
3352
- module.exports = require("node:path");
3353
-
3354
- /***/ }),
3355
-
3356
- /***/ 77598:
3357
- /***/ ((module) => {
3358
-
3359
- "use strict";
3360
- module.exports = require("node:crypto");
3361
-
3362
- /***/ }),
3363
-
3364
- /***/ 79428:
3365
- /***/ ((module) => {
3366
-
3367
- "use strict";
3368
- module.exports = require("buffer");
3369
-
3370
- /***/ }),
3371
-
3372
- /***/ 79925:
3373
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3374
-
3375
- "use strict";
3376
- // Format function modified from nodejs
3377
- // Copyright Joyent, Inc. and other Node contributors.
3378
- //
3379
- // Permission is hereby granted, free of charge, to any person obtaining a
3380
- // copy of this software and associated documentation files (the
3381
- // "Software"), to deal in the Software without restriction, including
3382
- // without limitation the rights to use, copy, modify, merge, publish,
3383
- // distribute, sublicense, and/or sell copies of the Software, and to permit
3384
- // persons to whom the Software is furnished to do so, subject to the
3385
- // following conditions:
3386
- //
3387
- // The above copyright notice and this permission notice shall be included
3388
- // in all copies or substantial portions of the Software.
3389
- //
3390
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
3391
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3392
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
3393
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
3394
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
3395
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
3396
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
3397
-
3398
- Object.defineProperty(exports, "__esModule", ({
3399
- value: true
3400
- }));
3401
- 0 && (0);
3402
- function _export(target, all) {
3403
- for(var name in all)Object.defineProperty(target, name, {
3404
- enumerable: true,
3405
- get: all[name]
3406
- });
3407
- }
3408
- _export(exports, {
3409
- formatUrl: function() {
3410
- return formatUrl;
3411
- },
3412
- formatWithValidation: function() {
3413
- return formatWithValidation;
3414
- },
3415
- urlObjectKeys: function() {
3416
- return urlObjectKeys;
3417
- }
3418
- });
3419
- const _interop_require_wildcard = __webpack_require__(24814);
3420
- const _querystring = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(90485));
3421
- const slashedProtocols = /https?|ftp|gopher|file/;
3422
- function formatUrl(urlObj) {
3423
- let { auth, hostname } = urlObj;
3424
- let protocol = urlObj.protocol || '';
3425
- let pathname = urlObj.pathname || '';
3426
- let hash = urlObj.hash || '';
3427
- let query = urlObj.query || '';
3428
- let host = false;
3429
- auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
3430
- if (urlObj.host) {
3431
- host = auth + urlObj.host;
3432
- } else if (hostname) {
3433
- host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
3434
- if (urlObj.port) {
3435
- host += ':' + urlObj.port;
3436
- }
3437
- }
3438
- if (query && typeof query === 'object') {
3439
- query = String(_querystring.urlQueryToSearchParams(query));
3440
- }
3441
- let search = urlObj.search || query && `?${query}` || '';
3442
- if (protocol && !protocol.endsWith(':')) protocol += ':';
3443
- if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
3444
- host = '//' + (host || '');
3445
- if (pathname && pathname[0] !== '/') pathname = '/' + pathname;
3446
- } else if (!host) {
3447
- host = '';
3448
- }
3449
- if (hash && hash[0] !== '#') hash = '#' + hash;
3450
- if (search && search[0] !== '?') search = '?' + search;
3451
- pathname = pathname.replace(/[?#]/g, encodeURIComponent);
3452
- search = search.replace('#', '%23');
3453
- return `${protocol}${host}${pathname}${search}${hash}`;
3454
- }
3455
- const urlObjectKeys = [
3456
- 'auth',
3457
- 'hash',
3458
- 'host',
3459
- 'hostname',
3460
- 'href',
3461
- 'path',
3462
- 'pathname',
3463
- 'port',
3464
- 'protocol',
3465
- 'query',
3466
- 'search',
3467
- 'slashes'
3468
- ];
3469
- function formatWithValidation(url) {
3470
- if (false) {}
3471
- return formatUrl(url);
3472
- } //# sourceMappingURL=format-url.js.map
3473
-
3474
-
3475
- /***/ }),
3476
-
3477
- /***/ 80099:
3478
- /***/ ((module) => {
3479
-
3480
- "use strict";
3481
- module.exports = require("node:sqlite");
3482
-
3483
- /***/ }),
3484
-
3485
- /***/ 80481:
3486
- /***/ ((module) => {
3487
-
3488
- "use strict";
3489
- module.exports = require("node:readline");
3490
-
3491
- /***/ }),
3492
-
3493
- /***/ 81630:
3494
- /***/ ((module) => {
3495
-
3496
- "use strict";
3497
- module.exports = require("http");
3498
-
3499
- /***/ }),
3500
-
3501
- /***/ 90801:
3259
+ /***/ 60095:
3502
3260
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3503
3261
 
3504
3262
  "use strict";
@@ -38253,6 +38011,41 @@ function formatRoutingDuration(durationMs) {
38253
38011
  return `${seconds.toFixed(seconds >= 10 ? 0 : 1)}s`;
38254
38012
  }
38255
38013
 
38014
+ ;// ./lib/utils/source-link.ts
38015
+ /**
38016
+ * Source-link fields for tool results, so an agent can link a reply back to
38017
+ * the email, calendar event, or chat it came from without building URLs.
38018
+ *
38019
+ * `cite_as` is a ready-made markdown link the system prompt tells agents to
38020
+ * paste verbatim. Building it in code keeps the label and URL well-formed:
38021
+ * a stray `]` in a subject or `)` in a URL would otherwise break the link.
38022
+ */ const MAX_LABEL_CHARS = 80;
38023
+ /** Returns `url` when it is an absolute https URL, otherwise null. */ function source_link_httpsUrlOrNull(url) {
38024
+ if (!url) return null;
38025
+ try {
38026
+ const parsed = new URL(url);
38027
+ return parsed.protocol === "https:" ? parsed.href : null;
38028
+ } catch {
38029
+ return null;
38030
+ }
38031
+ }
38032
+ function markdownLabel(label, fallback) {
38033
+ const flat = (label ?? "").replace(/\s+/g, " ").trim();
38034
+ const capped = flat.length > MAX_LABEL_CHARS ? `${flat.slice(0, MAX_LABEL_CHARS - 1).trimEnd()}…` : flat;
38035
+ return (capped || fallback).replace(/[\\[\]]/g, (c)=>`\\${c}`);
38036
+ }
38037
+ function markdownDestination(url) {
38038
+ return url.replace(/[()\s<>]/g, (c)=>`%${c.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`);
38039
+ }
38040
+ /**
38041
+ * Pre-built markdown link for `cite_as`, or null when there is no usable URL.
38042
+ * Only https URLs qualify: the chat renderer drops other schemes.
38043
+ */ function citeAs(label, url, fallbackLabel = "source") {
38044
+ const safe = source_link_httpsUrlOrNull(url);
38045
+ if (!safe) return null;
38046
+ return `[${markdownLabel(label, fallbackLabel)}](${markdownDestination(safe)})`;
38047
+ }
38048
+
38256
38049
  ;// ./lib/bridges/message-role.ts
38257
38050
  /**
38258
38051
  * Cross-adapter framing for bridge inbound messages.
@@ -38270,25 +38063,8 @@ function formatRoutingDuration(durationMs) {
38270
38063
  * sees. Adding a new adapter is a matter of mapping its platform-specific
38271
38064
  * "who sent this" signal onto `MessageRole`; the framing code does not need
38272
38065
  * to change.
38273
- */ /**
38274
- * Who sent the message from the agent's perspective.
38275
- *
38276
- * - `user`: the paired account holder themselves — typed on their phone,
38277
- * in their browser, etc. The agent treats these as the user's own
38278
- * reaction/input to the conversation. Useful as an intent signal but
38279
- * NOT a direct command to the agent (the user is talking to the
38280
- * counterpart, not the agent).
38281
- *
38282
- * - `counterpart`: another participant in the chat — 1:1 partner in a DM,
38283
- * or another member in a group chat. The agent treats these as
38284
- * conversation context the user has not yet reacted to. Not a request
38285
- * directed at the agent.
38286
- *
38287
- * - `agent`: the agent's own prior output, surfaced inbound when the
38288
- * adapter cannot suppress its echo (rare). Adapters with reliable
38289
- * echo-filtering (e.g. WhatsApp's `sentIdsSet`) should never emit this
38290
- * value; it exists for adapters where deduplication is best-effort.
38291
- */ /**
38066
+ */
38067
+ /**
38292
38068
  * Build the prompt prefix the agent receives for one bridge-inbound message.
38293
38069
  *
38294
38070
  * Output shape:
@@ -38302,6 +38078,7 @@ function formatRoutingDuration(durationMs) {
38302
38078
  * [message_role:user|counterpart|agent]
38303
38079
  * [sender_id:<id>]
38304
38080
  * [sender_name:<label>]
38081
+ * ([chat_link:<https url>] when the platform has a permalink for the chat)
38305
38082
  * ([group_name:<label>] [participant_id:<id>] [participant_name:<label>] for groups)
38306
38083
  *
38307
38084
  * <raw text>
@@ -38311,23 +38088,29 @@ function formatRoutingDuration(durationMs) {
38311
38088
  * convention. Both are stable across adapters.
38312
38089
  */ function formatBridgePrompt(input) {
38313
38090
  const note = roleNote(input.role, input.is_group, input.silent === true, input.event);
38091
+ // Header values come from the platform (display names, group subjects) and
38092
+ // are sender-controlled: a line break would forge extra headers or end the
38093
+ // header block early, so every value is flattened onto one line.
38094
+ const h = (value)=>String(value ?? "").replace(/[\r\n\u0085\u2028\u2029]+/g, " ");
38314
38095
  const lines = [
38315
- `[bridge:${input.bridge_id}]`,
38316
- `[chat_id:${input.chat_id}]`,
38317
- `[chat_name:${input.chat_name}]`,
38096
+ `[bridge:${h(input.bridge_id)}]`,
38097
+ `[chat_id:${h(input.chat_id)}]`,
38098
+ `[chat_name:${h(input.chat_name)}]`,
38318
38099
  `[chat_type:${input.is_group ? "group" : "dm"}]`,
38319
38100
  `[message_role:${input.role}]`,
38320
- `[sender_id:${input.sender_id}]`,
38321
- `[sender_name:${input.sender_name}]`
38101
+ `[sender_id:${h(input.sender_id)}]`,
38102
+ `[sender_name:${h(input.sender_name)}]`
38322
38103
  ];
38104
+ const chatLink = httpsUrlOrNull(input.chat_link);
38105
+ if (chatLink) lines.push(`[chat_link:${chatLink}]`);
38323
38106
  if (input.event) {
38324
38107
  lines.push(`[event_type:${input.event.type}]`);
38325
- lines.push(`[event_subtype:${input.event.subtype}]`);
38108
+ lines.push(`[event_subtype:${h(input.event.subtype)}]`);
38326
38109
  }
38327
38110
  if (input.is_group) {
38328
- lines.push(`[group_name:${input.chat_name}]`);
38329
- lines.push(`[participant_id:${input.sender_id}]`);
38330
- lines.push(`[participant_name:${input.sender_name}]`);
38111
+ lines.push(`[group_name:${h(input.chat_name)}]`);
38112
+ lines.push(`[participant_id:${h(input.sender_id)}]`);
38113
+ lines.push(`[participant_name:${h(input.sender_name)}]`);
38331
38114
  }
38332
38115
  return `${note}\n\n${lines.join("\n")}\n\n${input.text}`;
38333
38116
  }
@@ -38342,7 +38125,7 @@ function parseBridgePrompt(raw) {
38342
38125
  const lines = src.split("\n");
38343
38126
  let i = 0;
38344
38127
  for(; i < lines.length; i++){
38345
- const line = lines[i];
38128
+ const line = lines[i].replace(/\r$/, "");
38346
38129
  if (line === "") {
38347
38130
  i++;
38348
38131
  break;
@@ -38361,6 +38144,7 @@ function parseBridgePrompt(raw) {
38361
38144
  isGroup: headers.chat_type === "group",
38362
38145
  senderJid: senderId,
38363
38146
  senderName: headers.sender_name || senderId || "Unknown",
38147
+ chatLink: source_link_httpsUrlOrNull(headers.chat_link),
38364
38148
  body: lines.slice(i).join("\n").trimEnd()
38365
38149
  };
38366
38150
  }
@@ -48981,6 +48765,19 @@ function BridgeMessageCard({ ctx, activity }) {
48981
48765
  activityStatus(activity).copy,
48982
48766
  activity.occurrence_count > 1 ? ` · ${activity.occurrence_count} checks` : ""
48983
48767
  ]
48768
+ }) : null,
48769
+ ctx.chatLink ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("a", {
48770
+ href: ctx.chatLink,
48771
+ target: "_blank",
48772
+ rel: "noopener noreferrer",
48773
+ className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-white/15 hover:bg-white/25 text-[9.5px] shrink-0",
48774
+ title: `Open this chat (${ctx.chatLink})`,
48775
+ children: [
48776
+ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(external_link/* default */.A, {
48777
+ size: 9
48778
+ }),
48779
+ "open chat"
48780
+ ]
48984
48781
  }) : null
48985
48782
  ]
48986
48783
  });
@@ -55764,12 +55561,12 @@ function NetworkSection() {
55764
55561
  /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("label", {
55765
55562
  className: "block text-xs text-fg-subtle",
55766
55563
  children: [
55767
- "No proxy (comma-separated, optional)",
55564
+ "No proxy (comma-separated, optional; localhost is always direct)",
55768
55565
  /*#__PURE__*/ (0,react_jsx_runtime.jsx)("input", {
55769
55566
  type: "text",
55770
55567
  value: noProxy,
55771
55568
  onChange: (e)=>setNoProxy(e.target.value),
55772
- placeholder: "localhost,127.0.0.1,.internal",
55569
+ placeholder: ".internal,corp.example",
55773
55570
  className: "mt-1 w-full px-2 py-1.5 text-sm rounded border border-border bg-surface-3 text-fg font-mono"
55774
55571
  })
55775
55572
  ]
@@ -77975,6 +77772,256 @@ function AppShell() {
77975
77772
  }
77976
77773
 
77977
77774
 
77775
+ /***/ }),
77776
+
77777
+ /***/ 63033:
77778
+ /***/ ((module) => {
77779
+
77780
+ "use strict";
77781
+ module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
77782
+
77783
+ /***/ }),
77784
+
77785
+ /***/ 71000:
77786
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
77787
+
77788
+ "use strict";
77789
+
77790
+ Object.defineProperty(exports, "__esModule", ({
77791
+ value: true
77792
+ }));
77793
+ Object.defineProperty(exports, "addPathPrefix", ({
77794
+ enumerable: true,
77795
+ get: function() {
77796
+ return addPathPrefix;
77797
+ }
77798
+ }));
77799
+ const _parsepath = __webpack_require__(10571);
77800
+ function addPathPrefix(path, prefix) {
77801
+ if (!path.startsWith('/') || !prefix) {
77802
+ return path;
77803
+ }
77804
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
77805
+ return `${prefix}${pathname}${query}${hash}`;
77806
+ } //# sourceMappingURL=add-path-prefix.js.map
77807
+
77808
+
77809
+ /***/ }),
77810
+
77811
+ /***/ 73024:
77812
+ /***/ ((module) => {
77813
+
77814
+ "use strict";
77815
+ module.exports = require("node:fs");
77816
+
77817
+ /***/ }),
77818
+
77819
+ /***/ 73136:
77820
+ /***/ ((module) => {
77821
+
77822
+ "use strict";
77823
+ module.exports = require("node:url");
77824
+
77825
+ /***/ }),
77826
+
77827
+ /***/ 75729:
77828
+ /***/ ((module, exports, __webpack_require__) => {
77829
+
77830
+ "use strict";
77831
+
77832
+ Object.defineProperty(exports, "__esModule", ({
77833
+ value: true
77834
+ }));
77835
+ Object.defineProperty(exports, "addBasePath", ({
77836
+ enumerable: true,
77837
+ get: function() {
77838
+ return addBasePath;
77839
+ }
77840
+ }));
77841
+ const _addpathprefix = __webpack_require__(71000);
77842
+ const _normalizetrailingslash = __webpack_require__(34956);
77843
+ const basePath = false || '';
77844
+ function addBasePath(path, required) {
77845
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)( false ? 0 : (0, _addpathprefix.addPathPrefix)(path, basePath));
77846
+ }
77847
+ if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
77848
+ Object.defineProperty(exports.default, '__esModule', {
77849
+ value: true
77850
+ });
77851
+ Object.assign(exports.default, exports);
77852
+ module.exports = exports.default;
77853
+ } //# sourceMappingURL=add-base-path.js.map
77854
+
77855
+
77856
+ /***/ }),
77857
+
77858
+ /***/ 75919:
77859
+ /***/ ((module) => {
77860
+
77861
+ "use strict";
77862
+ module.exports = require("node:worker_threads");
77863
+
77864
+ /***/ }),
77865
+
77866
+ /***/ 76760:
77867
+ /***/ ((module) => {
77868
+
77869
+ "use strict";
77870
+ module.exports = require("node:path");
77871
+
77872
+ /***/ }),
77873
+
77874
+ /***/ 77030:
77875
+ /***/ ((module) => {
77876
+
77877
+ "use strict";
77878
+ module.exports = require("node:net");
77879
+
77880
+ /***/ }),
77881
+
77882
+ /***/ 77598:
77883
+ /***/ ((module) => {
77884
+
77885
+ "use strict";
77886
+ module.exports = require("node:crypto");
77887
+
77888
+ /***/ }),
77889
+
77890
+ /***/ 79428:
77891
+ /***/ ((module) => {
77892
+
77893
+ "use strict";
77894
+ module.exports = require("buffer");
77895
+
77896
+ /***/ }),
77897
+
77898
+ /***/ 79925:
77899
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
77900
+
77901
+ "use strict";
77902
+ // Format function modified from nodejs
77903
+ // Copyright Joyent, Inc. and other Node contributors.
77904
+ //
77905
+ // Permission is hereby granted, free of charge, to any person obtaining a
77906
+ // copy of this software and associated documentation files (the
77907
+ // "Software"), to deal in the Software without restriction, including
77908
+ // without limitation the rights to use, copy, modify, merge, publish,
77909
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
77910
+ // persons to whom the Software is furnished to do so, subject to the
77911
+ // following conditions:
77912
+ //
77913
+ // The above copyright notice and this permission notice shall be included
77914
+ // in all copies or substantial portions of the Software.
77915
+ //
77916
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
77917
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
77918
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
77919
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
77920
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
77921
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
77922
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
77923
+
77924
+ Object.defineProperty(exports, "__esModule", ({
77925
+ value: true
77926
+ }));
77927
+ 0 && (0);
77928
+ function _export(target, all) {
77929
+ for(var name in all)Object.defineProperty(target, name, {
77930
+ enumerable: true,
77931
+ get: all[name]
77932
+ });
77933
+ }
77934
+ _export(exports, {
77935
+ formatUrl: function() {
77936
+ return formatUrl;
77937
+ },
77938
+ formatWithValidation: function() {
77939
+ return formatWithValidation;
77940
+ },
77941
+ urlObjectKeys: function() {
77942
+ return urlObjectKeys;
77943
+ }
77944
+ });
77945
+ const _interop_require_wildcard = __webpack_require__(24814);
77946
+ const _querystring = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(90485));
77947
+ const slashedProtocols = /https?|ftp|gopher|file/;
77948
+ function formatUrl(urlObj) {
77949
+ let { auth, hostname } = urlObj;
77950
+ let protocol = urlObj.protocol || '';
77951
+ let pathname = urlObj.pathname || '';
77952
+ let hash = urlObj.hash || '';
77953
+ let query = urlObj.query || '';
77954
+ let host = false;
77955
+ auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
77956
+ if (urlObj.host) {
77957
+ host = auth + urlObj.host;
77958
+ } else if (hostname) {
77959
+ host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
77960
+ if (urlObj.port) {
77961
+ host += ':' + urlObj.port;
77962
+ }
77963
+ }
77964
+ if (query && typeof query === 'object') {
77965
+ query = String(_querystring.urlQueryToSearchParams(query));
77966
+ }
77967
+ let search = urlObj.search || query && `?${query}` || '';
77968
+ if (protocol && !protocol.endsWith(':')) protocol += ':';
77969
+ if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
77970
+ host = '//' + (host || '');
77971
+ if (pathname && pathname[0] !== '/') pathname = '/' + pathname;
77972
+ } else if (!host) {
77973
+ host = '';
77974
+ }
77975
+ if (hash && hash[0] !== '#') hash = '#' + hash;
77976
+ if (search && search[0] !== '?') search = '?' + search;
77977
+ pathname = pathname.replace(/[?#]/g, encodeURIComponent);
77978
+ search = search.replace('#', '%23');
77979
+ return `${protocol}${host}${pathname}${search}${hash}`;
77980
+ }
77981
+ const urlObjectKeys = [
77982
+ 'auth',
77983
+ 'hash',
77984
+ 'host',
77985
+ 'hostname',
77986
+ 'href',
77987
+ 'path',
77988
+ 'pathname',
77989
+ 'port',
77990
+ 'protocol',
77991
+ 'query',
77992
+ 'search',
77993
+ 'slashes'
77994
+ ];
77995
+ function formatWithValidation(url) {
77996
+ if (false) {}
77997
+ return formatUrl(url);
77998
+ } //# sourceMappingURL=format-url.js.map
77999
+
78000
+
78001
+ /***/ }),
78002
+
78003
+ /***/ 80099:
78004
+ /***/ ((module) => {
78005
+
78006
+ "use strict";
78007
+ module.exports = require("node:sqlite");
78008
+
78009
+ /***/ }),
78010
+
78011
+ /***/ 80481:
78012
+ /***/ ((module) => {
78013
+
78014
+ "use strict";
78015
+ module.exports = require("node:readline");
78016
+
78017
+ /***/ }),
78018
+
78019
+ /***/ 81630:
78020
+ /***/ ((module) => {
78021
+
78022
+ "use strict";
78023
+ module.exports = require("http");
78024
+
77978
78025
  /***/ }),
77979
78026
 
77980
78027
  /***/ 94735: