@agent-native/core 0.95.1 → 0.97.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/README.md +6 -0
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +64 -0
- package/corpus/core/docs/content/audit-log.mdx +2 -1
- package/corpus/core/docs/content/automations.mdx +7 -7
- package/corpus/core/docs/content/creating-templates.mdx +1 -1
- package/corpus/core/docs/content/internationalization.mdx +2 -1
- package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ar-SA/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ar-SA/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/ar-SA/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/ar-SA/security.mdx +8 -0
- package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/de-DE/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/de-DE/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +22 -0
- package/corpus/core/docs/content/locales/de-DE/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/de-DE/security.mdx +8 -0
- package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/es-ES/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/es-ES/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +22 -0
- package/corpus/core/docs/content/locales/es-ES/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/es-ES/security.mdx +8 -0
- package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/fr-FR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/fr-FR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/fr-FR/sandbox-adapters.mdx +19 -8
- package/corpus/core/docs/content/locales/fr-FR/security.mdx +8 -0
- package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/hi-IN/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/hi-IN/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +20 -0
- package/corpus/core/docs/content/locales/hi-IN/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/hi-IN/security.mdx +8 -0
- package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ja-JP/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ja-JP/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/ja-JP/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/ja-JP/security.mdx +8 -0
- package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ko-KR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ko-KR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +20 -0
- package/corpus/core/docs/content/locales/ko-KR/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/ko-KR/security.mdx +8 -0
- package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/pt-BR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/pt-BR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/pt-BR/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/pt-BR/security.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/zh-CN/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/zh-CN/getting-started.mdx +6 -4
- package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/zh-CN/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/zh-CN/security.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/zh-TW/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/zh-TW/getting-started.mdx +6 -4
- package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/zh-TW/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/zh-TW/security.mdx +8 -0
- package/corpus/core/docs/content/package-lifecycle.mdx +51 -0
- package/corpus/core/docs/content/sandbox-adapters.mdx +16 -5
- package/corpus/core/package.json +11 -2
- package/corpus/core/src/a2a/auth-policy.ts +33 -0
- package/corpus/core/src/a2a/client.ts +11 -1
- package/corpus/core/src/agent/durable-background.ts +15 -7
- package/corpus/core/src/agent/production-agent.ts +87 -27
- package/corpus/core/src/agent/run-store.ts +13 -4
- package/corpus/core/src/agent/thread-data-builder.ts +7 -5
- package/corpus/core/src/audit/actions/export-audit-events.ts +162 -0
- package/corpus/core/src/audit/store.ts +8 -3
- package/corpus/core/src/audit/types.ts +3 -0
- package/corpus/core/src/chat-threads/store.ts +20 -1
- package/corpus/core/src/cli/code-agent-executor.ts +1 -0
- package/corpus/core/src/cli/code-agent-runs.ts +14 -0
- package/corpus/core/src/cli/doctor.ts +396 -0
- package/corpus/core/src/cli/index.ts +56 -0
- package/corpus/core/src/cli/info.ts +3 -3
- package/corpus/core/src/cli/package-lifecycle.ts +821 -0
- package/corpus/core/src/client/AgentPanel.tsx +32 -25
- package/corpus/core/src/client/AssistantChat.tsx +36 -20
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +141 -90
- package/corpus/core/src/client/agent-chat-adapter.ts +9 -9
- package/corpus/core/src/client/chat/ChatHistoryList.tsx +404 -0
- package/corpus/core/src/client/chat/index.ts +6 -0
- package/corpus/core/src/client/chat/tool-call-display.tsx +37 -3
- package/corpus/core/src/client/code-agent-chat-adapter.ts +72 -4
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +52 -11
- package/corpus/core/src/client/composer/TiptapComposer.tsx +157 -20
- package/corpus/core/src/client/composer/VoiceButton.tsx +28 -0
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +5 -0
- package/corpus/core/src/client/conversation/code-agent-transcript.ts +4 -5
- package/corpus/core/src/client/guided-questions.tsx +2 -1
- package/corpus/core/src/client/index.ts +11 -0
- package/corpus/core/src/client/use-chat-threads.ts +10 -1
- package/corpus/core/src/client/voice-provider-status.ts +44 -0
- package/corpus/core/src/code-agents/transcript-normalizer.ts +76 -0
- package/corpus/core/src/deploy/build.ts +12 -11
- package/corpus/core/src/guards/db-tool-scoping.ts +129 -0
- package/corpus/core/src/guards/index.ts +23 -0
- package/corpus/core/src/guards/no-drizzle-push.ts +116 -0
- package/corpus/core/src/guards/no-env-credentials.ts +229 -0
- package/corpus/core/src/guards/no-env-mutation.ts +114 -0
- package/corpus/core/src/guards/no-localhost-fallback.ts +124 -0
- package/corpus/core/src/guards/no-unscoped-credentials.ts +227 -0
- package/corpus/core/src/guards/no-unscoped-queries.ts +834 -0
- package/corpus/core/src/guards/scan-utils.ts +105 -0
- package/corpus/core/src/guards/types.ts +30 -0
- package/corpus/core/src/integrations/a2a-continuation-processor.ts +35 -5
- package/corpus/core/src/integrations/adapters/slack.ts +74 -21
- package/corpus/core/src/integrations/webhook-handler.ts +14 -0
- package/corpus/core/src/localization/default-messages.ts +6 -0
- package/corpus/core/src/observability/hosted-model-experiment.ts +118 -0
- package/corpus/core/src/observability/routes.ts +17 -0
- package/corpus/core/src/observability/store.ts +4 -1
- package/corpus/core/src/observability/traces.ts +41 -2
- package/corpus/core/src/org/accept-pending.ts +9 -1
- package/corpus/core/src/org/migrations.ts +41 -0
- package/corpus/core/src/package-lifecycle/index.ts +1 -0
- package/corpus/core/src/package-lifecycle/manifest.ts +120 -0
- package/corpus/core/src/provider-api/custom-registry.ts +56 -0
- package/corpus/core/src/provider-api/index.ts +2 -0
- package/corpus/core/src/scripts/agent-engines/list-agent-engines.ts +19 -1
- package/corpus/core/src/scripts/call-agent.ts +53 -3
- package/corpus/core/src/scripts/chat/search-chats.ts +11 -8
- package/corpus/core/src/secrets/register-framework-secrets.ts +1 -1
- package/corpus/core/src/secrets/storage.ts +47 -27
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +95 -18
- package/corpus/core/src/server/core-routes-plugin.ts +45 -14
- package/corpus/core/src/server/csrf.ts +24 -5
- package/corpus/core/src/server/framework-request-handler.ts +34 -0
- package/corpus/core/src/server/google-realtime-session.ts +1 -36
- package/corpus/core/src/server/poll.ts +24 -2
- package/corpus/core/src/server/realtime-voice.ts +80 -24
- package/corpus/core/src/server/request-origin.ts +63 -0
- package/corpus/core/src/server/transcribe-voice.ts +1 -50
- package/corpus/core/src/server/voice-providers-status.ts +4 -3
- package/corpus/core/src/shared/cache-control.ts +2 -8
- package/corpus/core/src/styles/agent-native.css +1 -0
- package/corpus/core/src/styles/chat-history-list.css +313 -0
- package/corpus/core/src/templates/default/package.json +2 -2
- package/corpus/core/src/templates/headless/package.json +0 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +20 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +8 -4
- package/corpus/core/src/templates/workspace-core/package.json +0 -1
- package/corpus/core/src/templates/workspace-root/package.json +0 -1
- package/corpus/core/src/triggers/actions.ts +11 -3
- package/corpus/core/src/triggers/types.ts +7 -1
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/AGENTS.md +7 -0
- package/corpus/templates/analytics/actions/bigquery.ts +26 -2
- package/corpus/templates/analytics/actions/compose-dashboard.ts +65 -37
- package/corpus/templates/analytics/actions/data-source-status.ts +18 -0
- package/corpus/templates/analytics/actions/mutate-dashboard.ts +73 -24
- package/corpus/templates/analytics/actions/reorder-dashboard-panels.ts +16 -13
- package/corpus/templates/analytics/actions/update-dashboard.ts +53 -42
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +5 -4
- package/corpus/templates/analytics/app/global.css +10 -0
- package/corpus/templates/analytics/app/pages/Ask.tsx +25 -2
- package/corpus/templates/analytics/changelog/2026-07-10-analytics-answers-simple-time-bounded-metrics-without-unnece.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-analytics-chat-reliably-uses-connected-data-sources-across-s.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-chat-threads-now-stay-clear-of-top-actions-and-fade-smoothly.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-context-chips-can-now-be-selected-and-removed-one-at-a-time-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-dashboard-edits-from-the-agent-and-the-ui-at-the-same-time-n.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-the-ask-composer-no-longer-carries-dashboard-or-panel-contex.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-the-ask-section-stays-highlighted-while-its-chat-history-is-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-timed-out-bigquery-jobs-are-now-cancelled-so-they-stop-consu.md +6 -0
- package/corpus/templates/analytics/package.json +1 -2
- package/corpus/templates/analytics/server/lib/bigquery.ts +91 -14
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +154 -11
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +82 -7
- package/corpus/templates/assets/package.json +1 -2
- package/corpus/templates/brain/package.json +1 -2
- package/corpus/templates/calendar/package.json +1 -2
- package/corpus/templates/chat/package.json +1 -2
- package/corpus/templates/clips/changelog/2026-07-10-atomic-view-tracking.md +6 -0
- package/corpus/templates/clips/chrome-extension/package.json +3 -2
- package/corpus/templates/clips/desktop/package.json +6 -4
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +26 -13
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +4 -1
- package/corpus/templates/clips/package.json +1 -2
- package/corpus/templates/clips/server/db/schema.ts +29 -17
- package/corpus/templates/clips/server/plugins/db.ts +8 -0
- package/corpus/templates/clips/server/routes/api/view-event.post.ts +260 -105
- package/corpus/templates/content/.agents/skills/notion-integration/SKILL.md +16 -0
- package/corpus/templates/content/AGENTS.md +72 -62
- package/corpus/templates/content/actions/_content-database-source-adapters.ts +84 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +206 -96
- package/corpus/templates/content/actions/_notion-database-source-adapter.ts +216 -0
- package/corpus/templates/content/actions/_position-utils.ts +76 -0
- package/corpus/templates/content/actions/_property-utils.ts +31 -20
- package/corpus/templates/content/actions/add-database-item.ts +52 -39
- package/corpus/templates/content/actions/attach-content-database-source.ts +95 -11
- package/corpus/templates/content/actions/change-content-database-source-role.ts +24 -1
- package/corpus/templates/content/actions/configure-document-property.ts +36 -27
- package/corpus/templates/content/actions/create-content-database.ts +40 -30
- package/corpus/templates/content/actions/create-document.ts +39 -32
- package/corpus/templates/content/actions/duplicate-document-property.ts +37 -28
- package/corpus/templates/content/actions/list-notion-database-sources.ts +80 -0
- package/corpus/templates/content/actions/move-document.ts +64 -48
- package/corpus/templates/content/actions/refresh-content-database-source.ts +42 -3
- package/corpus/templates/content/actions/share-local-file-document.ts +36 -27
- package/corpus/templates/content/actions/suggest-source-join-key.ts +39 -16
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +89 -23
- package/corpus/templates/content/app/components/editor/database/settings.tsx +1 -1
- package/corpus/templates/content/app/hooks/use-content-database.ts +18 -1
- package/corpus/templates/content/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/content/app/i18n-data.ts +40 -0
- package/corpus/templates/content/changelog/2026-07-10-failed-row-creation-and-source-attach-now-show-an-error-inst.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-items-added-at-the-same-time-no-longer-end-up-with-identical.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-notion-databases-can-add-read-only-details-to-content-tables.md +6 -0
- package/corpus/templates/content/package.json +1 -2
- package/corpus/templates/content/parity/matrix.md +25 -25
- package/corpus/templates/content/parity/matrix.ts +1 -0
- package/corpus/templates/content/server/routes/api/documents/[id]/move.patch.ts +43 -26
- package/corpus/templates/content/shared/api.ts +16 -1
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +8 -4
- package/corpus/templates/design/AGENTS.md +12 -2
- package/corpus/templates/design/DEVELOPING.md +10 -6
- package/corpus/templates/design/actions/apply-visual-edit.ts +191 -6
- package/corpus/templates/design/actions/duplicate-design.ts +31 -25
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +5 -1
- package/corpus/templates/design/changelog/2026-07-10-duplicating-a-design-can-no-longer-produce-a-copy-with-missi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-local-visual-edits-can-now-save-safe-leaf-text-class-and.md +6 -0
- package/corpus/templates/design/package.json +1 -1
- package/corpus/templates/design/shared/local-jsx-visual-edit.ts +388 -0
- package/corpus/templates/dispatch/package.json +1 -2
- package/corpus/templates/forms/actions/patch-form-fields.ts +82 -44
- package/corpus/templates/forms/changelog/2026-07-10-simultaneous-edits-to-different-form-fields-no-longer-overwr.md +6 -0
- package/corpus/templates/forms/package.json +1 -2
- package/corpus/templates/macros/package.json +1 -2
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +3 -1
- package/corpus/templates/mail/changelog/2026-07-10-fixed-calendar-rsvp-buttons-in-emails-firing-duplicate-respo.md +6 -0
- package/corpus/templates/mail/package.json +1 -2
- package/corpus/templates/plan/actions/restore-plan-version.ts +126 -96
- package/corpus/templates/plan/changelog/2026-07-10-restoring-a-plan-version-can-no-longer-leave-a-plan-half-res.md +6 -0
- package/corpus/templates/plan/package.json +1 -2
- package/corpus/templates/plan/server/plans.ts +9 -2
- package/corpus/templates/slides/actions/list-decks.ts +28 -0
- package/corpus/templates/slides/app/components/deck/MermaidRenderer.tsx +41 -26
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +4 -8
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +2 -4
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +4 -8
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +5 -12
- package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +3 -6
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -6
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +2 -5
- package/corpus/templates/slides/app/context/DeckContext.tsx +47 -4
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +11 -30
- package/corpus/templates/slides/app/pages/Index.tsx +2 -3
- package/corpus/templates/slides/app/root.tsx +0 -5
- package/corpus/templates/slides/changelog/2026-07-10-deck-lists-load-much-faster-and-no-longer-re-download-slide-.md +6 -0
- package/corpus/templates/slides/package.json +1 -2
- package/dist/a2a/auth-policy.d.ts +19 -0
- package/dist/a2a/auth-policy.d.ts.map +1 -1
- package/dist/a2a/auth-policy.js +32 -0
- package/dist/a2a/auth-policy.js.map +1 -1
- package/dist/a2a/client.d.ts +7 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +2 -1
- package/dist/a2a/client.js.map +1 -1
- package/dist/agent/durable-background.d.ts +8 -5
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +15 -8
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/production-agent.d.ts +6 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +63 -26
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +9 -4
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +1 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +6 -5
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/audit/actions/export-audit-events.d.ts +27 -0
- package/dist/audit/actions/export-audit-events.d.ts.map +1 -0
- package/dist/audit/actions/export-audit-events.js +144 -0
- package/dist/audit/actions/export-audit-events.js.map +1 -0
- package/dist/audit/store.d.ts +1 -0
- package/dist/audit/store.d.ts.map +1 -1
- package/dist/audit/store.js +8 -3
- package/dist/audit/store.js.map +1 -1
- package/dist/audit/types.d.ts +3 -0
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js.map +1 -1
- package/dist/chat-threads/store.d.ts +10 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +6 -0
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +1 -0
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/code-agent-runs.d.ts +12 -0
- package/dist/cli/code-agent-runs.d.ts.map +1 -1
- package/dist/cli/code-agent-runs.js +1 -0
- package/dist/cli/code-agent-runs.js.map +1 -1
- package/dist/cli/doctor.d.ts +83 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +277 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.js +50 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/info.js +3 -3
- package/dist/cli/info.js.map +1 -1
- package/dist/cli/package-lifecycle.d.ts +50 -0
- package/dist/cli/package-lifecycle.d.ts.map +1 -0
- package/dist/cli/package-lifecycle.js +560 -0
- package/dist/cli/package-lifecycle.js.map +1 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +3 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +11 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +7 -4
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +83 -10
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.js +7 -3
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/chat/ChatHistoryList.d.ts +88 -0
- package/dist/client/chat/ChatHistoryList.d.ts.map +1 -0
- package/dist/client/chat/ChatHistoryList.js +83 -0
- package/dist/client/chat/ChatHistoryList.js.map +1 -0
- package/dist/client/chat/index.d.ts +1 -0
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js +1 -0
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +13 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +10 -2
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/code-agent-chat-adapter.d.ts +17 -1
- package/dist/client/code-agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/code-agent-chat-adapter.js +47 -3
- package/dist/client/code-agent-chat-adapter.js.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts +11 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.js +5 -3
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +25 -2
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +96 -5
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/VoiceButton.d.ts.map +1 -1
- package/dist/client/composer/VoiceButton.js +21 -1
- package/dist/client/composer/VoiceButton.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.js +5 -0
- package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
- package/dist/client/conversation/code-agent-transcript.d.ts +2 -0
- package/dist/client/conversation/code-agent-transcript.d.ts.map +1 -1
- package/dist/client/conversation/code-agent-transcript.js +3 -5
- package/dist/client/conversation/code-agent-transcript.js.map +1 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +2 -1
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +9 -1
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/voice-provider-status.d.ts +10 -0
- package/dist/client/voice-provider-status.d.ts.map +1 -0
- package/dist/client/voice-provider-status.js +32 -0
- package/dist/client/voice-provider-status.js.map +1 -0
- package/dist/code-agents/transcript-normalizer.d.ts +29 -0
- package/dist/code-agents/transcript-normalizer.d.ts.map +1 -1
- package/dist/code-agents/transcript-normalizer.js +55 -0
- package/dist/code-agents/transcript-normalizer.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +13 -11
- package/dist/deploy/build.js.map +1 -1
- package/dist/guards/db-tool-scoping.d.ts +38 -0
- package/dist/guards/db-tool-scoping.d.ts.map +1 -0
- package/dist/guards/db-tool-scoping.js +114 -0
- package/dist/guards/db-tool-scoping.js.map +1 -0
- package/dist/guards/index.d.ts +23 -0
- package/dist/guards/index.d.ts.map +1 -0
- package/dist/guards/index.js +19 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/guards/no-drizzle-push.d.ts +14 -0
- package/dist/guards/no-drizzle-push.d.ts.map +1 -0
- package/dist/guards/no-drizzle-push.js +97 -0
- package/dist/guards/no-drizzle-push.js.map +1 -0
- package/dist/guards/no-env-credentials.d.ts +36 -0
- package/dist/guards/no-env-credentials.d.ts.map +1 -0
- package/dist/guards/no-env-credentials.js +204 -0
- package/dist/guards/no-env-credentials.js.map +1 -0
- package/dist/guards/no-env-mutation.d.ts +23 -0
- package/dist/guards/no-env-mutation.d.ts.map +1 -0
- package/dist/guards/no-env-mutation.js +90 -0
- package/dist/guards/no-env-mutation.js.map +1 -0
- package/dist/guards/no-localhost-fallback.d.ts +30 -0
- package/dist/guards/no-localhost-fallback.d.ts.map +1 -0
- package/dist/guards/no-localhost-fallback.js +105 -0
- package/dist/guards/no-localhost-fallback.js.map +1 -0
- package/dist/guards/no-unscoped-credentials.d.ts +28 -0
- package/dist/guards/no-unscoped-credentials.d.ts.map +1 -0
- package/dist/guards/no-unscoped-credentials.js +199 -0
- package/dist/guards/no-unscoped-credentials.js.map +1 -0
- package/dist/guards/no-unscoped-queries.d.ts +32 -0
- package/dist/guards/no-unscoped-queries.d.ts.map +1 -0
- package/dist/guards/no-unscoped-queries.js +720 -0
- package/dist/guards/no-unscoped-queries.js.map +1 -0
- package/dist/guards/scan-utils.d.ts +28 -0
- package/dist/guards/scan-utils.d.ts.map +1 -0
- package/dist/guards/scan-utils.js +92 -0
- package/dist/guards/scan-utils.js.map +1 -0
- package/dist/guards/types.d.ts +28 -0
- package/dist/guards/types.d.ts.map +1 -0
- package/dist/guards/types.js +11 -0
- package/dist/guards/types.js.map +1 -0
- package/dist/integrations/a2a-continuation-processor.d.ts.map +1 -1
- package/dist/integrations/a2a-continuation-processor.js +25 -5
- package/dist/integrations/a2a-continuation-processor.js.map +1 -1
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +55 -21
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +11 -0
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +5 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +5 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/hosted-model-experiment.d.ts +39 -0
- package/dist/observability/hosted-model-experiment.d.ts.map +1 -0
- package/dist/observability/hosted-model-experiment.js +90 -0
- package/dist/observability/hosted-model-experiment.js.map +1 -0
- package/dist/observability/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts.map +1 -1
- package/dist/observability/routes.js +16 -0
- package/dist/observability/routes.js.map +1 -1
- package/dist/observability/store.d.ts.map +1 -1
- package/dist/observability/store.js +4 -1
- package/dist/observability/store.js.map +1 -1
- package/dist/observability/traces.d.ts +6 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +28 -2
- package/dist/observability/traces.js.map +1 -1
- package/dist/org/accept-pending.d.ts.map +1 -1
- package/dist/org/accept-pending.js +9 -1
- package/dist/org/accept-pending.js.map +1 -1
- package/dist/org/migrations.d.ts +7 -2
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +41 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/package-lifecycle/index.d.ts +2 -0
- package/dist/package-lifecycle/index.d.ts.map +1 -0
- package/dist/package-lifecycle/index.js +2 -0
- package/dist/package-lifecycle/index.js.map +1 -0
- package/dist/package-lifecycle/manifest.d.ts +24 -0
- package/dist/package-lifecycle/manifest.d.ts.map +1 -0
- package/dist/package-lifecycle/manifest.js +81 -0
- package/dist/package-lifecycle/manifest.js.map +1 -0
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/custom-registry.d.ts +32 -1
- package/dist/provider-api/custom-registry.d.ts.map +1 -1
- package/dist/provider-api/custom-registry.js +41 -1
- package/dist/provider-api/custom-registry.js.map +1 -1
- package/dist/provider-api/index.d.ts +1 -1
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +1 -1
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.js +19 -1
- package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +43 -3
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/chat/search-chats.d.ts +1 -1
- package/dist/scripts/chat/search-chats.d.ts.map +1 -1
- package/dist/scripts/chat/search-chats.js +11 -8
- package/dist/scripts/chat/search-chats.js.map +1 -1
- package/dist/secrets/register-framework-secrets.js +1 -1
- package/dist/secrets/register-framework-secrets.js.map +1 -1
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +45 -27
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +4 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +11 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +74 -19
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/core-routes-plugin.d.ts +3 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +36 -12
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/csrf.js +18 -5
- package/dist/server/csrf.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +34 -0
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/google-realtime-session.d.ts.map +1 -1
- package/dist/server/google-realtime-session.js +2 -34
- package/dist/server/google-realtime-session.js.map +1 -1
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +24 -2
- package/dist/server/poll.js.map +1 -1
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +64 -21
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/server/request-origin.d.ts +10 -0
- package/dist/server/request-origin.d.ts.map +1 -0
- package/dist/server/request-origin.js +60 -0
- package/dist/server/request-origin.js.map +1 -0
- package/dist/server/transcribe-voice.d.ts.map +1 -1
- package/dist/server/transcribe-voice.js +2 -48
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/server/voice-providers-status.d.ts.map +1 -1
- package/dist/server/voice-providers-status.js +2 -3
- package/dist/server/voice-providers-status.js.map +1 -1
- package/dist/shared/cache-control.d.ts +4 -6
- package/dist/shared/cache-control.d.ts.map +1 -1
- package/dist/shared/cache-control.js +2 -7
- package/dist/shared/cache-control.js.map +1 -1
- package/dist/styles/agent-native.css +1 -0
- package/dist/styles/chat-history-list.css +313 -0
- package/dist/templates/default/package.json +2 -2
- package/dist/templates/headless/package.json +0 -1
- package/dist/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +20 -0
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +8 -4
- package/dist/templates/workspace-core/package.json +0 -1
- package/dist/templates/workspace-root/package.json +0 -1
- package/dist/triggers/actions.d.ts.map +1 -1
- package/dist/triggers/actions.js +8 -3
- package/dist/triggers/actions.js.map +1 -1
- package/dist/triggers/types.d.ts +7 -1
- package/dist/triggers/types.d.ts.map +1 -1
- package/dist/triggers/types.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/audit-log.mdx +2 -1
- package/docs/content/automations.mdx +7 -7
- package/docs/content/creating-templates.mdx +1 -1
- package/docs/content/internationalization.mdx +2 -1
- package/docs/content/locales/ar-SA/audit-log.mdx +2 -1
- package/docs/content/locales/ar-SA/automations.mdx +7 -7
- package/docs/content/locales/ar-SA/getting-started.mdx +7 -1
- package/docs/content/locales/ar-SA/internationalization.mdx +1 -1
- package/docs/content/locales/ar-SA/package-lifecycle.mdx +19 -0
- package/docs/content/locales/ar-SA/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/ar-SA/security.mdx +8 -0
- package/docs/content/locales/de-DE/audit-log.mdx +2 -1
- package/docs/content/locales/de-DE/automations.mdx +7 -7
- package/docs/content/locales/de-DE/getting-started.mdx +7 -1
- package/docs/content/locales/de-DE/internationalization.mdx +1 -1
- package/docs/content/locales/de-DE/package-lifecycle.mdx +22 -0
- package/docs/content/locales/de-DE/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/de-DE/security.mdx +8 -0
- package/docs/content/locales/es-ES/audit-log.mdx +2 -1
- package/docs/content/locales/es-ES/automations.mdx +7 -7
- package/docs/content/locales/es-ES/getting-started.mdx +7 -1
- package/docs/content/locales/es-ES/internationalization.mdx +1 -1
- package/docs/content/locales/es-ES/package-lifecycle.mdx +22 -0
- package/docs/content/locales/es-ES/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/es-ES/security.mdx +8 -0
- package/docs/content/locales/fr-FR/audit-log.mdx +2 -1
- package/docs/content/locales/fr-FR/automations.mdx +7 -7
- package/docs/content/locales/fr-FR/getting-started.mdx +7 -1
- package/docs/content/locales/fr-FR/internationalization.mdx +1 -1
- package/docs/content/locales/fr-FR/package-lifecycle.mdx +21 -0
- package/docs/content/locales/fr-FR/sandbox-adapters.mdx +19 -8
- package/docs/content/locales/fr-FR/security.mdx +8 -0
- package/docs/content/locales/hi-IN/audit-log.mdx +2 -1
- package/docs/content/locales/hi-IN/automations.mdx +7 -7
- package/docs/content/locales/hi-IN/getting-started.mdx +7 -1
- package/docs/content/locales/hi-IN/internationalization.mdx +1 -1
- package/docs/content/locales/hi-IN/package-lifecycle.mdx +20 -0
- package/docs/content/locales/hi-IN/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/hi-IN/security.mdx +8 -0
- package/docs/content/locales/ja-JP/audit-log.mdx +2 -1
- package/docs/content/locales/ja-JP/automations.mdx +7 -7
- package/docs/content/locales/ja-JP/getting-started.mdx +7 -1
- package/docs/content/locales/ja-JP/internationalization.mdx +1 -1
- package/docs/content/locales/ja-JP/package-lifecycle.mdx +21 -0
- package/docs/content/locales/ja-JP/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/ja-JP/security.mdx +8 -0
- package/docs/content/locales/ko-KR/audit-log.mdx +2 -1
- package/docs/content/locales/ko-KR/automations.mdx +7 -7
- package/docs/content/locales/ko-KR/getting-started.mdx +7 -1
- package/docs/content/locales/ko-KR/internationalization.mdx +1 -1
- package/docs/content/locales/ko-KR/package-lifecycle.mdx +20 -0
- package/docs/content/locales/ko-KR/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/ko-KR/security.mdx +8 -0
- package/docs/content/locales/pt-BR/audit-log.mdx +2 -1
- package/docs/content/locales/pt-BR/automations.mdx +7 -7
- package/docs/content/locales/pt-BR/getting-started.mdx +7 -1
- package/docs/content/locales/pt-BR/internationalization.mdx +1 -1
- package/docs/content/locales/pt-BR/package-lifecycle.mdx +21 -0
- package/docs/content/locales/pt-BR/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/pt-BR/security.mdx +8 -0
- package/docs/content/locales/zh-CN/audit-log.mdx +2 -1
- package/docs/content/locales/zh-CN/automations.mdx +7 -7
- package/docs/content/locales/zh-CN/getting-started.mdx +6 -4
- package/docs/content/locales/zh-CN/internationalization.mdx +1 -1
- package/docs/content/locales/zh-CN/package-lifecycle.mdx +19 -0
- package/docs/content/locales/zh-CN/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/zh-CN/security.mdx +8 -0
- package/docs/content/locales/zh-TW/audit-log.mdx +2 -1
- package/docs/content/locales/zh-TW/automations.mdx +7 -7
- package/docs/content/locales/zh-TW/getting-started.mdx +6 -4
- package/docs/content/locales/zh-TW/internationalization.mdx +1 -1
- package/docs/content/locales/zh-TW/package-lifecycle.mdx +19 -0
- package/docs/content/locales/zh-TW/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/zh-TW/security.mdx +8 -0
- package/docs/content/package-lifecycle.mdx +51 -0
- package/docs/content/sandbox-adapters.mdx +16 -5
- package/package.json +12 -3
- package/src/templates/default/package.json +2 -2
- package/src/templates/headless/package.json +0 -1
- package/src/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +20 -0
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +8 -4
- package/src/templates/workspace-core/package.json +0 -1
- package/src/templates/workspace-root/package.json +0 -1
- package/corpus/templates/slides/app/components/ui/toast.tsx +0 -1
- package/corpus/templates/slides/app/components/ui/toaster.tsx +0 -1
- package/corpus/templates/slides/app/hooks/use-toast.ts +0 -1
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
type H3Event,
|
|
9
9
|
} from "h3";
|
|
10
10
|
|
|
11
|
+
import { getBuilderGatewayRequestHeaders } from "../agent/engine/builder-gateway-headers.js";
|
|
11
12
|
import {
|
|
12
13
|
actionsToEngineTools,
|
|
13
14
|
type ActionEntry,
|
|
@@ -18,9 +19,14 @@ import {
|
|
|
18
19
|
sanitizeToolErrorValue,
|
|
19
20
|
} from "../agent/tool-error-redaction.js";
|
|
20
21
|
import { getSession } from "./auth.js";
|
|
21
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
getBuilderGatewayBaseUrl,
|
|
24
|
+
resolveBuilderCredentials,
|
|
25
|
+
resolveSecret,
|
|
26
|
+
} from "./credential-provider.js";
|
|
22
27
|
import { getH3App } from "./framework-request-handler.js";
|
|
23
28
|
import { runWithRequestContext } from "./request-context.js";
|
|
29
|
+
import { isSameOriginRequest } from "./request-origin.js";
|
|
24
30
|
|
|
25
31
|
export const REALTIME_VOICE_SESSION_PATH =
|
|
26
32
|
"/_agent-native/realtime-voice/session";
|
|
@@ -296,6 +302,10 @@ function createSessionHandler(
|
|
|
296
302
|
) {
|
|
297
303
|
return defineEventHandler(async (event: H3Event) => {
|
|
298
304
|
if (getMethod(event) !== "POST") return invalidMethod(event);
|
|
305
|
+
if (!isSameOriginRequest(event)) {
|
|
306
|
+
setResponseStatus(event, 403);
|
|
307
|
+
return { error: "Cross-origin request rejected" };
|
|
308
|
+
}
|
|
299
309
|
setResponseHeader(event, "Cache-Control", "no-store");
|
|
300
310
|
|
|
301
311
|
const auth = await authenticateVoiceRequest(event, options);
|
|
@@ -336,12 +346,20 @@ function createSessionHandler(
|
|
|
336
346
|
: undefined,
|
|
337
347
|
},
|
|
338
348
|
async () => {
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
|
|
349
|
+
const builderCredentials = await resolveBuilderCredentials();
|
|
350
|
+
const builderConfigured = Boolean(
|
|
351
|
+
builderCredentials.privateKey?.trim() &&
|
|
352
|
+
builderCredentials.publicKey?.trim(),
|
|
353
|
+
);
|
|
354
|
+
const apiKey = builderConfigured
|
|
355
|
+
? null
|
|
356
|
+
: (await resolveSecret("OPENAI_API_KEY"))?.trim();
|
|
357
|
+
if (!builderConfigured && !apiKey) {
|
|
358
|
+
setResponseStatus(event, 409);
|
|
342
359
|
return {
|
|
343
360
|
error:
|
|
344
|
-
"
|
|
361
|
+
"Connect Builder or configure an OpenAI API key to use realtime voice.",
|
|
362
|
+
code: "realtime_voice_setup_required",
|
|
345
363
|
};
|
|
346
364
|
}
|
|
347
365
|
|
|
@@ -369,39 +387,73 @@ function createSessionHandler(
|
|
|
369
387
|
tool_choice: "auto",
|
|
370
388
|
};
|
|
371
389
|
|
|
372
|
-
const form = new FormData();
|
|
373
|
-
form.set("sdp", sdp);
|
|
374
|
-
form.set("session", JSON.stringify(session));
|
|
375
|
-
|
|
376
390
|
let upstream: Response;
|
|
377
391
|
try {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
392
|
+
if (builderConfigured) {
|
|
393
|
+
const gatewayUrl = new URL(
|
|
394
|
+
"realtime/calls",
|
|
395
|
+
getBuilderGatewayBaseUrl().endsWith("/")
|
|
396
|
+
? getBuilderGatewayBaseUrl()
|
|
397
|
+
: `${getBuilderGatewayBaseUrl()}/`,
|
|
398
|
+
);
|
|
399
|
+
gatewayUrl.searchParams.set(
|
|
400
|
+
"apiKey",
|
|
401
|
+
builderCredentials.publicKey!.trim(),
|
|
402
|
+
);
|
|
403
|
+
upstream = await fetch(gatewayUrl.toString(), {
|
|
404
|
+
method: "POST",
|
|
405
|
+
headers: {
|
|
406
|
+
"Content-Type": "application/json",
|
|
407
|
+
Authorization: `Bearer ${builderCredentials.privateKey!.trim()}`,
|
|
408
|
+
"x-builder-api-key": builderCredentials.publicKey!.trim(),
|
|
409
|
+
...getBuilderGatewayRequestHeaders(),
|
|
410
|
+
...(builderCredentials.userId
|
|
411
|
+
? { "x-builder-user-id": builderCredentials.userId }
|
|
412
|
+
: {}),
|
|
413
|
+
},
|
|
414
|
+
body: JSON.stringify({ sdp, session }),
|
|
415
|
+
});
|
|
416
|
+
} else {
|
|
417
|
+
const form = new FormData();
|
|
418
|
+
form.set("sdp", sdp);
|
|
419
|
+
form.set("session", JSON.stringify(session));
|
|
420
|
+
upstream = await fetch(OPENAI_REALTIME_CALLS_URL, {
|
|
421
|
+
method: "POST",
|
|
422
|
+
headers: {
|
|
423
|
+
Authorization: `Bearer ${apiKey}`,
|
|
424
|
+
"OpenAI-Safety-Identifier": await realtimeVoiceSafetyIdentifier(
|
|
425
|
+
auth.userEmail,
|
|
426
|
+
),
|
|
427
|
+
},
|
|
428
|
+
body: form,
|
|
429
|
+
});
|
|
430
|
+
}
|
|
388
431
|
} catch {
|
|
389
432
|
setResponseStatus(event, 502);
|
|
390
|
-
return {
|
|
433
|
+
return {
|
|
434
|
+
error: builderConfigured
|
|
435
|
+
? "Could not reach the Builder realtime voice gateway"
|
|
436
|
+
: "Could not reach the OpenAI Realtime API",
|
|
437
|
+
};
|
|
391
438
|
}
|
|
392
439
|
|
|
393
440
|
if (!upstream.ok) {
|
|
394
|
-
const detail = await safeOpenAiErrorDetail(
|
|
395
|
-
|
|
441
|
+
const detail = await safeOpenAiErrorDetail(
|
|
442
|
+
upstream,
|
|
443
|
+
builderConfigured ? builderCredentials.privateKey! : apiKey!,
|
|
444
|
+
);
|
|
445
|
+
setResponseStatus(event, builderConfigured ? upstream.status : 502);
|
|
396
446
|
return {
|
|
397
|
-
error:
|
|
447
|
+
error: `${builderConfigured ? "Builder" : "OpenAI"} rejected the realtime session (${upstream.status})${detail ? `: ${detail}` : ""}`,
|
|
398
448
|
};
|
|
399
449
|
}
|
|
400
450
|
|
|
401
451
|
const answerSdp = await upstream.text().catch(() => "");
|
|
402
452
|
if (!answerSdp.trim()) {
|
|
403
453
|
setResponseStatus(event, 502);
|
|
404
|
-
return {
|
|
454
|
+
return {
|
|
455
|
+
error: `${builderConfigured ? "Builder" : "OpenAI"} returned an empty realtime session answer`,
|
|
456
|
+
};
|
|
405
457
|
}
|
|
406
458
|
|
|
407
459
|
setResponseStatus(event, upstream.status);
|
|
@@ -482,6 +534,10 @@ function createToolHandler(
|
|
|
482
534
|
) {
|
|
483
535
|
return defineEventHandler(async (event: H3Event) => {
|
|
484
536
|
if (getMethod(event) !== "POST") return invalidMethod(event);
|
|
537
|
+
if (!isSameOriginRequest(event)) {
|
|
538
|
+
setResponseStatus(event, 403);
|
|
539
|
+
return { error: "Cross-origin request rejected" };
|
|
540
|
+
}
|
|
485
541
|
setResponseHeader(event, "Cache-Control", "no-store");
|
|
486
542
|
|
|
487
543
|
const auth = await authenticateVoiceRequest(event, options);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { getRequestHeader, type H3Event } from "h3";
|
|
2
|
+
|
|
3
|
+
function isLoopbackHost(host: string): boolean {
|
|
4
|
+
return host.startsWith("localhost:") || host.startsWith("127.0.0.1:");
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Reject cross-site POSTs. Cookies are `SameSite=None; Secure` over HTTPS so
|
|
9
|
+
* the browser would otherwise attach the session to a forged form submission
|
|
10
|
+
* from evil.com, causing us to spend provider credits on the user's behalf.
|
|
11
|
+
* Same-origin browsers always send `Origin` on POST; if it's missing we fall
|
|
12
|
+
* back to `Sec-Fetch-Site` so Safari's fetch-spec behavior still works.
|
|
13
|
+
*/
|
|
14
|
+
export function isSameOriginRequest(event: H3Event): boolean {
|
|
15
|
+
const host = getRequestHeader(event, "host");
|
|
16
|
+
const origin = getRequestHeader(event, "origin");
|
|
17
|
+
if (origin && host) {
|
|
18
|
+
try {
|
|
19
|
+
const parsed = new URL(origin);
|
|
20
|
+
const forwardedProto = getRequestHeader(event, "x-forwarded-proto");
|
|
21
|
+
const forwardedProtocol =
|
|
22
|
+
forwardedProto === "https" || forwardedProto === "http"
|
|
23
|
+
? `${forwardedProto}:`
|
|
24
|
+
: null;
|
|
25
|
+
const matchesScheme = forwardedProtocol
|
|
26
|
+
? parsed.protocol === forwardedProtocol
|
|
27
|
+
: parsed.protocol === "https:" ||
|
|
28
|
+
(parsed.protocol === "http:" && isLoopbackHost(host));
|
|
29
|
+
if (parsed.host === host && matchesScheme) return true;
|
|
30
|
+
// Tauri desktop dev serves the tray WebView from localhost:1420 while
|
|
31
|
+
// the app server lives on the template dev port. Production Tauri
|
|
32
|
+
// WebViews can also send a tauri://localhost origin. Trust that custom
|
|
33
|
+
// scheme, while limiting the web-scheme desktop origins below to a
|
|
34
|
+
// loopback app server so arbitrary websites still fail the CSRF check.
|
|
35
|
+
if (parsed.protocol === "tauri:" && parsed.hostname === "localhost") {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (
|
|
39
|
+
(parsed.protocol === "http:" || parsed.protocol === "https:") &&
|
|
40
|
+
parsed.hostname === "tauri.localhost" &&
|
|
41
|
+
isLoopbackHost(host)
|
|
42
|
+
) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
if (
|
|
46
|
+
parsed.protocol === "http:" &&
|
|
47
|
+
(parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1") &&
|
|
48
|
+
parsed.port === "1420" &&
|
|
49
|
+
isLoopbackHost(host)
|
|
50
|
+
) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
} catch {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const fetchSite = getRequestHeader(event, "sec-fetch-site");
|
|
59
|
+
if (fetchSite) return fetchSite === "same-origin" || fetchSite === "none";
|
|
60
|
+
// No Origin and no Sec-Fetch-Site: likely a non-browser client (curl,
|
|
61
|
+
// server-side) — safe to allow, CSRF requires a browser with ambient cookies.
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
import {
|
|
21
21
|
defineEventHandler,
|
|
22
22
|
getMethod,
|
|
23
|
-
getRequestHeader,
|
|
24
23
|
readMultipartFormData,
|
|
25
24
|
setResponseStatus,
|
|
26
25
|
type H3Event,
|
|
@@ -43,6 +42,7 @@ import {
|
|
|
43
42
|
resolveSecret,
|
|
44
43
|
} from "./credential-provider.js";
|
|
45
44
|
import { runWithRequestContext } from "./request-context.js";
|
|
45
|
+
import { isSameOriginRequest } from "./request-origin.js";
|
|
46
46
|
|
|
47
47
|
const WHISPER_URL = "https://api.openai.com/v1/audio/transcriptions";
|
|
48
48
|
const GROQ_URL = "https://api.groq.com/openai/v1/audio/transcriptions";
|
|
@@ -75,55 +75,6 @@ const BUILDER_GEMINI_TRANSCRIPTION_MODEL = "gemini-3-1-flash-lite";
|
|
|
75
75
|
const GEMINI_MODEL = "gemini-2.0-flash-lite";
|
|
76
76
|
const GEMINI_URL = `https://generativelanguage.googleapis.com/v1beta/models/${GEMINI_MODEL}:generateContent`;
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Reject cross-site POSTs. Cookies are `SameSite=None; Secure` over HTTPS so
|
|
80
|
-
* the browser would otherwise attach the session to a forged form submission
|
|
81
|
-
* from evil.com, causing us to spend OpenAI credits on the user's behalf.
|
|
82
|
-
* Same-origin browsers always send `Origin` on POST; if it's missing we fall
|
|
83
|
-
* back to `Sec-Fetch-Site` so Safari's fetch-spec behavior still works.
|
|
84
|
-
*/
|
|
85
|
-
function isSameOriginRequest(event: H3Event): boolean {
|
|
86
|
-
const host = getRequestHeader(event, "host");
|
|
87
|
-
const origin = getRequestHeader(event, "origin");
|
|
88
|
-
if (origin && host) {
|
|
89
|
-
try {
|
|
90
|
-
const parsed = new URL(origin);
|
|
91
|
-
if (parsed.host === host) return true;
|
|
92
|
-
// Tauri desktop dev serves the tray WebView from localhost:1420 while
|
|
93
|
-
// the app server lives on the template dev port. Production Tauri
|
|
94
|
-
// WebViews can also send a tauri://localhost origin. Treat only those
|
|
95
|
-
// desktop origins as trusted cross-origin callers; arbitrary websites
|
|
96
|
-
// still fail the CSRF check.
|
|
97
|
-
if (parsed.protocol === "tauri:" && parsed.hostname === "localhost") {
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
if (
|
|
101
|
-
(parsed.protocol === "http:" || parsed.protocol === "https:") &&
|
|
102
|
-
parsed.hostname === "tauri.localhost" &&
|
|
103
|
-
(host.startsWith("localhost:") || host.startsWith("127.0.0.1:"))
|
|
104
|
-
) {
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
if (
|
|
108
|
-
parsed.protocol === "http:" &&
|
|
109
|
-
(parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1") &&
|
|
110
|
-
parsed.port === "1420" &&
|
|
111
|
-
(host.startsWith("localhost:") || host.startsWith("127.0.0.1:"))
|
|
112
|
-
) {
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
return false;
|
|
116
|
-
} catch {
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
const fetchSite = getRequestHeader(event, "sec-fetch-site");
|
|
121
|
-
if (fetchSite) return fetchSite === "same-origin" || fetchSite === "none";
|
|
122
|
-
// No Origin and no Sec-Fetch-Site: likely a non-browser client (curl,
|
|
123
|
-
// server-side) — safe to allow, CSRF requires a browser with ambient cookies.
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
78
|
/**
|
|
128
79
|
* Derive an AbortSignal that fires when the client disconnects mid-request
|
|
129
80
|
* (e.g. the desktop client's own 8s ceiling firing before a provider call's
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import { getOrgContext } from "../org/context.js";
|
|
23
23
|
import { getSession } from "./auth.js";
|
|
24
24
|
import {
|
|
25
|
-
|
|
25
|
+
resolveHasCompleteBuilderConnection,
|
|
26
26
|
resolveSecret,
|
|
27
27
|
} from "./credential-provider.js";
|
|
28
28
|
import { resolveGoogleRealtimeCredentials } from "./google-realtime-session.js";
|
|
@@ -90,8 +90,9 @@ export function createVoiceProvidersStatusHandler() {
|
|
|
90
90
|
let builder = false;
|
|
91
91
|
try {
|
|
92
92
|
builder =
|
|
93
|
-
(await withRequestContext(() =>
|
|
94
|
-
|
|
93
|
+
(await withRequestContext(() =>
|
|
94
|
+
resolveHasCompleteBuilderConnection(),
|
|
95
|
+
)) === true;
|
|
95
96
|
} catch {
|
|
96
97
|
builder = false;
|
|
97
98
|
}
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
export const DEFAULT_SSR_CACHE_CONTROL = "public, max-age=0, must-revalidate";
|
|
2
2
|
|
|
3
3
|
export const DEFAULT_SSR_CDN_CACHE_CONTROL =
|
|
4
|
-
"public, s-maxage=
|
|
4
|
+
"public, s-maxage=600, stale-while-revalidate=604800, stale-if-error=3600";
|
|
5
5
|
|
|
6
6
|
export const DEFAULT_SSR_NETLIFY_CDN_CACHE_CONTROL =
|
|
7
|
-
"public, durable, s-maxage=
|
|
8
|
-
|
|
9
|
-
// React Router data requests can select a subset of route loaders with
|
|
10
|
-
// `?_routes=...`. Ignore every other query parameter (UTM tags, click ids,
|
|
11
|
-
// and similar tracking noise) so they cannot fragment Netlify's SSR cache.
|
|
12
|
-
export const DEFAULT_SSR_NETLIFY_VARY = "query=_routes";
|
|
7
|
+
"public, durable, s-maxage=600, stale-while-revalidate=604800, stale-if-error=3600";
|
|
13
8
|
|
|
14
9
|
export const DEFAULT_SSR_CACHE_HEADERS = {
|
|
15
10
|
"cache-control": DEFAULT_SSR_CACHE_CONTROL,
|
|
16
11
|
"cdn-cache-control": DEFAULT_SSR_CDN_CACHE_CONTROL,
|
|
17
12
|
"netlify-cdn-cache-control": DEFAULT_SSR_NETLIFY_CDN_CACHE_CONTROL,
|
|
18
|
-
"netlify-vary": DEFAULT_SSR_NETLIFY_VARY,
|
|
19
13
|
} as const;
|
|
20
14
|
|
|
21
15
|
export const DEFAULT_SPECULATION_RULES_PATH =
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
@import "./agent-conversation.css";
|
|
26
26
|
@import "./rich-markdown-editor.css";
|
|
27
27
|
@import "./blocks.css";
|
|
28
|
+
@import "./chat-history-list.css";
|
|
28
29
|
|
|
29
30
|
/* Scan @agent-native/core's compiled client output for Tailwind classes.
|
|
30
31
|
Path is resolved relative to THIS file. After build, this CSS lives at
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared chat history list — used by core's `HistoryPopover`
|
|
3
|
+
* (MultiTabAssistantChat.tsx) and by Agent-Native Code's run rail
|
|
4
|
+
* (code-agents-ui CodeAgentsApp.tsx). Stable, prefixed class names (not
|
|
5
|
+
* Tailwind utilities) so the same visual language works in both a Tailwind
|
|
6
|
+
* host (core/templates) and a plain-CSS host (code-agents-ui), matching the
|
|
7
|
+
* approach used by agent-conversation.css. All colors resolve through the
|
|
8
|
+
* shared `hsl(var(--token))` variables so light/dark both work in either
|
|
9
|
+
* host's theme.
|
|
10
|
+
*
|
|
11
|
+
* Two density variants:
|
|
12
|
+
* .an-chat-history default — compact popover list (core)
|
|
13
|
+
* .an-chat-history--rail denser rail list with solid active state
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
.an-chat-history {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
min-height: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.an-chat-history__search {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
padding: 8px 12px;
|
|
27
|
+
border-bottom: 1px solid hsl(var(--border));
|
|
28
|
+
color: hsl(var(--muted-foreground));
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.an-chat-history__search-icon {
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.an-chat-history__search-input {
|
|
37
|
+
flex: 1;
|
|
38
|
+
min-width: 0;
|
|
39
|
+
background: transparent;
|
|
40
|
+
border: 0;
|
|
41
|
+
outline: none;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
color: hsl(var(--foreground));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.an-chat-history__search-input::placeholder {
|
|
47
|
+
color: hsl(var(--muted-foreground));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.an-chat-history__list {
|
|
51
|
+
overflow-y: auto;
|
|
52
|
+
padding: 4px 0;
|
|
53
|
+
max-height: 16rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.an-chat-history--rail .an-chat-history__list {
|
|
57
|
+
max-height: none;
|
|
58
|
+
flex: 1;
|
|
59
|
+
min-height: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.an-chat-history__state {
|
|
63
|
+
padding: 16px 12px;
|
|
64
|
+
text-align: center;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
color: hsl(var(--muted-foreground));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.an-chat-history__state--error {
|
|
70
|
+
/* Matches the amber-500 warning tone historically used for the
|
|
71
|
+
HistoryPopover load-error state (Tailwind's `text-amber-500`). */
|
|
72
|
+
color: hsl(38 92% 50%);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.an-chat-history__section-label {
|
|
76
|
+
padding: 6px 12px 4px;
|
|
77
|
+
font-size: 10px;
|
|
78
|
+
text-transform: uppercase;
|
|
79
|
+
letter-spacing: 0.04em;
|
|
80
|
+
color: hsl(var(--muted-foreground) / 0.7);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.an-chat-history--rail .an-chat-history__section {
|
|
84
|
+
display: grid;
|
|
85
|
+
gap: 1px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ── Row ──────────────────────────────────────────────────────────────── */
|
|
89
|
+
|
|
90
|
+
.an-chat-history-row {
|
|
91
|
+
position: relative;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.an-chat-history--rail .an-chat-history-row {
|
|
95
|
+
border-radius: calc(var(--radius) - 2px);
|
|
96
|
+
margin: 0 4px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.an-chat-history-row__button {
|
|
100
|
+
display: block;
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding: 8px 12px;
|
|
103
|
+
border: 0;
|
|
104
|
+
background: transparent;
|
|
105
|
+
color: inherit;
|
|
106
|
+
text-align: start;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.an-chat-history-row--disabled .an-chat-history-row__button {
|
|
111
|
+
cursor: default;
|
|
112
|
+
opacity: 0.6;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.an-chat-history-row:hover .an-chat-history-row__button {
|
|
116
|
+
background: hsl(var(--accent) / 0.5);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.an-chat-history-row--active .an-chat-history-row__button {
|
|
120
|
+
background: hsl(var(--accent) / 0.3);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.an-chat-history--rail .an-chat-history-row__button {
|
|
124
|
+
min-height: 32px;
|
|
125
|
+
padding: 6px 36px 6px 10px;
|
|
126
|
+
border-radius: inherit;
|
|
127
|
+
color: hsl(var(--muted-foreground));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.an-chat-history--rail
|
|
131
|
+
.an-chat-history-row--active
|
|
132
|
+
.an-chat-history-row__button {
|
|
133
|
+
background: hsl(var(--accent));
|
|
134
|
+
color: hsl(var(--accent-foreground));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.an-chat-history-row__topline {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: baseline;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
gap: 8px;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.an-chat-history-row__title {
|
|
146
|
+
min-width: 0;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
font-size: 12px;
|
|
151
|
+
font-weight: 500;
|
|
152
|
+
color: hsl(var(--foreground));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.an-chat-history-row--active .an-chat-history-row__title {
|
|
156
|
+
color: hsl(var(--foreground));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.an-chat-history--rail
|
|
160
|
+
.an-chat-history-row--active
|
|
161
|
+
.an-chat-history-row__title {
|
|
162
|
+
color: hsl(var(--accent-foreground));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.an-chat-history--rail
|
|
166
|
+
.an-chat-history-row--pinned:not(.an-chat-history-row--active)
|
|
167
|
+
.an-chat-history-row__title {
|
|
168
|
+
color: hsl(var(--foreground));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.an-chat-history-row__timestamp {
|
|
172
|
+
flex-shrink: 0;
|
|
173
|
+
font-size: 10px;
|
|
174
|
+
color: hsl(var(--muted-foreground));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.an-chat-history--rail .an-chat-history-row__timestamp {
|
|
178
|
+
font-size: 11px;
|
|
179
|
+
color: hsl(var(--muted-foreground) / 0.62);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.an-chat-history--rail
|
|
183
|
+
.an-chat-history-row--active
|
|
184
|
+
.an-chat-history-row__timestamp {
|
|
185
|
+
color: hsl(var(--accent-foreground));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.an-chat-history-row__subtitle {
|
|
189
|
+
margin-top: 2px;
|
|
190
|
+
overflow: hidden;
|
|
191
|
+
text-overflow: ellipsis;
|
|
192
|
+
white-space: nowrap;
|
|
193
|
+
font-size: 11px;
|
|
194
|
+
color: hsl(var(--muted-foreground));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.an-chat-history-row__detail {
|
|
198
|
+
margin-top: 2px;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
text-overflow: ellipsis;
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
font-size: 10px;
|
|
203
|
+
color: hsl(var(--muted-foreground) / 0.7);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* ── Inline rename ────────────────────────────────────────────────────── */
|
|
207
|
+
|
|
208
|
+
.an-chat-history-row__rename {
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
padding: 6px 12px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.an-chat-history-row__rename-input {
|
|
215
|
+
width: 100%;
|
|
216
|
+
min-width: 0;
|
|
217
|
+
padding: 2px 6px;
|
|
218
|
+
border: 1px solid hsl(var(--ring));
|
|
219
|
+
border-radius: calc(var(--radius) - 3px);
|
|
220
|
+
background: hsl(var(--background));
|
|
221
|
+
color: hsl(var(--foreground));
|
|
222
|
+
font-size: 12px;
|
|
223
|
+
font-weight: 500;
|
|
224
|
+
line-height: 1.4;
|
|
225
|
+
outline: none;
|
|
226
|
+
box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.an-chat-history-row__rename-input:focus {
|
|
230
|
+
box-shadow: 0 0 0 2px hsl(var(--ring) / 0.35);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* ── Row action menu ──────────────────────────────────────────────────── */
|
|
234
|
+
|
|
235
|
+
.an-chat-history-row__menu {
|
|
236
|
+
position: absolute;
|
|
237
|
+
top: 4px;
|
|
238
|
+
inset-inline-end: 4px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.an-chat-history-row__menu-trigger {
|
|
242
|
+
display: inline-flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
245
|
+
width: 24px;
|
|
246
|
+
height: 24px;
|
|
247
|
+
border: 0;
|
|
248
|
+
border-radius: calc(var(--radius) - 3px);
|
|
249
|
+
background: transparent;
|
|
250
|
+
color: hsl(var(--muted-foreground) / 0.72);
|
|
251
|
+
opacity: 0;
|
|
252
|
+
cursor: pointer;
|
|
253
|
+
transition:
|
|
254
|
+
background 100ms ease,
|
|
255
|
+
color 100ms ease,
|
|
256
|
+
opacity 100ms ease;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.an-chat-history-row:hover .an-chat-history-row__menu-trigger,
|
|
260
|
+
.an-chat-history-row:focus-within .an-chat-history-row__menu-trigger,
|
|
261
|
+
.an-chat-history-row__menu-trigger[aria-expanded="true"],
|
|
262
|
+
.an-chat-history-row__menu-trigger--pinned {
|
|
263
|
+
opacity: 1;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.an-chat-history-row__menu-trigger:hover,
|
|
267
|
+
.an-chat-history-row__menu-trigger[aria-expanded="true"] {
|
|
268
|
+
background: hsl(var(--accent));
|
|
269
|
+
color: hsl(var(--foreground));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.an-chat-history-row__menu-content {
|
|
273
|
+
position: absolute;
|
|
274
|
+
top: calc(100% + 4px);
|
|
275
|
+
inset-inline-end: 0;
|
|
276
|
+
z-index: 30;
|
|
277
|
+
min-width: 160px;
|
|
278
|
+
padding: 4px;
|
|
279
|
+
border: 1px solid hsl(var(--border));
|
|
280
|
+
border-radius: var(--radius);
|
|
281
|
+
background: hsl(var(--popover));
|
|
282
|
+
color: hsl(var(--popover-foreground));
|
|
283
|
+
box-shadow: 0 10px 30px hsl(var(--background) / 0.28);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.an-chat-history-row__menu-item {
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
gap: 8px;
|
|
290
|
+
width: 100%;
|
|
291
|
+
padding: 6px 8px;
|
|
292
|
+
border: 0;
|
|
293
|
+
border-radius: calc(var(--radius) - 4px);
|
|
294
|
+
background: transparent;
|
|
295
|
+
color: inherit;
|
|
296
|
+
font-size: 12px;
|
|
297
|
+
text-align: start;
|
|
298
|
+
cursor: pointer;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.an-chat-history-row__menu-item:hover {
|
|
302
|
+
background: hsl(var(--accent));
|
|
303
|
+
color: hsl(var(--accent-foreground));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.an-chat-history-row__menu-item--danger {
|
|
307
|
+
color: hsl(var(--destructive));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.an-chat-history-row__menu-item--danger:hover {
|
|
311
|
+
background: hsl(var(--destructive) / 0.12);
|
|
312
|
+
color: hsl(var(--destructive));
|
|
313
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"build": "agent-native build",
|
|
8
8
|
"start": "agent-native start",
|
|
9
9
|
"typecheck": "agent-native typecheck",
|
|
10
|
+
"doctor": "agent-native doctor",
|
|
10
11
|
"action": "agent-native action",
|
|
11
12
|
"script": "agent-native script",
|
|
12
13
|
"skills:update": "agent-native skills update scaffold --project",
|
|
@@ -43,8 +44,7 @@
|
|
|
43
44
|
"tailwind-merge": "^3.5.0",
|
|
44
45
|
"tailwindcss": "^4.1.18",
|
|
45
46
|
"tsx": "^4.20.3",
|
|
46
|
-
"typescript": "catalog:",
|
|
47
47
|
"typescript-7": "catalog:",
|
|
48
|
-
"vite": "
|
|
48
|
+
"vite": "8.1.0"
|
|
49
49
|
}
|
|
50
50
|
}
|