@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
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.109.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d74a5a4: Return retryable responses for transient agent-chat database failures and back off active-run polling while the database recovers.
|
|
8
|
+
- d74a5a4: Add bounded per-tool generation telemetry, delegated trace linkage, direct-read telemetry, and idempotent A2A submissions.
|
|
9
|
+
|
|
10
|
+
## 0.109.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 6cd2c79: Add audience-bound direct invocation for explicitly exposed read-only actions so sibling apps can skip a second agent loop for bounded data operations.
|
|
15
|
+
Add shared Slack and Notion corpus recipes so cursor pagination runs inside one resumable data operation instead of one model turn per page.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 6cd2c79: Prevent cross-turn chat stream splicing and link browser sessions and session replays to agent-chat threads and runs.
|
|
20
|
+
- 6cd2c79: Resume existing A2A tasks after bounded waits so cross-app agents do not duplicate long-running work.
|
|
21
|
+
- 6cd2c79: Make progress tracking tolerate blank optional status fields, make extension replacement guard errors retryable when the explicit intent flag is missing, expose extension readiness callbacks for host loading states, show the underlying repeated tool error in agent stop messages, and avoid MCP connection suggestions based on hidden tool payloads.
|
|
22
|
+
- 6cd2c79: Show image attachments in queued agent chat messages.
|
|
23
|
+
- 6cd2c79: Open shared chat-thread links in the matching full-page chat or agent sidebar.
|
|
24
|
+
- 6cd2c79: Ignore stackless stale module-loader failures that are handled by route-chunk recovery instead of creating noisy error issues.
|
|
25
|
+
- 6cd2c79: Keep long agent-chat tool histories compact by collapsing older calls behind a "Ran N tools" disclosure.
|
|
26
|
+
- 6cd2c79: Show chat run durations in work summaries and animate their content when opening.
|
|
27
|
+
|
|
3
28
|
## 0.108.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.109.1",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as jose from "jose";
|
|
2
2
|
|
|
3
3
|
import { ssrfSafeFetch } from "../extensions/url-safety.js";
|
|
4
|
+
import { sanitizeA2ACorrelationMetadata } from "./correlation.js";
|
|
4
5
|
import type {
|
|
5
6
|
A2AApprovedAction,
|
|
7
|
+
A2ACorrelationMetadata,
|
|
8
|
+
A2AReadOnlyActionResult,
|
|
6
9
|
AgentCard,
|
|
7
10
|
JsonRpcRequest,
|
|
8
11
|
JsonRpcResponse,
|
|
@@ -188,9 +191,19 @@ export class A2AClient {
|
|
|
188
191
|
);
|
|
189
192
|
|
|
190
193
|
if (res.ok) {
|
|
194
|
+
const text = await res.text();
|
|
195
|
+
if (
|
|
196
|
+
i < this.apiKeyAttempts.length - 1 &&
|
|
197
|
+
isA2AAuthRejectionResponse(res.status, text)
|
|
198
|
+
) {
|
|
199
|
+
lastError = new Error(
|
|
200
|
+
`A2A request failed (${res.status}): ${text}`,
|
|
201
|
+
);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
191
204
|
this.endpointCandidates = [url];
|
|
192
205
|
this.markApiKeySucceeded(this.apiKeyAttempts[i]);
|
|
193
|
-
return
|
|
206
|
+
return JSON.parse(text) as JsonRpcResponse;
|
|
194
207
|
}
|
|
195
208
|
|
|
196
209
|
const text = await res.text();
|
|
@@ -228,6 +241,7 @@ export class A2AClient {
|
|
|
228
241
|
opts?: {
|
|
229
242
|
contextId?: string;
|
|
230
243
|
metadata?: Record<string, unknown>;
|
|
244
|
+
idempotencyKey?: string;
|
|
231
245
|
approvedActions?: A2AApprovedAction[];
|
|
232
246
|
/**
|
|
233
247
|
* If true, ask the server to return the task immediately in `working`
|
|
@@ -244,6 +258,7 @@ export class A2AClient {
|
|
|
244
258
|
message,
|
|
245
259
|
contextId: opts?.contextId,
|
|
246
260
|
metadata: opts?.metadata,
|
|
261
|
+
...(opts?.idempotencyKey ? { idempotencyKey: opts.idempotencyKey } : {}),
|
|
247
262
|
...(opts?.approvedActions?.length
|
|
248
263
|
? { approvedActions: opts.approvedActions }
|
|
249
264
|
: {}),
|
|
@@ -272,6 +287,30 @@ export class A2AClient {
|
|
|
272
287
|
return response.result as Task;
|
|
273
288
|
}
|
|
274
289
|
|
|
290
|
+
/**
|
|
291
|
+
* Execute one receiver-approved read-only action without starting the
|
|
292
|
+
* receiver's agent loop. The receiver still owns validation, credentials,
|
|
293
|
+
* request scoping, and the explicit action exposure decision.
|
|
294
|
+
*/
|
|
295
|
+
async invokeAction(
|
|
296
|
+
action: string,
|
|
297
|
+
input: Record<string, unknown> = {},
|
|
298
|
+
opts?: { metadata?: A2ACorrelationMetadata },
|
|
299
|
+
): Promise<A2AReadOnlyActionResult> {
|
|
300
|
+
const metadata = sanitizeA2ACorrelationMetadata(opts?.metadata);
|
|
301
|
+
const response = await this.rpc("actions/invoke", {
|
|
302
|
+
action,
|
|
303
|
+
input,
|
|
304
|
+
...(Object.keys(metadata).length > 0 ? { metadata } : {}),
|
|
305
|
+
});
|
|
306
|
+
if (response.error) {
|
|
307
|
+
throw new Error(
|
|
308
|
+
`A2A error (${response.error.code}): ${response.error.message}`,
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
return response.result as A2AReadOnlyActionResult;
|
|
312
|
+
}
|
|
313
|
+
|
|
275
314
|
/**
|
|
276
315
|
* Send a message in async mode and poll until the task reaches a terminal
|
|
277
316
|
* state. This is the recommended path on serverless hosts with short
|
|
@@ -286,6 +325,7 @@ export class A2AClient {
|
|
|
286
325
|
opts?: {
|
|
287
326
|
contextId?: string;
|
|
288
327
|
metadata?: Record<string, unknown>;
|
|
328
|
+
idempotencyKey?: string;
|
|
289
329
|
approvedActions?: A2AApprovedAction[];
|
|
290
330
|
/** Total time to wait for completion. Default 5 min. */
|
|
291
331
|
timeoutMs?: number;
|
|
@@ -298,12 +338,45 @@ export class A2AClient {
|
|
|
298
338
|
const submitted = await this.send(message, {
|
|
299
339
|
contextId: opts?.contextId,
|
|
300
340
|
metadata: opts?.metadata,
|
|
341
|
+
idempotencyKey: opts?.idempotencyKey,
|
|
301
342
|
...(opts?.approvedActions?.length
|
|
302
343
|
? { approvedActions: opts.approvedActions }
|
|
303
344
|
: {}),
|
|
304
345
|
async: true,
|
|
305
346
|
});
|
|
306
347
|
|
|
348
|
+
return this.pollTask(submitted, opts);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Continue waiting for an existing async task without submitting a second
|
|
353
|
+
* message. Use this after a bounded caller-side wait expires but the remote
|
|
354
|
+
* task is still working.
|
|
355
|
+
*/
|
|
356
|
+
async waitForTask(
|
|
357
|
+
taskId: string,
|
|
358
|
+
opts?: {
|
|
359
|
+
/** Total time to wait for completion. Default 5 min. */
|
|
360
|
+
timeoutMs?: number;
|
|
361
|
+
/** Poll interval. Default 2s. */
|
|
362
|
+
pollIntervalMs?: number;
|
|
363
|
+
/** Called with each successfully polled task. */
|
|
364
|
+
onUpdate?: (task: Task) => void;
|
|
365
|
+
},
|
|
366
|
+
): Promise<Task> {
|
|
367
|
+
const current = await this.getTask(taskId);
|
|
368
|
+
opts?.onUpdate?.(current);
|
|
369
|
+
return this.pollTask(current, opts);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
private async pollTask(
|
|
373
|
+
submitted: Task,
|
|
374
|
+
opts?: {
|
|
375
|
+
timeoutMs?: number;
|
|
376
|
+
pollIntervalMs?: number;
|
|
377
|
+
onUpdate?: (task: Task) => void;
|
|
378
|
+
},
|
|
379
|
+
): Promise<Task> {
|
|
307
380
|
const terminalStates = new Set([
|
|
308
381
|
"completed",
|
|
309
382
|
"failed",
|
|
@@ -532,6 +605,7 @@ function uniqueAuthTokens(
|
|
|
532
605
|
function isA2AAuthRejectionResponse(status: number, text: string): boolean {
|
|
533
606
|
return (
|
|
534
607
|
status === 401 ||
|
|
608
|
+
/verified, audience-bound user identity/i.test(text) ||
|
|
535
609
|
/A2A error \(-32001\): (?:Invalid or expired A2A token|Invalid API key|Authentication required)|Invalid or expired A2A token|Invalid API key|Authentication required/i.test(
|
|
536
610
|
text,
|
|
537
611
|
)
|
|
@@ -558,6 +632,10 @@ export async function callAgent(
|
|
|
558
632
|
requestOrigin?: string;
|
|
559
633
|
/** Exact downstream actions explicitly authorized in the caller's chat. */
|
|
560
634
|
approvedActions?: A2AApprovedAction[];
|
|
635
|
+
/** Bounded telemetry-only lineage forwarded to the receiving app. */
|
|
636
|
+
correlation?: A2ACorrelationMetadata;
|
|
637
|
+
/** Stable caller-generated key for one message submission. */
|
|
638
|
+
idempotencyKey?: string;
|
|
561
639
|
/**
|
|
562
640
|
* Use async/poll instead of a single blocking POST. Recommended for
|
|
563
641
|
* cross-app calls that may exceed a synchronous serverless request budget.
|
|
@@ -566,6 +644,11 @@ export async function callAgent(
|
|
|
566
644
|
async?: boolean;
|
|
567
645
|
/** Total time to wait for the polled task (default 5 min). */
|
|
568
646
|
timeoutMs?: number;
|
|
647
|
+
/**
|
|
648
|
+
* Existing async task to keep polling. When set, no new message is sent.
|
|
649
|
+
* This prevents a caller-side timeout from duplicating downstream work.
|
|
650
|
+
*/
|
|
651
|
+
taskId?: string;
|
|
569
652
|
/** Poll interval for async calls. Primarily useful for tests/retries. */
|
|
570
653
|
pollIntervalMs?: number;
|
|
571
654
|
/**
|
|
@@ -590,6 +673,7 @@ export async function callAgent(
|
|
|
590
673
|
if (opts?.userEmail) metadata.userEmail = opts.userEmail;
|
|
591
674
|
if (opts?.orgDomain) metadata.orgDomain = opts.orgDomain;
|
|
592
675
|
if (opts?.requestOrigin) metadata.requestOrigin = opts.requestOrigin;
|
|
676
|
+
Object.assign(metadata, sanitizeA2ACorrelationMetadata(opts?.correlation));
|
|
593
677
|
|
|
594
678
|
// Default to async + poll. The receiving A2A server's `_process-task` route
|
|
595
679
|
// runs the handler in a fresh function execution (cross-platform queue
|
|
@@ -615,20 +699,31 @@ export async function callAgent(
|
|
|
615
699
|
});
|
|
616
700
|
let task: Task;
|
|
617
701
|
if (useAsync) {
|
|
618
|
-
task =
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
702
|
+
task = opts?.taskId
|
|
703
|
+
? await client.waitForTask(opts.taskId, {
|
|
704
|
+
timeoutMs: opts.timeoutMs,
|
|
705
|
+
pollIntervalMs: opts.pollIntervalMs,
|
|
706
|
+
onUpdate: opts.onUpdate,
|
|
707
|
+
})
|
|
708
|
+
: await client.sendAndWait(message, {
|
|
709
|
+
contextId: opts?.contextId,
|
|
710
|
+
metadata,
|
|
711
|
+
idempotencyKey: opts?.idempotencyKey,
|
|
712
|
+
...(opts?.approvedActions?.length
|
|
713
|
+
? { approvedActions: opts.approvedActions }
|
|
714
|
+
: {}),
|
|
715
|
+
timeoutMs: opts?.timeoutMs,
|
|
716
|
+
pollIntervalMs: opts?.pollIntervalMs,
|
|
717
|
+
onUpdate: opts?.onUpdate,
|
|
718
|
+
});
|
|
628
719
|
} else {
|
|
720
|
+
if (opts?.taskId) {
|
|
721
|
+
throw new Error("Polling an existing A2A task requires async mode");
|
|
722
|
+
}
|
|
629
723
|
task = await client.send(message, {
|
|
630
724
|
contextId: opts?.contextId,
|
|
631
725
|
metadata,
|
|
726
|
+
idempotencyKey: opts?.idempotencyKey,
|
|
632
727
|
...(opts?.approvedActions?.length
|
|
633
728
|
? { approvedActions: opts.approvedActions }
|
|
634
729
|
: {}),
|
|
@@ -665,12 +760,55 @@ export async function callAgent(
|
|
|
665
760
|
return "";
|
|
666
761
|
}
|
|
667
762
|
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
763
|
+
/**
|
|
764
|
+
* Invoke one receiver-approved read-only action with an audience-bound user
|
|
765
|
+
* token. Unlike conversational delegation, this never starts the receiver's
|
|
766
|
+
* model loop.
|
|
767
|
+
*/
|
|
768
|
+
export async function callAction(
|
|
769
|
+
url: string,
|
|
770
|
+
action: string,
|
|
771
|
+
input: Record<string, unknown> = {},
|
|
772
|
+
opts?: {
|
|
773
|
+
apiKey?: string;
|
|
774
|
+
userEmail?: string;
|
|
775
|
+
orgDomain?: string;
|
|
776
|
+
orgSecret?: string;
|
|
777
|
+
requestTimeoutMs?: number;
|
|
778
|
+
correlation?: A2ACorrelationMetadata;
|
|
779
|
+
},
|
|
780
|
+
): Promise<A2AReadOnlyActionResult> {
|
|
781
|
+
const actionName = action.trim();
|
|
782
|
+
if (!actionName) throw new Error("A2A action name is required");
|
|
783
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) {
|
|
784
|
+
throw new Error("A2A action input must be an object");
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
const apiKeyAttempts = await buildA2AApiKeyAttempts(
|
|
788
|
+
opts,
|
|
789
|
+
normalizeA2AAudience(url),
|
|
790
|
+
);
|
|
791
|
+
const fallbackApiKeys = apiKeyAttempts
|
|
792
|
+
.slice(1)
|
|
793
|
+
.filter((token): token is string => token !== undefined);
|
|
794
|
+
const client = new A2AClient(url, apiKeyAttempts[0], {
|
|
795
|
+
fallbackApiKeys,
|
|
796
|
+
requestTimeoutMs: opts?.requestTimeoutMs,
|
|
797
|
+
});
|
|
798
|
+
return client.invokeAction(actionName, input, {
|
|
799
|
+
metadata: sanitizeA2ACorrelationMetadata(opts?.correlation),
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
async function buildA2AApiKeyAttempts(
|
|
804
|
+
opts?: {
|
|
805
|
+
apiKey?: string;
|
|
806
|
+
userEmail?: string;
|
|
807
|
+
orgDomain?: string;
|
|
808
|
+
orgSecret?: string;
|
|
809
|
+
},
|
|
810
|
+
audience?: string,
|
|
811
|
+
): Promise<Array<string | undefined>> {
|
|
674
812
|
const attempts: Array<string | undefined> = [];
|
|
675
813
|
const add = (token: string | undefined) => {
|
|
676
814
|
if (token === undefined || attempts.includes(token)) return;
|
|
@@ -685,6 +823,7 @@ async function buildA2AApiKeyAttempts(opts?: {
|
|
|
685
823
|
add(
|
|
686
824
|
await signA2AToken(opts.userEmail, opts.orgDomain, opts.orgSecret, {
|
|
687
825
|
preferGlobalSecret: true,
|
|
826
|
+
audience,
|
|
688
827
|
}),
|
|
689
828
|
);
|
|
690
829
|
} catch {
|
|
@@ -697,6 +836,7 @@ async function buildA2AApiKeyAttempts(opts?: {
|
|
|
697
836
|
add(
|
|
698
837
|
await signA2AToken(opts.userEmail, opts.orgDomain, opts.orgSecret, {
|
|
699
838
|
preferGlobalSecret: false,
|
|
839
|
+
audience,
|
|
700
840
|
}),
|
|
701
841
|
);
|
|
702
842
|
} catch {
|
|
@@ -709,6 +849,11 @@ async function buildA2AApiKeyAttempts(opts?: {
|
|
|
709
849
|
return attempts;
|
|
710
850
|
}
|
|
711
851
|
|
|
852
|
+
function normalizeA2AAudience(url: string): string {
|
|
853
|
+
const explicit = splitExplicitA2AEndpoint(url.replace(/\/$/, ""));
|
|
854
|
+
return (explicit?.baseUrl ?? url).replace(/\/$/, "");
|
|
855
|
+
}
|
|
856
|
+
|
|
712
857
|
function isA2AAuthRejection(err: unknown): boolean {
|
|
713
858
|
const message = err instanceof Error ? err.message : String(err ?? "");
|
|
714
859
|
return /A2A request failed \(401\)|A2A error \(-32001\): (?:Invalid or expired A2A token|Invalid API key|Authentication required)|Invalid or expired A2A token|Invalid API key|Authentication required/i.test(
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { A2ACorrelationMetadata } from "./types.js";
|
|
2
|
+
|
|
3
|
+
export const MAX_A2A_CORRELATION_VALUE_CHARS = 200;
|
|
4
|
+
|
|
5
|
+
const APP_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
6
|
+
const CORRELATION_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/;
|
|
7
|
+
|
|
8
|
+
function boundedIdentifier(
|
|
9
|
+
value: unknown,
|
|
10
|
+
pattern: RegExp,
|
|
11
|
+
): string | undefined {
|
|
12
|
+
if (typeof value !== "string") return undefined;
|
|
13
|
+
const trimmed = value.trim();
|
|
14
|
+
if (
|
|
15
|
+
!trimmed ||
|
|
16
|
+
trimmed.length > MAX_A2A_CORRELATION_VALUE_CHARS ||
|
|
17
|
+
!pattern.test(trimmed)
|
|
18
|
+
) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return trimmed;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function sanitizeA2ACorrelationId(value: unknown): string | undefined {
|
|
25
|
+
return boundedIdentifier(value, CORRELATION_ID_PATTERN);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Keep only bounded, opaque ASCII correlation identifiers. These values
|
|
30
|
+
* remain telemetry hints; authentication continues to come exclusively from
|
|
31
|
+
* the verified A2A token/request context.
|
|
32
|
+
*/
|
|
33
|
+
export function sanitizeA2ACorrelationMetadata(
|
|
34
|
+
value: unknown,
|
|
35
|
+
): A2ACorrelationMetadata {
|
|
36
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
37
|
+
const metadata = value as Record<string, unknown>;
|
|
38
|
+
const callerApp = boundedIdentifier(metadata.callerApp, APP_ID_PATTERN);
|
|
39
|
+
const callerThreadId = sanitizeA2ACorrelationId(metadata.callerThreadId);
|
|
40
|
+
const parentRunId = sanitizeA2ACorrelationId(metadata.parentRunId);
|
|
41
|
+
const parentTurnId = sanitizeA2ACorrelationId(metadata.parentTurnId);
|
|
42
|
+
const invocationId = sanitizeA2ACorrelationId(metadata.invocationId);
|
|
43
|
+
return {
|
|
44
|
+
...(callerApp ? { callerApp } : {}),
|
|
45
|
+
...(callerThreadId ? { callerThreadId } : {}),
|
|
46
|
+
...(parentRunId ? { parentRunId } : {}),
|
|
47
|
+
...(parentTurnId ? { parentTurnId } : {}),
|
|
48
|
+
...(invocationId ? { invocationId } : {}),
|
|
49
|
+
};
|
|
50
|
+
}
|