@agent-native/core 0.90.2 → 0.90.3
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 +2 -2
- package/corpus/core/CHANGELOG.md +12 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +87 -80
- package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/toolkit-agent-ux.mdx +43 -0
- package/corpus/core/docs/content/toolkit-app-adapters.mdx +9 -0
- package/corpus/core/docs/content/toolkit-collaboration-ui.mdx +12 -0
- package/corpus/core/docs/content/toolkit-collaboration.mdx +74 -0
- package/corpus/core/docs/content/toolkit-command-navigation.mdx +106 -0
- package/corpus/core/docs/content/toolkit-comments-review.mdx +98 -0
- package/corpus/core/docs/content/toolkit-history.mdx +95 -0
- package/corpus/core/docs/content/toolkit-observability.mdx +41 -0
- package/corpus/core/docs/content/toolkit-org-team.mdx +80 -0
- package/corpus/core/docs/content/toolkit-resources.mdx +57 -0
- package/corpus/core/docs/content/toolkit-settings.mdx +65 -0
- package/corpus/core/docs/content/toolkit-setup-connections.mdx +109 -0
- package/corpus/core/docs/content/toolkit-sharing-ui.mdx +18 -6
- package/corpus/core/docs/content/toolkit-sharing.mdx +81 -0
- package/corpus/core/docs/content/toolkit-shell-hooks.mdx +9 -0
- package/corpus/core/docs/content/toolkit-ui.mdx +9 -0
- package/corpus/core/package.json +35 -1
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +19 -1
- package/corpus/core/src/agent/engine/anthropic-engine.ts +25 -1
- package/corpus/core/src/agent/engine/registry.ts +23 -16
- package/corpus/core/src/agent/production-agent.ts +37 -6
- package/corpus/core/src/client/command-navigation/index.ts +15 -0
- package/corpus/core/src/client/comments-review/index.ts +1 -0
- package/corpus/core/src/client/history/VersionHistoryPanel.tsx +145 -0
- package/corpus/core/src/client/history/index.ts +18 -0
- package/corpus/core/src/client/history/use-history.ts +86 -0
- package/corpus/core/src/client/index.ts +76 -9
- package/corpus/core/src/client/org/OrgSwitcher.tsx +6 -6
- package/corpus/core/src/client/org/RequireActiveOrg.tsx +2 -2
- package/corpus/core/src/client/org/TeamPage.tsx +3 -3
- package/corpus/core/src/client/org/hooks.ts +32 -0
- package/corpus/core/src/client/org/index.ts +30 -1
- package/corpus/core/src/client/org-team/index.ts +1 -0
- package/corpus/core/src/client/review/ReviewStatusBadge.tsx +39 -0
- package/corpus/core/src/client/review/ReviewThreadPanel.tsx +278 -0
- package/corpus/core/src/client/review/index.ts +25 -0
- package/corpus/core/src/client/review/use-review.ts +114 -0
- package/corpus/core/src/client/settings/index.ts +11 -1
- package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +94 -0
- package/corpus/core/src/client/setup-connections/ProviderReadinessBadge.tsx +73 -0
- package/corpus/core/src/client/setup-connections/SetupConnectionsPage.tsx +94 -0
- package/corpus/core/src/client/setup-connections/index.ts +46 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +20 -14
- package/corpus/core/src/client/sharing/ShareDialog.tsx +3 -3
- package/corpus/core/src/command-navigation/actions.ts +100 -0
- package/corpus/core/src/command-navigation/index.ts +12 -0
- package/corpus/core/src/comments-review/index.ts +1 -0
- package/corpus/core/src/file-upload/builder.ts +24 -3
- package/corpus/core/src/file-upload/types.ts +3 -1
- package/corpus/core/src/history/actions/create-resource-version.ts +89 -0
- package/corpus/core/src/history/actions/get-resource-version.ts +60 -0
- package/corpus/core/src/history/actions/list-resource-history.ts +53 -0
- package/corpus/core/src/history/actions/list-resource-versions.ts +43 -0
- package/corpus/core/src/history/actions/restore-resource-version.ts +96 -0
- package/corpus/core/src/history/index.ts +27 -0
- package/corpus/core/src/history/registry.ts +99 -0
- package/corpus/core/src/history/store.ts +348 -0
- package/corpus/core/src/history/types.ts +69 -0
- package/corpus/core/src/index.ts +10 -0
- package/corpus/core/src/navigation/index.ts +170 -0
- package/corpus/core/src/org/index.ts +8 -0
- package/corpus/core/src/org/permissions.ts +30 -0
- package/corpus/core/src/org-team/index.ts +1 -0
- package/corpus/core/src/private-blob/registry.ts +1 -0
- package/corpus/core/src/review/actions/consume-review-feedback.ts +38 -0
- package/corpus/core/src/review/actions/create-review-comment.ts +107 -0
- package/corpus/core/src/review/actions/delete-review-comment.ts +55 -0
- package/corpus/core/src/review/actions/get-review-feedback.ts +54 -0
- package/corpus/core/src/review/actions/list-review-comments.ts +53 -0
- package/corpus/core/src/review/actions/reply-review-comment.ts +107 -0
- package/corpus/core/src/review/actions/resolve-review-thread.ts +60 -0
- package/corpus/core/src/review/actions/set-review-status.ts +58 -0
- package/corpus/core/src/review/index.ts +36 -0
- package/corpus/core/src/review/mentions.ts +44 -0
- package/corpus/core/src/review/registry.ts +99 -0
- package/corpus/core/src/review/store.ts +687 -0
- package/corpus/core/src/review/types.ts +97 -0
- package/corpus/core/src/server/action-discovery.ts +54 -0
- package/corpus/core/src/server/agent-engine-api-key-route.ts +5 -0
- package/corpus/core/src/server/credential-provider.ts +108 -0
- package/corpus/core/src/setup-connections/index.ts +89 -0
- package/corpus/core/src/setup-connections/onboarding.ts +47 -0
- package/corpus/core/src/transcription/builder-transcription.ts +9 -2
- package/corpus/core/src/vite/action-types-plugin.ts +52 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/analytics/app/global.css +22 -10
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +6 -1
- package/corpus/templates/analytics/app/i18n-data.ts +81 -13
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +2 -2
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +2 -2
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +528 -108
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +466 -183
- package/corpus/templates/analytics/changelog/2026-07-07-session-replays-load-sooner-show-clearer-activity-timelines-.md +6 -0
- package/corpus/templates/brain/app/routes/settings.tsx +2 -2
- package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +32 -6
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +120 -40
- package/corpus/templates/calendar/app/hooks/use-people.ts +55 -0
- package/corpus/templates/calendar/changelog/2026-07-07-guest-suggestions-now-find-coworkers-from-your-google-worksp.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-07-zoom-stays-selected-after-connecting-it-from-a-draft-event.md +6 -0
- package/corpus/templates/clips/actions/create-recording.ts +5 -1
- package/corpus/templates/clips/actions/finalize-recording.ts +140 -1
- package/corpus/templates/clips/actions/import-loom-recording.ts +1 -0
- package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +1 -0
- package/corpus/templates/clips/actions/request-transcript.ts +31 -0
- package/corpus/templates/clips/actions/set-thumbnail.ts +2 -0
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +2 -2
- package/corpus/templates/clips/app/components/player/scrubber-position.ts +9 -0
- package/corpus/templates/clips/app/components/player/scrubber.tsx +5 -2
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +69 -41
- package/corpus/templates/clips/app/components/player/video-player.tsx +38 -1
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +3 -3
- package/corpus/templates/clips/app/components/sharing/slack-share-hint.tsx +9 -19
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +9 -3
- package/corpus/templates/clips/app/routes/record.tsx +21 -12
- package/corpus/templates/clips/changelog/2026-07-02-recordings-now-wait-for-storage-media-to-serve-before-finishing.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-a-pending-app-update-no-longer-blocks-screen-recording-updat.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-chrome-extension-recordings-keep-audio-after-refreshing-tab.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-clip-playback-progress-now-starts-and-finishes-at-the-right-times.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-sharing-public-clips-now-stays-focused-on-the-normal-link-wi.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +18 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +23 -8
- package/corpus/templates/clips/desktop/src/app.tsx +40 -3
- package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +19 -7
- package/corpus/templates/clips/desktop/src/lib/permissions.ts +2 -0
- package/corpus/templates/clips/desktop/src/lib/updater.ts +25 -2
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +7 -0
- package/corpus/templates/clips/server/routes/api/recordings/[recordingId]/thumbnail.post.ts +1 -0
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +22 -5
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +8 -0
- package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +13 -6
- package/corpus/templates/clips/shared/finalize-recovery.ts +12 -0
- package/corpus/templates/content/actions/delete-document.ts +337 -52
- package/corpus/templates/content/changelog/2026-07-07-permanently-deleting-trashed-databases-now-finishes-reliably.md +6 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +2 -2
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +15 -1
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
- package/dist/agent/engine/anthropic-engine.js +20 -1
- package/dist/agent/engine/anthropic-engine.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +22 -14
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +27 -7
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/command-navigation/index.d.ts +4 -0
- package/dist/client/command-navigation/index.d.ts.map +1 -0
- package/dist/client/command-navigation/index.js +4 -0
- package/dist/client/command-navigation/index.js.map +1 -0
- package/dist/client/comments-review/index.d.ts +2 -0
- package/dist/client/comments-review/index.d.ts.map +1 -0
- package/dist/client/comments-review/index.js +2 -0
- package/dist/client/comments-review/index.js.map +1 -0
- package/dist/client/history/VersionHistoryPanel.d.ts +18 -0
- package/dist/client/history/VersionHistoryPanel.d.ts.map +1 -0
- package/dist/client/history/VersionHistoryPanel.js +24 -0
- package/dist/client/history/VersionHistoryPanel.js.map +1 -0
- package/dist/client/history/index.d.ts +3 -0
- package/dist/client/history/index.d.ts.map +1 -0
- package/dist/client/history/index.js +3 -0
- package/dist/client/history/index.js.map +1 -0
- package/dist/client/history/use-history.d.ts +46 -0
- package/dist/client/history/use-history.d.ts.map +1 -0
- package/dist/client/history/use-history.js +18 -0
- package/dist/client/history/use-history.js.map +1 -0
- package/dist/client/index.d.ts +6 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +6 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.js +5 -5
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/RequireActiveOrg.js +2 -2
- package/dist/client/org/RequireActiveOrg.js.map +1 -1
- package/dist/client/org/TeamPage.js +3 -3
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/hooks.d.ts +12 -1
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +15 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +4 -2
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +3 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/org-team/index.d.ts +2 -0
- package/dist/client/org-team/index.d.ts.map +1 -0
- package/dist/client/org-team/index.js +2 -0
- package/dist/client/org-team/index.js.map +1 -0
- package/dist/client/review/ReviewStatusBadge.d.ts +7 -0
- package/dist/client/review/ReviewStatusBadge.d.ts.map +1 -0
- package/dist/client/review/ReviewStatusBadge.js +19 -0
- package/dist/client/review/ReviewStatusBadge.js.map +1 -0
- package/dist/client/review/ReviewThreadPanel.d.ts +20 -0
- package/dist/client/review/ReviewThreadPanel.d.ts.map +1 -0
- package/dist/client/review/ReviewThreadPanel.js +84 -0
- package/dist/client/review/ReviewThreadPanel.js.map +1 -0
- package/dist/client/review/index.d.ts +4 -0
- package/dist/client/review/index.d.ts.map +1 -0
- package/dist/client/review/index.js +4 -0
- package/dist/client/review/index.js.map +1 -0
- package/dist/client/review/use-review.d.ts +68 -0
- package/dist/client/review/use-review.d.ts.map +1 -0
- package/dist/client/review/use-review.js +22 -0
- package/dist/client/review/use-review.js.map +1 -0
- package/dist/client/settings/index.d.ts +1 -1
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -1
- package/dist/client/settings/index.js.map +1 -1
- package/dist/client/setup-connections/BuilderConnectCard.d.ts +9 -0
- package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -0
- package/dist/client/setup-connections/BuilderConnectCard.js +25 -0
- package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.d.ts +8 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.d.ts.map +1 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.js +32 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.js.map +1 -0
- package/dist/client/setup-connections/SetupConnectionsPage.d.ts +17 -0
- package/dist/client/setup-connections/SetupConnectionsPage.d.ts.map +1 -0
- package/dist/client/setup-connections/SetupConnectionsPage.js +10 -0
- package/dist/client/setup-connections/SetupConnectionsPage.js.map +1 -0
- package/dist/client/setup-connections/index.d.ts +7 -0
- package/dist/client/setup-connections/index.d.ts.map +1 -0
- package/dist/client/setup-connections/index.js +7 -0
- package/dist/client/setup-connections/index.js.map +1 -0
- package/dist/client/sharing/ShareButton.d.ts +4 -4
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +13 -7
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.js +3 -3
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/command-navigation/actions.d.ts +25 -0
- package/dist/command-navigation/actions.d.ts.map +1 -0
- package/dist/command-navigation/actions.js +64 -0
- package/dist/command-navigation/actions.js.map +1 -0
- package/dist/command-navigation/index.d.ts +4 -0
- package/dist/command-navigation/index.d.ts.map +1 -0
- package/dist/command-navigation/index.js +4 -0
- package/dist/command-navigation/index.js.map +1 -0
- package/dist/comments-review/index.d.ts +2 -0
- package/dist/comments-review/index.d.ts.map +1 -0
- package/dist/comments-review/index.js +2 -0
- package/dist/comments-review/index.js.map +1 -0
- package/dist/file-upload/builder.d.ts.map +1 -1
- package/dist/file-upload/builder.js +18 -2
- package/dist/file-upload/builder.js.map +1 -1
- package/dist/file-upload/types.d.ts +3 -0
- package/dist/file-upload/types.d.ts.map +1 -1
- package/dist/file-upload/types.js.map +1 -1
- package/dist/history/actions/create-resource-version.d.ts +10 -0
- package/dist/history/actions/create-resource-version.d.ts.map +1 -0
- package/dist/history/actions/create-resource-version.js +65 -0
- package/dist/history/actions/create-resource-version.js.map +1 -0
- package/dist/history/actions/get-resource-version.d.ts +10 -0
- package/dist/history/actions/get-resource-version.d.ts.map +1 -0
- package/dist/history/actions/get-resource-version.js +38 -0
- package/dist/history/actions/get-resource-version.js.map +1 -0
- package/dist/history/actions/list-resource-history.d.ts +10 -0
- package/dist/history/actions/list-resource-history.d.ts.map +1 -0
- package/dist/history/actions/list-resource-history.js +45 -0
- package/dist/history/actions/list-resource-history.js.map +1 -0
- package/dist/history/actions/list-resource-versions.d.ts +10 -0
- package/dist/history/actions/list-resource-versions.d.ts.map +1 -0
- package/dist/history/actions/list-resource-versions.js +35 -0
- package/dist/history/actions/list-resource-versions.js.map +1 -0
- package/dist/history/actions/restore-resource-version.d.ts +11 -0
- package/dist/history/actions/restore-resource-version.d.ts.map +1 -0
- package/dist/history/actions/restore-resource-version.js +59 -0
- package/dist/history/actions/restore-resource-version.js.map +1 -0
- package/dist/history/index.d.ts +4 -0
- package/dist/history/index.d.ts.map +1 -0
- package/dist/history/index.js +3 -0
- package/dist/history/index.js.map +1 -0
- package/dist/history/registry.d.ts +10 -0
- package/dist/history/registry.d.ts.map +1 -0
- package/dist/history/registry.js +61 -0
- package/dist/history/registry.js.map +1 -0
- package/dist/history/store.d.ts +34 -0
- package/dist/history/store.d.ts.map +1 -0
- package/dist/history/store.js +265 -0
- package/dist/history/store.js.map +1 -0
- package/dist/history/types.d.ts +55 -0
- package/dist/history/types.d.ts.map +1 -0
- package/dist/history/types.js +2 -0
- package/dist/history/types.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/navigation/index.d.ts +53 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +105 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/org/index.d.ts +1 -0
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +1 -0
- package/dist/org/index.js.map +1 -1
- package/dist/org/permissions.d.ts +7 -0
- package/dist/org/permissions.d.ts.map +1 -0
- package/dist/org/permissions.js +21 -0
- package/dist/org/permissions.js.map +1 -0
- package/dist/org-team/index.d.ts +2 -0
- package/dist/org-team/index.d.ts.map +1 -0
- package/dist/org-team/index.js +2 -0
- package/dist/org-team/index.js.map +1 -0
- package/dist/private-blob/registry.d.ts.map +1 -1
- package/dist/private-blob/registry.js +1 -0
- package/dist/private-blob/registry.js.map +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/review/actions/consume-review-feedback.d.ts +9 -0
- package/dist/review/actions/consume-review-feedback.d.ts.map +1 -0
- package/dist/review/actions/consume-review-feedback.js +29 -0
- package/dist/review/actions/consume-review-feedback.js.map +1 -0
- package/dist/review/actions/create-review-comment.d.ts +18 -0
- package/dist/review/actions/create-review-comment.d.ts.map +1 -0
- package/dist/review/actions/create-review-comment.js +81 -0
- package/dist/review/actions/create-review-comment.js.map +1 -0
- package/dist/review/actions/delete-review-comment.d.ts +10 -0
- package/dist/review/actions/delete-review-comment.d.ts.map +1 -0
- package/dist/review/actions/delete-review-comment.js +45 -0
- package/dist/review/actions/delete-review-comment.js.map +1 -0
- package/dist/review/actions/get-review-feedback.d.ts +10 -0
- package/dist/review/actions/get-review-feedback.d.ts.map +1 -0
- package/dist/review/actions/get-review-feedback.js +45 -0
- package/dist/review/actions/get-review-feedback.js.map +1 -0
- package/dist/review/actions/list-review-comments.d.ts +13 -0
- package/dist/review/actions/list-review-comments.d.ts.map +1 -0
- package/dist/review/actions/list-review-comments.js +44 -0
- package/dist/review/actions/list-review-comments.js.map +1 -0
- package/dist/review/actions/reply-review-comment.d.ts +16 -0
- package/dist/review/actions/reply-review-comment.d.ts.map +1 -0
- package/dist/review/actions/reply-review-comment.js +84 -0
- package/dist/review/actions/reply-review-comment.js.map +1 -0
- package/dist/review/actions/resolve-review-thread.d.ts +11 -0
- package/dist/review/actions/resolve-review-thread.d.ts.map +1 -0
- package/dist/review/actions/resolve-review-thread.js +46 -0
- package/dist/review/actions/resolve-review-thread.js.map +1 -0
- package/dist/review/actions/set-review-status.d.ts +9 -0
- package/dist/review/actions/set-review-status.d.ts.map +1 -0
- package/dist/review/actions/set-review-status.js +43 -0
- package/dist/review/actions/set-review-status.js.map +1 -0
- package/dist/review/index.d.ts +5 -0
- package/dist/review/index.d.ts.map +1 -0
- package/dist/review/index.js +4 -0
- package/dist/review/index.js.map +1 -0
- package/dist/review/mentions.d.ts +4 -0
- package/dist/review/mentions.d.ts.map +1 -0
- package/dist/review/mentions.js +39 -0
- package/dist/review/mentions.js.map +1 -0
- package/dist/review/registry.d.ts +10 -0
- package/dist/review/registry.d.ts.map +1 -0
- package/dist/review/registry.js +61 -0
- package/dist/review/registry.js.map +1 -0
- package/dist/review/store.d.ts +63 -0
- package/dist/review/store.d.ts.map +1 -0
- package/dist/review/store.js +558 -0
- package/dist/review/store.js.map +1 -0
- package/dist/review/types.d.ts +77 -0
- package/dist/review/types.d.ts.map +1 -0
- package/dist/review/types.js +2 -0
- package/dist/review/types.js.map +1 -0
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +54 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts.map +1 -1
- package/dist/server/agent-engine-api-key-route.js +5 -0
- package/dist/server/agent-engine-api-key-route.js.map +1 -1
- package/dist/server/credential-provider.d.ts +26 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +82 -0
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/setup-connections/index.d.ts +6 -0
- package/dist/setup-connections/index.d.ts.map +1 -0
- package/dist/setup-connections/index.js +6 -0
- package/dist/setup-connections/index.js.map +1 -0
- package/dist/setup-connections/onboarding.d.ts +14 -0
- package/dist/setup-connections/onboarding.d.ts.map +1 -0
- package/dist/setup-connections/onboarding.js +23 -0
- package/dist/setup-connections/onboarding.js.map +1 -0
- package/dist/transcription/builder-transcription.d.ts +1 -0
- package/dist/transcription/builder-transcription.d.ts.map +1 -1
- package/dist/transcription/builder-transcription.js +5 -2
- package/dist/transcription/builder-transcription.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +52 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +87 -80
- package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
- package/docs/content/toolkit-agent-ux.mdx +43 -0
- package/docs/content/toolkit-app-adapters.mdx +9 -0
- package/docs/content/toolkit-collaboration-ui.mdx +12 -0
- package/docs/content/toolkit-collaboration.mdx +74 -0
- package/docs/content/toolkit-command-navigation.mdx +106 -0
- package/docs/content/toolkit-comments-review.mdx +98 -0
- package/docs/content/toolkit-history.mdx +95 -0
- package/docs/content/toolkit-observability.mdx +41 -0
- package/docs/content/toolkit-org-team.mdx +80 -0
- package/docs/content/toolkit-resources.mdx +57 -0
- package/docs/content/toolkit-settings.mdx +65 -0
- package/docs/content/toolkit-setup-connections.mdx +109 -0
- package/docs/content/toolkit-sharing-ui.mdx +18 -6
- package/docs/content/toolkit-sharing.mdx +81 -0
- package/docs/content/toolkit-shell-hooks.mdx +9 -0
- package/docs/content/toolkit-ui.mdx +9 -0
- package/package.json +36 -2
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { AGENT_NATIVE_OPEN_PATH, withCollapsedAgentSidebarParam, } from "../shared/agent-sidebar-url.js";
|
|
2
|
+
export const STANDARD_APP_ROUTES = {
|
|
3
|
+
home: "/",
|
|
4
|
+
settings: "/settings",
|
|
5
|
+
team: "/team",
|
|
6
|
+
};
|
|
7
|
+
export const STANDARD_SETTINGS_TABS = {
|
|
8
|
+
general: "general",
|
|
9
|
+
agent: "agent",
|
|
10
|
+
providers: "providers",
|
|
11
|
+
connections: "connections",
|
|
12
|
+
secrets: "secrets",
|
|
13
|
+
team: "team",
|
|
14
|
+
usage: "usage",
|
|
15
|
+
language: "language",
|
|
16
|
+
whatsNew: "whats-new",
|
|
17
|
+
};
|
|
18
|
+
function normalizeLeadingPath(path) {
|
|
19
|
+
const trimmed = path.trim();
|
|
20
|
+
if (!trimmed || trimmed === "/")
|
|
21
|
+
return "/";
|
|
22
|
+
return `/${trimmed.replace(/^\/+/, "").replace(/\/+$/, "")}`;
|
|
23
|
+
}
|
|
24
|
+
function normalizeTabId(tab) {
|
|
25
|
+
return tab
|
|
26
|
+
.trim()
|
|
27
|
+
.replace(/^#/, "")
|
|
28
|
+
.toLowerCase()
|
|
29
|
+
.replace(/['"]/g, "")
|
|
30
|
+
.replace(/[\s_]+/g, "-");
|
|
31
|
+
}
|
|
32
|
+
function pathSegment(value) {
|
|
33
|
+
return encodeURIComponent(value.trim().replace(/^\/+|\/+$/g, ""));
|
|
34
|
+
}
|
|
35
|
+
function resolveOpenPathRoute(route, params) {
|
|
36
|
+
if (!route)
|
|
37
|
+
return null;
|
|
38
|
+
return typeof route === "function" ? route(params) : route;
|
|
39
|
+
}
|
|
40
|
+
export function buildSettingsRoute(tab, basePath = STANDARD_APP_ROUTES.settings) {
|
|
41
|
+
const path = normalizeLeadingPath(basePath);
|
|
42
|
+
const normalizedTab = tab ? normalizeTabId(tab) : null;
|
|
43
|
+
if (!normalizedTab || normalizedTab === STANDARD_SETTINGS_TABS.general) {
|
|
44
|
+
return path;
|
|
45
|
+
}
|
|
46
|
+
return `${path}#${encodeURIComponent(normalizedTab)}`;
|
|
47
|
+
}
|
|
48
|
+
export function buildTeamRoute(options = {}) {
|
|
49
|
+
return options.teamInSettings
|
|
50
|
+
? buildSettingsRoute(STANDARD_SETTINGS_TABS.team)
|
|
51
|
+
: STANDARD_APP_ROUTES.team;
|
|
52
|
+
}
|
|
53
|
+
export function buildStandardAppRoute(route, options = {}) {
|
|
54
|
+
if (route === "settings")
|
|
55
|
+
return buildSettingsRoute(options.settingsTab);
|
|
56
|
+
if (route === "team")
|
|
57
|
+
return buildTeamRoute(options);
|
|
58
|
+
return STANDARD_APP_ROUTES[route];
|
|
59
|
+
}
|
|
60
|
+
export function buildResourceRoute(collection, resourceId, options = {}) {
|
|
61
|
+
const base = normalizeLeadingPath(options.basePath ?? "/");
|
|
62
|
+
const collectionPath = collection
|
|
63
|
+
.split("/")
|
|
64
|
+
.map((segment) => pathSegment(segment))
|
|
65
|
+
.filter(Boolean)
|
|
66
|
+
.join("/");
|
|
67
|
+
if (!collectionPath)
|
|
68
|
+
throw new Error("collection is required");
|
|
69
|
+
if (!resourceId.trim())
|
|
70
|
+
throw new Error("resourceId is required");
|
|
71
|
+
const prefix = base === "/" ? "" : base;
|
|
72
|
+
return `${prefix}/${collectionPath}/${pathSegment(resourceId)}`;
|
|
73
|
+
}
|
|
74
|
+
export function buildOpenRoutePath(input) {
|
|
75
|
+
const sp = new URLSearchParams();
|
|
76
|
+
if (input.app)
|
|
77
|
+
sp.set("app", input.app);
|
|
78
|
+
sp.set("view", input.view);
|
|
79
|
+
if (input.to)
|
|
80
|
+
sp.set("to", input.to);
|
|
81
|
+
for (const [key, value] of Object.entries(input.params ?? {})) {
|
|
82
|
+
if (value === undefined || value === null || value === "")
|
|
83
|
+
continue;
|
|
84
|
+
sp.set(key, String(value));
|
|
85
|
+
}
|
|
86
|
+
return withCollapsedAgentSidebarParam(`${AGENT_NATIVE_OPEN_PATH}?${sp}`);
|
|
87
|
+
}
|
|
88
|
+
export function buildOpenRouteLink(input) {
|
|
89
|
+
return {
|
|
90
|
+
...input,
|
|
91
|
+
label: input.label ?? `Open ${input.view}`,
|
|
92
|
+
url: buildOpenRoutePath(input),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export function createStandardOpenPathResolver(routes, options = {}) {
|
|
96
|
+
return (input) => {
|
|
97
|
+
void input.app;
|
|
98
|
+
if (!input.view)
|
|
99
|
+
return resolveOpenPathRoute(options.fallback, input.params);
|
|
100
|
+
return (resolveOpenPathRoute(routes[input.view], input.params) ??
|
|
101
|
+
resolveOpenPathRoute(options.fallback, input.params) ??
|
|
102
|
+
`/${input.view}`);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,gCAAgC,CAAC;AAExC,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,OAAO;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;CACb,CAAC;AAmCX,SAAS,oBAAoB,CAAC,IAAY;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,GAAG;QAAE,OAAO,GAAG,CAAC;IAC5C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EA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J,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {\n AGENT_NATIVE_OPEN_PATH,\n withCollapsedAgentSidebarParam,\n} from \"../shared/agent-sidebar-url.js\";\n\nexport const STANDARD_APP_ROUTES = {\n home: \"/\",\n settings: \"/settings\",\n team: \"/team\",\n} as const;\n\nexport const STANDARD_SETTINGS_TABS = {\n general: \"general\",\n agent: \"agent\",\n providers: \"providers\",\n connections: \"connections\",\n secrets: \"secrets\",\n team: \"team\",\n usage: \"usage\",\n language: \"language\",\n whatsNew: \"whats-new\",\n} as const;\n\nexport type StandardAppRouteId = keyof typeof STANDARD_APP_ROUTES;\nexport type StandardSettingsTabId =\n (typeof STANDARD_SETTINGS_TABS)[keyof typeof STANDARD_SETTINGS_TABS];\n\nexport interface BuildStandardAppRouteOptions {\n settingsTab?: StandardSettingsTabId | string | null;\n teamInSettings?: boolean;\n}\n\nexport interface BuildResourceRouteOptions {\n basePath?: string;\n}\n\nexport interface NavigationTarget {\n app?: string;\n view: string;\n params?: Record<string, string | number | boolean | null | undefined>;\n to?: string;\n}\n\nexport interface NavigationLink extends NavigationTarget {\n label: string;\n url: string;\n}\n\nexport type StandardOpenPathRoute =\n | string\n | ((params: Record<string, string>) => string | null | undefined);\n\nexport interface StandardOpenPathResolverOptions {\n fallback?: StandardOpenPathRoute;\n}\n\nfunction normalizeLeadingPath(path: string): string {\n const trimmed = path.trim();\n if (!trimmed || trimmed === \"/\") return \"/\";\n return `/${trimmed.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\")}`;\n}\n\nfunction normalizeTabId(tab: string): string {\n return tab\n .trim()\n .replace(/^#/, \"\")\n .toLowerCase()\n .replace(/['\"]/g, \"\")\n .replace(/[\\s_]+/g, \"-\");\n}\n\nfunction pathSegment(value: string): string {\n return encodeURIComponent(value.trim().replace(/^\\/+|\\/+$/g, \"\"));\n}\n\nfunction resolveOpenPathRoute(\n route: StandardOpenPathRoute | undefined,\n params: Record<string, string>,\n): string | null | undefined {\n if (!route) return null;\n return typeof route === \"function\" ? route(params) : route;\n}\n\nexport function buildSettingsRoute(\n tab?: StandardSettingsTabId | string | null,\n basePath = STANDARD_APP_ROUTES.settings,\n): string {\n const path = normalizeLeadingPath(basePath);\n const normalizedTab = tab ? normalizeTabId(tab) : null;\n if (!normalizedTab || normalizedTab === STANDARD_SETTINGS_TABS.general) {\n return path;\n }\n return `${path}#${encodeURIComponent(normalizedTab)}`;\n}\n\nexport function buildTeamRoute(\n options: Pick<BuildStandardAppRouteOptions, \"teamInSettings\"> = {},\n): string {\n return options.teamInSettings\n ? buildSettingsRoute(STANDARD_SETTINGS_TABS.team)\n : STANDARD_APP_ROUTES.team;\n}\n\nexport function buildStandardAppRoute(\n route: StandardAppRouteId,\n options: BuildStandardAppRouteOptions = {},\n): string {\n if (route === \"settings\") return buildSettingsRoute(options.settingsTab);\n if (route === \"team\") return buildTeamRoute(options);\n return STANDARD_APP_ROUTES[route];\n}\n\nexport function buildResourceRoute(\n collection: string,\n resourceId: string,\n options: BuildResourceRouteOptions = {},\n): string {\n const base = normalizeLeadingPath(options.basePath ?? \"/\");\n const collectionPath = collection\n .split(\"/\")\n .map((segment) => pathSegment(segment))\n .filter(Boolean)\n .join(\"/\");\n if (!collectionPath) throw new Error(\"collection is required\");\n if (!resourceId.trim()) throw new Error(\"resourceId is required\");\n const prefix = base === \"/\" ? \"\" : base;\n return `${prefix}/${collectionPath}/${pathSegment(resourceId)}`;\n}\n\nexport function buildOpenRoutePath(input: NavigationTarget): string {\n const sp = new URLSearchParams();\n if (input.app) sp.set(\"app\", input.app);\n sp.set(\"view\", input.view);\n if (input.to) sp.set(\"to\", input.to);\n for (const [key, value] of Object.entries(input.params ?? {})) {\n if (value === undefined || value === null || value === \"\") continue;\n sp.set(key, String(value));\n }\n return withCollapsedAgentSidebarParam(`${AGENT_NATIVE_OPEN_PATH}?${sp}`);\n}\n\nexport function buildOpenRouteLink(\n input: NavigationTarget & { label?: string },\n): NavigationLink {\n return {\n ...input,\n label: input.label ?? `Open ${input.view}`,\n url: buildOpenRoutePath(input),\n };\n}\n\nexport function createStandardOpenPathResolver(\n routes: Record<string, StandardOpenPathRoute>,\n options: StandardOpenPathResolverOptions = {},\n) {\n return (input: {\n app?: string;\n view?: string;\n params: Record<string, string>;\n }): string | null | undefined => {\n void input.app;\n if (!input.view)\n return resolveOpenPathRoute(options.fallback, input.params);\n return (\n resolveOpenPathRoute(routes[input.view], input.params) ??\n resolveOpenPathRoute(options.fallback, input.params) ??\n `/${input.view}`\n );\n };\n}\n"]}
|
package/dist/org/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { OrgRole, OrgContext, OrgSummary, OrgInvitationSummary, OrgInfo, OrgMember, OrgPendingInvitation, } from "./types.js";
|
|
2
|
+
export { canInviteOrgMembers, canManageOrg, canManageOrgDomain, orgRoleAtLeast, orgRoleRank, } from "./permissions.js";
|
|
2
3
|
export { getOrgContext, getOrgDomain, getOrgA2ASecret, getA2ASecretByDomain, resolveOrgByDomain, resolveOrgIdForEmail, createOrganization, } from "./context.js";
|
|
3
4
|
export { acceptPendingInvitationsForEmail } from "./accept-pending.js";
|
|
4
5
|
export type { AcceptPendingResult } from "./accept-pending.js";
|
package/dist/org/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/org/index.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,OAAO,EACP,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE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AE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIhE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIxE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/org/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Public API for the org module.
|
|
2
|
+
export { canInviteOrgMembers, canManageOrg, canManageOrgDomain, orgRoleAtLeast, orgRoleRank, } from "./permissions.js";
|
|
2
3
|
export { getOrgContext, getOrgDomain, getOrgA2ASecret, getA2ASecretByDomain, resolveOrgByDomain, resolveOrgIdForEmail, createOrganization, } from "./context.js";
|
|
3
4
|
export { acceptPendingInvitationsForEmail } from "./accept-pending.js";
|
|
4
5
|
export { autoJoinDomainMatchingOrgs } from "./auto-join-domain.js";
|
package/dist/org/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/org/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAYjC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEhE,2EAA2E;AAC3E,wDAAwD;AACxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExE,8EAA8E;AAC9E,qDAAqD;AACrD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["// Public API for the org module.\n\nexport type {\n OrgRole,\n OrgContext,\n OrgSummary,\n OrgInvitationSummary,\n OrgInfo,\n OrgMember,\n OrgPendingInvitation,\n} from \"./types.js\";\n\nexport {\n getOrgContext,\n getOrgDomain,\n getOrgA2ASecret,\n getA2ASecretByDomain,\n resolveOrgByDomain,\n resolveOrgIdForEmail,\n createOrganization,\n} from \"./context.js\";\n\nexport { acceptPendingInvitationsForEmail } from \"./accept-pending.js\";\nexport type { AcceptPendingResult } from \"./accept-pending.js\";\n\nexport { autoJoinDomainMatchingOrgs } from \"./auto-join-domain.js\";\nexport type { AutoJoinDomainResult } from \"./auto-join-domain.js\";\n\nexport { ORG_MIGRATIONS } from \"./migrations.js\";\n\nexport { createOrgPlugin, defaultOrgPlugin } from \"./plugin.js\";\n\n// Drizzle schema (re-exported so templates can write typed queries against\n// org tables without redefining the schema themselves).\nexport { organizations, orgMembers, orgInvitations } from \"./schema.js\";\n\n// Individual handlers — exported so templates can compose a custom org plugin\n// while still using the framework-provided handlers.\nexport {\n getMyOrgHandler,\n createOrgHandler,\n updateOrgHandler,\n switchOrgHandler,\n listMembersHandler,\n removeMemberHandler,\n changeMemberRoleHandler,\n listInvitationsHandler,\n createInvitationHandler,\n acceptInvitationHandler,\n setA2ASecretHandler,\n syncA2ASecretHandler,\n receiveA2ASecretHandler,\n} from \"./handlers.js\";\n\nexport { isFreeEmailProvider } from \"./free-email-providers.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/org/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAYjC,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEhE,2EAA2E;AAC3E,wDAAwD;AACxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExE,8EAA8E;AAC9E,qDAAqD;AACrD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["// Public API for the org module.\n\nexport type {\n OrgRole,\n OrgContext,\n OrgSummary,\n OrgInvitationSummary,\n OrgInfo,\n OrgMember,\n OrgPendingInvitation,\n} from \"./types.js\";\n\nexport {\n canInviteOrgMembers,\n canManageOrg,\n canManageOrgDomain,\n orgRoleAtLeast,\n orgRoleRank,\n} from \"./permissions.js\";\n\nexport {\n getOrgContext,\n getOrgDomain,\n getOrgA2ASecret,\n getA2ASecretByDomain,\n resolveOrgByDomain,\n resolveOrgIdForEmail,\n createOrganization,\n} from \"./context.js\";\n\nexport { acceptPendingInvitationsForEmail } from \"./accept-pending.js\";\nexport type { AcceptPendingResult } from \"./accept-pending.js\";\n\nexport { autoJoinDomainMatchingOrgs } from \"./auto-join-domain.js\";\nexport type { AutoJoinDomainResult } from \"./auto-join-domain.js\";\n\nexport { ORG_MIGRATIONS } from \"./migrations.js\";\n\nexport { createOrgPlugin, defaultOrgPlugin } from \"./plugin.js\";\n\n// Drizzle schema (re-exported so templates can write typed queries against\n// org tables without redefining the schema themselves).\nexport { organizations, orgMembers, orgInvitations } from \"./schema.js\";\n\n// Individual handlers — exported so templates can compose a custom org plugin\n// while still using the framework-provided handlers.\nexport {\n getMyOrgHandler,\n createOrgHandler,\n updateOrgHandler,\n switchOrgHandler,\n listMembersHandler,\n removeMemberHandler,\n changeMemberRoleHandler,\n listInvitationsHandler,\n createInvitationHandler,\n acceptInvitationHandler,\n setA2ASecretHandler,\n syncA2ASecretHandler,\n receiveA2ASecretHandler,\n} from \"./handlers.js\";\n\nexport { isFreeEmailProvider } from \"./free-email-providers.js\";\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OrgRole } from "./types.js";
|
|
2
|
+
export declare function orgRoleRank(role: OrgRole | null | undefined): number;
|
|
3
|
+
export declare function orgRoleAtLeast(role: OrgRole | null | undefined, minimum: OrgRole): boolean;
|
|
4
|
+
export declare function canManageOrg(role: OrgRole | null | undefined): boolean;
|
|
5
|
+
export declare function canInviteOrgMembers(role: OrgRole | null | undefined): boolean;
|
|
6
|
+
export declare function canManageOrgDomain(role: OrgRole | null | undefined): boolean;
|
|
7
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/org/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAQ1C,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAEpE;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,EAAE,OAAO,GACf,OAAO,CAET;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEtE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE7E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE5E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const ORG_ROLE_RANK = {
|
|
2
|
+
member: 1,
|
|
3
|
+
admin: 2,
|
|
4
|
+
owner: 3,
|
|
5
|
+
};
|
|
6
|
+
export function orgRoleRank(role) {
|
|
7
|
+
return role ? (ORG_ROLE_RANK[role] ?? 0) : 0;
|
|
8
|
+
}
|
|
9
|
+
export function orgRoleAtLeast(role, minimum) {
|
|
10
|
+
return orgRoleRank(role) >= orgRoleRank(minimum);
|
|
11
|
+
}
|
|
12
|
+
export function canManageOrg(role) {
|
|
13
|
+
return orgRoleAtLeast(role, "admin");
|
|
14
|
+
}
|
|
15
|
+
export function canInviteOrgMembers(role) {
|
|
16
|
+
return orgRoleAtLeast(role, "admin");
|
|
17
|
+
}
|
|
18
|
+
export function canManageOrgDomain(role) {
|
|
19
|
+
return role === "owner";
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/org/permissions.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAA4B;IAC7C,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,IAAgC;IAC1D,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,IAAgC,EAChC,OAAgB;IAEhB,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAgC;IAC3D,OAAO,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAgC;IAClE,OAAO,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAgC;IACjE,OAAO,IAAI,KAAK,OAAO,CAAC;AAC1B,CAAC","sourcesContent":["import type { OrgRole } from \"./types.js\";\n\nconst ORG_ROLE_RANK: Record<OrgRole, number> = {\n member: 1,\n admin: 2,\n owner: 3,\n};\n\nexport function orgRoleRank(role: OrgRole | null | undefined): number {\n return role ? (ORG_ROLE_RANK[role] ?? 0) : 0;\n}\n\nexport function orgRoleAtLeast(\n role: OrgRole | null | undefined,\n minimum: OrgRole,\n): boolean {\n return orgRoleRank(role) >= orgRoleRank(minimum);\n}\n\nexport function canManageOrg(role: OrgRole | null | undefined): boolean {\n return orgRoleAtLeast(role, \"admin\");\n}\n\nexport function canInviteOrgMembers(role: OrgRole | null | undefined): boolean {\n return orgRoleAtLeast(role, \"admin\");\n}\n\nexport function canManageOrgDomain(role: OrgRole | null | undefined): boolean {\n return role === \"owner\";\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/org-team/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/org-team/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from \"../org/index.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/private-blob/registry.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/private-blob/registry.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAmKpB,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,mBAAmB,GAC5B,IAAI,CAEN;AAED,wBAAgB,6BAA6B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE9D;AAED,wBAAgB,wBAAwB,IAAI,mBAAmB,EAAE,CAEhE;AAED,wBAAgB,4BAA4B,IAAI,mBAAmB,GAAG,IAAI,CAKzE;AAED,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,OAAO,GACf,IAAI,CAEN;AAED,wBAAsB,cAAc,CAClC,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAQnC;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,qBAAqB,CAAC,CAOhC;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,iBAAiB,GAC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,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,4BAA4B,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,MAAM,EACJ,0EAA0E;SAC7E,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import { createCipheriv, createDecipheriv, randomBytes } from \"node:crypto\";\n\nimport { uploadFile } from \"../file-upload/index.js\";\nimport {\n decryptSecretValue,\n encryptSecretValue,\n getSecretEncryptionKey,\n} from \"../secrets/crypto.js\";\nimport type {\n PrivateBlobDeleteResult,\n PrivateBlobHandle,\n PrivateBlobProvider,\n PrivateBlobPutInput,\n PrivateBlobReadResult,\n} from \"./types.js\";\n\ninterface PrivateBlobGlobals {\n __agentNativePrivateBlobProviders?: Map<string, PrivateBlobProvider>;\n __agentNativePrivateBlobPublicUploadFallback?: { enabled: boolean };\n}\n\ninterface EncryptedPayload {\n iv: string;\n tag: string;\n ciphertext: Uint8Array;\n}\n\ninterface EncryptionParams {\n iv: string;\n tag: string;\n}\n\ninterface PublicUploadDescriptor {\n kind: \"agent-native.private-blob.public-upload\";\n version: 1;\n url: string;\n uploadProvider: string;\n uploadId?: string;\n encryption: EncryptionParams;\n mimeType?: string;\n metadata?: PrivateBlobHandle[\"metadata\"];\n size: number;\n createdAt: string;\n}\n\nconst PUBLIC_UPLOAD_HANDLE_PREFIX = \"public-upload:v1:\";\nconst globals = globalThis as typeof globalThis & PrivateBlobGlobals;\nconst providers: Map<string, PrivateBlobProvider> =\n (globals.__agentNativePrivateBlobProviders ??= new Map());\nconst publicUploadFallbackRef: { enabled: boolean } =\n (globals.__agentNativePrivateBlobPublicUploadFallback ??= {\n enabled: true,\n });\n\nfunction toBytes(data: Uint8Array | Buffer): Uint8Array {\n return data instanceof Uint8Array ? data : new Uint8Array(data);\n}\n\nfunction encryptBytes(data: Uint8Array): EncryptedPayload {\n const iv = randomBytes(12);\n const cipher = createCipheriv(\"aes-256-gcm\", getSecretEncryptionKey(), iv);\n const ciphertext = Buffer.concat([\n cipher.update(Buffer.from(data)),\n cipher.final(),\n ]);\n return {\n iv: iv.toString(\"base64url\"),\n ciphertext: new Uint8Array(ciphertext),\n tag: cipher.getAuthTag().toString(\"base64url\"),\n };\n}\n\nfunction decryptBytes(\n params: EncryptionParams,\n ciphertext: Uint8Array,\n): Uint8Array {\n const decipher = createDecipheriv(\n \"aes-256-gcm\",\n getSecretEncryptionKey(),\n Buffer.from(params.iv, \"base64url\"),\n );\n decipher.setAuthTag(Buffer.from(params.tag, \"base64url\"));\n return new Uint8Array(\n Buffer.concat([decipher.update(Buffer.from(ciphertext)), decipher.final()]),\n );\n}\n\nfunction encodePublicUploadDescriptor(\n descriptor: PublicUploadDescriptor,\n): string {\n return `${PUBLIC_UPLOAD_HANDLE_PREFIX}${encryptSecretValue(\n JSON.stringify(descriptor),\n )}`;\n}\n\nfunction decodePublicUploadDescriptor(id: string): PublicUploadDescriptor {\n if (!id.startsWith(PUBLIC_UPLOAD_HANDLE_PREFIX)) {\n throw new Error(\n \"Private blob handle is not a public-upload fallback handle\",\n );\n }\n const raw = decryptSecretValue(id.slice(PUBLIC_UPLOAD_HANDLE_PREFIX.length));\n const descriptor = JSON.parse(raw) as PublicUploadDescriptor;\n if (\n descriptor?.kind !== \"agent-native.private-blob.public-upload\" ||\n descriptor.version !== 1 ||\n typeof descriptor.url !== \"string\"\n ) {\n throw new Error(\"Private blob handle descriptor is invalid\");\n }\n return descriptor;\n}\n\nfunction isPublicUploadFallbackHandle(handle: PrivateBlobHandle): boolean {\n return handle.id.startsWith(PUBLIC_UPLOAD_HANDLE_PREFIX);\n}\n\nasync function putViaEncryptedPublicUpload(\n input: PrivateBlobPutInput,\n): Promise<PrivateBlobHandle | null> {\n const bytes = toBytes(input.data);\n const encrypted = encryptBytes(bytes);\n const uploaded = await uploadFile({\n data: Buffer.from(encrypted.ciphertext),\n filename: input.filename ?? input.key ?? \"private-blob.bin\",\n mimeType: \"application/octet-stream\",\n ownerEmail: input.ownerEmail,\n });\n if (!uploaded) return null;\n\n const descriptor: PublicUploadDescriptor = {\n kind: \"agent-native.private-blob.public-upload\",\n version: 1,\n url: uploaded.url,\n uploadProvider: uploaded.provider,\n uploadId: uploaded.id,\n encryption: { iv: encrypted.iv, tag: encrypted.tag },\n mimeType: input.mimeType,\n metadata: input.metadata,\n size: bytes.byteLength,\n createdAt: new Date().toISOString(),\n };\n\n return {\n id: encodePublicUploadDescriptor(descriptor),\n provider: `public-upload:${uploaded.provider}`,\n opaque: true,\n encrypted: true,\n mimeType: input.mimeType,\n size: bytes.byteLength,\n createdAt: descriptor.createdAt,\n metadata: input.metadata,\n };\n}\n\nasync function readViaEncryptedPublicUpload(\n handle: PrivateBlobHandle,\n): Promise<PrivateBlobReadResult> {\n const descriptor = decodePublicUploadDescriptor(handle.id);\n const response = await fetch(descriptor.url);\n if (!response.ok) {\n throw new Error(\n `Private blob public-upload read failed (${response.status}): ${response.statusText}`,\n );\n }\n // The uploaded ciphertext is intentionally opaque; the descriptor carries\n // auth tag + IV separately so the backing public URL is useless by itself.\n const ciphertext = new Uint8Array(await response.arrayBuffer());\n return {\n data: decryptBytes(descriptor.encryption, ciphertext),\n mimeType: descriptor.mimeType,\n metadata: descriptor.metadata,\n handle,\n };\n}\n\nexport function registerPrivateBlobProvider(\n provider: PrivateBlobProvider,\n): void {\n providers.set(provider.id, provider);\n}\n\nexport function unregisterPrivateBlobProvider(id: string): void {\n providers.delete(id);\n}\n\nexport function listPrivateBlobProviders(): PrivateBlobProvider[] {\n return [...providers.values()];\n}\n\nexport function getActivePrivateBlobProvider(): PrivateBlobProvider | null {\n for (const provider of providers.values()) {\n if (provider.isConfigured()) return provider;\n }\n return null;\n}\n\nexport function setPrivateBlobPublicUploadFallbackEnabled(\n enabled: boolean,\n): void {\n publicUploadFallbackRef.enabled = enabled;\n}\n\nexport async function putPrivateBlob(\n input: PrivateBlobPutInput,\n): Promise<PrivateBlobHandle | null> {\n const provider = getActivePrivateBlobProvider();\n if (provider) return provider.put(input);\n if (!publicUploadFallbackRef.enabled) return null;\n if (process.env.AGENT_NATIVE_PRIVATE_BLOB_PUBLIC_UPLOAD_FALLBACK === \"0\") {\n return null;\n }\n return putViaEncryptedPublicUpload(input);\n}\n\nexport async function readPrivateBlob(\n handle: PrivateBlobHandle,\n): Promise<PrivateBlobReadResult> {\n const provider = providers.get(handle.provider);\n if (provider) return provider.read(handle);\n if (isPublicUploadFallbackHandle(handle)) {\n return readViaEncryptedPublicUpload(handle);\n }\n throw new Error(`No private blob provider registered for ${handle.provider}`);\n}\n\nexport async function deletePrivateBlob(\n handle: PrivateBlobHandle,\n): Promise<PrivateBlobDeleteResult> {\n const provider = providers.get(handle.provider);\n if (provider) return provider.delete(handle);\n if (isPublicUploadFallbackHandle(handle)) {\n return {\n deleted: false,\n provider: handle.provider,\n reason:\n \"delete is not supported by the encrypted public-upload fallback provider\",\n };\n }\n throw new Error(`No private blob provider registered for ${handle.provider}`);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/private-blob/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAsC9B,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AACxD,MAAM,OAAO,GAAG,UAAoD,CAAC;AACrE,MAAM,SAAS,GACb,CAAC,OAAO,CAAC,iCAAiC,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC;AAC5D,MAAM,uBAAuB,GAC3B,CAAC,OAAO,CAAC,4CAA4C,KAA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AAG,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,2BAA2B,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAyB;IAEzB,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,4BAA4B,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAyB;IAEzB,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,4BAA4B,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,MAAM,EACJ,0EAA0E;SAC7E,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import { createCipheriv, createDecipheriv, randomBytes } from \"node:crypto\";\n\nimport { uploadFile } from \"../file-upload/index.js\";\nimport {\n decryptSecretValue,\n encryptSecretValue,\n getSecretEncryptionKey,\n} from \"../secrets/crypto.js\";\nimport type {\n PrivateBlobDeleteResult,\n PrivateBlobHandle,\n PrivateBlobProvider,\n PrivateBlobPutInput,\n PrivateBlobReadResult,\n} from \"./types.js\";\n\ninterface PrivateBlobGlobals {\n __agentNativePrivateBlobProviders?: Map<string, PrivateBlobProvider>;\n __agentNativePrivateBlobPublicUploadFallback?: { enabled: boolean };\n}\n\ninterface EncryptedPayload {\n iv: string;\n tag: string;\n ciphertext: Uint8Array;\n}\n\ninterface EncryptionParams {\n iv: string;\n tag: string;\n}\n\ninterface PublicUploadDescriptor {\n kind: \"agent-native.private-blob.public-upload\";\n version: 1;\n url: string;\n uploadProvider: string;\n uploadId?: string;\n encryption: EncryptionParams;\n mimeType?: string;\n metadata?: PrivateBlobHandle[\"metadata\"];\n size: number;\n createdAt: string;\n}\n\nconst PUBLIC_UPLOAD_HANDLE_PREFIX = \"public-upload:v1:\";\nconst globals = globalThis as typeof globalThis & PrivateBlobGlobals;\nconst providers: Map<string, PrivateBlobProvider> =\n (globals.__agentNativePrivateBlobProviders ??= new Map());\nconst publicUploadFallbackRef: { enabled: boolean } =\n (globals.__agentNativePrivateBlobPublicUploadFallback ??= {\n enabled: true,\n });\n\nfunction toBytes(data: Uint8Array | Buffer): Uint8Array {\n return data instanceof Uint8Array ? data : new Uint8Array(data);\n}\n\nfunction encryptBytes(data: Uint8Array): EncryptedPayload {\n const iv = randomBytes(12);\n const cipher = createCipheriv(\"aes-256-gcm\", getSecretEncryptionKey(), iv);\n const ciphertext = Buffer.concat([\n cipher.update(Buffer.from(data)),\n cipher.final(),\n ]);\n return {\n iv: iv.toString(\"base64url\"),\n ciphertext: new Uint8Array(ciphertext),\n tag: cipher.getAuthTag().toString(\"base64url\"),\n };\n}\n\nfunction decryptBytes(\n params: EncryptionParams,\n ciphertext: Uint8Array,\n): Uint8Array {\n const decipher = createDecipheriv(\n \"aes-256-gcm\",\n getSecretEncryptionKey(),\n Buffer.from(params.iv, \"base64url\"),\n );\n decipher.setAuthTag(Buffer.from(params.tag, \"base64url\"));\n return new Uint8Array(\n Buffer.concat([decipher.update(Buffer.from(ciphertext)), decipher.final()]),\n );\n}\n\nfunction encodePublicUploadDescriptor(\n descriptor: PublicUploadDescriptor,\n): string {\n return `${PUBLIC_UPLOAD_HANDLE_PREFIX}${encryptSecretValue(\n JSON.stringify(descriptor),\n )}`;\n}\n\nfunction decodePublicUploadDescriptor(id: string): PublicUploadDescriptor {\n if (!id.startsWith(PUBLIC_UPLOAD_HANDLE_PREFIX)) {\n throw new Error(\n \"Private blob handle is not a public-upload fallback handle\",\n );\n }\n const raw = decryptSecretValue(id.slice(PUBLIC_UPLOAD_HANDLE_PREFIX.length));\n const descriptor = JSON.parse(raw) as PublicUploadDescriptor;\n if (\n descriptor?.kind !== \"agent-native.private-blob.public-upload\" ||\n descriptor.version !== 1 ||\n typeof descriptor.url !== \"string\"\n ) {\n throw new Error(\"Private blob handle descriptor is invalid\");\n }\n return descriptor;\n}\n\nfunction isPublicUploadFallbackHandle(handle: PrivateBlobHandle): boolean {\n return handle.id.startsWith(PUBLIC_UPLOAD_HANDLE_PREFIX);\n}\n\nasync function putViaEncryptedPublicUpload(\n input: PrivateBlobPutInput,\n): Promise<PrivateBlobHandle | null> {\n const bytes = toBytes(input.data);\n const encrypted = encryptBytes(bytes);\n const uploaded = await uploadFile({\n data: Buffer.from(encrypted.ciphertext),\n filename: input.filename ?? input.key ?? \"private-blob.bin\",\n mimeType: \"application/octet-stream\",\n ownerEmail: input.ownerEmail,\n recordAsset: false,\n });\n if (!uploaded) return null;\n\n const descriptor: PublicUploadDescriptor = {\n kind: \"agent-native.private-blob.public-upload\",\n version: 1,\n url: uploaded.url,\n uploadProvider: uploaded.provider,\n uploadId: uploaded.id,\n encryption: { iv: encrypted.iv, tag: encrypted.tag },\n mimeType: input.mimeType,\n metadata: input.metadata,\n size: bytes.byteLength,\n createdAt: new Date().toISOString(),\n };\n\n return {\n id: encodePublicUploadDescriptor(descriptor),\n provider: `public-upload:${uploaded.provider}`,\n opaque: true,\n encrypted: true,\n mimeType: input.mimeType,\n size: bytes.byteLength,\n createdAt: descriptor.createdAt,\n metadata: input.metadata,\n };\n}\n\nasync function readViaEncryptedPublicUpload(\n handle: PrivateBlobHandle,\n): Promise<PrivateBlobReadResult> {\n const descriptor = decodePublicUploadDescriptor(handle.id);\n const response = await fetch(descriptor.url);\n if (!response.ok) {\n throw new Error(\n `Private blob public-upload read failed (${response.status}): ${response.statusText}`,\n );\n }\n // The uploaded ciphertext is intentionally opaque; the descriptor carries\n // auth tag + IV separately so the backing public URL is useless by itself.\n const ciphertext = new Uint8Array(await response.arrayBuffer());\n return {\n data: decryptBytes(descriptor.encryption, ciphertext),\n mimeType: descriptor.mimeType,\n metadata: descriptor.metadata,\n handle,\n };\n}\n\nexport function registerPrivateBlobProvider(\n provider: PrivateBlobProvider,\n): void {\n providers.set(provider.id, provider);\n}\n\nexport function unregisterPrivateBlobProvider(id: string): void {\n providers.delete(id);\n}\n\nexport function listPrivateBlobProviders(): PrivateBlobProvider[] {\n return [...providers.values()];\n}\n\nexport function getActivePrivateBlobProvider(): PrivateBlobProvider | null {\n for (const provider of providers.values()) {\n if (provider.isConfigured()) return provider;\n }\n return null;\n}\n\nexport function setPrivateBlobPublicUploadFallbackEnabled(\n enabled: boolean,\n): void {\n publicUploadFallbackRef.enabled = enabled;\n}\n\nexport async function putPrivateBlob(\n input: PrivateBlobPutInput,\n): Promise<PrivateBlobHandle | null> {\n const provider = getActivePrivateBlobProvider();\n if (provider) return provider.put(input);\n if (!publicUploadFallbackRef.enabled) return null;\n if (process.env.AGENT_NATIVE_PRIVATE_BLOB_PUBLIC_UPLOAD_FALLBACK === \"0\") {\n return null;\n }\n return putViaEncryptedPublicUpload(input);\n}\n\nexport async function readPrivateBlob(\n handle: PrivateBlobHandle,\n): Promise<PrivateBlobReadResult> {\n const provider = providers.get(handle.provider);\n if (provider) return provider.read(handle);\n if (isPublicUploadFallbackHandle(handle)) {\n return readViaEncryptedPublicUpload(handle);\n }\n throw new Error(`No private blob provider registered for ${handle.provider}`);\n}\n\nexport async function deletePrivateBlob(\n handle: PrivateBlobHandle,\n): Promise<PrivateBlobDeleteResult> {\n const provider = providers.get(handle.provider);\n if (provider) return provider.delete(handle);\n if (isPublicUploadFallbackHandle(handle)) {\n return {\n deleted: false,\n provider: handle.provider,\n reason:\n \"delete is not supported by the encrypted public-upload fallback provider\",\n };\n }\n throw new Error(`No private blob provider registered for ${handle.provider}`);\n}\n"]}
|
|
@@ -52,8 +52,8 @@ export declare function handleDeleteResource(event: any): Promise<{
|
|
|
52
52
|
error: string;
|
|
53
53
|
ok?: undefined;
|
|
54
54
|
} | {
|
|
55
|
-
error?: undefined;
|
|
56
55
|
ok: boolean;
|
|
56
|
+
error?: undefined;
|
|
57
57
|
}>;
|
|
58
58
|
/** POST /_agent-native/resources/upload — upload a file as a resource */
|
|
59
59
|
export declare function handleUploadResource(event: any): Promise<import("./store.js").Resource | {
|
|
@@ -73,9 +73,9 @@ export declare function handleUploadResource(event: any): Promise<import("./stor
|
|
|
73
73
|
runId: string | null;
|
|
74
74
|
expiresAt: number | null;
|
|
75
75
|
metadata: string | null;
|
|
76
|
-
error?: undefined;
|
|
77
76
|
url: string;
|
|
78
77
|
provider: string;
|
|
78
|
+
error?: undefined;
|
|
79
79
|
}>;
|
|
80
80
|
export {};
|
|
81
81
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: import("../../action.js").ActionDefinition<{
|
|
2
|
+
resourceType: string;
|
|
3
|
+
resourceId: string;
|
|
4
|
+
commentIds: string[];
|
|
5
|
+
}, {
|
|
6
|
+
consumedCommentIds: string[];
|
|
7
|
+
}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=consume-review-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consume-review-feedback.d.ts","sourceRoot":"","sources":["../../../src/review/actions/consume-review-feedback.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineAction } from "../../action.js";
|
|
3
|
+
import { assertReviewableResourceAccess } from "../registry.js";
|
|
4
|
+
import { consumeReviewFeedback } from "../store.js";
|
|
5
|
+
const schema = z.object({
|
|
6
|
+
resourceType: z.string().min(1),
|
|
7
|
+
resourceId: z.string().min(1),
|
|
8
|
+
commentIds: z.array(z.string().min(1)).min(1),
|
|
9
|
+
});
|
|
10
|
+
export default defineAction({
|
|
11
|
+
description: "Mark review feedback as consumed by the agent or reviewer workflow.",
|
|
12
|
+
schema,
|
|
13
|
+
run: async (args, ctx) => {
|
|
14
|
+
const actionCtx = ctx;
|
|
15
|
+
await assertReviewableResourceAccess(args.resourceType, args.resourceId, actionCtx, "editor");
|
|
16
|
+
await consumeReviewFeedback(args.commentIds, undefined, {
|
|
17
|
+
resourceType: args.resourceType,
|
|
18
|
+
resourceId: args.resourceId,
|
|
19
|
+
});
|
|
20
|
+
return { consumedCommentIds: args.commentIds };
|
|
21
|
+
},
|
|
22
|
+
audit: {
|
|
23
|
+
target: (args) => ({
|
|
24
|
+
type: args.resourceType,
|
|
25
|
+
id: args.resourceId,
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=consume-review-feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consume-review-feedback.js","sourceRoot":"","sources":["../../../src/review/actions/consume-review-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9C,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,qEAAqE;IACvE,MAAM;IACN,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QACvB,MAAM,SAAS,GAAG,GAAwC,CAAC;QAC3D,MAAM,8BAA8B,CAClC,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,UAAU,EACf,SAAS,EACT,QAAQ,CACT,CAAC;QACF,MAAM,qBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE;YACtD,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QACH,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;IACjD,CAAC;IACD,KAAK,EAAE;QACL,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACjB,IAAI,EAAE,IAAI,CAAC,YAAY;YACvB,EAAE,EAAE,IAAI,CAAC,UAAU;SACpB,CAAC;KACH;CACF,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { defineAction } from \"../../action.js\";\nimport { assertReviewableResourceAccess } from \"../registry.js\";\nimport { consumeReviewFeedback } from \"../store.js\";\nimport type { ReviewResourceContext } from \"../types.js\";\n\nconst schema = z.object({\n resourceType: z.string().min(1),\n resourceId: z.string().min(1),\n commentIds: z.array(z.string().min(1)).min(1),\n});\n\nexport default defineAction({\n description:\n \"Mark review feedback as consumed by the agent or reviewer workflow.\",\n schema,\n run: async (args, ctx) => {\n const actionCtx = ctx as ReviewResourceContext | undefined;\n await assertReviewableResourceAccess(\n args.resourceType,\n args.resourceId,\n actionCtx,\n \"editor\",\n );\n await consumeReviewFeedback(args.commentIds, undefined, {\n resourceType: args.resourceType,\n resourceId: args.resourceId,\n });\n return { consumedCommentIds: args.commentIds };\n },\n audit: {\n target: (args) => ({\n type: args.resourceType,\n id: args.resourceId,\n }),\n },\n});\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("../../action.js").ActionDefinition<{
|
|
2
|
+
resourceType: string;
|
|
3
|
+
resourceId: string;
|
|
4
|
+
targetId?: string;
|
|
5
|
+
kind?: "annotation" | "comment" | "correction" | "decision" | "question" | "review";
|
|
6
|
+
anchor?: unknown;
|
|
7
|
+
body: string;
|
|
8
|
+
authorName?: string;
|
|
9
|
+
resolutionTarget?: "agent" | "human";
|
|
10
|
+
mentions?: {
|
|
11
|
+
label: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
}[];
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
}, import("../types.js").ReviewComment>;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=create-review-comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-review-comment.d.ts","sourceRoot":"","sources":["../../../src/review/actions/create-review-comment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineAction } from "../../action.js";
|
|
3
|
+
import { extractReviewMentions, normalizeReviewMentions } from "../mentions.js";
|
|
4
|
+
import { assertReviewableResourceAccess, normalizeReviewVisibility, } from "../registry.js";
|
|
5
|
+
import { insertReviewComment } from "../store.js";
|
|
6
|
+
const mentionSchema = z.object({
|
|
7
|
+
label: z.string().min(1),
|
|
8
|
+
email: z.string().email().nullable().optional(),
|
|
9
|
+
id: z.string().nullable().optional(),
|
|
10
|
+
});
|
|
11
|
+
const schema = z.object({
|
|
12
|
+
resourceType: z.string().min(1),
|
|
13
|
+
resourceId: z.string().min(1),
|
|
14
|
+
targetId: z.string().nullable().optional(),
|
|
15
|
+
kind: z
|
|
16
|
+
.enum([
|
|
17
|
+
"comment",
|
|
18
|
+
"annotation",
|
|
19
|
+
"correction",
|
|
20
|
+
"question",
|
|
21
|
+
"decision",
|
|
22
|
+
"review",
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
25
|
+
anchor: z.unknown().nullable().optional(),
|
|
26
|
+
body: z.string().min(1),
|
|
27
|
+
authorName: z.string().nullable().optional(),
|
|
28
|
+
resolutionTarget: z.enum(["agent", "human"]).nullable().optional(),
|
|
29
|
+
mentions: z.array(mentionSchema).optional(),
|
|
30
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
31
|
+
});
|
|
32
|
+
export default defineAction({
|
|
33
|
+
description: "Create an inline comment, annotation, or review thread for a resource.",
|
|
34
|
+
schema,
|
|
35
|
+
run: async (args, ctx) => {
|
|
36
|
+
const actionCtx = ctx;
|
|
37
|
+
const access = await assertReviewableResourceAccess(args.resourceType, args.resourceId, actionCtx, "viewer");
|
|
38
|
+
const mentions = normalizeReviewMentions([
|
|
39
|
+
...normalizeReviewMentions(args.mentions),
|
|
40
|
+
...extractReviewMentions(args.body),
|
|
41
|
+
]);
|
|
42
|
+
const resolutionTarget = args.resolutionTarget ?? (mentions.length > 0 ? "human" : "agent");
|
|
43
|
+
return insertReviewComment({
|
|
44
|
+
resourceType: args.resourceType,
|
|
45
|
+
resourceId: args.resourceId,
|
|
46
|
+
targetId: args.targetId ?? null,
|
|
47
|
+
kind: (args.kind ?? "comment"),
|
|
48
|
+
anchor: args.anchor ?? null,
|
|
49
|
+
body: args.body,
|
|
50
|
+
authorEmail: actionCtx?.userEmail ?? null,
|
|
51
|
+
authorName: args.authorName ?? actionCtx?.userEmail ?? null,
|
|
52
|
+
createdBy: actorKindFromContext(actionCtx),
|
|
53
|
+
resolutionTarget,
|
|
54
|
+
mentions,
|
|
55
|
+
ownerEmail: access.ownerEmail ?? actionCtx?.userEmail ?? null,
|
|
56
|
+
orgId: access.orgId ?? actionCtx?.orgId ?? null,
|
|
57
|
+
visibility: normalizeReviewVisibility(access.visibility),
|
|
58
|
+
metadata: args.metadata,
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
audit: {
|
|
62
|
+
target: (args, result) => {
|
|
63
|
+
const comment = result;
|
|
64
|
+
return {
|
|
65
|
+
type: args.resourceType,
|
|
66
|
+
id: args.resourceId,
|
|
67
|
+
ownerEmail: comment.ownerEmail,
|
|
68
|
+
orgId: comment.orgId,
|
|
69
|
+
visibility: comment.visibility,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
function actorKindFromContext(ctx) {
|
|
75
|
+
const caller = typeof ctx?.caller === "string" ? ctx.caller : "";
|
|
76
|
+
if (caller === "agent" || caller === "tool") {
|
|
77
|
+
return "agent";
|
|
78
|
+
}
|
|
79
|
+
return ctx?.userEmail ? "human" : "system";
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=create-review-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-review-comment.js","sourceRoot":"","sources":["../../../src/review/actions/create-review-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOlD,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ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C;IACD,KAAK,EAAE;QACL,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YACvB,MAAM,OAAO,GAAG,MAIf,CAAC;YACF,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,YAAY;gBACvB,EAAE,EAAE,IAAI,CAAC,UAAU;gBACnB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC;QACJ,CAAC;KACF;CACF,CAAC,CAAC;AAEH,SAAS,oBAAoB,CAC3B,GAAsC;IAEtC,MAAM,MAAM,GAAG,OAAO,GAAG,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QAC5C,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7C,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { defineAction } from \"../../action.js\";\nimport { extractReviewMentions, normalizeReviewMentions } from \"../mentions.js\";\nimport {\n assertReviewableResourceAccess,\n normalizeReviewVisibility,\n} from \"../registry.js\";\nimport { insertReviewComment } from \"../store.js\";\nimport type {\n ReviewActorKind,\n ReviewCommentKind,\n ReviewResourceContext,\n} from \"../types.js\";\n\nconst mentionSchema = z.object({\n label: z.string().min(1),\n email: z.string().email().nullable().optional(),\n id: z.string().nullable().optional(),\n});\n\nconst schema = z.object({\n resourceType: z.string().min(1),\n resourceId: z.string().min(1),\n targetId: z.string().nullable().optional(),\n kind: z\n .enum([\n \"comment\",\n \"annotation\",\n \"correction\",\n \"question\",\n \"decision\",\n \"review\",\n ])\n .optional(),\n anchor: z.unknown().nullable().optional(),\n body: z.string().min(1),\n authorName: z.string().nullable().optional(),\n resolutionTarget: z.enum([\"agent\", \"human\"]).nullable().optional(),\n mentions: z.array(mentionSchema).optional(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport default defineAction({\n description:\n \"Create an inline comment, annotation, or review thread for a resource.\",\n schema,\n run: async (args, ctx) => {\n const actionCtx = ctx as ReviewResourceContext | undefined;\n const access = await assertReviewableResourceAccess(\n args.resourceType,\n args.resourceId,\n actionCtx,\n \"viewer\",\n );\n const mentions = normalizeReviewMentions([\n ...normalizeReviewMentions(args.mentions),\n ...extractReviewMentions(args.body),\n ]);\n const resolutionTarget =\n args.resolutionTarget ?? (mentions.length > 0 ? \"human\" : \"agent\");\n\n return insertReviewComment({\n resourceType: args.resourceType,\n resourceId: args.resourceId,\n targetId: args.targetId ?? null,\n kind: (args.kind ?? \"comment\") as ReviewCommentKind,\n anchor: args.anchor ?? null,\n body: args.body,\n authorEmail: actionCtx?.userEmail ?? null,\n authorName: args.authorName ?? actionCtx?.userEmail ?? null,\n createdBy: actorKindFromContext(actionCtx),\n resolutionTarget,\n mentions,\n ownerEmail: access.ownerEmail ?? actionCtx?.userEmail ?? null,\n orgId: access.orgId ?? actionCtx?.orgId ?? null,\n visibility: normalizeReviewVisibility(access.visibility),\n metadata: args.metadata,\n });\n },\n audit: {\n target: (args, result) => {\n const comment = result as {\n ownerEmail?: string | null;\n orgId?: string | null;\n visibility?: \"private\" | \"org\" | \"public\";\n };\n return {\n type: args.resourceType,\n id: args.resourceId,\n ownerEmail: comment.ownerEmail,\n orgId: comment.orgId,\n visibility: comment.visibility,\n };\n },\n },\n});\n\nfunction actorKindFromContext(\n ctx: ReviewResourceContext | undefined,\n): ReviewActorKind {\n const caller = typeof ctx?.caller === \"string\" ? ctx.caller : \"\";\n if (caller === \"agent\" || caller === \"tool\") {\n return \"agent\";\n }\n return ctx?.userEmail ? \"human\" : \"system\";\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: import("../../action.js").ActionDefinition<{
|
|
2
|
+
resourceType: string;
|
|
3
|
+
resourceId: string;
|
|
4
|
+
commentId: string;
|
|
5
|
+
}, {
|
|
6
|
+
commentId: string;
|
|
7
|
+
deleted: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=delete-review-comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-review-comment.d.ts","sourceRoot":"","sources":["../../../src/review/actions/delete-review-comment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineAction } from "../../action.js";
|
|
3
|
+
import { ForbiddenError } from "../../sharing/access.js";
|
|
4
|
+
import { roleSatisfies } from "../../sharing/schema.js";
|
|
5
|
+
import { resolveReviewableResourceAccess } from "../registry.js";
|
|
6
|
+
import { deleteReviewComment, getReviewCommentById } from "../store.js";
|
|
7
|
+
const schema = z.object({
|
|
8
|
+
resourceType: z.string().min(1),
|
|
9
|
+
resourceId: z.string().min(1),
|
|
10
|
+
commentId: z.string().min(1),
|
|
11
|
+
});
|
|
12
|
+
export default defineAction({
|
|
13
|
+
description: "Soft-delete a review comment.",
|
|
14
|
+
schema,
|
|
15
|
+
run: async (args, ctx) => {
|
|
16
|
+
const actionCtx = ctx;
|
|
17
|
+
const scope = {
|
|
18
|
+
userEmail: actionCtx?.userEmail ?? null,
|
|
19
|
+
orgId: actionCtx?.orgId ?? null,
|
|
20
|
+
};
|
|
21
|
+
const access = await resolveReviewableResourceAccess(args.resourceType, args.resourceId, actionCtx);
|
|
22
|
+
const comment = await getReviewCommentById(args.commentId, scope, {
|
|
23
|
+
bypassScope: Boolean(access),
|
|
24
|
+
});
|
|
25
|
+
if (!comment ||
|
|
26
|
+
comment.resourceType !== args.resourceType ||
|
|
27
|
+
comment.resourceId !== args.resourceId) {
|
|
28
|
+
throw new Error("Review comment not found");
|
|
29
|
+
}
|
|
30
|
+
const isAuthor = Boolean(actionCtx?.userEmail) &&
|
|
31
|
+
comment.authorEmail === actionCtx?.userEmail;
|
|
32
|
+
if (!isAuthor && (!access || !roleSatisfies(access.role, "editor"))) {
|
|
33
|
+
throw new ForbiddenError("Not allowed to delete this review comment");
|
|
34
|
+
}
|
|
35
|
+
await deleteReviewComment(comment.id, actionCtx?.userEmail ?? null);
|
|
36
|
+
return { commentId: comment.id, deleted: true };
|
|
37
|
+
},
|
|
38
|
+
audit: {
|
|
39
|
+
target: (args) => ({
|
|
40
|
+
type: args.resourceType,
|
|
41
|
+
id: args.resourceId,
|
|
42
|
+
}),
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=delete-review-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-review-comment.js","sourceRoot":"","sources":["../../../src/review/actions/delete-review-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGxE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC;IAC1B,WAAW,EAAE,+BAA+B;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AAE,CAAC,CAAC;YACjB,IAAI,EAAE,IAAI,CAAC,YAAY;YACvB,EAAE,EAAE,IAAI,CAAC,UAAU;SACpB,CAAC;KACH;CACF,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { defineAction } from \"../../action.js\";\nimport { ForbiddenError } from \"../../sharing/access.js\";\nimport { roleSatisfies } from \"../../sharing/schema.js\";\nimport { resolveReviewableResourceAccess } from \"../registry.js\";\nimport { deleteReviewComment, getReviewCommentById } from \"../store.js\";\nimport type { ReviewResourceContext } from \"../types.js\";\n\nconst schema = z.object({\n resourceType: z.string().min(1),\n resourceId: z.string().min(1),\n commentId: z.string().min(1),\n});\n\nexport default defineAction({\n description: \"Soft-delete a review comment.\",\n schema,\n run: async (args, ctx) => {\n const actionCtx = ctx as ReviewResourceContext | undefined;\n const scope = {\n userEmail: actionCtx?.userEmail ?? null,\n orgId: actionCtx?.orgId ?? null,\n };\n const access = await resolveReviewableResourceAccess(\n args.resourceType,\n args.resourceId,\n actionCtx,\n );\n const comment = await getReviewCommentById(args.commentId, scope, {\n bypassScope: Boolean(access),\n });\n if (\n !comment ||\n comment.resourceType !== args.resourceType ||\n comment.resourceId !== args.resourceId\n ) {\n throw new Error(\"Review comment not found\");\n }\n const isAuthor =\n Boolean(actionCtx?.userEmail) &&\n comment.authorEmail === actionCtx?.userEmail;\n if (!isAuthor && (!access || !roleSatisfies(access.role, \"editor\"))) {\n throw new ForbiddenError(\"Not allowed to delete this review comment\");\n }\n await deleteReviewComment(comment.id, actionCtx?.userEmail ?? null);\n return { commentId: comment.id, deleted: true };\n },\n audit: {\n target: (args) => ({\n type: args.resourceType,\n id: args.resourceId,\n }),\n },\n});\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: import("../../action.js").ActionDefinition<{
|
|
2
|
+
resourceType: string;
|
|
3
|
+
resourceId: string;
|
|
4
|
+
includeHumanTargeted?: boolean;
|
|
5
|
+
limit?: number;
|
|
6
|
+
}, {
|
|
7
|
+
comments: import("../types.js").ReviewComment[];
|
|
8
|
+
}>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=get-review-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-review-feedback.d.ts","sourceRoot":"","sources":["../../../src/review/actions/get-review-feedback.ts"],"names":[],"mappings":""}
|