@agent-native/core 0.111.4 → 0.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +4 -2
- package/corpus/core/CHANGELOG.md +34 -0
- package/corpus/core/docs/AGENTS.md +7 -0
- package/corpus/core/docs/content/integrations.mdx +63 -2
- package/corpus/core/docs/design/provider-integration-authority.md +117 -0
- package/corpus/core/package.json +8 -1
- package/corpus/core/scripts/materialize-source-corpus.mjs +9 -2
- package/corpus/core/src/cli/atomic-json-file.ts +324 -0
- package/corpus/core/src/cli/claude-code-participant.ts +515 -0
- package/corpus/core/src/cli/code-agent-executor.ts +35 -15
- package/corpus/core/src/cli/code-agent-runs.concurrent-worker.ts +33 -0
- package/corpus/core/src/cli/code-agent-runs.ts +70 -36
- package/corpus/core/src/cli/codex-cli-participant.ts +496 -0
- package/corpus/core/src/cli/multi-frontier-runs.ts +1952 -0
- package/corpus/core/src/client/chat/ChatHistoryList.tsx +7 -404
- package/corpus/core/src/coding-tools/index.ts +27 -8
- package/corpus/core/src/embeddings/index.ts +233 -0
- package/corpus/core/src/index.ts +2 -0
- package/corpus/core/src/integrations/index.ts +10 -0
- package/corpus/core/src/integrations/slack-oauth.ts +1 -0
- package/corpus/core/src/integrations/webhook-delivery.ts +55 -0
- package/corpus/core/src/notifications/channels.ts +4 -10
- package/corpus/core/src/provider-api/actions/custom-provider-registration.ts +197 -0
- package/corpus/core/src/provider-api/actions/delete-staged-dataset.ts +3 -42
- package/corpus/core/src/provider-api/actions/list-staged-datasets.ts +3 -45
- package/corpus/core/src/provider-api/actions/provider-api-audit.ts +88 -0
- package/corpus/core/src/provider-api/actions/provider-api.ts +460 -0
- package/corpus/core/src/provider-api/actions/query-staged-dataset.ts +3 -140
- package/corpus/core/src/provider-api/actions/staged-datasets.ts +359 -0
- package/corpus/core/src/provider-api/gong.ts +108 -0
- package/corpus/core/src/scripts/docs/source-search.ts +2 -1
- package/corpus/core/src/search/index.ts +413 -0
- package/corpus/core/src/server/google-oauth-credentials.ts +80 -3
- package/corpus/core/src/server/index.ts +6 -0
- package/corpus/core/src/styles/chat-history-list.css +1 -313
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/core/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/corpus/core/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/core/src/templates/default/.agents/skills/integration-webhooks/SKILL.md +323 -0
- package/corpus/core/src/templates/default/.agents/skills/onboarding/SKILL.md +56 -0
- package/corpus/core/src/templates/default/.agents/skills/secrets/SKILL.md +273 -0
- package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/core/src/templates/default/AGENTS.md +25 -18
- package/corpus/core/src/templates/headless/.agents/skills/actions/SKILL.md +512 -0
- package/corpus/core/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/corpus/core/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/core/src/templates/headless/.agents/skills/integration-webhooks/SKILL.md +323 -0
- package/corpus/core/src/templates/headless/.agents/skills/secrets/SKILL.md +273 -0
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/core/src/templates/headless/AGENTS.md +7 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/core/src/templates/workspace-core/AGENTS.md +4 -0
- package/corpus/core/src/templates/workspace-root/AGENTS.md +4 -0
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/analytics/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/analytics/actions/delete-staged-dataset.ts +3 -23
- package/corpus/templates/analytics/actions/list-staged-datasets.ts +3 -27
- package/corpus/templates/analytics/actions/provider-api-catalog.ts +16 -19
- package/corpus/templates/analytics/actions/provider-api-docs.ts +3 -5
- package/corpus/templates/analytics/actions/provider-api-request.ts +162 -185
- package/corpus/templates/analytics/actions/query-staged-dataset.ts +3 -47
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +52 -161
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/assets/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +63 -160
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +48 -5
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +46 -14
- package/corpus/templates/brain/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/brain/README.md +34 -3
- package/corpus/templates/brain/actions/_schemas.ts +13 -7
- package/corpus/templates/brain/actions/approve-proposal.ts +2 -0
- package/corpus/templates/brain/actions/claim-distillation.ts +24 -27
- package/corpus/templates/brain/actions/create-source.ts +1 -1
- package/corpus/templates/brain/actions/delete-staged-dataset.ts +3 -24
- package/corpus/templates/brain/actions/get-knowledge.ts +6 -2
- package/corpus/templates/brain/actions/get-pilot-report.ts +44 -8
- package/corpus/templates/brain/actions/import-capture.ts +21 -9
- package/corpus/templates/brain/actions/import-transcript.ts +42 -14
- package/corpus/templates/brain/actions/list-captures.ts +10 -1
- package/corpus/templates/brain/actions/list-distillation-queue.ts +39 -14
- package/corpus/templates/brain/actions/list-projects.ts +51 -0
- package/corpus/templates/brain/actions/list-proposals.ts +80 -4
- package/corpus/templates/brain/actions/list-sources.ts +17 -3
- package/corpus/templates/brain/actions/list-staged-datasets.ts +3 -28
- package/corpus/templates/brain/actions/manage-project.ts +118 -0
- package/corpus/templates/brain/actions/mark-capture-distilled.ts +68 -20
- package/corpus/templates/brain/actions/navigate.ts +1 -0
- package/corpus/templates/brain/actions/provider-api-catalog.ts +5 -11
- package/corpus/templates/brain/actions/provider-api-docs.ts +3 -5
- package/corpus/templates/brain/actions/provider-api-request.ts +3 -37
- package/corpus/templates/brain/actions/query-staged-dataset.ts +3 -48
- package/corpus/templates/brain/actions/reject-proposal.ts +6 -1
- package/corpus/templates/brain/actions/resanitize-captures.ts +159 -33
- package/corpus/templates/brain/actions/review-proposal.ts +2 -0
- package/corpus/templates/brain/actions/search-everything.ts +10 -1
- package/corpus/templates/brain/actions/search-knowledge.ts +1 -1
- package/corpus/templates/brain/actions/set-settings.ts +36 -1
- package/corpus/templates/brain/actions/update-proposal.ts +2 -0
- package/corpus/templates/brain/actions/update-source.ts +5 -1
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +48 -154
- package/corpus/templates/brain/app/hooks/use-distillation-bridge.ts +18 -9
- package/corpus/templates/brain/app/hooks/use-navigation-state.ts +3 -0
- package/corpus/templates/brain/app/i18n-data.ts +731 -2
- package/corpus/templates/brain/app/lib/brain.ts +88 -1
- package/corpus/templates/brain/app/lib/ingest-handoff.ts +35 -0
- package/corpus/templates/brain/app/routes/ops.tsx +47 -0
- package/corpus/templates/brain/app/routes/review.tsx +41 -2
- package/corpus/templates/brain/app/routes/search.tsx +33 -2
- package/corpus/templates/brain/app/routes/settings.tsx +158 -0
- package/corpus/templates/brain/app/routes/sources.tsx +31 -0
- package/corpus/templates/brain/changelog/2026-07-19-added-private-source-safe-semantic-search.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-19-slack-backfills-can-now-join-configured-public-channels-befo.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-19-slack-backfills-now-continue-across-the-configured-number-of.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-19-slack-backfills-now-start-with-a-safe-four-week-window-and-r.md +6 -0
- package/corpus/templates/brain/jobs/process-ingest-queue.ts +270 -36
- package/corpus/templates/brain/package.json +1 -0
- package/corpus/templates/brain/server/db/index.ts +18 -0
- package/corpus/templates/brain/server/db/schema.ts +197 -1
- package/corpus/templates/brain/server/jobs/distillation-queue.ts +12 -5
- package/corpus/templates/brain/server/lib/audiences.ts +708 -0
- package/corpus/templates/brain/server/lib/brain-health.ts +251 -38
- package/corpus/templates/brain/server/lib/brain.ts +877 -50
- package/corpus/templates/brain/server/lib/capture-sanitization.ts +217 -53
- package/corpus/templates/brain/server/lib/connectors.ts +609 -72
- package/corpus/templates/brain/server/lib/demo.ts +17 -4
- package/corpus/templates/brain/server/lib/hybrid-search.ts +363 -0
- package/corpus/templates/brain/server/lib/ingest-queue.ts +104 -0
- package/corpus/templates/brain/server/lib/privacy-readiness.ts +24 -0
- package/corpus/templates/brain/server/lib/search-index-contracts.ts +72 -0
- package/corpus/templates/brain/server/lib/search-index.ts +714 -0
- package/corpus/templates/brain/server/lib/search.ts +120 -4
- package/corpus/templates/brain/server/lib/sensitivity-policy.ts +174 -0
- package/corpus/templates/brain/server/lib/slack-channel-membership.ts +44 -0
- package/corpus/templates/brain/server/lib/slack-events.ts +281 -0
- package/corpus/templates/brain/server/onboarding.ts +29 -0
- package/corpus/templates/brain/server/plugins/db.ts +204 -0
- package/corpus/templates/brain/server/register-secrets.ts +46 -0
- package/corpus/templates/brain/server/routes/api/_agent-native/brain/ingest.post.ts +36 -16
- package/corpus/templates/brain/server/routes/api/_agent-native/brain/slack-events.post.ts +28 -0
- package/corpus/templates/brain/shared/slack-source-config.ts +60 -0
- package/corpus/templates/brain/shared/types.ts +10 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/calendar/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/calendar/actions/delete-staged-dataset.ts +3 -24
- package/corpus/templates/calendar/actions/list-staged-datasets.ts +3 -28
- package/corpus/templates/calendar/actions/provider-api-catalog.ts +5 -11
- package/corpus/templates/calendar/actions/provider-api-docs.ts +3 -5
- package/corpus/templates/calendar/actions/provider-api-request.ts +3 -37
- package/corpus/templates/calendar/actions/query-staged-dataset.ts +3 -48
- package/corpus/templates/calendar/server/handlers/gong.ts +6 -61
- package/corpus/templates/calendar/server/handlers/google-auth.ts +10 -8
- package/corpus/templates/calendar/server/lib/google-calendar.ts +7 -45
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/chat/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/corpus/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/chat/AGENTS.md +5 -2
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +51 -157
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/clips/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/clips/AGENTS.md +11 -0
- package/corpus/templates/clips/actions/export-to-brain.ts +505 -171
- package/corpus/templates/clips/changelog/2026-07-19-ready-clips-transcripts-can-be-backfilled-to-brain-for-a-bou.md +6 -0
- package/corpus/templates/clips/server/lib/calendar-event-meetings.ts +1 -1
- package/corpus/templates/clips/server/lib/google-calendar-client.ts +12 -22
- package/corpus/templates/clips/server/lib/google-calendar-oauth.ts +9 -6
- package/corpus/templates/clips/server/lib/slack-oauth.ts +12 -47
- package/corpus/templates/clips/server/routes/_agent-native/google/auth-url.get.ts +2 -6
- package/corpus/templates/clips/server/routes/api/auth/google-calendar.get.ts +4 -4
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/content/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/content/actions/delete-staged-dataset.ts +3 -24
- package/corpus/templates/content/actions/list-staged-datasets.ts +3 -28
- package/corpus/templates/content/actions/provider-api-catalog.ts +5 -11
- package/corpus/templates/content/actions/provider-api-docs.ts +3 -5
- package/corpus/templates/content/actions/provider-api-request.ts +3 -37
- package/corpus/templates/content/actions/query-staged-dataset.ts +3 -48
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/design/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/design/actions/delete-staged-dataset.ts +4 -23
- package/corpus/templates/design/actions/list-staged-datasets.ts +4 -27
- package/corpus/templates/design/actions/provider-api-catalog.ts +15 -18
- package/corpus/templates/design/actions/provider-api-docs.ts +57 -48
- package/corpus/templates/design/actions/provider-api-request.ts +140 -164
- package/corpus/templates/design/actions/query-staged-dataset.ts +4 -47
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/dispatch/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/dispatch/actions/delete-staged-dataset.ts +4 -23
- package/corpus/templates/dispatch/actions/list-staged-datasets.ts +4 -30
- package/corpus/templates/dispatch/actions/provider-api-catalog.ts +15 -18
- package/corpus/templates/dispatch/actions/provider-api-docs.ts +57 -48
- package/corpus/templates/dispatch/actions/provider-api-request.ts +138 -163
- package/corpus/templates/dispatch/actions/query-staged-dataset.ts +4 -47
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/forms/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/forms/server/lib/integrations.ts +23 -22
- package/corpus/templates/macros/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/mail/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/mail/actions/delete-staged-dataset.ts +4 -23
- package/corpus/templates/mail/actions/list-staged-datasets.ts +4 -27
- package/corpus/templates/mail/actions/provider-api-catalog.ts +15 -18
- package/corpus/templates/mail/actions/provider-api-docs.ts +57 -48
- package/corpus/templates/mail/actions/provider-api-request.ts +146 -173
- package/corpus/templates/mail/actions/query-staged-dataset.ts +4 -47
- package/corpus/templates/mail/server/handlers/gong.ts +6 -61
- package/corpus/templates/mail/server/lib/google-auth.ts +10 -13
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/plan/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +47 -156
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/slides/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/templates/slides/actions/delete-staged-dataset.ts +4 -23
- package/corpus/templates/slides/actions/list-staged-datasets.ts +4 -27
- package/corpus/templates/slides/actions/provider-api-catalog.ts +15 -18
- package/corpus/templates/slides/actions/provider-api-docs.ts +57 -48
- package/corpus/templates/slides/actions/provider-api-request.ts +145 -172
- package/corpus/templates/slides/actions/query-staged-dataset.ts +4 -47
- package/corpus/templates/slides/server/lib/google-docs-oauth.ts +11 -36
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +32 -12
- package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/corpus/templates/tasks/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/corpus/toolkit/CHANGELOG.md +125 -0
- package/corpus/toolkit/README.md +60 -0
- package/corpus/toolkit/export-snapshot.json +35 -0
- package/corpus/toolkit/migration-manifest.json +4 -0
- package/corpus/toolkit/package.json +281 -0
- package/corpus/toolkit/scripts/finalize-build.mjs +55 -0
- package/corpus/toolkit/src/app-shell/header-actions.tsx +84 -0
- package/corpus/toolkit/src/app-shell/index.ts +1 -0
- package/corpus/toolkit/src/chat-history/ChatHistoryList.tsx +469 -0
- package/corpus/toolkit/src/chat-history/index.ts +7 -0
- package/corpus/toolkit/src/chat-history.css +314 -0
- package/corpus/toolkit/src/collab-ui/AgentPresenceChip.tsx +69 -0
- package/corpus/toolkit/src/collab-ui/LiveCursorOverlay.tsx +241 -0
- package/corpus/toolkit/src/collab-ui/PresenceBar.tsx +346 -0
- package/corpus/toolkit/src/collab-ui/RecentEditHighlights.tsx +225 -0
- package/corpus/toolkit/src/collab-ui/RemoteSelectionRings.tsx +227 -0
- package/corpus/toolkit/src/collab-ui/agent-identity.ts +16 -0
- package/corpus/toolkit/src/collab-ui/index.ts +39 -0
- package/corpus/toolkit/src/collab-ui/lead-client.ts +32 -0
- package/corpus/toolkit/src/collab-ui/types.ts +96 -0
- package/corpus/toolkit/src/composer/AgentComposerFrame.tsx +59 -0
- package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +983 -0
- package/corpus/toolkit/src/composer/MentionPopover.tsx +412 -0
- package/corpus/toolkit/src/composer/PastedTextChip.tsx +150 -0
- package/corpus/toolkit/src/composer/PromptComposer.tsx +718 -0
- package/corpus/toolkit/src/composer/RealtimeVoiceMode.tsx +856 -0
- package/corpus/toolkit/src/composer/TiptapComposer.tsx +2936 -0
- package/corpus/toolkit/src/composer/VoiceButton.tsx +255 -0
- package/corpus/toolkit/src/composer/asset-picker-url.ts +80 -0
- package/corpus/toolkit/src/composer/attachment-accept.ts +71 -0
- package/corpus/toolkit/src/composer/draft-key.ts +7 -0
- package/corpus/toolkit/src/composer/extensions/FileReference.tsx +55 -0
- package/corpus/toolkit/src/composer/extensions/MentionReference.tsx +93 -0
- package/corpus/toolkit/src/composer/extensions/SkillReference.tsx +56 -0
- package/corpus/toolkit/src/composer/index.ts +79 -0
- package/corpus/toolkit/src/composer/pasted-text.ts +160 -0
- package/corpus/toolkit/src/composer/prompt-attachments.ts +93 -0
- package/corpus/toolkit/src/composer/realtime-voice-audio-level.ts +64 -0
- package/corpus/toolkit/src/composer/realtime-voice-transcript.ts +134 -0
- package/corpus/toolkit/src/composer/runtime-adapters.tsx +343 -0
- package/corpus/toolkit/src/composer/types.ts +66 -0
- package/corpus/toolkit/src/composer/use-file-search.ts +64 -0
- package/corpus/toolkit/src/composer/use-mention-search.ts +90 -0
- package/corpus/toolkit/src/composer/use-skills.ts +45 -0
- package/corpus/toolkit/src/composer/useRealtimeVoiceMode.tsx +2117 -0
- package/corpus/toolkit/src/composer/useVoiceDictation.ts +1191 -0
- package/corpus/toolkit/src/context-ui/ContextMeter.tsx +101 -0
- package/corpus/toolkit/src/context-ui/ContextSegmentRow.tsx +184 -0
- package/corpus/toolkit/src/context-ui/ContextTreemap.tsx +125 -0
- package/corpus/toolkit/src/context-ui/ContextXRayPanel.tsx +377 -0
- package/corpus/toolkit/src/context-ui/format.ts +42 -0
- package/corpus/toolkit/src/context-ui/index.ts +15 -0
- package/corpus/toolkit/src/context-ui/types.ts +43 -0
- package/corpus/toolkit/src/design-tweaks/index.ts +1 -0
- package/corpus/toolkit/src/design-tweaks/visual-style-controls.tsx +1084 -0
- package/corpus/toolkit/src/editor/BubbleToolbar.tsx +253 -0
- package/corpus/toolkit/src/editor/CodeBlockNode.tsx +254 -0
- package/corpus/toolkit/src/editor/DragHandle.ts +1437 -0
- package/corpus/toolkit/src/editor/ImageExtension.ts +306 -0
- package/corpus/toolkit/src/editor/RegistryBlockContext.tsx +107 -0
- package/corpus/toolkit/src/editor/RegistryBlockNode.tsx +652 -0
- package/corpus/toolkit/src/editor/RichMarkdownEditor.tsx +81 -0
- package/corpus/toolkit/src/editor/RunId.ts +61 -0
- package/corpus/toolkit/src/editor/SharedRichEditor.tsx +321 -0
- package/corpus/toolkit/src/editor/SlashCommandMenu.tsx +310 -0
- package/corpus/toolkit/src/editor/extensions.ts +402 -0
- package/corpus/toolkit/src/editor/gfmDoc.ts +92 -0
- package/corpus/toolkit/src/editor/index.ts +93 -0
- package/corpus/toolkit/src/editor/registrySlashCommands.ts +131 -0
- package/corpus/toolkit/src/editor/surgical-apply.ts +192 -0
- package/corpus/toolkit/src/editor/useCollabReconcile.ts +589 -0
- package/corpus/toolkit/src/editor.css +510 -0
- package/corpus/toolkit/src/hooks/index.ts +2 -0
- package/corpus/toolkit/src/hooks/use-mobile.tsx +21 -0
- package/corpus/toolkit/src/hooks/use-toast.ts +188 -0
- package/corpus/toolkit/src/index.ts +8 -0
- package/corpus/toolkit/src/onboarding/index.ts +1 -0
- package/corpus/toolkit/src/provider.tsx +47 -0
- package/corpus/toolkit/src/sharing/VisibilityBadge.tsx +37 -0
- package/corpus/toolkit/src/sharing/index.ts +4 -0
- package/corpus/toolkit/src/styles.css +21 -0
- package/corpus/toolkit/src/ui/accordion.tsx +56 -0
- package/corpus/toolkit/src/ui/alert-dialog.tsx +141 -0
- package/corpus/toolkit/src/ui/alert.tsx +59 -0
- package/corpus/toolkit/src/ui/aspect-ratio.tsx +5 -0
- package/corpus/toolkit/src/ui/avatar.tsx +48 -0
- package/corpus/toolkit/src/ui/badge.tsx +37 -0
- package/corpus/toolkit/src/ui/breadcrumb.tsx +115 -0
- package/corpus/toolkit/src/ui/button.tsx +78 -0
- package/corpus/toolkit/src/ui/calendar.tsx +214 -0
- package/corpus/toolkit/src/ui/card.tsx +86 -0
- package/corpus/toolkit/src/ui/carousel.tsx +260 -0
- package/corpus/toolkit/src/ui/chart.tsx +375 -0
- package/corpus/toolkit/src/ui/checkbox.tsx +28 -0
- package/corpus/toolkit/src/ui/collapsible.tsx +9 -0
- package/corpus/toolkit/src/ui/command.tsx +174 -0
- package/corpus/toolkit/src/ui/context-menu.tsx +202 -0
- package/corpus/toolkit/src/ui/date-picker.tsx +64 -0
- package/corpus/toolkit/src/ui/dialog.tsx +146 -0
- package/corpus/toolkit/src/ui/drawer.tsx +126 -0
- package/corpus/toolkit/src/ui/dropdown-menu.tsx +218 -0
- package/corpus/toolkit/src/ui/form.tsx +177 -0
- package/corpus/toolkit/src/ui/hover-card.tsx +27 -0
- package/corpus/toolkit/src/ui/index.ts +52 -0
- package/corpus/toolkit/src/ui/input-otp.tsx +69 -0
- package/corpus/toolkit/src/ui/input.tsx +22 -0
- package/corpus/toolkit/src/ui/label.tsx +24 -0
- package/corpus/toolkit/src/ui/logo.tsx +36 -0
- package/corpus/toolkit/src/ui/menubar.tsx +235 -0
- package/corpus/toolkit/src/ui/navigation-menu.tsx +128 -0
- package/corpus/toolkit/src/ui/pagination.tsx +121 -0
- package/corpus/toolkit/src/ui/popover.tsx +44 -0
- package/corpus/toolkit/src/ui/progress.tsx +26 -0
- package/corpus/toolkit/src/ui/radio-group.tsx +42 -0
- package/corpus/toolkit/src/ui/resizable.tsx +43 -0
- package/corpus/toolkit/src/ui/scroll-area.tsx +46 -0
- package/corpus/toolkit/src/ui/select.tsx +158 -0
- package/corpus/toolkit/src/ui/separator.tsx +29 -0
- package/corpus/toolkit/src/ui/sheet.tsx +160 -0
- package/corpus/toolkit/src/ui/sidebar.tsx +777 -0
- package/corpus/toolkit/src/ui/skeleton.tsx +18 -0
- package/corpus/toolkit/src/ui/slider.tsx +26 -0
- package/corpus/toolkit/src/ui/sonner.tsx +58 -0
- package/corpus/toolkit/src/ui/spinner.tsx +17 -0
- package/corpus/toolkit/src/ui/switch.tsx +27 -0
- package/corpus/toolkit/src/ui/table.tsx +117 -0
- package/corpus/toolkit/src/ui/tabs.tsx +53 -0
- package/corpus/toolkit/src/ui/textarea.tsx +23 -0
- package/corpus/toolkit/src/ui/toast.tsx +127 -0
- package/corpus/toolkit/src/ui/toaster.tsx +33 -0
- package/corpus/toolkit/src/ui/toggle-group.tsx +59 -0
- package/corpus/toolkit/src/ui/toggle.tsx +43 -0
- package/corpus/toolkit/src/ui/tooltip.tsx +53 -0
- package/corpus/toolkit/src/ui/use-toast.ts +3 -0
- package/corpus/toolkit/src/utils.ts +8 -0
- package/corpus/toolkit/tsconfig.json +23 -0
- package/dist/cli/atomic-json-file.d.ts +30 -0
- package/dist/cli/atomic-json-file.d.ts.map +1 -0
- package/dist/cli/atomic-json-file.js +240 -0
- package/dist/cli/atomic-json-file.js.map +1 -0
- package/dist/cli/claude-code-participant.d.ts +77 -0
- package/dist/cli/claude-code-participant.d.ts.map +1 -0
- package/dist/cli/claude-code-participant.js +355 -0
- package/dist/cli/claude-code-participant.js.map +1 -0
- package/dist/cli/code-agent-executor.d.ts +8 -9
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +27 -13
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/code-agent-runs.concurrent-worker.d.ts +2 -0
- package/dist/cli/code-agent-runs.concurrent-worker.d.ts.map +1 -0
- package/dist/cli/code-agent-runs.concurrent-worker.js +32 -0
- package/dist/cli/code-agent-runs.concurrent-worker.js.map +1 -0
- package/dist/cli/code-agent-runs.d.ts +5 -0
- package/dist/cli/code-agent-runs.d.ts.map +1 -1
- package/dist/cli/code-agent-runs.js +51 -33
- package/dist/cli/code-agent-runs.js.map +1 -1
- package/dist/cli/codex-cli-participant.d.ts +77 -0
- package/dist/cli/codex-cli-participant.d.ts.map +1 -0
- package/dist/cli/codex-cli-participant.js +354 -0
- package/dist/cli/codex-cli-participant.js.map +1 -0
- package/dist/cli/multi-frontier-runs.d.ts +246 -0
- package/dist/cli/multi-frontier-runs.d.ts.map +1 -0
- package/dist/cli/multi-frontier-runs.js +1247 -0
- package/dist/cli/multi-frontier-runs.js.map +1 -0
- package/dist/client/chat/ChatHistoryList.d.ts +1 -87
- package/dist/client/chat/ChatHistoryList.d.ts.map +1 -1
- package/dist/client/chat/ChatHistoryList.js +1 -82
- package/dist/client/chat/ChatHistoryList.js.map +1 -1
- package/dist/coding-tools/index.d.ts +1 -0
- package/dist/coding-tools/index.d.ts.map +1 -1
- package/dist/coding-tools/index.js +25 -7
- package/dist/coding-tools/index.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/embeddings/index.d.ts +24 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +172 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/index.d.ts +2 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +2 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/slack-manifest.d.ts +1 -1
- package/dist/integrations/slack-oauth.d.ts +1 -1
- package/dist/integrations/slack-oauth.d.ts.map +1 -1
- package/dist/integrations/slack-oauth.js +1 -0
- package/dist/integrations/slack-oauth.js.map +1 -1
- package/dist/integrations/webhook-delivery.d.ts +23 -0
- package/dist/integrations/webhook-delivery.d.ts.map +1 -0
- package/dist/integrations/webhook-delivery.js +32 -0
- package/dist/integrations/webhook-delivery.js.map +1 -0
- package/dist/notifications/channels.d.ts.map +1 -1
- package/dist/notifications/channels.js +4 -9
- package/dist/notifications/channels.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +136 -0
- package/dist/provider-api/actions/custom-provider-registration.d.ts.map +1 -0
- package/dist/provider-api/actions/custom-provider-registration.js +154 -0
- package/dist/provider-api/actions/custom-provider-registration.js.map +1 -0
- package/dist/provider-api/actions/delete-staged-dataset.d.ts +1 -1
- package/dist/provider-api/actions/delete-staged-dataset.d.ts.map +1 -1
- package/dist/provider-api/actions/delete-staged-dataset.js +3 -34
- package/dist/provider-api/actions/delete-staged-dataset.js.map +1 -1
- package/dist/provider-api/actions/list-staged-datasets.d.ts +2 -3
- package/dist/provider-api/actions/list-staged-datasets.d.ts.map +1 -1
- package/dist/provider-api/actions/list-staged-datasets.js +3 -40
- package/dist/provider-api/actions/list-staged-datasets.js.map +1 -1
- package/dist/provider-api/actions/provider-api-audit.d.ts +7 -0
- package/dist/provider-api/actions/provider-api-audit.d.ts.map +1 -0
- package/dist/provider-api/actions/provider-api-audit.js +74 -0
- package/dist/provider-api/actions/provider-api-audit.js.map +1 -0
- package/dist/provider-api/actions/provider-api.d.ts +370 -0
- package/dist/provider-api/actions/provider-api.d.ts.map +1 -0
- package/dist/provider-api/actions/provider-api.js +280 -0
- package/dist/provider-api/actions/provider-api.js.map +1 -0
- package/dist/provider-api/actions/query-staged-dataset.d.ts +1 -1
- package/dist/provider-api/actions/query-staged-dataset.d.ts.map +1 -1
- package/dist/provider-api/actions/query-staged-dataset.js +3 -116
- package/dist/provider-api/actions/query-staged-dataset.js.map +1 -1
- package/dist/provider-api/actions/staged-datasets.d.ts +190 -0
- package/dist/provider-api/actions/staged-datasets.d.ts.map +1 -0
- package/dist/provider-api/actions/staged-datasets.js +210 -0
- package/dist/provider-api/actions/staged-datasets.js.map +1 -0
- package/dist/provider-api/gong.d.ts +44 -0
- package/dist/provider-api/gong.d.ts.map +1 -0
- package/dist/provider-api/gong.js +56 -0
- package/dist/provider-api/gong.js.map +1 -0
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/docs/source-search.d.ts +2 -1
- package/dist/scripts/docs/source-search.d.ts.map +1 -1
- package/dist/scripts/docs/source-search.js +2 -1
- package/dist/scripts/docs/source-search.js.map +1 -1
- package/dist/search/index.d.ts +88 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +267 -0
- package/dist/search/index.js.map +1 -0
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/google-oauth-credentials.d.ts +35 -0
- package/dist/server/google-oauth-credentials.d.ts.map +1 -1
- package/dist/server/google-oauth-credentials.js +48 -2
- package/dist/server/google-oauth-credentials.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/styles/chat-history-list.css +1 -313
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +32 -12
- package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/dist/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/dist/templates/chat/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/dist/templates/chat/AGENTS.md +5 -2
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +51 -157
- package/dist/templates/default/.agents/skills/actions/SKILL.md +32 -12
- package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/dist/templates/default/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/dist/templates/default/.agents/skills/integration-webhooks/SKILL.md +323 -0
- package/dist/templates/default/.agents/skills/onboarding/SKILL.md +56 -0
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +273 -0
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/dist/templates/default/AGENTS.md +25 -18
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +512 -0
- package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/dist/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/dist/templates/headless/.agents/skills/integration-webhooks/SKILL.md +323 -0
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +273 -0
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/dist/templates/headless/AGENTS.md +7 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -12
- package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/dist/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/dist/templates/workspace-core/AGENTS.md +4 -0
- package/dist/templates/workspace-root/AGENTS.md +4 -0
- package/docs/AGENTS.md +7 -0
- package/docs/content/integrations.mdx +63 -2
- package/docs/design/provider-integration-authority.md +117 -0
- package/package.json +9 -2
- package/src/templates/chat/.agents/skills/actions/SKILL.md +32 -12
- package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/src/templates/chat/AGENTS.md +5 -2
- package/src/templates/chat/app/components/layout/Sidebar.tsx +51 -157
- package/src/templates/default/.agents/skills/actions/SKILL.md +32 -12
- package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/src/templates/default/.agents/skills/integration-webhooks/SKILL.md +323 -0
- package/src/templates/default/.agents/skills/onboarding/SKILL.md +56 -0
- package/src/templates/default/.agents/skills/secrets/SKILL.md +273 -0
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/src/templates/default/AGENTS.md +25 -18
- package/src/templates/headless/.agents/skills/actions/SKILL.md +512 -0
- package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/src/templates/headless/.agents/skills/integration-webhooks/SKILL.md +323 -0
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +273 -0
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/src/templates/headless/AGENTS.md +7 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -12
- package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +10 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +102 -0
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +11 -2
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +6 -0
- package/src/templates/workspace-core/AGENTS.md +4 -0
- package/src/templates/workspace-root/AGENTS.md +4 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { z, type ZodTypeAny } from "zod";
|
|
2
|
+
import { type ActionHttpConfig, type ActionRunContext } from "../../action.js";
|
|
3
|
+
import type { ProviderApiRuntime } from "../index.js";
|
|
4
|
+
import { type CreateCustomProviderRegistrationActionOptions } from "./custom-provider-registration.js";
|
|
5
|
+
export declare function createProviderApiRequestSchema(providerSchema?: ZodTypeAny): z.ZodObject<{
|
|
6
|
+
provider: ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
7
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
8
|
+
DELETE: "DELETE";
|
|
9
|
+
GET: "GET";
|
|
10
|
+
HEAD: "HEAD";
|
|
11
|
+
PATCH: "PATCH";
|
|
12
|
+
POST: "POST";
|
|
13
|
+
PUT: "PUT";
|
|
14
|
+
}>>;
|
|
15
|
+
path: z.ZodString;
|
|
16
|
+
query: z.ZodOptional<z.ZodUnknown>;
|
|
17
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
18
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
19
|
+
auth: z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
default: "default";
|
|
21
|
+
none: "none";
|
|
22
|
+
}>>;
|
|
23
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
24
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
25
|
+
timeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
26
|
+
maxBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
27
|
+
saveToFile: z.ZodOptional<z.ZodString>;
|
|
28
|
+
stageAs: z.ZodOptional<z.ZodString>;
|
|
29
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
30
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
nextCursorPath: z.ZodOptional<z.ZodString>;
|
|
32
|
+
cursorParam: z.ZodOptional<z.ZodString>;
|
|
33
|
+
cursorBodyPath: z.ZodOptional<z.ZodString>;
|
|
34
|
+
pageParam: z.ZodOptional<z.ZodString>;
|
|
35
|
+
startPage: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
36
|
+
offsetParam: z.ZodOptional<z.ZodString>;
|
|
37
|
+
pageSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
38
|
+
maxPages: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
fetchAllPages: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
cursorPath: z.ZodString;
|
|
42
|
+
cursorParam: z.ZodOptional<z.ZodString>;
|
|
43
|
+
cursorBodyPath: z.ZodOptional<z.ZodString>;
|
|
44
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
45
|
+
maxPages: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export declare function createProviderApiCatalogSchema(providerSchema?: ZodTypeAny): z.ZodObject<{
|
|
49
|
+
provider: z.ZodOptional<ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export declare function createProviderApiDocsSchema(providerSchema?: ZodTypeAny): z.ZodObject<{
|
|
52
|
+
provider: ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
53
|
+
url: z.ZodOptional<z.ZodString>;
|
|
54
|
+
maxBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
55
|
+
maxChars: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
56
|
+
responseMode: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
auto: "auto";
|
|
58
|
+
links: "links";
|
|
59
|
+
markdown: "markdown";
|
|
60
|
+
matches: "matches";
|
|
61
|
+
metadata: "metadata";
|
|
62
|
+
raw: "raw";
|
|
63
|
+
text: "text";
|
|
64
|
+
}>>;
|
|
65
|
+
extract: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
"all-visible": "all-visible";
|
|
67
|
+
none: "none";
|
|
68
|
+
readability: "readability";
|
|
69
|
+
}>>;
|
|
70
|
+
includeLinks: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
71
|
+
search: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
query: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
73
|
+
queries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
|
+
terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
76
|
+
regexFlags: z.ZodOptional<z.ZodString>;
|
|
77
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
extracted: "extracted";
|
|
79
|
+
raw: "raw";
|
|
80
|
+
}>>;
|
|
81
|
+
maxMatches: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
82
|
+
contextChars: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
83
|
+
caseSensitive: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
interface ProviderApiActionBaseOptions<TSchema extends ZodTypeAny> {
|
|
87
|
+
schema?: TSchema;
|
|
88
|
+
description?: string;
|
|
89
|
+
http?: ActionHttpConfig | false;
|
|
90
|
+
toolCallable?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface CreateProviderApiRequestActionOptions<TSchema extends ZodTypeAny = ReturnType<typeof createProviderApiRequestSchema>> extends ProviderApiActionBaseOptions<TSchema> {
|
|
93
|
+
appId?: string;
|
|
94
|
+
getOwnerEmail?: () => string | null;
|
|
95
|
+
needsApproval?: boolean | ((args: z.output<TSchema>, ctx?: ActionRunContext) => boolean | Promise<boolean>);
|
|
96
|
+
}
|
|
97
|
+
export declare function createProviderApiRequestAction<TSchema extends ZodTypeAny = ReturnType<typeof createProviderApiRequestSchema>>(runtime: Pick<ProviderApiRuntime, "executeRequest">, options?: CreateProviderApiRequestActionOptions<TSchema>): import("../../action.js").ActionDefinition<import("better-auth").StandardSchemaV1.InferInput<TSchema | z.ZodObject<{
|
|
98
|
+
provider: ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
99
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
100
|
+
DELETE: "DELETE";
|
|
101
|
+
GET: "GET";
|
|
102
|
+
HEAD: "HEAD";
|
|
103
|
+
PATCH: "PATCH";
|
|
104
|
+
POST: "POST";
|
|
105
|
+
PUT: "PUT";
|
|
106
|
+
}>>;
|
|
107
|
+
path: z.ZodString;
|
|
108
|
+
query: z.ZodOptional<z.ZodUnknown>;
|
|
109
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
110
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
111
|
+
auth: z.ZodDefault<z.ZodEnum<{
|
|
112
|
+
default: "default";
|
|
113
|
+
none: "none";
|
|
114
|
+
}>>;
|
|
115
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
116
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
117
|
+
timeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
118
|
+
maxBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
119
|
+
saveToFile: z.ZodOptional<z.ZodString>;
|
|
120
|
+
stageAs: z.ZodOptional<z.ZodString>;
|
|
121
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
122
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
nextCursorPath: z.ZodOptional<z.ZodString>;
|
|
124
|
+
cursorParam: z.ZodOptional<z.ZodString>;
|
|
125
|
+
cursorBodyPath: z.ZodOptional<z.ZodString>;
|
|
126
|
+
pageParam: z.ZodOptional<z.ZodString>;
|
|
127
|
+
startPage: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
128
|
+
offsetParam: z.ZodOptional<z.ZodString>;
|
|
129
|
+
pageSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
130
|
+
maxPages: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
fetchAllPages: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
cursorPath: z.ZodString;
|
|
134
|
+
cursorParam: z.ZodOptional<z.ZodString>;
|
|
135
|
+
cursorBodyPath: z.ZodOptional<z.ZodString>;
|
|
136
|
+
itemsPath: z.ZodOptional<z.ZodString>;
|
|
137
|
+
maxPages: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
}, z.core.$strip>>, unknown>;
|
|
140
|
+
export interface CreateProviderApiCatalogActionOptions<TSchema extends ZodTypeAny = ReturnType<typeof createProviderApiCatalogSchema>> extends ProviderApiActionBaseOptions<TSchema> {
|
|
141
|
+
guidance?: string;
|
|
142
|
+
}
|
|
143
|
+
export declare function createProviderApiCatalogAction<TSchema extends ZodTypeAny = ReturnType<typeof createProviderApiCatalogSchema>>(runtime: Pick<ProviderApiRuntime, "listCatalog">, options?: CreateProviderApiCatalogActionOptions<TSchema>): import("../../action.js").ActionDefinition<import("better-auth").StandardSchemaV1.InferInput<TSchema | z.ZodObject<{
|
|
144
|
+
provider: z.ZodOptional<ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
145
|
+
}, z.core.$strip>>, {
|
|
146
|
+
providers: unknown[] | {
|
|
147
|
+
id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "google_slides" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "sentry" | "slack" | "stripe" | "twitter";
|
|
148
|
+
label: string;
|
|
149
|
+
defaultBaseUrl: string;
|
|
150
|
+
baseUrlCredentialKey: string | null;
|
|
151
|
+
auth: string;
|
|
152
|
+
credentialKeys: readonly string[];
|
|
153
|
+
docsUrls: readonly string[];
|
|
154
|
+
specUrls: readonly string[];
|
|
155
|
+
allowedHostSuffixes: readonly string[];
|
|
156
|
+
placeholders: readonly import("../index.js").ProviderApiPlaceholder[];
|
|
157
|
+
defaultHeaders: Record<string, string>;
|
|
158
|
+
examples: readonly import("../index.js").ProviderApiExample[];
|
|
159
|
+
notes: readonly string[];
|
|
160
|
+
corpusRecipes: readonly import("../index.js").ProviderApiCorpusRecipe[];
|
|
161
|
+
templateUses: readonly import("../../index.js").WorkspaceConnectionTemplateUse[];
|
|
162
|
+
}[];
|
|
163
|
+
guidance: string;
|
|
164
|
+
}>;
|
|
165
|
+
export interface CreateProviderApiDocsActionOptions<TSchema extends ZodTypeAny = ReturnType<typeof createProviderApiDocsSchema>> extends ProviderApiActionBaseOptions<TSchema> {
|
|
166
|
+
}
|
|
167
|
+
export declare function createProviderApiDocsAction<TSchema extends ZodTypeAny = ReturnType<typeof createProviderApiDocsSchema>>(runtime: Pick<ProviderApiRuntime, "fetchDocs">, options?: CreateProviderApiDocsActionOptions<TSchema>): import("../../action.js").ActionDefinition<import("better-auth").StandardSchemaV1.InferInput<TSchema | z.ZodObject<{
|
|
168
|
+
provider: ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
169
|
+
url: z.ZodOptional<z.ZodString>;
|
|
170
|
+
maxBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
171
|
+
maxChars: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
172
|
+
responseMode: z.ZodOptional<z.ZodEnum<{
|
|
173
|
+
auto: "auto";
|
|
174
|
+
links: "links";
|
|
175
|
+
markdown: "markdown";
|
|
176
|
+
matches: "matches";
|
|
177
|
+
metadata: "metadata";
|
|
178
|
+
raw: "raw";
|
|
179
|
+
text: "text";
|
|
180
|
+
}>>;
|
|
181
|
+
extract: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
"all-visible": "all-visible";
|
|
183
|
+
none: "none";
|
|
184
|
+
readability: "readability";
|
|
185
|
+
}>>;
|
|
186
|
+
includeLinks: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
187
|
+
search: z.ZodOptional<z.ZodObject<{
|
|
188
|
+
query: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
189
|
+
queries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
|
+
terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
192
|
+
regexFlags: z.ZodOptional<z.ZodString>;
|
|
193
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
194
|
+
extracted: "extracted";
|
|
195
|
+
raw: "raw";
|
|
196
|
+
}>>;
|
|
197
|
+
maxMatches: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
198
|
+
contextChars: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
199
|
+
caseSensitive: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
}, z.core.$strip>>, unknown>;
|
|
202
|
+
export interface CreateProviderApiActionsOptions {
|
|
203
|
+
request?: CreateProviderApiRequestActionOptions;
|
|
204
|
+
catalog?: CreateProviderApiCatalogActionOptions;
|
|
205
|
+
docs?: CreateProviderApiDocsActionOptions;
|
|
206
|
+
customProviderRegistration?: boolean;
|
|
207
|
+
registration?: CreateCustomProviderRegistrationActionOptions;
|
|
208
|
+
}
|
|
209
|
+
export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntime, "executeRequest" | "listCatalog" | "fetchDocs">, options?: CreateProviderApiActionsOptions): {
|
|
210
|
+
request: import("../../action.js").ActionDefinition<{
|
|
211
|
+
provider: unknown;
|
|
212
|
+
method?: "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | undefined;
|
|
213
|
+
path: string;
|
|
214
|
+
query?: unknown;
|
|
215
|
+
headers?: Record<string, unknown> | undefined;
|
|
216
|
+
body?: unknown;
|
|
217
|
+
auth?: "default" | "none" | undefined;
|
|
218
|
+
connectionId?: string | undefined;
|
|
219
|
+
accountId?: string | undefined;
|
|
220
|
+
timeoutMs?: unknown;
|
|
221
|
+
maxBytes?: unknown;
|
|
222
|
+
saveToFile?: string | undefined;
|
|
223
|
+
stageAs?: string | undefined;
|
|
224
|
+
itemsPath?: string | undefined;
|
|
225
|
+
pagination?: {
|
|
226
|
+
nextCursorPath?: string | undefined;
|
|
227
|
+
cursorParam?: string | undefined;
|
|
228
|
+
cursorBodyPath?: string | undefined;
|
|
229
|
+
pageParam?: string | undefined;
|
|
230
|
+
startPage?: unknown;
|
|
231
|
+
offsetParam?: string | undefined;
|
|
232
|
+
pageSize?: unknown;
|
|
233
|
+
maxPages?: unknown;
|
|
234
|
+
} | undefined;
|
|
235
|
+
fetchAllPages?: {
|
|
236
|
+
cursorPath: string;
|
|
237
|
+
cursorParam?: string | undefined;
|
|
238
|
+
cursorBodyPath?: string | undefined;
|
|
239
|
+
itemsPath?: string | undefined;
|
|
240
|
+
maxPages?: unknown;
|
|
241
|
+
} | undefined;
|
|
242
|
+
}, unknown>;
|
|
243
|
+
catalog: import("../../action.js").ActionDefinition<{
|
|
244
|
+
provider?: unknown;
|
|
245
|
+
}, {
|
|
246
|
+
providers: unknown[] | {
|
|
247
|
+
id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "google_slides" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "sentry" | "slack" | "stripe" | "twitter";
|
|
248
|
+
label: string;
|
|
249
|
+
defaultBaseUrl: string;
|
|
250
|
+
baseUrlCredentialKey: string | null;
|
|
251
|
+
auth: string;
|
|
252
|
+
credentialKeys: readonly string[];
|
|
253
|
+
docsUrls: readonly string[];
|
|
254
|
+
specUrls: readonly string[];
|
|
255
|
+
allowedHostSuffixes: readonly string[];
|
|
256
|
+
placeholders: readonly import("../index.js").ProviderApiPlaceholder[];
|
|
257
|
+
defaultHeaders: Record<string, string>;
|
|
258
|
+
examples: readonly import("../index.js").ProviderApiExample[];
|
|
259
|
+
notes: readonly string[];
|
|
260
|
+
corpusRecipes: readonly import("../index.js").ProviderApiCorpusRecipe[];
|
|
261
|
+
templateUses: readonly import("../../index.js").WorkspaceConnectionTemplateUse[];
|
|
262
|
+
}[];
|
|
263
|
+
guidance: string;
|
|
264
|
+
}>;
|
|
265
|
+
docs: import("../../action.js").ActionDefinition<{
|
|
266
|
+
provider: unknown;
|
|
267
|
+
url?: string | undefined;
|
|
268
|
+
maxBytes?: unknown;
|
|
269
|
+
maxChars?: unknown;
|
|
270
|
+
responseMode?: "auto" | "links" | "markdown" | "matches" | "metadata" | "raw" | "text" | undefined;
|
|
271
|
+
extract?: "all-visible" | "none" | "readability" | undefined;
|
|
272
|
+
includeLinks?: unknown;
|
|
273
|
+
search?: {
|
|
274
|
+
query?: string | string[] | undefined;
|
|
275
|
+
queries?: string[] | undefined;
|
|
276
|
+
terms?: string[] | undefined;
|
|
277
|
+
regex?: string | undefined;
|
|
278
|
+
regexFlags?: string | undefined;
|
|
279
|
+
source?: "extracted" | "raw" | undefined;
|
|
280
|
+
maxMatches?: unknown;
|
|
281
|
+
contextChars?: unknown;
|
|
282
|
+
caseSensitive?: unknown;
|
|
283
|
+
} | undefined;
|
|
284
|
+
}, unknown>;
|
|
285
|
+
register: import("../../action.js").ActionDefinition<{
|
|
286
|
+
operation?: "delete" | "get" | "list" | "upsert" | undefined;
|
|
287
|
+
id?: string | undefined;
|
|
288
|
+
label?: string | undefined;
|
|
289
|
+
baseUrl?: string | undefined;
|
|
290
|
+
auth?: {
|
|
291
|
+
type: "none";
|
|
292
|
+
} | {
|
|
293
|
+
type: "bearer";
|
|
294
|
+
credentialKey: string;
|
|
295
|
+
} | {
|
|
296
|
+
type: "basic";
|
|
297
|
+
usernameKey: string;
|
|
298
|
+
passwordKey: string;
|
|
299
|
+
} | {
|
|
300
|
+
type: "api-key-header";
|
|
301
|
+
credentialKey: string;
|
|
302
|
+
headerName: string;
|
|
303
|
+
} | undefined;
|
|
304
|
+
docsUrls?: string[] | undefined;
|
|
305
|
+
allowedHostSuffixes?: string[] | undefined;
|
|
306
|
+
defaultHeaders?: Record<string, string> | undefined;
|
|
307
|
+
notes?: string | undefined;
|
|
308
|
+
scope?: "org" | "user" | undefined;
|
|
309
|
+
}, {
|
|
310
|
+
id?: undefined;
|
|
311
|
+
provider?: undefined;
|
|
312
|
+
deleted?: undefined;
|
|
313
|
+
found?: undefined;
|
|
314
|
+
providers: {
|
|
315
|
+
id: string;
|
|
316
|
+
label: string;
|
|
317
|
+
baseUrl: string;
|
|
318
|
+
authType: "api-key-header" | "basic" | "bearer" | "none";
|
|
319
|
+
docsUrls: string[];
|
|
320
|
+
notes: string;
|
|
321
|
+
updatedAt: number;
|
|
322
|
+
}[];
|
|
323
|
+
count: number;
|
|
324
|
+
registered?: undefined;
|
|
325
|
+
label?: undefined;
|
|
326
|
+
message?: undefined;
|
|
327
|
+
} | {
|
|
328
|
+
id?: undefined;
|
|
329
|
+
deleted?: undefined;
|
|
330
|
+
providers?: undefined;
|
|
331
|
+
count?: undefined;
|
|
332
|
+
found: boolean;
|
|
333
|
+
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
334
|
+
registered?: undefined;
|
|
335
|
+
label?: undefined;
|
|
336
|
+
message?: undefined;
|
|
337
|
+
} | {
|
|
338
|
+
provider?: undefined;
|
|
339
|
+
deleted?: undefined;
|
|
340
|
+
providers?: undefined;
|
|
341
|
+
count?: undefined;
|
|
342
|
+
found: boolean;
|
|
343
|
+
id: string;
|
|
344
|
+
registered?: undefined;
|
|
345
|
+
label?: undefined;
|
|
346
|
+
message?: undefined;
|
|
347
|
+
} | {
|
|
348
|
+
provider?: undefined;
|
|
349
|
+
found?: undefined;
|
|
350
|
+
providers?: undefined;
|
|
351
|
+
count?: undefined;
|
|
352
|
+
deleted: boolean;
|
|
353
|
+
id: string;
|
|
354
|
+
registered?: undefined;
|
|
355
|
+
label?: undefined;
|
|
356
|
+
message?: undefined;
|
|
357
|
+
} | {
|
|
358
|
+
provider?: undefined;
|
|
359
|
+
deleted?: undefined;
|
|
360
|
+
found?: undefined;
|
|
361
|
+
providers?: undefined;
|
|
362
|
+
count?: undefined;
|
|
363
|
+
registered: boolean;
|
|
364
|
+
id: string;
|
|
365
|
+
label: string;
|
|
366
|
+
message: string;
|
|
367
|
+
}> | undefined;
|
|
368
|
+
};
|
|
369
|
+
export {};
|
|
370
|
+
//# sourceMappingURL=provider-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-api.d.ts","sourceRoot":"","sources":["../../../src/provider-api/actions/provider-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AAEzC,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,6CAA6C,EACnD,MAAM,mCAAmC,CAAC;AAqH3C,wBAAgB,8BAA8B,CAC5C,cAAc,GAAE,UAKb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuFJ;AAED,wBAAgB,8BAA8B,CAC5C,cAAc,GAAE,UAAuB;;kBASxC;AAED,wBAAgB,2BAA2B,CACzC,cAAc,GAAE,UAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4C/C;AAOD,UAAU,4BAA4B,CAAC,OAAO,SAAS,UAAU;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qCAAqC,CACpD,OAAO,SAAS,UAAU,GAAG,UAAU,CACrC,OAAO,8BAA8B,CACtC,CACD,SAAQ,4BAA4B,CAAC,OAAO,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpC,aAAa,CAAC,EACV,OAAO,GACP,CAAC,CACC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EACvB,GAAG,CAAC,EAAE,gBAAgB,KACnB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;CACtC;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,SAAS,UAAU,GAAG,UAAU,CACrC,OAAO,8BAA8B,CACtC,EAED,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EACnD,OAAO,GAAE,qCAAqC,CAAC,OAAO,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAsD7D;AAED,MAAM,WAAW,qCAAqC,CACpD,OAAO,SAAS,UAAU,GAAG,UAAU,CACrC,OAAO,8BAA8B,CACtC,CACD,SAAQ,4BAA4B,CAAC,OAAO,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,SAAS,UAAU,GAAG,UAAU,CACrC,OAAO,8BAA8B,CACtC,EAED,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,EAChD,OAAO,GAAE,qCAAqC,CAAC,OAAO,CAAM;;;;;;;;;;;;;;;;;;;;;GAoB7D;AAED,MAAM,WAAW,kCAAkC,CACjD,OAAO,SAAS,UAAU,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAC3E,SAAQ,4BAA4B,CAAC,OAAO,CAAC;CAAG;AAElD,wBAAgB,2BAA2B,CACzC,OAAO,SAAS,UAAU,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,EAE3E,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAC9C,OAAO,GAAE,kCAAkC,CAAC,OAAO,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAa1D;AAED,MAAM,WAAW,+BAA+B;IAC9C,OAAO,CAAC,EAAE,qCAAqC,CAAC;IAChD,OAAO,CAAC,EAAE,qCAAqC,CAAC;IAChD,IAAI,CAAC,EAAE,kCAAkC,CAAC;IAC1C,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,YAAY,CAAC,EAAE,6CAA6C,CAAC;CAC9D;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,IAAI,CACX,kBAAkB,EAClB,gBAAgB,GAAG,aAAa,GAAG,WAAW,CAC/C,EACD,OAAO,GAAE,+BAAoC;IAG3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACP,OAAO;;;;;;;;;;;;;;;;;;;;;;IACP,IAAI;;;;;;;;;;;;;;;;;;;;IACJ,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIX"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineAction, } from "../../action.js";
|
|
3
|
+
import { getCredentialContext } from "../../server/request-context.js";
|
|
4
|
+
import { stagingExecuteRequest } from "../staging.js";
|
|
5
|
+
import { createCustomProviderRegistrationAction, } from "./custom-provider-registration.js";
|
|
6
|
+
import { buildProviderApiAuditSummary } from "./provider-api-audit.js";
|
|
7
|
+
const MethodSchema = z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"]);
|
|
8
|
+
const PaginationSchema = z
|
|
9
|
+
.object({
|
|
10
|
+
nextCursorPath: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Dot-path in the response JSON where the next cursor/token lives, e.g. 'next_cursor', 'meta.next', or 'nextPageToken'."),
|
|
14
|
+
cursorParam: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Query parameter name to inject the cursor into the next request. Use cursorBodyPath for APIs that page through POST bodies."),
|
|
18
|
+
cursorBodyPath: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Dot-path in the JSON request body to set to the next cursor. Use this for POST-body pagination."),
|
|
22
|
+
pageParam: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe("Use page-number mode: this query param is incremented on each page."),
|
|
26
|
+
startPage: z.coerce
|
|
27
|
+
.number()
|
|
28
|
+
.int()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Starting page number for pageParam mode (default 1)."),
|
|
31
|
+
offsetParam: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe("Use offset mode: this query param is incremented by pageSize on each request."),
|
|
35
|
+
pageSize: z.coerce
|
|
36
|
+
.number()
|
|
37
|
+
.int()
|
|
38
|
+
.min(1)
|
|
39
|
+
.optional()
|
|
40
|
+
.describe("Expected page size for offset increments. Defaults to the actual item count of the first page."),
|
|
41
|
+
maxPages: z.coerce
|
|
42
|
+
.number()
|
|
43
|
+
.int()
|
|
44
|
+
.min(1)
|
|
45
|
+
.max(200)
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("Maximum pages to fetch server-side (default 50, max 200)."),
|
|
48
|
+
})
|
|
49
|
+
.optional();
|
|
50
|
+
const FetchAllPagesSchema = z
|
|
51
|
+
.object({
|
|
52
|
+
cursorPath: z
|
|
53
|
+
.string()
|
|
54
|
+
.describe("Dot-path in the JSON response body where the next-page cursor lives, e.g. 'meta.next_cursor' or 'pagination.next_page_token'."),
|
|
55
|
+
cursorParam: z
|
|
56
|
+
.string()
|
|
57
|
+
.optional()
|
|
58
|
+
.describe("Query parameter name to pass the cursor on subsequent pages, e.g. 'cursor' or 'page_token'. Use cursorBodyPath instead for APIs that put cursors in POST bodies."),
|
|
59
|
+
cursorBodyPath: z
|
|
60
|
+
.string()
|
|
61
|
+
.optional()
|
|
62
|
+
.describe("Dot-path in the JSON request body to set to the next cursor. Use for POST-body pagination."),
|
|
63
|
+
itemsPath: z
|
|
64
|
+
.string()
|
|
65
|
+
.optional()
|
|
66
|
+
.describe("Dot-path to the items array in each response, e.g. 'results' or 'data.items'. When omitted, the whole response body is appended per page."),
|
|
67
|
+
maxPages: z.coerce
|
|
68
|
+
.number()
|
|
69
|
+
.int()
|
|
70
|
+
.min(1)
|
|
71
|
+
.max(50)
|
|
72
|
+
.optional()
|
|
73
|
+
.describe("Maximum pages to fetch. Default 10, max 50. Stops early when the cursor is empty."),
|
|
74
|
+
})
|
|
75
|
+
.optional()
|
|
76
|
+
.describe("Enable cursor-based pagination. After each response, reads cursorPath from the JSON body and re-issues the request with cursorParam or cursorBodyPath set, accumulating items from itemsPath (or whole bodies) until cursor is empty or maxPages is reached. Combine with saveToFile to write the full dataset to a workspace file.");
|
|
77
|
+
const BooleanFromQuerySchema = z.preprocess((value) => (typeof value === "string" ? value === "true" : value), z.boolean());
|
|
78
|
+
const WebContentSearchSchema = z.object({
|
|
79
|
+
query: z.union([z.string(), z.array(z.string())]).optional(),
|
|
80
|
+
queries: z.array(z.string()).optional(),
|
|
81
|
+
terms: z.array(z.string()).optional(),
|
|
82
|
+
regex: z.string().optional(),
|
|
83
|
+
regexFlags: z.string().optional(),
|
|
84
|
+
source: z.enum(["extracted", "raw"]).optional(),
|
|
85
|
+
maxMatches: z.coerce.number().int().min(1).max(500).optional(),
|
|
86
|
+
contextChars: z.coerce.number().int().min(0).max(1_000).optional(),
|
|
87
|
+
caseSensitive: BooleanFromQuerySchema.optional(),
|
|
88
|
+
});
|
|
89
|
+
export function createProviderApiRequestSchema(providerSchema = z
|
|
90
|
+
.string()
|
|
91
|
+
.min(1)
|
|
92
|
+
.describe("Provider id to call — built-in or a custom provider id registered via provider-api-register. Use provider-api-catalog to list available providers.")) {
|
|
93
|
+
return z.object({
|
|
94
|
+
provider: providerSchema,
|
|
95
|
+
method: MethodSchema.default("GET").describe("HTTP method to use."),
|
|
96
|
+
path: z
|
|
97
|
+
.string()
|
|
98
|
+
.min(1)
|
|
99
|
+
.describe("Provider API path or a full URL on an allowed provider host. Use placeholders from provider-api-catalog when provided."),
|
|
100
|
+
query: z
|
|
101
|
+
.unknown()
|
|
102
|
+
.optional()
|
|
103
|
+
.describe("Optional query params as a JSON object/string. Array values produce repeated query params."),
|
|
104
|
+
headers: z
|
|
105
|
+
.record(z.string(), z.unknown())
|
|
106
|
+
.optional()
|
|
107
|
+
.describe("Optional extra headers. Unsafe hop-by-hop headers are ignored. Auth headers are injected from stored credentials."),
|
|
108
|
+
body: z
|
|
109
|
+
.unknown()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe("Optional request body. Objects/arrays are JSON encoded; strings are sent as-is."),
|
|
112
|
+
auth: z
|
|
113
|
+
.enum(["default", "none"])
|
|
114
|
+
.default("default")
|
|
115
|
+
.describe("Use default to inject configured provider auth. Use none only for public provider endpoints that intentionally require no auth."),
|
|
116
|
+
connectionId: z
|
|
117
|
+
.string()
|
|
118
|
+
.optional()
|
|
119
|
+
.describe("Optional shared workspace connection id to use when the provider has multiple granted connections."),
|
|
120
|
+
accountId: z
|
|
121
|
+
.string()
|
|
122
|
+
.optional()
|
|
123
|
+
.describe("Optional OAuth account id to use for OAuth-backed providers such as Gmail, Google Calendar, or Google Drive."),
|
|
124
|
+
timeoutMs: z.coerce
|
|
125
|
+
.number()
|
|
126
|
+
.int()
|
|
127
|
+
.min(1_000)
|
|
128
|
+
.max(120_000)
|
|
129
|
+
.optional()
|
|
130
|
+
.describe("Request timeout in milliseconds. Default 30000, max 120000."),
|
|
131
|
+
maxBytes: z.coerce
|
|
132
|
+
.number()
|
|
133
|
+
.int()
|
|
134
|
+
.min(1_000)
|
|
135
|
+
.max(4 * 1024 * 1024)
|
|
136
|
+
.optional()
|
|
137
|
+
.describe("Maximum response bytes to read. Default 1MB, max 4MB. Ignored when saveToFile is set (allows up to 20MB)."),
|
|
138
|
+
saveToFile: z
|
|
139
|
+
.string()
|
|
140
|
+
.optional()
|
|
141
|
+
.describe("Workspace file path to save the full response body to instead of returning it in context. When set, returns a compact summary and allows up to 20MB response."),
|
|
142
|
+
stageAs: z
|
|
143
|
+
.string()
|
|
144
|
+
.min(1)
|
|
145
|
+
.optional()
|
|
146
|
+
.describe("When set, parse the response as records and write them into a staged dataset with this name. Re-staging the same name replaces the previous dataset."),
|
|
147
|
+
itemsPath: z
|
|
148
|
+
.string()
|
|
149
|
+
.optional()
|
|
150
|
+
.describe("Dot-path to the items array in the response JSON. Omit for auto-detection."),
|
|
151
|
+
pagination: PaginationSchema.describe("Pagination config for server-side fetchAll when stageAs is set. Supports cursor, page, and offset modes."),
|
|
152
|
+
fetchAllPages: FetchAllPagesSchema,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
export function createProviderApiCatalogSchema(providerSchema = z.string()) {
|
|
156
|
+
return z.object({
|
|
157
|
+
provider: providerSchema
|
|
158
|
+
.optional()
|
|
159
|
+
.describe("Optional provider id to inspect. Omit to list every available provider API."),
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
export function createProviderApiDocsSchema(providerSchema = z.string().min(1)) {
|
|
163
|
+
return z.object({
|
|
164
|
+
provider: providerSchema.describe("Provider whose API docs/spec to inspect."),
|
|
165
|
+
url: z
|
|
166
|
+
.string()
|
|
167
|
+
.url()
|
|
168
|
+
.optional()
|
|
169
|
+
.describe("Optional public documentation, OpenAPI spec, changelog, or web page URL to fetch."),
|
|
170
|
+
maxBytes: z.coerce
|
|
171
|
+
.number()
|
|
172
|
+
.int()
|
|
173
|
+
.min(1_000)
|
|
174
|
+
.max(4 * 1024 * 1024)
|
|
175
|
+
.optional()
|
|
176
|
+
.describe("Maximum response bytes to read. Default 1MB, max 4MB."),
|
|
177
|
+
maxChars: z.coerce
|
|
178
|
+
.number()
|
|
179
|
+
.int()
|
|
180
|
+
.min(1)
|
|
181
|
+
.max(200_000)
|
|
182
|
+
.optional()
|
|
183
|
+
.describe("Maximum extracted content characters to return."),
|
|
184
|
+
responseMode: z
|
|
185
|
+
.enum(["auto", "raw", "text", "markdown", "links", "metadata", "matches"])
|
|
186
|
+
.optional()
|
|
187
|
+
.describe("How to return fetched docs. Default auto extracts HTML to markdown; use matches with search for compact snippets."),
|
|
188
|
+
extract: z
|
|
189
|
+
.enum(["readability", "all-visible", "none"])
|
|
190
|
+
.optional()
|
|
191
|
+
.describe("HTML extraction strategy. Default readability."),
|
|
192
|
+
includeLinks: BooleanFromQuerySchema.optional().describe("Include compact links from extracted HTML. Default true."),
|
|
193
|
+
search: WebContentSearchSchema.optional().describe("Optional post-fetch search over extracted content by default. Supports query, queries, terms, regex, source, maxMatches, and contextChars."),
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
export function createProviderApiRequestAction(runtime, options = {}) {
|
|
197
|
+
const schema = options.schema ?? createProviderApiRequestSchema();
|
|
198
|
+
return defineAction({
|
|
199
|
+
description: options.description ??
|
|
200
|
+
"Make an arbitrary authenticated HTTP request to a shared workspace integration, configured provider API, or custom provider registered via provider-api-register. Use this flexible escape hatch when a provider endpoint, filter, pagination mode, payload, or API version is not covered by a first-class action. Requests stay constrained to allowed provider hosts and credentials are injected by the provider runtime.",
|
|
201
|
+
schema,
|
|
202
|
+
http: options.http ?? false,
|
|
203
|
+
...(options.toolCallable === undefined
|
|
204
|
+
? {}
|
|
205
|
+
: { toolCallable: options.toolCallable }),
|
|
206
|
+
...(options.needsApproval === undefined
|
|
207
|
+
? {}
|
|
208
|
+
: {
|
|
209
|
+
needsApproval: options.needsApproval,
|
|
210
|
+
}),
|
|
211
|
+
audit: {
|
|
212
|
+
recordInputs: false,
|
|
213
|
+
target: (args) => ({
|
|
214
|
+
type: "provider-api",
|
|
215
|
+
id: String(args.provider),
|
|
216
|
+
visibility: "private",
|
|
217
|
+
}),
|
|
218
|
+
summary: (args) => buildProviderApiAuditSummary(args),
|
|
219
|
+
},
|
|
220
|
+
run: async (rawArgs) => {
|
|
221
|
+
const args = rawArgs;
|
|
222
|
+
if (args.stageAs) {
|
|
223
|
+
if (!options.appId) {
|
|
224
|
+
throw new Error("createProviderApiRequestAction requires appId when stageAs is used.");
|
|
225
|
+
}
|
|
226
|
+
const ownerEmail = options.getOwnerEmail
|
|
227
|
+
? options.getOwnerEmail()
|
|
228
|
+
: (getCredentialContext()?.userEmail ?? null);
|
|
229
|
+
if (!ownerEmail) {
|
|
230
|
+
throw new Error("No authenticated context for provider API staging.");
|
|
231
|
+
}
|
|
232
|
+
return stagingExecuteRequest(args, runtime.executeRequest, {
|
|
233
|
+
appId: options.appId,
|
|
234
|
+
ownerEmail,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
return runtime.executeRequest(args);
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
export function createProviderApiCatalogAction(runtime, options = {}) {
|
|
242
|
+
const schema = options.schema ?? createProviderApiCatalogSchema();
|
|
243
|
+
return defineAction({
|
|
244
|
+
description: options.description ??
|
|
245
|
+
"List raw HTTP API capabilities for shared workspace integrations, configured providers, and custom registered providers. Returns setup metadata and examples, never secret values.",
|
|
246
|
+
schema,
|
|
247
|
+
http: options.http ?? { method: "GET" },
|
|
248
|
+
readOnly: true,
|
|
249
|
+
run: async (rawArgs) => {
|
|
250
|
+
const args = rawArgs;
|
|
251
|
+
return {
|
|
252
|
+
providers: await runtime.listCatalog(args.provider),
|
|
253
|
+
guidance: options.guidance ??
|
|
254
|
+
"First-class provider actions are convenience shortcuts, not capability limits. Inspect provider docs and use provider-api-request when the upstream API can express the operation safely.",
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
export function createProviderApiDocsAction(runtime, options = {}) {
|
|
260
|
+
const schema = options.schema ?? createProviderApiDocsSchema();
|
|
261
|
+
return defineAction({
|
|
262
|
+
description: options.description ??
|
|
263
|
+
"Inspect provider API docs/spec metadata or fetch a public API documentation page, OpenAPI spec, changelog, or web page. Private and internal addresses remain blocked by the provider runtime.",
|
|
264
|
+
schema,
|
|
265
|
+
http: options.http ?? { method: "GET" },
|
|
266
|
+
readOnly: true,
|
|
267
|
+
run: async (rawArgs) => runtime.fetchDocs(rawArgs),
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
export function createProviderApiActions(runtime, options = {}) {
|
|
271
|
+
return {
|
|
272
|
+
request: createProviderApiRequestAction(runtime, options.request),
|
|
273
|
+
catalog: createProviderApiCatalogAction(runtime, options.catalog),
|
|
274
|
+
docs: createProviderApiDocsAction(runtime, options.docs),
|
|
275
|
+
register: options.customProviderRegistration
|
|
276
|
+
? createCustomProviderRegistrationAction(options.registration)
|
|
277
|
+
: undefined,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=provider-api.js.map
|