@agenticmail/enterprise 0.5.327 → 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.
- package/dist/dashboard/app.js +1 -1
- package/logs/cloudflared-error.log +6 -0
- package/logs/enterprise-out.log +1 -0
- package/package.json +1 -1
- package/src/admin/page-registry.ts +0 -290
- package/src/admin/routes.ts +0 -2968
- package/src/agent-tools/common.ts +0 -260
- package/src/agent-tools/index.ts +0 -542
- package/src/agent-tools/merge.ts +0 -62
- package/src/agent-tools/middleware.ts +0 -436
- package/src/agent-tools/schema/typebox.ts +0 -25
- package/src/agent-tools/security.ts +0 -352
- package/src/agent-tools/tool-resolver.ts +0 -1018
- package/src/agent-tools/tools/agenticmail.ts +0 -1017
- package/src/agent-tools/tools/bash.ts +0 -179
- package/src/agent-tools/tools/browser-tool.schema.ts +0 -112
- package/src/agent-tools/tools/browser-tool.ts +0 -388
- package/src/agent-tools/tools/browser.ts +0 -764
- package/src/agent-tools/tools/edit.ts +0 -100
- package/src/agent-tools/tools/enterprise-code-sandbox.ts +0 -395
- package/src/agent-tools/tools/enterprise-database.ts +0 -377
- package/src/agent-tools/tools/enterprise-diff.ts +0 -580
- package/src/agent-tools/tools/enterprise-documents.ts +0 -896
- package/src/agent-tools/tools/enterprise-http.ts +0 -485
- package/src/agent-tools/tools/enterprise-security-scan.ts +0 -528
- package/src/agent-tools/tools/enterprise-spreadsheet.ts +0 -825
- package/src/agent-tools/tools/glob.ts +0 -129
- package/src/agent-tools/tools/google/calendar.ts +0 -230
- package/src/agent-tools/tools/google/chat.ts +0 -725
- package/src/agent-tools/tools/google/contacts.ts +0 -209
- package/src/agent-tools/tools/google/docs.ts +0 -162
- package/src/agent-tools/tools/google/drive.ts +0 -392
- package/src/agent-tools/tools/google/forms.ts +0 -367
- package/src/agent-tools/tools/google/gmail.ts +0 -897
- package/src/agent-tools/tools/google/index.ts +0 -86
- package/src/agent-tools/tools/google/maps.ts +0 -543
- package/src/agent-tools/tools/google/meeting-voice.ts +0 -885
- package/src/agent-tools/tools/google/meetings.ts +0 -1094
- package/src/agent-tools/tools/google/sheets.ts +0 -215
- package/src/agent-tools/tools/google/slides.ts +0 -559
- package/src/agent-tools/tools/google/tasks.ts +0 -200
- package/src/agent-tools/tools/grep.ts +0 -178
- package/src/agent-tools/tools/integrations/_factory.ts +0 -102
- package/src/agent-tools/tools/integrations/activecampaign.ts +0 -14
- package/src/agent-tools/tools/integrations/adobe-sign.ts +0 -14
- package/src/agent-tools/tools/integrations/adp.ts +0 -14
- package/src/agent-tools/tools/integrations/airtable.ts +0 -14
- package/src/agent-tools/tools/integrations/apollo.ts +0 -14
- package/src/agent-tools/tools/integrations/asana.ts +0 -14
- package/src/agent-tools/tools/integrations/auth0.ts +0 -14
- package/src/agent-tools/tools/integrations/aws.ts +0 -14
- package/src/agent-tools/tools/integrations/azure-devops.ts +0 -14
- package/src/agent-tools/tools/integrations/bamboohr.ts +0 -14
- package/src/agent-tools/tools/integrations/basecamp.ts +0 -14
- package/src/agent-tools/tools/integrations/bigcommerce.ts +0 -14
- package/src/agent-tools/tools/integrations/bitbucket.ts +0 -14
- package/src/agent-tools/tools/integrations/box.ts +0 -14
- package/src/agent-tools/tools/integrations/brex.ts +0 -14
- package/src/agent-tools/tools/integrations/buffer.ts +0 -14
- package/src/agent-tools/tools/integrations/calendly.ts +0 -14
- package/src/agent-tools/tools/integrations/canva.ts +0 -14
- package/src/agent-tools/tools/integrations/chargebee.ts +0 -14
- package/src/agent-tools/tools/integrations/circleci.ts +0 -14
- package/src/agent-tools/tools/integrations/clickup.ts +0 -14
- package/src/agent-tools/tools/integrations/close.ts +0 -14
- package/src/agent-tools/tools/integrations/cloudflare.ts +0 -14
- package/src/agent-tools/tools/integrations/confluence.ts +0 -14
- package/src/agent-tools/tools/integrations/contentful.ts +0 -14
- package/src/agent-tools/tools/integrations/copper.ts +0 -14
- package/src/agent-tools/tools/integrations/crisp.ts +0 -14
- package/src/agent-tools/tools/integrations/crowdstrike.ts +0 -14
- package/src/agent-tools/tools/integrations/datadog.ts +0 -14
- package/src/agent-tools/tools/integrations/digitalocean.ts +0 -14
- package/src/agent-tools/tools/integrations/discord.ts +0 -14
- package/src/agent-tools/tools/integrations/docker.ts +0 -14
- package/src/agent-tools/tools/integrations/docusign.ts +0 -14
- package/src/agent-tools/tools/integrations/drift.ts +0 -14
- package/src/agent-tools/tools/integrations/dropbox.ts +0 -14
- package/src/agent-tools/tools/integrations/figma.ts +0 -14
- package/src/agent-tools/tools/integrations/firebase.ts +0 -14
- package/src/agent-tools/tools/integrations/flyio.ts +0 -14
- package/src/agent-tools/tools/integrations/freshbooks.ts +0 -14
- package/src/agent-tools/tools/integrations/freshdesk.ts +0 -14
- package/src/agent-tools/tools/integrations/freshsales.ts +0 -14
- package/src/agent-tools/tools/integrations/freshservice.ts +0 -14
- package/src/agent-tools/tools/integrations/front.ts +0 -14
- package/src/agent-tools/tools/integrations/github-actions.ts +0 -14
- package/src/agent-tools/tools/integrations/github.ts +0 -14
- package/src/agent-tools/tools/integrations/gitlab.ts +0 -14
- package/src/agent-tools/tools/integrations/gong.ts +0 -14
- package/src/agent-tools/tools/integrations/google-ads.ts +0 -14
- package/src/agent-tools/tools/integrations/google-analytics.ts +0 -14
- package/src/agent-tools/tools/integrations/google-cloud.ts +0 -14
- package/src/agent-tools/tools/integrations/gotomeeting.ts +0 -14
- package/src/agent-tools/tools/integrations/grafana.ts +0 -14
- package/src/agent-tools/tools/integrations/greenhouse.ts +0 -14
- package/src/agent-tools/tools/integrations/gusto.ts +0 -14
- package/src/agent-tools/tools/integrations/hashicorp-vault.ts +0 -14
- package/src/agent-tools/tools/integrations/heroku.ts +0 -14
- package/src/agent-tools/tools/integrations/hibob.ts +0 -14
- package/src/agent-tools/tools/integrations/hootsuite.ts +0 -14
- package/src/agent-tools/tools/integrations/hubspot.ts +0 -14
- package/src/agent-tools/tools/integrations/huggingface.ts +0 -14
- package/src/agent-tools/tools/integrations/index.ts +0 -474
- package/src/agent-tools/tools/integrations/intercom.ts +0 -14
- package/src/agent-tools/tools/integrations/jira.ts +0 -14
- package/src/agent-tools/tools/integrations/klaviyo.ts +0 -14
- package/src/agent-tools/tools/integrations/kubernetes.ts +0 -14
- package/src/agent-tools/tools/integrations/lattice.ts +0 -14
- package/src/agent-tools/tools/integrations/launchdarkly.ts +0 -14
- package/src/agent-tools/tools/integrations/lever.ts +0 -14
- package/src/agent-tools/tools/integrations/linear.ts +0 -14
- package/src/agent-tools/tools/integrations/linkedin.ts +0 -14
- package/src/agent-tools/tools/integrations/livechat.ts +0 -14
- package/src/agent-tools/tools/integrations/loom.ts +0 -14
- package/src/agent-tools/tools/integrations/mailchimp.ts +0 -14
- package/src/agent-tools/tools/integrations/mailgun.ts +0 -14
- package/src/agent-tools/tools/integrations/miro.ts +0 -14
- package/src/agent-tools/tools/integrations/mixpanel.ts +0 -14
- package/src/agent-tools/tools/integrations/monday.ts +0 -14
- package/src/agent-tools/tools/integrations/mongodb-atlas.ts +0 -14
- package/src/agent-tools/tools/integrations/neon.ts +0 -14
- package/src/agent-tools/tools/integrations/netlify.ts +0 -14
- package/src/agent-tools/tools/integrations/netsuite.ts +0 -14
- package/src/agent-tools/tools/integrations/newrelic.ts +0 -14
- package/src/agent-tools/tools/integrations/notion.ts +0 -14
- package/src/agent-tools/tools/integrations/okta.ts +0 -14
- package/src/agent-tools/tools/integrations/openai.ts +0 -14
- package/src/agent-tools/tools/integrations/opsgenie.ts +0 -14
- package/src/agent-tools/tools/integrations/outreach.ts +0 -14
- package/src/agent-tools/tools/integrations/paddle.ts +0 -14
- package/src/agent-tools/tools/integrations/pagerduty.ts +0 -14
- package/src/agent-tools/tools/integrations/pandadoc.ts +0 -14
- package/src/agent-tools/tools/integrations/paypal.ts +0 -14
- package/src/agent-tools/tools/integrations/personio.ts +0 -14
- package/src/agent-tools/tools/integrations/pinecone.ts +0 -14
- package/src/agent-tools/tools/integrations/pipedrive.ts +0 -14
- package/src/agent-tools/tools/integrations/plaid.ts +0 -14
- package/src/agent-tools/tools/integrations/postmark.ts +0 -14
- package/src/agent-tools/tools/integrations/power-automate.ts +0 -14
- package/src/agent-tools/tools/integrations/quickbooks.ts +0 -14
- package/src/agent-tools/tools/integrations/recurly.ts +0 -14
- package/src/agent-tools/tools/integrations/reddit.ts +0 -14
- package/src/agent-tools/tools/integrations/render.ts +0 -14
- package/src/agent-tools/tools/integrations/ringcentral.ts +0 -14
- package/src/agent-tools/tools/integrations/rippling.ts +0 -14
- package/src/agent-tools/tools/integrations/salesforce.ts +0 -14
- package/src/agent-tools/tools/integrations/salesloft.ts +0 -14
- package/src/agent-tools/tools/integrations/sanity.ts +0 -14
- package/src/agent-tools/tools/integrations/sap.ts +0 -14
- package/src/agent-tools/tools/integrations/segment.ts +0 -14
- package/src/agent-tools/tools/integrations/sendgrid.ts +0 -14
- package/src/agent-tools/tools/integrations/sentry.ts +0 -14
- package/src/agent-tools/tools/integrations/servicenow.ts +0 -14
- package/src/agent-tools/tools/integrations/shopify.ts +0 -14
- package/src/agent-tools/tools/integrations/shortcut.ts +0 -14
- package/src/agent-tools/tools/integrations/slack.ts +0 -14
- package/src/agent-tools/tools/integrations/smartsheet.ts +0 -14
- package/src/agent-tools/tools/integrations/snowflake.ts +0 -14
- package/src/agent-tools/tools/integrations/snyk.ts +0 -14
- package/src/agent-tools/tools/integrations/splunk.ts +0 -14
- package/src/agent-tools/tools/integrations/square.ts +0 -14
- package/src/agent-tools/tools/integrations/statuspage.ts +0 -14
- package/src/agent-tools/tools/integrations/stripe.ts +0 -14
- package/src/agent-tools/tools/integrations/supabase.ts +0 -14
- package/src/agent-tools/tools/integrations/teamwork.ts +0 -14
- package/src/agent-tools/tools/integrations/telegram.ts +0 -14
- package/src/agent-tools/tools/integrations/terraform.ts +0 -14
- package/src/agent-tools/tools/integrations/todoist.ts +0 -14
- package/src/agent-tools/tools/integrations/trello.ts +0 -14
- package/src/agent-tools/tools/integrations/twilio.ts +0 -14
- package/src/agent-tools/tools/integrations/twitter.ts +0 -14
- package/src/agent-tools/tools/integrations/vercel.ts +0 -14
- package/src/agent-tools/tools/integrations/weaviate.ts +0 -14
- package/src/agent-tools/tools/integrations/webex.ts +0 -14
- package/src/agent-tools/tools/integrations/webflow.ts +0 -14
- package/src/agent-tools/tools/integrations/whatsapp.ts +0 -14
- package/src/agent-tools/tools/integrations/whereby.ts +0 -14
- package/src/agent-tools/tools/integrations/woocommerce.ts +0 -14
- package/src/agent-tools/tools/integrations/wordpress.ts +0 -14
- package/src/agent-tools/tools/integrations/workday.ts +0 -14
- package/src/agent-tools/tools/integrations/wrike.ts +0 -14
- package/src/agent-tools/tools/integrations/xero.ts +0 -14
- package/src/agent-tools/tools/integrations/youtube.ts +0 -14
- package/src/agent-tools/tools/integrations/zendesk.ts +0 -14
- package/src/agent-tools/tools/integrations/zoho-crm.ts +0 -14
- package/src/agent-tools/tools/integrations/zoom.ts +0 -14
- package/src/agent-tools/tools/integrations/zuora.ts +0 -14
- package/src/agent-tools/tools/knowledge-search.ts +0 -318
- package/src/agent-tools/tools/local/coding.ts +0 -626
- package/src/agent-tools/tools/local/dependency-manager.ts +0 -647
- package/src/agent-tools/tools/local/file-edit.ts +0 -31
- package/src/agent-tools/tools/local/file-list.ts +0 -39
- package/src/agent-tools/tools/local/file-ops.ts +0 -48
- package/src/agent-tools/tools/local/file-read.ts +0 -39
- package/src/agent-tools/tools/local/file-search.ts +0 -46
- package/src/agent-tools/tools/local/file-write.ts +0 -28
- package/src/agent-tools/tools/local/filesystem.ts +0 -5
- package/src/agent-tools/tools/local/index.ts +0 -55
- package/src/agent-tools/tools/local/resolve-path.ts +0 -18
- package/src/agent-tools/tools/local/shell.ts +0 -277
- package/src/agent-tools/tools/local/system-info.ts +0 -29
- package/src/agent-tools/tools/management.ts +0 -425
- package/src/agent-tools/tools/mcp-bridge.ts +0 -142
- package/src/agent-tools/tools/mcp-server-tools.ts +0 -91
- package/src/agent-tools/tools/meeting-lifecycle.ts +0 -438
- package/src/agent-tools/tools/memory.ts +0 -509
- package/src/agent-tools/tools/messaging/index.ts +0 -6
- package/src/agent-tools/tools/messaging/telegram.ts +0 -167
- package/src/agent-tools/tools/messaging/whatsapp.ts +0 -651
- package/src/agent-tools/tools/microsoft/contacts.ts +0 -176
- package/src/agent-tools/tools/microsoft/excel-vba.ts +0 -331
- package/src/agent-tools/tools/microsoft/excel.ts +0 -261
- package/src/agent-tools/tools/microsoft/graph-api.ts +0 -161
- package/src/agent-tools/tools/microsoft/index.ts +0 -95
- package/src/agent-tools/tools/microsoft/onedrive.ts +0 -429
- package/src/agent-tools/tools/microsoft/onenote.ts +0 -186
- package/src/agent-tools/tools/microsoft/outlook-calendar.ts +0 -286
- package/src/agent-tools/tools/microsoft/outlook-mail.ts +0 -723
- package/src/agent-tools/tools/microsoft/planner.ts +0 -200
- package/src/agent-tools/tools/microsoft/powerbi.ts +0 -266
- package/src/agent-tools/tools/microsoft/powerpoint.ts +0 -186
- package/src/agent-tools/tools/microsoft/sharepoint.ts +0 -328
- package/src/agent-tools/tools/microsoft/teams.ts +0 -463
- package/src/agent-tools/tools/microsoft/todo.ts +0 -181
- package/src/agent-tools/tools/oauth-token-provider.ts +0 -101
- package/src/agent-tools/tools/read.ts +0 -160
- package/src/agent-tools/tools/visual-memory/capture.ts +0 -217
- package/src/agent-tools/tools/visual-memory/diff.ts +0 -283
- package/src/agent-tools/tools/visual-memory/index.ts +0 -698
- package/src/agent-tools/tools/visual-memory/phash.ts +0 -120
- package/src/agent-tools/tools/visual-memory/similarity.ts +0 -354
- package/src/agent-tools/tools/visual-memory/storage.ts +0 -534
- package/src/agent-tools/tools/visual-memory/types.ts +0 -100
- package/src/agent-tools/tools/web-fetch-utils.ts +0 -202
- package/src/agent-tools/tools/web-fetch.ts +0 -464
- package/src/agent-tools/tools/web-search.ts +0 -480
- package/src/agent-tools/tools/web-shared.ts +0 -232
- package/src/agent-tools/tools/write.ts +0 -68
- package/src/agent-tools/types.ts +0 -214
- package/src/agenticmail/index.ts +0 -34
- package/src/agenticmail/manager.ts +0 -253
- package/src/agenticmail/providers/google.ts +0 -391
- package/src/agenticmail/providers/imap.ts +0 -454
- package/src/agenticmail/providers/index.ts +0 -28
- package/src/agenticmail/providers/microsoft.ts +0 -260
- package/src/agenticmail/types.ts +0 -173
- package/src/auth/routes.ts +0 -1589
- package/src/browser/bridge-auth-registry.ts +0 -34
- package/src/browser/bridge-server.ts +0 -93
- package/src/browser/cdp.helpers.ts +0 -180
- package/src/browser/cdp.ts +0 -466
- package/src/browser/chrome.executables.ts +0 -625
- package/src/browser/chrome.profile-decoration.ts +0 -198
- package/src/browser/chrome.ts +0 -349
- package/src/browser/client-actions-core.ts +0 -259
- package/src/browser/client-actions-observe.ts +0 -184
- package/src/browser/client-actions-state.ts +0 -284
- package/src/browser/client-actions-types.ts +0 -16
- package/src/browser/client-actions-url.ts +0 -11
- package/src/browser/client-actions.ts +0 -4
- package/src/browser/client-fetch.ts +0 -253
- package/src/browser/client.ts +0 -337
- package/src/browser/config.ts +0 -301
- package/src/browser/constants.ts +0 -8
- package/src/browser/control-auth.ts +0 -94
- package/src/browser/control-service.ts +0 -81
- package/src/browser/csrf.ts +0 -87
- package/src/browser/enterprise-compat.ts +0 -562
- package/src/browser/extension-relay.ts +0 -834
- package/src/browser/http-auth.ts +0 -63
- package/src/browser/navigation-guard.ts +0 -50
- package/src/browser/paths.ts +0 -49
- package/src/browser/playwright.d.ts +0 -12
- package/src/browser/profiles-service.ts +0 -187
- package/src/browser/profiles.ts +0 -114
- package/src/browser/proxy-files.ts +0 -41
- package/src/browser/pw-ai-module.ts +0 -52
- package/src/browser/pw-ai-state.ts +0 -9
- package/src/browser/pw-ai.ts +0 -65
- package/src/browser/pw-role-snapshot.ts +0 -434
- package/src/browser/pw-session.ts +0 -810
- package/src/browser/pw-tools-core.activity.ts +0 -68
- package/src/browser/pw-tools-core.downloads.ts +0 -281
- package/src/browser/pw-tools-core.interactions.ts +0 -646
- package/src/browser/pw-tools-core.responses.ts +0 -124
- package/src/browser/pw-tools-core.shared.ts +0 -70
- package/src/browser/pw-tools-core.snapshot.ts +0 -213
- package/src/browser/pw-tools-core.state.ts +0 -209
- package/src/browser/pw-tools-core.storage.ts +0 -128
- package/src/browser/pw-tools-core.trace.ts +0 -37
- package/src/browser/pw-tools-core.ts +0 -8
- package/src/browser/resolved-config-refresh.ts +0 -59
- package/src/browser/routes/agent.act.shared.ts +0 -52
- package/src/browser/routes/agent.act.ts +0 -575
- package/src/browser/routes/agent.debug.ts +0 -149
- package/src/browser/routes/agent.shared.ts +0 -143
- package/src/browser/routes/agent.snapshot.ts +0 -333
- package/src/browser/routes/agent.storage.ts +0 -451
- package/src/browser/routes/agent.ts +0 -13
- package/src/browser/routes/basic.ts +0 -202
- package/src/browser/routes/dispatcher.ts +0 -126
- package/src/browser/routes/index.ts +0 -11
- package/src/browser/routes/path-output.ts +0 -1
- package/src/browser/routes/tabs.ts +0 -217
- package/src/browser/routes/types.ts +0 -26
- package/src/browser/routes/utils.ts +0 -73
- package/src/browser/screenshot.ts +0 -54
- package/src/browser/server-context.ts +0 -688
- package/src/browser/server-context.types.ts +0 -65
- package/src/browser/server-lifecycle.ts +0 -48
- package/src/browser/server-middleware.ts +0 -37
- package/src/browser/server.ts +0 -110
- package/src/browser/target-id.ts +0 -30
- package/src/browser/trash.ts +0 -21
- package/src/cli-agent.ts +0 -2452
- package/src/cli-reset-password.ts +0 -138
- package/src/cli-serve.ts +0 -314
- package/src/cli.ts +0 -103
- package/src/dashboard/HELP-TOOLTIPS-GUIDE.md +0 -45
- package/src/dashboard/app.js +0 -579
- package/src/dashboard/assets/brand-logos.js +0 -350
- package/src/dashboard/assets/icons/emoji-icons.js +0 -893
- package/src/dashboard/assets/logo.png +0 -0
- package/src/dashboard/assets/provider-logos.js +0 -139
- package/src/dashboard/components/error-boundary.js +0 -21
- package/src/dashboard/components/help-button.js +0 -65
- package/src/dashboard/components/icons.js +0 -64
- package/src/dashboard/components/knowledge-link.js +0 -79
- package/src/dashboard/components/modal.js +0 -125
- package/src/dashboard/components/org-switcher.js +0 -156
- package/src/dashboard/components/persona-fields.js +0 -460
- package/src/dashboard/components/settings-help.js +0 -193
- package/src/dashboard/components/tag-input.js +0 -96
- package/src/dashboard/components/timezones.js +0 -352
- package/src/dashboard/components/transport-encryption.js +0 -288
- package/src/dashboard/components/utils.js +0 -205
- package/src/dashboard/data/countries.js +0 -255
- package/src/dashboard/docs/activity.html +0 -253
- package/src/dashboard/docs/agent-activity.html +0 -199
- package/src/dashboard/docs/agent-autonomy.html +0 -161
- package/src/dashboard/docs/agent-budget.html +0 -190
- package/src/dashboard/docs/agent-channels.html +0 -189
- package/src/dashboard/docs/agent-communication.html +0 -171
- package/src/dashboard/docs/agent-configuration.html +0 -194
- package/src/dashboard/docs/agent-deployment.html +0 -323
- package/src/dashboard/docs/agent-email.html +0 -184
- package/src/dashboard/docs/agent-guardrails.html +0 -206
- package/src/dashboard/docs/agent-manager.html +0 -226
- package/src/dashboard/docs/agent-memory.html +0 -215
- package/src/dashboard/docs/agent-overview.html +0 -226
- package/src/dashboard/docs/agent-permissions.html +0 -305
- package/src/dashboard/docs/agent-personal.html +0 -155
- package/src/dashboard/docs/agent-security.html +0 -188
- package/src/dashboard/docs/agent-skills.html +0 -224
- package/src/dashboard/docs/agent-tool-security.html +0 -205
- package/src/dashboard/docs/agent-tools.html +0 -238
- package/src/dashboard/docs/agent-whatsapp.html +0 -210
- package/src/dashboard/docs/agent-workforce.html +0 -199
- package/src/dashboard/docs/agents.html +0 -258
- package/src/dashboard/docs/approvals.html +0 -200
- package/src/dashboard/docs/audit.html +0 -206
- package/src/dashboard/docs/browser-providers.html +0 -313
- package/src/dashboard/docs/cluster.html +0 -285
- package/src/dashboard/docs/community-skills.html +0 -253
- package/src/dashboard/docs/compliance.html +0 -221
- package/src/dashboard/docs/dashboard.html +0 -84
- package/src/dashboard/docs/database-access.html +0 -322
- package/src/dashboard/docs/dlp.html +0 -268
- package/src/dashboard/docs/docs-style.css +0 -26
- package/src/dashboard/docs/domain-status.html +0 -294
- package/src/dashboard/docs/guardrails.html +0 -265
- package/src/dashboard/docs/journal.html +0 -197
- package/src/dashboard/docs/knowledge-contributions.html +0 -286
- package/src/dashboard/docs/knowledge.html +0 -268
- package/src/dashboard/docs/memory-transfer.html +0 -311
- package/src/dashboard/docs/messages.html +0 -217
- package/src/dashboard/docs/multi-tenant.html +0 -311
- package/src/dashboard/docs/org-chart.html +0 -239
- package/src/dashboard/docs/organizations.html +0 -182
- package/src/dashboard/docs/roles.html +0 -195
- package/src/dashboard/docs/settings-network.html +0 -321
- package/src/dashboard/docs/settings-security.html +0 -347
- package/src/dashboard/docs/settings-tool-security.html +0 -176
- package/src/dashboard/docs/settings.html +0 -280
- package/src/dashboard/docs/skill-connections.html +0 -270
- package/src/dashboard/docs/skills.html +0 -206
- package/src/dashboard/docs/task-pipeline.html +0 -261
- package/src/dashboard/docs/transport-encryption.html +0 -359
- package/src/dashboard/docs/users.html +0 -225
- package/src/dashboard/docs/vault.html +0 -260
- package/src/dashboard/docs/workforce.html +0 -245
- package/src/dashboard/index.html +0 -444
- package/src/dashboard/pages/activity.js +0 -379
- package/src/dashboard/pages/agent-detail/activity.js +0 -277
- package/src/dashboard/pages/agent-detail/autonomy.js +0 -244
- package/src/dashboard/pages/agent-detail/budget.js +0 -269
- package/src/dashboard/pages/agent-detail/channels.js +0 -494
- package/src/dashboard/pages/agent-detail/communication.js +0 -296
- package/src/dashboard/pages/agent-detail/configuration.js +0 -882
- package/src/dashboard/pages/agent-detail/deployment.js +0 -958
- package/src/dashboard/pages/agent-detail/email.js +0 -674
- package/src/dashboard/pages/agent-detail/guardrails.js +0 -521
- package/src/dashboard/pages/agent-detail/index.js +0 -261
- package/src/dashboard/pages/agent-detail/manager.js +0 -357
- package/src/dashboard/pages/agent-detail/meeting-browser.js +0 -933
- package/src/dashboard/pages/agent-detail/memory.js +0 -368
- package/src/dashboard/pages/agent-detail/overview.js +0 -844
- package/src/dashboard/pages/agent-detail/permissions.js +0 -1163
- package/src/dashboard/pages/agent-detail/personal-details.js +0 -404
- package/src/dashboard/pages/agent-detail/security.js +0 -409
- package/src/dashboard/pages/agent-detail/shared.js +0 -85
- package/src/dashboard/pages/agent-detail/skills-section.js +0 -183
- package/src/dashboard/pages/agent-detail/tool-security.js +0 -380
- package/src/dashboard/pages/agent-detail/tools.js +0 -322
- package/src/dashboard/pages/agent-detail/whatsapp.js +0 -824
- package/src/dashboard/pages/agent-detail/workforce.js +0 -683
- package/src/dashboard/pages/agents.js +0 -1242
- package/src/dashboard/pages/approvals.js +0 -100
- package/src/dashboard/pages/audit.js +0 -198
- package/src/dashboard/pages/cluster.js +0 -512
- package/src/dashboard/pages/community-skills.js +0 -1219
- package/src/dashboard/pages/compliance.js +0 -475
- package/src/dashboard/pages/dashboard.js +0 -180
- package/src/dashboard/pages/database-access.js +0 -812
- package/src/dashboard/pages/dlp.js +0 -293
- package/src/dashboard/pages/domain-status.js +0 -951
- package/src/dashboard/pages/guardrails.js +0 -1035
- package/src/dashboard/pages/journal.js +0 -172
- package/src/dashboard/pages/knowledge-contributions.js +0 -1682
- package/src/dashboard/pages/knowledge-import.js +0 -455
- package/src/dashboard/pages/knowledge.js +0 -582
- package/src/dashboard/pages/login.js +0 -1056
- package/src/dashboard/pages/memory-transfer.js +0 -631
- package/src/dashboard/pages/messages.js +0 -303
- package/src/dashboard/pages/org-chart.js +0 -349
- package/src/dashboard/pages/organizations.js +0 -1081
- package/src/dashboard/pages/roles.js +0 -780
- package/src/dashboard/pages/settings.js +0 -3790
- package/src/dashboard/pages/skill-connections.js +0 -982
- package/src/dashboard/pages/skills.js +0 -879
- package/src/dashboard/pages/task-pipeline.js +0 -684
- package/src/dashboard/pages/users.js +0 -867
- package/src/dashboard/pages/vault.js +0 -791
- package/src/dashboard/pages/workforce.js +0 -851
- package/src/dashboard/vendor/react-dom.development.js +0 -29924
- package/src/dashboard/vendor/react-dom.production.min.js +0 -267
- package/src/dashboard/vendor/react.development.js +0 -3343
- package/src/dashboard/vendor/react.production.min.js +0 -31
- package/src/database-access/agent-tools.ts +0 -193
- package/src/database-access/connection-manager.ts +0 -1341
- package/src/database-access/index.ts +0 -21
- package/src/database-access/query-sanitizer.ts +0 -220
- package/src/database-access/routes.ts +0 -226
- package/src/database-access/types.ts +0 -226
- package/src/db/adapter.ts +0 -510
- package/src/db/dynamodb.ts +0 -454
- package/src/db/factory.ts +0 -129
- package/src/db/mongodb.ts +0 -360
- package/src/db/mysql.ts +0 -531
- package/src/db/postgres.ts +0 -863
- package/src/db/proxy.ts +0 -39
- package/src/db/resolve-driver.ts +0 -29
- package/src/db/sql-schema.ts +0 -124
- package/src/db/sqlite.ts +0 -493
- package/src/db/turso.ts +0 -470
- package/src/deploy/fly.ts +0 -368
- package/src/deploy/managed.ts +0 -235
- package/src/domain-lock/cli-recover.ts +0 -591
- package/src/domain-lock/cli-verify.ts +0 -190
- package/src/domain-lock/index.ts +0 -220
- package/src/engine/activity-routes.ts +0 -154
- package/src/engine/activity.ts +0 -568
- package/src/engine/agent-autonomy.ts +0 -974
- package/src/engine/agent-config.ts +0 -646
- package/src/engine/agent-heartbeat.ts +0 -720
- package/src/engine/agent-hierarchy.ts +0 -1064
- package/src/engine/agent-memory.ts +0 -806
- package/src/engine/agent-notify.ts +0 -50
- package/src/engine/agent-routes.ts +0 -2583
- package/src/engine/agent-status.ts +0 -311
- package/src/engine/ambient-memory.ts +0 -401
- package/src/engine/approvals.ts +0 -615
- package/src/engine/assets/thinking-hum.mp3 +0 -0
- package/src/engine/catalog-routes.ts +0 -232
- package/src/engine/chat-poller.ts +0 -913
- package/src/engine/chat-webhook-routes.ts +0 -304
- package/src/engine/cli-build-skill.ts +0 -285
- package/src/engine/cli-submit-skill.ts +0 -200
- package/src/engine/cli-validate.ts +0 -188
- package/src/engine/cluster.ts +0 -278
- package/src/engine/communication-routes.ts +0 -139
- package/src/engine/communication.ts +0 -765
- package/src/engine/community-registry.ts +0 -1529
- package/src/engine/community-routes.ts +0 -260
- package/src/engine/compliance-routes.ts +0 -133
- package/src/engine/compliance.ts +0 -1679
- package/src/engine/config-bus.ts +0 -103
- package/src/engine/db-adapter.ts +0 -1156
- package/src/engine/db-schema.ts +0 -1945
- package/src/engine/deploy-schema-routes.ts +0 -176
- package/src/engine/deployer.ts +0 -957
- package/src/engine/dlp-routes.ts +0 -101
- package/src/engine/dlp.ts +0 -410
- package/src/engine/email-poller.ts +0 -855
- package/src/engine/emoji.ts +0 -106
- package/src/engine/guardrail-routes.ts +0 -125
- package/src/engine/guardrails.ts +0 -465
- package/src/engine/index.ts +0 -255
- package/src/engine/journal-routes.ts +0 -56
- package/src/engine/journal.ts +0 -249
- package/src/engine/knowledge-contribution-routes.ts +0 -633
- package/src/engine/knowledge-contribution.ts +0 -1386
- package/src/engine/knowledge-import/chunker.ts +0 -241
- package/src/engine/knowledge-import/import-manager.ts +0 -416
- package/src/engine/knowledge-import/index.ts +0 -27
- package/src/engine/knowledge-import/processors/clean.ts +0 -149
- package/src/engine/knowledge-import/processors/extract-gdrive.ts +0 -102
- package/src/engine/knowledge-import/processors/extract-github.ts +0 -74
- package/src/engine/knowledge-import/processors/extract-sharepoint.ts +0 -69
- package/src/engine/knowledge-import/processors/extract-web.ts +0 -275
- package/src/engine/knowledge-import/processors/index.ts +0 -18
- package/src/engine/knowledge-import/processors/pipeline.ts +0 -171
- package/src/engine/knowledge-import/processors/types.ts +0 -78
- package/src/engine/knowledge-import/processors/validate.ts +0 -150
- package/src/engine/knowledge-import/provider-file-upload.ts +0 -95
- package/src/engine/knowledge-import/provider-github.ts +0 -144
- package/src/engine/knowledge-import/provider-google-sites.ts +0 -323
- package/src/engine/knowledge-import/provider-sharepoint.ts +0 -276
- package/src/engine/knowledge-import/provider-url.ts +0 -218
- package/src/engine/knowledge-import/routes.ts +0 -94
- package/src/engine/knowledge-import/types.ts +0 -92
- package/src/engine/knowledge-routes.ts +0 -231
- package/src/engine/knowledge.ts +0 -587
- package/src/engine/lifecycle.ts +0 -1420
- package/src/engine/mcp-process-manager.ts +0 -573
- package/src/engine/meeting-monitor.ts +0 -483
- package/src/engine/meeting-voice-intelligence.ts +0 -340
- package/src/engine/memory-routes.ts +0 -142
- package/src/engine/memory-transfer-routes.ts +0 -339
- package/src/engine/messaging-history.ts +0 -177
- package/src/engine/messaging-poller.ts +0 -786
- package/src/engine/model-fallback.ts +0 -141
- package/src/engine/oauth-connect-routes.ts +0 -603
- package/src/engine/oauth-connect.ts +0 -304
- package/src/engine/onboarding-routes.ts +0 -148
- package/src/engine/onboarding.ts +0 -574
- package/src/engine/org-approval-routes.ts +0 -146
- package/src/engine/org-integration-routes.ts +0 -399
- package/src/engine/org-integrations.ts +0 -608
- package/src/engine/org-policies.ts +0 -502
- package/src/engine/policy-import-routes.ts +0 -125
- package/src/engine/policy-import.ts +0 -1186
- package/src/engine/policy-routes.ts +0 -163
- package/src/engine/routes.ts +0 -1236
- package/src/engine/screen-unlock.ts +0 -136
- package/src/engine/session-router.ts +0 -212
- package/src/engine/skill-updater-routes.ts +0 -132
- package/src/engine/skill-updater.ts +0 -480
- package/src/engine/skill-validator.ts +0 -331
- package/src/engine/skills/agent-management.ts +0 -119
- package/src/engine/skills/agent-memory.ts +0 -19
- package/src/engine/skills/agenticmail.ts +0 -116
- package/src/engine/skills/core-tools.ts +0 -25
- package/src/engine/skills/database-access.ts +0 -78
- package/src/engine/skills/enterprise-code-sandbox.ts +0 -113
- package/src/engine/skills/enterprise-database.ts +0 -123
- package/src/engine/skills/enterprise-diff.ts +0 -95
- package/src/engine/skills/enterprise-documents.ts +0 -162
- package/src/engine/skills/enterprise-http.ts +0 -99
- package/src/engine/skills/enterprise-security-scan.ts +0 -125
- package/src/engine/skills/enterprise-spreadsheet.ts +0 -171
- package/src/engine/skills/gws-admin.ts +0 -18
- package/src/engine/skills/gws-calendar.ts +0 -21
- package/src/engine/skills/gws-chat.ts +0 -29
- package/src/engine/skills/gws-contacts.ts +0 -20
- package/src/engine/skills/gws-docs.ts +0 -18
- package/src/engine/skills/gws-drive.ts +0 -23
- package/src/engine/skills/gws-forms.ts +0 -23
- package/src/engine/skills/gws-gmail.ts +0 -30
- package/src/engine/skills/gws-groups.ts +0 -17
- package/src/engine/skills/gws-keep.ts +0 -17
- package/src/engine/skills/gws-maps.ts +0 -25
- package/src/engine/skills/gws-meet.ts +0 -23
- package/src/engine/skills/gws-sheets.ts +0 -22
- package/src/engine/skills/gws-sites.ts +0 -16
- package/src/engine/skills/gws-slides.ts +0 -27
- package/src/engine/skills/gws-tasks.ts +0 -22
- package/src/engine/skills/gws-vault.ts +0 -17
- package/src/engine/skills/index.ts +0 -159
- package/src/engine/skills/knowledge-search.ts +0 -18
- package/src/engine/skills/local-system.ts +0 -61
- package/src/engine/skills/m365-admin.ts +0 -18
- package/src/engine/skills/m365-bookings.ts +0 -17
- package/src/engine/skills/m365-copilot.ts +0 -17
- package/src/engine/skills/m365-excel.ts +0 -60
- package/src/engine/skills/m365-forms.ts +0 -17
- package/src/engine/skills/m365-onedrive.ts +0 -60
- package/src/engine/skills/m365-onenote.ts +0 -17
- package/src/engine/skills/m365-outlook.ts +0 -27
- package/src/engine/skills/m365-planner.ts +0 -18
- package/src/engine/skills/m365-power-automate.ts +0 -18
- package/src/engine/skills/m365-power-bi.ts +0 -19
- package/src/engine/skills/m365-powerpoint.ts +0 -33
- package/src/engine/skills/m365-sharepoint.ts +0 -20
- package/src/engine/skills/m365-teams.ts +0 -21
- package/src/engine/skills/m365-todo.ts +0 -17
- package/src/engine/skills/m365-whiteboard.ts +0 -16
- package/src/engine/skills/m365-word.ts +0 -42
- package/src/engine/skills/mcp-bridge.ts +0 -45
- package/src/engine/skills/meeting-lifecycle.ts +0 -20
- package/src/engine/skills/messaging.ts +0 -46
- package/src/engine/skills/visual-memory.ts +0 -25
- package/src/engine/skills.ts +0 -688
- package/src/engine/soul-library.ts +0 -142
- package/src/engine/soul-templates.json +0 -1525
- package/src/engine/storage-manager.ts +0 -252
- package/src/engine/storage-routes.ts +0 -113
- package/src/engine/storage.ts +0 -528
- package/src/engine/task-poller.ts +0 -394
- package/src/engine/task-queue-after-spawn.ts +0 -66
- package/src/engine/task-queue-before-spawn.ts +0 -113
- package/src/engine/task-queue-routes.ts +0 -161
- package/src/engine/task-queue.ts +0 -664
- package/src/engine/tenant.ts +0 -409
- package/src/engine/tool-catalog.ts +0 -354
- package/src/engine/vault-routes.ts +0 -134
- package/src/engine/vault.ts +0 -601
- package/src/engine/workforce-routes.ts +0 -331
- package/src/engine/workforce.ts +0 -1161
- package/src/index.ts +0 -77
- package/src/lib/cidr.ts +0 -122
- package/src/lib/config-store.ts +0 -86
- package/src/lib/resilience.ts +0 -326
- package/src/lib/text-search.ts +0 -358
- package/src/mcp/adapters/activecampaign.adapter.ts +0 -391
- package/src/mcp/adapters/adobe-sign.adapter.ts +0 -469
- package/src/mcp/adapters/adp.adapter.ts +0 -358
- package/src/mcp/adapters/airtable.adapter.ts +0 -273
- package/src/mcp/adapters/apollo.adapter.ts +0 -420
- package/src/mcp/adapters/asana.adapter.ts +0 -315
- package/src/mcp/adapters/auth0.adapter.ts +0 -386
- package/src/mcp/adapters/aws.adapter.ts +0 -345
- package/src/mcp/adapters/azure-devops.adapter.ts +0 -389
- package/src/mcp/adapters/bamboohr.adapter.ts +0 -376
- package/src/mcp/adapters/basecamp.adapter.ts +0 -366
- package/src/mcp/adapters/bigcommerce.adapter.ts +0 -429
- package/src/mcp/adapters/bitbucket.adapter.ts +0 -260
- package/src/mcp/adapters/box.adapter.ts +0 -350
- package/src/mcp/adapters/brex.adapter.ts +0 -367
- package/src/mcp/adapters/buffer.adapter.ts +0 -303
- package/src/mcp/adapters/calendly.adapter.ts +0 -262
- package/src/mcp/adapters/canva.adapter.ts +0 -256
- package/src/mcp/adapters/chargebee.adapter.ts +0 -448
- package/src/mcp/adapters/circleci.adapter.ts +0 -216
- package/src/mcp/adapters/clickup.adapter.ts +0 -335
- package/src/mcp/adapters/close.adapter.ts +0 -390
- package/src/mcp/adapters/cloudflare.adapter.ts +0 -378
- package/src/mcp/adapters/confluence.adapter.ts +0 -301
- package/src/mcp/adapters/contentful.adapter.ts +0 -355
- package/src/mcp/adapters/copper.adapter.ts +0 -468
- package/src/mcp/adapters/crisp.adapter.ts +0 -415
- package/src/mcp/adapters/crowdstrike.adapter.ts +0 -413
- package/src/mcp/adapters/datadog.adapter.ts +0 -373
- package/src/mcp/adapters/digitalocean.adapter.ts +0 -336
- package/src/mcp/adapters/discord.adapter.ts +0 -248
- package/src/mcp/adapters/docker.adapter.ts +0 -238
- package/src/mcp/adapters/docusign.adapter.ts +0 -431
- package/src/mcp/adapters/drift.adapter.ts +0 -386
- package/src/mcp/adapters/dropbox.adapter.ts +0 -315
- package/src/mcp/adapters/figma.adapter.ts +0 -302
- package/src/mcp/adapters/firebase.adapter.ts +0 -446
- package/src/mcp/adapters/flyio.adapter.ts +0 -302
- package/src/mcp/adapters/freshbooks.adapter.ts +0 -474
- package/src/mcp/adapters/freshdesk.adapter.ts +0 -441
- package/src/mcp/adapters/freshsales.adapter.ts +0 -457
- package/src/mcp/adapters/freshservice.adapter.ts +0 -481
- package/src/mcp/adapters/front.adapter.ts +0 -357
- package/src/mcp/adapters/github-actions.adapter.ts +0 -329
- package/src/mcp/adapters/github.adapter.ts +0 -387
- package/src/mcp/adapters/gitlab.adapter.ts +0 -368
- package/src/mcp/adapters/gong.adapter.ts +0 -386
- package/src/mcp/adapters/google-ads.adapter.ts +0 -363
- package/src/mcp/adapters/google-analytics.adapter.ts +0 -316
- package/src/mcp/adapters/google-cloud.adapter.ts +0 -312
- package/src/mcp/adapters/gotomeeting.adapter.ts +0 -255
- package/src/mcp/adapters/grafana.adapter.ts +0 -361
- package/src/mcp/adapters/greenhouse.adapter.ts +0 -354
- package/src/mcp/adapters/gusto.adapter.ts +0 -329
- package/src/mcp/adapters/hashicorp-vault.adapter.ts +0 -355
- package/src/mcp/adapters/heroku.adapter.ts +0 -291
- package/src/mcp/adapters/hibob.adapter.ts +0 -334
- package/src/mcp/adapters/hootsuite.adapter.ts +0 -322
- package/src/mcp/adapters/hubspot.adapter.ts +0 -400
- package/src/mcp/adapters/huggingface.adapter.ts +0 -349
- package/src/mcp/adapters/index.ts +0 -524
- package/src/mcp/adapters/intercom.adapter.ts +0 -269
- package/src/mcp/adapters/jira.adapter.ts +0 -482
- package/src/mcp/adapters/klaviyo.adapter.ts +0 -353
- package/src/mcp/adapters/kubernetes.adapter.ts +0 -431
- package/src/mcp/adapters/lattice.adapter.ts +0 -339
- package/src/mcp/adapters/launchdarkly.adapter.ts +0 -368
- package/src/mcp/adapters/lever.adapter.ts +0 -347
- package/src/mcp/adapters/linear.adapter.ts +0 -300
- package/src/mcp/adapters/linkedin.adapter.ts +0 -331
- package/src/mcp/adapters/livechat.adapter.ts +0 -259
- package/src/mcp/adapters/loom.adapter.ts +0 -230
- package/src/mcp/adapters/mailchimp.adapter.ts +0 -394
- package/src/mcp/adapters/mailgun.adapter.ts +0 -425
- package/src/mcp/adapters/miro.adapter.ts +0 -274
- package/src/mcp/adapters/mixpanel.adapter.ts +0 -324
- package/src/mcp/adapters/monday.adapter.ts +0 -308
- package/src/mcp/adapters/mongodb-atlas.adapter.ts +0 -345
- package/src/mcp/adapters/neon.adapter.ts +0 -312
- package/src/mcp/adapters/netlify.adapter.ts +0 -324
- package/src/mcp/adapters/netsuite.adapter.ts +0 -411
- package/src/mcp/adapters/newrelic.adapter.ts +0 -339
- package/src/mcp/adapters/notion.adapter.ts +0 -338
- package/src/mcp/adapters/okta.adapter.ts +0 -394
- package/src/mcp/adapters/openai.adapter.ts +0 -315
- package/src/mcp/adapters/opsgenie.adapter.ts +0 -375
- package/src/mcp/adapters/outreach.adapter.ts +0 -372
- package/src/mcp/adapters/paddle.adapter.ts +0 -467
- package/src/mcp/adapters/pagerduty.adapter.ts +0 -412
- package/src/mcp/adapters/pandadoc.adapter.ts +0 -389
- package/src/mcp/adapters/paypal.adapter.ts +0 -465
- package/src/mcp/adapters/personio.adapter.ts +0 -401
- package/src/mcp/adapters/pinecone.adapter.ts +0 -340
- package/src/mcp/adapters/pipedrive.adapter.ts +0 -324
- package/src/mcp/adapters/plaid.adapter.ts +0 -444
- package/src/mcp/adapters/postmark.adapter.ts +0 -387
- package/src/mcp/adapters/power-automate.adapter.ts +0 -388
- package/src/mcp/adapters/quickbooks.adapter.ts +0 -431
- package/src/mcp/adapters/recurly.adapter.ts +0 -433
- package/src/mcp/adapters/reddit.adapter.ts +0 -371
- package/src/mcp/adapters/render.adapter.ts +0 -332
- package/src/mcp/adapters/ringcentral.adapter.ts +0 -281
- package/src/mcp/adapters/rippling.adapter.ts +0 -287
- package/src/mcp/adapters/salesforce.adapter.ts +0 -321
- package/src/mcp/adapters/salesloft.adapter.ts +0 -413
- package/src/mcp/adapters/sanity.adapter.ts +0 -363
- package/src/mcp/adapters/sap.adapter.ts +0 -483
- package/src/mcp/adapters/segment.adapter.ts +0 -260
- package/src/mcp/adapters/sendgrid.adapter.ts +0 -265
- package/src/mcp/adapters/sentry.adapter.ts +0 -331
- package/src/mcp/adapters/servicenow.adapter.ts +0 -468
- package/src/mcp/adapters/shopify.adapter.ts +0 -451
- package/src/mcp/adapters/shortcut.adapter.ts +0 -290
- package/src/mcp/adapters/slack.adapter.ts +0 -380
- package/src/mcp/adapters/smartsheet.adapter.ts +0 -326
- package/src/mcp/adapters/snowflake.adapter.ts +0 -347
- package/src/mcp/adapters/snyk.adapter.ts +0 -394
- package/src/mcp/adapters/splunk.adapter.ts +0 -403
- package/src/mcp/adapters/square.adapter.ts +0 -467
- package/src/mcp/adapters/statuspage.adapter.ts +0 -401
- package/src/mcp/adapters/stripe.adapter.ts +0 -380
- package/src/mcp/adapters/supabase.adapter.ts +0 -334
- package/src/mcp/adapters/teamwork.adapter.ts +0 -404
- package/src/mcp/adapters/telegram.adapter.ts +0 -299
- package/src/mcp/adapters/terraform.adapter.ts +0 -300
- package/src/mcp/adapters/todoist.adapter.ts +0 -239
- package/src/mcp/adapters/trello.adapter.ts +0 -316
- package/src/mcp/adapters/twilio.adapter.ts +0 -233
- package/src/mcp/adapters/twitter.adapter.ts +0 -348
- package/src/mcp/adapters/vercel.adapter.ts +0 -219
- package/src/mcp/adapters/weaviate.adapter.ts +0 -371
- package/src/mcp/adapters/webex.adapter.ts +0 -237
- package/src/mcp/adapters/webflow.adapter.ts +0 -287
- package/src/mcp/adapters/whatsapp.adapter.ts +0 -273
- package/src/mcp/adapters/whereby.adapter.ts +0 -240
- package/src/mcp/adapters/woocommerce.adapter.ts +0 -454
- package/src/mcp/adapters/wordpress.adapter.ts +0 -455
- package/src/mcp/adapters/workday.adapter.ts +0 -354
- package/src/mcp/adapters/wrike.adapter.ts +0 -349
- package/src/mcp/adapters/xero.adapter.ts +0 -472
- package/src/mcp/adapters/youtube.adapter.ts +0 -401
- package/src/mcp/adapters/zendesk.adapter.ts +0 -399
- package/src/mcp/adapters/zoho-crm.adapter.ts +0 -410
- package/src/mcp/adapters/zoom.adapter.ts +0 -241
- package/src/mcp/adapters/zuora.adapter.ts +0 -476
- package/src/mcp/framework/api-executor.ts +0 -192
- package/src/mcp/framework/aws-sigv4.ts +0 -216
- package/src/mcp/framework/credential-resolver.ts +0 -128
- package/src/mcp/framework/oauth-token-manager.ts +0 -22
- package/src/mcp/framework/skill-mcp-framework.ts +0 -226
- package/src/mcp/framework/types.ts +0 -130
- package/src/mcp/index.ts +0 -124
- package/src/mcp/integration-catalog.ts +0 -178
- package/src/middleware/dns-rebinding.ts +0 -44
- package/src/middleware/egress-filter.ts +0 -104
- package/src/middleware/firewall.ts +0 -192
- package/src/middleware/geo-ip.ts +0 -156
- package/src/middleware/index.ts +0 -390
- package/src/middleware/network-config.ts +0 -90
- package/src/middleware/proxy-config.ts +0 -71
- package/src/middleware/request-limits.ts +0 -59
- package/src/middleware/transport-encryption.ts +0 -398
- package/src/registry/cli.ts +0 -63
- package/src/registry/server.ts +0 -504
- package/src/runtime/agent-loop.ts +0 -779
- package/src/runtime/compaction.ts +0 -638
- package/src/runtime/email-channel.ts +0 -120
- package/src/runtime/environment.ts +0 -300
- package/src/runtime/followup.ts +0 -211
- package/src/runtime/gateway.ts +0 -260
- package/src/runtime/hooks.ts +0 -564
- package/src/runtime/index.ts +0 -1110
- package/src/runtime/llm-client.ts +0 -1056
- package/src/runtime/model-router.ts +0 -97
- package/src/runtime/providers.ts +0 -228
- package/src/runtime/session-manager.ts +0 -345
- package/src/runtime/subagent.ts +0 -153
- package/src/runtime/tool-executor.ts +0 -208
- package/src/runtime/types.ts +0 -255
- package/src/security/brute-force.ts +0 -423
- package/src/security/config.ts +0 -159
- package/src/security/csp.ts +0 -407
- package/src/security/external-content.ts +0 -299
- package/src/security/index.ts +0 -557
- package/src/security/input-sanitizer.ts +0 -452
- package/src/security/output-filter.ts +0 -575
- package/src/security/port-scanner.ts +0 -342
- package/src/security/prompt-guard.ts +0 -387
- package/src/security/sql-guard.ts +0 -338
- package/src/security/threat-logger.ts +0 -484
- package/src/server.ts +0 -828
- package/src/setup/company.ts +0 -183
- package/src/setup/database.ts +0 -153
- package/src/setup/deployment.ts +0 -561
- package/src/setup/domain.ts +0 -112
- package/src/setup/index.ts +0 -171
- package/src/setup/provision.ts +0 -532
- package/src/setup/registration.ts +0 -302
- package/src/system-prompts/catchup.ts +0 -48
- package/src/system-prompts/google/calendar.ts +0 -37
- package/src/system-prompts/google/chat.ts +0 -92
- package/src/system-prompts/google/contacts.ts +0 -25
- package/src/system-prompts/google/docs.ts +0 -29
- package/src/system-prompts/google/drive.ts +0 -34
- package/src/system-prompts/google/forms.ts +0 -25
- package/src/system-prompts/google/gmail.ts +0 -50
- package/src/system-prompts/google/index.ts +0 -23
- package/src/system-prompts/google/maps.ts +0 -20
- package/src/system-prompts/google/meet.ts +0 -130
- package/src/system-prompts/google/sheets.ts +0 -32
- package/src/system-prompts/google/slides.ts +0 -26
- package/src/system-prompts/google/tasks.ts +0 -27
- package/src/system-prompts/index.ts +0 -88
- package/src/system-prompts/microsoft/contacts.ts +0 -34
- package/src/system-prompts/microsoft/excel.ts +0 -52
- package/src/system-prompts/microsoft/index.ts +0 -31
- package/src/system-prompts/microsoft/onedrive.ts +0 -41
- package/src/system-prompts/microsoft/onenote.ts +0 -36
- package/src/system-prompts/microsoft/outlook-calendar.ts +0 -37
- package/src/system-prompts/microsoft/outlook-mail.ts +0 -46
- package/src/system-prompts/microsoft/planner.ts +0 -37
- package/src/system-prompts/microsoft/powerbi.ts +0 -38
- package/src/system-prompts/microsoft/powerpoint.ts +0 -35
- package/src/system-prompts/microsoft/sharepoint.ts +0 -44
- package/src/system-prompts/microsoft/teams.ts +0 -49
- package/src/system-prompts/microsoft/todo.ts +0 -37
- package/src/system-prompts/shared-blocks.ts +0 -87
- package/src/system-prompts/task.ts +0 -21
- package/src/system-prompts/triage.ts +0 -34
- package/src/types/hono-env.ts +0 -18
- package/src/types/optional-deps.d.ts +0 -10
|
@@ -1,885 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Meeting Voice — Text-to-Speech for Meeting Participation
|
|
3
|
-
*
|
|
4
|
-
* Enables agents to speak in meetings by:
|
|
5
|
-
* 1. Converting text to speech via ElevenLabs API
|
|
6
|
-
* 2. Playing audio through a virtual audio device (BlackHole)
|
|
7
|
-
* 3. Browser picks up BlackHole as microphone → meeting hears the agent
|
|
8
|
-
*
|
|
9
|
-
* Requirements:
|
|
10
|
-
* - ElevenLabs API key (set in agent config or env: ELEVENLABS_API_KEY)
|
|
11
|
-
* - BlackHole virtual audio driver (macOS: brew install blackhole-2ch)
|
|
12
|
-
* - sox or afplay for audio playback routing
|
|
13
|
-
*
|
|
14
|
-
* Enterprise Architecture:
|
|
15
|
-
* - Each agent can have their own voice (configured per-agent)
|
|
16
|
-
* - Voice selection via ElevenLabs voice library
|
|
17
|
-
* - Audio output device configurable per-deployment
|
|
18
|
-
* - Works on any machine with a virtual audio driver (macOS, Linux with PulseAudio)
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
import type { AnyAgentTool, ToolCreationOptions } from '../../types.js';
|
|
22
|
-
import { jsonResult, errorResult } from '../../common.js';
|
|
23
|
-
import * as path from 'node:path';
|
|
24
|
-
import * as os from 'node:os';
|
|
25
|
-
import { promises as fs } from 'node:fs';
|
|
26
|
-
|
|
27
|
-
const ELEVENLABS_BASE = 'https://api.elevenlabs.io/v1';
|
|
28
|
-
|
|
29
|
-
// ════════════════════════════════════════════════════════════
|
|
30
|
-
// VOICE CAPABILITY MANAGER — Singleton per agent
|
|
31
|
-
// ════════════════════════════════════════════════════════════
|
|
32
|
-
|
|
33
|
-
export interface VoiceStatus {
|
|
34
|
-
available: boolean;
|
|
35
|
-
mode: 'voice' | 'chat-only';
|
|
36
|
-
hasApiKey: boolean;
|
|
37
|
-
hasVirtualAudio: boolean;
|
|
38
|
-
hasSox: boolean;
|
|
39
|
-
platform: string;
|
|
40
|
-
voiceName: string;
|
|
41
|
-
voiceId: string;
|
|
42
|
-
audioDevice: string;
|
|
43
|
-
issues: string[];
|
|
44
|
-
lastCheck: number;
|
|
45
|
-
lastSpeakSuccess: number | null;
|
|
46
|
-
lastSpeakFailure: number | null;
|
|
47
|
-
consecutiveFailures: number;
|
|
48
|
-
/** If true, voice was working but started failing — in degraded mode */
|
|
49
|
-
degraded: boolean;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Manages voice capability state per agent. Provides:
|
|
54
|
-
* - Preflight checks before meetings
|
|
55
|
-
* - Runtime health monitoring during meetings
|
|
56
|
-
* - Auto-degradation: voice → chat fallback after consecutive failures
|
|
57
|
-
* - Auto-recovery: periodic re-check to restore voice after transient failures
|
|
58
|
-
*/
|
|
59
|
-
class VoiceCapabilityManager {
|
|
60
|
-
private statusByAgent = new Map<string, VoiceStatus>();
|
|
61
|
-
private static instance: VoiceCapabilityManager;
|
|
62
|
-
_announcedChatFallback = new Set<string>();
|
|
63
|
-
|
|
64
|
-
static getInstance(): VoiceCapabilityManager {
|
|
65
|
-
if (!this.instance) this.instance = new VoiceCapabilityManager();
|
|
66
|
-
return this.instance;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/** Full preflight check — call before/during meeting join */
|
|
70
|
-
async preflight(
|
|
71
|
-
agentId: string,
|
|
72
|
-
getApiKey: () => Promise<string | null>,
|
|
73
|
-
voiceId?: string,
|
|
74
|
-
voiceName?: string,
|
|
75
|
-
audioDevice?: string,
|
|
76
|
-
): Promise<VoiceStatus> {
|
|
77
|
-
const setup = await checkAudioSetup();
|
|
78
|
-
const apiKey = await getApiKey();
|
|
79
|
-
const issues: string[] = [];
|
|
80
|
-
|
|
81
|
-
if (!apiKey) issues.push('No ElevenLabs API key');
|
|
82
|
-
if (!setup.hasBlackHole) issues.push('No virtual audio device');
|
|
83
|
-
if (!setup.hasSox) issues.push('sox not installed');
|
|
84
|
-
|
|
85
|
-
// Quick connectivity check: ping ElevenLabs using /voices (works with any valid key)
|
|
86
|
-
if (apiKey) {
|
|
87
|
-
try {
|
|
88
|
-
const res = await fetch(`${ELEVENLABS_BASE}/voices?page_size=1`, {
|
|
89
|
-
headers: { 'xi-api-key': apiKey },
|
|
90
|
-
signal: AbortSignal.timeout(5000),
|
|
91
|
-
});
|
|
92
|
-
if (!res.ok) {
|
|
93
|
-
const body = await res.text().catch(() => '');
|
|
94
|
-
issues.push(`ElevenLabs API error: ${res.status} — ${body.slice(0, 100)}`);
|
|
95
|
-
}
|
|
96
|
-
} catch (e: any) {
|
|
97
|
-
issues.push(`ElevenLabs unreachable: ${e.message}`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const prev = this.statusByAgent.get(agentId);
|
|
102
|
-
const resolvedVoiceId = voiceId || DEFAULT_VOICES['rachel'];
|
|
103
|
-
const defaultDevice = setup.platform === 'darwin' ? 'BlackHole 2ch'
|
|
104
|
-
: setup.platform === 'win32' ? 'CABLE Input (VB-Audio Virtual Cable)' : 'virtual';
|
|
105
|
-
|
|
106
|
-
const status: VoiceStatus = {
|
|
107
|
-
available: issues.length === 0,
|
|
108
|
-
mode: issues.length === 0 ? 'voice' : 'chat-only',
|
|
109
|
-
hasApiKey: !!apiKey,
|
|
110
|
-
hasVirtualAudio: setup.hasBlackHole,
|
|
111
|
-
hasSox: setup.hasSox,
|
|
112
|
-
platform: setup.platform,
|
|
113
|
-
voiceName: voiceName || 'rachel',
|
|
114
|
-
voiceId: resolvedVoiceId,
|
|
115
|
-
audioDevice: audioDevice || defaultDevice,
|
|
116
|
-
issues,
|
|
117
|
-
lastCheck: Date.now(),
|
|
118
|
-
lastSpeakSuccess: prev?.lastSpeakSuccess || null,
|
|
119
|
-
lastSpeakFailure: prev?.lastSpeakFailure || null,
|
|
120
|
-
consecutiveFailures: prev?.consecutiveFailures || 0,
|
|
121
|
-
degraded: false,
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
this.statusByAgent.set(agentId, status);
|
|
125
|
-
return status;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/** Get cached status (or run preflight if stale / missing) */
|
|
129
|
-
async getStatus(
|
|
130
|
-
agentId: string,
|
|
131
|
-
getApiKey: () => Promise<string | null>,
|
|
132
|
-
voiceId?: string,
|
|
133
|
-
voiceName?: string,
|
|
134
|
-
audioDevice?: string,
|
|
135
|
-
): Promise<VoiceStatus> {
|
|
136
|
-
const cached = this.statusByAgent.get(agentId);
|
|
137
|
-
// Re-check every 5 minutes, or if never checked
|
|
138
|
-
if (cached && Date.now() - cached.lastCheck < 300_000) return cached;
|
|
139
|
-
return this.preflight(agentId, getApiKey, voiceId, voiceName, audioDevice);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/** Record a successful speak */
|
|
143
|
-
recordSuccess(agentId: string): void {
|
|
144
|
-
const s = this.statusByAgent.get(agentId);
|
|
145
|
-
if (!s) return;
|
|
146
|
-
s.lastSpeakSuccess = Date.now();
|
|
147
|
-
s.consecutiveFailures = 0;
|
|
148
|
-
s.degraded = false;
|
|
149
|
-
s.mode = 'voice';
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/** Record a failed speak — auto-degrade after 3 consecutive failures */
|
|
153
|
-
recordFailure(agentId: string): void {
|
|
154
|
-
const s = this.statusByAgent.get(agentId);
|
|
155
|
-
if (!s) return;
|
|
156
|
-
s.lastSpeakFailure = Date.now();
|
|
157
|
-
s.consecutiveFailures++;
|
|
158
|
-
if (s.consecutiveFailures >= 3) {
|
|
159
|
-
s.degraded = true;
|
|
160
|
-
s.mode = 'chat-only';
|
|
161
|
-
console.warn(`[voice:${agentId}] Degraded to chat-only after ${s.consecutiveFailures} consecutive failures`);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/** Force re-check (e.g., after recovery attempt) */
|
|
166
|
-
invalidate(agentId: string): void {
|
|
167
|
-
this.statusByAgent.delete(agentId);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/** Check if voice should be attempted (respects degradation) */
|
|
171
|
-
shouldUseVoice(agentId: string): boolean {
|
|
172
|
-
const s = this.statusByAgent.get(agentId);
|
|
173
|
-
if (!s) return false;
|
|
174
|
-
if (s.mode === 'chat-only') {
|
|
175
|
-
// Auto-recovery: try voice again every 2 minutes after degradation
|
|
176
|
-
if (s.degraded && s.lastSpeakFailure && Date.now() - s.lastSpeakFailure > 120_000) {
|
|
177
|
-
console.log(`[voice:${agentId}] Attempting voice recovery...`);
|
|
178
|
-
return true; // Let it try once
|
|
179
|
-
}
|
|
180
|
-
return false;
|
|
181
|
-
}
|
|
182
|
-
return s.available;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/** Build a system prompt block describing voice status */
|
|
186
|
-
buildPromptBlock(agentId: string): string {
|
|
187
|
-
const s = this.statusByAgent.get(agentId);
|
|
188
|
-
if (!s) return `\n## Voice Status\nVoice not checked yet. Use meeting_speak to talk — it will fall back to chat if voice is unavailable.\n`;
|
|
189
|
-
|
|
190
|
-
if (s.available && !s.degraded) {
|
|
191
|
-
return `
|
|
192
|
-
## Voice: ENABLED
|
|
193
|
-
You CAN speak in this meeting using your voice (${s.voiceName}).
|
|
194
|
-
- Use meeting_speak(text: "...") to talk — participants will HEAR you
|
|
195
|
-
- Use meeting_action(action: "chat", message: "...") for text chat
|
|
196
|
-
- PREFER voice for important points, questions, and responses
|
|
197
|
-
- Use chat for links, code snippets, or long lists
|
|
198
|
-
- Keep spoken messages concise (1-3 sentences) for natural conversation
|
|
199
|
-
- Wait for others to finish (check captions) before speaking`;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
if (s.degraded) {
|
|
203
|
-
return `
|
|
204
|
-
## Voice: DEGRADED — Using Chat Fallback
|
|
205
|
-
Voice was working but has failed ${s.consecutiveFailures} times. Automatically switched to chat.
|
|
206
|
-
- Use meeting_action(action: "chat", message: "...") to communicate
|
|
207
|
-
- meeting_speak will auto-retry voice periodically — if it works, voice is restored
|
|
208
|
-
- Issues: ${s.issues.join(', ') || 'transient playback failures'}`;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return `
|
|
212
|
-
## Voice: UNAVAILABLE — Chat Only
|
|
213
|
-
Voice is not available for this meeting. Communicate via chat only.
|
|
214
|
-
- Use meeting_action(action: "chat", message: "...") for all communication
|
|
215
|
-
- Issues: ${s.issues.join(', ')}
|
|
216
|
-
- To enable voice: Dashboard → Settings → Integrations → ElevenLabs, then select a voice in agent profile`;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/** Exported singleton */
|
|
221
|
-
export const voiceCapability = VoiceCapabilityManager.getInstance();
|
|
222
|
-
|
|
223
|
-
// Default voices — high quality, low latency
|
|
224
|
-
const DEFAULT_VOICES: Record<string, string> = {
|
|
225
|
-
'rachel': '21m00Tcm4TlvDq8ikWAM', // Female, warm
|
|
226
|
-
'drew': '29vD33N1CtxCmqQRPOHJ', // Male, confident
|
|
227
|
-
'clyde': '2EiwWnXFnvU5JabPnv8n', // Male, deep
|
|
228
|
-
'domi': 'AZnzlk1XvdvUeBnXmlld', // Female, strong
|
|
229
|
-
'dave': 'CYw3kZ02Hs0563khs1Fj', // Male, conversational
|
|
230
|
-
'fin': 'D38z5RcWu1voky8WS1ja', // Male, British
|
|
231
|
-
'sarah': 'EXAVITQu4vr4xnSDxMaL', // Female, soft
|
|
232
|
-
'antoni': 'ErXwobaYiN019PkySvjV', // Male, well-rounded
|
|
233
|
-
'elli': 'MF3mGyEYCl7XYWbV9V6O', // Female, youthful
|
|
234
|
-
'josh': 'TxGEqnHWrfWFTfGW9XjX', // Male, deep, narrative
|
|
235
|
-
'arnold': 'VR6AewLTigWG4xSOukaG', // Male, crisp
|
|
236
|
-
'adam': 'pNInz6obpgDQGcFmaJgB', // Male, deep
|
|
237
|
-
'sam': 'yoZ06aMxZJJ28mfd3POQ', // Male, raspy
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
function _delay(ms: number) { return new Promise(r => setTimeout(r, ms)); }
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Generate speech audio from text using ElevenLabs
|
|
244
|
-
*/
|
|
245
|
-
/**
|
|
246
|
-
* Generate speech and return full buffer (used for file save).
|
|
247
|
-
*/
|
|
248
|
-
async function generateSpeech(
|
|
249
|
-
apiKey: string,
|
|
250
|
-
text: string,
|
|
251
|
-
voiceId: string,
|
|
252
|
-
options?: { stability?: number; similarity?: number; model?: string }
|
|
253
|
-
): Promise<Buffer> {
|
|
254
|
-
const res = await _fetchTTSStream(apiKey, text, voiceId, options);
|
|
255
|
-
const chunks: Uint8Array[] = [];
|
|
256
|
-
const reader = res.body!.getReader();
|
|
257
|
-
while (true) {
|
|
258
|
-
const { done, value } = await reader.read();
|
|
259
|
-
if (done) break;
|
|
260
|
-
chunks.push(value);
|
|
261
|
-
}
|
|
262
|
-
return Buffer.concat(chunks);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Stream TTS directly to audio device — near-zero latency.
|
|
267
|
-
* Pipes ElevenLabs stream → sox stdin → virtual audio device.
|
|
268
|
-
* Audio starts playing within ~200ms of first chunk.
|
|
269
|
-
*/
|
|
270
|
-
/** Active response players per agent — so voice intelligence can kill them on interruption */
|
|
271
|
-
const activeResponsePlayers = new Map<string, import('child_process').ChildProcess>();
|
|
272
|
-
|
|
273
|
-
export function killActiveResponsePlayer(agentId: string): boolean {
|
|
274
|
-
const player = activeResponsePlayers.get(agentId);
|
|
275
|
-
if (player) {
|
|
276
|
-
try { player.kill('SIGTERM'); } catch {}
|
|
277
|
-
activeResponsePlayers.delete(agentId);
|
|
278
|
-
return true;
|
|
279
|
-
}
|
|
280
|
-
return false;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
async function streamSpeechToDevice(
|
|
284
|
-
apiKey: string,
|
|
285
|
-
text: string,
|
|
286
|
-
voiceId: string,
|
|
287
|
-
device: string,
|
|
288
|
-
options?: { stability?: number; similarity?: number; model?: string },
|
|
289
|
-
agentId?: string,
|
|
290
|
-
): Promise<{ audioSize: number; durationMs: number }> {
|
|
291
|
-
const { spawn } = await import('child_process');
|
|
292
|
-
const platform = process.platform;
|
|
293
|
-
const startTime = Date.now();
|
|
294
|
-
|
|
295
|
-
// Start sox/player process that reads from stdin
|
|
296
|
-
let playerArgs: string[];
|
|
297
|
-
let playerCmd: string;
|
|
298
|
-
|
|
299
|
-
if (platform === 'darwin') {
|
|
300
|
-
// sox reads mp3 from stdin, outputs to coreaudio device
|
|
301
|
-
playerCmd = 'sox';
|
|
302
|
-
playerArgs = ['-t', 'mp3', '-', '-t', 'coreaudio', device];
|
|
303
|
-
} else if (platform === 'linux') {
|
|
304
|
-
// paplay reads from stdin
|
|
305
|
-
playerCmd = 'paplay';
|
|
306
|
-
playerArgs = device ? ['--device=' + device, '--raw'] : ['--raw'];
|
|
307
|
-
} else if (platform === 'win32') {
|
|
308
|
-
playerCmd = 'sox';
|
|
309
|
-
playerArgs = ['-t', 'mp3', '-', '-t', 'waveaudio', device];
|
|
310
|
-
} else {
|
|
311
|
-
throw new Error(`Unsupported platform: ${platform}`);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
const player = spawn(playerCmd, playerArgs, {
|
|
315
|
-
stdio: ['pipe', 'ignore', 'pipe'],
|
|
316
|
-
timeout: 60_000,
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
// Register so voice intelligence can kill on interruption
|
|
320
|
-
if (agentId) {
|
|
321
|
-
activeResponsePlayers.set(agentId, player);
|
|
322
|
-
// Use global registry so voice intelligence can find us without circular imports
|
|
323
|
-
(globalThis as any).__activeResponsePlayers = activeResponsePlayers;
|
|
324
|
-
player.on('close', () => {
|
|
325
|
-
activeResponsePlayers.delete(agentId);
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// Fetch TTS stream
|
|
330
|
-
const fetchStart = Date.now();
|
|
331
|
-
const res = await _fetchTTSStream(apiKey, text, voiceId, options);
|
|
332
|
-
console.log(`[voice] TTS API responded in ${Date.now() - fetchStart}ms`);
|
|
333
|
-
const reader = res.body!.getReader();
|
|
334
|
-
let totalBytes = 0;
|
|
335
|
-
let firstChunk = true;
|
|
336
|
-
|
|
337
|
-
// Pipe stream chunks directly to sox stdin
|
|
338
|
-
// Swallow EPIPE errors when sox is killed mid-stream (interruption)
|
|
339
|
-
player.stdin!.on('error', () => {});
|
|
340
|
-
try {
|
|
341
|
-
while (true) {
|
|
342
|
-
const { done, value } = await reader.read();
|
|
343
|
-
if (done) break;
|
|
344
|
-
if (firstChunk) {
|
|
345
|
-
console.log(`[voice] First audio chunk in ${Date.now() - fetchStart}ms (${value.length} bytes)`);
|
|
346
|
-
firstChunk = false;
|
|
347
|
-
}
|
|
348
|
-
totalBytes += value.length;
|
|
349
|
-
try {
|
|
350
|
-
const canWrite = player.stdin!.write(Buffer.from(value));
|
|
351
|
-
if (!canWrite) {
|
|
352
|
-
await new Promise<void>(resolve => player.stdin!.once('drain', resolve));
|
|
353
|
-
}
|
|
354
|
-
} catch { break; } // EPIPE — sox was killed (interruption)
|
|
355
|
-
}
|
|
356
|
-
try { player.stdin!.end(); } catch {}
|
|
357
|
-
} catch (e: any) {
|
|
358
|
-
try { player.kill(); } catch {}
|
|
359
|
-
throw new Error(`Stream pipe failed: ${e.message}`);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// Wait for playback to finish
|
|
363
|
-
await new Promise<void>((resolve, reject) => {
|
|
364
|
-
const timeout = setTimeout(() => {
|
|
365
|
-
player.kill();
|
|
366
|
-
reject(new Error('Playback timed out'));
|
|
367
|
-
}, 60_000);
|
|
368
|
-
player.on('close', (code) => {
|
|
369
|
-
clearTimeout(timeout);
|
|
370
|
-
if (code === 0 || code === null) resolve();
|
|
371
|
-
else reject(new Error(`Player exited with code ${code}`));
|
|
372
|
-
});
|
|
373
|
-
player.on('error', (err) => {
|
|
374
|
-
clearTimeout(timeout);
|
|
375
|
-
reject(err);
|
|
376
|
-
});
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
return { audioSize: totalBytes, durationMs: Date.now() - startTime };
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/** Internal: fetch the ElevenLabs TTS streaming response */
|
|
383
|
-
async function _fetchTTSStream(
|
|
384
|
-
apiKey: string,
|
|
385
|
-
text: string,
|
|
386
|
-
voiceId: string,
|
|
387
|
-
options?: { stability?: number; similarity?: number; model?: string }
|
|
388
|
-
): Promise<Response> {
|
|
389
|
-
const model = options?.model || 'eleven_turbo_v2_5';
|
|
390
|
-
const url = `${ELEVENLABS_BASE}/text-to-speech/${voiceId}/stream`;
|
|
391
|
-
|
|
392
|
-
const res = await fetch(url, {
|
|
393
|
-
method: 'POST',
|
|
394
|
-
headers: {
|
|
395
|
-
'xi-api-key': apiKey,
|
|
396
|
-
'Content-Type': 'application/json',
|
|
397
|
-
'Accept': 'audio/mpeg',
|
|
398
|
-
},
|
|
399
|
-
body: JSON.stringify({
|
|
400
|
-
text,
|
|
401
|
-
model_id: model,
|
|
402
|
-
voice_settings: {
|
|
403
|
-
stability: options?.stability ?? 0.5,
|
|
404
|
-
similarity_boost: options?.similarity ?? 0.75,
|
|
405
|
-
style: 0.0,
|
|
406
|
-
use_speaker_boost: true,
|
|
407
|
-
},
|
|
408
|
-
output_format: 'mp3_22050_32', // Lower bitrate = smaller chunks = faster first-byte
|
|
409
|
-
optimize_streaming_latency: 4, // Maximum latency optimization (may reduce quality slightly)
|
|
410
|
-
}),
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
if (!res.ok) {
|
|
414
|
-
const err = await res.text().catch(() => '');
|
|
415
|
-
throw new Error(`ElevenLabs API ${res.status}: ${err}`);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
return res;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Play audio through a specific output device.
|
|
423
|
-
* On macOS, uses `afplay` with device routing via SwitchAudioSource or sox.
|
|
424
|
-
* Falls back to system default if no virtual device specified.
|
|
425
|
-
*/
|
|
426
|
-
async function playAudioToDevice(
|
|
427
|
-
audioPath: string,
|
|
428
|
-
device?: string
|
|
429
|
-
): Promise<void> {
|
|
430
|
-
const { exec: execCb } = await import('child_process');
|
|
431
|
-
const { promisify } = await import('util');
|
|
432
|
-
const exec = promisify(execCb);
|
|
433
|
-
|
|
434
|
-
if (process.platform === 'darwin') {
|
|
435
|
-
if (device) {
|
|
436
|
-
// Use sox to play to specific device (requires `brew install sox`)
|
|
437
|
-
try {
|
|
438
|
-
await exec(`sox "${audioPath}" -t coreaudio "${device}"`, { timeout: 30000 });
|
|
439
|
-
return;
|
|
440
|
-
} catch {
|
|
441
|
-
console.warn(`[meeting-voice] sox failed for device "${device}", falling back to afplay`);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
await exec(`afplay "${audioPath}"`, { timeout: 30000 });
|
|
445
|
-
} else if (process.platform === 'linux') {
|
|
446
|
-
if (device) {
|
|
447
|
-
// Try PulseAudio first, then ALSA
|
|
448
|
-
try {
|
|
449
|
-
await exec(`paplay --device="${device}" "${audioPath}"`, { timeout: 30000 });
|
|
450
|
-
} catch {
|
|
451
|
-
await exec(`aplay -D "${device}" "${audioPath}"`, { timeout: 30000 });
|
|
452
|
-
}
|
|
453
|
-
} else {
|
|
454
|
-
try {
|
|
455
|
-
await exec(`paplay "${audioPath}"`, { timeout: 30000 });
|
|
456
|
-
} catch {
|
|
457
|
-
await exec(`aplay "${audioPath}"`, { timeout: 30000 });
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
} else if (process.platform === 'win32') {
|
|
461
|
-
if (device) {
|
|
462
|
-
// sox on Windows can target specific audio devices
|
|
463
|
-
try {
|
|
464
|
-
await exec(`sox "${audioPath}" -t waveaudio "${device}"`, { timeout: 30000 });
|
|
465
|
-
return;
|
|
466
|
-
} catch {
|
|
467
|
-
console.warn(`[meeting-voice] sox device routing failed on Windows, using default playback`);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
// PowerShell fallback: play through default device
|
|
471
|
-
// Use SoundPlayer for WAV or ffplay for mp3
|
|
472
|
-
try {
|
|
473
|
-
await exec(`powershell -Command "(New-Object System.Media.SoundPlayer '${audioPath}').PlaySync()"`, { timeout: 30000 });
|
|
474
|
-
} catch {
|
|
475
|
-
// Last resort: ffplay
|
|
476
|
-
await exec(`ffplay -nodisp -autoexit "${audioPath}"`, { timeout: 30000 });
|
|
477
|
-
}
|
|
478
|
-
} else {
|
|
479
|
-
throw new Error(`Unsupported platform for audio playback: ${process.platform}`);
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Check if virtual audio device is available
|
|
485
|
-
*/
|
|
486
|
-
async function checkAudioSetup(): Promise<{
|
|
487
|
-
hasBlackHole: boolean;
|
|
488
|
-
hasSox: boolean;
|
|
489
|
-
devices: string[];
|
|
490
|
-
platform: string;
|
|
491
|
-
}> {
|
|
492
|
-
const { exec: execCb } = await import('child_process');
|
|
493
|
-
const { promisify } = await import('util');
|
|
494
|
-
const exec = promisify(execCb);
|
|
495
|
-
|
|
496
|
-
const platform = process.platform;
|
|
497
|
-
let hasBlackHole = false;
|
|
498
|
-
let hasSox = false;
|
|
499
|
-
let devices: string[] = [];
|
|
500
|
-
|
|
501
|
-
if (platform === 'darwin') {
|
|
502
|
-
// Check for BlackHole — multiple detection methods
|
|
503
|
-
try {
|
|
504
|
-
const { stdout } = await exec('system_profiler SPAudioDataType 2>/dev/null');
|
|
505
|
-
if (stdout.includes('BlackHole')) hasBlackHole = true;
|
|
506
|
-
const lines = stdout.split('\n');
|
|
507
|
-
for (const line of lines) {
|
|
508
|
-
const match = line.match(/^\s+(BlackHole|Built-in|External|USB|Aggregate|DELL|Mac mini)/);
|
|
509
|
-
if (match) devices.push(line.trim());
|
|
510
|
-
}
|
|
511
|
-
} catch {}
|
|
512
|
-
// Fallback: check HAL plugin directory (works even if coreaudiod hasn't loaded it yet)
|
|
513
|
-
if (!hasBlackHole) {
|
|
514
|
-
try {
|
|
515
|
-
const { existsSync } = await import('fs');
|
|
516
|
-
if (existsSync('/Library/Audio/Plug-Ins/HAL/BlackHole2ch.driver')) {
|
|
517
|
-
hasBlackHole = true;
|
|
518
|
-
devices.push('BlackHole 2ch (driver installed, may need coreaudiod restart)');
|
|
519
|
-
}
|
|
520
|
-
} catch {}
|
|
521
|
-
}
|
|
522
|
-
// Fallback: check SwitchAudioSource
|
|
523
|
-
if (!hasBlackHole) {
|
|
524
|
-
try {
|
|
525
|
-
const { stdout } = await exec('SwitchAudioSource -a -t output 2>/dev/null');
|
|
526
|
-
if (stdout.includes('BlackHole')) {
|
|
527
|
-
hasBlackHole = true;
|
|
528
|
-
devices.push('BlackHole 2ch');
|
|
529
|
-
}
|
|
530
|
-
} catch {}
|
|
531
|
-
}
|
|
532
|
-
// If driver file exists but audio system doesn't see it, try to restart coreaudiod
|
|
533
|
-
if (!hasBlackHole) {
|
|
534
|
-
try {
|
|
535
|
-
const { existsSync } = await import('fs');
|
|
536
|
-
if (existsSync('/Library/Audio/Plug-Ins/HAL/BlackHole2ch.driver')) {
|
|
537
|
-
console.log('[audio] BlackHole driver installed but not loaded — attempting coreaudiod restart...');
|
|
538
|
-
try {
|
|
539
|
-
await exec('sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod 2>/dev/null', { timeout: 10_000 });
|
|
540
|
-
// Wait for audio system to reinitialize
|
|
541
|
-
await new Promise(r => setTimeout(r, 3000));
|
|
542
|
-
// Re-check
|
|
543
|
-
try {
|
|
544
|
-
const { stdout } = await exec('SwitchAudioSource -a -t output 2>/dev/null');
|
|
545
|
-
if (stdout.includes('BlackHole')) {
|
|
546
|
-
hasBlackHole = true;
|
|
547
|
-
devices.push('BlackHole 2ch (loaded after coreaudiod restart)');
|
|
548
|
-
console.log('[audio] ✅ BlackHole now available after coreaudiod restart');
|
|
549
|
-
}
|
|
550
|
-
} catch {}
|
|
551
|
-
} catch {
|
|
552
|
-
// sudo not available — just note the driver is there
|
|
553
|
-
console.warn('[audio] BlackHole driver exists but coreaudiod restart needs sudo. Run: sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod');
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
} catch {}
|
|
557
|
-
}
|
|
558
|
-
try { await exec('which sox'); hasSox = true; } catch {}
|
|
559
|
-
} else if (platform === 'linux') {
|
|
560
|
-
// Check PulseAudio / PipeWire virtual sinks
|
|
561
|
-
try {
|
|
562
|
-
const { stdout } = await exec('pactl list short sinks 2>/dev/null');
|
|
563
|
-
devices = stdout.split('\n').filter(Boolean);
|
|
564
|
-
hasBlackHole = devices.some(d => d.includes('virtual') || d.includes('null') || d.includes('pipewire'));
|
|
565
|
-
} catch {}
|
|
566
|
-
try { await exec('which sox'); hasSox = true; } catch {}
|
|
567
|
-
} else if (platform === 'win32') {
|
|
568
|
-
// Check for VB-CABLE or other virtual audio
|
|
569
|
-
try {
|
|
570
|
-
const { stdout } = await exec('powershell -Command "Get-AudioDevice -List 2>$null | Select-Object -ExpandProperty Name"', { timeout: 10000 });
|
|
571
|
-
devices = stdout.split('\n').map(d => d.trim()).filter(Boolean);
|
|
572
|
-
hasBlackHole = devices.some(d => /cable|virtual|vb-audio/i.test(d));
|
|
573
|
-
} catch {
|
|
574
|
-
// Fallback: check via sox
|
|
575
|
-
try {
|
|
576
|
-
const { stdout } = await exec('sox --help 2>&1');
|
|
577
|
-
if (stdout.includes('waveaudio')) hasSox = true;
|
|
578
|
-
} catch {}
|
|
579
|
-
}
|
|
580
|
-
try { await exec('where sox'); hasSox = true; } catch {}
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
return { hasBlackHole, hasSox, devices, platform };
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
export function createMeetingVoiceTools(
|
|
588
|
-
config: {
|
|
589
|
-
elevenLabsApiKey?: string;
|
|
590
|
-
elevenLabsKeyResolver?: () => Promise<string | null>;
|
|
591
|
-
voiceId?: string;
|
|
592
|
-
voiceName?: string;
|
|
593
|
-
audioDevice?: string;
|
|
594
|
-
},
|
|
595
|
-
_options?: ToolCreationOptions
|
|
596
|
-
): AnyAgentTool[] {
|
|
597
|
-
const agentId = (_options as any)?.agentId || 'default';
|
|
598
|
-
|
|
599
|
-
/** Resolve ElevenLabs API key: env var → vault → null */
|
|
600
|
-
const getApiKey = async (): Promise<string | null> => {
|
|
601
|
-
if (config.elevenLabsApiKey) return config.elevenLabsApiKey;
|
|
602
|
-
if (config.elevenLabsKeyResolver) {
|
|
603
|
-
try { return await config.elevenLabsKeyResolver(); } catch { return null; }
|
|
604
|
-
}
|
|
605
|
-
return process.env.ELEVENLABS_API_KEY || null;
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
return [
|
|
609
|
-
// ─── Speak in Meeting ──────────────────────────────
|
|
610
|
-
{
|
|
611
|
-
name: 'meeting_speak',
|
|
612
|
-
description: `Speak in a meeting using your voice. Participants will HEAR you through the virtual microphone. Audio streams in real-time (near-zero latency). Auto-falls back to meeting chat if voice fails.
|
|
613
|
-
|
|
614
|
-
IMPORTANT: When meeting_speak succeeds (status: "spoken"), DO NOT also send the same message via chat. That would duplicate your message. Only use meeting chat for links, code, or data that's better as text.
|
|
615
|
-
|
|
616
|
-
Tips:
|
|
617
|
-
- Keep messages SHORT: 1-2 sentences per turn, like a real conversation
|
|
618
|
-
- Wait for others to finish (check captions) before speaking
|
|
619
|
-
- For long content, break it into multiple short meeting_speak calls`,
|
|
620
|
-
category: 'utility' as const,
|
|
621
|
-
parameters: {
|
|
622
|
-
type: 'object' as const,
|
|
623
|
-
properties: {
|
|
624
|
-
text: { type: 'string', description: 'Text to speak in the meeting' },
|
|
625
|
-
voice: { type: 'string', description: 'Voice name or ElevenLabs voice ID. Built-in voices: rachel (female, warm), drew (male, confident), sarah (female, soft), josh (male, deep), adam (male, deep), sam (male, raspy). Default: agent\'s configured voice.' },
|
|
626
|
-
model: { type: 'string', description: 'ElevenLabs model: "eleven_turbo_v2_5" (fastest, default), "eleven_multilingual_v2" (best quality, supports 29 languages)' },
|
|
627
|
-
},
|
|
628
|
-
required: ['text'],
|
|
629
|
-
},
|
|
630
|
-
async execute(_id: string, params: any) {
|
|
631
|
-
try {
|
|
632
|
-
const text = params.text;
|
|
633
|
-
if (!text || text.trim().length === 0) {
|
|
634
|
-
return errorResult('No text to speak.');
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
const vcm = voiceCapability;
|
|
638
|
-
const status = await vcm.getStatus(agentId, getApiKey, config.voiceId, config.voiceName, config.audioDevice);
|
|
639
|
-
|
|
640
|
-
// ─── Chat fallback helper ───────────────────────
|
|
641
|
-
const fallbackToChat = async (reason: string): Promise<any> => {
|
|
642
|
-
console.log(`[voice:${agentId}] Falling back to chat: ${reason}`);
|
|
643
|
-
vcm.recordFailure(agentId);
|
|
644
|
-
|
|
645
|
-
// Shut down voice intelligence — stop hum, disable echo discard
|
|
646
|
-
try {
|
|
647
|
-
const { getActiveVoiceIntelligence } = await import('../../../engine/meeting-voice-intelligence.js');
|
|
648
|
-
const voiceIntel = getActiveVoiceIntelligence(agentId);
|
|
649
|
-
if (voiceIntel) {
|
|
650
|
-
voiceIntel.stopAll();
|
|
651
|
-
voiceIntel.shutdown();
|
|
652
|
-
}
|
|
653
|
-
} catch {}
|
|
654
|
-
|
|
655
|
-
// Try to send via meeting chat using the browser
|
|
656
|
-
try {
|
|
657
|
-
const { ensureBrowser, sendChatMessage } = await import('./meetings.js');
|
|
658
|
-
const { page } = await ensureBrowser(false, agentId, false);
|
|
659
|
-
|
|
660
|
-
// On first voice failure, announce mic issue in chat
|
|
661
|
-
if (!vcm._announcedChatFallback?.has(agentId)) {
|
|
662
|
-
if (!vcm._announcedChatFallback) (vcm as any)._announcedChatFallback = new Set();
|
|
663
|
-
vcm._announcedChatFallback.add(agentId);
|
|
664
|
-
await sendChatMessage(page, `Sorry, something is wrong with my microphone so I'll be responding via chat for now!`);
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
const chatResult = await sendChatMessage(page, text);
|
|
668
|
-
if (chatResult.sent) {
|
|
669
|
-
return jsonResult({
|
|
670
|
-
action: 'meeting_speak',
|
|
671
|
-
status: 'sent_as_chat',
|
|
672
|
-
method: 'chat_fallback',
|
|
673
|
-
text,
|
|
674
|
-
reason,
|
|
675
|
-
chatMethod: chatResult.method,
|
|
676
|
-
note: 'Voice unavailable — message sent as meeting chat instead.',
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
|
-
} catch (chatErr: any) {
|
|
680
|
-
console.error(`[voice:${agentId}] Chat fallback also failed: ${chatErr.message}`);
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
// Both voice and chat failed
|
|
684
|
-
return jsonResult({
|
|
685
|
-
action: 'meeting_speak',
|
|
686
|
-
status: 'failed',
|
|
687
|
-
text,
|
|
688
|
-
reason,
|
|
689
|
-
hint: 'Both voice and chat failed. Check meeting connection and audio setup.',
|
|
690
|
-
});
|
|
691
|
-
};
|
|
692
|
-
|
|
693
|
-
// ─── Check if voice should be attempted ─────────
|
|
694
|
-
if (!vcm.shouldUseVoice(agentId)) {
|
|
695
|
-
return fallbackToChat(status.degraded
|
|
696
|
-
? `Voice degraded (${status.consecutiveFailures} consecutive failures)`
|
|
697
|
-
: `Voice unavailable: ${status.issues.join(', ')}`);
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
// ─── Attempt voice ──────────────────────────────
|
|
701
|
-
const apiKey = await getApiKey();
|
|
702
|
-
if (!apiKey) {
|
|
703
|
-
return fallbackToChat('No ElevenLabs API key');
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
// Resolve voice
|
|
707
|
-
let voiceId = config.voiceId || DEFAULT_VOICES['rachel'];
|
|
708
|
-
if (params.voice) {
|
|
709
|
-
const lower = params.voice.toLowerCase();
|
|
710
|
-
if (DEFAULT_VOICES[lower]) {
|
|
711
|
-
voiceId = DEFAULT_VOICES[lower];
|
|
712
|
-
} else if (params.voice.length > 10) {
|
|
713
|
-
voiceId = params.voice;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
// ─── Stop hum + mark speaking state for echo management ───
|
|
718
|
-
try {
|
|
719
|
-
const { getActiveVoiceIntelligence } = await import('../../../engine/meeting-voice-intelligence.js');
|
|
720
|
-
const voiceIntel = getActiveVoiceIntelligence(agentId);
|
|
721
|
-
if (voiceIntel) {
|
|
722
|
-
voiceIntel.stopAll(); // Kill hum
|
|
723
|
-
await new Promise(r => setTimeout(r, 100));
|
|
724
|
-
voiceIntel.markSpeaking(text); // Monitor will now discard echo captions
|
|
725
|
-
}
|
|
726
|
-
} catch {}
|
|
727
|
-
|
|
728
|
-
// ─── Stream TTS directly to audio device (near-zero latency) ───
|
|
729
|
-
const device = config.audioDevice || status.audioDevice || 'BlackHole 2ch';
|
|
730
|
-
try {
|
|
731
|
-
const result = await streamSpeechToDevice(apiKey, text, voiceId, device, {
|
|
732
|
-
model: params.model,
|
|
733
|
-
}, agentId);
|
|
734
|
-
|
|
735
|
-
// ─── Success! ──────────────────────────────────
|
|
736
|
-
vcm.recordSuccess(agentId);
|
|
737
|
-
// Mark done speaking — echo discard cooldown starts
|
|
738
|
-
try {
|
|
739
|
-
const { getActiveVoiceIntelligence: getVI } = await import('../../../engine/meeting-voice-intelligence.js');
|
|
740
|
-
getVI(agentId)?.markDoneSpeaking();
|
|
741
|
-
} catch {}
|
|
742
|
-
return jsonResult({
|
|
743
|
-
action: 'meeting_speak',
|
|
744
|
-
status: 'spoken',
|
|
745
|
-
method: 'voice',
|
|
746
|
-
text,
|
|
747
|
-
voiceId,
|
|
748
|
-
voiceName: config.voiceName || Object.entries(DEFAULT_VOICES).find(([, id]) => id === voiceId)?.[0] || 'custom',
|
|
749
|
-
audioSize: result.audioSize,
|
|
750
|
-
durationMs: result.durationMs,
|
|
751
|
-
streaming: true,
|
|
752
|
-
});
|
|
753
|
-
} catch (streamErr: any) {
|
|
754
|
-
// Streaming failed — try file-based fallback before chat
|
|
755
|
-
console.warn(`[voice:${agentId}] Streaming failed (${streamErr.message}), trying file-based playback...`);
|
|
756
|
-
try {
|
|
757
|
-
const audioBuffer = await generateSpeech(apiKey, text, voiceId, { model: params.model });
|
|
758
|
-
const audioDir = path.join(os.tmpdir(), 'agenticmail-voice');
|
|
759
|
-
await fs.mkdir(audioDir, { recursive: true });
|
|
760
|
-
const audioFile = path.join(audioDir, `speak-${Date.now()}.mp3`);
|
|
761
|
-
await fs.writeFile(audioFile, audioBuffer);
|
|
762
|
-
await playAudioToDevice(audioFile, device);
|
|
763
|
-
vcm.recordSuccess(agentId);
|
|
764
|
-
return jsonResult({
|
|
765
|
-
action: 'meeting_speak',
|
|
766
|
-
status: 'spoken',
|
|
767
|
-
method: 'voice',
|
|
768
|
-
text,
|
|
769
|
-
voiceId,
|
|
770
|
-
voiceName: config.voiceName || Object.entries(DEFAULT_VOICES).find(([, id]) => id === voiceId)?.[0] || 'custom',
|
|
771
|
-
audioFile,
|
|
772
|
-
audioSize: audioBuffer.length,
|
|
773
|
-
streaming: false,
|
|
774
|
-
});
|
|
775
|
-
} catch (fileErr: any) {
|
|
776
|
-
// Mark done speaking before falling back to chat
|
|
777
|
-
try {
|
|
778
|
-
const { getActiveVoiceIntelligence: getVI } = await import('../../../engine/meeting-voice-intelligence.js');
|
|
779
|
-
getVI(agentId)?.markDoneSpeaking();
|
|
780
|
-
} catch {}
|
|
781
|
-
return fallbackToChat(`Voice failed: ${streamErr.message}, file fallback: ${fileErr.message}`);
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
785
|
-
},
|
|
786
|
-
},
|
|
787
|
-
|
|
788
|
-
// ─── Check Audio Setup ─────────────────────────────
|
|
789
|
-
{
|
|
790
|
-
name: 'meeting_audio_setup',
|
|
791
|
-
description: 'Check if the machine has the required audio setup for meeting voice (virtual audio device, sox, etc.). Run this before using meeting_speak to verify the setup.',
|
|
792
|
-
category: 'utility' as const,
|
|
793
|
-
parameters: {
|
|
794
|
-
type: 'object' as const,
|
|
795
|
-
properties: {},
|
|
796
|
-
required: [],
|
|
797
|
-
},
|
|
798
|
-
async execute(_id: string, _params: any) {
|
|
799
|
-
try {
|
|
800
|
-
const setup = await checkAudioSetup();
|
|
801
|
-
const apiKey = await getApiKey();
|
|
802
|
-
|
|
803
|
-
const issues: string[] = [];
|
|
804
|
-
if (!apiKey) issues.push('ElevenLabs API key not configured. Add it in Dashboard → Settings → Integrations (key name: "elevenlabs"), or set ELEVENLABS_API_KEY env var.');
|
|
805
|
-
if (!setup.hasBlackHole) {
|
|
806
|
-
if (setup.platform === 'darwin') issues.push('BlackHole virtual audio not found (install: brew install blackhole-2ch)');
|
|
807
|
-
else if (setup.platform === 'linux') issues.push('No virtual audio sink found (create one: pactl load-module module-null-sink sink_name=virtual)');
|
|
808
|
-
else if (setup.platform === 'win32') issues.push('No virtual audio cable found (install VB-CABLE from https://vb-audio.com/Cable/ or choco install vb-cable)');
|
|
809
|
-
}
|
|
810
|
-
if (!setup.hasSox) {
|
|
811
|
-
if (setup.platform === 'darwin') issues.push('sox not found (install: brew install sox)');
|
|
812
|
-
else if (setup.platform === 'linux') issues.push('sox not found (install: sudo apt install sox)');
|
|
813
|
-
else if (setup.platform === 'win32') issues.push('sox not found (install: choco install sox.portable or winget install sox.sox)');
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
const defaultDevice = setup.platform === 'darwin' ? 'BlackHole 2ch'
|
|
817
|
-
: setup.platform === 'win32' ? 'CABLE Input (VB-Audio Virtual Cable)' : 'virtual';
|
|
818
|
-
|
|
819
|
-
return jsonResult({
|
|
820
|
-
action: 'meeting_audio_setup',
|
|
821
|
-
ready: issues.length === 0,
|
|
822
|
-
issues,
|
|
823
|
-
platform: setup.platform,
|
|
824
|
-
hasElevenLabsKey: !!apiKey,
|
|
825
|
-
hasVirtualAudio: setup.hasBlackHole,
|
|
826
|
-
hasSox: setup.hasSox,
|
|
827
|
-
audioDevices: setup.devices,
|
|
828
|
-
configuredVoice: config.voiceName || config.voiceId || 'rachel (default)',
|
|
829
|
-
configuredDevice: config.audioDevice || `${defaultDevice} (default)`,
|
|
830
|
-
availableVoices: Object.keys(DEFAULT_VOICES),
|
|
831
|
-
setupInstructions: issues.length > 0 ? [
|
|
832
|
-
'macOS: brew install blackhole-2ch sox',
|
|
833
|
-
'Linux: sudo apt install pulseaudio-utils sox && pactl load-module module-null-sink sink_name=virtual',
|
|
834
|
-
'Windows: choco install sox.portable vb-cable (or winget install sox.sox + VB-CABLE from vb-audio.com)',
|
|
835
|
-
'Then add ElevenLabs API key in Dashboard → Settings → Integrations',
|
|
836
|
-
'Optionally select a voice in agent profile → Personal Details → Voice',
|
|
837
|
-
] : ['All good — meeting voice is ready to use.'],
|
|
838
|
-
});
|
|
839
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
840
|
-
},
|
|
841
|
-
},
|
|
842
|
-
|
|
843
|
-
// ─── List Available Voices ──────────────────────────
|
|
844
|
-
{
|
|
845
|
-
name: 'meeting_voices',
|
|
846
|
-
description: 'List available ElevenLabs voices for meeting speech. Shows built-in voices and optionally fetches your custom voices from ElevenLabs.',
|
|
847
|
-
category: 'utility' as const,
|
|
848
|
-
parameters: {
|
|
849
|
-
type: 'object' as const,
|
|
850
|
-
properties: {
|
|
851
|
-
includeCustom: { type: 'string', description: '"true" to fetch custom voices from your ElevenLabs account' },
|
|
852
|
-
},
|
|
853
|
-
required: [],
|
|
854
|
-
},
|
|
855
|
-
async execute(_id: string, params: any) {
|
|
856
|
-
try {
|
|
857
|
-
const builtIn = Object.entries(DEFAULT_VOICES).map(([name, id]) => ({ name, id, source: 'built-in' }));
|
|
858
|
-
|
|
859
|
-
if (params.includeCustom === 'true') {
|
|
860
|
-
const apiKey = await getApiKey();
|
|
861
|
-
if (!apiKey) return jsonResult({ voices: builtIn, note: 'Add ElevenLabs key in Dashboard → Settings → Integrations to see custom voices' });
|
|
862
|
-
|
|
863
|
-
try {
|
|
864
|
-
const res = await fetch(`${ELEVENLABS_BASE}/voices`, {
|
|
865
|
-
headers: { 'xi-api-key': apiKey },
|
|
866
|
-
});
|
|
867
|
-
if (res.ok) {
|
|
868
|
-
const data = await res.json() as any;
|
|
869
|
-
const custom = (data.voices || []).map((v: any) => ({
|
|
870
|
-
name: v.name,
|
|
871
|
-
id: v.voice_id,
|
|
872
|
-
category: v.category,
|
|
873
|
-
source: 'elevenlabs',
|
|
874
|
-
}));
|
|
875
|
-
return jsonResult({ voices: [...builtIn, ...custom] });
|
|
876
|
-
}
|
|
877
|
-
} catch {}
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
return jsonResult({ voices: builtIn, currentVoice: config.voiceName || config.voiceId || 'rachel' });
|
|
881
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
882
|
-
},
|
|
883
|
-
},
|
|
884
|
-
];
|
|
885
|
-
}
|