@agent-native/core 0.108.0 → 0.109.1
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 +25 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +162 -17
- package/corpus/core/src/a2a/correlation.ts +50 -0
- package/corpus/core/src/a2a/handlers.ts +200 -14
- package/corpus/core/src/a2a/index.ts +7 -1
- package/corpus/core/src/a2a/invoke.ts +77 -1
- package/corpus/core/src/a2a/server.ts +13 -1
- package/corpus/core/src/a2a/task-store.ts +146 -6
- package/corpus/core/src/a2a/types.ts +32 -0
- package/corpus/core/src/action.ts +5 -2
- package/corpus/core/src/agent/production-agent.ts +33 -4
- package/corpus/core/src/client/AssistantChat.tsx +648 -603
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +31 -4
- package/corpus/core/src/client/agent-chat-adapter.ts +23 -37
- package/corpus/core/src/client/agent-sidebar-state.ts +4 -0
- package/corpus/core/src/client/analytics.ts +84 -0
- package/corpus/core/src/client/chat/message-components.tsx +94 -22
- package/corpus/core/src/client/chat/tool-call-display.tsx +170 -47
- package/corpus/core/src/client/chat/use-agent-chat-lifecycle-tracking.ts +74 -0
- package/corpus/core/src/client/chat-thread-url.ts +11 -0
- package/corpus/core/src/client/error-capture.ts +12 -0
- package/corpus/core/src/client/extensions/ExtensionSlot.tsx +37 -1
- package/corpus/core/src/client/index.ts +2 -0
- package/corpus/core/src/client/route-chunk-recovery.ts +20 -8
- package/corpus/core/src/client/session-replay.ts +31 -0
- package/corpus/core/src/client/use-run-stuck-detection.ts +27 -1
- package/corpus/core/src/db/client.ts +55 -0
- package/corpus/core/src/extensions/actions.ts +2 -14
- package/corpus/core/src/extensions/store.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +3 -0
- package/corpus/core/src/mcp/build-server.ts +2 -2
- package/corpus/core/src/observability/traces.ts +172 -19
- package/corpus/core/src/progress/actions.ts +4 -2
- package/corpus/core/src/provider-api/index.ts +205 -105
- package/corpus/core/src/scripts/call-agent.ts +190 -19
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +112 -25
- package/corpus/core/src/server/agent-chat-plugin.ts +136 -4
- package/corpus/core/src/styles/agent-conversation.css +7 -0
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +19 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +19 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +19 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +49 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +7 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +29 -10
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +54 -23
- package/corpus/templates/analytics/.builder/skills/apollo/SKILL.md +19 -41
- package/corpus/templates/analytics/.builder/skills/commonroom/SKILL.md +20 -35
- package/corpus/templates/analytics/.builder/skills/github/SKILL.md +23 -67
- package/corpus/templates/analytics/.builder/skills/pylon/SKILL.md +25 -43
- package/corpus/templates/analytics/AGENTS.md +22 -13
- package/corpus/templates/analytics/actions/account-deep-dive.ts +1 -0
- package/corpus/templates/analytics/actions/configure-gong-native-insights.ts +29 -0
- package/corpus/templates/analytics/actions/content-calendar-schema.ts +8 -4
- package/corpus/templates/analytics/actions/content-calendar.ts +12 -4
- package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +2 -1
- package/corpus/templates/analytics/actions/gong-calls.ts +113 -22
- package/corpus/templates/analytics/actions/gong-native-insights.ts +166 -0
- package/corpus/templates/analytics/actions/hubspot-deals.ts +190 -46
- package/corpus/templates/analytics/actions/pylon-issues.ts +123 -0
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +1 -1
- package/corpus/templates/analytics/actions/slack-messages.ts +179 -27
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +48 -152
- package/corpus/templates/analytics/app/components/ui/chart.tsx +1 -1
- package/corpus/templates/analytics/app/hooks/use-chart-tooltip-flip.ts +21 -6
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +13 -0
- package/corpus/templates/analytics/app/i18n-data.ts +134 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +181 -30
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +6 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +4 -3
- package/corpus/templates/analytics/changelog/2026-07-17-analytics-now-includes-a-default-alert-for-spikes-in-stuck-agent-chats.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-dashboard-editors-can-add-shared-extensions-or-opt-into-per-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-dashboard-extensions-show-a-loading-skeleton.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-errors-now-group-repeat-failures-consistently-and-keep-priva.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-gong-transcript-reviews-now-batch-bounded-call-windows-for-f.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-hubspot-deal-filters-now-run-in-hubspot-before-paging-result.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-notion-content-calendars-now-discover-the-matching-database-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-pylon-dashboard-reads-now-use-the-paginated-issue-search-api.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-slack-reads-no-longer-join-channels-and-report-pagination-coverage.md +6 -0
- package/corpus/templates/analytics/docs/schemas/first-party-analytics.md +23 -14
- package/corpus/templates/analytics/docs/schemas/tracked-events.md +5 -1
- package/corpus/templates/analytics/server/handlers/notion.ts +14 -3
- package/corpus/templates/analytics/server/handlers/slack.ts +182 -29
- package/corpus/templates/analytics/server/jobs/analytics-alerts.ts +3 -3
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +2 -6
- package/corpus/templates/analytics/server/lib/analytics-alerts.ts +209 -87
- package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +6 -2
- package/corpus/templates/analytics/server/lib/error-capture.ts +75 -8
- package/corpus/templates/analytics/server/lib/gong-native-policy.ts +72 -0
- package/corpus/templates/analytics/server/lib/gong.ts +54 -66
- package/corpus/templates/analytics/server/lib/hubspot.ts +40 -3
- package/corpus/templates/analytics/server/lib/notion.ts +83 -8
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +4 -0
- package/corpus/templates/analytics/server/lib/slack.ts +242 -90
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +3 -3
- package/corpus/templates/analytics/server/routes/api/pylon/accounts.get.ts +42 -1
- package/corpus/templates/analytics/server/routes/api/pylon/issues.get.ts +71 -1
- package/corpus/templates/analytics/server/routes/api/test-connection.post.ts +44 -4
- package/corpus/templates/clips/actions/finalize-recording.ts +541 -62
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +19 -1
- package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +123 -0
- package/corpus/templates/clips/app/components/library/library-grid.tsx +42 -4
- package/corpus/templates/clips/app/components/library/recording-card.tsx +30 -0
- package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +17 -2
- package/corpus/templates/clips/app/components/player/video-player.tsx +14 -2
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +2 -2
- package/corpus/templates/clips/app/entry.client.tsx +6 -1
- package/corpus/templates/clips/app/i18n/ar-SA.ts +12 -1
- package/corpus/templates/clips/app/i18n/de-DE.ts +12 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +12 -1
- package/corpus/templates/clips/app/i18n/es-ES.ts +11 -1
- package/corpus/templates/clips/app/i18n/fr-FR.ts +11 -1
- package/corpus/templates/clips/app/i18n/hi-IN.ts +10 -1
- package/corpus/templates/clips/app/i18n/ja-JP.ts +12 -1
- package/corpus/templates/clips/app/i18n/ko-KR.ts +11 -1
- package/corpus/templates/clips/app/i18n/pt-BR.ts +11 -1
- package/corpus/templates/clips/app/i18n/zh-CN.ts +11 -1
- package/corpus/templates/clips/app/i18n/zh-TW.ts +11 -1
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +72 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +1 -1
- package/corpus/templates/clips/app/routes/record.tsx +3 -3
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +6 -3
- package/corpus/templates/clips/changelog/2026-07-17-choose-which-workspace-receives-new-clips-recordings-and-des.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-clips-now-retries-storage-verification-in-the-background-ins.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-create-folders-directly-from-the-move-menu.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-failed-desktop-uploads-now-offer-a-direct-way-to-reopen-clip.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-fixed-broken-thumbnail-icons-appearing-over-playable-clip-em.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-playback-comments-stay-readable-at-faster-playback-speeds.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/finalize-recovery.ts +3 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +3 -3
- package/corpus/templates/clips/desktop/src/app.tsx +19 -7
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +111 -13
- package/corpus/templates/clips/desktop/src/lib/upload-verification.ts +16 -7
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +2 -4
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/live_upload.rs +32 -15
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +45 -18
- package/corpus/templates/clips/server/jobs/media-verification.ts +130 -0
- package/corpus/templates/clips/server/lib/builder-media-compression.ts +15 -0
- package/corpus/templates/clips/server/lib/media-verification-state.ts +38 -0
- package/corpus/templates/clips/server/lib/player-thumbnail-url.ts +31 -0
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +10 -3
- package/corpus/templates/clips/server/plugins/auth.ts +5 -5
- package/corpus/templates/clips/server/plugins/calendar-jobs.ts +2 -0
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +12 -2
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +6 -1
- package/corpus/templates/clips/server/routes/api/thumbnail/[recordingId].get.ts +340 -0
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +24 -7
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +91 -7
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/status.get.ts +14 -0
- package/corpus/templates/clips/shared/finalize-recovery.ts +61 -2
- package/corpus/templates/clips/shared/share-meta.ts +1 -1
- package/corpus/templates/content/app/entry.client.tsx +6 -1
- package/corpus/templates/dispatch/AGENTS.md +5 -0
- package/corpus/templates/dispatch/changelog/2026-07-17-apps-page-links-to-other-available-apps.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-17-curated-template-remixes.md +6 -0
- package/corpus/templates/mail/app/entry.client.tsx +6 -1
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +11 -7
- package/corpus/templates/slides/.env.example +0 -1
- package/corpus/templates/slides/AGENTS.md +4 -0
- package/corpus/templates/slides/DEVELOPING.md +2 -2
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
- package/corpus/templates/slides/actions/logo-config.ts +6 -7
- package/corpus/templates/slides/actions/search-images.ts +11 -39
- package/corpus/templates/slides/actions/search-logos.ts +5 -52
- package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +16 -26
- package/corpus/templates/slides/app/entry.client.tsx +6 -1
- package/corpus/templates/slides/server/lib/media-search-providers.ts +216 -0
- package/corpus/templates/slides/server/register-secrets.ts +30 -0
- package/dist/a2a/client.d.ts +47 -1
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +94 -12
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/correlation.d.ts +10 -0
- package/dist/a2a/correlation.d.ts.map +1 -0
- package/dist/a2a/correlation.js +40 -0
- package/dist/a2a/correlation.js.map +1 -0
- package/dist/a2a/handlers.d.ts.map +1 -1
- package/dist/a2a/handlers.js +147 -15
- package/dist/a2a/handlers.js.map +1 -1
- package/dist/a2a/index.d.ts +4 -4
- package/dist/a2a/index.d.ts.map +1 -1
- package/dist/a2a/index.js +2 -2
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/invoke.d.ts +29 -2
- package/dist/a2a/invoke.d.ts.map +1 -1
- package/dist/a2a/invoke.js +33 -1
- package/dist/a2a/invoke.js.map +1 -1
- package/dist/a2a/server.d.ts.map +1 -1
- package/dist/a2a/server.js +14 -1
- package/dist/a2a/server.js.map +1 -1
- package/dist/a2a/task-store.d.ts +12 -1
- package/dist/a2a/task-store.d.ts.map +1 -1
- package/dist/a2a/task-store.js +96 -6
- package/dist/a2a/task-store.js.map +1 -1
- package/dist/a2a/types.d.ts +27 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +5 -2
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +14 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +19 -3
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +14 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +158 -136
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +27 -4
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +21 -39
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-sidebar-state.d.ts +1 -0
- package/dist/client/agent-sidebar-state.d.ts.map +1 -1
- package/dist/client/agent-sidebar-state.js +4 -0
- package/dist/client/agent-sidebar-state.js.map +1 -1
- package/dist/client/analytics.d.ts +14 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +67 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +8 -0
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +62 -19
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +6 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +83 -14
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.d.ts +8 -0
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.d.ts.map +1 -0
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.js +51 -0
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.js.map +1 -0
- package/dist/client/chat-thread-url.d.ts +2 -0
- package/dist/client/chat-thread-url.d.ts.map +1 -0
- package/dist/client/chat-thread-url.js +12 -0
- package/dist/client/chat-thread-url.js.map +1 -0
- package/dist/client/error-capture.d.ts.map +1 -1
- package/dist/client/error-capture.js +7 -0
- package/dist/client/error-capture.js.map +1 -1
- package/dist/client/extensions/ExtensionSlot.d.ts +3 -1
- package/dist/client/extensions/ExtensionSlot.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionSlot.js +28 -3
- package/dist/client/extensions/ExtensionSlot.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/route-chunk-recovery.d.ts.map +1 -1
- package/dist/client/route-chunk-recovery.js +14 -9
- package/dist/client/route-chunk-recovery.js.map +1 -1
- package/dist/client/session-replay.d.ts +15 -0
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +20 -0
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/use-run-stuck-detection.d.ts.map +1 -1
- package/dist/client/use-run-stuck-detection.js +25 -1
- package/dist/client/use-run-stuck-detection.js.map +1 -1
- package/dist/db/client.d.ts +7 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +33 -0
- package/dist/db/client.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +2 -10
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/store.js +1 -1
- package/dist/extensions/store.js.map +1 -1
- package/dist/localization/default-messages.d.ts +3 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +3 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/build-server.d.ts +2 -0
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +2 -2
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +5 -5
- package/dist/observability/traces.d.ts +9 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +137 -19
- package/dist/observability/traces.js.map +1 -1
- package/dist/progress/actions.d.ts.map +1 -1
- package/dist/progress/actions.js +3 -2
- package/dist/progress/actions.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +91 -8
- package/dist/provider-api/index.js.map +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +140 -17
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/action-filters-a2a.d.ts +24 -2
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +62 -7
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +118 -5
- 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/transcribe-voice.d.ts +1 -1
- package/dist/styles/agent-conversation.css +7 -0
- package/dist/templates/default/app/i18n/ar-SA.ts +20 -0
- package/dist/templates/default/app/i18n/de-DE.ts +20 -0
- package/dist/templates/default/app/i18n/en-US.ts +20 -0
- package/dist/templates/default/app/i18n/es-ES.ts +20 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +19 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +20 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +19 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +20 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +19 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +49 -0
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +7 -1
- package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
- package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +1 -1
- package/package.json +1 -1
- package/src/templates/default/app/i18n/ar-SA.ts +20 -0
- package/src/templates/default/app/i18n/de-DE.ts +20 -0
- package/src/templates/default/app/i18n/en-US.ts +20 -0
- package/src/templates/default/app/i18n/es-ES.ts +20 -0
- package/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/src/templates/default/app/i18n/hi-IN.ts +19 -0
- package/src/templates/default/app/i18n/ja-JP.ts +20 -0
- package/src/templates/default/app/i18n/ko-KR.ts +19 -0
- package/src/templates/default/app/i18n/pt-BR.ts +20 -0
- package/src/templates/default/app/i18n/zh-CN.ts +19 -0
- package/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +49 -0
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +7 -1
- package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
- package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +1 -1
- package/corpus/templates/analytics/server/handlers/github.ts +0 -200
- package/corpus/templates/analytics/server/handlers/pylon.ts +0 -43
- package/corpus/templates/analytics/server/lib/apollo.ts +0 -167
- package/corpus/templates/analytics/server/lib/commonroom.ts +0 -149
- package/corpus/templates/analytics/server/lib/github.ts +0 -660
- package/corpus/templates/analytics/server/lib/mixpanel.ts +0 -156
- package/corpus/templates/analytics/server/lib/posthog.ts +0 -194
- package/corpus/templates/analytics/server/lib/pylon.ts +0 -109
- package/corpus/templates/analytics/server/routes/api/github/graphql.post.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/issue.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/org-prs.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/pr.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/prs.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/search.get.ts +0 -1
- package/corpus/templates/slides/actions/fetch-logos.ts +0 -90
- package/corpus/templates/slides/actions/image-search.ts +0 -64
- package/corpus/templates/slides/actions/import-github.ts +0 -182
- package/corpus/templates/slides/actions/logo-lookup.ts +0 -113
|
@@ -18,8 +18,24 @@ export type RecoveredReadyRecording = {
|
|
|
18
18
|
hasCamera?: boolean;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
export type RecoveredProcessingRecording = {
|
|
22
|
+
ok: true;
|
|
23
|
+
finalized: false;
|
|
24
|
+
recoveredAfterFinalizeError: true;
|
|
25
|
+
id: string;
|
|
26
|
+
recordingId: string;
|
|
27
|
+
status: "processing";
|
|
28
|
+
verificationPending: true;
|
|
29
|
+
videoUrl?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type RecoveredFinalizeRecording =
|
|
33
|
+
| RecoveredReadyRecording
|
|
34
|
+
| RecoveredProcessingRecording;
|
|
35
|
+
|
|
21
36
|
type ProbeResult =
|
|
22
37
|
| { ready: true; result: RecoveredReadyRecording }
|
|
38
|
+
| { ready: false; accepted: true; result: RecoveredProcessingRecording }
|
|
23
39
|
| { ready: false; terminal: boolean; status?: string };
|
|
24
40
|
|
|
25
41
|
const DEFAULT_READY_RECOVERY_TIMEOUT_MS = 90_000;
|
|
@@ -114,6 +130,7 @@ function optionalBoolean(value: unknown): boolean | undefined {
|
|
|
114
130
|
export function readyRecordingFromPublicPayload(
|
|
115
131
|
payload: unknown,
|
|
116
132
|
fallbackRecordingId: string,
|
|
133
|
+
options: { acceptPendingVerification?: boolean } = {},
|
|
117
134
|
): ProbeResult {
|
|
118
135
|
const root =
|
|
119
136
|
payload && typeof payload === "object"
|
|
@@ -129,6 +146,34 @@ export function readyRecordingFromPublicPayload(
|
|
|
129
146
|
if (!recording) return { ready: false, terminal: false };
|
|
130
147
|
if (status === "failed") return { ready: false, terminal: true, status };
|
|
131
148
|
|
|
149
|
+
if (
|
|
150
|
+
options.acceptPendingVerification &&
|
|
151
|
+
status === "processing" &&
|
|
152
|
+
recording.verificationPending === true
|
|
153
|
+
) {
|
|
154
|
+
const id =
|
|
155
|
+
typeof recording.id === "string" && recording.id
|
|
156
|
+
? recording.id
|
|
157
|
+
: fallbackRecordingId;
|
|
158
|
+
return {
|
|
159
|
+
ready: false,
|
|
160
|
+
accepted: true,
|
|
161
|
+
result: {
|
|
162
|
+
ok: true,
|
|
163
|
+
finalized: false,
|
|
164
|
+
recoveredAfterFinalizeError: true,
|
|
165
|
+
id,
|
|
166
|
+
recordingId: id,
|
|
167
|
+
status: "processing",
|
|
168
|
+
verificationPending: true,
|
|
169
|
+
videoUrl:
|
|
170
|
+
typeof recording.videoUrl === "string"
|
|
171
|
+
? recording.videoUrl
|
|
172
|
+
: undefined,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
132
177
|
const videoUrl =
|
|
133
178
|
typeof recording.videoUrl === "string" ? recording.videoUrl : "";
|
|
134
179
|
if (status !== "ready" || !videoUrl) {
|
|
@@ -187,8 +232,9 @@ export async function waitForReadyRecordingAfterFinalizeError(args: {
|
|
|
187
232
|
timeoutMs?: number;
|
|
188
233
|
intervalMs?: number;
|
|
189
234
|
fetchTimeoutMs?: number;
|
|
235
|
+
acceptPendingVerification?: boolean;
|
|
190
236
|
signal?: AbortSignal;
|
|
191
|
-
}): Promise<
|
|
237
|
+
}): Promise<RecoveredFinalizeRecording | null> {
|
|
192
238
|
const fetchImpl = args.fetchImpl ?? fetch;
|
|
193
239
|
const sleepImpl = args.sleepImpl ?? ((ms) => sleep(ms, args.signal));
|
|
194
240
|
const timeoutMs = Math.max(
|
|
@@ -248,9 +294,13 @@ export async function waitForReadyRecordingAfterFinalizeError(args: {
|
|
|
248
294
|
const probe = readyRecordingFromPublicPayload(
|
|
249
295
|
payload,
|
|
250
296
|
args.recordingId,
|
|
297
|
+
{
|
|
298
|
+
acceptPendingVerification: args.acceptPendingVerification,
|
|
299
|
+
},
|
|
251
300
|
);
|
|
252
301
|
if (probe.ready) return probe.result;
|
|
253
|
-
if (probe.
|
|
302
|
+
if ("accepted" in probe && probe.accepted) return probe.result;
|
|
303
|
+
if ("terminal" in probe && probe.terminal) return null;
|
|
254
304
|
break;
|
|
255
305
|
}
|
|
256
306
|
|
|
@@ -272,3 +322,12 @@ export async function waitForReadyRecordingAfterFinalizeError(args: {
|
|
|
272
322
|
|
|
273
323
|
return null;
|
|
274
324
|
}
|
|
325
|
+
|
|
326
|
+
export function waitForAcceptedRecordingAfterFinalizeError(
|
|
327
|
+
args: Parameters<typeof waitForReadyRecordingAfterFinalizeError>[0],
|
|
328
|
+
): Promise<RecoveredFinalizeRecording | null> {
|
|
329
|
+
return waitForReadyRecordingAfterFinalizeError({
|
|
330
|
+
...args,
|
|
331
|
+
acceptPendingVerification: true,
|
|
332
|
+
});
|
|
333
|
+
}
|
|
@@ -47,7 +47,7 @@ export function preferredSocialImage(
|
|
|
47
47
|
recording: ClipsShareMetaRecording | null,
|
|
48
48
|
): string | undefined {
|
|
49
49
|
return (
|
|
50
|
-
recording?.
|
|
50
|
+
recording?.thumbnailUrl || recording?.animatedThumbnailUrl || undefined
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
appBasePath,
|
|
3
|
+
installRouteChunkRecovery,
|
|
4
|
+
} from "@agent-native/core/client";
|
|
2
5
|
import { hydrateRoot } from "react-dom/client";
|
|
3
6
|
import { HydratedRouter } from "react-router/dom";
|
|
4
7
|
|
|
8
|
+
installRouteChunkRecovery();
|
|
9
|
+
|
|
5
10
|
const basePath = appBasePath();
|
|
6
11
|
const pathname = window.location.pathname;
|
|
7
12
|
const routerBasePath =
|
|
@@ -31,6 +31,11 @@ specific essentials.
|
|
|
31
31
|
setup item is unclear.
|
|
32
32
|
- Keep approval and routing behavior explicit. Never silently widen access to
|
|
33
33
|
secrets, apps, integrations, or workspace resources.
|
|
34
|
+
- Curated workspace templates are private remix sources. Use
|
|
35
|
+
`list-curated-workspace-templates` to inspect the reviewed catalog and
|
|
36
|
+
`remix-workspace-template` to create an independent app. A remix may use
|
|
37
|
+
empty or synthetic data only; never copy source-app records, credentials,
|
|
38
|
+
secrets, or private configuration.
|
|
34
39
|
- `/operations` is the focused operator console. Its Monitoring tab reuses the
|
|
35
40
|
shared observability dashboard for traces, conversations, evaluations,
|
|
36
41
|
experiments, and feedback; its Database tab reuses the Code-mode database
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
appBasePath,
|
|
3
|
+
installRouteChunkRecovery,
|
|
4
|
+
} from "@agent-native/core/client";
|
|
2
5
|
import { hydrateRoot } from "react-dom/client";
|
|
3
6
|
import { HydratedRouter } from "react-router/dom";
|
|
4
7
|
|
|
8
|
+
installRouteChunkRecovery();
|
|
9
|
+
|
|
5
10
|
const basePath = appBasePath();
|
|
6
11
|
const pathname = window.location.pathname;
|
|
7
12
|
const routerBasePath =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slide-images
|
|
3
|
-
description: Image generation workflow -- generate-image,
|
|
3
|
+
description: Image generation workflow -- generate-image, search-images, and search-logos actions. Style reference patterns.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Slide Images
|
|
@@ -12,8 +12,8 @@ Images for slides are generated or sourced via three scripts. The agent delegate
|
|
|
12
12
|
| Script | Purpose | Example |
|
|
13
13
|
|--------|---------|---------|
|
|
14
14
|
| `generate-image` | Generate images (Gemini/OpenAI/auto) | `pnpm action generate-image --prompt "hero image" --model auto --count 3` |
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
15
|
+
| `search-images` | Search Google Images via the configured provider | `pnpm action search-images --q "Acme logo transparent" --count 5` |
|
|
16
|
+
| `search-logos` | Resolve company domains and canonical logo URLs | `pnpm action search-logos --q "Acme"` |
|
|
17
17
|
| `image-gen-status` | Check configured image providers | `pnpm action image-gen-status` |
|
|
18
18
|
|
|
19
19
|
## Image Generation Flow
|
|
@@ -46,19 +46,23 @@ Default style reference images from `shared/api.ts` are always included.
|
|
|
46
46
|
|
|
47
47
|
Two options for company logos:
|
|
48
48
|
|
|
49
|
-
**Option 1: Logo.dev
|
|
49
|
+
**Option 1: canonical logo search** (uses Logo.dev search when configured and a bounded domain fallback otherwise):
|
|
50
50
|
```bash
|
|
51
|
-
pnpm action
|
|
51
|
+
pnpm action search-logos --q "Acme"
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
Use a returned `logoUrl` directly. Do not call a second logo-provider action for
|
|
55
|
+
each result.
|
|
56
|
+
|
|
54
57
|
**Option 2: Google Image Search** (fallback):
|
|
55
58
|
```bash
|
|
56
|
-
pnpm action
|
|
59
|
+
pnpm action search-images --q "Acme logo transparent" --count 5
|
|
57
60
|
```
|
|
58
61
|
|
|
59
62
|
## Important Rules
|
|
60
63
|
|
|
61
64
|
- Always include style references for visual consistency
|
|
62
65
|
- Use `.fmd-img-placeholder` divs in slides before real images are generated
|
|
63
|
-
-
|
|
66
|
+
- Use one canonical provider action per conceptual search; do not loop legacy
|
|
67
|
+
provider scripts or manually guess provider URLs
|
|
64
68
|
- After inserting an image, update the deck via the API
|
|
@@ -40,6 +40,10 @@ Detailed deck, slide-editing, image, design-system, and export workflows live in
|
|
|
40
40
|
- Use image-generation and image-selection actions only when the deck genuinely
|
|
41
41
|
needs imagery; keep citations/asset provenance when available.
|
|
42
42
|
- Use framework sharing actions for deck visibility and grants.
|
|
43
|
+
- For a known, read-only sibling-app operation, use `call-agent` with `action`
|
|
44
|
+
and `input` (or `invokeAgentAction`) instead of starting the sibling agent's
|
|
45
|
+
model loop. In Analytics, use `gong-native-insights` for provider-synthesized
|
|
46
|
+
briefs and `gong-calls` for quotes, counts, transcripts, and coverage claims.
|
|
43
47
|
- Before generation, follow the creative-context reuse ladder in
|
|
44
48
|
`.agents/skills/creative-context/SKILL.md`: explicit request and current deck
|
|
45
49
|
first, then a pinned/current pack, then narrow library search. Respect
|
|
@@ -59,8 +59,8 @@ actions/ # Shared app operations (defineAction; UI uses ac
|
|
|
59
59
|
├── run.ts # Script dispatcher
|
|
60
60
|
├── generate-image.ts # Image generation with style references
|
|
61
61
|
├── image-gen-status.ts # Check API key status
|
|
62
|
-
├──
|
|
63
|
-
└──
|
|
62
|
+
├── search-images.ts # Canonical Google image search
|
|
63
|
+
└── search-logos.ts # Canonical company/logo search
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Framework Basics (Nitro + @agent-native/core)
|
|
@@ -35,7 +35,7 @@ const codeFileSchema = z.object({
|
|
|
35
35
|
export default defineAction({
|
|
36
36
|
description:
|
|
37
37
|
"Start Builder DSI design-system indexing from connected code, a GitHub repository, code/design files, and optional design.md guidance. " +
|
|
38
|
-
"Use this instead of local
|
|
38
|
+
"Use this instead of legacy local code import when the user wants a reusable brand kit or slide design system. " +
|
|
39
39
|
"Requires Builder.io to be connected; Builder owns the indexed design-system docs, generated guidance, token/component extraction, and job state.",
|
|
40
40
|
schema: z.object({
|
|
41
41
|
projectName: z
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
+
import { getLogoProviderConfig } from "../server/lib/media-search-providers.js";
|
|
5
|
+
|
|
4
6
|
export default defineAction({
|
|
5
|
-
description: "Get logo
|
|
7
|
+
description: "Get runtime-backed logo provider configuration for the UI.",
|
|
6
8
|
schema: z.object({}),
|
|
7
9
|
http: { method: "GET" },
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
hasLogoDevSecret: !!process.env.LOGO_DEV_SECRET_KEY?.startsWith("sk_"),
|
|
12
|
-
};
|
|
13
|
-
},
|
|
10
|
+
readOnly: true,
|
|
11
|
+
agentTool: false,
|
|
12
|
+
run: async () => getLogoProviderConfig(),
|
|
14
13
|
});
|
|
@@ -1,55 +1,27 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { resolveSecret } from "@agent-native/core/server";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
|
|
4
|
+
import { searchProviderImages } from "../server/lib/media-search-providers.js";
|
|
5
|
+
|
|
5
6
|
export default defineAction({
|
|
6
7
|
description: "Search for images using Google Custom Search API.",
|
|
7
8
|
schema: z.object({
|
|
8
9
|
q: z.string().optional().describe("Search query (required)"),
|
|
10
|
+
count: z.coerce
|
|
11
|
+
.number()
|
|
12
|
+
.int()
|
|
13
|
+
.min(1)
|
|
14
|
+
.max(10)
|
|
15
|
+
.default(10)
|
|
16
|
+
.describe("Maximum number of image results to return."),
|
|
9
17
|
}),
|
|
10
18
|
http: { method: "GET" },
|
|
19
|
+
readOnly: true,
|
|
11
20
|
run: async (args) => {
|
|
12
21
|
const q = args.q;
|
|
13
22
|
if (!q) {
|
|
14
23
|
throw new Error("Missing query parameter 'q'");
|
|
15
24
|
}
|
|
16
|
-
|
|
17
|
-
const [apiKey, cx] = await Promise.all([
|
|
18
|
-
resolveSecret("GOOGLE_API_KEY"),
|
|
19
|
-
resolveSecret("GOOGLE_SEARCH_CX"),
|
|
20
|
-
]);
|
|
21
|
-
|
|
22
|
-
if (!apiKey || !cx) {
|
|
23
|
-
throw new Error(
|
|
24
|
-
"Google Search not configured. Save GOOGLE_API_KEY and GOOGLE_SEARCH_CX in settings.",
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const params = new URLSearchParams({
|
|
29
|
-
key: apiKey,
|
|
30
|
-
cx,
|
|
31
|
-
q,
|
|
32
|
-
searchType: "image",
|
|
33
|
-
num: "10",
|
|
34
|
-
safe: "active",
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const response = await fetch(
|
|
38
|
-
`https://www.googleapis.com/customsearch/v1?${params}`,
|
|
39
|
-
);
|
|
40
|
-
if (!response.ok) {
|
|
41
|
-
const text = await response.text();
|
|
42
|
-
console.error("Google API error:", response.status, text);
|
|
43
|
-
throw new Error("Google API error");
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const data = await response.json();
|
|
47
|
-
return (data.items || []).map((item: any) => ({
|
|
48
|
-
url: item.link,
|
|
49
|
-
thumbnail: item.image?.thumbnailLink || item.link,
|
|
50
|
-
title: item.title,
|
|
51
|
-
width: item.image?.width,
|
|
52
|
-
height: item.image?.height,
|
|
53
|
-
}));
|
|
25
|
+
return searchProviderImages(q, args.count);
|
|
54
26
|
},
|
|
55
27
|
});
|
|
@@ -1,67 +1,20 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
+
import { searchProviderLogos } from "../server/lib/media-search-providers.js";
|
|
5
|
+
|
|
4
6
|
export default defineAction({
|
|
5
7
|
description: "Search for company logos by name or domain.",
|
|
6
8
|
schema: z.object({
|
|
7
9
|
q: z.string().optional().describe("Company name or domain to search"),
|
|
8
10
|
}),
|
|
9
11
|
http: { method: "GET" },
|
|
12
|
+
readOnly: true,
|
|
10
13
|
run: async (args) => {
|
|
11
|
-
const q = (args.q || "").trim()
|
|
14
|
+
const q = (args.q || "").trim();
|
|
12
15
|
if (!q) {
|
|
13
16
|
throw new Error("Missing ?q= parameter");
|
|
14
17
|
}
|
|
15
|
-
|
|
16
|
-
const secretKey = process.env.LOGO_DEV_SECRET_KEY;
|
|
17
|
-
|
|
18
|
-
// If we have a secret key that's actually an sk_ key, use the search API
|
|
19
|
-
if (secretKey && secretKey.startsWith("sk_")) {
|
|
20
|
-
try {
|
|
21
|
-
const response = await fetch(
|
|
22
|
-
`https://api.logo.dev/search?q=${encodeURIComponent(q)}`,
|
|
23
|
-
{ headers: { Authorization: `Bearer ${secretKey}` } },
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
if (response.ok) {
|
|
27
|
-
const results: Array<{ name: string; domain: string }> =
|
|
28
|
-
await response.json();
|
|
29
|
-
return results.map((r) => ({ name: r.name, domain: r.domain }));
|
|
30
|
-
}
|
|
31
|
-
} catch {
|
|
32
|
-
// Fall through to domain guessing
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Domain guessing: generate candidate domains from the query
|
|
37
|
-
const candidates: Array<{ name: string; domain: string }> = [];
|
|
38
|
-
|
|
39
|
-
if (q.includes(".")) {
|
|
40
|
-
const clean = q
|
|
41
|
-
.replace(/^https?:\/\//, "")
|
|
42
|
-
.replace(/^www\./, "")
|
|
43
|
-
.split("/")[0];
|
|
44
|
-
candidates.push({ name: clean.split(".")[0], domain: clean });
|
|
45
|
-
} else {
|
|
46
|
-
const slug = q.replace(/[^a-z0-9]/g, "");
|
|
47
|
-
const slugDashed = q.replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
48
|
-
|
|
49
|
-
const tlds = [".com", ".io", ".co", ".dev", ".org", ".net"];
|
|
50
|
-
const seen = new Set<string>();
|
|
51
|
-
|
|
52
|
-
for (const tld of tlds) {
|
|
53
|
-
const domain = slug + tld;
|
|
54
|
-
if (!seen.has(domain)) {
|
|
55
|
-
seen.add(domain);
|
|
56
|
-
candidates.push({ name: q, domain });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (slugDashed !== slug) {
|
|
61
|
-
candidates.push({ name: q, domain: slugDashed + ".com" });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return candidates;
|
|
18
|
+
return searchProviderLogos(q);
|
|
66
19
|
},
|
|
67
20
|
});
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
agentNativePath,
|
|
3
|
-
useActionQuery,
|
|
4
|
-
useT,
|
|
5
|
-
} from "@agent-native/core/client";
|
|
1
|
+
import { callAction, useActionQuery, useT } from "@agent-native/core/client";
|
|
6
2
|
import { IconX, IconSearch, IconLoader2 } from "@tabler/icons-react";
|
|
7
3
|
import { useState, useEffect, useRef } from "react";
|
|
8
4
|
import { createPortal } from "react-dom";
|
|
9
5
|
|
|
10
|
-
const LOGO_DEV_PK = "pk_VwOyCAOgT0aBNpecT2qO-A";
|
|
11
|
-
|
|
12
6
|
interface LogoResult {
|
|
13
7
|
name: string;
|
|
14
8
|
domain: string;
|
|
9
|
+
logoUrl?: string;
|
|
15
10
|
}
|
|
16
11
|
|
|
17
12
|
interface LogoSearchPanelProps {
|
|
@@ -32,6 +27,7 @@ export default function LogoSearchPanel({
|
|
|
32
27
|
const [error, setError] = useState<string | null>(null);
|
|
33
28
|
const [selectedDomain, setSelectedDomain] = useState<string | null>(null);
|
|
34
29
|
const [brandfetchId, setBrandfetchId] = useState<string | null>(null);
|
|
30
|
+
const [logoDevToken, setLogoDevToken] = useState<string | null>(null);
|
|
35
31
|
const panelRef = useRef<HTMLDivElement>(null);
|
|
36
32
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
37
33
|
|
|
@@ -41,6 +37,7 @@ export default function LogoSearchPanel({
|
|
|
41
37
|
if (logoConfigData?.brandfetchId) {
|
|
42
38
|
setBrandfetchId(logoConfigData.brandfetchId);
|
|
43
39
|
}
|
|
40
|
+
setLogoDevToken(logoConfigData?.logoDevToken ?? null);
|
|
44
41
|
}, [logoConfigData]);
|
|
45
42
|
|
|
46
43
|
useEffect(() => {
|
|
@@ -84,17 +81,7 @@ export default function LogoSearchPanel({
|
|
|
84
81
|
setResults([]);
|
|
85
82
|
setSelectedDomain(null);
|
|
86
83
|
try {
|
|
87
|
-
const
|
|
88
|
-
agentNativePath(
|
|
89
|
-
`/_agent-native/actions/search-logos?q=${encodeURIComponent(q)}`,
|
|
90
|
-
),
|
|
91
|
-
);
|
|
92
|
-
if (!res.ok) {
|
|
93
|
-
const data = await res.json();
|
|
94
|
-
setError(data.error || "Search failed");
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const data: LogoResult[] = await res.json();
|
|
84
|
+
const data = await callAction("search-logos", { q }, { method: "GET" });
|
|
98
85
|
if (data.length === 0) {
|
|
99
86
|
setError("No logos found");
|
|
100
87
|
} else {
|
|
@@ -116,7 +103,7 @@ export default function LogoSearchPanel({
|
|
|
116
103
|
|
|
117
104
|
// Build variations for the selected domain
|
|
118
105
|
const variations = selectedDomain
|
|
119
|
-
? buildVariations(selectedDomain, brandfetchId, t)
|
|
106
|
+
? buildVariations(selectedDomain, brandfetchId, logoDevToken, t)
|
|
120
107
|
: [];
|
|
121
108
|
|
|
122
109
|
return createPortal(
|
|
@@ -323,14 +310,12 @@ interface VariationGroup {
|
|
|
323
310
|
function buildVariations(
|
|
324
311
|
domain: string,
|
|
325
312
|
_brandfetchId: string | null,
|
|
313
|
+
logoDevToken: string | null,
|
|
326
314
|
t: ReturnType<typeof useT>,
|
|
327
315
|
): VariationGroup[] {
|
|
328
316
|
// Brandfetch CDN works without client ID for free tier
|
|
329
317
|
const bf = (path: string) => `https://cdn.brandfetch.io/${domain}/${path}`;
|
|
330
|
-
const
|
|
331
|
-
`https://img.logo.dev/${domain}?token=${LOGO_DEV_PK}&${params}`;
|
|
332
|
-
|
|
333
|
-
return [
|
|
318
|
+
const groups: VariationGroup[] = [
|
|
334
319
|
{
|
|
335
320
|
label: "Logo",
|
|
336
321
|
items: [
|
|
@@ -355,7 +340,11 @@ function buildVariations(
|
|
|
355
340
|
{ label: "Icon", url: bf("icon.png"), bg: "rgba(255,255,255,0.03)" },
|
|
356
341
|
],
|
|
357
342
|
},
|
|
358
|
-
|
|
343
|
+
];
|
|
344
|
+
if (logoDevToken) {
|
|
345
|
+
const ld = (params: string) =>
|
|
346
|
+
`https://img.logo.dev/${domain}?token=${encodeURIComponent(logoDevToken)}&${params}`;
|
|
347
|
+
groups.push({
|
|
359
348
|
label: "Logo.dev",
|
|
360
349
|
items: [
|
|
361
350
|
{
|
|
@@ -374,6 +363,7 @@ function buildVariations(
|
|
|
374
363
|
bg: "rgba(255,255,255,0.03)",
|
|
375
364
|
},
|
|
376
365
|
],
|
|
377
|
-
}
|
|
378
|
-
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
return groups;
|
|
379
369
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
appBasePath,
|
|
3
|
+
installRouteChunkRecovery,
|
|
4
|
+
} from "@agent-native/core/client";
|
|
2
5
|
import { hydrateRoot } from "react-dom/client";
|
|
3
6
|
import { HydratedRouter } from "react-router/dom";
|
|
4
7
|
|
|
8
|
+
installRouteChunkRecovery();
|
|
9
|
+
|
|
5
10
|
const basePath = appBasePath();
|
|
6
11
|
const pathname = window.location.pathname;
|
|
7
12
|
const routerBasePath =
|