@agenticmail/enterprise 0.5.326 → 0.5.328

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 (868) hide show
  1. package/dist/dashboard/app.js +1 -1
  2. package/dist/dashboard/pages/cluster.js +1 -1
  3. package/logs/cloudflared-error.log +6 -0
  4. package/logs/enterprise-out.log +2 -0
  5. package/package.json +1 -1
  6. package/god_is_great.html +0 -35
  7. package/src/admin/page-registry.ts +0 -290
  8. package/src/admin/routes.ts +0 -2968
  9. package/src/agent-tools/common.ts +0 -260
  10. package/src/agent-tools/index.ts +0 -542
  11. package/src/agent-tools/merge.ts +0 -62
  12. package/src/agent-tools/middleware.ts +0 -436
  13. package/src/agent-tools/schema/typebox.ts +0 -25
  14. package/src/agent-tools/security.ts +0 -352
  15. package/src/agent-tools/tool-resolver.ts +0 -1018
  16. package/src/agent-tools/tools/agenticmail.ts +0 -1017
  17. package/src/agent-tools/tools/bash.ts +0 -179
  18. package/src/agent-tools/tools/browser-tool.schema.ts +0 -112
  19. package/src/agent-tools/tools/browser-tool.ts +0 -388
  20. package/src/agent-tools/tools/browser.ts +0 -764
  21. package/src/agent-tools/tools/edit.ts +0 -100
  22. package/src/agent-tools/tools/enterprise-code-sandbox.ts +0 -395
  23. package/src/agent-tools/tools/enterprise-database.ts +0 -377
  24. package/src/agent-tools/tools/enterprise-diff.ts +0 -580
  25. package/src/agent-tools/tools/enterprise-documents.ts +0 -896
  26. package/src/agent-tools/tools/enterprise-http.ts +0 -485
  27. package/src/agent-tools/tools/enterprise-security-scan.ts +0 -528
  28. package/src/agent-tools/tools/enterprise-spreadsheet.ts +0 -825
  29. package/src/agent-tools/tools/glob.ts +0 -129
  30. package/src/agent-tools/tools/google/calendar.ts +0 -230
  31. package/src/agent-tools/tools/google/chat.ts +0 -725
  32. package/src/agent-tools/tools/google/contacts.ts +0 -209
  33. package/src/agent-tools/tools/google/docs.ts +0 -162
  34. package/src/agent-tools/tools/google/drive.ts +0 -392
  35. package/src/agent-tools/tools/google/forms.ts +0 -367
  36. package/src/agent-tools/tools/google/gmail.ts +0 -897
  37. package/src/agent-tools/tools/google/index.ts +0 -86
  38. package/src/agent-tools/tools/google/maps.ts +0 -543
  39. package/src/agent-tools/tools/google/meeting-voice.ts +0 -885
  40. package/src/agent-tools/tools/google/meetings.ts +0 -1094
  41. package/src/agent-tools/tools/google/sheets.ts +0 -215
  42. package/src/agent-tools/tools/google/slides.ts +0 -559
  43. package/src/agent-tools/tools/google/tasks.ts +0 -200
  44. package/src/agent-tools/tools/grep.ts +0 -178
  45. package/src/agent-tools/tools/integrations/_factory.ts +0 -102
  46. package/src/agent-tools/tools/integrations/activecampaign.ts +0 -14
  47. package/src/agent-tools/tools/integrations/adobe-sign.ts +0 -14
  48. package/src/agent-tools/tools/integrations/adp.ts +0 -14
  49. package/src/agent-tools/tools/integrations/airtable.ts +0 -14
  50. package/src/agent-tools/tools/integrations/apollo.ts +0 -14
  51. package/src/agent-tools/tools/integrations/asana.ts +0 -14
  52. package/src/agent-tools/tools/integrations/auth0.ts +0 -14
  53. package/src/agent-tools/tools/integrations/aws.ts +0 -14
  54. package/src/agent-tools/tools/integrations/azure-devops.ts +0 -14
  55. package/src/agent-tools/tools/integrations/bamboohr.ts +0 -14
  56. package/src/agent-tools/tools/integrations/basecamp.ts +0 -14
  57. package/src/agent-tools/tools/integrations/bigcommerce.ts +0 -14
  58. package/src/agent-tools/tools/integrations/bitbucket.ts +0 -14
  59. package/src/agent-tools/tools/integrations/box.ts +0 -14
  60. package/src/agent-tools/tools/integrations/brex.ts +0 -14
  61. package/src/agent-tools/tools/integrations/buffer.ts +0 -14
  62. package/src/agent-tools/tools/integrations/calendly.ts +0 -14
  63. package/src/agent-tools/tools/integrations/canva.ts +0 -14
  64. package/src/agent-tools/tools/integrations/chargebee.ts +0 -14
  65. package/src/agent-tools/tools/integrations/circleci.ts +0 -14
  66. package/src/agent-tools/tools/integrations/clickup.ts +0 -14
  67. package/src/agent-tools/tools/integrations/close.ts +0 -14
  68. package/src/agent-tools/tools/integrations/cloudflare.ts +0 -14
  69. package/src/agent-tools/tools/integrations/confluence.ts +0 -14
  70. package/src/agent-tools/tools/integrations/contentful.ts +0 -14
  71. package/src/agent-tools/tools/integrations/copper.ts +0 -14
  72. package/src/agent-tools/tools/integrations/crisp.ts +0 -14
  73. package/src/agent-tools/tools/integrations/crowdstrike.ts +0 -14
  74. package/src/agent-tools/tools/integrations/datadog.ts +0 -14
  75. package/src/agent-tools/tools/integrations/digitalocean.ts +0 -14
  76. package/src/agent-tools/tools/integrations/discord.ts +0 -14
  77. package/src/agent-tools/tools/integrations/docker.ts +0 -14
  78. package/src/agent-tools/tools/integrations/docusign.ts +0 -14
  79. package/src/agent-tools/tools/integrations/drift.ts +0 -14
  80. package/src/agent-tools/tools/integrations/dropbox.ts +0 -14
  81. package/src/agent-tools/tools/integrations/figma.ts +0 -14
  82. package/src/agent-tools/tools/integrations/firebase.ts +0 -14
  83. package/src/agent-tools/tools/integrations/flyio.ts +0 -14
  84. package/src/agent-tools/tools/integrations/freshbooks.ts +0 -14
  85. package/src/agent-tools/tools/integrations/freshdesk.ts +0 -14
  86. package/src/agent-tools/tools/integrations/freshsales.ts +0 -14
  87. package/src/agent-tools/tools/integrations/freshservice.ts +0 -14
  88. package/src/agent-tools/tools/integrations/front.ts +0 -14
  89. package/src/agent-tools/tools/integrations/github-actions.ts +0 -14
  90. package/src/agent-tools/tools/integrations/github.ts +0 -14
  91. package/src/agent-tools/tools/integrations/gitlab.ts +0 -14
  92. package/src/agent-tools/tools/integrations/gong.ts +0 -14
  93. package/src/agent-tools/tools/integrations/google-ads.ts +0 -14
  94. package/src/agent-tools/tools/integrations/google-analytics.ts +0 -14
  95. package/src/agent-tools/tools/integrations/google-cloud.ts +0 -14
  96. package/src/agent-tools/tools/integrations/gotomeeting.ts +0 -14
  97. package/src/agent-tools/tools/integrations/grafana.ts +0 -14
  98. package/src/agent-tools/tools/integrations/greenhouse.ts +0 -14
  99. package/src/agent-tools/tools/integrations/gusto.ts +0 -14
  100. package/src/agent-tools/tools/integrations/hashicorp-vault.ts +0 -14
  101. package/src/agent-tools/tools/integrations/heroku.ts +0 -14
  102. package/src/agent-tools/tools/integrations/hibob.ts +0 -14
  103. package/src/agent-tools/tools/integrations/hootsuite.ts +0 -14
  104. package/src/agent-tools/tools/integrations/hubspot.ts +0 -14
  105. package/src/agent-tools/tools/integrations/huggingface.ts +0 -14
  106. package/src/agent-tools/tools/integrations/index.ts +0 -474
  107. package/src/agent-tools/tools/integrations/intercom.ts +0 -14
  108. package/src/agent-tools/tools/integrations/jira.ts +0 -14
  109. package/src/agent-tools/tools/integrations/klaviyo.ts +0 -14
  110. package/src/agent-tools/tools/integrations/kubernetes.ts +0 -14
  111. package/src/agent-tools/tools/integrations/lattice.ts +0 -14
  112. package/src/agent-tools/tools/integrations/launchdarkly.ts +0 -14
  113. package/src/agent-tools/tools/integrations/lever.ts +0 -14
  114. package/src/agent-tools/tools/integrations/linear.ts +0 -14
  115. package/src/agent-tools/tools/integrations/linkedin.ts +0 -14
  116. package/src/agent-tools/tools/integrations/livechat.ts +0 -14
  117. package/src/agent-tools/tools/integrations/loom.ts +0 -14
  118. package/src/agent-tools/tools/integrations/mailchimp.ts +0 -14
  119. package/src/agent-tools/tools/integrations/mailgun.ts +0 -14
  120. package/src/agent-tools/tools/integrations/miro.ts +0 -14
  121. package/src/agent-tools/tools/integrations/mixpanel.ts +0 -14
  122. package/src/agent-tools/tools/integrations/monday.ts +0 -14
  123. package/src/agent-tools/tools/integrations/mongodb-atlas.ts +0 -14
  124. package/src/agent-tools/tools/integrations/neon.ts +0 -14
  125. package/src/agent-tools/tools/integrations/netlify.ts +0 -14
  126. package/src/agent-tools/tools/integrations/netsuite.ts +0 -14
  127. package/src/agent-tools/tools/integrations/newrelic.ts +0 -14
  128. package/src/agent-tools/tools/integrations/notion.ts +0 -14
  129. package/src/agent-tools/tools/integrations/okta.ts +0 -14
  130. package/src/agent-tools/tools/integrations/openai.ts +0 -14
  131. package/src/agent-tools/tools/integrations/opsgenie.ts +0 -14
  132. package/src/agent-tools/tools/integrations/outreach.ts +0 -14
  133. package/src/agent-tools/tools/integrations/paddle.ts +0 -14
  134. package/src/agent-tools/tools/integrations/pagerduty.ts +0 -14
  135. package/src/agent-tools/tools/integrations/pandadoc.ts +0 -14
  136. package/src/agent-tools/tools/integrations/paypal.ts +0 -14
  137. package/src/agent-tools/tools/integrations/personio.ts +0 -14
  138. package/src/agent-tools/tools/integrations/pinecone.ts +0 -14
  139. package/src/agent-tools/tools/integrations/pipedrive.ts +0 -14
  140. package/src/agent-tools/tools/integrations/plaid.ts +0 -14
  141. package/src/agent-tools/tools/integrations/postmark.ts +0 -14
  142. package/src/agent-tools/tools/integrations/power-automate.ts +0 -14
  143. package/src/agent-tools/tools/integrations/quickbooks.ts +0 -14
  144. package/src/agent-tools/tools/integrations/recurly.ts +0 -14
  145. package/src/agent-tools/tools/integrations/reddit.ts +0 -14
  146. package/src/agent-tools/tools/integrations/render.ts +0 -14
  147. package/src/agent-tools/tools/integrations/ringcentral.ts +0 -14
  148. package/src/agent-tools/tools/integrations/rippling.ts +0 -14
  149. package/src/agent-tools/tools/integrations/salesforce.ts +0 -14
  150. package/src/agent-tools/tools/integrations/salesloft.ts +0 -14
  151. package/src/agent-tools/tools/integrations/sanity.ts +0 -14
  152. package/src/agent-tools/tools/integrations/sap.ts +0 -14
  153. package/src/agent-tools/tools/integrations/segment.ts +0 -14
  154. package/src/agent-tools/tools/integrations/sendgrid.ts +0 -14
  155. package/src/agent-tools/tools/integrations/sentry.ts +0 -14
  156. package/src/agent-tools/tools/integrations/servicenow.ts +0 -14
  157. package/src/agent-tools/tools/integrations/shopify.ts +0 -14
  158. package/src/agent-tools/tools/integrations/shortcut.ts +0 -14
  159. package/src/agent-tools/tools/integrations/slack.ts +0 -14
  160. package/src/agent-tools/tools/integrations/smartsheet.ts +0 -14
  161. package/src/agent-tools/tools/integrations/snowflake.ts +0 -14
  162. package/src/agent-tools/tools/integrations/snyk.ts +0 -14
  163. package/src/agent-tools/tools/integrations/splunk.ts +0 -14
  164. package/src/agent-tools/tools/integrations/square.ts +0 -14
  165. package/src/agent-tools/tools/integrations/statuspage.ts +0 -14
  166. package/src/agent-tools/tools/integrations/stripe.ts +0 -14
  167. package/src/agent-tools/tools/integrations/supabase.ts +0 -14
  168. package/src/agent-tools/tools/integrations/teamwork.ts +0 -14
  169. package/src/agent-tools/tools/integrations/telegram.ts +0 -14
  170. package/src/agent-tools/tools/integrations/terraform.ts +0 -14
  171. package/src/agent-tools/tools/integrations/todoist.ts +0 -14
  172. package/src/agent-tools/tools/integrations/trello.ts +0 -14
  173. package/src/agent-tools/tools/integrations/twilio.ts +0 -14
  174. package/src/agent-tools/tools/integrations/twitter.ts +0 -14
  175. package/src/agent-tools/tools/integrations/vercel.ts +0 -14
  176. package/src/agent-tools/tools/integrations/weaviate.ts +0 -14
  177. package/src/agent-tools/tools/integrations/webex.ts +0 -14
  178. package/src/agent-tools/tools/integrations/webflow.ts +0 -14
  179. package/src/agent-tools/tools/integrations/whatsapp.ts +0 -14
  180. package/src/agent-tools/tools/integrations/whereby.ts +0 -14
  181. package/src/agent-tools/tools/integrations/woocommerce.ts +0 -14
  182. package/src/agent-tools/tools/integrations/wordpress.ts +0 -14
  183. package/src/agent-tools/tools/integrations/workday.ts +0 -14
  184. package/src/agent-tools/tools/integrations/wrike.ts +0 -14
  185. package/src/agent-tools/tools/integrations/xero.ts +0 -14
  186. package/src/agent-tools/tools/integrations/youtube.ts +0 -14
  187. package/src/agent-tools/tools/integrations/zendesk.ts +0 -14
  188. package/src/agent-tools/tools/integrations/zoho-crm.ts +0 -14
  189. package/src/agent-tools/tools/integrations/zoom.ts +0 -14
  190. package/src/agent-tools/tools/integrations/zuora.ts +0 -14
  191. package/src/agent-tools/tools/knowledge-search.ts +0 -318
  192. package/src/agent-tools/tools/local/coding.ts +0 -626
  193. package/src/agent-tools/tools/local/dependency-manager.ts +0 -647
  194. package/src/agent-tools/tools/local/file-edit.ts +0 -31
  195. package/src/agent-tools/tools/local/file-list.ts +0 -39
  196. package/src/agent-tools/tools/local/file-ops.ts +0 -48
  197. package/src/agent-tools/tools/local/file-read.ts +0 -39
  198. package/src/agent-tools/tools/local/file-search.ts +0 -46
  199. package/src/agent-tools/tools/local/file-write.ts +0 -28
  200. package/src/agent-tools/tools/local/filesystem.ts +0 -5
  201. package/src/agent-tools/tools/local/index.ts +0 -55
  202. package/src/agent-tools/tools/local/resolve-path.ts +0 -18
  203. package/src/agent-tools/tools/local/shell.ts +0 -277
  204. package/src/agent-tools/tools/local/system-info.ts +0 -29
  205. package/src/agent-tools/tools/management.ts +0 -425
  206. package/src/agent-tools/tools/mcp-bridge.ts +0 -142
  207. package/src/agent-tools/tools/mcp-server-tools.ts +0 -91
  208. package/src/agent-tools/tools/meeting-lifecycle.ts +0 -438
  209. package/src/agent-tools/tools/memory.ts +0 -509
  210. package/src/agent-tools/tools/messaging/index.ts +0 -6
  211. package/src/agent-tools/tools/messaging/telegram.ts +0 -167
  212. package/src/agent-tools/tools/messaging/whatsapp.ts +0 -651
  213. package/src/agent-tools/tools/microsoft/contacts.ts +0 -176
  214. package/src/agent-tools/tools/microsoft/excel-vba.ts +0 -331
  215. package/src/agent-tools/tools/microsoft/excel.ts +0 -261
  216. package/src/agent-tools/tools/microsoft/graph-api.ts +0 -161
  217. package/src/agent-tools/tools/microsoft/index.ts +0 -95
  218. package/src/agent-tools/tools/microsoft/onedrive.ts +0 -429
  219. package/src/agent-tools/tools/microsoft/onenote.ts +0 -186
  220. package/src/agent-tools/tools/microsoft/outlook-calendar.ts +0 -286
  221. package/src/agent-tools/tools/microsoft/outlook-mail.ts +0 -723
  222. package/src/agent-tools/tools/microsoft/planner.ts +0 -200
  223. package/src/agent-tools/tools/microsoft/powerbi.ts +0 -266
  224. package/src/agent-tools/tools/microsoft/powerpoint.ts +0 -186
  225. package/src/agent-tools/tools/microsoft/sharepoint.ts +0 -328
  226. package/src/agent-tools/tools/microsoft/teams.ts +0 -463
  227. package/src/agent-tools/tools/microsoft/todo.ts +0 -181
  228. package/src/agent-tools/tools/oauth-token-provider.ts +0 -101
  229. package/src/agent-tools/tools/read.ts +0 -160
  230. package/src/agent-tools/tools/visual-memory/capture.ts +0 -217
  231. package/src/agent-tools/tools/visual-memory/diff.ts +0 -283
  232. package/src/agent-tools/tools/visual-memory/index.ts +0 -698
  233. package/src/agent-tools/tools/visual-memory/phash.ts +0 -120
  234. package/src/agent-tools/tools/visual-memory/similarity.ts +0 -354
  235. package/src/agent-tools/tools/visual-memory/storage.ts +0 -534
  236. package/src/agent-tools/tools/visual-memory/types.ts +0 -100
  237. package/src/agent-tools/tools/web-fetch-utils.ts +0 -202
  238. package/src/agent-tools/tools/web-fetch.ts +0 -464
  239. package/src/agent-tools/tools/web-search.ts +0 -480
  240. package/src/agent-tools/tools/web-shared.ts +0 -232
  241. package/src/agent-tools/tools/write.ts +0 -68
  242. package/src/agent-tools/types.ts +0 -214
  243. package/src/agenticmail/index.ts +0 -34
  244. package/src/agenticmail/manager.ts +0 -253
  245. package/src/agenticmail/providers/google.ts +0 -391
  246. package/src/agenticmail/providers/imap.ts +0 -454
  247. package/src/agenticmail/providers/index.ts +0 -28
  248. package/src/agenticmail/providers/microsoft.ts +0 -260
  249. package/src/agenticmail/types.ts +0 -173
  250. package/src/auth/routes.ts +0 -1589
  251. package/src/browser/bridge-auth-registry.ts +0 -34
  252. package/src/browser/bridge-server.ts +0 -93
  253. package/src/browser/cdp.helpers.ts +0 -180
  254. package/src/browser/cdp.ts +0 -466
  255. package/src/browser/chrome.executables.ts +0 -625
  256. package/src/browser/chrome.profile-decoration.ts +0 -198
  257. package/src/browser/chrome.ts +0 -349
  258. package/src/browser/client-actions-core.ts +0 -259
  259. package/src/browser/client-actions-observe.ts +0 -184
  260. package/src/browser/client-actions-state.ts +0 -284
  261. package/src/browser/client-actions-types.ts +0 -16
  262. package/src/browser/client-actions-url.ts +0 -11
  263. package/src/browser/client-actions.ts +0 -4
  264. package/src/browser/client-fetch.ts +0 -253
  265. package/src/browser/client.ts +0 -337
  266. package/src/browser/config.ts +0 -301
  267. package/src/browser/constants.ts +0 -8
  268. package/src/browser/control-auth.ts +0 -94
  269. package/src/browser/control-service.ts +0 -81
  270. package/src/browser/csrf.ts +0 -87
  271. package/src/browser/enterprise-compat.ts +0 -562
  272. package/src/browser/extension-relay.ts +0 -834
  273. package/src/browser/http-auth.ts +0 -63
  274. package/src/browser/navigation-guard.ts +0 -50
  275. package/src/browser/paths.ts +0 -49
  276. package/src/browser/playwright.d.ts +0 -12
  277. package/src/browser/profiles-service.ts +0 -187
  278. package/src/browser/profiles.ts +0 -114
  279. package/src/browser/proxy-files.ts +0 -41
  280. package/src/browser/pw-ai-module.ts +0 -52
  281. package/src/browser/pw-ai-state.ts +0 -9
  282. package/src/browser/pw-ai.ts +0 -65
  283. package/src/browser/pw-role-snapshot.ts +0 -434
  284. package/src/browser/pw-session.ts +0 -810
  285. package/src/browser/pw-tools-core.activity.ts +0 -68
  286. package/src/browser/pw-tools-core.downloads.ts +0 -281
  287. package/src/browser/pw-tools-core.interactions.ts +0 -646
  288. package/src/browser/pw-tools-core.responses.ts +0 -124
  289. package/src/browser/pw-tools-core.shared.ts +0 -70
  290. package/src/browser/pw-tools-core.snapshot.ts +0 -213
  291. package/src/browser/pw-tools-core.state.ts +0 -209
  292. package/src/browser/pw-tools-core.storage.ts +0 -128
  293. package/src/browser/pw-tools-core.trace.ts +0 -37
  294. package/src/browser/pw-tools-core.ts +0 -8
  295. package/src/browser/resolved-config-refresh.ts +0 -59
  296. package/src/browser/routes/agent.act.shared.ts +0 -52
  297. package/src/browser/routes/agent.act.ts +0 -575
  298. package/src/browser/routes/agent.debug.ts +0 -149
  299. package/src/browser/routes/agent.shared.ts +0 -143
  300. package/src/browser/routes/agent.snapshot.ts +0 -333
  301. package/src/browser/routes/agent.storage.ts +0 -451
  302. package/src/browser/routes/agent.ts +0 -13
  303. package/src/browser/routes/basic.ts +0 -202
  304. package/src/browser/routes/dispatcher.ts +0 -126
  305. package/src/browser/routes/index.ts +0 -11
  306. package/src/browser/routes/path-output.ts +0 -1
  307. package/src/browser/routes/tabs.ts +0 -217
  308. package/src/browser/routes/types.ts +0 -26
  309. package/src/browser/routes/utils.ts +0 -73
  310. package/src/browser/screenshot.ts +0 -54
  311. package/src/browser/server-context.ts +0 -688
  312. package/src/browser/server-context.types.ts +0 -65
  313. package/src/browser/server-lifecycle.ts +0 -48
  314. package/src/browser/server-middleware.ts +0 -37
  315. package/src/browser/server.ts +0 -110
  316. package/src/browser/target-id.ts +0 -30
  317. package/src/browser/trash.ts +0 -21
  318. package/src/cli-agent.ts +0 -2452
  319. package/src/cli-reset-password.ts +0 -138
  320. package/src/cli-serve.ts +0 -314
  321. package/src/cli.ts +0 -103
  322. package/src/dashboard/HELP-TOOLTIPS-GUIDE.md +0 -45
  323. package/src/dashboard/app.js +0 -579
  324. package/src/dashboard/assets/brand-logos.js +0 -350
  325. package/src/dashboard/assets/icons/emoji-icons.js +0 -893
  326. package/src/dashboard/assets/logo.png +0 -0
  327. package/src/dashboard/assets/provider-logos.js +0 -139
  328. package/src/dashboard/components/error-boundary.js +0 -21
  329. package/src/dashboard/components/help-button.js +0 -65
  330. package/src/dashboard/components/icons.js +0 -64
  331. package/src/dashboard/components/knowledge-link.js +0 -79
  332. package/src/dashboard/components/modal.js +0 -125
  333. package/src/dashboard/components/org-switcher.js +0 -156
  334. package/src/dashboard/components/persona-fields.js +0 -460
  335. package/src/dashboard/components/settings-help.js +0 -193
  336. package/src/dashboard/components/tag-input.js +0 -96
  337. package/src/dashboard/components/timezones.js +0 -352
  338. package/src/dashboard/components/transport-encryption.js +0 -288
  339. package/src/dashboard/components/utils.js +0 -205
  340. package/src/dashboard/data/countries.js +0 -255
  341. package/src/dashboard/docs/activity.html +0 -253
  342. package/src/dashboard/docs/agent-activity.html +0 -199
  343. package/src/dashboard/docs/agent-autonomy.html +0 -161
  344. package/src/dashboard/docs/agent-budget.html +0 -190
  345. package/src/dashboard/docs/agent-channels.html +0 -189
  346. package/src/dashboard/docs/agent-communication.html +0 -171
  347. package/src/dashboard/docs/agent-configuration.html +0 -194
  348. package/src/dashboard/docs/agent-deployment.html +0 -323
  349. package/src/dashboard/docs/agent-email.html +0 -184
  350. package/src/dashboard/docs/agent-guardrails.html +0 -206
  351. package/src/dashboard/docs/agent-manager.html +0 -226
  352. package/src/dashboard/docs/agent-memory.html +0 -215
  353. package/src/dashboard/docs/agent-overview.html +0 -226
  354. package/src/dashboard/docs/agent-permissions.html +0 -305
  355. package/src/dashboard/docs/agent-personal.html +0 -155
  356. package/src/dashboard/docs/agent-security.html +0 -188
  357. package/src/dashboard/docs/agent-skills.html +0 -224
  358. package/src/dashboard/docs/agent-tool-security.html +0 -205
  359. package/src/dashboard/docs/agent-tools.html +0 -238
  360. package/src/dashboard/docs/agent-whatsapp.html +0 -210
  361. package/src/dashboard/docs/agent-workforce.html +0 -199
  362. package/src/dashboard/docs/agents.html +0 -258
  363. package/src/dashboard/docs/approvals.html +0 -200
  364. package/src/dashboard/docs/audit.html +0 -206
  365. package/src/dashboard/docs/browser-providers.html +0 -313
  366. package/src/dashboard/docs/cluster.html +0 -285
  367. package/src/dashboard/docs/community-skills.html +0 -253
  368. package/src/dashboard/docs/compliance.html +0 -221
  369. package/src/dashboard/docs/dashboard.html +0 -84
  370. package/src/dashboard/docs/database-access.html +0 -322
  371. package/src/dashboard/docs/dlp.html +0 -268
  372. package/src/dashboard/docs/docs-style.css +0 -26
  373. package/src/dashboard/docs/domain-status.html +0 -294
  374. package/src/dashboard/docs/guardrails.html +0 -265
  375. package/src/dashboard/docs/journal.html +0 -197
  376. package/src/dashboard/docs/knowledge-contributions.html +0 -286
  377. package/src/dashboard/docs/knowledge.html +0 -268
  378. package/src/dashboard/docs/memory-transfer.html +0 -311
  379. package/src/dashboard/docs/messages.html +0 -217
  380. package/src/dashboard/docs/multi-tenant.html +0 -311
  381. package/src/dashboard/docs/org-chart.html +0 -239
  382. package/src/dashboard/docs/organizations.html +0 -182
  383. package/src/dashboard/docs/roles.html +0 -195
  384. package/src/dashboard/docs/settings-network.html +0 -321
  385. package/src/dashboard/docs/settings-security.html +0 -347
  386. package/src/dashboard/docs/settings-tool-security.html +0 -176
  387. package/src/dashboard/docs/settings.html +0 -280
  388. package/src/dashboard/docs/skill-connections.html +0 -270
  389. package/src/dashboard/docs/skills.html +0 -206
  390. package/src/dashboard/docs/task-pipeline.html +0 -261
  391. package/src/dashboard/docs/transport-encryption.html +0 -359
  392. package/src/dashboard/docs/users.html +0 -225
  393. package/src/dashboard/docs/vault.html +0 -260
  394. package/src/dashboard/docs/workforce.html +0 -245
  395. package/src/dashboard/index.html +0 -444
  396. package/src/dashboard/pages/activity.js +0 -379
  397. package/src/dashboard/pages/agent-detail/activity.js +0 -277
  398. package/src/dashboard/pages/agent-detail/autonomy.js +0 -244
  399. package/src/dashboard/pages/agent-detail/budget.js +0 -269
  400. package/src/dashboard/pages/agent-detail/channels.js +0 -494
  401. package/src/dashboard/pages/agent-detail/communication.js +0 -296
  402. package/src/dashboard/pages/agent-detail/configuration.js +0 -882
  403. package/src/dashboard/pages/agent-detail/deployment.js +0 -958
  404. package/src/dashboard/pages/agent-detail/email.js +0 -674
  405. package/src/dashboard/pages/agent-detail/guardrails.js +0 -521
  406. package/src/dashboard/pages/agent-detail/index.js +0 -261
  407. package/src/dashboard/pages/agent-detail/manager.js +0 -357
  408. package/src/dashboard/pages/agent-detail/meeting-browser.js +0 -933
  409. package/src/dashboard/pages/agent-detail/memory.js +0 -368
  410. package/src/dashboard/pages/agent-detail/overview.js +0 -844
  411. package/src/dashboard/pages/agent-detail/permissions.js +0 -1163
  412. package/src/dashboard/pages/agent-detail/personal-details.js +0 -404
  413. package/src/dashboard/pages/agent-detail/security.js +0 -409
  414. package/src/dashboard/pages/agent-detail/shared.js +0 -85
  415. package/src/dashboard/pages/agent-detail/skills-section.js +0 -183
  416. package/src/dashboard/pages/agent-detail/tool-security.js +0 -380
  417. package/src/dashboard/pages/agent-detail/tools.js +0 -322
  418. package/src/dashboard/pages/agent-detail/whatsapp.js +0 -824
  419. package/src/dashboard/pages/agent-detail/workforce.js +0 -683
  420. package/src/dashboard/pages/agents.js +0 -1242
  421. package/src/dashboard/pages/approvals.js +0 -100
  422. package/src/dashboard/pages/audit.js +0 -198
  423. package/src/dashboard/pages/cluster.js +0 -512
  424. package/src/dashboard/pages/community-skills.js +0 -1219
  425. package/src/dashboard/pages/compliance.js +0 -475
  426. package/src/dashboard/pages/dashboard.js +0 -180
  427. package/src/dashboard/pages/database-access.js +0 -812
  428. package/src/dashboard/pages/dlp.js +0 -293
  429. package/src/dashboard/pages/domain-status.js +0 -951
  430. package/src/dashboard/pages/guardrails.js +0 -1035
  431. package/src/dashboard/pages/journal.js +0 -172
  432. package/src/dashboard/pages/knowledge-contributions.js +0 -1682
  433. package/src/dashboard/pages/knowledge-import.js +0 -455
  434. package/src/dashboard/pages/knowledge.js +0 -582
  435. package/src/dashboard/pages/login.js +0 -1056
  436. package/src/dashboard/pages/memory-transfer.js +0 -631
  437. package/src/dashboard/pages/messages.js +0 -303
  438. package/src/dashboard/pages/org-chart.js +0 -349
  439. package/src/dashboard/pages/organizations.js +0 -1081
  440. package/src/dashboard/pages/roles.js +0 -780
  441. package/src/dashboard/pages/settings.js +0 -3790
  442. package/src/dashboard/pages/skill-connections.js +0 -982
  443. package/src/dashboard/pages/skills.js +0 -879
  444. package/src/dashboard/pages/task-pipeline.js +0 -684
  445. package/src/dashboard/pages/users.js +0 -867
  446. package/src/dashboard/pages/vault.js +0 -791
  447. package/src/dashboard/pages/workforce.js +0 -851
  448. package/src/dashboard/vendor/react-dom.development.js +0 -29924
  449. package/src/dashboard/vendor/react-dom.production.min.js +0 -267
  450. package/src/dashboard/vendor/react.development.js +0 -3343
  451. package/src/dashboard/vendor/react.production.min.js +0 -31
  452. package/src/database-access/agent-tools.ts +0 -193
  453. package/src/database-access/connection-manager.ts +0 -1341
  454. package/src/database-access/index.ts +0 -21
  455. package/src/database-access/query-sanitizer.ts +0 -220
  456. package/src/database-access/routes.ts +0 -226
  457. package/src/database-access/types.ts +0 -226
  458. package/src/db/adapter.ts +0 -510
  459. package/src/db/dynamodb.ts +0 -454
  460. package/src/db/factory.ts +0 -129
  461. package/src/db/mongodb.ts +0 -360
  462. package/src/db/mysql.ts +0 -531
  463. package/src/db/postgres.ts +0 -863
  464. package/src/db/proxy.ts +0 -39
  465. package/src/db/resolve-driver.ts +0 -29
  466. package/src/db/sql-schema.ts +0 -124
  467. package/src/db/sqlite.ts +0 -493
  468. package/src/db/turso.ts +0 -470
  469. package/src/deploy/fly.ts +0 -368
  470. package/src/deploy/managed.ts +0 -235
  471. package/src/domain-lock/cli-recover.ts +0 -591
  472. package/src/domain-lock/cli-verify.ts +0 -190
  473. package/src/domain-lock/index.ts +0 -220
  474. package/src/engine/activity-routes.ts +0 -154
  475. package/src/engine/activity.ts +0 -568
  476. package/src/engine/agent-autonomy.ts +0 -974
  477. package/src/engine/agent-config.ts +0 -646
  478. package/src/engine/agent-heartbeat.ts +0 -720
  479. package/src/engine/agent-hierarchy.ts +0 -1064
  480. package/src/engine/agent-memory.ts +0 -806
  481. package/src/engine/agent-notify.ts +0 -50
  482. package/src/engine/agent-routes.ts +0 -2583
  483. package/src/engine/agent-status.ts +0 -311
  484. package/src/engine/ambient-memory.ts +0 -401
  485. package/src/engine/approvals.ts +0 -615
  486. package/src/engine/assets/thinking-hum.mp3 +0 -0
  487. package/src/engine/catalog-routes.ts +0 -232
  488. package/src/engine/chat-poller.ts +0 -913
  489. package/src/engine/chat-webhook-routes.ts +0 -304
  490. package/src/engine/cli-build-skill.ts +0 -285
  491. package/src/engine/cli-submit-skill.ts +0 -200
  492. package/src/engine/cli-validate.ts +0 -188
  493. package/src/engine/cluster.ts +0 -278
  494. package/src/engine/communication-routes.ts +0 -139
  495. package/src/engine/communication.ts +0 -765
  496. package/src/engine/community-registry.ts +0 -1529
  497. package/src/engine/community-routes.ts +0 -260
  498. package/src/engine/compliance-routes.ts +0 -133
  499. package/src/engine/compliance.ts +0 -1679
  500. package/src/engine/config-bus.ts +0 -103
  501. package/src/engine/db-adapter.ts +0 -1156
  502. package/src/engine/db-schema.ts +0 -1945
  503. package/src/engine/deploy-schema-routes.ts +0 -176
  504. package/src/engine/deployer.ts +0 -957
  505. package/src/engine/dlp-routes.ts +0 -101
  506. package/src/engine/dlp.ts +0 -410
  507. package/src/engine/email-poller.ts +0 -855
  508. package/src/engine/emoji.ts +0 -106
  509. package/src/engine/guardrail-routes.ts +0 -125
  510. package/src/engine/guardrails.ts +0 -465
  511. package/src/engine/index.ts +0 -255
  512. package/src/engine/journal-routes.ts +0 -56
  513. package/src/engine/journal.ts +0 -249
  514. package/src/engine/knowledge-contribution-routes.ts +0 -633
  515. package/src/engine/knowledge-contribution.ts +0 -1386
  516. package/src/engine/knowledge-import/chunker.ts +0 -241
  517. package/src/engine/knowledge-import/import-manager.ts +0 -416
  518. package/src/engine/knowledge-import/index.ts +0 -27
  519. package/src/engine/knowledge-import/processors/clean.ts +0 -149
  520. package/src/engine/knowledge-import/processors/extract-gdrive.ts +0 -102
  521. package/src/engine/knowledge-import/processors/extract-github.ts +0 -74
  522. package/src/engine/knowledge-import/processors/extract-sharepoint.ts +0 -69
  523. package/src/engine/knowledge-import/processors/extract-web.ts +0 -275
  524. package/src/engine/knowledge-import/processors/index.ts +0 -18
  525. package/src/engine/knowledge-import/processors/pipeline.ts +0 -171
  526. package/src/engine/knowledge-import/processors/types.ts +0 -78
  527. package/src/engine/knowledge-import/processors/validate.ts +0 -150
  528. package/src/engine/knowledge-import/provider-file-upload.ts +0 -95
  529. package/src/engine/knowledge-import/provider-github.ts +0 -144
  530. package/src/engine/knowledge-import/provider-google-sites.ts +0 -323
  531. package/src/engine/knowledge-import/provider-sharepoint.ts +0 -276
  532. package/src/engine/knowledge-import/provider-url.ts +0 -218
  533. package/src/engine/knowledge-import/routes.ts +0 -94
  534. package/src/engine/knowledge-import/types.ts +0 -92
  535. package/src/engine/knowledge-routes.ts +0 -231
  536. package/src/engine/knowledge.ts +0 -587
  537. package/src/engine/lifecycle.ts +0 -1420
  538. package/src/engine/mcp-process-manager.ts +0 -573
  539. package/src/engine/meeting-monitor.ts +0 -483
  540. package/src/engine/meeting-voice-intelligence.ts +0 -340
  541. package/src/engine/memory-routes.ts +0 -142
  542. package/src/engine/memory-transfer-routes.ts +0 -339
  543. package/src/engine/messaging-history.ts +0 -177
  544. package/src/engine/messaging-poller.ts +0 -786
  545. package/src/engine/model-fallback.ts +0 -141
  546. package/src/engine/oauth-connect-routes.ts +0 -603
  547. package/src/engine/oauth-connect.ts +0 -304
  548. package/src/engine/onboarding-routes.ts +0 -148
  549. package/src/engine/onboarding.ts +0 -574
  550. package/src/engine/org-approval-routes.ts +0 -146
  551. package/src/engine/org-integration-routes.ts +0 -399
  552. package/src/engine/org-integrations.ts +0 -608
  553. package/src/engine/org-policies.ts +0 -502
  554. package/src/engine/policy-import-routes.ts +0 -125
  555. package/src/engine/policy-import.ts +0 -1186
  556. package/src/engine/policy-routes.ts +0 -163
  557. package/src/engine/routes.ts +0 -1236
  558. package/src/engine/screen-unlock.ts +0 -136
  559. package/src/engine/session-router.ts +0 -212
  560. package/src/engine/skill-updater-routes.ts +0 -132
  561. package/src/engine/skill-updater.ts +0 -480
  562. package/src/engine/skill-validator.ts +0 -331
  563. package/src/engine/skills/agent-management.ts +0 -119
  564. package/src/engine/skills/agent-memory.ts +0 -19
  565. package/src/engine/skills/agenticmail.ts +0 -116
  566. package/src/engine/skills/core-tools.ts +0 -25
  567. package/src/engine/skills/database-access.ts +0 -78
  568. package/src/engine/skills/enterprise-code-sandbox.ts +0 -113
  569. package/src/engine/skills/enterprise-database.ts +0 -123
  570. package/src/engine/skills/enterprise-diff.ts +0 -95
  571. package/src/engine/skills/enterprise-documents.ts +0 -162
  572. package/src/engine/skills/enterprise-http.ts +0 -99
  573. package/src/engine/skills/enterprise-security-scan.ts +0 -125
  574. package/src/engine/skills/enterprise-spreadsheet.ts +0 -171
  575. package/src/engine/skills/gws-admin.ts +0 -18
  576. package/src/engine/skills/gws-calendar.ts +0 -21
  577. package/src/engine/skills/gws-chat.ts +0 -29
  578. package/src/engine/skills/gws-contacts.ts +0 -20
  579. package/src/engine/skills/gws-docs.ts +0 -18
  580. package/src/engine/skills/gws-drive.ts +0 -23
  581. package/src/engine/skills/gws-forms.ts +0 -23
  582. package/src/engine/skills/gws-gmail.ts +0 -30
  583. package/src/engine/skills/gws-groups.ts +0 -17
  584. package/src/engine/skills/gws-keep.ts +0 -17
  585. package/src/engine/skills/gws-maps.ts +0 -25
  586. package/src/engine/skills/gws-meet.ts +0 -23
  587. package/src/engine/skills/gws-sheets.ts +0 -22
  588. package/src/engine/skills/gws-sites.ts +0 -16
  589. package/src/engine/skills/gws-slides.ts +0 -27
  590. package/src/engine/skills/gws-tasks.ts +0 -22
  591. package/src/engine/skills/gws-vault.ts +0 -17
  592. package/src/engine/skills/index.ts +0 -159
  593. package/src/engine/skills/knowledge-search.ts +0 -18
  594. package/src/engine/skills/local-system.ts +0 -61
  595. package/src/engine/skills/m365-admin.ts +0 -18
  596. package/src/engine/skills/m365-bookings.ts +0 -17
  597. package/src/engine/skills/m365-copilot.ts +0 -17
  598. package/src/engine/skills/m365-excel.ts +0 -60
  599. package/src/engine/skills/m365-forms.ts +0 -17
  600. package/src/engine/skills/m365-onedrive.ts +0 -60
  601. package/src/engine/skills/m365-onenote.ts +0 -17
  602. package/src/engine/skills/m365-outlook.ts +0 -27
  603. package/src/engine/skills/m365-planner.ts +0 -18
  604. package/src/engine/skills/m365-power-automate.ts +0 -18
  605. package/src/engine/skills/m365-power-bi.ts +0 -19
  606. package/src/engine/skills/m365-powerpoint.ts +0 -33
  607. package/src/engine/skills/m365-sharepoint.ts +0 -20
  608. package/src/engine/skills/m365-teams.ts +0 -21
  609. package/src/engine/skills/m365-todo.ts +0 -17
  610. package/src/engine/skills/m365-whiteboard.ts +0 -16
  611. package/src/engine/skills/m365-word.ts +0 -42
  612. package/src/engine/skills/mcp-bridge.ts +0 -45
  613. package/src/engine/skills/meeting-lifecycle.ts +0 -20
  614. package/src/engine/skills/messaging.ts +0 -46
  615. package/src/engine/skills/visual-memory.ts +0 -25
  616. package/src/engine/skills.ts +0 -688
  617. package/src/engine/soul-library.ts +0 -142
  618. package/src/engine/soul-templates.json +0 -1525
  619. package/src/engine/storage-manager.ts +0 -252
  620. package/src/engine/storage-routes.ts +0 -113
  621. package/src/engine/storage.ts +0 -528
  622. package/src/engine/task-poller.ts +0 -394
  623. package/src/engine/task-queue-after-spawn.ts +0 -66
  624. package/src/engine/task-queue-before-spawn.ts +0 -113
  625. package/src/engine/task-queue-routes.ts +0 -161
  626. package/src/engine/task-queue.ts +0 -664
  627. package/src/engine/tenant.ts +0 -409
  628. package/src/engine/tool-catalog.ts +0 -354
  629. package/src/engine/vault-routes.ts +0 -134
  630. package/src/engine/vault.ts +0 -601
  631. package/src/engine/workforce-routes.ts +0 -331
  632. package/src/engine/workforce.ts +0 -1161
  633. package/src/index.ts +0 -77
  634. package/src/lib/cidr.ts +0 -122
  635. package/src/lib/config-store.ts +0 -86
  636. package/src/lib/resilience.ts +0 -326
  637. package/src/lib/text-search.ts +0 -358
  638. package/src/mcp/adapters/activecampaign.adapter.ts +0 -391
  639. package/src/mcp/adapters/adobe-sign.adapter.ts +0 -469
  640. package/src/mcp/adapters/adp.adapter.ts +0 -358
  641. package/src/mcp/adapters/airtable.adapter.ts +0 -273
  642. package/src/mcp/adapters/apollo.adapter.ts +0 -420
  643. package/src/mcp/adapters/asana.adapter.ts +0 -315
  644. package/src/mcp/adapters/auth0.adapter.ts +0 -386
  645. package/src/mcp/adapters/aws.adapter.ts +0 -345
  646. package/src/mcp/adapters/azure-devops.adapter.ts +0 -389
  647. package/src/mcp/adapters/bamboohr.adapter.ts +0 -376
  648. package/src/mcp/adapters/basecamp.adapter.ts +0 -366
  649. package/src/mcp/adapters/bigcommerce.adapter.ts +0 -429
  650. package/src/mcp/adapters/bitbucket.adapter.ts +0 -260
  651. package/src/mcp/adapters/box.adapter.ts +0 -350
  652. package/src/mcp/adapters/brex.adapter.ts +0 -367
  653. package/src/mcp/adapters/buffer.adapter.ts +0 -303
  654. package/src/mcp/adapters/calendly.adapter.ts +0 -262
  655. package/src/mcp/adapters/canva.adapter.ts +0 -256
  656. package/src/mcp/adapters/chargebee.adapter.ts +0 -448
  657. package/src/mcp/adapters/circleci.adapter.ts +0 -216
  658. package/src/mcp/adapters/clickup.adapter.ts +0 -335
  659. package/src/mcp/adapters/close.adapter.ts +0 -390
  660. package/src/mcp/adapters/cloudflare.adapter.ts +0 -378
  661. package/src/mcp/adapters/confluence.adapter.ts +0 -301
  662. package/src/mcp/adapters/contentful.adapter.ts +0 -355
  663. package/src/mcp/adapters/copper.adapter.ts +0 -468
  664. package/src/mcp/adapters/crisp.adapter.ts +0 -415
  665. package/src/mcp/adapters/crowdstrike.adapter.ts +0 -413
  666. package/src/mcp/adapters/datadog.adapter.ts +0 -373
  667. package/src/mcp/adapters/digitalocean.adapter.ts +0 -336
  668. package/src/mcp/adapters/discord.adapter.ts +0 -248
  669. package/src/mcp/adapters/docker.adapter.ts +0 -238
  670. package/src/mcp/adapters/docusign.adapter.ts +0 -431
  671. package/src/mcp/adapters/drift.adapter.ts +0 -386
  672. package/src/mcp/adapters/dropbox.adapter.ts +0 -315
  673. package/src/mcp/adapters/figma.adapter.ts +0 -302
  674. package/src/mcp/adapters/firebase.adapter.ts +0 -446
  675. package/src/mcp/adapters/flyio.adapter.ts +0 -302
  676. package/src/mcp/adapters/freshbooks.adapter.ts +0 -474
  677. package/src/mcp/adapters/freshdesk.adapter.ts +0 -441
  678. package/src/mcp/adapters/freshsales.adapter.ts +0 -457
  679. package/src/mcp/adapters/freshservice.adapter.ts +0 -481
  680. package/src/mcp/adapters/front.adapter.ts +0 -357
  681. package/src/mcp/adapters/github-actions.adapter.ts +0 -329
  682. package/src/mcp/adapters/github.adapter.ts +0 -387
  683. package/src/mcp/adapters/gitlab.adapter.ts +0 -368
  684. package/src/mcp/adapters/gong.adapter.ts +0 -386
  685. package/src/mcp/adapters/google-ads.adapter.ts +0 -363
  686. package/src/mcp/adapters/google-analytics.adapter.ts +0 -316
  687. package/src/mcp/adapters/google-cloud.adapter.ts +0 -312
  688. package/src/mcp/adapters/gotomeeting.adapter.ts +0 -255
  689. package/src/mcp/adapters/grafana.adapter.ts +0 -361
  690. package/src/mcp/adapters/greenhouse.adapter.ts +0 -354
  691. package/src/mcp/adapters/gusto.adapter.ts +0 -329
  692. package/src/mcp/adapters/hashicorp-vault.adapter.ts +0 -355
  693. package/src/mcp/adapters/heroku.adapter.ts +0 -291
  694. package/src/mcp/adapters/hibob.adapter.ts +0 -334
  695. package/src/mcp/adapters/hootsuite.adapter.ts +0 -322
  696. package/src/mcp/adapters/hubspot.adapter.ts +0 -400
  697. package/src/mcp/adapters/huggingface.adapter.ts +0 -349
  698. package/src/mcp/adapters/index.ts +0 -524
  699. package/src/mcp/adapters/intercom.adapter.ts +0 -269
  700. package/src/mcp/adapters/jira.adapter.ts +0 -482
  701. package/src/mcp/adapters/klaviyo.adapter.ts +0 -353
  702. package/src/mcp/adapters/kubernetes.adapter.ts +0 -431
  703. package/src/mcp/adapters/lattice.adapter.ts +0 -339
  704. package/src/mcp/adapters/launchdarkly.adapter.ts +0 -368
  705. package/src/mcp/adapters/lever.adapter.ts +0 -347
  706. package/src/mcp/adapters/linear.adapter.ts +0 -300
  707. package/src/mcp/adapters/linkedin.adapter.ts +0 -331
  708. package/src/mcp/adapters/livechat.adapter.ts +0 -259
  709. package/src/mcp/adapters/loom.adapter.ts +0 -230
  710. package/src/mcp/adapters/mailchimp.adapter.ts +0 -394
  711. package/src/mcp/adapters/mailgun.adapter.ts +0 -425
  712. package/src/mcp/adapters/miro.adapter.ts +0 -274
  713. package/src/mcp/adapters/mixpanel.adapter.ts +0 -324
  714. package/src/mcp/adapters/monday.adapter.ts +0 -308
  715. package/src/mcp/adapters/mongodb-atlas.adapter.ts +0 -345
  716. package/src/mcp/adapters/neon.adapter.ts +0 -312
  717. package/src/mcp/adapters/netlify.adapter.ts +0 -324
  718. package/src/mcp/adapters/netsuite.adapter.ts +0 -411
  719. package/src/mcp/adapters/newrelic.adapter.ts +0 -339
  720. package/src/mcp/adapters/notion.adapter.ts +0 -338
  721. package/src/mcp/adapters/okta.adapter.ts +0 -394
  722. package/src/mcp/adapters/openai.adapter.ts +0 -315
  723. package/src/mcp/adapters/opsgenie.adapter.ts +0 -375
  724. package/src/mcp/adapters/outreach.adapter.ts +0 -372
  725. package/src/mcp/adapters/paddle.adapter.ts +0 -467
  726. package/src/mcp/adapters/pagerduty.adapter.ts +0 -412
  727. package/src/mcp/adapters/pandadoc.adapter.ts +0 -389
  728. package/src/mcp/adapters/paypal.adapter.ts +0 -465
  729. package/src/mcp/adapters/personio.adapter.ts +0 -401
  730. package/src/mcp/adapters/pinecone.adapter.ts +0 -340
  731. package/src/mcp/adapters/pipedrive.adapter.ts +0 -324
  732. package/src/mcp/adapters/plaid.adapter.ts +0 -444
  733. package/src/mcp/adapters/postmark.adapter.ts +0 -387
  734. package/src/mcp/adapters/power-automate.adapter.ts +0 -388
  735. package/src/mcp/adapters/quickbooks.adapter.ts +0 -431
  736. package/src/mcp/adapters/recurly.adapter.ts +0 -433
  737. package/src/mcp/adapters/reddit.adapter.ts +0 -371
  738. package/src/mcp/adapters/render.adapter.ts +0 -332
  739. package/src/mcp/adapters/ringcentral.adapter.ts +0 -281
  740. package/src/mcp/adapters/rippling.adapter.ts +0 -287
  741. package/src/mcp/adapters/salesforce.adapter.ts +0 -321
  742. package/src/mcp/adapters/salesloft.adapter.ts +0 -413
  743. package/src/mcp/adapters/sanity.adapter.ts +0 -363
  744. package/src/mcp/adapters/sap.adapter.ts +0 -483
  745. package/src/mcp/adapters/segment.adapter.ts +0 -260
  746. package/src/mcp/adapters/sendgrid.adapter.ts +0 -265
  747. package/src/mcp/adapters/sentry.adapter.ts +0 -331
  748. package/src/mcp/adapters/servicenow.adapter.ts +0 -468
  749. package/src/mcp/adapters/shopify.adapter.ts +0 -451
  750. package/src/mcp/adapters/shortcut.adapter.ts +0 -290
  751. package/src/mcp/adapters/slack.adapter.ts +0 -380
  752. package/src/mcp/adapters/smartsheet.adapter.ts +0 -326
  753. package/src/mcp/adapters/snowflake.adapter.ts +0 -347
  754. package/src/mcp/adapters/snyk.adapter.ts +0 -394
  755. package/src/mcp/adapters/splunk.adapter.ts +0 -403
  756. package/src/mcp/adapters/square.adapter.ts +0 -467
  757. package/src/mcp/adapters/statuspage.adapter.ts +0 -401
  758. package/src/mcp/adapters/stripe.adapter.ts +0 -380
  759. package/src/mcp/adapters/supabase.adapter.ts +0 -334
  760. package/src/mcp/adapters/teamwork.adapter.ts +0 -404
  761. package/src/mcp/adapters/telegram.adapter.ts +0 -299
  762. package/src/mcp/adapters/terraform.adapter.ts +0 -300
  763. package/src/mcp/adapters/todoist.adapter.ts +0 -239
  764. package/src/mcp/adapters/trello.adapter.ts +0 -316
  765. package/src/mcp/adapters/twilio.adapter.ts +0 -233
  766. package/src/mcp/adapters/twitter.adapter.ts +0 -348
  767. package/src/mcp/adapters/vercel.adapter.ts +0 -219
  768. package/src/mcp/adapters/weaviate.adapter.ts +0 -371
  769. package/src/mcp/adapters/webex.adapter.ts +0 -237
  770. package/src/mcp/adapters/webflow.adapter.ts +0 -287
  771. package/src/mcp/adapters/whatsapp.adapter.ts +0 -273
  772. package/src/mcp/adapters/whereby.adapter.ts +0 -240
  773. package/src/mcp/adapters/woocommerce.adapter.ts +0 -454
  774. package/src/mcp/adapters/wordpress.adapter.ts +0 -455
  775. package/src/mcp/adapters/workday.adapter.ts +0 -354
  776. package/src/mcp/adapters/wrike.adapter.ts +0 -349
  777. package/src/mcp/adapters/xero.adapter.ts +0 -472
  778. package/src/mcp/adapters/youtube.adapter.ts +0 -401
  779. package/src/mcp/adapters/zendesk.adapter.ts +0 -399
  780. package/src/mcp/adapters/zoho-crm.adapter.ts +0 -410
  781. package/src/mcp/adapters/zoom.adapter.ts +0 -241
  782. package/src/mcp/adapters/zuora.adapter.ts +0 -476
  783. package/src/mcp/framework/api-executor.ts +0 -192
  784. package/src/mcp/framework/aws-sigv4.ts +0 -216
  785. package/src/mcp/framework/credential-resolver.ts +0 -128
  786. package/src/mcp/framework/oauth-token-manager.ts +0 -22
  787. package/src/mcp/framework/skill-mcp-framework.ts +0 -226
  788. package/src/mcp/framework/types.ts +0 -130
  789. package/src/mcp/index.ts +0 -124
  790. package/src/mcp/integration-catalog.ts +0 -178
  791. package/src/middleware/dns-rebinding.ts +0 -44
  792. package/src/middleware/egress-filter.ts +0 -104
  793. package/src/middleware/firewall.ts +0 -192
  794. package/src/middleware/geo-ip.ts +0 -156
  795. package/src/middleware/index.ts +0 -390
  796. package/src/middleware/network-config.ts +0 -90
  797. package/src/middleware/proxy-config.ts +0 -71
  798. package/src/middleware/request-limits.ts +0 -59
  799. package/src/middleware/transport-encryption.ts +0 -398
  800. package/src/registry/cli.ts +0 -63
  801. package/src/registry/server.ts +0 -504
  802. package/src/runtime/agent-loop.ts +0 -779
  803. package/src/runtime/compaction.ts +0 -638
  804. package/src/runtime/email-channel.ts +0 -120
  805. package/src/runtime/environment.ts +0 -300
  806. package/src/runtime/followup.ts +0 -211
  807. package/src/runtime/gateway.ts +0 -260
  808. package/src/runtime/hooks.ts +0 -564
  809. package/src/runtime/index.ts +0 -1110
  810. package/src/runtime/llm-client.ts +0 -1056
  811. package/src/runtime/model-router.ts +0 -97
  812. package/src/runtime/providers.ts +0 -228
  813. package/src/runtime/session-manager.ts +0 -345
  814. package/src/runtime/subagent.ts +0 -153
  815. package/src/runtime/tool-executor.ts +0 -208
  816. package/src/runtime/types.ts +0 -255
  817. package/src/security/brute-force.ts +0 -423
  818. package/src/security/config.ts +0 -159
  819. package/src/security/csp.ts +0 -407
  820. package/src/security/external-content.ts +0 -299
  821. package/src/security/index.ts +0 -557
  822. package/src/security/input-sanitizer.ts +0 -452
  823. package/src/security/output-filter.ts +0 -575
  824. package/src/security/port-scanner.ts +0 -342
  825. package/src/security/prompt-guard.ts +0 -387
  826. package/src/security/sql-guard.ts +0 -338
  827. package/src/security/threat-logger.ts +0 -484
  828. package/src/server.ts +0 -828
  829. package/src/setup/company.ts +0 -183
  830. package/src/setup/database.ts +0 -153
  831. package/src/setup/deployment.ts +0 -561
  832. package/src/setup/domain.ts +0 -112
  833. package/src/setup/index.ts +0 -171
  834. package/src/setup/provision.ts +0 -532
  835. package/src/setup/registration.ts +0 -302
  836. package/src/system-prompts/catchup.ts +0 -48
  837. package/src/system-prompts/google/calendar.ts +0 -37
  838. package/src/system-prompts/google/chat.ts +0 -92
  839. package/src/system-prompts/google/contacts.ts +0 -25
  840. package/src/system-prompts/google/docs.ts +0 -29
  841. package/src/system-prompts/google/drive.ts +0 -34
  842. package/src/system-prompts/google/forms.ts +0 -25
  843. package/src/system-prompts/google/gmail.ts +0 -50
  844. package/src/system-prompts/google/index.ts +0 -23
  845. package/src/system-prompts/google/maps.ts +0 -20
  846. package/src/system-prompts/google/meet.ts +0 -130
  847. package/src/system-prompts/google/sheets.ts +0 -32
  848. package/src/system-prompts/google/slides.ts +0 -26
  849. package/src/system-prompts/google/tasks.ts +0 -27
  850. package/src/system-prompts/index.ts +0 -88
  851. package/src/system-prompts/microsoft/contacts.ts +0 -34
  852. package/src/system-prompts/microsoft/excel.ts +0 -52
  853. package/src/system-prompts/microsoft/index.ts +0 -31
  854. package/src/system-prompts/microsoft/onedrive.ts +0 -41
  855. package/src/system-prompts/microsoft/onenote.ts +0 -36
  856. package/src/system-prompts/microsoft/outlook-calendar.ts +0 -37
  857. package/src/system-prompts/microsoft/outlook-mail.ts +0 -46
  858. package/src/system-prompts/microsoft/planner.ts +0 -37
  859. package/src/system-prompts/microsoft/powerbi.ts +0 -38
  860. package/src/system-prompts/microsoft/powerpoint.ts +0 -35
  861. package/src/system-prompts/microsoft/sharepoint.ts +0 -44
  862. package/src/system-prompts/microsoft/teams.ts +0 -49
  863. package/src/system-prompts/microsoft/todo.ts +0 -37
  864. package/src/system-prompts/shared-blocks.ts +0 -87
  865. package/src/system-prompts/task.ts +0 -21
  866. package/src/system-prompts/triage.ts +0 -34
  867. package/src/types/hono-env.ts +0 -18
  868. package/src/types/optional-deps.d.ts +0 -10
