@agent-native/core 0.79.12 → 0.79.15
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 +19 -0
- package/corpus/core/docs/content/locales/zh-TW/a2a-protocol.md +68 -68
- package/corpus/core/docs/content/locales/zh-TW/actions.md +82 -82
- package/corpus/core/docs/content/locales/zh-TW/agent-mentions.md +22 -22
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.md +82 -82
- package/corpus/core/docs/content/locales/zh-TW/agent-teams.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/agent-web-surfaces.md +11 -11
- package/corpus/core/docs/content/locales/zh-TW/audit-log.md +16 -16
- package/corpus/core/docs/content/locales/zh-TW/authentication.md +32 -32
- package/corpus/core/docs/content/locales/zh-TW/automations.md +32 -32
- package/corpus/core/docs/content/locales/zh-TW/blueprint-installer.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/cli-adapters.md +17 -17
- package/corpus/core/docs/content/locales/zh-TW/client.md +62 -62
- package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.md +32 -32
- package/corpus/core/docs/content/locales/zh-TW/code-agents-ui.md +91 -91
- package/corpus/core/docs/content/locales/zh-TW/components.md +51 -51
- package/corpus/core/docs/content/locales/zh-TW/context-awareness.md +66 -66
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.md +39 -39
- package/corpus/core/docs/content/locales/zh-TW/cross-app-sso.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/database.md +21 -21
- package/corpus/core/docs/content/locales/zh-TW/deployment.md +37 -37
- package/corpus/core/docs/content/locales/zh-TW/dispatch.md +43 -43
- package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.md +34 -34
- package/corpus/core/docs/content/locales/zh-TW/durable-resume.md +18 -18
- package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.md +73 -73
- package/corpus/core/docs/content/locales/zh-TW/evals.md +16 -16
- package/corpus/core/docs/content/locales/zh-TW/extensions.md +81 -81
- package/corpus/core/docs/content/locales/zh-TW/external-agents.md +146 -146
- package/corpus/core/docs/content/locales/zh-TW/faq.md +43 -43
- package/corpus/core/docs/content/locales/zh-TW/file-uploads.md +11 -11
- package/corpus/core/docs/content/locales/zh-TW/frames.md +33 -33
- package/corpus/core/docs/content/locales/zh-TW/getting-started.md +28 -28
- package/corpus/core/docs/content/locales/zh-TW/harness-agents.md +78 -78
- package/corpus/core/docs/content/locales/zh-TW/human-approval.md +27 -27
- package/corpus/core/docs/content/locales/zh-TW/internationalization.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/key-concepts.md +68 -68
- package/corpus/core/docs/content/locales/zh-TW/local-file-mode.md +50 -50
- package/corpus/core/docs/content/locales/zh-TW/mcp-apps.md +38 -38
- package/corpus/core/docs/content/locales/zh-TW/mcp-clients.md +67 -67
- package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.md +50 -50
- package/corpus/core/docs/content/locales/zh-TW/messaging.md +99 -99
- package/corpus/core/docs/content/locales/zh-TW/migration-workbench.md +6 -6
- package/corpus/core/docs/content/locales/zh-TW/multi-app-workspace.md +39 -39
- package/corpus/core/docs/content/locales/zh-TW/multi-tenancy.md +7 -7
- package/corpus/core/docs/content/locales/zh-TW/native-chat-ui.md +38 -38
- package/corpus/core/docs/content/locales/zh-TW/notifications.md +23 -23
- package/corpus/core/docs/content/locales/zh-TW/observability.md +49 -49
- package/corpus/core/docs/content/locales/zh-TW/observational-memory.md +23 -23
- package/corpus/core/docs/content/locales/zh-TW/onboarding.md +40 -40
- package/corpus/core/docs/content/locales/zh-TW/plan-plugin.md +37 -37
- package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.md +72 -72
- package/corpus/core/docs/content/locales/zh-TW/processors.md +17 -17
- package/corpus/core/docs/content/locales/zh-TW/progress.md +15 -15
- package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.md +10 -10
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.md +103 -103
- package/corpus/core/docs/content/locales/zh-TW/recurring-jobs.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/routing.md +9 -9
- package/corpus/core/docs/content/locales/zh-TW/sandbox-adapters.md +48 -48
- package/corpus/core/docs/content/locales/zh-TW/security.md +49 -49
- package/corpus/core/docs/content/locales/zh-TW/server.md +47 -47
- package/corpus/core/docs/content/locales/zh-TW/sharing.md +22 -22
- package/corpus/core/docs/content/locales/zh-TW/skills-guide.md +46 -46
- package/corpus/core/docs/content/locales/zh-TW/template-analytics.md +40 -40
- package/corpus/core/docs/content/locales/zh-TW/template-assets.md +69 -69
- package/corpus/core/docs/content/locales/zh-TW/template-brain.md +81 -81
- package/corpus/core/docs/content/locales/zh-TW/template-calendar.md +40 -40
- package/corpus/core/docs/content/locales/zh-TW/template-chat.md +27 -27
- package/corpus/core/docs/content/locales/zh-TW/template-clips.md +85 -85
- package/corpus/core/docs/content/locales/zh-TW/template-content.md +65 -66
- package/corpus/core/docs/content/locales/zh-TW/template-design.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/template-dispatch.md +51 -51
- package/corpus/core/docs/content/locales/zh-TW/template-forms.md +25 -25
- package/corpus/core/docs/content/locales/zh-TW/template-mail.md +71 -71
- package/corpus/core/docs/content/locales/zh-TW/template-plan.md +92 -92
- package/corpus/core/docs/content/locales/zh-TW/template-slides.md +52 -52
- package/corpus/core/docs/content/locales/zh-TW/template-videos.md +30 -30
- package/corpus/core/docs/content/locales/zh-TW/tracking.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/using-your-agent.md +18 -18
- package/corpus/core/docs/content/locales/zh-TW/voice-input.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.md +61 -61
- package/corpus/core/docs/content/locales/zh-TW/workspace-connections.md +41 -41
- package/corpus/core/docs/content/locales/zh-TW/workspace-management.md +27 -27
- package/corpus/core/docs/content/locales/zh-TW/workspace.md +58 -58
- package/corpus/core/docs/content/locales/zh-TW/writing-agent-instructions.md +41 -41
- package/corpus/core/docs/content/template-clips.md +48 -2
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/client/AgentPanel.tsx +27 -3
- package/corpus/core/src/deploy/build.ts +417 -42
- package/corpus/core/src/deploy/route-discovery.ts +1 -1
- package/corpus/core/src/server/edge.ts +50 -0
- package/corpus/core/src/styles/agent-native.css +93 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +44 -44
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +5 -3
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +69 -70
- package/corpus/templates/analytics/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/assets/app/i18n/zh-TW.ts +82 -82
- package/corpus/templates/assets/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +6 -4
- package/corpus/templates/brain/app/i18n/zh-TW.ts +90 -90
- package/corpus/templates/brain/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +57 -57
- package/corpus/templates/calendar/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/calendar/server/lib/booking-og-fonts.ts +20 -6
- package/corpus/templates/calendar/server/lib/booking-og-image.ts +17 -9
- package/corpus/templates/chat/app/components/layout/Layout.tsx +5 -3
- package/corpus/templates/chat/app/i18n/zh-TW.ts +3 -3
- package/corpus/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/clips/AGENTS.md +6 -0
- package/corpus/templates/clips/actions/delete-recording-permanent.ts +7 -1
- package/corpus/templates/clips/actions/get-recording-player-data.ts +44 -2
- package/corpus/templates/clips/actions/navigate.ts +2 -0
- package/corpus/templates/clips/actions/save-bug-report-context.ts +173 -0
- package/corpus/templates/clips/actions/view-screen.ts +58 -7
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +9 -3
- package/corpus/templates/clips/app/hooks/use-navigation-state.ts +17 -0
- package/corpus/templates/clips/app/i18n/ar-SA.ts +31 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +32 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +32 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +32 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +32 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +32 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +31 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +32 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +32 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +30 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +461 -451
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +126 -0
- package/corpus/templates/clips/app/routes/bug-report.tsx +222 -0
- package/corpus/templates/clips/app/routes/record.tsx +104 -12
- package/corpus/templates/clips/changelog/2026-06-26-brief-network-blips-no-longer-block-recording-or-wrongly-pro.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-bug-report-recordings-can-keep-redacted-host-app-context-wit.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-bug-report-widgets-can-launch-clips-recordings-from-embedded.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-desktop-recording-keeps-connected-users-out-of-the-storage-s.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-if-a-recording-can-t-be-uploaded-the-chrome-extension-now-sa.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/clips/chrome-extension/public/manifest.json +9 -2
- package/corpus/templates/clips/chrome-extension/src/background.ts +43 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +111 -6
- package/corpus/templates/clips/chrome-extension/src/popup.ts +18 -7
- package/corpus/templates/clips/desktop/src/app.tsx +53 -19
- package/corpus/templates/clips/server/db/schema.ts +26 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +51 -0
- package/corpus/templates/clips/server/plugins/auth.ts +1 -0
- package/corpus/templates/clips/server/plugins/db.ts +28 -0
- package/corpus/templates/clips/server/routes/api/agent-context.json.get.ts +4 -1
- package/corpus/templates/clips/shared/bug-report.ts +161 -0
- package/corpus/templates/content/app/components/layout/Layout.tsx +10 -8
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -1
- package/corpus/templates/content/app/i18n/zh-TW.ts +67 -66
- package/corpus/templates/content/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/design/app/i18n/zh-TW.ts +44 -44
- package/corpus/templates/design/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +5 -4
- package/corpus/templates/dispatch/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +4 -2
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/forms/app/i18n/zh-TW.ts +48 -48
- package/corpus/templates/forms/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +3 -3
- package/corpus/templates/macros/app/i18n/zh-TW.ts +5 -5
- package/corpus/templates/macros/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/mail/app/i18n/zh-TW.ts +83 -83
- package/corpus/templates/mail/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +5 -3
- package/corpus/templates/plan/app/i18n/zh-TW.ts +69 -69
- package/corpus/templates/plan/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/slides/app/i18n/zh-TW.ts +64 -64
- package/corpus/templates/slides/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/videos/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/videos/app/i18n/zh-TW.ts +54 -54
- package/corpus/templates/videos/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +14 -4
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.d.ts +3 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +361 -37
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/route-discovery.d.ts +1 -1
- package/dist/deploy/route-discovery.js +1 -1
- package/dist/deploy/route-discovery.js.map +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/server/edge.d.ts +11 -0
- package/dist/server/edge.d.ts.map +1 -0
- package/dist/server/edge.js +11 -0
- package/dist/server/edge.js.map +1 -0
- package/dist/styles/agent-native.css +93 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +44 -44
- 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/locales/zh-TW/a2a-protocol.md +68 -68
- package/docs/content/locales/zh-TW/actions.md +82 -82
- package/docs/content/locales/zh-TW/agent-mentions.md +22 -22
- package/docs/content/locales/zh-TW/agent-surfaces.md +82 -82
- package/docs/content/locales/zh-TW/agent-teams.md +29 -29
- package/docs/content/locales/zh-TW/agent-web-surfaces.md +11 -11
- package/docs/content/locales/zh-TW/audit-log.md +16 -16
- package/docs/content/locales/zh-TW/authentication.md +32 -32
- package/docs/content/locales/zh-TW/automations.md +32 -32
- package/docs/content/locales/zh-TW/blueprint-installer.md +19 -19
- package/docs/content/locales/zh-TW/cli-adapters.md +17 -17
- package/docs/content/locales/zh-TW/client.md +62 -62
- package/docs/content/locales/zh-TW/cloneable-saas.md +32 -32
- package/docs/content/locales/zh-TW/code-agents-ui.md +91 -91
- package/docs/content/locales/zh-TW/components.md +51 -51
- package/docs/content/locales/zh-TW/context-awareness.md +66 -66
- package/docs/content/locales/zh-TW/creating-templates.md +39 -39
- package/docs/content/locales/zh-TW/cross-app-sso.md +29 -29
- package/docs/content/locales/zh-TW/database.md +21 -21
- package/docs/content/locales/zh-TW/deployment.md +37 -37
- package/docs/content/locales/zh-TW/dispatch.md +43 -43
- package/docs/content/locales/zh-TW/drop-in-agent.md +34 -34
- package/docs/content/locales/zh-TW/durable-resume.md +18 -18
- package/docs/content/locales/zh-TW/embedding-sdk.md +73 -73
- package/docs/content/locales/zh-TW/evals.md +16 -16
- package/docs/content/locales/zh-TW/extensions.md +81 -81
- package/docs/content/locales/zh-TW/external-agents.md +146 -146
- package/docs/content/locales/zh-TW/faq.md +43 -43
- package/docs/content/locales/zh-TW/file-uploads.md +11 -11
- package/docs/content/locales/zh-TW/frames.md +33 -33
- package/docs/content/locales/zh-TW/getting-started.md +28 -28
- package/docs/content/locales/zh-TW/harness-agents.md +78 -78
- package/docs/content/locales/zh-TW/human-approval.md +27 -27
- package/docs/content/locales/zh-TW/internationalization.md +19 -19
- package/docs/content/locales/zh-TW/key-concepts.md +68 -68
- package/docs/content/locales/zh-TW/local-file-mode.md +50 -50
- package/docs/content/locales/zh-TW/mcp-apps.md +38 -38
- package/docs/content/locales/zh-TW/mcp-clients.md +67 -67
- package/docs/content/locales/zh-TW/mcp-protocol.md +50 -50
- package/docs/content/locales/zh-TW/messaging.md +99 -99
- package/docs/content/locales/zh-TW/migration-workbench.md +6 -6
- package/docs/content/locales/zh-TW/multi-app-workspace.md +39 -39
- package/docs/content/locales/zh-TW/multi-tenancy.md +7 -7
- package/docs/content/locales/zh-TW/native-chat-ui.md +38 -38
- package/docs/content/locales/zh-TW/notifications.md +23 -23
- package/docs/content/locales/zh-TW/observability.md +49 -49
- package/docs/content/locales/zh-TW/observational-memory.md +23 -23
- package/docs/content/locales/zh-TW/onboarding.md +40 -40
- package/docs/content/locales/zh-TW/plan-plugin.md +37 -37
- package/docs/content/locales/zh-TW/pr-visual-recap.md +72 -72
- package/docs/content/locales/zh-TW/processors.md +17 -17
- package/docs/content/locales/zh-TW/progress.md +15 -15
- package/docs/content/locales/zh-TW/pure-agent-apps.md +10 -10
- package/docs/content/locales/zh-TW/real-time-collaboration.md +103 -103
- package/docs/content/locales/zh-TW/recurring-jobs.md +19 -19
- package/docs/content/locales/zh-TW/routing.md +9 -9
- package/docs/content/locales/zh-TW/sandbox-adapters.md +48 -48
- package/docs/content/locales/zh-TW/security.md +49 -49
- package/docs/content/locales/zh-TW/server.md +47 -47
- package/docs/content/locales/zh-TW/sharing.md +22 -22
- package/docs/content/locales/zh-TW/skills-guide.md +46 -46
- package/docs/content/locales/zh-TW/template-analytics.md +40 -40
- package/docs/content/locales/zh-TW/template-assets.md +69 -69
- package/docs/content/locales/zh-TW/template-brain.md +81 -81
- package/docs/content/locales/zh-TW/template-calendar.md +40 -40
- package/docs/content/locales/zh-TW/template-chat.md +27 -27
- package/docs/content/locales/zh-TW/template-clips.md +85 -85
- package/docs/content/locales/zh-TW/template-content.md +65 -66
- package/docs/content/locales/zh-TW/template-design.md +29 -29
- package/docs/content/locales/zh-TW/template-dispatch.md +51 -51
- package/docs/content/locales/zh-TW/template-forms.md +25 -25
- package/docs/content/locales/zh-TW/template-mail.md +71 -71
- package/docs/content/locales/zh-TW/template-plan.md +92 -92
- package/docs/content/locales/zh-TW/template-slides.md +52 -52
- package/docs/content/locales/zh-TW/template-videos.md +30 -30
- package/docs/content/locales/zh-TW/tracking.md +29 -29
- package/docs/content/locales/zh-TW/using-your-agent.md +18 -18
- package/docs/content/locales/zh-TW/voice-input.md +19 -19
- package/docs/content/locales/zh-TW/what-is-agent-native.md +61 -61
- package/docs/content/locales/zh-TW/workspace-connections.md +41 -41
- package/docs/content/locales/zh-TW/workspace-management.md +27 -27
- package/docs/content/locales/zh-TW/workspace.md +58 -58
- package/docs/content/locales/zh-TW/writing-agent-instructions.md +41 -41
- package/docs/content/template-clips.md +48 -2
- package/package.json +2 -1
- package/src/templates/default/app/i18n/zh-TW.ts +44 -44
|
@@ -33,7 +33,7 @@ export declare function discoverApiRoutes(cwd: string): Promise<DiscoveredRoute[
|
|
|
33
33
|
export declare function discoverPlugins(cwd: string): Promise<string[]>;
|
|
34
34
|
/**
|
|
35
35
|
* Default plugins that auto-mount when not provided by the template.
|
|
36
|
-
* Key = filename stem, value = export name from @agent-native/core/server.
|
|
36
|
+
* Key = filename stem, value = export name from @agent-native/core/server/edge.
|
|
37
37
|
*/
|
|
38
38
|
export declare const DEFAULT_PLUGIN_REGISTRY: Record<string, string>;
|
|
39
39
|
export interface DiscoveredAction {
|
|
@@ -118,7 +118,7 @@ function isRuntimeSourceFile(filename) {
|
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
120
|
* Default plugins that auto-mount when not provided by the template.
|
|
121
|
-
* Key = filename stem, value = export name from @agent-native/core/server.
|
|
121
|
+
* Key = filename stem, value = export name from @agent-native/core/server/edge.
|
|
122
122
|
*/
|
|
123
123
|
export const DEFAULT_PLUGIN_REGISTRY = {
|
|
124
124
|
"agent-chat": "defaultAgentChatPlugin",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-discovery.js","sourceRoot":"","sources":["../../src/deploy/route-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,sDAAsD;AACtD,yFAAyF;AACzF,IAAI,GAAoC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,mBAAmB,CAAC;iBAC3B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,CAAC,CAAC,EAAE,CACP,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,mDAAmD;IAChF,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,MAAM,CAChD,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CACnC,CAAC;AACJ,CAAC","sourcesContent":["import path from \"path\";\n\n// Lazy fs — loaded via dynamic import() on first use.\n// Avoids require() which bundlers convert to createRequire() that crashes on CF Workers.\nlet _fs: typeof import(\"fs\") | undefined;\nasync function getFs(): Promise<typeof import(\"fs\")> {\n if (!_fs) {\n _fs = await import(\"node:fs\");\n }\n return _fs;\n}\n\n/**\n * Map a Nitro-style route file path to { method, route }.\n *\n * Examples:\n * api/emails/index.get.ts → GET /api/emails\n * api/emails/[id].get.ts → GET /api/emails/:id\n * api/emails/[id]/star.patch.ts→ PATCH /api/emails/:id/star\n * api/events.get.ts → GET /api/events\n */\nexport function parseRouteFile(relPath: string): {\n method: string;\n route: string;\n} | null {\n // Strip .ts/.js extension\n const withoutExt = relPath.replace(/\\.[tj]s$/, \"\");\n\n // Extract HTTP method from the last segment (e.g. \"status.get\" → method=\"get\")\n const dotIdx = withoutExt.lastIndexOf(\".\");\n if (dotIdx === -1) return null;\n\n const method = withoutExt.slice(dotIdx + 1).toLowerCase();\n const validMethods = [\"get\", \"post\", \"put\", \"patch\", \"delete\", \"options\"];\n if (!validMethods.includes(method)) return null;\n\n let routePath = withoutExt.slice(0, dotIdx);\n\n // Replace [param] with :param\n routePath = routePath.replace(/\\[([^\\]]+)\\]/g, \":$1\");\n\n // Replace [...catchall] with ** (H3 catch-all syntax, value in params._)\n routePath = routePath.replace(/:\\.\\.\\.([^/]+)/g, \"**\");\n\n // Remove trailing /index\n routePath = routePath.replace(/\\/index$/, \"\");\n\n // Ensure leading slash\n if (!routePath.startsWith(\"/\")) routePath = \"/\" + routePath;\n\n return { method, route: routePath };\n}\n\n/**\n * Recursively discover all .ts files under a directory.\n */\nexport async function discoverFiles(\n dir: string,\n prefix = \"\",\n): Promise<string[]> {\n try {\n const fs = await getFs();\n if (!fs.existsSync(dir)) return [];\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n const files: string[] = [];\n for (const entry of entries) {\n const rel = prefix ? `${prefix}/${entry.name}` : entry.name;\n if (entry.isDirectory()) {\n files.push(...(await discoverFiles(path.join(dir, entry.name), rel)));\n } else if (entry.name.endsWith(\".ts\") || entry.name.endsWith(\".js\")) {\n files.push(rel);\n }\n }\n return files;\n } catch {\n return []; // Edge runtime — no filesystem\n }\n}\n\nexport interface DiscoveredRoute {\n method: string;\n route: string;\n /** Relative path from server/routes/ */\n filePath: string;\n /** Absolute path on disk */\n absPath: string;\n}\n\n/**\n * Discover all API routes in a project's server/routes/ directory.\n */\nexport async function discoverApiRoutes(\n cwd: string,\n): Promise<DiscoveredRoute[]> {\n const apiDir = path.join(cwd, \"server/routes/api\");\n const agentNativeDir = path.join(cwd, \"server/routes/_agent-native\");\n const routeFiles = [\n ...(await discoverFiles(apiDir, \"api\")),\n ...(await discoverFiles(agentNativeDir, \"_agent-native\")),\n ];\n const routes: DiscoveredRoute[] = [];\n\n for (const relFile of routeFiles) {\n const parsed = parseRouteFile(relFile);\n if (!parsed) continue;\n routes.push({\n ...parsed,\n filePath: relFile,\n absPath: path.join(cwd, \"server/routes\", relFile),\n });\n }\n\n return routes;\n}\n\n/**\n * Discover all server plugins in a project's server/plugins/ directory.\n */\nexport async function discoverPlugins(cwd: string): Promise<string[]> {\n try {\n const fs = await getFs();\n const pluginsDir = path.join(cwd, \"server/plugins\");\n if (!fs.existsSync(pluginsDir)) return [];\n return fs\n .readdirSync(pluginsDir)\n .filter(isRuntimeSourceFile)\n .sort()\n .map((f) => path.join(pluginsDir, f));\n } catch {\n return []; // Edge runtime — no filesystem\n }\n}\n\nfunction isRuntimeSourceFile(filename: string): boolean {\n if (!/\\.(ts|js)$/.test(filename)) return false;\n if (/\\.d\\.ts$/.test(filename)) return false;\n if (/\\.(test|spec)\\.(ts|js)$/.test(filename)) return false;\n return true;\n}\n\n/**\n * Default plugins that auto-mount when not provided by the template.\n * Key = filename stem, value = export name from @agent-native/core/server.\n */\nexport const DEFAULT_PLUGIN_REGISTRY: Record<string, string> = {\n \"agent-chat\": \"defaultAgentChatPlugin\",\n auth: \"defaultAuthPlugin\",\n \"context-xray\": \"defaultContextXrayPlugin\",\n \"core-routes\": \"defaultCoreRoutesPlugin\",\n integrations: \"defaultIntegrationsPlugin\",\n \"observational-memory\": \"defaultObservationalMemoryPlugin\",\n onboarding: \"defaultOnboardingPlugin\",\n org: \"defaultOrgPlugin\",\n resources: \"defaultResourcesPlugin\",\n sentry: \"defaultSentryPlugin\",\n terminal: \"defaultTerminalPlugin\",\n};\n\n/** Files to skip during action discovery (mirrors action-discovery.ts). */\nconst SKIP_ACTION_FILES = new Set([\n \"helpers\",\n \"run\",\n \"db-connect\",\n \"db-status\",\n \"registry\",\n]);\n\nexport interface DiscoveredAction {\n /** Action name (filename without extension) */\n name: string;\n /** Absolute path to the action file */\n absPath: string;\n /** HTTP method (from defineAction's http config, default POST) */\n method: string;\n /**\n * Custom route segment from defineAction's `http.path`. When unset the\n * route falls back to `name`, mirroring the runtime mount\n * (`action-routes.ts`: `path = http?.path ?? name`).\n */\n path?: string;\n}\n\n/** HTTP methods an action may expose via `http.method`. */\nconst VALID_ACTION_METHODS = new Set([\n \"get\",\n \"post\",\n \"put\",\n \"patch\",\n \"delete\",\n \"options\",\n \"head\",\n]);\n\n/**\n * Statically extract the `http` config from a defineAction source file.\n *\n * Deploy discovery cannot import the action module — edge bundlers rewrite\n * require()/import in ways that crash (see getFs note above), and action\n * files often pull in Node-only deps — so we parse the source text instead.\n * The parse is scoped to the `http: { ... }` object literal so unrelated\n * `method:`/`path:` keys elsewhere in the file (e.g. a\n * `fetch(url, { method: \"GET\" })` in the action body) cannot flip the\n * route's method. A naive `content.includes('method: \"GET\"')` did exactly\n * that, and it also missed PUT/PATCH/DELETE and dropped `http.path`.\n *\n * The http config may contain nested object literals before `method` or\n * `path`, so extract the object body with a small balanced-brace scan rather\n * than a non-greedy regex that stops at the first closing brace.\n *\n * Returns `false` when the action opts out of HTTP (`http: false`); otherwise\n * `{ method, path? }` with method lowercased and defaulting to \"post\".\n */\nexport function parseActionHttpConfig(\n content: string,\n): false | { method: string; path?: string } {\n let method = \"post\";\n let path: string | undefined;\n\n const httpConfig = extractActionHttpConfig(content);\n if (httpConfig === false) return false;\n\n if (typeof httpConfig === \"string\") {\n const body = httpConfig;\n const methodMatch = body.match(/\\bmethod\\s*:\\s*['\"]([A-Za-z]+)['\"]/);\n if (methodMatch) {\n const m = methodMatch[1].toLowerCase();\n if (VALID_ACTION_METHODS.has(m)) method = m;\n }\n const pathMatch = body.match(/\\bpath\\s*:\\s*['\"]([^'\"]+)['\"]/);\n if (pathMatch) path = pathMatch[1];\n }\n\n return { method, path };\n}\n\nfunction extractActionHttpConfig(content: string): false | string | undefined {\n for (let i = 0; i < content.length; ) {\n const skipped = skipNonCode(content, i);\n if (skipped !== i) {\n i = skipped;\n continue;\n }\n\n if (\n content.startsWith(\"http\", i) &&\n !isIdentifierChar(content[i - 1]) &&\n !isIdentifierChar(content[i + 4])\n ) {\n let valueStart = skipWhitespaceAndComments(content, i + 4);\n if (content[valueStart] !== \":\") {\n i += 4;\n continue;\n }\n\n valueStart = skipWhitespaceAndComments(content, valueStart + 1);\n if (\n content.startsWith(\"false\", valueStart) &&\n !isIdentifierChar(content[valueStart + 5])\n ) {\n return false;\n }\n\n if (content[valueStart] === \"{\") {\n return extractBalancedObjectBody(content, valueStart);\n }\n }\n\n i += 1;\n }\n\n return undefined;\n}\n\nfunction extractBalancedObjectBody(\n content: string,\n openBraceIndex: number,\n): string | undefined {\n let depth = 0;\n for (let i = openBraceIndex; i < content.length; ) {\n const skipped = skipNonCode(content, i);\n if (skipped !== i) {\n i = skipped;\n continue;\n }\n\n const ch = content[i];\n if (ch === \"{\") {\n depth += 1;\n } else if (ch === \"}\") {\n depth -= 1;\n if (depth === 0) return content.slice(openBraceIndex + 1, i);\n }\n\n i += 1;\n }\n\n return undefined;\n}\n\nfunction skipWhitespaceAndComments(content: string, start: number): number {\n let i = start;\n while (i < content.length) {\n if (/\\s/.test(content[i])) {\n i += 1;\n continue;\n }\n\n const skipped = skipComment(content, i);\n if (skipped !== i) {\n i = skipped;\n continue;\n }\n\n break;\n }\n return i;\n}\n\nfunction skipNonCode(content: string, start: number): number {\n return skipComment(content, skipString(content, start));\n}\n\nfunction skipComment(content: string, start: number): number {\n if (content[start] === \"/\" && content[start + 1] === \"/\") {\n const newline = content.indexOf(\"\\n\", start + 2);\n return newline === -1 ? content.length : newline + 1;\n }\n\n if (content[start] === \"/\" && content[start + 1] === \"*\") {\n const close = content.indexOf(\"*/\", start + 2);\n return close === -1 ? content.length : close + 2;\n }\n\n return start;\n}\n\nfunction skipString(content: string, start: number): number {\n const quote = content[start];\n if (quote !== \"'\" && quote !== '\"' && quote !== \"`\") return start;\n\n for (let i = start + 1; i < content.length; i += 1) {\n if (content[i] === \"\\\\\") {\n i += 1;\n continue;\n }\n if (content[i] === quote) return i + 1;\n }\n\n return content.length;\n}\n\nfunction isIdentifierChar(ch: string | undefined): boolean {\n return ch !== undefined && /[A-Za-z0-9_$]/.test(ch);\n}\n\n/**\n * Scan a single actions directory for defineAction-backed files. Shared\n * between the template-actions path and the workspace-core actions layer.\n */\nasync function scanActionsDir(actionsDir: string): Promise<DiscoveredAction[]> {\n const fs = await getFs();\n if (!fs.existsSync(actionsDir)) return [];\n\n const files = fs.readdirSync(actionsDir).filter((f) => {\n if (!isRuntimeSourceFile(f)) return false;\n const name = f.replace(/\\.(ts|js)$/, \"\");\n if (name.startsWith(\"_\")) return false;\n if (SKIP_ACTION_FILES.has(name)) return false;\n return true;\n });\n\n const out: DiscoveredAction[] = [];\n for (const file of files) {\n const name = file.replace(/\\.(ts|js)$/, \"\");\n const absPath = path.join(actionsDir, file);\n\n // Only mount actions that use defineAction. CLI-style scripts\n // (export default async function()) often use Node-only APIs\n // (fs, path) that can't run on edge runtimes — they're meant\n // to be invoked via `pnpm action <name>`, not as HTTP endpoints.\n let content: string;\n try {\n content = fs.readFileSync(absPath, \"utf-8\");\n } catch {\n continue;\n }\n if (!content.includes(\"defineAction\")) continue;\n\n const http = parseActionHttpConfig(content);\n if (http === false) continue; // agent-only\n\n out.push({\n name,\n absPath,\n method: http.method,\n ...(http.path ? { path: http.path } : {}),\n });\n }\n\n return out;\n}\n\n/**\n * Discover action files in the actions/ directory.\n *\n * When a workspace core is present in the ancestor chain, its actions/\n * directory is also scanned and its actions are merged in after the\n * template's — with template actions winning on name collision.\n *\n * These become `/_agent-native/actions/:name` HTTP endpoints.\n */\nexport async function discoverActionFiles(\n cwd: string,\n): Promise<DiscoveredAction[]> {\n const templateActions = await scanActionsDir(path.join(cwd, \"actions\"));\n const byName = new Map<string, DiscoveredAction>();\n for (const a of templateActions) byName.set(a.name, a);\n\n // Merge workspace-core actions (template wins on collision).\n try {\n const { getWorkspaceCoreExports } = await import(\"./workspace-core.js\");\n const ws = await getWorkspaceCoreExports(cwd);\n if (ws && ws.actionsDir) {\n const wsActions = await scanActionsDir(ws.actionsDir);\n for (const a of wsActions) {\n if (!byName.has(a.name)) byName.set(a.name, a);\n }\n }\n } catch {\n // Edge runtime / no fs — skip workspace-core merge.\n }\n\n return Array.from(byName.values());\n}\n\n/**\n * Returns the stems of default plugins that are missing from the project.\n */\nexport async function getMissingDefaultPlugins(cwd: string): Promise<string[]> {\n let existingStems: Set<string>;\n try {\n const fs = await getFs();\n const pluginsDir = path.join(cwd, \"server/plugins\");\n existingStems = new Set(\n fs.existsSync(pluginsDir)\n ? fs\n .readdirSync(pluginsDir)\n .filter(isRuntimeSourceFile)\n .map((f) => path.basename(f, path.extname(f)))\n : [],\n );\n } catch {\n existingStems = new Set(); // Edge runtime — all defaults will be auto-mounted\n }\n return Object.keys(DEFAULT_PLUGIN_REGISTRY).filter(\n (stem) => !existingStems.has(stem),\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"route-discovery.js","sourceRoot":"","sources":["../../src/deploy/route-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,sDAAsD;AACtD,yFAAyF;AACzF,IAAI,GAAoC,CAAC;AACzC,KAAK,UAAU,KAAK;IAClB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,GAAG,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAI5C,0BAA0B;IAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAEnD,+EAA+E;IAC/E,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,MAAM,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/B,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1D,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC1E,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAEhD,IAAI,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,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C,MAAM,EAAE,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,GAAW;IACxD,IAAI,aAA0B,CAAC;IAC/B,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,MAAM,KAAK,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QACpD,aAAa,GAAG,IAAI,GAAG,CACrB,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;YACvB,CAAC,CAAC,EAAE;iBACC,WAAW,CAAC,UAAU,CAAC;iBACvB,MAAM,CAAC,mBAAmB,CAAC;iBAC3B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,CAAC,CAAC,EAAE,CACP,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,mDAAmD;IAChF,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,MAAM,CAChD,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CACnC,CAAC;AACJ,CAAC","sourcesContent":["import path from \"path\";\n\n// Lazy fs — loaded via dynamic import() on first use.\n// Avoids require() which bundlers convert to createRequire() that crashes on CF Workers.\nlet _fs: typeof import(\"fs\") | undefined;\nasync function getFs(): Promise<typeof import(\"fs\")> {\n if (!_fs) {\n _fs = await import(\"node:fs\");\n }\n return _fs;\n}\n\n/**\n * Map a Nitro-style route file path to { method, route }.\n *\n * Examples:\n * api/emails/index.get.ts → GET /api/emails\n * api/emails/[id].get.ts → GET /api/emails/:id\n * api/emails/[id]/star.patch.ts→ PATCH /api/emails/:id/star\n * api/events.get.ts → GET /api/events\n */\nexport function parseRouteFile(relPath: string): {\n method: string;\n route: string;\n} | null {\n // Strip .ts/.js extension\n const withoutExt = relPath.replace(/\\.[tj]s$/, \"\");\n\n // Extract HTTP method from the last segment (e.g. \"status.get\" → method=\"get\")\n const dotIdx = withoutExt.lastIndexOf(\".\");\n if (dotIdx === -1) return null;\n\n const method = withoutExt.slice(dotIdx + 1).toLowerCase();\n const validMethods = [\"get\", \"post\", \"put\", \"patch\", \"delete\", \"options\"];\n if (!validMethods.includes(method)) return null;\n\n let routePath = withoutExt.slice(0, dotIdx);\n\n // Replace [param] with :param\n routePath = routePath.replace(/\\[([^\\]]+)\\]/g, \":$1\");\n\n // Replace [...catchall] with ** (H3 catch-all syntax, value in params._)\n routePath = routePath.replace(/:\\.\\.\\.([^/]+)/g, \"**\");\n\n // Remove trailing /index\n routePath = routePath.replace(/\\/index$/, \"\");\n\n // Ensure leading slash\n if (!routePath.startsWith(\"/\")) routePath = \"/\" + routePath;\n\n return { method, route: routePath };\n}\n\n/**\n * Recursively discover all .ts files under a directory.\n */\nexport async function discoverFiles(\n dir: string,\n prefix = \"\",\n): Promise<string[]> {\n try {\n const fs = await getFs();\n if (!fs.existsSync(dir)) return [];\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n const files: string[] = [];\n for (const entry of entries) {\n const rel = prefix ? `${prefix}/${entry.name}` : entry.name;\n if (entry.isDirectory()) {\n files.push(...(await discoverFiles(path.join(dir, entry.name), rel)));\n } else if (entry.name.endsWith(\".ts\") || entry.name.endsWith(\".js\")) {\n files.push(rel);\n }\n }\n return files;\n } catch {\n return []; // Edge runtime — no filesystem\n }\n}\n\nexport interface DiscoveredRoute {\n method: string;\n route: string;\n /** Relative path from server/routes/ */\n filePath: string;\n /** Absolute path on disk */\n absPath: string;\n}\n\n/**\n * Discover all API routes in a project's server/routes/ directory.\n */\nexport async function discoverApiRoutes(\n cwd: string,\n): Promise<DiscoveredRoute[]> {\n const apiDir = path.join(cwd, \"server/routes/api\");\n const agentNativeDir = path.join(cwd, \"server/routes/_agent-native\");\n const routeFiles = [\n ...(await discoverFiles(apiDir, \"api\")),\n ...(await discoverFiles(agentNativeDir, \"_agent-native\")),\n ];\n const routes: DiscoveredRoute[] = [];\n\n for (const relFile of routeFiles) {\n const parsed = parseRouteFile(relFile);\n if (!parsed) continue;\n routes.push({\n ...parsed,\n filePath: relFile,\n absPath: path.join(cwd, \"server/routes\", relFile),\n });\n }\n\n return routes;\n}\n\n/**\n * Discover all server plugins in a project's server/plugins/ directory.\n */\nexport async function discoverPlugins(cwd: string): Promise<string[]> {\n try {\n const fs = await getFs();\n const pluginsDir = path.join(cwd, \"server/plugins\");\n if (!fs.existsSync(pluginsDir)) return [];\n return fs\n .readdirSync(pluginsDir)\n .filter(isRuntimeSourceFile)\n .sort()\n .map((f) => path.join(pluginsDir, f));\n } catch {\n return []; // Edge runtime — no filesystem\n }\n}\n\nfunction isRuntimeSourceFile(filename: string): boolean {\n if (!/\\.(ts|js)$/.test(filename)) return false;\n if (/\\.d\\.ts$/.test(filename)) return false;\n if (/\\.(test|spec)\\.(ts|js)$/.test(filename)) return false;\n return true;\n}\n\n/**\n * Default plugins that auto-mount when not provided by the template.\n * Key = filename stem, value = export name from @agent-native/core/server/edge.\n */\nexport const DEFAULT_PLUGIN_REGISTRY: Record<string, string> = {\n \"agent-chat\": \"defaultAgentChatPlugin\",\n auth: \"defaultAuthPlugin\",\n \"context-xray\": \"defaultContextXrayPlugin\",\n \"core-routes\": \"defaultCoreRoutesPlugin\",\n integrations: \"defaultIntegrationsPlugin\",\n \"observational-memory\": \"defaultObservationalMemoryPlugin\",\n onboarding: \"defaultOnboardingPlugin\",\n org: \"defaultOrgPlugin\",\n resources: \"defaultResourcesPlugin\",\n sentry: \"defaultSentryPlugin\",\n terminal: \"defaultTerminalPlugin\",\n};\n\n/** Files to skip during action discovery (mirrors action-discovery.ts). */\nconst SKIP_ACTION_FILES = new Set([\n \"helpers\",\n \"run\",\n \"db-connect\",\n \"db-status\",\n \"registry\",\n]);\n\nexport interface DiscoveredAction {\n /** Action name (filename without extension) */\n name: string;\n /** Absolute path to the action file */\n absPath: string;\n /** HTTP method (from defineAction's http config, default POST) */\n method: string;\n /**\n * Custom route segment from defineAction's `http.path`. When unset the\n * route falls back to `name`, mirroring the runtime mount\n * (`action-routes.ts`: `path = http?.path ?? name`).\n */\n path?: string;\n}\n\n/** HTTP methods an action may expose via `http.method`. */\nconst VALID_ACTION_METHODS = new Set([\n \"get\",\n \"post\",\n \"put\",\n \"patch\",\n \"delete\",\n \"options\",\n \"head\",\n]);\n\n/**\n * Statically extract the `http` config from a defineAction source file.\n *\n * Deploy discovery cannot import the action module — edge bundlers rewrite\n * require()/import in ways that crash (see getFs note above), and action\n * files often pull in Node-only deps — so we parse the source text instead.\n * The parse is scoped to the `http: { ... }` object literal so unrelated\n * `method:`/`path:` keys elsewhere in the file (e.g. a\n * `fetch(url, { method: \"GET\" })` in the action body) cannot flip the\n * route's method. A naive `content.includes('method: \"GET\"')` did exactly\n * that, and it also missed PUT/PATCH/DELETE and dropped `http.path`.\n *\n * The http config may contain nested object literals before `method` or\n * `path`, so extract the object body with a small balanced-brace scan rather\n * than a non-greedy regex that stops at the first closing brace.\n *\n * Returns `false` when the action opts out of HTTP (`http: false`); otherwise\n * `{ method, path? }` with method lowercased and defaulting to \"post\".\n */\nexport function parseActionHttpConfig(\n content: string,\n): false | { method: string; path?: string } {\n let method = \"post\";\n let path: string | undefined;\n\n const httpConfig = extractActionHttpConfig(content);\n if (httpConfig === false) return false;\n\n if (typeof httpConfig === \"string\") {\n const body = httpConfig;\n const methodMatch = body.match(/\\bmethod\\s*:\\s*['\"]([A-Za-z]+)['\"]/);\n if (methodMatch) {\n const m = methodMatch[1].toLowerCase();\n if (VALID_ACTION_METHODS.has(m)) method = m;\n }\n const pathMatch = body.match(/\\bpath\\s*:\\s*['\"]([^'\"]+)['\"]/);\n if (pathMatch) path = pathMatch[1];\n }\n\n return { method, path };\n}\n\nfunction extractActionHttpConfig(content: string): false | string | undefined {\n for (let i = 0; i < content.length; ) {\n const skipped = skipNonCode(content, i);\n if (skipped !== i) {\n i = skipped;\n continue;\n }\n\n if (\n content.startsWith(\"http\", i) &&\n !isIdentifierChar(content[i - 1]) &&\n !isIdentifierChar(content[i + 4])\n ) {\n let valueStart = skipWhitespaceAndComments(content, i + 4);\n if (content[valueStart] !== \":\") {\n i += 4;\n continue;\n }\n\n valueStart = skipWhitespaceAndComments(content, valueStart + 1);\n if (\n content.startsWith(\"false\", valueStart) &&\n !isIdentifierChar(content[valueStart + 5])\n ) {\n return false;\n }\n\n if (content[valueStart] === \"{\") {\n return extractBalancedObjectBody(content, valueStart);\n }\n }\n\n i += 1;\n }\n\n return undefined;\n}\n\nfunction extractBalancedObjectBody(\n content: string,\n openBraceIndex: number,\n): string | undefined {\n let depth = 0;\n for (let i = openBraceIndex; i < content.length; ) {\n const skipped = skipNonCode(content, i);\n if (skipped !== i) {\n i = skipped;\n continue;\n }\n\n const ch = content[i];\n if (ch === \"{\") {\n depth += 1;\n } else if (ch === \"}\") {\n depth -= 1;\n if (depth === 0) return content.slice(openBraceIndex + 1, i);\n }\n\n i += 1;\n }\n\n return undefined;\n}\n\nfunction skipWhitespaceAndComments(content: string, start: number): number {\n let i = start;\n while (i < content.length) {\n if (/\\s/.test(content[i])) {\n i += 1;\n continue;\n }\n\n const skipped = skipComment(content, i);\n if (skipped !== i) {\n i = skipped;\n continue;\n }\n\n break;\n }\n return i;\n}\n\nfunction skipNonCode(content: string, start: number): number {\n return skipComment(content, skipString(content, start));\n}\n\nfunction skipComment(content: string, start: number): number {\n if (content[start] === \"/\" && content[start + 1] === \"/\") {\n const newline = content.indexOf(\"\\n\", start + 2);\n return newline === -1 ? content.length : newline + 1;\n }\n\n if (content[start] === \"/\" && content[start + 1] === \"*\") {\n const close = content.indexOf(\"*/\", start + 2);\n return close === -1 ? content.length : close + 2;\n }\n\n return start;\n}\n\nfunction skipString(content: string, start: number): number {\n const quote = content[start];\n if (quote !== \"'\" && quote !== '\"' && quote !== \"`\") return start;\n\n for (let i = start + 1; i < content.length; i += 1) {\n if (content[i] === \"\\\\\") {\n i += 1;\n continue;\n }\n if (content[i] === quote) return i + 1;\n }\n\n return content.length;\n}\n\nfunction isIdentifierChar(ch: string | undefined): boolean {\n return ch !== undefined && /[A-Za-z0-9_$]/.test(ch);\n}\n\n/**\n * Scan a single actions directory for defineAction-backed files. Shared\n * between the template-actions path and the workspace-core actions layer.\n */\nasync function scanActionsDir(actionsDir: string): Promise<DiscoveredAction[]> {\n const fs = await getFs();\n if (!fs.existsSync(actionsDir)) return [];\n\n const files = fs.readdirSync(actionsDir).filter((f) => {\n if (!isRuntimeSourceFile(f)) return false;\n const name = f.replace(/\\.(ts|js)$/, \"\");\n if (name.startsWith(\"_\")) return false;\n if (SKIP_ACTION_FILES.has(name)) return false;\n return true;\n });\n\n const out: DiscoveredAction[] = [];\n for (const file of files) {\n const name = file.replace(/\\.(ts|js)$/, \"\");\n const absPath = path.join(actionsDir, file);\n\n // Only mount actions that use defineAction. CLI-style scripts\n // (export default async function()) often use Node-only APIs\n // (fs, path) that can't run on edge runtimes — they're meant\n // to be invoked via `pnpm action <name>`, not as HTTP endpoints.\n let content: string;\n try {\n content = fs.readFileSync(absPath, \"utf-8\");\n } catch {\n continue;\n }\n if (!content.includes(\"defineAction\")) continue;\n\n const http = parseActionHttpConfig(content);\n if (http === false) continue; // agent-only\n\n out.push({\n name,\n absPath,\n method: http.method,\n ...(http.path ? { path: http.path } : {}),\n });\n }\n\n return out;\n}\n\n/**\n * Discover action files in the actions/ directory.\n *\n * When a workspace core is present in the ancestor chain, its actions/\n * directory is also scanned and its actions are merged in after the\n * template's — with template actions winning on name collision.\n *\n * These become `/_agent-native/actions/:name` HTTP endpoints.\n */\nexport async function discoverActionFiles(\n cwd: string,\n): Promise<DiscoveredAction[]> {\n const templateActions = await scanActionsDir(path.join(cwd, \"actions\"));\n const byName = new Map<string, DiscoveredAction>();\n for (const a of templateActions) byName.set(a.name, a);\n\n // Merge workspace-core actions (template wins on collision).\n try {\n const { getWorkspaceCoreExports } = await import(\"./workspace-core.js\");\n const ws = await getWorkspaceCoreExports(cwd);\n if (ws && ws.actionsDir) {\n const wsActions = await scanActionsDir(ws.actionsDir);\n for (const a of wsActions) {\n if (!byName.has(a.name)) byName.set(a.name, a);\n }\n }\n } catch {\n // Edge runtime / no fs — skip workspace-core merge.\n }\n\n return Array.from(byName.values());\n}\n\n/**\n * Returns the stems of default plugins that are missing from the project.\n */\nexport async function getMissingDefaultPlugins(cwd: string): Promise<string[]> {\n let existingStems: Set<string>;\n try {\n const fs = await getFs();\n const pluginsDir = path.join(cwd, \"server/plugins\");\n existingStems = new Set(\n fs.existsSync(pluginsDir)\n ? fs\n .readdirSync(pluginsDir)\n .filter(isRuntimeSourceFile)\n .map((f) => path.basename(f, path.extname(f)))\n : [],\n );\n } catch {\n existingStems = new Set(); // Edge runtime — all defaults will be auto-mounted\n }\n return Object.keys(DEFAULT_PLUGIN_REGISTRY).filter(\n (stem) => !existingStems.has(stem),\n );\n}\n"]}
|
|
@@ -52,8 +52,8 @@ export declare function handleDeleteResource(event: any): Promise<{
|
|
|
52
52
|
error: string;
|
|
53
53
|
ok?: undefined;
|
|
54
54
|
} | {
|
|
55
|
-
ok: boolean;
|
|
56
55
|
error?: undefined;
|
|
56
|
+
ok: boolean;
|
|
57
57
|
}>;
|
|
58
58
|
/** POST /_agent-native/resources/upload — upload a file as a resource */
|
|
59
59
|
export declare function handleUploadResource(event: any): Promise<import("./store.js").Resource | {
|
|
@@ -73,9 +73,9 @@ export declare function handleUploadResource(event: any): Promise<import("./stor
|
|
|
73
73
|
runId: string | null;
|
|
74
74
|
expiresAt: number | null;
|
|
75
75
|
metadata: string | null;
|
|
76
|
+
error?: undefined;
|
|
76
77
|
url: string;
|
|
77
78
|
provider: string;
|
|
78
|
-
error?: undefined;
|
|
79
79
|
}>;
|
|
80
80
|
export {};
|
|
81
81
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
2
|
+
export { createAgentChatPlugin, defaultAgentChatPlugin, refreshGlobalMcpManager, type AgentChatPluginOptions, } from "./agent-chat-plugin.js";
|
|
3
|
+
export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
|
|
4
|
+
export { createCoreRoutesPlugin, defaultCoreRoutesPlugin, FRAMEWORK_ROUTE_PREFIX, type CoreRoutesPluginOptions, } from "./core-routes-plugin.js";
|
|
5
|
+
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, emailAdapter, type PlatformAdapter, type IncomingMessage, type OutgoingMessage, type IntegrationStatus, type IntegrationsPluginOptions, } from "../integrations/index.js";
|
|
6
|
+
export { createObservationalMemoryPlugin, defaultObservationalMemoryPlugin, } from "../agent/observational-memory/plugin.js";
|
|
7
|
+
export { createOnboardingPlugin, defaultOnboardingPlugin, } from "../onboarding/plugin.js";
|
|
8
|
+
export { createOrgPlugin, defaultOrgPlugin } from "../org/plugin.js";
|
|
9
|
+
export { createResourcesPlugin, defaultResourcesPlugin, } from "./resources-plugin.js";
|
|
10
|
+
export { getH3App, awaitBootstrap, markDefaultPluginProvided, type H3AppShim, } from "./framework-request-handler.js";
|
|
11
|
+
//# sourceMappingURL=edge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/server/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,cAAc,EACd,yBAAyB,EACzB,KAAK,SAAS,GACf,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
2
|
+
export { createAgentChatPlugin, defaultAgentChatPlugin, refreshGlobalMcpManager, } from "./agent-chat-plugin.js";
|
|
3
|
+
export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
|
|
4
|
+
export { createCoreRoutesPlugin, defaultCoreRoutesPlugin, FRAMEWORK_ROUTE_PREFIX, } from "./core-routes-plugin.js";
|
|
5
|
+
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, emailAdapter, } from "../integrations/index.js";
|
|
6
|
+
export { createObservationalMemoryPlugin, defaultObservationalMemoryPlugin, } from "../agent/observational-memory/plugin.js";
|
|
7
|
+
export { createOnboardingPlugin, defaultOnboardingPlugin, } from "../onboarding/plugin.js";
|
|
8
|
+
export { createOrgPlugin, defaultOrgPlugin } from "../org/plugin.js";
|
|
9
|
+
export { createResourcesPlugin, defaultResourcesPlugin, } from "./resources-plugin.js";
|
|
10
|
+
export { getH3App, awaitBootstrap, markDefaultPluginProvided, } from "./framework-request-handler.js";
|
|
11
|
+
//# sourceMappingURL=edge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/server/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,GAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,GAMb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,cAAc,EACd,yBAAyB,GAE1B,MAAM,gCAAgC,CAAC","sourcesContent":["export { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n refreshGlobalMcpManager,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n emailAdapter,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n} from \"../integrations/index.js\";\nexport {\n createObservationalMemoryPlugin,\n defaultObservationalMemoryPlugin,\n} from \"../agent/observational-memory/plugin.js\";\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\n"]}
|
|
@@ -41,6 +41,99 @@
|
|
|
41
41
|
zoom-in/out, slide-in-from-*, spin-in, etc.). */
|
|
42
42
|
@import "tw-animate-css";
|
|
43
43
|
|
|
44
|
+
/* Shared shell depth.
|
|
45
|
+
Use these classes on app layouts that have a persistent left nav:
|
|
46
|
+
|
|
47
|
+
<div className="agent-layout-shell ...">
|
|
48
|
+
<aside className="agent-layout-left-drawer ...">...</aside>
|
|
49
|
+
<main className="agent-layout-main-surface ...">...</main>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
AgentSidebar applies the same classes internally for the right agent drawer. */
|
|
53
|
+
.agent-sidebar-shell,
|
|
54
|
+
.agent-layout-shell {
|
|
55
|
+
--agent-native-lower-surface: hsl(
|
|
56
|
+
var(--sidebar-background, var(--background))
|
|
57
|
+
);
|
|
58
|
+
--agent-native-raised-radius: 18px;
|
|
59
|
+
--agent-native-raised-shadow-left: -12px 0 28px rgb(0 0 0 / 0.1);
|
|
60
|
+
--agent-native-raised-shadow-right: 12px 0 28px rgb(0 0 0 / 0.1);
|
|
61
|
+
background: var(--agent-native-lower-surface);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@supports (background: color-mix(in srgb, white, black)) {
|
|
65
|
+
.agent-sidebar-shell,
|
|
66
|
+
.agent-layout-shell {
|
|
67
|
+
--agent-native-lower-surface: color-mix(
|
|
68
|
+
in srgb,
|
|
69
|
+
hsl(var(--sidebar-background, var(--background))) 94%,
|
|
70
|
+
black
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dark .agent-sidebar-shell,
|
|
75
|
+
.dark .agent-layout-shell,
|
|
76
|
+
.dark.agent-sidebar-shell,
|
|
77
|
+
.dark.agent-layout-shell {
|
|
78
|
+
--agent-native-lower-surface: color-mix(
|
|
79
|
+
in srgb,
|
|
80
|
+
hsl(var(--sidebar-background, var(--background))) 86%,
|
|
81
|
+
black
|
|
82
|
+
);
|
|
83
|
+
--agent-native-raised-shadow-left: -14px 0 32px rgb(0 0 0 / 0.22);
|
|
84
|
+
--agent-native-raised-shadow-right: 14px 0 32px rgb(0 0 0 / 0.22);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.agent-layout-left-drawer,
|
|
89
|
+
.agent-sidebar-panel[data-agent-sidebar-layout="desktop"],
|
|
90
|
+
.agent-sidebar-panel[data-agent-sidebar-layout="mobile"] {
|
|
91
|
+
background: var(--agent-native-lower-surface);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.agent-layout-left-drawer {
|
|
95
|
+
background: var(--agent-native-lower-surface) !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.agent-layout-left-drawer .bg-sidebar {
|
|
99
|
+
background: var(--agent-native-lower-surface) !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.agent-sidebar-panel > .agent-sidebar-panel-inner {
|
|
103
|
+
background: inherit;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.agent-layout-main-surface,
|
|
107
|
+
.agent-sidebar-main-surface {
|
|
108
|
+
position: relative;
|
|
109
|
+
z-index: 1;
|
|
110
|
+
background: hsl(var(--background));
|
|
111
|
+
transition:
|
|
112
|
+
border-radius 260ms cubic-bezier(0.32, 0.72, 0, 1),
|
|
113
|
+
box-shadow 260ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (min-width: 768px) {
|
|
117
|
+
.agent-layout-main-surface,
|
|
118
|
+
.agent-layout-shell > .agent-sidebar-shell {
|
|
119
|
+
border-start-start-radius: var(--agent-native-raised-radius);
|
|
120
|
+
border-end-start-radius: var(--agent-native-raised-radius);
|
|
121
|
+
box-shadow: var(--agent-native-raised-shadow-left);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.agent-sidebar-main-surface[data-agent-sidebar-main-state="open"][data-agent-sidebar-main-position="right"] {
|
|
125
|
+
border-start-end-radius: var(--agent-native-raised-radius);
|
|
126
|
+
border-end-end-radius: var(--agent-native-raised-radius);
|
|
127
|
+
box-shadow: var(--agent-native-raised-shadow-right);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.agent-sidebar-main-surface[data-agent-sidebar-main-state="open"][data-agent-sidebar-main-position="left"] {
|
|
131
|
+
border-start-start-radius: var(--agent-native-raised-radius);
|
|
132
|
+
border-end-start-radius: var(--agent-native-raised-radius);
|
|
133
|
+
box-shadow: var(--agent-native-raised-shadow-left);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
44
137
|
/* Shared agent sidebar entry/exit transitions.
|
|
45
138
|
`@starting-style` gives newly-mounted panels a real before-change style, so
|
|
46
139
|
opening animates in as reliably as closing animates out. */
|
|
@@ -4,7 +4,7 @@ const messages = {
|
|
|
4
4
|
settingsDescription: "語言和代理偏好設定",
|
|
5
5
|
title: "你的應用正在執行",
|
|
6
6
|
intro: "從編輯這裡開始建置",
|
|
7
|
-
actionCardTitle: "
|
|
7
|
+
actionCardTitle: "由操作支援的資料",
|
|
8
8
|
loadingAction: "正在載入操作結果...",
|
|
9
9
|
docsTitle: "檔案",
|
|
10
10
|
docsDescription: "了解框架",
|
|
@@ -25,7 +25,7 @@ const messages = {
|
|
|
25
25
|
workspaceDescription: "管理團隊存取和共用工作區資源。",
|
|
26
26
|
openTeamSettings: "開啟團隊設定",
|
|
27
27
|
openResourceSettings: "開啟資源設定",
|
|
28
|
-
backHome: "
|
|
28
|
+
backHome: "返回首頁",
|
|
29
29
|
},
|
|
30
30
|
dispatch: {
|
|
31
31
|
nav: {
|
|
@@ -40,10 +40,10 @@ const messages = {
|
|
|
40
40
|
messaging: "Messaging",
|
|
41
41
|
destinations: "Destinations",
|
|
42
42
|
identities: "Identities",
|
|
43
|
-
approvals: "
|
|
43
|
+
approvals: "核准",
|
|
44
44
|
audit: "Audit",
|
|
45
45
|
dreams: "Dreams",
|
|
46
|
-
threadDebug: "
|
|
46
|
+
threadDebug: "對話串偵錯",
|
|
47
47
|
settings: "設定",
|
|
48
48
|
team: "團隊",
|
|
49
49
|
operations: "Operations",
|
|
@@ -56,13 +56,13 @@ const messages = {
|
|
|
56
56
|
chats: "聊天",
|
|
57
57
|
newChat: "新聊天",
|
|
58
58
|
newDispatchChat: "新 Dispatch 聊天",
|
|
59
|
-
renameChat: "
|
|
59
|
+
renameChat: "重新命名聊天",
|
|
60
60
|
renameThread: "重新命名 {{title}}",
|
|
61
61
|
chatOptions: "{{title}} 的聊天選項",
|
|
62
62
|
aboutPage: "關於 {{title}}",
|
|
63
63
|
emptyAgentText: "建立應用程式、管理保管庫金鑰以及在工作區中路由工作。",
|
|
64
64
|
suggestionBuildApp: "為 X 建置工作區應用程式",
|
|
65
|
-
suggestionRouteSlack: "
|
|
65
|
+
suggestionRouteSlack: "路由 Slack 提及我的分析應用程式",
|
|
66
66
|
suggestionGrantKey: "將我的 OpenAI 金鑰授予此應用程式",
|
|
67
67
|
},
|
|
68
68
|
pages: {
|
|
@@ -85,20 +85,20 @@ const messages = {
|
|
|
85
85
|
workspaceAppDescription:
|
|
86
86
|
"開啟已部署的應用程式或檢查正在建立的應用程式的狀態。",
|
|
87
87
|
pageNotFound: "頁面未找到",
|
|
88
|
-
pageNotFoundDescription: "
|
|
88
|
+
pageNotFoundDescription: "該路由尚未出現在工作區應用程式清單中。",
|
|
89
89
|
browseApps: "瀏覽應用程式",
|
|
90
90
|
newApp: "新應用程式",
|
|
91
91
|
newAppDescription: "根據提示建立工作區應用程式並應用工作區保管庫策略。",
|
|
92
92
|
destinationsDescription:
|
|
93
|
-
"已儲存出站 Slack 頻道、Telegram
|
|
93
|
+
"已儲存出站 Slack 頻道、Telegram 聊天和對話串目標。",
|
|
94
94
|
savedDestinations: "已儲存的目的地",
|
|
95
95
|
addDestination: "新增目的地",
|
|
96
96
|
quickTestMessage: "快速測試訊息",
|
|
97
|
-
send: "
|
|
97
|
+
send: "傳送",
|
|
98
98
|
delete: "刪除",
|
|
99
99
|
cancel: "取消",
|
|
100
|
-
messageSent: "
|
|
101
|
-
unableToSendMessage: "
|
|
100
|
+
messageSent: "訊息已傳送",
|
|
101
|
+
unableToSendMessage: "無法傳送訊息",
|
|
102
102
|
destinationSaved: "目的地已儲存",
|
|
103
103
|
destinationRemoved: "目的地已刪除",
|
|
104
104
|
deleteDestinationTitle: "刪除目的地?",
|
|
@@ -107,8 +107,8 @@ const messages = {
|
|
|
107
107
|
noDestinations:
|
|
108
108
|
"尚未儲存目的地。在右側新增您的第一個 Slack 頻道或 Telegram 聊天。",
|
|
109
109
|
dailyDigestChannel: "每日摘要頻道",
|
|
110
|
-
optionalThreadOrTopicId: "
|
|
111
|
-
destinationNotes: "
|
|
110
|
+
optionalThreadOrTopicId: "可選對話串或主題 ID",
|
|
111
|
+
destinationNotes: "這個目的地應該用來做什麼?",
|
|
112
112
|
saveDestination: "儲存目的地",
|
|
113
113
|
noWorkspaceApps: "還沒有工作區應用程式",
|
|
114
114
|
noWorkspaceAppsDescription:
|
|
@@ -124,19 +124,19 @@ const messages = {
|
|
|
124
124
|
openApp: "開啟應用程式",
|
|
125
125
|
notDispatchOrWorkspaceApp: "此工作區中的 Dispatch 分頁或工作區應用程式。",
|
|
126
126
|
agentsDescription:
|
|
127
|
-
"預設情況下,Dispatch
|
|
127
|
+
"預設情況下,Dispatch 可以透過 A2A 委托給內建應用程式套件。僅當您想要將工作路由到該內建集之外的應用程式時,才在此處新增額外的代理。",
|
|
128
128
|
mcpAccessUpdated: "MCP 應用程式存取已更新",
|
|
129
129
|
selectAppForMcp: "至少選取一個應用程式,或公開所有應用程式。",
|
|
130
130
|
mcpUrlCopied: "MCP URL 已複製",
|
|
131
131
|
mcpUrlCopyFailed: "無法複製 MCP URL",
|
|
132
|
-
unifiedMcpGateway: "統一MCP
|
|
132
|
+
unifiedMcpGateway: "統一 MCP 閘道",
|
|
133
133
|
unifiedMcpGatewayDescription:
|
|
134
|
-
"將外部代理連線到 Dispatch
|
|
134
|
+
"將外部代理連線到 Dispatch 一次,然後透過以下方式路由到授權的工作區應用程式",
|
|
135
135
|
allApps: "所有應用程式",
|
|
136
136
|
selectedApps: "選定的應用程式",
|
|
137
137
|
loading: "Loading",
|
|
138
138
|
grantedCount: "已授權 {{count}} 個",
|
|
139
|
-
exposeAllAppsMcp: "
|
|
139
|
+
exposeAllAppsMcp: "透過 Dispatch MCP 暴露所有應用",
|
|
140
140
|
copyUrl: "複製 URL",
|
|
141
141
|
metricsUnavailable: "指標不可用",
|
|
142
142
|
unableToLoadUsage: "無法載入使用情況。",
|
|
@@ -158,7 +158,7 @@ const messages = {
|
|
|
158
158
|
downloadDesktop: "下載桌面",
|
|
159
159
|
chatMode: "聊天模式",
|
|
160
160
|
chat: "聊天",
|
|
161
|
-
cliTerminalMode: "CLI端子方式",
|
|
161
|
+
cliTerminalMode: "CLI 端子方式",
|
|
162
162
|
cli: "CLI",
|
|
163
163
|
workspaceMode: "工作區檔案、代理、技能和工作",
|
|
164
164
|
workspace: "工作區",
|
|
@@ -170,7 +170,7 @@ const messages = {
|
|
|
170
170
|
allChats: "所有聊天紀錄",
|
|
171
171
|
settings: "設定",
|
|
172
172
|
feedback: "意見回饋",
|
|
173
|
-
exitFullscreen: "
|
|
173
|
+
exitFullscreen: "退出全螢幕",
|
|
174
174
|
fullscreen: "Fullscreen",
|
|
175
175
|
closeTab: "關閉分頁",
|
|
176
176
|
closeOtherTabs: "關閉其他標籤頁面",
|
|
@@ -193,7 +193,7 @@ const messages = {
|
|
|
193
193
|
done: "完成",
|
|
194
194
|
generalAccess: "一般存取",
|
|
195
195
|
shareLink: "分享連結",
|
|
196
|
-
addPeopleByEmail: "
|
|
196
|
+
addPeopleByEmail: "透過電子郵件新增人員",
|
|
197
197
|
notifyPeople: "通知人們",
|
|
198
198
|
peopleWithAccess: "有存取權限的人",
|
|
199
199
|
ownerRole: "Owner",
|
|
@@ -221,15 +221,15 @@ const messages = {
|
|
|
221
221
|
agentRuns: "代理執行",
|
|
222
222
|
activeRun_other: "{{count}} 個作用中的執行",
|
|
223
223
|
failedRun_other: "{{count}} 個失敗的執行",
|
|
224
|
-
recentRuns: "
|
|
225
|
-
noRecentRuns: "
|
|
224
|
+
recentRuns: "最近的執行",
|
|
225
|
+
noRecentRuns: "最近沒有執行",
|
|
226
226
|
ariaAgentRuns: "代理執行,{{label}}",
|
|
227
227
|
summaryRunning: "{{activeCount}} 個執行中",
|
|
228
228
|
summaryRunningRecent:
|
|
229
229
|
"{{activeCount}} 個執行中 · {{terminalCount}} 個最近項目",
|
|
230
230
|
summaryRecent_other: "{{count}} 個最近執行",
|
|
231
231
|
noTrackedWorkYet: "尚未跟蹤工作",
|
|
232
|
-
emptyDescription: "
|
|
232
|
+
emptyDescription: "背景代理工作在執行時和完成後將顯示在此處。",
|
|
233
233
|
open: "開啟",
|
|
234
234
|
stopRun: "停止 {{title}}",
|
|
235
235
|
hideRun: "隱藏 {{title}}",
|
|
@@ -255,10 +255,10 @@ const messages = {
|
|
|
255
255
|
subtitleWithFeature:
|
|
256
256
|
"「{{feature}}」會建立或修改原始碼,因此需要從此介面使用 Desktop 或 Builder。",
|
|
257
257
|
subtitle: "此操作建立或修改來源程式碼,需要此介面的 Desktop 或 Builder。",
|
|
258
|
-
desktopTitle: "使用Agent Native桌面",
|
|
258
|
+
desktopTitle: "使用 Agent Native 桌面",
|
|
259
259
|
desktopDescription:
|
|
260
260
|
"在桌面應用程式中開啟專案以啟用來源程式碼編輯和 CLI 存取。",
|
|
261
|
-
builderAgentTitle: "使用Builder.io代理",
|
|
261
|
+
builderAgentTitle: "使用 Builder.io 代理",
|
|
262
262
|
builderAgentDescription:
|
|
263
263
|
"讓我們的雲端代理為您進行更改。您將獲得預覽和部署的連結。",
|
|
264
264
|
codeChangeTitle: "這需要更改程式碼",
|
|
@@ -274,17 +274,17 @@ const messages = {
|
|
|
274
274
|
createPrompt: "建立擴充功能:{{prompt}}",
|
|
275
275
|
createWidgetPrompt:
|
|
276
276
|
"建立一個適合「{{slotId}}」插槽的新小工具。我接著會描述它應該做什麼。",
|
|
277
|
-
whatShouldItDo: "
|
|
278
|
-
createPlaceholder: "
|
|
277
|
+
whatShouldItDo: "它應該做什麼?",
|
|
278
|
+
createPlaceholder: "待辦事項清單、API 儀表板、計算器...",
|
|
279
279
|
backToApp: "返回應用程式",
|
|
280
280
|
title: "擴充功能",
|
|
281
281
|
hiddenShown: "顯示隱藏",
|
|
282
282
|
showHidden: "顯示隱藏項",
|
|
283
283
|
newExtension: "新擴充功能",
|
|
284
284
|
newExtensionTitle: "新擴充功能",
|
|
285
|
-
buildPlaceholder: "
|
|
285
|
+
buildPlaceholder: "描述您想要建置什麼...",
|
|
286
286
|
namePlaceholder: "我的擴充功能",
|
|
287
|
-
descriptionPlaceholder: "
|
|
287
|
+
descriptionPlaceholder: "這個擴充功能有什麼作用?",
|
|
288
288
|
contentPlaceholder: "<html>...</html>",
|
|
289
289
|
emptyTitle: "建立您的第一個擴充功能",
|
|
290
290
|
emptyDescription: "描述一個小應用程式,代理將建置它。",
|
|
@@ -298,26 +298,26 @@ const messages = {
|
|
|
298
298
|
deleteQuestion: "要刪除 {{name}} 嗎?",
|
|
299
299
|
removeQuestion: "要移除 {{name}} 嗎?",
|
|
300
300
|
hideForYouDescription:
|
|
301
|
-
"
|
|
301
|
+
"這會將其從您的擴充功能清單中隱藏,而不會為其他任何人刪除它。",
|
|
302
302
|
removeEverywhereDescription: "這會在共用的所有地方刪除它。",
|
|
303
303
|
cancel: "取消",
|
|
304
304
|
remove: "移除",
|
|
305
305
|
removing: "正在刪除...",
|
|
306
306
|
delete: "刪除",
|
|
307
307
|
deleting: "正在刪除...",
|
|
308
|
-
openFullView: "
|
|
309
|
-
removeFromWidgetArea: "
|
|
308
|
+
openFullView: "開啟全檢視",
|
|
309
|
+
removeFromWidgetArea: "從此小工具區域中刪除",
|
|
310
310
|
deleteExtensionEllipsis: "刪除擴充功能...",
|
|
311
|
-
removeFromMyListEllipsis: "
|
|
311
|
+
removeFromMyListEllipsis: "從我的清單中刪除...",
|
|
312
312
|
removeFromWidgetAreaForMe: "從這個小工具區域移除(只套用於我)",
|
|
313
313
|
deleteEverywhereConfirmation: "這會刪除所有與之共用的每個人的擴充功能。",
|
|
314
|
-
addWidget: "
|
|
314
|
+
addWidget: "新增小工具",
|
|
315
315
|
loading: "正在載入...",
|
|
316
|
-
noWidgetsAvailable: "
|
|
317
|
-
buildNewWidget: "
|
|
318
|
-
contactSidebarWidget: "
|
|
319
|
-
contactSidebarDescription: "
|
|
320
|
-
addWidgetHere: "
|
|
316
|
+
noWidgetsAvailable: "此插槽尚無可用的小工具。",
|
|
317
|
+
buildNewWidget: "建置一個新的小工具",
|
|
318
|
+
contactSidebarWidget: "聯絡側邊欄小工具",
|
|
319
|
+
contactSidebarDescription: "顯示在目前對話旁邊,包含聯絡人和對話串脈絡。",
|
|
320
|
+
addWidgetHere: "在這裡新增小工具",
|
|
321
321
|
back: "返回",
|
|
322
322
|
editExtension: "編輯擴充功能名",
|
|
323
323
|
saving: "正在儲存...",
|
|
@@ -325,7 +325,7 @@ const messages = {
|
|
|
325
325
|
create: "建立",
|
|
326
326
|
moreOptions: "更多選取",
|
|
327
327
|
appearsIn: "出現在",
|
|
328
|
-
noWidgetAreas: "
|
|
328
|
+
noWidgetAreas: "未安裝在任何小工具區域。請代理將其新增到某處。",
|
|
329
329
|
widgetAreaCount_other: "此擴充功能可在 {{count}} 個小工具區域中呈現。",
|
|
330
330
|
nameLabel: "名稱",
|
|
331
331
|
descriptionLabel: "描述",
|
|
@@ -388,7 +388,7 @@ const messages = {
|
|
|
388
388
|
agentEngineRequired: "需要代理引擎",
|
|
389
389
|
agentEngineDescription:
|
|
390
390
|
"請先連線 Builder.io 或 LLM 金鑰,{{platform}} 才能回覆。",
|
|
391
|
-
openLlm: "開啟LLM",
|
|
391
|
+
openLlm: "開啟 LLM",
|
|
392
392
|
setup: "Setup",
|
|
393
393
|
shareDocumentsWith: "與以下人員共用檔案",
|
|
394
394
|
copyServiceAccountEmail: "複製服務帳戶電子郵件",
|
|
@@ -424,7 +424,7 @@ const messages = {
|
|
|
424
424
|
tools: "工具",
|
|
425
425
|
time: "Time",
|
|
426
426
|
failedCount: "({{count}} 個失敗)",
|
|
427
|
-
backToList: "
|
|
427
|
+
backToList: "返回清單",
|
|
428
428
|
spans: "Spans",
|
|
429
429
|
type: "型別",
|
|
430
430
|
name: "名稱",
|
|
@@ -457,9 +457,9 @@ const messages = {
|
|
|
457
457
|
genericTitle: "出了點問題",
|
|
458
458
|
genericDetails: "發生了意外錯誤。",
|
|
459
459
|
notFoundTitle: "頁面未找到",
|
|
460
|
-
notFoundDetails: "
|
|
460
|
+
notFoundDetails: "此頁面不存在。它可能已被移動或刪除。",
|
|
461
461
|
statusTitle: "{{status}} 錯誤",
|
|
462
|
-
goHome: "
|
|
462
|
+
goHome: "返回首頁",
|
|
463
463
|
},
|
|
464
464
|
};
|
|
465
465
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/vite/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAa,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAiB1D,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,kCAAkC,CAAC;AAiQ1C;;;;;GAKG;AACH,iBAAS,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAgE9C;AAED;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkCvD;AAOD;;;;;GAKG;AACH,iBAAS,qBAAqB,CAC5B,GAAG,EAAE,MAAM,GACV,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAc9C;AAoCD,iBAAS,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAmNrD;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/vite/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAa,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAiB1D,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,kCAAkC,CAAC;AAiQ1C;;;;;GAKG;AACH,iBAAS,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAgE9C;AAED;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkCvD;AAOD;;;;;GAKG;AACH,iBAAS,qBAAqB,CAC5B,GAAG,EAAE,MAAM,GACV,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAc9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;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,mBAAmB,EACnB,SAAS,GAAG,aAAa,CAC1B;IACC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAohBD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS,CAMpB;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAWT;AAsvBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,OAAO,GAAE,4BAAiC,GACzC,MAAM,EAAE,CAcV;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,UAAU,CAU1E;AAED,OAAO,EACL,eAAe,IAAI,gBAAgB,EACnC,sBAAsB,IAAI,uBAAuB,EACjD,mBAAmB,IAAI,oBAAoB,EAC3C,qBAAqB,IAAI,sBAAsB,GAChD,CAAC"}
|
package/dist/vite/client.js
CHANGED
|
@@ -626,6 +626,7 @@ function getCoreSourceAliases(cwd) {
|
|
|
626
626
|
const entries = {
|
|
627
627
|
"@agent-native/core": path.join(coreSrc, "index.browser.ts"),
|
|
628
628
|
"@agent-native/core/server": path.join(coreSrc, "server/index.ts"),
|
|
629
|
+
"@agent-native/core/server/edge": path.join(coreSrc, "server/edge.ts"),
|
|
629
630
|
"@agent-native/core/client": path.join(coreSrc, "client/index.ts"),
|
|
630
631
|
"@agent-native/core/client/chat": path.join(coreSrc, "client/chat/index.ts"),
|
|
631
632
|
"@agent-native/core/client/collab": path.join(coreSrc, "client/collab/index.ts"),
|