@agenticmail/enterprise 0.5.327 → 0.5.329
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/agent-tools-F3CYENMK.js +13949 -0
- package/dist/browser-tool-P57PLVW2.js +4002 -0
- package/dist/chunk-3RI3AIJN.js +1519 -0
- package/dist/chunk-AD4DFKHR.js +4928 -0
- package/dist/chunk-UQXPVWXG.js +5101 -0
- package/dist/cli-agent-K6UFZRXC.js +2473 -0
- package/dist/cli-serve-4MT7RDEL.js +260 -0
- package/dist/cli.js +3 -3
- package/dist/dashboard/app.js +1 -1
- package/dist/dashboard/components/transport-encryption.js +0 -62
- package/dist/dashboard/pages/agent-detail/index.js +5 -2
- package/dist/dashboard/pages/agent-detail/manager.js +1 -1
- package/dist/dashboard/pages/agent-detail/overview.js +4 -2
- package/dist/dashboard/pages/agent-detail/tool-security.js +1 -1
- package/dist/dashboard/pages/domain-status.js +3 -6
- package/dist/dashboard/pages/memory-transfer.js +1 -1
- package/dist/dashboard/pages/messages.js +0 -1
- package/dist/dashboard/pages/roles.js +0 -2
- package/dist/dashboard/pages/workforce.js +0 -1
- package/dist/index.js +3 -3
- package/dist/runtime-L5ADJORP.js +45 -0
- package/dist/server-KSN56EZQ.js +28 -0
- package/dist/setup-UUNBBOQH.js +20 -0
- package/logs/cloudflared-error.log +42 -0
- package/logs/enterprise-out.log +6 -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/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
- /package/{src → dist}/dashboard/HELP-TOOLTIPS-GUIDE.md +0 -0
|
@@ -1,1094 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Meeting Tools
|
|
3
|
-
*
|
|
4
|
-
* Tools for detecting, managing, and joining meetings.
|
|
5
|
-
* Uses Playwright browser automation for Google Meet interaction.
|
|
6
|
-
*
|
|
7
|
-
* KEY DESIGN:
|
|
8
|
-
* - aria-label selectors (most stable for Google Meet's changing DOM)
|
|
9
|
-
* - MeetingMonitor for real-time caption/chat streaming (no manual polling)
|
|
10
|
-
* - Robust chat sending with multiple fallback strategies
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type { AnyAgentTool, ToolCreationOptions } from '../../types.js';
|
|
14
|
-
import { jsonResult, errorResult } from '../../common.js';
|
|
15
|
-
import type { GoogleToolsConfig } from './index.js';
|
|
16
|
-
import { ensureBrowser as _ensureBrowser } from '../browser.js';
|
|
17
|
-
export const ensureBrowser = _ensureBrowser;
|
|
18
|
-
import { MeetingMonitor, registerMonitor, getActiveMonitor, removeMonitor } from '../../../engine/meeting-monitor.js';
|
|
19
|
-
import { voiceCapability } from './meeting-voice.js';
|
|
20
|
-
import * as path from 'node:path';
|
|
21
|
-
import * as os from 'node:os';
|
|
22
|
-
import { promises as fs } from 'node:fs';
|
|
23
|
-
|
|
24
|
-
const CALENDAR_BASE = 'https://www.googleapis.com/calendar/v3';
|
|
25
|
-
|
|
26
|
-
async function calendarApi(token: string, path: string, opts?: { method?: string; body?: any; query?: Record<string, string> }): Promise<any> {
|
|
27
|
-
const url = new URL(CALENDAR_BASE + path);
|
|
28
|
-
if (opts?.query) for (const [k, v] of Object.entries(opts.query)) { if (v) url.searchParams.set(k, v); }
|
|
29
|
-
const res = await fetch(url.toString(), {
|
|
30
|
-
method: opts?.method || 'GET',
|
|
31
|
-
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
32
|
-
body: opts?.body ? JSON.stringify(opts.body) : undefined,
|
|
33
|
-
});
|
|
34
|
-
if (!res.ok) throw new Error(`Calendar API ${res.status}: ${await res.text()}`);
|
|
35
|
-
return res.json();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function extractMeetingLink(event: any): { platform: string; url: string } | null {
|
|
39
|
-
if (event.conferenceData?.entryPoints) {
|
|
40
|
-
for (const ep of event.conferenceData.entryPoints) {
|
|
41
|
-
if (ep.entryPointType === 'video' && ep.uri) return { platform: 'google_meet', url: ep.uri };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (event.hangoutLink) return { platform: 'google_meet', url: event.hangoutLink };
|
|
45
|
-
const text = [event.description || '', event.location || ''].join(' ');
|
|
46
|
-
const zoomMatch = text.match(/https:\/\/[\w.-]*zoom\.us\/[jw]\/[\d?=&\w]+/i);
|
|
47
|
-
if (zoomMatch) return { platform: 'zoom', url: zoomMatch[0] };
|
|
48
|
-
const teamsMatch = text.match(/https:\/\/teams\.microsoft\.com\/l\/meetup-join\/[^\s"<>]+/i);
|
|
49
|
-
if (teamsMatch) return { platform: 'teams', url: teamsMatch[0] };
|
|
50
|
-
const genericMeet = text.match(/https:\/\/meet\.google\.com\/[a-z-]+/i);
|
|
51
|
-
if (genericMeet) return { platform: 'google_meet', url: genericMeet[0] };
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function parseEventTime(event: any): { start: Date; end: Date } | null {
|
|
56
|
-
const startStr = event.start?.dateTime || event.start?.date;
|
|
57
|
-
const endStr = event.end?.dateTime || event.end?.date;
|
|
58
|
-
if (!startStr) return null;
|
|
59
|
-
return {
|
|
60
|
-
start: new Date(startStr),
|
|
61
|
-
end: endStr ? new Date(endStr) : new Date(new Date(startStr).getTime() + 3600000),
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function delay(ms: number) { return new Promise(r => setTimeout(r, ms)); }
|
|
66
|
-
|
|
67
|
-
async function saveScreenshot(page: any): Promise<{ path: string; base64: string }> {
|
|
68
|
-
const buf = await page.screenshot({ type: 'png', fullPage: false });
|
|
69
|
-
const dir = path.join(os.tmpdir(), 'agenticmail-screenshots');
|
|
70
|
-
await fs.mkdir(dir, { recursive: true });
|
|
71
|
-
const file = `meeting-${Date.now()}.png`;
|
|
72
|
-
const filePath = path.join(dir, file);
|
|
73
|
-
await fs.writeFile(filePath, buf);
|
|
74
|
-
return { path: filePath, base64: buf.toString('base64') };
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async function ariaClick(page: any, labels: string[], timeout = 5000): Promise<boolean> {
|
|
78
|
-
for (const label of labels) {
|
|
79
|
-
try { await page.click(`[aria-label*="${label}" i]`, { timeout }); return true; } catch {}
|
|
80
|
-
}
|
|
81
|
-
for (const label of labels) {
|
|
82
|
-
try { await page.getByRole('button', { name: new RegExp(label, 'i') }).click({ timeout: 2000 }); return true; } catch {}
|
|
83
|
-
}
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async function readCaptionsFromDOM(page: any): Promise<{ speaker: string; text: string }[]> {
|
|
88
|
-
return page.evaluate(() => {
|
|
89
|
-
const region = document.querySelector('[aria-label="Captions"]');
|
|
90
|
-
if (region) {
|
|
91
|
-
const entries: { speaker: string; text: string }[] = [];
|
|
92
|
-
const children = region.querySelectorAll(':scope > div');
|
|
93
|
-
for (const child of children) {
|
|
94
|
-
const divs = child.querySelectorAll(':scope > div');
|
|
95
|
-
if (divs.length >= 2) {
|
|
96
|
-
entries.push({ speaker: divs[0].textContent?.trim() || '', text: divs[1].textContent?.trim() || '' });
|
|
97
|
-
} else if (child.textContent?.trim()) {
|
|
98
|
-
entries.push({ speaker: '', text: child.textContent.trim() });
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (entries.length > 0) return entries;
|
|
102
|
-
}
|
|
103
|
-
const container = document.querySelector('.a4cQT');
|
|
104
|
-
if (container) {
|
|
105
|
-
const allText = (container as HTMLElement).innerText || '';
|
|
106
|
-
const lines = allText.split('\n').filter((l: string) =>
|
|
107
|
-
l.trim().length > 0 && !l.includes('BETA') && !l.includes('caption') &&
|
|
108
|
-
!l.includes('Font size') && !l.includes('Font color') && l.trim().length < 500
|
|
109
|
-
);
|
|
110
|
-
if (lines.length > 0) return [{ speaker: '', text: lines.join(' ') }];
|
|
111
|
-
}
|
|
112
|
-
return [];
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Robust chat message sending for Google Meet.
|
|
118
|
-
* Tries multiple strategies because Meet's chat input is a React-controlled element.
|
|
119
|
-
* For long messages, splits into chunks to avoid garbled text from keyboard.type().
|
|
120
|
-
*/
|
|
121
|
-
export async function sendChatMessage(page: any, message: string): Promise<{ sent: boolean; method: string; error?: string }> {
|
|
122
|
-
// Google Meet chat has a character limit (~500 chars). Split long messages into chunks.
|
|
123
|
-
const MAX_CHUNK = 450;
|
|
124
|
-
if (message.length > MAX_CHUNK) {
|
|
125
|
-
const chunks = splitMessageIntoChunks(message, MAX_CHUNK);
|
|
126
|
-
let allSent = true;
|
|
127
|
-
let lastMethod = '';
|
|
128
|
-
for (let i = 0; i < chunks.length; i++) {
|
|
129
|
-
const prefix = chunks.length > 1 ? `(${i + 1}/${chunks.length}) ` : '';
|
|
130
|
-
const result = await sendChatMessage(page, prefix + chunks[i]);
|
|
131
|
-
if (!result.sent) {
|
|
132
|
-
return { sent: false, method: result.method, error: `Failed on chunk ${i + 1}/${chunks.length}: ${result.error}` };
|
|
133
|
-
}
|
|
134
|
-
lastMethod = result.method;
|
|
135
|
-
if (i < chunks.length - 1) await delay(800); // pause between chunks
|
|
136
|
-
}
|
|
137
|
-
return { sent: allSent, method: `chunked (${chunks.length}x) via ${lastMethod}` };
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// ─── Open chat panel if needed ───
|
|
141
|
-
try {
|
|
142
|
-
const chatOpen = await page.evaluate(() => {
|
|
143
|
-
const panel = document.querySelector('[aria-label="Side panel"]');
|
|
144
|
-
if (!panel) return false;
|
|
145
|
-
const text = (panel as HTMLElement).innerText || '';
|
|
146
|
-
return text.includes('In-call messages') || text.includes('Send a message');
|
|
147
|
-
});
|
|
148
|
-
if (!chatOpen) {
|
|
149
|
-
const clicked = await ariaClick(page, ['Chat with everyone', 'Open chat'], 3000);
|
|
150
|
-
if (!clicked) {
|
|
151
|
-
await page.keyboard.press('d');
|
|
152
|
-
}
|
|
153
|
-
await delay(1500);
|
|
154
|
-
}
|
|
155
|
-
} catch {}
|
|
156
|
-
|
|
157
|
-
// ─── Find chat input ───
|
|
158
|
-
const selectors = [
|
|
159
|
-
'textarea[aria-label*="Send a message" i]',
|
|
160
|
-
'input[aria-label*="Send a message" i]',
|
|
161
|
-
'[aria-label*="Send a message" i][contenteditable]',
|
|
162
|
-
'textarea[placeholder*="Send" i]',
|
|
163
|
-
'[data-is-persistent="true"] textarea',
|
|
164
|
-
];
|
|
165
|
-
|
|
166
|
-
for (const selector of selectors) {
|
|
167
|
-
try {
|
|
168
|
-
const el = page.locator(selector).first();
|
|
169
|
-
const visible = await el.isVisible({ timeout: 2000 }).catch(() => false);
|
|
170
|
-
if (!visible) continue;
|
|
171
|
-
|
|
172
|
-
// Click to focus
|
|
173
|
-
await el.click({ timeout: 2000 });
|
|
174
|
-
await delay(200);
|
|
175
|
-
|
|
176
|
-
// Clear any existing text
|
|
177
|
-
await page.keyboard.press('Control+a');
|
|
178
|
-
await delay(100);
|
|
179
|
-
await page.keyboard.press('Backspace');
|
|
180
|
-
await delay(100);
|
|
181
|
-
|
|
182
|
-
// Strategy A: execCommand insertText (reliable, no clipboard dependency)
|
|
183
|
-
try {
|
|
184
|
-
const inserted = await page.evaluate((text: string) => {
|
|
185
|
-
const active = document.activeElement as HTMLTextAreaElement | HTMLInputElement;
|
|
186
|
-
if (active && ('value' in active)) {
|
|
187
|
-
const setter = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, 'value')?.set
|
|
188
|
-
|| Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set;
|
|
189
|
-
if (setter) {
|
|
190
|
-
setter.call(active, text);
|
|
191
|
-
active.dispatchEvent(new Event('input', { bubbles: true }));
|
|
192
|
-
active.dispatchEvent(new Event('change', { bubbles: true }));
|
|
193
|
-
return true;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
// contenteditable fallback
|
|
197
|
-
return document.execCommand('insertText', false, text);
|
|
198
|
-
}, message);
|
|
199
|
-
if (!inserted) throw new Error('insertText returned false');
|
|
200
|
-
await delay(300);
|
|
201
|
-
} catch {
|
|
202
|
-
// Strategy B: Clipboard paste (write + paste atomically via page context)
|
|
203
|
-
try {
|
|
204
|
-
await page.evaluate(async (text: string) => {
|
|
205
|
-
await navigator.clipboard.writeText(text);
|
|
206
|
-
}, message);
|
|
207
|
-
const isMac = process.platform === 'darwin';
|
|
208
|
-
await page.keyboard.press(isMac ? 'Meta+v' : 'Control+v');
|
|
209
|
-
await delay(300);
|
|
210
|
-
} catch {
|
|
211
|
-
// Last resort: keyboard.type — only for short messages
|
|
212
|
-
if (message.length <= 100) {
|
|
213
|
-
await page.keyboard.type(message, { delay: 20 });
|
|
214
|
-
await delay(300);
|
|
215
|
-
} else {
|
|
216
|
-
continue; // skip this selector, try next
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// Send with Enter
|
|
222
|
-
await page.keyboard.press('Enter');
|
|
223
|
-
await delay(500);
|
|
224
|
-
|
|
225
|
-
// Verify: check if input is now empty (message was sent)
|
|
226
|
-
const inputEmpty = await el.inputValue().then((v: string) => v.trim() === '').catch(() => true);
|
|
227
|
-
if (inputEmpty) {
|
|
228
|
-
return { sent: true, method: `paste + selector: ${selector}` };
|
|
229
|
-
}
|
|
230
|
-
} catch {}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
return { sent: false, method: 'all strategies failed', error: 'Could not find or interact with the chat input. Try meeting_action(action: "screenshot") to see the current state.' };
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Split a long message into chunks, breaking at sentence/paragraph boundaries where possible.
|
|
238
|
-
*/
|
|
239
|
-
function splitMessageIntoChunks(text: string, maxLen: number): string[] {
|
|
240
|
-
const chunks: string[] = [];
|
|
241
|
-
let remaining = text;
|
|
242
|
-
while (remaining.length > maxLen) {
|
|
243
|
-
// Try to break at sentence boundary
|
|
244
|
-
let breakIdx = -1;
|
|
245
|
-
for (const sep of ['\n\n', '\n', '. ', '! ', '? ', ', ']) {
|
|
246
|
-
const idx = remaining.lastIndexOf(sep, maxLen);
|
|
247
|
-
if (idx > maxLen * 0.3) { // don't break too early
|
|
248
|
-
breakIdx = idx + sep.length;
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (breakIdx <= 0) breakIdx = maxLen; // hard break
|
|
253
|
-
chunks.push(remaining.slice(0, breakIdx).trim());
|
|
254
|
-
remaining = remaining.slice(breakIdx).trim();
|
|
255
|
-
}
|
|
256
|
-
if (remaining) chunks.push(remaining);
|
|
257
|
-
return chunks;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Configure audio input device for meeting voice.
|
|
262
|
-
* Sets BlackHole (macOS), virtual sink (Linux), or VB-CABLE (Windows)
|
|
263
|
-
* as the system default input so Meet picks it up as the microphone.
|
|
264
|
-
*/
|
|
265
|
-
async function configureAudioInput(): Promise<{ configured: boolean; device?: string; error?: string }> {
|
|
266
|
-
const { exec: execCb } = await import('child_process');
|
|
267
|
-
const { promisify } = await import('util');
|
|
268
|
-
const exec = promisify(execCb);
|
|
269
|
-
const platform = process.platform;
|
|
270
|
-
|
|
271
|
-
try {
|
|
272
|
-
if (platform === 'darwin') {
|
|
273
|
-
// Check if BlackHole is available as input
|
|
274
|
-
const { stdout: inputs } = await exec('SwitchAudioSource -a -t input 2>/dev/null');
|
|
275
|
-
if (inputs.includes('BlackHole')) {
|
|
276
|
-
await exec('SwitchAudioSource -t input -s "BlackHole 2ch"');
|
|
277
|
-
console.log('[audio] ✅ Set system audio input to BlackHole 2ch');
|
|
278
|
-
return { configured: true, device: 'BlackHole 2ch' };
|
|
279
|
-
}
|
|
280
|
-
return { configured: false, error: 'BlackHole not found as input device' };
|
|
281
|
-
} else if (platform === 'linux') {
|
|
282
|
-
// Set PulseAudio virtual source as default
|
|
283
|
-
try {
|
|
284
|
-
const { stdout } = await exec('pactl list short sources 2>/dev/null');
|
|
285
|
-
const virtualSource = stdout.split('\n').find((l: string) => /virtual|null/.test(l));
|
|
286
|
-
if (virtualSource) {
|
|
287
|
-
const sourceName = virtualSource.split('\t')[1];
|
|
288
|
-
await exec(`pactl set-default-source ${sourceName}`);
|
|
289
|
-
console.log(`[audio] ✅ Set PulseAudio default source to ${sourceName}`);
|
|
290
|
-
return { configured: true, device: sourceName };
|
|
291
|
-
}
|
|
292
|
-
} catch {}
|
|
293
|
-
return { configured: false, error: 'No virtual audio source found' };
|
|
294
|
-
} else if (platform === 'win32') {
|
|
295
|
-
// On Windows, try nircmd to set VB-CABLE as default recording device
|
|
296
|
-
try {
|
|
297
|
-
await exec('nircmd setdefaultsounddevice "CABLE Output" 2');
|
|
298
|
-
console.log('[audio] ✅ Set default recording device to VB-CABLE');
|
|
299
|
-
return { configured: true, device: 'CABLE Output (VB-Audio)' };
|
|
300
|
-
} catch {
|
|
301
|
-
return { configured: false, error: 'Could not set VB-CABLE as default input' };
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
return { configured: false, error: `Unsupported platform: ${platform}` };
|
|
305
|
-
} catch (e: any) {
|
|
306
|
-
return { configured: false, error: e.message };
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
async function joinGoogleMeet(page: any, url: string) {
|
|
311
|
-
// Configure virtual audio device as system microphone input BEFORE joining
|
|
312
|
-
const audioConfig = await configureAudioInput();
|
|
313
|
-
if (audioConfig.configured) {
|
|
314
|
-
console.log(`[meeting-join] Audio input configured: ${audioConfig.device}`);
|
|
315
|
-
} else {
|
|
316
|
-
console.warn(`[meeting-join] Audio input not configured: ${audioConfig.error}`);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
await page.goto(url, { timeout: 60000, waitUntil: 'domcontentloaded' });
|
|
320
|
-
await delay(2000);
|
|
321
|
-
|
|
322
|
-
// Dismiss dialogs
|
|
323
|
-
for (let i = 0; i < 3; i++) {
|
|
324
|
-
const dismissed = await ariaClick(page, ['Close'], 1500);
|
|
325
|
-
if (!dismissed) break;
|
|
326
|
-
await delay(300);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// Click join
|
|
330
|
-
const joined = await ariaClick(page, ['Ask to join', 'Join now', 'Join'], 10000);
|
|
331
|
-
if (!joined) {
|
|
332
|
-
const screenshot = await saveScreenshot(page);
|
|
333
|
-
return { joined: false, error: 'Could not find Join button.', screenshot: screenshot.path, screenshotBase64: screenshot.base64 };
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
await delay(3000);
|
|
337
|
-
|
|
338
|
-
const state = await page.evaluate(() => {
|
|
339
|
-
const text = document.body.innerText || '';
|
|
340
|
-
if (text.includes('Please wait until a meeting host')) return 'waiting_room';
|
|
341
|
-
if (text.includes('You have joined the call') || text.includes('Leave call')) return 'in_call';
|
|
342
|
-
if (text.includes('Ask to join')) return 'pre_join';
|
|
343
|
-
return 'unknown';
|
|
344
|
-
});
|
|
345
|
-
|
|
346
|
-
const screenshot = await saveScreenshot(page);
|
|
347
|
-
return {
|
|
348
|
-
joined: state === 'in_call' || state === 'waiting_room',
|
|
349
|
-
state,
|
|
350
|
-
url: page.url(),
|
|
351
|
-
screenshot: screenshot.path,
|
|
352
|
-
screenshotBase64: screenshot.base64,
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
export function createMeetingTools(config: GoogleToolsConfig, _options?: ToolCreationOptions): AnyAgentTool[] {
|
|
358
|
-
const tp = config.tokenProvider;
|
|
359
|
-
const agentId = (_options as any)?.agentId || 'default';
|
|
360
|
-
const runtimeRef = (_options as any)?.runtimeRef;
|
|
361
|
-
|
|
362
|
-
return [
|
|
363
|
-
// ─── Upcoming Meetings ─────────────────────────────
|
|
364
|
-
{
|
|
365
|
-
name: 'meetings_upcoming',
|
|
366
|
-
description: 'List upcoming meetings with join links, times, and attendees from Google Calendar.',
|
|
367
|
-
category: 'utility' as const,
|
|
368
|
-
parameters: {
|
|
369
|
-
type: 'object' as const,
|
|
370
|
-
properties: {
|
|
371
|
-
hours: { type: 'number', description: 'Look ahead this many hours (default: 24)' },
|
|
372
|
-
calendarId: { type: 'string', description: 'Calendar ID (default: "primary")' },
|
|
373
|
-
includeDeclined: { type: 'string', description: '"true" to include declined meetings' },
|
|
374
|
-
},
|
|
375
|
-
required: [],
|
|
376
|
-
},
|
|
377
|
-
async execute(_id: string, params: any) {
|
|
378
|
-
try {
|
|
379
|
-
const token = await tp.getAccessToken();
|
|
380
|
-
const hours = params.hours || 24;
|
|
381
|
-
const now = new Date();
|
|
382
|
-
const later = new Date(now.getTime() + hours * 3600000);
|
|
383
|
-
const calendarId = params.calendarId || 'primary';
|
|
384
|
-
|
|
385
|
-
const data = await calendarApi(token, `/calendars/${encodeURIComponent(calendarId)}/events`, {
|
|
386
|
-
query: {
|
|
387
|
-
timeMin: now.toISOString(),
|
|
388
|
-
timeMax: later.toISOString(),
|
|
389
|
-
singleEvents: 'true',
|
|
390
|
-
orderBy: 'startTime',
|
|
391
|
-
maxResults: '50',
|
|
392
|
-
},
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
const meetings = (data.items || [])
|
|
396
|
-
.map((event: any) => {
|
|
397
|
-
const times = parseEventTime(event);
|
|
398
|
-
const meetingLink = extractMeetingLink(event);
|
|
399
|
-
const myStatus = (event.attendees || []).find((a: any) => a.self)?.responseStatus;
|
|
400
|
-
if (params.includeDeclined !== 'true' && myStatus === 'declined') return null;
|
|
401
|
-
return {
|
|
402
|
-
id: event.id,
|
|
403
|
-
title: event.summary,
|
|
404
|
-
start: times?.start?.toISOString(),
|
|
405
|
-
end: times?.end?.toISOString(),
|
|
406
|
-
startsIn: times ? Math.round((times.start.getTime() - now.getTime()) / 60000) + ' minutes' : null,
|
|
407
|
-
isNow: times ? now >= times.start && now <= times.end : false,
|
|
408
|
-
meetingLink: meetingLink?.url || null,
|
|
409
|
-
platform: meetingLink?.platform || null,
|
|
410
|
-
organizer: event.organizer?.email,
|
|
411
|
-
attendees: (event.attendees || []).map((a: any) => ({
|
|
412
|
-
email: a.email, name: a.displayName, status: a.responseStatus, self: a.self || false,
|
|
413
|
-
})),
|
|
414
|
-
myStatus,
|
|
415
|
-
description: event.description?.slice(0, 500),
|
|
416
|
-
location: event.location,
|
|
417
|
-
};
|
|
418
|
-
})
|
|
419
|
-
.filter(Boolean);
|
|
420
|
-
|
|
421
|
-
return jsonResult({
|
|
422
|
-
meetings,
|
|
423
|
-
total: meetings.length,
|
|
424
|
-
withMeetingLinks: meetings.filter((m: any) => m.meetingLink).length,
|
|
425
|
-
happeningNow: meetings.filter((m: any) => m.isNow).length,
|
|
426
|
-
nextMeeting: meetings[0] || null,
|
|
427
|
-
});
|
|
428
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
|
-
|
|
432
|
-
// ─── Join Meeting ──────────────────────────────────
|
|
433
|
-
{
|
|
434
|
-
name: 'meeting_join',
|
|
435
|
-
description: `Join a Google Meet video meeting. After joining:
|
|
436
|
-
- Captions are auto-enabled
|
|
437
|
-
- A MeetingMonitor starts streaming captions and chat to you in real-time
|
|
438
|
-
- You will receive "[Meeting Monitor — Live Update]" messages with new captions/chat
|
|
439
|
-
- When someone talks to you, respond using meeting_action(action: "chat", message: "...")
|
|
440
|
-
- You do NOT need to manually poll for captions — they come to you automatically
|
|
441
|
-
- The monitor will tell you when the meeting ends`,
|
|
442
|
-
category: 'utility' as const,
|
|
443
|
-
parameters: {
|
|
444
|
-
type: 'object' as const,
|
|
445
|
-
properties: {
|
|
446
|
-
url: { type: 'string', description: 'Meeting URL (Google Meet link)' },
|
|
447
|
-
eventId: { type: 'string', description: 'Google Calendar event ID — will auto-extract the meeting link' },
|
|
448
|
-
},
|
|
449
|
-
required: [],
|
|
450
|
-
},
|
|
451
|
-
async execute(_id: string, params: any) {
|
|
452
|
-
try {
|
|
453
|
-
const token = await tp.getAccessToken();
|
|
454
|
-
let meetingUrl = params.url;
|
|
455
|
-
|
|
456
|
-
if (!meetingUrl && params.eventId) {
|
|
457
|
-
const event = await calendarApi(token, `/calendars/primary/events/${params.eventId}`);
|
|
458
|
-
const link = extractMeetingLink(event);
|
|
459
|
-
if (!link) return errorResult('No meeting link found in calendar event: ' + (event.summary || params.eventId));
|
|
460
|
-
meetingUrl = link.url;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
if (!meetingUrl) return errorResult('No meeting URL provided. Pass url or eventId.');
|
|
464
|
-
|
|
465
|
-
// Launch browser
|
|
466
|
-
const { page } = await ensureBrowser(false, agentId, false);
|
|
467
|
-
const result = await joinGoogleMeet(page, meetingUrl);
|
|
468
|
-
|
|
469
|
-
if (result.joined) {
|
|
470
|
-
// For in_call: enable captions + open chat + send intro immediately
|
|
471
|
-
// For waiting_room: just start the monitor (it will detect admission)
|
|
472
|
-
if (result.state === 'in_call' || result.state === 'unknown') {
|
|
473
|
-
try {
|
|
474
|
-
await page.keyboard.press('c'); // enable captions
|
|
475
|
-
await delay(1000);
|
|
476
|
-
} catch {}
|
|
477
|
-
try {
|
|
478
|
-
await page.keyboard.press('d'); // open chat panel
|
|
479
|
-
await delay(1500);
|
|
480
|
-
// Only send chat intro if voice is NOT available — voice intro handles it
|
|
481
|
-
const voiceConfig = (_options as any)?.voiceConfig || {};
|
|
482
|
-
if (!voiceConfig.voiceId) {
|
|
483
|
-
const chatResult = await sendChatMessage(page, `Hi, I'm joining to take notes. I'll communicate via chat.`);
|
|
484
|
-
console.log(`[meeting-join:${agentId}] Intro chat: ${chatResult.sent ? 'sent' : 'failed'} (${chatResult.method})`);
|
|
485
|
-
}
|
|
486
|
-
} catch {}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// ─── Start MeetingMonitor (only when in-call, NOT in waiting room) ───
|
|
490
|
-
if (runtimeRef?.sendMessage && runtimeRef?.getCurrentSessionId) {
|
|
491
|
-
const sessionId = runtimeRef.getCurrentSessionId();
|
|
492
|
-
if (sessionId) {
|
|
493
|
-
// Mark session as keep-alive BEFORE starting monitor
|
|
494
|
-
if (runtimeRef.setKeepAlive) {
|
|
495
|
-
runtimeRef.setKeepAlive(sessionId, true);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
// Helper to start the monitor (reused for immediate start and after admission)
|
|
499
|
-
const startMonitor = async () => {
|
|
500
|
-
const monitor = new MeetingMonitor({
|
|
501
|
-
page,
|
|
502
|
-
agentId,
|
|
503
|
-
sessionId,
|
|
504
|
-
sendMessage: runtimeRef.sendMessage,
|
|
505
|
-
flushIntervalMs: 2_500,
|
|
506
|
-
sendChatIndicator: async (p: any, text: string) => {
|
|
507
|
-
try { await sendChatMessage(p, text); } catch {}
|
|
508
|
-
},
|
|
509
|
-
onMeetingEnd: () => {
|
|
510
|
-
console.log(`[meeting-join:${agentId}] Monitor detected meeting end`);
|
|
511
|
-
removeMonitor(agentId);
|
|
512
|
-
if (runtimeRef.setKeepAlive) {
|
|
513
|
-
runtimeRef.setKeepAlive(sessionId, false);
|
|
514
|
-
}
|
|
515
|
-
},
|
|
516
|
-
});
|
|
517
|
-
registerMonitor(agentId, monitor);
|
|
518
|
-
await monitor.start();
|
|
519
|
-
console.log(`[meeting-join:${agentId}] ✅ MeetingMonitor started for session ${sessionId}, keep-alive ON`);
|
|
520
|
-
};
|
|
521
|
-
|
|
522
|
-
if (result.state === 'in_call' || result.state === 'unknown') {
|
|
523
|
-
// Already in the call — start monitor immediately
|
|
524
|
-
await startMonitor();
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
// If in waiting room, DON'T start the monitor yet — wait for admission
|
|
528
|
-
if (result.state === 'waiting_room') {
|
|
529
|
-
console.log(`[meeting-join:${agentId}] In waiting room — monitor will start after admission`);
|
|
530
|
-
const admissionWatcher = setInterval(async () => {
|
|
531
|
-
try {
|
|
532
|
-
const currentState = await page.evaluate(() => {
|
|
533
|
-
const text = document.body.innerText || '';
|
|
534
|
-
if (text.includes('Please wait until a meeting host')) return 'waiting_room';
|
|
535
|
-
if (text.includes('Leave call')) return 'in_call';
|
|
536
|
-
if (text.includes("You've left the meeting") || text.includes('Call ended')) return 'ended';
|
|
537
|
-
return 'unknown';
|
|
538
|
-
});
|
|
539
|
-
if (currentState === 'in_call' || currentState === 'unknown') {
|
|
540
|
-
clearInterval(admissionWatcher);
|
|
541
|
-
console.log(`[meeting-join:${agentId}] ✅ Admitted to meeting!`);
|
|
542
|
-
// Enable captions
|
|
543
|
-
try { await page.keyboard.press('c'); await delay(1000); } catch {}
|
|
544
|
-
// Open chat (skip intro message when voice is available)
|
|
545
|
-
try {
|
|
546
|
-
await page.keyboard.press('d');
|
|
547
|
-
await delay(1500);
|
|
548
|
-
const voiceConfig = (_options as any)?.voiceConfig || {};
|
|
549
|
-
if (!voiceConfig.voiceId) {
|
|
550
|
-
await sendChatMessage(page, `Hi, I'm joining to take notes. I'll communicate via chat.`);
|
|
551
|
-
}
|
|
552
|
-
} catch {}
|
|
553
|
-
// NOW start the monitor (safe — no concurrent loop issue)
|
|
554
|
-
try { await startMonitor(); } catch (e: any) {
|
|
555
|
-
console.error(`[meeting-join:${agentId}] Failed to start monitor after admission: ${e.message}`);
|
|
556
|
-
}
|
|
557
|
-
// Notify the agent session
|
|
558
|
-
try {
|
|
559
|
-
await runtimeRef.sendMessage(sessionId,
|
|
560
|
-
`[Meeting Monitor] You have been admitted to the meeting! Captions are now enabled. Chat panel is open. You will start receiving live updates.`
|
|
561
|
-
);
|
|
562
|
-
} catch {}
|
|
563
|
-
} else if (currentState === 'ended') {
|
|
564
|
-
clearInterval(admissionWatcher);
|
|
565
|
-
console.log(`[meeting-join:${agentId}] Meeting ended while in waiting room`);
|
|
566
|
-
if (runtimeRef.setKeepAlive) runtimeRef.setKeepAlive(sessionId, false);
|
|
567
|
-
}
|
|
568
|
-
} catch {
|
|
569
|
-
clearInterval(admissionWatcher);
|
|
570
|
-
}
|
|
571
|
-
}, 5000);
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
} else {
|
|
575
|
-
console.warn(`[meeting-join:${agentId}] No runtimeRef — MeetingMonitor NOT started`);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
// ─── Voice preflight (non-blocking — runs parallel with join cleanup) ───
|
|
580
|
-
let voiceStatus: any = null;
|
|
581
|
-
try {
|
|
582
|
-
const voiceConfig = (_options as any)?.voiceConfig || {};
|
|
583
|
-
const elevenLabsKeyResolver = (_options as any)?.elevenLabsKeyResolver;
|
|
584
|
-
const getApiKey = async () => {
|
|
585
|
-
if (process.env.ELEVENLABS_API_KEY) return process.env.ELEVENLABS_API_KEY;
|
|
586
|
-
if (elevenLabsKeyResolver) try { return await elevenLabsKeyResolver(); } catch { return null; }
|
|
587
|
-
return null;
|
|
588
|
-
};
|
|
589
|
-
voiceStatus = await voiceCapability.preflight(
|
|
590
|
-
agentId, getApiKey,
|
|
591
|
-
voiceConfig.voiceId, voiceConfig.voiceName, voiceConfig.audioDevice,
|
|
592
|
-
);
|
|
593
|
-
console.log(`[meeting-join:${agentId}] Voice: ${voiceStatus.mode} (${voiceStatus.available ? 'ready' : voiceStatus.issues.join(', ')})`);
|
|
594
|
-
|
|
595
|
-
// ─── Initialize Voice Intelligence (non-blocking) ───
|
|
596
|
-
if (voiceStatus?.available) {
|
|
597
|
-
const apiKey = await getApiKey();
|
|
598
|
-
console.log(`[meeting-join:${agentId}] Voice Intelligence: apiKey=${apiKey ? 'present' : 'MISSING'}`);
|
|
599
|
-
if (apiKey) {
|
|
600
|
-
const { createMeetingVoiceIntelligence } = await import('../../../engine/meeting-voice-intelligence.js');
|
|
601
|
-
console.log(`[meeting-join:${agentId}] Creating Voice Intelligence instance...`);
|
|
602
|
-
const voiceIntel = createMeetingVoiceIntelligence({
|
|
603
|
-
agentId,
|
|
604
|
-
agentName: (_options as any)?.agentName || 'AI Assistant',
|
|
605
|
-
agentAliases: (_options as any)?.agentAliases || [],
|
|
606
|
-
voiceId: voiceConfig.voiceId || voiceStatus.voiceId,
|
|
607
|
-
voiceName: voiceConfig.voiceName || voiceStatus.voiceName,
|
|
608
|
-
audioDevice: voiceConfig.audioDevice || voiceStatus.audioDevice,
|
|
609
|
-
apiKey,
|
|
610
|
-
modelSpeed: 'fast', // Assume fast model for meetings (Sonnet)
|
|
611
|
-
});
|
|
612
|
-
// Pre-generate audio bank in background (non-blocking)
|
|
613
|
-
voiceIntel.initialize().then(result => {
|
|
614
|
-
console.log(`[meeting-join:${agentId}] Voice Intelligence: ${result.generated} audio clips ready (${result.durationMs}ms)`);
|
|
615
|
-
// Voice intro disabled — let the agent speak naturally when addressed
|
|
616
|
-
}).catch(e => {
|
|
617
|
-
console.warn(`[meeting-join:${agentId}] Voice Intelligence init failed: ${e.message}`);
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
} catch (e: any) {
|
|
622
|
-
console.warn(`[meeting-join:${agentId}] Voice preflight failed: ${e.message}`);
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
const _voiceBlock = voiceStatus
|
|
626
|
-
? voiceCapability.buildPromptBlock(agentId)
|
|
627
|
-
: '\n## Voice: NOT CHECKED\nUse meeting_speak to talk — it auto-falls back to chat if voice fails.\n';
|
|
628
|
-
|
|
629
|
-
const hasVoice = voiceStatus?.available === true;
|
|
630
|
-
const monitorActive = !!getActiveMonitor(agentId);
|
|
631
|
-
|
|
632
|
-
const communicationInstructions = hasVoice
|
|
633
|
-
? 'You have a VOICE in this meeting. Use meeting_speak(text: "...") to talk out loud — participants will hear you. Use meeting_action(action: "chat", message: "...") for links/code/long text. meeting_speak auto-falls back to chat if voice fails.'
|
|
634
|
-
: 'You do NOT have a microphone. Communicate via meeting chat: meeting_action(action: "chat", message: "...").';
|
|
635
|
-
|
|
636
|
-
const joinResult = {
|
|
637
|
-
...result,
|
|
638
|
-
screenshotBase64: undefined,
|
|
639
|
-
monitorActive,
|
|
640
|
-
voiceAvailable: hasVoice,
|
|
641
|
-
voiceMode: voiceStatus?.mode || 'chat-only',
|
|
642
|
-
voiceName: voiceStatus?.voiceName || null,
|
|
643
|
-
instructions: result.joined
|
|
644
|
-
? monitorActive
|
|
645
|
-
? `You are in the meeting. A MeetingMonitor is streaming captions and chat to you automatically. ${communicationInstructions} You do NOT need to call read_captions — updates come to you.`
|
|
646
|
-
: `You are in the meeting. Captions are enabled. ${communicationInstructions} Call meeting_action(action: "read_captions") periodically to see what people are saying.`
|
|
647
|
-
: 'Join failed. Check screenshot.',
|
|
648
|
-
voiceStatusDetail: voiceStatus ? {
|
|
649
|
-
mode: voiceStatus.mode,
|
|
650
|
-
voice: voiceStatus.voiceName,
|
|
651
|
-
issues: voiceStatus.issues,
|
|
652
|
-
} : null,
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
if (result.screenshotBase64) {
|
|
656
|
-
return {
|
|
657
|
-
content: [
|
|
658
|
-
{ type: 'text', text: JSON.stringify(joinResult, null, 2) },
|
|
659
|
-
{ type: 'image', data: result.screenshotBase64, mimeType: 'image/png' },
|
|
660
|
-
],
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
return jsonResult(joinResult);
|
|
664
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
665
|
-
},
|
|
666
|
-
},
|
|
667
|
-
|
|
668
|
-
// ─── Meeting Actions ───────────────────────────────
|
|
669
|
-
{
|
|
670
|
-
name: 'meeting_action',
|
|
671
|
-
description: `Perform actions during an active Google Meet meeting:
|
|
672
|
-
- screenshot: Take a screenshot of the current meeting state
|
|
673
|
-
- read_captions: Read live captions (Note: if MeetingMonitor is active, captions come to you automatically — use this only for on-demand reads)
|
|
674
|
-
- read_chat: Read in-call chat messages
|
|
675
|
-
- chat: Send a message in the meeting chat (requires "message" param). Uses robust multi-strategy input.
|
|
676
|
-
- participants: List meeting participants
|
|
677
|
-
- toggle_captions: Turn captions on/off
|
|
678
|
-
- share_screen: Share your entire screen with meeting participants
|
|
679
|
-
- share_tab: Share a specific browser tab (optional "url" param to open a URL in a new tab and share it)
|
|
680
|
-
- stop_sharing: Stop any active screen/tab sharing
|
|
681
|
-
- leave: Leave the meeting and stop the monitor`,
|
|
682
|
-
category: 'utility' as const,
|
|
683
|
-
parameters: {
|
|
684
|
-
type: 'object' as const,
|
|
685
|
-
properties: {
|
|
686
|
-
action: { type: 'string', description: 'Action to perform' },
|
|
687
|
-
message: { type: 'string', description: 'Chat message to send (for "chat" action)' },
|
|
688
|
-
url: { type: 'string', description: 'URL to open and share (for "share_tab" action)' },
|
|
689
|
-
},
|
|
690
|
-
required: ['action'],
|
|
691
|
-
},
|
|
692
|
-
async execute(_id: string, params: any) {
|
|
693
|
-
try {
|
|
694
|
-
const action = params.action;
|
|
695
|
-
|
|
696
|
-
let page: any;
|
|
697
|
-
try {
|
|
698
|
-
const result = await ensureBrowser(false, agentId, false);
|
|
699
|
-
page = result.page;
|
|
700
|
-
} catch (err: any) {
|
|
701
|
-
return errorResult('No active browser session. Join a meeting first with meeting_join.');
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
const pageUrl = page.url() || '';
|
|
705
|
-
if (!pageUrl.includes('meet.google.com')) {
|
|
706
|
-
return errorResult(`Not on a Google Meet page (current URL: ${pageUrl}). Join a meeting first.`);
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
switch (action) {
|
|
710
|
-
case 'screenshot': {
|
|
711
|
-
const screenshot = await saveScreenshot(page);
|
|
712
|
-
return {
|
|
713
|
-
content: [
|
|
714
|
-
{ type: 'text', text: `Meeting screenshot taken.\nURL: ${pageUrl}\nSaved: ${screenshot.path}` },
|
|
715
|
-
{ type: 'image', data: screenshot.base64, mimeType: 'image/png' },
|
|
716
|
-
],
|
|
717
|
-
};
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
case 'read_captions': {
|
|
721
|
-
const captionsOn = await page.evaluate(() => !!document.querySelector('[aria-label*="Turn off captions"]'));
|
|
722
|
-
if (!captionsOn) {
|
|
723
|
-
await page.keyboard.press('c');
|
|
724
|
-
await delay(1500);
|
|
725
|
-
}
|
|
726
|
-
const captions = await readCaptionsFromDOM(page);
|
|
727
|
-
const monitor = getActiveMonitor(agentId);
|
|
728
|
-
return jsonResult({
|
|
729
|
-
action: 'read_captions',
|
|
730
|
-
captions,
|
|
731
|
-
count: captions.length,
|
|
732
|
-
captionsEnabled: true,
|
|
733
|
-
monitorActive: !!monitor,
|
|
734
|
-
note: monitor
|
|
735
|
-
? 'MeetingMonitor is active — captions are being streamed to you automatically. You only need this tool for on-demand reads.'
|
|
736
|
-
: 'No monitor active. Call this periodically to stay updated.',
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
case 'toggle_captions': {
|
|
741
|
-
await page.keyboard.press('c');
|
|
742
|
-
await delay(500);
|
|
743
|
-
const isOn = await page.evaluate(() => !!document.querySelector('[aria-label*="Turn off captions"]'));
|
|
744
|
-
return jsonResult({ action: 'toggle_captions', captionsOn: isOn });
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
case 'read_chat': {
|
|
748
|
-
await ariaClick(page, ['Chat with everyone', 'Open chat'], 3000);
|
|
749
|
-
await delay(1000);
|
|
750
|
-
const messages = await page.evaluate(() => {
|
|
751
|
-
const msgs: { sender: string; text: string }[] = [];
|
|
752
|
-
const panel = document.querySelector('[aria-label="Side panel"]') ||
|
|
753
|
-
document.querySelector('[aria-label*="In-call messages"]');
|
|
754
|
-
if (!panel) return msgs;
|
|
755
|
-
const msgEls = panel.querySelectorAll('[data-message-text]');
|
|
756
|
-
for (const el of msgEls) {
|
|
757
|
-
const text = el.getAttribute('data-message-text') || el.textContent?.trim() || '';
|
|
758
|
-
let sender = '';
|
|
759
|
-
const parent = el.closest('[class*="message"]') || (el as HTMLElement).parentElement?.parentElement;
|
|
760
|
-
if (parent) {
|
|
761
|
-
const nameEl = parent.querySelector('[class*="sender"], [class*="name"]');
|
|
762
|
-
if (nameEl) sender = nameEl.textContent?.trim() || '';
|
|
763
|
-
}
|
|
764
|
-
if (text) msgs.push({ sender, text });
|
|
765
|
-
}
|
|
766
|
-
if (msgs.length === 0) {
|
|
767
|
-
const allText = (panel as HTMLElement).innerText || '';
|
|
768
|
-
const lines = allText.split('\n').filter((l: string) =>
|
|
769
|
-
l.trim().length > 0 && l.trim() !== 'In-call messages' &&
|
|
770
|
-
!l.includes('Continuous chat') && !l.includes("Messages won't be saved") &&
|
|
771
|
-
!l.includes('No chat messages') && !l.includes('Send a message') &&
|
|
772
|
-
!l.includes('pin a message') && l.trim().length < 500
|
|
773
|
-
);
|
|
774
|
-
for (const line of lines) msgs.push({ sender: '', text: line.trim() });
|
|
775
|
-
}
|
|
776
|
-
return msgs;
|
|
777
|
-
});
|
|
778
|
-
return jsonResult({ action: 'read_chat', messages, count: messages.length });
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
case 'chat': {
|
|
782
|
-
const message = params.message;
|
|
783
|
-
if (!message) return errorResult('No message provided. Set the "message" parameter.');
|
|
784
|
-
const result = await sendChatMessage(page, message);
|
|
785
|
-
if (result.sent) {
|
|
786
|
-
return jsonResult({ action: 'chat', status: 'sent', message, method: result.method });
|
|
787
|
-
} else {
|
|
788
|
-
return errorResult(`Failed to send chat message: ${result.error}. Method: ${result.method}`);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
case 'participants': {
|
|
793
|
-
await ariaClick(page, ['People'], 3000);
|
|
794
|
-
await delay(1000);
|
|
795
|
-
const participants = await page.evaluate(() => {
|
|
796
|
-
const names: string[] = [];
|
|
797
|
-
const panel = document.querySelector('[aria-label="Side panel"]');
|
|
798
|
-
if (!panel) return names;
|
|
799
|
-
const items = panel.querySelectorAll('[class*="participant"], [data-participant-id], [role="listitem"]');
|
|
800
|
-
for (const item of items) {
|
|
801
|
-
const name = item.textContent?.trim();
|
|
802
|
-
if (name && name.length < 100) names.push(name);
|
|
803
|
-
}
|
|
804
|
-
if (names.length === 0) {
|
|
805
|
-
const tiles = document.querySelectorAll('[data-self-name], [data-participant-id]');
|
|
806
|
-
for (const t of tiles) {
|
|
807
|
-
const n = t.getAttribute('data-self-name') || t.textContent?.trim();
|
|
808
|
-
if (n && n.length < 100) names.push(n);
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
return [...new Set(names)];
|
|
812
|
-
});
|
|
813
|
-
await ariaClick(page, ['Close'], 1500);
|
|
814
|
-
return jsonResult({ action: 'participants', participants, count: participants.length });
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
case 'share_screen': {
|
|
818
|
-
// Share entire screen in Google Meet
|
|
819
|
-
// Requires --auto-select-desktop-capture-source=Entire screen in browser launch args
|
|
820
|
-
try {
|
|
821
|
-
// Click "Present now" button
|
|
822
|
-
const clicked = await ariaClick(page, ['Present now', 'Share screen', 'Present'], 5000);
|
|
823
|
-
if (!clicked) return errorResult('Could not find "Present now" button. Are you in an active meeting?');
|
|
824
|
-
await delay(1500);
|
|
825
|
-
|
|
826
|
-
// Select "Your entire screen" option
|
|
827
|
-
const entireScreen = await ariaClick(page, ['Your entire screen', 'Entire screen', 'A window'], 5000);
|
|
828
|
-
if (!entireScreen) {
|
|
829
|
-
// Try clicking the first presentation option directly
|
|
830
|
-
const firstOption = await page.evaluate(() => {
|
|
831
|
-
const options = document.querySelectorAll('[role="menuitem"], [role="option"], [data-is-tooltip-wrapper]');
|
|
832
|
-
for (const opt of options) {
|
|
833
|
-
const text = (opt as HTMLElement).textContent?.toLowerCase() || '';
|
|
834
|
-
if (text.includes('entire screen') || text.includes('your screen') || text.includes('a window')) {
|
|
835
|
-
(opt as HTMLElement).click();
|
|
836
|
-
return true;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
return false;
|
|
840
|
-
});
|
|
841
|
-
if (!firstOption) return errorResult('Could not select screen sharing option. The sharing menu may have changed.');
|
|
842
|
-
}
|
|
843
|
-
await delay(2000);
|
|
844
|
-
|
|
845
|
-
// The --auto-select-desktop-capture-source flag should auto-accept the OS dialog
|
|
846
|
-
// Verify sharing started by checking for "Stop presenting" or "You are presenting" indicators
|
|
847
|
-
const isSharing = await page.evaluate(() => {
|
|
848
|
-
const indicators = document.querySelectorAll('[aria-label*="Stop presenting"], [aria-label*="stop sharing"], [aria-label*="You are presenting"]');
|
|
849
|
-
return indicators.length > 0;
|
|
850
|
-
});
|
|
851
|
-
|
|
852
|
-
return jsonResult({
|
|
853
|
-
action: 'share_screen',
|
|
854
|
-
status: isSharing ? 'sharing' : 'initiated',
|
|
855
|
-
type: 'entire_screen',
|
|
856
|
-
note: isSharing
|
|
857
|
-
? 'Screen sharing is active. Use meeting_action(action: "stop_sharing") to stop.'
|
|
858
|
-
: 'Screen sharing was initiated. The OS picker may require manual confirmation if auto-select did not work.',
|
|
859
|
-
});
|
|
860
|
-
} catch (e: any) {
|
|
861
|
-
return errorResult(`Failed to share screen: ${e.message}`);
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
case 'share_tab': {
|
|
866
|
-
// Share a specific browser tab in Google Meet
|
|
867
|
-
// This is cleaner than full screen — only shows one tab
|
|
868
|
-
const targetUrl = params.url || params.targetUrl;
|
|
869
|
-
try {
|
|
870
|
-
// If a URL was specified, open it in a new tab first
|
|
871
|
-
if (targetUrl) {
|
|
872
|
-
const newPage = await page.context().newPage();
|
|
873
|
-
await newPage.goto(targetUrl, { waitUntil: 'domcontentloaded', timeout: 15000 });
|
|
874
|
-
await delay(1000);
|
|
875
|
-
// Switch back to Meet tab to initiate sharing
|
|
876
|
-
await page.bringToFront();
|
|
877
|
-
await delay(500);
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
// Click "Present now"
|
|
881
|
-
const clicked = await ariaClick(page, ['Present now', 'Share screen', 'Present'], 5000);
|
|
882
|
-
if (!clicked) return errorResult('Could not find "Present now" button.');
|
|
883
|
-
await delay(1500);
|
|
884
|
-
|
|
885
|
-
// Select "A tab" option
|
|
886
|
-
const tabOption = await ariaClick(page, ['A tab', 'Chrome tab', 'Browser tab'], 5000);
|
|
887
|
-
if (!tabOption) {
|
|
888
|
-
// Fallback: try to find tab option in menu
|
|
889
|
-
const found = await page.evaluate(() => {
|
|
890
|
-
const items = document.querySelectorAll('[role="menuitem"], [role="option"], [data-is-tooltip-wrapper]');
|
|
891
|
-
for (const item of items) {
|
|
892
|
-
const text = (item as HTMLElement).textContent?.toLowerCase() || '';
|
|
893
|
-
if (text.includes('tab')) {
|
|
894
|
-
(item as HTMLElement).click();
|
|
895
|
-
return true;
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
return false;
|
|
899
|
-
});
|
|
900
|
-
if (!found) return errorResult('Could not find "A tab" option in sharing menu.');
|
|
901
|
-
}
|
|
902
|
-
await delay(2000);
|
|
903
|
-
|
|
904
|
-
// The tab picker is a browser-native dialog — the auto-capture flag may handle it
|
|
905
|
-
// If a specific tab was opened, it should be the most recent and auto-selected
|
|
906
|
-
const isSharing = await page.evaluate(() => {
|
|
907
|
-
const indicators = document.querySelectorAll('[aria-label*="Stop presenting"], [aria-label*="stop sharing"], [aria-label*="You are presenting"]');
|
|
908
|
-
return indicators.length > 0;
|
|
909
|
-
});
|
|
910
|
-
|
|
911
|
-
return jsonResult({
|
|
912
|
-
action: 'share_tab',
|
|
913
|
-
status: isSharing ? 'sharing' : 'initiated',
|
|
914
|
-
type: 'browser_tab',
|
|
915
|
-
targetUrl: targetUrl || null,
|
|
916
|
-
note: isSharing
|
|
917
|
-
? 'Tab sharing is active. Use meeting_action(action: "stop_sharing") to stop.'
|
|
918
|
-
: 'Tab sharing initiated. You may need to select the tab in the browser picker.',
|
|
919
|
-
});
|
|
920
|
-
} catch (e: any) {
|
|
921
|
-
return errorResult(`Failed to share tab: ${e.message}`);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
case 'stop_sharing': {
|
|
926
|
-
// Stop any active screen/tab sharing
|
|
927
|
-
try {
|
|
928
|
-
// Method 1: Click "Stop presenting" button (most reliable)
|
|
929
|
-
const stopped = await ariaClick(page, ['Stop presenting', 'Stop sharing', 'Stop presentation'], 3000);
|
|
930
|
-
if (stopped) {
|
|
931
|
-
await delay(500);
|
|
932
|
-
return jsonResult({ action: 'stop_sharing', status: 'stopped' });
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
// Method 2: Look for the stop button in the presenting bar
|
|
936
|
-
const clickedStop = await page.evaluate(() => {
|
|
937
|
-
// Google Meet shows a "You are presenting" bar with a Stop button
|
|
938
|
-
const buttons = document.querySelectorAll('button');
|
|
939
|
-
for (const btn of buttons) {
|
|
940
|
-
const text = btn.textContent?.toLowerCase() || '';
|
|
941
|
-
const label = btn.getAttribute('aria-label')?.toLowerCase() || '';
|
|
942
|
-
if (text.includes('stop') && (text.includes('present') || text.includes('shar')) ||
|
|
943
|
-
label.includes('stop') && (label.includes('present') || label.includes('shar'))) {
|
|
944
|
-
btn.click();
|
|
945
|
-
return true;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
return false;
|
|
949
|
-
});
|
|
950
|
-
|
|
951
|
-
if (clickedStop) {
|
|
952
|
-
await delay(500);
|
|
953
|
-
return jsonResult({ action: 'stop_sharing', status: 'stopped' });
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
return jsonResult({ action: 'stop_sharing', status: 'no_active_share', note: 'No active screen share was detected.' });
|
|
957
|
-
} catch (e: any) {
|
|
958
|
-
return errorResult(`Failed to stop sharing: ${e.message}`);
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
case 'leave': {
|
|
963
|
-
// Stop the monitor and release keep-alive
|
|
964
|
-
removeMonitor(agentId);
|
|
965
|
-
if (runtimeRef?.setKeepAlive && runtimeRef?.getCurrentSessionId) {
|
|
966
|
-
const sid = runtimeRef.getCurrentSessionId();
|
|
967
|
-
if (sid) runtimeRef.setKeepAlive(sid, false);
|
|
968
|
-
}
|
|
969
|
-
await ariaClick(page, ['Leave call'], 3000);
|
|
970
|
-
return jsonResult({ action: 'leave', status: 'left_meeting', monitorStopped: true, keepAliveReleased: true });
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
default:
|
|
974
|
-
return errorResult(`Unknown action: "${action}". Supported: screenshot, read_captions, read_chat, chat, participants, toggle_captions, share_screen, share_tab, stop_sharing, leave`);
|
|
975
|
-
}
|
|
976
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
977
|
-
},
|
|
978
|
-
},
|
|
979
|
-
|
|
980
|
-
// ─── Detect Meeting Invites in Email ───────────────
|
|
981
|
-
{
|
|
982
|
-
name: 'meetings_scan_inbox',
|
|
983
|
-
description: 'Scan recent emails for meeting invitations and extract meeting links.',
|
|
984
|
-
category: 'utility' as const,
|
|
985
|
-
parameters: {
|
|
986
|
-
type: 'object' as const,
|
|
987
|
-
properties: {
|
|
988
|
-
hours: { type: 'number', description: 'Scan emails from last N hours (default: 24)' },
|
|
989
|
-
maxResults: { type: 'number', description: 'Max emails to scan (default: 30)' },
|
|
990
|
-
},
|
|
991
|
-
required: [],
|
|
992
|
-
},
|
|
993
|
-
async execute(_id: string, params: any) {
|
|
994
|
-
try {
|
|
995
|
-
const token = await tp.getAccessToken();
|
|
996
|
-
const hours = params.hours || 24;
|
|
997
|
-
const after = new Date(Date.now() - hours * 3600000);
|
|
998
|
-
const dateStr = `${after.getFullYear()}/${String(after.getMonth() + 1).padStart(2, '0')}/${String(after.getDate()).padStart(2, '0')}`;
|
|
999
|
-
|
|
1000
|
-
const GMAIL_BASE = 'https://gmail.googleapis.com/gmail/v1/users/me';
|
|
1001
|
-
const query = `after:${dateStr} (meet.google.com OR zoom.us OR teams.microsoft.com OR "meeting invitation" OR filename:ics)`;
|
|
1002
|
-
const searchUrl = new URL(`${GMAIL_BASE}/messages`);
|
|
1003
|
-
searchUrl.searchParams.set('q', query);
|
|
1004
|
-
searchUrl.searchParams.set('maxResults', String(params.maxResults || 30));
|
|
1005
|
-
|
|
1006
|
-
const searchRes = await fetch(searchUrl.toString(), { headers: { Authorization: `Bearer ${token}` } });
|
|
1007
|
-
if (!searchRes.ok) throw new Error(`Gmail search failed: ${searchRes.status}`);
|
|
1008
|
-
const searchData = await searchRes.json() as any;
|
|
1009
|
-
|
|
1010
|
-
if (!searchData.messages?.length) {
|
|
1011
|
-
return jsonResult({ meetings: [], count: 0, message: 'No meeting invites found in the last ' + hours + ' hours' });
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
const meetings: any[] = [];
|
|
1015
|
-
for (const msg of searchData.messages.slice(0, 20)) {
|
|
1016
|
-
try {
|
|
1017
|
-
const msgRes = await fetch(`${GMAIL_BASE}/messages/${msg.id}?format=full`, { headers: { Authorization: `Bearer ${token}` } });
|
|
1018
|
-
if (!msgRes.ok) continue;
|
|
1019
|
-
const msgData = await msgRes.json() as any;
|
|
1020
|
-
const headers = msgData.payload?.headers || [];
|
|
1021
|
-
const subject = headers.find((h: any) => h.name?.toLowerCase() === 'subject')?.value || '';
|
|
1022
|
-
const from = headers.find((h: any) => h.name?.toLowerCase() === 'from')?.value || '';
|
|
1023
|
-
const date = headers.find((h: any) => h.name?.toLowerCase() === 'date')?.value || '';
|
|
1024
|
-
|
|
1025
|
-
let bodyText = '';
|
|
1026
|
-
function walkParts(part: any) {
|
|
1027
|
-
if (part.body?.data) bodyText += Buffer.from(part.body.data.replace(/-/g, '+').replace(/_/g, '/'), 'base64').toString('utf-8') + ' ';
|
|
1028
|
-
if (part.parts) part.parts.forEach(walkParts);
|
|
1029
|
-
}
|
|
1030
|
-
walkParts(msgData.payload);
|
|
1031
|
-
|
|
1032
|
-
const meetLinks: any[] = [];
|
|
1033
|
-
const patterns = [
|
|
1034
|
-
{ regex: /https:\/\/meet\.google\.com\/[a-z-]+/gi, platform: 'google_meet' },
|
|
1035
|
-
{ regex: /https:\/\/[\w.-]*zoom\.us\/[jw]\/[\d?=&\w]+/gi, platform: 'zoom' },
|
|
1036
|
-
{ regex: /https:\/\/teams\.microsoft\.com\/l\/meetup-join\/[^\s"<>]+/gi, platform: 'teams' },
|
|
1037
|
-
];
|
|
1038
|
-
for (const p of patterns) {
|
|
1039
|
-
const matches = bodyText.match(p.regex);
|
|
1040
|
-
if (matches) for (const url of [...new Set(matches)]) meetLinks.push({ platform: p.platform, url });
|
|
1041
|
-
}
|
|
1042
|
-
if (meetLinks.length > 0) meetings.push({ messageId: msg.id, subject, from, date, meetingLinks: meetLinks, snippet: msgData.snippet?.slice(0, 200) });
|
|
1043
|
-
} catch {}
|
|
1044
|
-
}
|
|
1045
|
-
return jsonResult({ meetings, count: meetings.length, scannedEmails: searchData.messages.length });
|
|
1046
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
1047
|
-
},
|
|
1048
|
-
},
|
|
1049
|
-
|
|
1050
|
-
// ─── RSVP to Meeting ───────────────────────────────
|
|
1051
|
-
{
|
|
1052
|
-
name: 'meeting_rsvp',
|
|
1053
|
-
description: 'Accept or decline a Google Calendar meeting invitation.',
|
|
1054
|
-
category: 'utility' as const,
|
|
1055
|
-
parameters: {
|
|
1056
|
-
type: 'object' as const,
|
|
1057
|
-
properties: {
|
|
1058
|
-
eventId: { type: 'string', description: 'Calendar event ID (required)' },
|
|
1059
|
-
response: { type: 'string', description: '"accepted", "declined", or "tentative" (required)' },
|
|
1060
|
-
calendarId: { type: 'string', description: 'Calendar ID (default: "primary")' },
|
|
1061
|
-
},
|
|
1062
|
-
required: ['eventId', 'response'],
|
|
1063
|
-
},
|
|
1064
|
-
async execute(_id: string, params: any) {
|
|
1065
|
-
try {
|
|
1066
|
-
const token = await tp.getAccessToken();
|
|
1067
|
-
const calendarId = params.calendarId || 'primary';
|
|
1068
|
-
const email = tp.getEmail();
|
|
1069
|
-
const event = await calendarApi(token, `/calendars/${encodeURIComponent(calendarId)}/events/${params.eventId}`);
|
|
1070
|
-
const attendees = (event.attendees || []).map((a: any) => {
|
|
1071
|
-
if (a.self || a.email === email) return { ...a, responseStatus: params.response };
|
|
1072
|
-
return a;
|
|
1073
|
-
});
|
|
1074
|
-
if (!attendees.find((a: any) => a.self || a.email === email)) {
|
|
1075
|
-
attendees.push({ email, responseStatus: params.response });
|
|
1076
|
-
}
|
|
1077
|
-
const updated = await calendarApi(token, `/calendars/${encodeURIComponent(calendarId)}/events/${params.eventId}`, {
|
|
1078
|
-
method: 'PATCH',
|
|
1079
|
-
query: { sendUpdates: 'all' },
|
|
1080
|
-
body: { attendees },
|
|
1081
|
-
});
|
|
1082
|
-
const link = extractMeetingLink(updated);
|
|
1083
|
-
return jsonResult({
|
|
1084
|
-
rsvp: params.response,
|
|
1085
|
-
eventId: params.eventId,
|
|
1086
|
-
title: updated.summary,
|
|
1087
|
-
start: updated.start?.dateTime || updated.start?.date,
|
|
1088
|
-
meetingLink: link?.url,
|
|
1089
|
-
});
|
|
1090
|
-
} catch (e: any) { return errorResult(e.message); }
|
|
1091
|
-
},
|
|
1092
|
-
},
|
|
1093
|
-
];
|
|
1094
|
-
}
|