@@ -1,882 +0,0 @@
1
- import { h, useState, useEffect, useCallback, Fragment, useApp, apiCall, engineCall, formatUptime, buildAgentDataMap, renderAgentBadge, showConfirm, getOrgId } from '../../components/utils.js';
2
- import { I } from '../../components/icons.js';
3
- import { E } from '../../assets/icons/emoji-icons.js';
4
- import { HelpButton } from '../../components/help-button.js';
5
-
6
- // ─── Help tooltip styles ───
7
- var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
8
- var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
9
- var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
10
-
11
- // ─── Voice Voices ───
12
-
13
- var BUILTIN_VOICES = [
14
- { id: 'EXAVITQu4vr4xnSDxMaL', name: 'Sarah', gender: 'Female', accent: 'American', style: 'Soft, warm' },
15
- { id: '21m00Tcm4TlvDq8ikWAM', name: 'Rachel', gender: 'Female', accent: 'American', style: 'Calm, professional' },
16
- { id: 'XB0fDUnXU5powFXDhCwa', name: 'Charlotte', gender: 'Female', accent: 'British', style: 'Sophisticated' },
17
- { id: 'pFZP5JQG7iQjIQuC4Bku', name: 'Lily', gender: 'Female', accent: 'British', style: 'Warm, engaging' },
18
- { id: 'jBpfuIE2acCO8z3wKNLl', name: 'Emily', gender: 'Female', accent: 'American', style: 'Calm, gentle' },
19
- { id: 'pNInz6obpgDQGcFmaJgB', name: 'Adam', gender: 'Male', accent: 'American', style: 'Deep, narrative' },
20
- { id: 'ErXwobaYiN019PkySvjV', name: 'Antoni', gender: 'Male', accent: 'American', style: 'Well-rounded' },
21
- { id: 'VR6AewLTigWG4xSOukaG', name: 'Arnold', gender: 'Male', accent: 'American', style: 'Crisp, commanding' },
22
- { id: 'yoZ06aMxZJJ28mfd3POQ', name: 'Sam', gender: 'Male', accent: 'American', style: 'Raspy, authentic' },
23
- { id: 'TxGEqnHWrfWFTfGW9XjX', name: 'Josh', gender: 'Male', accent: 'American', style: 'Deep, warm' },
24
- { id: 'onwK4e9ZLuTAKqWW03F9', name: 'Daniel', gender: 'Male', accent: 'British', style: 'Authoritative' },
25
- { id: 'N2lVS1w4EtoT3dr4eOWO', name: 'Callum', gender: 'Male', accent: 'British', style: 'Intense' },
26
- ];
27
-
28
- var MODEL_CONTEXTS = [
29
- { key: 'chat', label: 'Chat', desc: 'Google Chat conversations', rec: 'Sonnet 4 — fast replies' },
30
- { key: 'meeting', label: 'Meetings (Voice)', desc: 'Google Meet with voice', rec: 'Sonnet 4 — low latency' },
31
- { key: 'email', label: 'Email', desc: 'Composing & replying to emails', rec: 'Opus — professional quality' },
32
- { key: 'task', label: 'Tasks & Projects', desc: 'Complex work, analysis, research', rec: 'Opus — deep reasoning' },
33
- { key: 'scheduling', label: 'Scheduling', desc: 'Calendar, reminders', rec: 'Haiku — quick and cheap' },
34
- ];
35
-
36
- // ─── Shared Styles ───
37
-
38
- var labelStyle = { display: 'block', fontSize: 12, fontWeight: 600, color: 'var(--text-secondary)', marginBottom: 4 };
39
- var inputStyle = { width: '100%', padding: '8px 10px', borderRadius: 6, border: '1px solid var(--border)', background: 'var(--bg-secondary)', color: 'var(--text-primary)', fontSize: 13 };
40
- var fieldGroupStyle = { marginBottom: 16 };
41
- var rowStyle = { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 };
42
-
43
- // ─── Card Header with optional Edit button ───
44
-
45
- function CardHeader(props) {
46
- return h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 } },
47
- h('h4', { style: { margin: 0, fontSize: 14, fontWeight: 600, display: 'flex', alignItems: 'center' } }, props.title, props.help || null),
48
- props.onEdit && !props.editing
49
- ? h('button', { className: 'btn btn-ghost btn-sm', onClick: props.onEdit }, 'Edit')
50
- : props.editing
51
- ? h('div', { style: { display: 'flex', gap: 6 } },
52
- h('button', { className: 'btn btn-primary btn-sm', disabled: props.saving, onClick: props.onSave }, props.saving ? 'Saving...' : 'Save'),
53
- h('button', { className: 'btn btn-ghost btn-sm', onClick: props.onCancel }, 'Cancel')
54
- )
55
- : null
56
- );
57
- }
58
-
59
- // ─── Provider + Model Picker (reusable) ───
60
-
61
- function ProviderModelPicker(props) {
62
- var provider = props.provider || '';
63
- var modelId = props.modelId || '';
64
- var providers = props.providers || [];
65
- var onChange = props.onChange; // (provider, modelId) => void
66
-
67
- var _models = useState([]);
68
- var models = _models[0]; var setModels = _models[1];
69
- var _loading = useState(false);
70
-
71
- useEffect(function() {
72
- if (!provider) { setModels([]); return; }
73
- _loading[1](true);
74
- apiCall('/providers/' + provider + '/models')
75
- .then(function(d) { setModels(d.models || []); })
76
- .catch(function() { setModels([]); })
77
- .finally(function() { _loading[1](false); });
78
- }, [provider]);
79
-
80
- var configuredProviders = providers.filter(function(p) { return p.configured; });
81
-
82
- return h('div', { style: rowStyle },
83
- h('div', { style: fieldGroupStyle },
84
- h('label', { style: labelStyle }, 'Provider'),
85
- configuredProviders.length === 0
86
- ? h('div', { style: { padding: 10, background: 'var(--warning-soft)', borderRadius: 'var(--radius)', fontSize: 12, color: 'var(--warning)' } },
87
- 'No providers configured. Add API keys in Settings \u2192 Integrations.'
88
- )
89
- : h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: provider, onChange: function(e) { onChange(e.target.value, ''); } },
90
- h('option', { value: '' }, '-- Select provider --'),
91
- configuredProviders.map(function(p) { return h('option', { key: p.id, value: p.id }, p.name); })
92
- )
93
- ),
94
- h('div', { style: fieldGroupStyle },
95
- h('label', { style: labelStyle }, 'Model'),
96
- models.length > 0
97
- ? h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: modelId, onChange: function(e) { onChange(provider, e.target.value); } },
98
- h('option', { value: '' }, '-- Select model --'),
99
- models.map(function(m) { return h('option', { key: m.id, value: m.id }, m.name || m.id); })
100
- )
101
- : provider
102
- ? h('input', { style: inputStyle, value: modelId, onChange: function(e) { onChange(provider, e.target.value); }, placeholder: _loading[0] ? 'Loading models...' : 'Enter model ID' })
103
- : h('select', { style: Object.assign({}, inputStyle, { cursor: 'not-allowed', opacity: 0.5 }), disabled: true },
104
- h('option', null, 'Select a provider first')
105
- )
106
- )
107
- );
108
- }
109
-
110
- // ─── Voice Selector ───
111
-
112
- function VoiceSelector(props) {
113
- var voiceId = props.voiceId;
114
- var voiceName = props.voiceName;
115
- var onChange = props.onChange;
116
- var _customVoices = useState([]);
117
- var customVoices = _customVoices[0]; var setCustomVoices = _customVoices[1];
118
- var _loadingVoices = useState(false);
119
- var _hasApiKey = useState(false);
120
- var hasApiKey = _hasApiKey[0]; var setHasApiKey = _hasApiKey[1];
121
-
122
- useEffect(function() {
123
- engineCall('/oauth/status/elevenlabs?orgId=' + getOrgId())
124
- .then(function(d) {
125
- if (d.connected) {
126
- setHasApiKey(true);
127
- _loadingVoices[1](true);
128
- engineCall('/integrations/elevenlabs/voices?orgId=' + getOrgId())
129
- .then(function(d) { setCustomVoices(d.voices || []); })
130
- .catch(function() {})
131
- .finally(function() { _loadingVoices[1](false); });
132
- }
133
- })
134
- .catch(function() {});
135
- }, []);
136
-
137
- var allVoices = BUILTIN_VOICES.concat(customVoices.map(function(v) {
138
- return { id: v.voice_id, name: v.name, gender: v.labels?.gender || '', accent: v.labels?.accent || '', style: 'Custom', custom: true };
139
- }));
140
- var selectedVoice = allVoices.find(function(v) { return v.id === voiceId; });
141
-
142
- return h(Fragment, null,
143
- !hasApiKey && h('div', { style: { padding: 12, background: 'var(--warning-soft)', borderRadius: 'var(--radius)', fontSize: 13, color: 'var(--warning)', marginBottom: 16 } },
144
- 'Add your ElevenLabs API key in Settings \u2192 Integrations to enable voice.'
145
- ),
146
- voiceId && h('div', { style: { display: 'flex', alignItems: 'center', gap: 12, padding: 12, background: 'var(--bg-secondary)', borderRadius: 'var(--radius)', marginBottom: 16 } },
147
- h('div', { style: { width: 36, height: 36, borderRadius: '50%', background: 'linear-gradient(135deg, #6366f1, #8b5cf6)', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff', fontSize: 14, fontWeight: 700 } }, (selectedVoice?.name || voiceName || '?').charAt(0)),
148
- h('div', { style: { flex: 1 } },
149
- h('div', { style: { fontSize: 14, fontWeight: 600 } }, selectedVoice?.name || voiceName || 'Custom Voice'),
150
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, voiceId)
151
- ),
152
- h('button', { className: 'btn btn-ghost btn-sm', onClick: function() { onChange('', ''); } }, 'Clear')
153
- ),
154
- h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))', gap: 8 } },
155
- allVoices.map(function(v) {
156
- var isSelected = v.id === voiceId;
157
- return h('div', {
158
- key: v.id,
159
- style: { padding: '12px 14px', borderRadius: 8, cursor: 'pointer', transition: 'all 0.15s', border: '2px solid ' + (isSelected ? 'var(--brand-color, #6366f1)' : 'var(--border)'), background: isSelected ? 'var(--brand-color-soft, rgba(99,102,241,0.08))' : 'transparent' },
160
- onClick: function() { onChange(v.id, v.name); }
161
- },
162
- h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 4 } },
163
- h('strong', { style: { fontSize: 13 } }, v.name),
164
- v.custom && h('span', { className: 'badge badge-info', style: { fontSize: 10 } }, 'Custom')
165
- ),
166
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, [v.gender, v.accent, v.style].filter(Boolean).join(' \u00B7 '))
167
- );
168
- })
169
- ),
170
- _loadingVoices[0] && h('div', { style: { textAlign: 'center', padding: 12, color: 'var(--text-muted)', fontSize: 13 } }, 'Loading custom voices...'),
171
- h('div', { style: { marginTop: 16 } },
172
- h('label', { style: { display: 'block', fontSize: 12, fontWeight: 600, color: 'var(--text-secondary)', marginBottom: 4 } }, 'Or enter a voice ID manually'),
173
- h('input', { className: 'input', type: 'text', value: voiceId, placeholder: 'ElevenLabs voice ID...', onChange: function(e) { onChange(e.target.value, ''); } })
174
- )
175
- );
176
- }
177
-
178
- // ─── Single Routing Row Editor (provider → model) ───
179
-
180
- function RoutingRowEditor(props) {
181
- var ctx = props.ctx;
182
- var value = props.value || ''; // "provider/modelId"
183
- var providers = props.providers || [];
184
- var onChange = props.onChange;
185
-
186
- var parts = value ? value.split('/') : ['', ''];
187
- var provider = parts[0] || '';
188
- var modelId = parts.slice(1).join('/') || '';
189
-
190
- return h('div', { style: { padding: '16px 0', borderBottom: '1px solid var(--border)' } },
191
- h('div', { style: { marginBottom: 10 } },
192
- h('div', { style: { fontSize: 13, fontWeight: 600 } }, ctx.label),
193
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginTop: 2 } }, ctx.desc)
194
- ),
195
- h(ProviderModelPicker, {
196
- provider: provider,
197
- modelId: modelId,
198
- providers: providers,
199
- onChange: function(p, m) {
200
- onChange(p && m ? p + '/' + m : '');
201
- }
202
- }),
203
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginTop: 4, fontStyle: 'italic' } }, 'Recommended: ' + ctx.rec),
204
- value && h('button', { className: 'btn btn-ghost btn-sm', style: { marginTop: 6, fontSize: 11 }, onClick: function() { onChange(''); } }, 'Reset to default')
205
- );
206
- }
207
-
208
- // ─── Model Cost Estimates (per 1K tokens, approximate USD) ───
209
-
210
- var MODEL_COSTS = {
211
- 'claude-opus-4-20250514': { input: 0.015, output: 0.075 },
212
- 'claude-sonnet-4-20250514': { input: 0.003, output: 0.015 },
213
- 'claude-haiku-3-20250414': { input: 0.00025, output: 0.00125 },
214
- 'gpt-4o': { input: 0.005, output: 0.015 },
215
- 'gpt-4o-mini': { input: 0.00015, output: 0.0006 },
216
- 'gemini-2.0-flash': { input: 0.0001, output: 0.0004 },
217
- 'gemini-2.5-pro': { input: 0.00125, output: 0.01 },
218
- };
219
-
220
- function estimateHeartbeatCost(modelId, intervalMin, tokensPerBeat) {
221
- tokensPerBeat = tokensPerBeat || 3000; // ~3K tokens per heartbeat round-trip
222
- var key = Object.keys(MODEL_COSTS).find(function(k) { return modelId && modelId.indexOf(k) !== -1; });
223
- var cost = key ? MODEL_COSTS[key] : { input: 0.003, output: 0.015 }; // default to sonnet pricing
224
- var beatsPerDay = (24 * 60) / intervalMin;
225
- var dailyCost = beatsPerDay * tokensPerBeat * ((cost.input + cost.output) / 2) / 1000;
226
- return { beatsPerDay: Math.round(beatsPerDay), dailyCost: dailyCost, monthlyCost: dailyCost * 30 };
227
- }
228
-
229
- // ─── Model Fallback Card ───
230
-
231
- function ModelFallbackCard(props) {
232
- var config = props.config;
233
- var saving = props.saving;
234
- var providers = props.providers;
235
- var saveUpdates = props.saveUpdates;
236
-
237
- var fb = config.modelFallback || {};
238
- var _editing = useState(false);
239
- var editing = _editing[0]; var setEditing = _editing[1];
240
- var _form = useState({});
241
- var form = _form[0]; var setForm = _form[1];
242
-
243
- function startEdit() {
244
- setForm({
245
- enabled: fb.enabled !== false,
246
- fallbacks: (fb.fallbacks || []).slice(),
247
- maxRetries: fb.maxRetries || 2,
248
- retryDelayMs: fb.retryDelayMs || 1000,
249
- });
250
- setEditing(true);
251
- }
252
-
253
- function addFallback() {
254
- setForm(function(f) { return Object.assign({}, f, { fallbacks: f.fallbacks.concat(['']) }); });
255
- }
256
-
257
- function removeFallback(idx) {
258
- setForm(function(f) {
259
- var next = f.fallbacks.slice();
260
- next.splice(idx, 1);
261
- return Object.assign({}, f, { fallbacks: next });
262
- });
263
- }
264
-
265
- function updateFallback(idx, val) {
266
- setForm(function(f) {
267
- var next = f.fallbacks.slice();
268
- next[idx] = val;
269
- return Object.assign({}, f, { fallbacks: next });
270
- });
271
- }
272
-
273
- function save() {
274
- saveUpdates({
275
- modelFallback: {
276
- enabled: form.enabled,
277
- fallbacks: form.fallbacks.filter(Boolean),
278
- maxRetries: parseInt(form.maxRetries) || 2,
279
- retryDelayMs: parseInt(form.retryDelayMs) || 1000,
280
- }
281
- }, function() { setEditing(false); });
282
- }
283
-
284
- var configuredProviders = providers.filter(function(p) { return p.configured; });
285
-
286
- // Build flat list of all models from all configured providers for the dropdown
287
- var _allModels = useState([]);
288
- var allModels = _allModels[0]; var setAllModels = _allModels[1];
289
- useEffect(function() {
290
- if (!configuredProviders.length) return;
291
- Promise.all(configuredProviders.map(function(p) {
292
- return apiCall('/providers/' + p.id + '/models').then(function(d) {
293
- return (d.models || []).map(function(m) { return { id: p.id + '/' + (m.id || m.name), label: p.name + ' / ' + (m.name || m.id) }; });
294
- }).catch(function() { return []; });
295
- })).then(function(results) {
296
- setAllModels([].concat.apply([], results));
297
- });
298
- }, [providers]);
299
-
300
- return h('div', { className: 'card', style: { padding: 20, marginBottom: 20 } },
301
- h(CardHeader, {
302
- title: 'Backup Model Providers',
303
- help: h(HelpButton, { label: 'Backup Model Providers' },
304
- h('p', null, 'Configure fallback models that activate automatically when the primary model fails (rate limits, outages, auth errors).'),
305
- h('h4', { style: _h4 }, 'How It Works'),
306
- h('ul', { style: _ul },
307
- h('li', null, 'When the primary model returns an error, the system tries the next model in the chain.'),
308
- h('li', null, h('strong', null, 'Rate limit / overload errors'), ' — retries the same model first (up to Max Retries), then moves to the next fallback.'),
309
- h('li', null, h('strong', null, 'Auth / invalid model errors'), ' — skips immediately to the next fallback (no retry).'),
310
- h('li', null, 'The chain is tried in order from top to bottom.')
311
- ),
312
- h('h4', { style: _h4 }, 'Settings'),
313
- h('ul', { style: _ul },
314
- h('li', null, h('strong', null, 'Max Retries'), ' — How many times to retry a single model before moving to the next one.'),
315
- h('li', null, h('strong', null, 'Retry Delay'), ' — Wait time (ms) between retries. Increases with each attempt (exponential backoff).')
316
- ),
317
- h('div', { style: _tip }, h('strong', null, 'Tip: '), 'A good chain mixes providers — e.g., Anthropic primary → OpenAI fallback → Google fallback. This protects against single-provider outages.')
318
- ),
319
- editing: editing,
320
- saving: saving,
321
- onEdit: startEdit,
322
- onSave: save,
323
- onCancel: function() { setEditing(false); }
324
- }),
325
-
326
- editing
327
- ? h(Fragment, null,
328
- // Enable toggle
329
- h('div', { style: { display: 'flex', alignItems: 'center', gap: 10, marginBottom: 16 } },
330
- h('label', { style: { display: 'flex', alignItems: 'center', gap: 8, cursor: 'pointer', fontSize: 13 } },
331
- h('input', { type: 'checkbox', checked: form.enabled, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { enabled: e.target.checked }); }); } }),
332
- 'Enable model fallback'
333
- )
334
- ),
335
-
336
- form.enabled && h(Fragment, null,
337
- // Fallback chain
338
- h('label', { style: labelStyle }, 'Fallback Chain (in priority order)'),
339
- h('div', { style: { display: 'grid', gap: 8, marginBottom: 16 } },
340
- form.fallbacks.map(function(fb, idx) {
341
- return h('div', { key: idx, style: { display: 'flex', gap: 8, alignItems: 'center' } },
342
- h('span', { style: { fontSize: 11, color: 'var(--text-muted)', width: 20, textAlign: 'center', flexShrink: 0 } }, '#' + (idx + 1)),
343
- allModels.length > 0
344
- ? h('select', { style: Object.assign({}, inputStyle, { flex: 1, cursor: 'pointer' }), value: fb, onChange: function(e) { updateFallback(idx, e.target.value); } },
345
- h('option', { value: '' }, '-- Select model --'),
346
- allModels.map(function(m) { return h('option', { key: m.id, value: m.id }, m.label); })
347
- )
348
- : h('input', { style: Object.assign({}, inputStyle, { flex: 1 }), value: fb, placeholder: 'provider/model-id (e.g. openai/gpt-4o)', onChange: function(e) { updateFallback(idx, e.target.value); } }),
349
- h('button', { className: 'btn btn-ghost btn-sm', style: { color: 'var(--danger)', flexShrink: 0 }, onClick: function() { removeFallback(idx); } }, '\u2715')
350
- );
351
- }),
352
- h('button', { className: 'btn btn-ghost btn-sm', onClick: addFallback, style: { justifySelf: 'start' } }, '+ Add Fallback Model')
353
- ),
354
-
355
- // Settings row
356
- h('div', { style: rowStyle },
357
- h('div', { style: fieldGroupStyle },
358
- h('label', { style: labelStyle }, 'Max Retries per Model'),
359
- h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: form.maxRetries, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { maxRetries: e.target.value }); }); } },
360
- h('option', { value: 1 }, '1'),
361
- h('option', { value: 2 }, '2 (recommended)'),
362
- h('option', { value: 3 }, '3'),
363
- h('option', { value: 5 }, '5')
364
- )
365
- ),
366
- h('div', { style: fieldGroupStyle },
367
- h('label', { style: labelStyle }, 'Retry Delay (ms)'),
368
- h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: form.retryDelayMs, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { retryDelayMs: e.target.value }); }); } },
369
- h('option', { value: 500 }, '500ms'),
370
- h('option', { value: 1000 }, '1,000ms (recommended)'),
371
- h('option', { value: 2000 }, '2,000ms'),
372
- h('option', { value: 5000 }, '5,000ms')
373
- )
374
- )
375
- )
376
- )
377
- )
378
- : h(Fragment, null,
379
- fb.enabled === false
380
- ? h('span', { style: { fontSize: 13, color: 'var(--text-muted)' } }, 'Model fallback is disabled.')
381
- : (fb.fallbacks || []).length > 0
382
- ? h(Fragment, null,
383
- h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, marginBottom: 12 } },
384
- h('span', { className: 'badge badge-success', style: { fontSize: 11 } }, 'Enabled'),
385
- h('span', { style: { fontSize: 12, color: 'var(--text-muted)' } }, (fb.fallbacks.length) + ' fallback' + (fb.fallbacks.length > 1 ? 's' : '') + ' \u00B7 ' + (fb.maxRetries || 2) + ' retries \u00B7 ' + (fb.retryDelayMs || 1000) + 'ms delay')
386
- ),
387
- h('div', { style: { display: 'grid', gap: 6 } },
388
- fb.fallbacks.map(function(m, i) {
389
- return h('div', { key: i, style: { display: 'flex', alignItems: 'center', gap: 8, padding: '8px 12px', background: 'var(--bg-secondary)', borderRadius: 'var(--radius)' } },
390
- h('span', { style: { fontSize: 11, color: 'var(--text-muted)', width: 20 } }, '#' + (i + 1)),
391
- h('span', { className: 'badge badge-info', style: { fontSize: 11, fontFamily: 'var(--font-mono)' } }, m.split('/').pop()),
392
- h('span', { style: { fontSize: 11, color: 'var(--text-muted)' } }, m.split('/')[0])
393
- );
394
- })
395
- )
396
- )
397
- : h('span', { style: { fontSize: 13, color: 'var(--text-muted)' } }, 'No fallback models configured \u2014 if the primary model fails, requests will error.')
398
- )
399
- );
400
- }
401
-
402
- // ─── Heartbeat Configuration Card ───
403
-
404
- function HeartbeatCard(props) {
405
- var config = props.config;
406
- var saving = props.saving;
407
- var modelObj = props.modelObj;
408
- var modelStr = props.modelStr;
409
- var saveUpdates = props.saveUpdates;
410
-
411
- var hb = config.heartbeat || {};
412
- var _editing = useState(false);
413
- var editing = _editing[0]; var setEditing = _editing[1];
414
- var _form = useState({});
415
- var form = _form[0]; var setForm = _form[1];
416
-
417
- function startEdit() {
418
- setForm({
419
- enabled: hb.enabled !== false,
420
- intervalMinutes: hb.intervalMinutes || 30,
421
- activeHoursStart: hb.activeHoursStart != null ? hb.activeHoursStart : 8,
422
- activeHoursEnd: hb.activeHoursEnd != null ? hb.activeHoursEnd : 23,
423
- prompt: hb.prompt || '',
424
- tokensPerBeat: hb.tokensPerBeat || 3000,
425
- });
426
- setEditing(true);
427
- }
428
-
429
- function save() {
430
- saveUpdates({
431
- heartbeat: {
432
- enabled: form.enabled,
433
- intervalMinutes: parseInt(form.intervalMinutes) || 30,
434
- activeHoursStart: parseInt(form.activeHoursStart),
435
- activeHoursEnd: parseInt(form.activeHoursEnd),
436
- prompt: form.prompt || '',
437
- tokensPerBeat: parseInt(form.tokensPerBeat) || 3000,
438
- }
439
- }, function() { setEditing(false); });
440
- }
441
-
442
- var modelId = modelStr || modelObj.modelId || '';
443
- var est = estimateHeartbeatCost(modelId, editing ? (parseInt(form.intervalMinutes) || 30) : (hb.intervalMinutes || 30), editing ? (parseInt(form.tokensPerBeat) || 3000) : (hb.tokensPerBeat || 3000));
444
-
445
- var INTERVAL_OPTIONS = [
446
- { value: 5, label: 'Every 5 minutes' },
447
- { value: 10, label: 'Every 10 minutes' },
448
- { value: 15, label: 'Every 15 minutes' },
449
- { value: 30, label: 'Every 30 minutes (recommended)' },
450
- { value: 60, label: 'Every 1 hour' },
451
- { value: 120, label: 'Every 2 hours' },
452
- { value: 360, label: 'Every 6 hours' },
453
- { value: 720, label: 'Every 12 hours' },
454
- { value: 1440, label: 'Once a day' },
455
- ];
456
-
457
- var hours = [];
458
- for (var i = 0; i < 24; i++) { hours.push({ value: i, label: (i === 0 ? '12' : i > 12 ? '' + (i - 12) : '' + i) + ':00 ' + (i < 12 ? 'AM' : 'PM') }); }
459
-
460
- return h('div', { className: 'card', style: { padding: 20, marginBottom: 20 } },
461
- h(CardHeader, {
462
- title: 'Heartbeat',
463
- help: h(HelpButton, { label: 'Heartbeat Configuration' },
464
- h('p', null, 'Heartbeats are periodic check-ins where the agent wakes up, checks for pending work (emails, calendar, notifications), and takes proactive action.'),
465
- h('h4', { style: _h4 }, 'Settings'),
466
- h('ul', { style: _ul },
467
- h('li', null, h('strong', null, 'Interval'), ' — How often the agent checks in. Shorter = more responsive but more expensive.'),
468
- h('li', null, h('strong', null, 'Active Hours'), ' — Only run heartbeats during these hours (agent\'s timezone). Saves cost overnight.'),
469
- h('li', null, h('strong', null, 'Custom Prompt'), ' — Override the default heartbeat prompt. Use this to tell the agent what to check during heartbeats.'),
470
- h('li', null, h('strong', null, 'Tokens per Beat'), ' — Estimated tokens consumed per heartbeat cycle (used for cost projection).')
471
- ),
472
- h('h4', { style: _h4 }, 'Cost Impact'),
473
- h('p', null, 'Each heartbeat is a full LLM call. A 30-minute interval = 48 calls/day. The cost estimate below uses your current default model\'s pricing.'),
474
- h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Use a cheaper model for heartbeats via Model Routing (set the "Scheduling" context). A 30-min interval with Haiku costs ~$0.10/day vs ~$5/day with Opus.')
475
- ),
476
- editing: editing,
477
- saving: saving,
478
- onEdit: startEdit,
479
- onSave: save,
480
- onCancel: function() { setEditing(false); }
481
- }),
482
-
483
- // Cost estimate banner (always visible)
484
- h('div', { style: { display: 'flex', gap: 16, padding: '12px 16px', background: 'var(--bg-secondary)', borderRadius: 'var(--radius)', marginBottom: 16, alignItems: 'center' } },
485
- h('div', { style: { flex: 1 } },
486
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 2 } }, 'Estimated Cost'),
487
- h('div', { style: { fontSize: 16, fontWeight: 700 } }, '$' + est.dailyCost.toFixed(2) + '/day'),
488
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, '\u2248 $' + est.monthlyCost.toFixed(2) + '/month')
489
- ),
490
- h('div', { style: { flex: 1 } },
491
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 2 } }, 'Beats/Day'),
492
- h('div', { style: { fontSize: 16, fontWeight: 700 } }, '' + est.beatsPerDay)
493
- ),
494
- h('div', { style: { flex: 1 } },
495
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginBottom: 2 } }, 'Model'),
496
- h('div', { style: { fontSize: 12, fontFamily: 'var(--font-mono)' } }, modelId ? modelId.split('/').pop() : 'Not set')
497
- )
498
- ),
499
-
500
- editing
501
- ? h(Fragment, null,
502
- // Enable toggle
503
- h('div', { style: { display: 'flex', alignItems: 'center', gap: 10, marginBottom: 16 } },
504
- h('label', { style: { display: 'flex', alignItems: 'center', gap: 8, cursor: 'pointer', fontSize: 13 } },
505
- h('input', { type: 'checkbox', checked: form.enabled, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { enabled: e.target.checked }); }); } }),
506
- 'Enable heartbeat'
507
- )
508
- ),
509
-
510
- form.enabled && h(Fragment, null,
511
- // Interval
512
- h('div', { style: fieldGroupStyle },
513
- h('label', { style: labelStyle }, 'Interval'),
514
- h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: form.intervalMinutes, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { intervalMinutes: e.target.value }); }); } },
515
- INTERVAL_OPTIONS.map(function(o) { return h('option', { key: o.value, value: o.value }, o.label); })
516
- )
517
- ),
518
-
519
- // Active hours
520
- h('div', { style: rowStyle },
521
- h('div', { style: fieldGroupStyle },
522
- h('label', { style: labelStyle }, 'Active From'),
523
- h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: form.activeHoursStart, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { activeHoursStart: e.target.value }); }); } },
524
- hours.map(function(hr) { return h('option', { key: hr.value, value: hr.value }, hr.label); })
525
- )
526
- ),
527
- h('div', { style: fieldGroupStyle },
528
- h('label', { style: labelStyle }, 'Active Until'),
529
- h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: form.activeHoursEnd, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { activeHoursEnd: e.target.value }); }); } },
530
- hours.map(function(hr) { return h('option', { key: hr.value, value: hr.value }, hr.label); })
531
- )
532
- )
533
- ),
534
- h('p', { style: { fontSize: 11, color: 'var(--text-muted)', marginTop: -8, marginBottom: 16 } },
535
- 'Heartbeats only run between these hours. Set to 12:00 AM \u2013 12:00 AM for 24/7.'
536
- ),
537
-
538
- // Tokens per beat
539
- h('div', { style: fieldGroupStyle },
540
- h('label', { style: labelStyle }, 'Estimated Tokens per Beat'),
541
- h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: form.tokensPerBeat, onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { tokensPerBeat: e.target.value }); }); } },
542
- h('option', { value: 1000 }, '~1K (minimal — just HEARTBEAT_OK)'),
543
- h('option', { value: 3000 }, '~3K (typical — light checks)'),
544
- h('option', { value: 5000 }, '~5K (moderate — email/calendar checks)'),
545
- h('option', { value: 10000 }, '~10K (heavy — full inbox scan + actions)')
546
- )
547
- ),
548
-
549
- // Custom prompt
550
- h('div', { style: fieldGroupStyle },
551
- h('label', { style: labelStyle }, 'Custom Heartbeat Prompt (optional)'),
552
- h('textarea', {
553
- style: Object.assign({}, inputStyle, { minHeight: 60, resize: 'vertical', fontFamily: 'var(--font-mono)', fontSize: 12 }),
554
- value: form.prompt,
555
- onChange: function(e) { setForm(function(f) { return Object.assign({}, f, { prompt: e.target.value }); }); },
556
- placeholder: 'Leave empty for default. E.g.: Check emails, calendar events in next 2h, and Slack mentions.'
557
- }),
558
- h('p', { style: { fontSize: 11, color: 'var(--text-muted)', marginTop: 4 } }, 'This prompt is sent to the agent each heartbeat cycle. The agent can reply HEARTBEAT_OK if nothing needs attention.')
559
- )
560
- )
561
- )
562
- : h(Fragment, null,
563
- hb.enabled === false
564
- ? h('div', { style: { display: 'flex', alignItems: 'center', gap: 8 } },
565
- h('span', { className: 'badge badge-neutral', style: { fontSize: 11 } }, 'Disabled'),
566
- h('span', { style: { fontSize: 13, color: 'var(--text-muted)' } }, 'Heartbeat is turned off. Agent won\'t check in proactively.')
567
- )
568
- : h(Fragment, null,
569
- h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 } },
570
- h('span', { className: 'badge badge-success', style: { fontSize: 11 } }, 'Enabled'),
571
- h('span', { style: { fontSize: 12, color: 'var(--text-muted)' } },
572
- 'Every ' + (hb.intervalMinutes || 30) + ' min' +
573
- (hb.activeHoursStart != null ? ' \u00B7 ' + (hb.activeHoursStart === 0 ? '12' : hb.activeHoursStart > 12 ? (hb.activeHoursStart - 12) : hb.activeHoursStart) + ':00' + (hb.activeHoursStart < 12 ? 'AM' : 'PM') + '\u2013' + (hb.activeHoursEnd === 0 ? '12' : hb.activeHoursEnd > 12 ? (hb.activeHoursEnd - 12) : hb.activeHoursEnd) + ':00' + (hb.activeHoursEnd < 12 ? 'AM' : 'PM') : ' \u00B7 24/7')
574
- )
575
- ),
576
- hb.prompt && h('div', { style: { padding: '8px 12px', background: 'var(--bg-secondary)', borderRadius: 'var(--radius)', fontSize: 12, fontFamily: 'var(--font-mono)', color: 'var(--text-secondary)', whiteSpace: 'pre-wrap', maxHeight: 80, overflow: 'auto' } }, hb.prompt)
577
- )
578
- )
579
- );
580
- }
581
-
582
- // ─── Main Component ───
583
-
584
- export function ConfigurationSection(props) {
585
- var agentId = props.agentId;
586
- var engineAgent = props.engineAgent;
587
- var reload = props.reload;
588
- var toast = useApp().toast;
589
-
590
- var ea = engineAgent || {};
591
- var config = ea.config || {};
592
- var identity = config.identity || {};
593
- var modelObj = typeof config.model === 'object' ? config.model : {};
594
- var modelStr = typeof config.model === 'string' ? config.model : null;
595
-
596
- // Provider list (shared across all cards)
597
- var _providers = useState([]);
598
- var providers = _providers[0]; var setProviders = _providers[1];
599
-
600
- useEffect(function() {
601
- apiCall('/providers').then(function(d) { setProviders(d.providers || []); }).catch(function() {});
602
- }, []);
603
-
604
- // ─── Per-card edit state ───
605
- var _editingModel = useState(false);
606
- var editingModel = _editingModel[0]; var setEditingModel = _editingModel[1];
607
- var _editingVoice = useState(false);
608
- var editingVoice = _editingVoice[0]; var setEditingVoice = _editingVoice[1];
609
- var _editingRouting = useState(false);
610
- var editingRouting = _editingRouting[0]; var setEditingRouting = _editingRouting[1];
611
- var _editingDesc = useState(false);
612
- var editingDesc = _editingDesc[0]; var setEditingDesc = _editingDesc[1];
613
-
614
- var _saving = useState(false);
615
- var saving = _saving[0]; var setSaving = _saving[1];
616
-
617
- // ─── Per-card form state ───
618
- var _modelForm = useState({});
619
- var modelForm = _modelForm[0]; var setModelForm = _modelForm[1];
620
- var _voiceForm = useState({});
621
- var voiceForm = _voiceForm[0]; var setVoiceForm = _voiceForm[1];
622
- var _routingForm = useState({});
623
- var routingForm = _routingForm[0]; var setRoutingForm = _routingForm[1];
624
- var _descForm = useState({});
625
- var descForm = _descForm[0]; var setDescForm = _descForm[1];
626
-
627
- // ─── Save helper ───
628
- var saveUpdates = function(updates, onDone) {
629
- setSaving(true);
630
- var isRunning = ea.state === 'running' || ea.state === 'active' || ea.state === 'degraded';
631
- var endpoint = isRunning ? '/agents/' + agentId + '/hot-update' : '/agents/' + agentId + '/config';
632
- var method = isRunning ? 'POST' : 'PATCH';
633
- engineCall(endpoint, { method: method, body: JSON.stringify({ updates: updates, updatedBy: 'dashboard' }) })
634
- .then(function() { toast('Saved', 'success'); setSaving(false); if (onDone) onDone(); reload(); })
635
- .catch(function(err) { toast('Failed: ' + err.message, 'error'); setSaving(false); });
636
- };
637
-
638
- // ─── Render ───
639
-
640
- var configuredProviders = providers.filter(function(p) { return p.configured; });
641
- var displayProvider = modelObj.provider || 'Not set';
642
- var displayModel = modelStr || modelObj.modelId || 'Not set';
643
- var displayThinking = modelObj.thinkingLevel || 'medium';
644
- var displayDescription = identity.description || config.description || '';
645
-
646
- return h(Fragment, null,
647
- h('h3', { style: { margin: '0 0 20px', fontSize: 16, fontWeight: 600 } }, 'Configuration'),
648
-
649
- // ═══ Card 1: Default LLM Model ═══
650
- h('div', { className: 'card', style: { padding: 20, marginBottom: 20 } },
651
- h(CardHeader, {
652
- title: 'Default LLM Model',
653
- help: h(HelpButton, { label: 'Default LLM Model' },
654
- h('p', null, 'The primary AI model this agent uses for all conversations and tasks.'),
655
- h('h4', { style: _h4 }, 'Settings'),
656
- h('ul', { style: _ul },
657
- h('li', null, h('strong', null, 'Provider'), ' — The AI provider (Anthropic, OpenAI, Google, etc.). Must have an API key configured in Settings > API Keys.'),
658
- h('li', null, h('strong', null, 'Model'), ' — The specific model to use (e.g., claude-sonnet-4-20250514, gpt-4o). Newer models are generally smarter but cost more.'),
659
- h('li', null, h('strong', null, 'Thinking Level'), ' — Extended reasoning capability. Higher levels let the model "think step by step" before responding, improving quality for complex tasks at the cost of more tokens.')
660
- ),
661
- h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Use Model Routing below to assign different models for different task types — e.g., a cheaper model for chat and a smarter one for complex tasks.')
662
- ),
663
- editing: editingModel,
664
- saving: saving,
665
- onEdit: function() {
666
- setModelForm({ provider: modelObj.provider || '', modelId: modelStr || modelObj.modelId || '', thinkingLevel: modelObj.thinkingLevel || 'medium' });
667
- setEditingModel(true);
668
- },
669
- onSave: function() {
670
- saveUpdates({ model: { provider: modelForm.provider, modelId: modelForm.modelId, thinkingLevel: modelForm.thinkingLevel } }, function() { setEditingModel(false); });
671
- },
672
- onCancel: function() { setEditingModel(false); }
673
- }),
674
-
675
- editingModel
676
- ? h(Fragment, null,
677
- h(ProviderModelPicker, {
678
- provider: modelForm.provider,
679
- modelId: modelForm.modelId,
680
- providers: providers,
681
- onChange: function(p, m) { setModelForm(function(f) { return Object.assign({}, f, { provider: p, modelId: m }); }); }
682
- }),
683
- h('div', { style: fieldGroupStyle },
684
- h('label', { style: labelStyle }, 'Thinking Level'),
685
- h('select', { style: Object.assign({}, inputStyle, { cursor: 'pointer' }), value: modelForm.thinkingLevel, onChange: function(e) { setModelForm(function(f) { return Object.assign({}, f, { thinkingLevel: e.target.value }); }); } },
686
- h('option', { value: 'off' }, 'Off'),
687
- h('option', { value: 'low' }, 'Low (2K tokens)'),
688
- h('option', { value: 'medium' }, 'Medium (8K tokens)'),
689
- h('option', { value: 'high' }, 'High (16K tokens)')
690
- ),
691
- h('p', { style: { fontSize: 11, color: 'var(--text-muted)', marginTop: 4 } }, 'Extended thinking for step-by-step reasoning. Higher = better but slower.')
692
- )
693
- )
694
- : h(Fragment, null,
695
- h('div', { style: rowStyle },
696
- h('div', { style: fieldGroupStyle },
697
- h('div', { style: labelStyle }, 'Provider'),
698
- h('div', { style: { fontSize: 14, textTransform: 'capitalize' } }, displayProvider)
699
- ),
700
- h('div', { style: fieldGroupStyle },
701
- h('div', { style: labelStyle }, 'Model'),
702
- h('div', { style: { fontSize: 13, fontFamily: 'var(--font-mono)' } }, displayModel)
703
- )
704
- ),
705
- h('div', { style: fieldGroupStyle },
706
- h('div', { style: labelStyle }, 'Thinking Level'),
707
- h('span', { className: 'badge badge-' + (displayThinking === 'high' ? 'primary' : displayThinking === 'medium' ? 'info' : 'neutral'), style: { textTransform: 'capitalize' } }, displayThinking)
708
- )
709
- )
710
- ),
711
-
712
- // ═══ Card 2: Model Routing ═══
713
- h('div', { className: 'card', style: { padding: 20, marginBottom: 20 } },
714
- h(CardHeader, {
715
- title: 'Model Routing',
716
- help: h(HelpButton, { label: 'Model Routing' },
717
- h('p', null, 'Assign different AI models to different types of tasks. This lets you optimize for cost and quality.'),
718
- h('h4', { style: _h4 }, 'Task Types'),
719
- h('ul', { style: _ul },
720
- h('li', null, h('strong', null, 'Chat'), ' — Real-time conversations (Slack, Teams, WhatsApp). Usually benefits from a fast model.'),
721
- h('li', null, h('strong', null, 'Meeting'), ' — Meeting summaries and follow-ups. Often needs a larger context window.'),
722
- h('li', null, h('strong', null, 'Email'), ' — Composing and replying to emails. Benefits from a capable writing model.'),
723
- h('li', null, h('strong', null, 'Task'), ' — Delegated tasks from managers or other agents.'),
724
- h('li', null, h('strong', null, 'Scheduling'), ' — Calendar management and scheduling tasks.')
725
- ),
726
- h('p', null, 'Leave a route empty to use the Default LLM Model for that task type.'),
727
- h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Use cheaper models (e.g., claude-haiku, gpt-4o-mini) for simple chat and expensive ones (claude-opus, gpt-4o) for complex tasks to save costs.')
728
- ),
729
- editing: editingRouting,
730
- saving: saving,
731
- onEdit: function() {
732
- var r = config.modelRouting || {};
733
- var vc = config.voiceConfig || {};
734
- setRoutingForm({
735
- chat: r.chat || vc.chatModel || '',
736
- meeting: r.meeting || vc.meetingModel || '',
737
- email: r.email || '',
738
- task: r.task || '',
739
- scheduling: r.scheduling || '',
740
- });
741
- setEditingRouting(true);
742
- },
743
- onSave: function() {
744
- saveUpdates({
745
- modelRouting: routingForm,
746
- voiceConfig: Object.assign({}, config.voiceConfig || {}, { chatModel: routingForm.chat || '', meetingModel: routingForm.meeting || '' }),
747
- }, function() { setEditingRouting(false); });
748
- },
749
- onCancel: function() { setEditingRouting(false); }
750
- }),
751
-
752
- editingRouting
753
- ? h(Fragment, null,
754
- h('p', { style: { fontSize: 13, color: 'var(--text-muted)', marginBottom: 8, lineHeight: 1.5 } },
755
- 'Assign different models to different tasks. Select provider first, then model. Unset contexts use the default model.'
756
- ),
757
- configuredProviders.length === 0
758
- ? h('div', { style: { padding: 14, background: 'var(--warning-soft)', borderRadius: 'var(--radius)', fontSize: 13, color: 'var(--warning)', marginBottom: 16 } },
759
- 'No AI providers configured. Go to ', h('strong', null, 'Settings \u2192 Integrations'), ' to add API keys first.'
760
- )
761
- : null,
762
- MODEL_CONTEXTS.map(function(ctx) {
763
- return h(RoutingRowEditor, {
764
- key: ctx.key,
765
- ctx: ctx,
766
- value: routingForm[ctx.key] || '',
767
- providers: providers,
768
- onChange: function(v) { setRoutingForm(function(f) { var n = Object.assign({}, f); n[ctx.key] = v; return n; }); }
769
- });
770
- })
771
- )
772
- : h(Fragment, null,
773
- (function() {
774
- var routing = config.modelRouting || {};
775
- var vc = config.voiceConfig || {};
776
- var entries = MODEL_CONTEXTS.map(function(ctx) {
777
- var val = routing[ctx.key] || (ctx.key === 'chat' ? vc.chatModel : ctx.key === 'meeting' ? vc.meetingModel : '') || '';
778
- return { label: ctx.label, value: val, desc: ctx.desc };
779
- });
780
- var hasAny = entries.some(function(e) { return e.value; });
781
- if (!hasAny) return h('span', { style: { fontSize: 13, color: 'var(--text-muted)' } }, 'No model routing configured \u2014 all tasks use the default model.');
782
- return h('div', { style: { display: 'grid', gap: 8 } },
783
- entries.map(function(e) {
784
- return h('div', { key: e.label, style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '10px 12px', background: 'var(--bg-secondary)', borderRadius: 'var(--radius)' } },
785
- h('div', null,
786
- h('span', { style: { fontSize: 13, fontWeight: 600 } }, e.label),
787
- h('span', { style: { fontSize: 11, color: 'var(--text-muted)', marginLeft: 8 } }, e.desc)
788
- ),
789
- e.value
790
- ? h('span', { className: 'badge badge-info', style: { fontSize: 11, fontFamily: 'var(--font-mono)' } }, e.value.split('/').pop())
791
- : h('span', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Default')
792
- );
793
- })
794
- );
795
- })()
796
- )
797
- ),
798
-
799
- // ═══ Card 3: Model Fallback / Backup Providers ═══
800
- h(ModelFallbackCard, { config: config, saving: saving, providers: providers, saveUpdates: saveUpdates }),
801
-
802
- // ═══ Card 4: Heartbeat Configuration ═══
803
- h(HeartbeatCard, { config: config, saving: saving, modelObj: modelObj, modelStr: modelStr, saveUpdates: saveUpdates }),
804
-
805
- // ═══ Card 5: Meeting Voice ═══
806
- h('div', { className: 'card', style: { padding: 20, marginBottom: 20 } },
807
- h(CardHeader, {
808
- title: 'Meeting Voice (ElevenLabs)',
809
- help: h(HelpButton, { label: 'Meeting Voice' },
810
- h('p', null, 'Configure a text-to-speech voice for this agent to use in meetings and voice interactions via ElevenLabs.'),
811
- h('ul', { style: _ul },
812
- h('li', null, 'The voice ID comes from your ElevenLabs dashboard (elevenlabs.io > Voices > Copy Voice ID).'),
813
- h('li', null, 'Name is just a label for your reference.')
814
- ),
815
- h('div', { style: _tip }, h('strong', null, 'Tip: '), 'ElevenLabs offers free tier voices. Clone a custom voice for your agent\'s unique identity.')
816
- ),
817
- editing: editingVoice,
818
- saving: saving,
819
- onEdit: function() {
820
- setVoiceForm({ voiceId: config.voiceConfig?.voiceId || '', voiceName: config.voiceConfig?.voiceName || '' });
821
- setEditingVoice(true);
822
- },
823
- onSave: function() {
824
- saveUpdates({
825
- voiceConfig: Object.assign({}, config.voiceConfig || {}, { voiceId: voiceForm.voiceId, voiceName: voiceForm.voiceName }),
826
- }, function() { setEditingVoice(false); });
827
- },
828
- onCancel: function() { setEditingVoice(false); }
829
- }),
830
-
831
- editingVoice
832
- ? h(VoiceSelector, {
833
- voiceId: voiceForm.voiceId || '',
834
- voiceName: voiceForm.voiceName || '',
835
- onChange: function(id, name) { setVoiceForm({ voiceId: id, voiceName: name }); }
836
- })
837
- : config.voiceConfig?.voiceName || config.voiceConfig?.voiceId
838
- ? h('div', { style: { display: 'flex', alignItems: 'center', gap: 12 } },
839
- h('div', { style: { width: 40, height: 40, borderRadius: '50%', background: 'linear-gradient(135deg, #6366f1, #8b5cf6)', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff', fontSize: 18 } }, E.microphone ? E.microphone(20) : '\u{1F3A4}'),
840
- h('div', null,
841
- h('div', { style: { fontSize: 14, fontWeight: 600 } }, config.voiceConfig.voiceName || 'Custom Voice'),
842
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)', fontFamily: 'var(--font-mono)' } }, config.voiceConfig.voiceId || '')
843
- )
844
- )
845
- : h('span', { style: { fontSize: 13, color: 'var(--text-muted)' } }, 'No voice configured \u2014 agent uses text only in meetings')
846
- ),
847
-
848
- // ═══ Card 6: Description ═══
849
- h('div', { className: 'card', style: { padding: 20, marginBottom: 20 } },
850
- h(CardHeader, {
851
- title: 'Description',
852
- help: h(HelpButton, { label: 'Agent Description' },
853
- h('p', null, 'A human-readable description of what this agent does. This is shown to other agents and team members, and is included in the agent\'s system prompt to help it understand its role.'),
854
- h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Be specific about the agent\'s responsibilities. "Handles customer support for billing questions" is better than "support agent".')
855
- ),
856
- editing: editingDesc,
857
- saving: saving,
858
- onEdit: function() {
859
- setDescForm({ description: displayDescription });
860
- setEditingDesc(true);
861
- },
862
- onSave: function() {
863
- saveUpdates({
864
- description: descForm.description,
865
- identity: Object.assign({}, identity, { description: descForm.description }),
866
- }, function() { setEditingDesc(false); });
867
- },
868
- onCancel: function() { setEditingDesc(false); }
869
- }),
870
-
871
- editingDesc
872
- ? h('textarea', { style: Object.assign({}, inputStyle, { minHeight: 80, resize: 'vertical' }), value: descForm.description || '', onChange: function(e) { setDescForm({ description: e.target.value }); }, placeholder: 'What does this agent do?' })
873
- : h('div', { style: { fontSize: 14, color: displayDescription ? 'var(--text-primary)' : 'var(--text-muted)', lineHeight: 1.6 } }, displayDescription || 'No description set.')
874
- ),
875
-
876
- // ═══ Card 7: Soul Template (only if set) ═══
877
- config.soulId && h('div', { className: 'card', style: { padding: 20 } },
878
- h('h4', { style: { margin: '0 0 16px', fontSize: 14, fontWeight: 600 } }, 'Role Template'),
879
- h('span', { className: 'badge badge-primary' }, config.soulId.replace(/-/g, ' ').replace(/\b\w/g, function(c) { return c.toUpperCase(); }))
880
- )
881
- );
882
- }