chat-js 1.0.0-alpha.2 → 1.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/index.js +2627 -2667
- package/package.json +10 -4
- package/templates/chat-app/.env.example +2 -8
- package/templates/chat-app/agent/agent.ts +8 -38
- package/templates/chat-app/agent/channels/eve.ts +37 -17
- package/templates/chat-app/agent/hooks/activity.ts +2 -1
- package/templates/chat-app/agent/hooks/billing.ts +11 -8
- package/templates/chat-app/agent/hooks/conversation.ts +2 -2
- package/templates/chat-app/agent/hooks/tool-selection.ts +7 -1
- package/templates/chat-app/agent/instructions/chat.ts +14 -10
- package/templates/chat-app/agent/sandbox.ts +2 -4
- package/templates/chat-app/agent/tools/installed.ts +19 -1
- package/templates/chat-app/app/(chat)/layout.tsx +10 -8
- package/templates/chat-app/app/api/agent-conversations/[id]/route.test.ts +1 -1
- package/templates/chat-app/app/api/agent-conversations/[id]/route.ts +1 -5
- package/templates/chat-app/app/api/agent-conversations/route.test.ts +31 -2
- package/templates/chat-app/app/api/agent-conversations/route.ts +10 -1
- package/templates/chat-app/app/api/agent-workspaces/[id]/route.test.ts +5 -31
- package/templates/chat-app/app/api/agent-workspaces/[id]/route.ts +2 -10
- package/templates/chat-app/app/api/eve/[...path]/route.test.ts +2 -2
- package/templates/chat-app/app/apple-icon.png +0 -0
- package/templates/chat-app/app/favicon.ico +0 -0
- package/templates/chat-app/app/icon.svg +1 -3
- package/templates/chat-app/app/opengraph-image.alt.txt +1 -0
- package/templates/chat-app/app/opengraph-image.png +0 -0
- package/templates/chat-app/chat.config.ts +0 -18
- package/templates/chat-app/chatjs/core/chat/compose.ts +35 -11
- package/templates/chat-app/chatjs/core/chat/contracts.ts +6 -0
- package/templates/chat-app/chatjs/core/installation/contracts.ts +1 -4
- package/templates/chat-app/chatjs/core/session/contracts.ts +19 -4
- package/templates/chat-app/chatjs/generated/composer-tools.ts +5 -12
- package/templates/chat-app/chatjs/generated/installed-chat-ui.ts +11 -5
- package/templates/chat-app/chatjs/generated/installed-config.ts +5 -13
- package/templates/chat-app/chatjs/generated/installed-instrumentation.ts +1 -2
- package/templates/chat-app/chatjs/generated/installed-layout.ts +1 -7
- package/templates/chat-app/chatjs/generated/installed-tools.ts +3 -3
- package/templates/chat-app/chatjs/generated/installed.ts +3 -3
- package/templates/chat-app/chatjs/generated/providers.ts +5 -11
- package/templates/chat-app/chatjs/generated/tool-availability.ts +3 -7
- package/templates/chat-app/chatjs/generated/tool-definitions.ts +3 -4
- package/templates/chat-app/chatjs/generated/tool-requirements.ts +40 -0
- package/templates/chat-app/chatjs/generated/tools.ts +7 -28
- package/templates/chat-app/chatjs/generated/ui.ts +3 -13
- package/templates/chat-app/chatjs/plugins/ai-titles/generate-title.ts +0 -2
- package/templates/chat-app/chatjs/plugins/attachment-uploads/chatjs.json +0 -1
- package/templates/chat-app/chatjs/plugins/guest-chat/session-profile.ts +2 -0
- package/templates/chat-app/chatjs/plugins/guest-chat/signed-out.tsx +70 -34
- package/templates/chat-app/chatjs/plugins/image-viewer/chatjs.json +17 -0
- package/templates/chat-app/chatjs/plugins/image-viewer/client-plugin.ts +9 -0
- package/templates/chat-app/{components → chatjs/plugins/image-viewer}/image-modal.tsx +3 -87
- package/templates/chat-app/chatjs/plugins/image-viewer/viewer-action.tsx +47 -0
- package/templates/chat-app/chatjs/plugins/mcp/composer.tsx +1 -6
- package/templates/chat-app/chatjs/plugins/projects/ui/chat-contributions.tsx +22 -2
- package/templates/chat-app/chatjs/plugins/projects/ui/sidebar-project-item.tsx +48 -33
- package/templates/chat-app/chatjs/plugins/projects/ui/sidebar-projects.tsx +41 -22
- package/templates/chat-app/chatjs/plugins/search/chat.ts +4 -0
- package/templates/chat-app/chatjs/plugins/search/search-chats.tsx +9 -3
- package/templates/chat-app/chatjs/plugins/search/search-hook.ts +5 -6
- package/templates/chat-app/chatjs/plugins/search/search-results-view.tsx +1 -1
- package/templates/chat-app/chatjs/plugins/search/search-text.ts +21 -15
- package/templates/chat-app/chatjs/plugins/search/sidebar-item.tsx +7 -1
- package/templates/chat-app/chatjs/plugins/sharing/ui/share-button.tsx +13 -3
- package/templates/chat-app/chatjs/plugins/sharing/ui/shared-page.tsx +23 -39
- package/templates/chat-app/chatjs/plugins/sharing/ui/transcript-messages.tsx +2 -2
- package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/chatjs.json +18 -0
- package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/client-plugin.ts +9 -0
- package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/load.ts +120 -0
- package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/preview.tsx +72 -0
- package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/viewer-action.tsx +97 -0
- package/templates/chat-app/chatjs/plugins/video-viewer/chatjs.json +16 -0
- package/templates/chat-app/chatjs/plugins/video-viewer/client-plugin.ts +9 -0
- package/templates/chat-app/chatjs/plugins/video-viewer/viewer-action.tsx +64 -0
- package/templates/chat-app/chatjs/tools/_shared/lib/define-tool-renderer.test.ts +16 -22
- package/templates/chat-app/chatjs/tools/attach-workspace-file/attach-conversation-file.ts +34 -0
- package/templates/chat-app/chatjs/tools/attach-workspace-file/attach.ts +106 -0
- package/templates/chat-app/chatjs/tools/attach-workspace-file/chatjs.json +19 -0
- package/templates/chat-app/chatjs/tools/attach-workspace-file/import.ts +71 -0
- package/templates/chat-app/chatjs/tools/attach-workspace-file/renderer.tsx +19 -0
- package/templates/chat-app/chatjs/tools/attach-workspace-file/schemas.ts +51 -0
- package/templates/chat-app/chatjs/tools/attach-workspace-file/tool.ts +62 -0
- package/templates/chat-app/chatjs/tools/deep-research/chatjs.json +18 -4
- package/templates/chat-app/chatjs/tools/deep-research/progress-panel.tsx +2 -31
- package/templates/chat-app/chatjs/tools/deep-research/renderer.tsx +7 -19
- package/templates/chat-app/chatjs/tools/deep-research/schemas.ts +1 -46
- package/templates/chat-app/chatjs/tools/deep-research/task.tsx +0 -41
- package/templates/chat-app/chatjs/tools/deep-research/tasks.tsx +2 -7
- package/templates/chat-app/chatjs/tools/generate-image/chatjs.json +4 -1
- package/templates/chat-app/chatjs/tools/generate-image/image-generation.ts +0 -1
- package/templates/chat-app/chatjs/tools/generate-image/renderer.tsx +39 -51
- package/templates/chat-app/chatjs/tools/generate-video/chatjs.json +4 -1
- package/templates/chat-app/chatjs/tools/generate-video/renderer.tsx +22 -11
- package/templates/chat-app/components/ai-elements/response.tsx +1 -1
- package/templates/chat-app/components/app-sidebar.tsx +26 -86
- package/templates/chat-app/components/artifact-actions.tsx +19 -0
- package/templates/chat-app/components/artifact-download-action.tsx +59 -0
- package/templates/chat-app/components/attachment-card.tsx +15 -9
- package/templates/chat-app/components/chat/chat-account.tsx +189 -0
- package/templates/chat-app/components/{controlled-chat-composer.tsx → chat/chat-composer.tsx} +6 -6
- package/templates/chat-app/components/chat/chat-conversation-screen.tsx +75 -0
- package/templates/chat-app/components/chat/chat-conversation.tsx +35 -0
- package/templates/chat-app/components/chat/chat-header.tsx +52 -0
- package/templates/chat-app/components/chat/chat-message-editor.tsx +24 -0
- package/templates/chat-app/components/chat/chat-navigation.tsx +11 -0
- package/templates/chat-app/components/chat/chat-sidebar.tsx +134 -0
- package/templates/chat-app/components/{eve/eve-messages.tsx → chat/chat-transcript.tsx} +7 -28
- package/templates/chat-app/components/chat/chat-workspace.tsx +19 -0
- package/templates/chat-app/components/chat/connected-chat-sidebar.tsx +8 -0
- package/templates/chat-app/components/chat-header-view.tsx +14 -13
- package/templates/chat-app/components/chat-slots.tsx +13 -3
- package/templates/chat-app/components/composer/active-tool.tsx +3 -1
- package/templates/chat-app/components/composer/composer-menu.tsx +4 -2
- package/templates/chat-app/components/composer/control.ts +4 -1
- package/templates/chat-app/components/composer/prompt-form.tsx +1 -1
- package/templates/chat-app/components/composer/tool-availability.tsx +8 -0
- package/templates/chat-app/components/composer/tool-controls.tsx +17 -50
- package/templates/chat-app/components/composer/tool-display.ts +3 -2
- package/templates/chat-app/components/eve/bash-output.tsx +33 -0
- package/templates/chat-app/components/eve/eve-chat-page.tsx +5 -26
- package/templates/chat-app/components/eve/eve-composer.tsx +11 -8
- package/templates/chat-app/components/eve/eve-conversation.tsx +237 -309
- package/templates/chat-app/components/eve/eve-deletion-provider.tsx +1 -1
- package/templates/chat-app/components/eve/eve-history-list.tsx +7 -3
- package/templates/chat-app/components/eve/eve-message-part.tsx +28 -22
- package/templates/chat-app/components/eve/eve-pending-input.tsx +54 -1
- package/templates/chat-app/components/eve/eve-runtime-provider.tsx +0 -5
- package/templates/chat-app/components/eve/new-conversation-view.tsx +7 -3
- package/templates/chat-app/components/file-artifact-card.tsx +37 -0
- package/templates/chat-app/components/header-actions.tsx +9 -2
- package/templates/chat-app/components/image-actions.tsx +93 -0
- package/templates/chat-app/components/internal-link.tsx +15 -2
- package/templates/chat-app/components/keyboard-shortcuts.tsx +8 -2
- package/templates/chat-app/components/part/tool-activity.tsx +1 -1
- package/templates/chat-app/components/part/tool-data.tsx +1 -1
- package/templates/chat-app/components/sidebar-user-nav.tsx +35 -198
- package/templates/chat-app/components/video-player.tsx +43 -0
- package/templates/chat-app/composer-controls.ts +0 -4
- package/templates/chat-app/docs/guest-sessions.md +1 -1
- package/templates/chat-app/instrumentation.ts +2 -6
- package/templates/chat-app/integrations/chat/models.ts +10 -0
- package/templates/chat-app/integrations/tools/catalog.ts +0 -3
- package/templates/chat-app/lib/ai/app-models.test.ts +13 -1
- package/templates/chat-app/lib/ai/app-models.ts +13 -3
- package/templates/chat-app/lib/ai/tool-context.ts +1 -14
- package/templates/chat-app/lib/ai/tool-renderer-registry.ts +10 -5
- package/templates/chat-app/lib/db/eve-current-copy.ts +13 -95
- package/templates/chat-app/lib/db/eve-deletion.ts +2 -61
- package/templates/chat-app/lib/db/eve-dispatch.ts +64 -18
- package/templates/chat-app/lib/db/eve-file-purge.ts +11 -145
- package/templates/chat-app/lib/db/eve-files.ts +11 -9
- package/templates/chat-app/lib/db/eve-orphaned-files.ts +3 -22
- package/templates/chat-app/lib/db/eve-queries.ts +32 -16
- package/templates/chat-app/lib/db/eve-workspace-deletion.ts +149 -0
- package/templates/chat-app/lib/db/migrate.ts +30 -0
- package/templates/chat-app/lib/db/migrations/0024_abandoned_toxin.sql +67 -0
- package/templates/chat-app/lib/db/migrations/0025_cloudy_thunderbolt.sql +1 -0
- package/templates/chat-app/lib/db/migrations/0026_loving_mesmero.sql +3 -0
- package/templates/chat-app/lib/db/migrations/0027_misty_stephen_strange.sql +1 -0
- package/templates/chat-app/lib/db/migrations/0028_faithful_hannibal_king.sql +12 -0
- package/templates/chat-app/lib/db/migrations/meta/0024_snapshot.json +4119 -0
- package/templates/chat-app/lib/db/migrations/meta/0025_snapshot.json +3988 -0
- package/templates/chat-app/lib/db/migrations/meta/0026_snapshot.json +3686 -0
- package/templates/chat-app/lib/db/migrations/meta/0027_snapshot.json +3596 -0
- package/templates/chat-app/lib/db/migrations/meta/0028_snapshot.json +2554 -0
- package/templates/chat-app/lib/db/migrations/meta/_journal.json +35 -0
- package/templates/chat-app/lib/db/schema.ts +1 -360
- package/templates/chat-app/lib/env-schema.ts +0 -7
- package/templates/chat-app/lib/eve/application-model.ts +56 -0
- package/templates/chat-app/lib/eve/bash-result.ts +22 -0
- package/templates/chat-app/lib/eve/branch-history.test.ts +59 -0
- package/templates/chat-app/lib/eve/branch-history.ts +19 -0
- package/templates/chat-app/lib/eve/channel-files.test.ts +14 -11
- package/templates/chat-app/lib/eve/channel-files.ts +2 -12
- package/templates/chat-app/lib/eve/completed-copy-source.test.ts +81 -17
- package/templates/chat-app/lib/eve/completed-copy-source.ts +2 -6
- package/templates/chat-app/lib/eve/connection-options.ts +7 -7
- package/templates/chat-app/lib/eve/contracts.test.ts +1 -1
- package/templates/chat-app/lib/eve/copy-seed.test.ts +17 -28
- package/templates/chat-app/lib/eve/copy-seed.ts +8 -34
- package/templates/chat-app/lib/eve/copy-transcript.test.ts +143 -47
- package/templates/chat-app/lib/eve/copy-transcript.ts +20 -101
- package/templates/chat-app/lib/eve/create-conversation-operation.test.ts +11 -31
- package/templates/chat-app/lib/eve/create-conversation-operation.ts +0 -10
- package/templates/chat-app/lib/eve/delete-local-conversation.test.ts +12 -20
- package/templates/chat-app/lib/eve/delete-local-conversation.ts +2 -8
- package/templates/chat-app/lib/eve/environment.test.ts +7 -0
- package/templates/chat-app/lib/eve/environment.ts +11 -0
- package/templates/chat-app/lib/eve/execute-conversation-creation.ts +3 -55
- package/templates/chat-app/lib/eve/gateway-auth.test.ts +2 -21
- package/templates/chat-app/lib/eve/gateway-auth.ts +7 -13
- package/templates/chat-app/lib/eve/generated-files.test.ts +1 -1
- package/templates/chat-app/lib/eve/generated-files.ts +2 -2
- package/templates/chat-app/lib/eve/installed-tools.test.ts +16 -9
- package/templates/chat-app/lib/eve/lifecycle/postgres/compatibility.ts +8 -5
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-payload-purge.ts +6 -2
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-queue-fence.ts +2 -2
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-queue-inventory.ts +2 -2
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-queue-purge.ts +3 -2
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-resource-fence.ts +2 -8
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-run-inventory.ts +1 -1
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-stream-positions.ts +9 -4
- package/templates/chat-app/lib/eve/logical-chat.test.ts +4 -3
- package/templates/chat-app/lib/eve/logical-chat.ts +8 -8
- package/templates/chat-app/lib/eve/message-delivery.test.ts +1 -1
- package/templates/chat-app/lib/eve/message-display.test.ts +5 -5
- package/templates/chat-app/lib/eve/message-display.ts +31 -1
- package/templates/chat-app/lib/eve/message-tool-selection.test.ts +2 -2
- package/templates/chat-app/lib/eve/model-accounting.test.ts +28 -45
- package/templates/chat-app/lib/eve/model-accounting.ts +8 -54
- package/templates/chat-app/lib/eve/purge-files.ts +0 -13
- package/templates/chat-app/lib/eve/purge-local-resources.ts +4 -47
- package/templates/chat-app/lib/eve/readonly-message-types.ts +8 -3
- package/templates/chat-app/lib/eve/reconcile-workspace-turn.ts +2 -37
- package/templates/chat-app/lib/eve/response-group-lineage.test.ts +3 -3
- package/templates/chat-app/lib/eve/retire-session.test.ts +25 -8
- package/templates/chat-app/lib/eve/retire-session.ts +10 -4
- package/templates/chat-app/lib/eve/selected-tools.ts +7 -18
- package/templates/chat-app/lib/eve/server.test.ts +29 -3
- package/templates/chat-app/lib/eve/session-profile.test.ts +12 -9
- package/templates/chat-app/lib/eve/session-profile.ts +7 -4
- package/templates/chat-app/lib/eve/shared-messages.test.ts +3 -4
- package/templates/chat-app/lib/eve/shared-messages.ts +5 -2
- package/templates/chat-app/lib/eve/tool-accounting.test.ts +131 -0
- package/templates/chat-app/lib/eve/tool-accounting.ts +96 -0
- package/templates/chat-app/lib/eve/tool-availability.ts +4 -1
- package/templates/chat-app/lib/eve/tool-configuration.ts +29 -0
- package/templates/chat-app/lib/eve/tool-result.ts +1 -1
- package/templates/chat-app/lib/eve/turn-tools.ts +3 -12
- package/templates/chat-app/lib/eve/usage.test.ts +54 -39
- package/templates/chat-app/lib/eve/usage.ts +9 -1
- package/templates/chat-app/lib/eve/workspace-turn-evidence.test.ts +8 -6
- package/templates/chat-app/lib/eve/workspace-turn-evidence.ts +0 -5
- package/templates/chat-app/lib/required-credentials.test.ts +2 -2
- package/templates/chat-app/lib/tool-readiness.test.ts +69 -0
- package/templates/chat-app/lib/tool-readiness.ts +43 -0
- package/templates/chat-app/logo.svg +1 -1
- package/templates/chat-app/next.config.ts +1 -5
- package/templates/chat-app/oxlint.config.ts +3 -6
- package/templates/chat-app/package.json +4 -16
- package/templates/chat-app/providers/chat-models-provider.tsx +3 -3
- package/templates/chat-app/providers/default-model-provider.tsx +4 -4
- package/templates/chat-app/providers/session-context.ts +24 -0
- package/templates/chat-app/providers/session-provider.tsx +4 -21
- package/templates/chat-app/scripts/agent-status.ts +124 -0
- package/templates/chat-app/scripts/check-env.ts +0 -10
- package/templates/chat-app/scripts/dev-supervisor.mts +3 -30
- package/templates/chat-app/scripts/eve-setup.ts +3 -0
- package/templates/chat-app/tests/helpers/eve-dynamic-context.ts +2 -0
- package/templates/chat-app/tools/platform/research-updates-schema.ts +1 -20
- package/templates/chat-app/trpc/context.tsx +8 -0
- package/templates/chat-app/trpc/react.tsx +3 -4
- package/templates/chat-app/trpc/routers/eve.router.ts +2 -74
- package/templates/chat-app/vendor/workflow-world-postgres-5.1.1.tgz +0 -0
- package/templates/electron/icon.png +0 -0
- package/templates/electron/package.json +2 -1
- package/templates/electron/src/application.test.ts +347 -0
- package/templates/electron/src/application.ts +849 -0
- package/templates/electron/src/lib/auth-cookies.ts +1 -1
- package/templates/electron/src/main.test.ts +175 -0
- package/templates/electron/src/main.ts +5 -745
- package/templates/electron/src/squirrel-startup.ts +61 -0
- package/templates/chat-app/agent/hooks/persistent-sandbox.ts +0 -14
- package/templates/chat-app/app/api/agent-conversation-copies/route.test.ts +0 -190
- package/templates/chat-app/app/api/agent-conversation-copies/route.ts +0 -105
- package/templates/chat-app/chatjs/core/documents/compose-views.ts +0 -12
- package/templates/chat-app/chatjs/core/documents/contracts.ts +0 -91
- package/templates/chat-app/chatjs/core/documents/document-definition.test.ts +0 -60
- package/templates/chat-app/chatjs/core/documents/document-definition.ts +0 -55
- package/templates/chat-app/chatjs/core/documents/ui.ts +0 -67
- package/templates/chat-app/chatjs/generated/code-executor.ts +0 -6
- package/templates/chat-app/chatjs/generated/document-run.ts +0 -12
- package/templates/chat-app/chatjs/generated/document-ui.ts +0 -7
- package/templates/chat-app/chatjs/generated/documents.ts +0 -6
- package/templates/chat-app/chatjs/plugins/langfuse/chatjs.json +0 -14
- package/templates/chat-app/chatjs/plugins/langfuse/credentials.ts +0 -22
- package/templates/chat-app/chatjs/plugins/langfuse/instrumentation.ts +0 -22
- package/templates/chat-app/chatjs/plugins/langfuse/server-plugin.ts +0 -5
- package/templates/chat-app/chatjs/plugins/vercel-analytics/chatjs.json +0 -15
- package/templates/chat-app/chatjs/plugins/vercel-analytics/client-plugin.ts +0 -9
- package/templates/chat-app/chatjs/plugins/vercel-analytics/component.tsx +0 -5
- package/templates/chat-app/chatjs/plugins/vercel-speed-insights/chatjs.json +0 -15
- package/templates/chat-app/chatjs/plugins/vercel-speed-insights/client-plugin.ts +0 -9
- package/templates/chat-app/chatjs/plugins/vercel-speed-insights/component.tsx +0 -4
- package/templates/chat-app/chatjs/providers/sandbox/adapter.ts +0 -232
- package/templates/chat-app/chatjs/providers/sandbox/options.ts +0 -13
- package/templates/chat-app/chatjs/providers/sandbox/persistent.ts +0 -258
- package/templates/chat-app/chatjs/providers/sandbox/provider.ts +0 -27
- package/templates/chat-app/chatjs/providers/sandbox/vercel-sandbox-env.ts +0 -22
- package/templates/chat-app/chatjs/tools/_shared/code-execution/code-execution-chart.tsx +0 -83
- package/templates/chat-app/chatjs/tools/_shared/code-execution/interactive-chart-impl.tsx +0 -290
- package/templates/chat-app/chatjs/tools/_shared/code-execution/interactive-charts.tsx +0 -24
- package/templates/chat-app/chatjs/tools/_shared/code-execution/javascript.ts +0 -222
- package/templates/chat-app/chatjs/tools/_shared/code-execution/python.ts +0 -381
- package/templates/chat-app/chatjs/tools/_shared/code-execution/types.ts +0 -27
- package/templates/chat-app/chatjs/tools/code-documents/assistant-actions.ts +0 -16
- package/templates/chat-app/chatjs/tools/code-documents/chatjs.json +0 -20
- package/templates/chat-app/chatjs/tools/code-documents/configuration-schema.ts +0 -7
- package/templates/chat-app/chatjs/tools/code-documents/definition.ts +0 -9
- package/templates/chat-app/chatjs/tools/code-documents/document.tsx +0 -33
- package/templates/chat-app/chatjs/tools/code-documents/editor.tsx +0 -144
- package/templates/chat-app/chatjs/tools/code-documents/guidelines.ts +0 -15
- package/templates/chat-app/chatjs/tools/code-documents/tool.ts +0 -54
- package/templates/chat-app/chatjs/tools/code-execution/chatjs.json +0 -21
- package/templates/chat-app/chatjs/tools/code-execution/python.test.ts +0 -207
- package/templates/chat-app/chatjs/tools/code-execution/renderer.test.tsx +0 -142
- package/templates/chat-app/chatjs/tools/code-execution/renderer.tsx +0 -68
- package/templates/chat-app/chatjs/tools/code-execution/schemas.ts +0 -23
- package/templates/chat-app/chatjs/tools/code-execution/tool.ts +0 -93
- package/templates/chat-app/chatjs/tools/deep-research/agent.ts +0 -18
- package/templates/chat-app/chatjs/tools/deep-research/availability.ts +0 -23
- package/templates/chat-app/chatjs/tools/deep-research/configuration-schema.ts +0 -36
- package/templates/chat-app/chatjs/tools/deep-research/configuration.ts +0 -22
- package/templates/chat-app/chatjs/tools/deep-research/prompts.ts +0 -280
- package/templates/chat-app/chatjs/tools/deep-research/search-updates.ts +0 -76
- package/templates/chat-app/chatjs/tools/deep-research/steps.ts +0 -92
- package/templates/chat-app/chatjs/tools/delete-document/availability.ts +0 -13
- package/templates/chat-app/chatjs/tools/delete-document/chatjs.json +0 -9
- package/templates/chat-app/chatjs/tools/delete-document/execute.ts +0 -78
- package/templates/chat-app/chatjs/tools/delete-document/schemas.ts +0 -18
- package/templates/chat-app/chatjs/tools/delete-document/tool.ts +0 -49
- package/templates/chat-app/chatjs/tools/get-weather/chatjs.json +0 -14
- package/templates/chat-app/chatjs/tools/get-weather/definition.ts +0 -10
- package/templates/chat-app/chatjs/tools/get-weather/renderer.test.tsx +0 -57
- package/templates/chat-app/chatjs/tools/get-weather/renderer.tsx +0 -290
- package/templates/chat-app/chatjs/tools/get-weather/schemas.ts +0 -51
- package/templates/chat-app/chatjs/tools/get-weather/tool.ts +0 -34
- package/templates/chat-app/chatjs/tools/read-document/chatjs.json +0 -8
- package/templates/chat-app/chatjs/tools/read-document/tool.ts +0 -27
- package/templates/chat-app/chatjs/tools/retrieve-url/chatjs.json +0 -11
- package/templates/chat-app/chatjs/tools/retrieve-url/renderer.tsx +0 -200
- package/templates/chat-app/chatjs/tools/retrieve-url/retrieve-url-env.ts +0 -11
- package/templates/chat-app/chatjs/tools/retrieve-url/schemas.ts +0 -24
- package/templates/chat-app/chatjs/tools/retrieve-url/tool.test.ts +0 -144
- package/templates/chat-app/chatjs/tools/retrieve-url/tool.ts +0 -169
- package/templates/chat-app/chatjs/tools/saved-code-execution/chatjs.json +0 -12
- package/templates/chat-app/chatjs/tools/saved-code-execution/document-runs.ts +0 -31
- package/templates/chat-app/chatjs/tools/saved-code-execution/document.tsx +0 -84
- package/templates/chat-app/chatjs/tools/saved-code-execution/execute.ts +0 -126
- package/templates/chat-app/chatjs/tools/saved-code-execution/renderer.tsx +0 -30
- package/templates/chat-app/chatjs/tools/saved-code-execution/result.tsx +0 -42
- package/templates/chat-app/chatjs/tools/saved-code-execution/schemas.ts +0 -82
- package/templates/chat-app/chatjs/tools/saved-code-execution/tool.ts +0 -12
- package/templates/chat-app/chatjs/tools/sheet-documents/assistant-actions.ts +0 -22
- package/templates/chat-app/chatjs/tools/sheet-documents/chatjs.json +0 -20
- package/templates/chat-app/chatjs/tools/sheet-documents/configuration-schema.ts +0 -10
- package/templates/chat-app/chatjs/tools/sheet-documents/definition.ts +0 -9
- package/templates/chat-app/chatjs/tools/sheet-documents/document.tsx +0 -41
- package/templates/chat-app/chatjs/tools/sheet-documents/editor.tsx +0 -180
- package/templates/chat-app/chatjs/tools/sheet-documents/guidelines.ts +0 -5
- package/templates/chat-app/chatjs/tools/sheet-documents/tool.ts +0 -54
- package/templates/chat-app/chatjs/tools/tavily-search/chatjs.json +0 -19
- package/templates/chat-app/chatjs/tools/tavily-search/renderer.tsx +0 -25
- package/templates/chat-app/chatjs/tools/tavily-search/schemas.ts +0 -39
- package/templates/chat-app/chatjs/tools/tavily-search/tavily-search-env.ts +0 -11
- package/templates/chat-app/chatjs/tools/tavily-search/tool.test.ts +0 -114
- package/templates/chat-app/chatjs/tools/tavily-search/tool.ts +0 -143
- package/templates/chat-app/chatjs/tools/text-documents/assistant-actions.ts +0 -12
- package/templates/chat-app/chatjs/tools/text-documents/chatjs.json +0 -20
- package/templates/chat-app/chatjs/tools/text-documents/comparison.tsx +0 -72
- package/templates/chat-app/chatjs/tools/text-documents/configuration-schema.ts +0 -7
- package/templates/chat-app/chatjs/tools/text-documents/definition.ts +0 -9
- package/templates/chat-app/chatjs/tools/text-documents/diffview.tsx +0 -214
- package/templates/chat-app/chatjs/tools/text-documents/document.tsx +0 -46
- package/templates/chat-app/chatjs/tools/text-documents/editor-config.ts +0 -53
- package/templates/chat-app/chatjs/tools/text-documents/editor.tsx +0 -139
- package/templates/chat-app/chatjs/tools/text-documents/guidelines.ts +0 -7
- package/templates/chat-app/chatjs/tools/text-documents/tool.ts +0 -54
- package/templates/chat-app/chatjs/tools/word-count/chatjs.json +0 -14
- package/templates/chat-app/chatjs/tools/word-count/definition.ts +0 -10
- package/templates/chat-app/chatjs/tools/word-count/renderer.tsx +0 -64
- package/templates/chat-app/chatjs/tools/word-count/schemas.ts +0 -13
- package/templates/chat-app/chatjs/tools/word-count/tool.ts +0 -45
- package/templates/chat-app/components/chat/chat-layout.tsx +0 -129
- package/templates/chat-app/components/chat-sidebar-view.tsx +0 -53
- package/templates/chat-app/components/document-skeleton.tsx +0 -33
- package/templates/chat-app/components/eve/eve-artifact-layout.tsx +0 -722
- package/templates/chat-app/components/eve/eve-copy-button.tsx +0 -165
- package/templates/chat-app/components/eve/eve-document-actions.tsx +0 -124
- package/templates/chat-app/components/eve/eve-document-assistant-actions.tsx +0 -157
- package/templates/chat-app/components/eve/eve-document-body.tsx +0 -29
- package/templates/chat-app/components/eve/eve-document-context.tsx +0 -12
- package/templates/chat-app/components/eve/eve-document-preview.tsx +0 -128
- package/templates/chat-app/components/eve/eve-document-tool.tsx +0 -190
- package/templates/chat-app/components/eve/eve-history.tsx +0 -25
- package/templates/chat-app/components/eve/use-document-draft.ts +0 -281
- package/templates/chat-app/components/favicon-group.tsx +0 -50
- package/templates/chat-app/components/part/document-common.tsx +0 -152
- package/templates/chat-app/components/part/web-search.tsx +0 -75
- package/templates/chat-app/components/sandbox.tsx +0 -43
- package/templates/chat-app/components/source-badge.tsx +0 -50
- package/templates/chat-app/components/sources.tsx +0 -140
- package/templates/chat-app/hooks/use-artifact.tsx +0 -180
- package/templates/chat-app/integrations/documents/definitions.ts +0 -4
- package/templates/chat-app/integrations/documents/run.ts +0 -1
- package/templates/chat-app/integrations/documents/ui.ts +0 -4
- package/templates/chat-app/integrations/providers/sandbox.ts +0 -10
- package/templates/chat-app/integrations/tools/code-executor.ts +0 -1
- package/templates/chat-app/lib/ai/telemetry.ts +0 -4
- package/templates/chat-app/lib/artifacts/artifact-kind.ts +0 -8
- package/templates/chat-app/lib/artifacts/types.ts +0 -19
- package/templates/chat-app/lib/db/eve-code-sandboxes.ts +0 -197
- package/templates/chat-app/lib/db/eve-document-retention.ts +0 -36
- package/templates/chat-app/lib/db/eve-documents.ts +0 -700
- package/templates/chat-app/lib/eve/code-executor.ts +0 -32
- package/templates/chat-app/lib/eve/code-sandbox-name.test.ts +0 -60
- package/templates/chat-app/lib/eve/code-sandbox-name.ts +0 -56
- package/templates/chat-app/lib/eve/code-sandbox-ownership.ts +0 -88
- package/templates/chat-app/lib/eve/copy-input.ts +0 -11
- package/templates/chat-app/lib/eve/create-native-copy.ts +0 -38
- package/templates/chat-app/lib/eve/document-assistant-actions.test.ts +0 -48
- package/templates/chat-app/lib/eve/document-assistant-actions.ts +0 -22
- package/templates/chat-app/lib/eve/document-kind-lifecycle.test.ts +0 -148
- package/templates/chat-app/lib/eve/document-tools.ts +0 -164
- package/templates/chat-app/lib/eve/lifecycle/postgres/eve-sandbox-coverage-proof.ts +0 -140
- package/templates/chat-app/lib/eve/persistent-sandbox-store.ts +0 -621
- package/templates/chat-app/lib/eve/persistent-sandbox.test.ts +0 -209
- package/templates/chat-app/lib/eve/persistent-sandbox.ts +0 -328
- package/templates/chat-app/lib/eve/purge-code-sandboxes.test.ts +0 -125
- package/templates/chat-app/lib/eve/purge-code-sandboxes.ts +0 -83
- package/templates/chat-app/lib/eve/request-copy.test.ts +0 -95
- package/templates/chat-app/lib/eve/request-copy.ts +0 -129
- package/templates/chat-app/lib/eve/research-progress.test.ts +0 -95
- package/templates/chat-app/lib/eve/research-progress.ts +0 -42
- package/templates/chat-app/lib/eve/sandbox-environment.test.ts +0 -49
- package/templates/chat-app/lib/eve/sandbox-environment.ts +0 -29
- package/templates/chat-app/lib/eve/save-copy-operation.ts +0 -33
- package/templates/chat-app/lib/eve/save-document.ts +0 -87
- package/templates/chat-app/lib/eve/verify-local-coverage.ts +0 -84
- package/templates/chat-app/lib/eve/workspace-attachments.ts +0 -173
- package/templates/chat-app/lib/sandbox/runtime.ts +0 -12
- package/templates/chat-app/scripts/persistent-sandbox-cleanup.ts +0 -128
- package/templates/chat-app/scripts/stop-persistent-sandboxes.ts +0 -24
- package/templates/chat-app/tests/artifacts.e2e.ts +0 -7
- package/templates/chat-app/tools/platform/documents/types.ts +0 -11
- package/templates/chat-app/tools/platform/search-presentation.ts +0 -138
- package/templates/chat-app/tools/platform/steps/multi-query-web-search.test.ts +0 -45
- package/templates/chat-app/tools/platform/steps/multi-query-web-search.ts +0 -142
- package/templates/chat-app/tools/platform/steps/search-utils.ts +0 -26
- package/templates/chat-app/vendor/workflow-world-postgres-5.0.0-beta.40.tgz +0 -0
|
@@ -162,6 +162,41 @@
|
|
|
162
162
|
"when": 1793206594637,
|
|
163
163
|
"tag": "0022_hard_photon",
|
|
164
164
|
"breakpoints": true
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"idx": 24,
|
|
168
|
+
"version": "7",
|
|
169
|
+
"when": 1794554723206,
|
|
170
|
+
"tag": "0024_abandoned_toxin",
|
|
171
|
+
"breakpoints": true
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"idx": 25,
|
|
175
|
+
"version": "7",
|
|
176
|
+
"when": 1794559375617,
|
|
177
|
+
"tag": "0025_cloudy_thunderbolt",
|
|
178
|
+
"breakpoints": true
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"idx": 26,
|
|
182
|
+
"version": "7",
|
|
183
|
+
"when": 1794561876308,
|
|
184
|
+
"tag": "0026_loving_mesmero",
|
|
185
|
+
"breakpoints": true
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"idx": 27,
|
|
189
|
+
"version": "7",
|
|
190
|
+
"when": 1794686052068,
|
|
191
|
+
"tag": "0027_misty_stephen_strange",
|
|
192
|
+
"breakpoints": true
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"idx": 28,
|
|
196
|
+
"version": "7",
|
|
197
|
+
"when": 1794774568469,
|
|
198
|
+
"tag": "0028_faithful_hannibal_king",
|
|
199
|
+
"breakpoints": true
|
|
165
200
|
}
|
|
166
201
|
]
|
|
167
202
|
}
|
|
@@ -369,35 +369,6 @@ const eveStoredFile = pgTable(
|
|
|
369
369
|
]
|
|
370
370
|
);
|
|
371
371
|
|
|
372
|
-
/** Immutable uploaded originals retained by a workspace independently of transcript history. */
|
|
373
|
-
const eveWorkspaceAttachment = pgTable(
|
|
374
|
-
"EveWorkspaceAttachment",
|
|
375
|
-
{
|
|
376
|
-
workspaceId: uuid("workspaceId").notNull(),
|
|
377
|
-
fileKey: text("fileKey").notNull(),
|
|
378
|
-
ownerId: text("ownerId").notNull(),
|
|
379
|
-
sha256: text("sha256").notNull(),
|
|
380
|
-
paths: text("paths")
|
|
381
|
-
.array()
|
|
382
|
-
.notNull()
|
|
383
|
-
.default(sql`'{}'::text[]`),
|
|
384
|
-
},
|
|
385
|
-
(table) => [
|
|
386
|
-
primaryKey({ columns: [table.workspaceId, table.fileKey] }),
|
|
387
|
-
index("EveWorkspaceAttachment_file").on(table.fileKey),
|
|
388
|
-
foreignKey({
|
|
389
|
-
columns: [table.workspaceId, table.ownerId],
|
|
390
|
-
foreignColumns: [eveWorkspace.id, eveWorkspace.ownerId],
|
|
391
|
-
name: "EveWorkspaceAttachment_workspace_owner_fk",
|
|
392
|
-
}),
|
|
393
|
-
foreignKey({
|
|
394
|
-
columns: [table.fileKey, table.ownerId],
|
|
395
|
-
foreignColumns: [eveStoredFile.key, eveStoredFile.ownerId],
|
|
396
|
-
name: "EveWorkspaceAttachment_file_owner_fk",
|
|
397
|
-
}),
|
|
398
|
-
]
|
|
399
|
-
);
|
|
400
|
-
|
|
401
372
|
const eveFileReference = pgTable(
|
|
402
373
|
"EveFileReference",
|
|
403
374
|
{
|
|
@@ -419,72 +390,6 @@ const eveFileReference = pgTable(
|
|
|
419
390
|
]
|
|
420
391
|
);
|
|
421
392
|
|
|
422
|
-
// Allocation intent survives provider timeouts and worker crashes.
|
|
423
|
-
// Persistent filesystem ownership is retained independently of native workflow payloads.
|
|
424
|
-
const eveSandboxSession = pgTable(
|
|
425
|
-
"EveSandboxSession",
|
|
426
|
-
{
|
|
427
|
-
sessionId: text("sessionId").primaryKey(),
|
|
428
|
-
rootSessionId: text("rootSessionId").notNull(),
|
|
429
|
-
conversationId: uuid("conversationId").notNull(),
|
|
430
|
-
workspaceId: uuid("workspaceId").notNull(),
|
|
431
|
-
ownerId: text("ownerId").notNull(),
|
|
432
|
-
devRunId: text("devRunId"),
|
|
433
|
-
state: text("state", { enum: ["active", "retired"] }).notNull(),
|
|
434
|
-
},
|
|
435
|
-
(table) => [
|
|
436
|
-
index("EveSandboxSession_root").on(table.rootSessionId),
|
|
437
|
-
index("EveSandboxSession_workspace").on(table.workspaceId),
|
|
438
|
-
foreignKey({
|
|
439
|
-
columns: [table.conversationId, table.ownerId],
|
|
440
|
-
foreignColumns: [eveConversation.id, eveConversation.ownerId],
|
|
441
|
-
name: "EveSandboxSession_conversation_owner_fk",
|
|
442
|
-
}),
|
|
443
|
-
foreignKey({
|
|
444
|
-
columns: [table.workspaceId, table.ownerId],
|
|
445
|
-
foreignColumns: [eveWorkspace.id, eveWorkspace.ownerId],
|
|
446
|
-
name: "EveSandboxSession_workspace_owner_fk",
|
|
447
|
-
}),
|
|
448
|
-
index("EveSandboxSession_dev").on(table.devRunId),
|
|
449
|
-
]
|
|
450
|
-
);
|
|
451
|
-
const evePersistentSandbox = pgTable(
|
|
452
|
-
"EvePersistentSandbox",
|
|
453
|
-
{
|
|
454
|
-
name: text("name").primaryKey(),
|
|
455
|
-
workspaceId: uuid("workspaceId")
|
|
456
|
-
.notNull()
|
|
457
|
-
.references(() => eveWorkspace.id),
|
|
458
|
-
providerId: text("providerId").notNull(),
|
|
459
|
-
accountId: text("accountId").notNull(),
|
|
460
|
-
scopeId: text("scopeId").notNull(),
|
|
461
|
-
state: text("state", { enum: ["pending", "ready", "deleted"] }).notNull(),
|
|
462
|
-
},
|
|
463
|
-
(table) => [unique("EvePersistentSandbox_workspace").on(table.workspaceId)]
|
|
464
|
-
);
|
|
465
|
-
|
|
466
|
-
const eveCodeSandbox = pgTable(
|
|
467
|
-
"EveCodeSandbox",
|
|
468
|
-
{
|
|
469
|
-
callId: text("callId").notNull(),
|
|
470
|
-
conversationId: uuid("conversationId").notNull(),
|
|
471
|
-
createdAt: timestamp("createdAt").notNull().defaultNow(),
|
|
472
|
-
creationConfirmed: boolean("creationConfirmed").notNull().default(false),
|
|
473
|
-
name: text("name").primaryKey(),
|
|
474
|
-
ownerId: text("ownerId").notNull(),
|
|
475
|
-
state: text("state", { enum: ["unresolved", "deleted"] })
|
|
476
|
-
.notNull()
|
|
477
|
-
.default("unresolved"),
|
|
478
|
-
},
|
|
479
|
-
(table) => [
|
|
480
|
-
foreignKey({
|
|
481
|
-
columns: [table.conversationId, table.ownerId],
|
|
482
|
-
foreignColumns: [eveConversation.id, eveConversation.ownerId],
|
|
483
|
-
}),
|
|
484
|
-
index("EveCodeSandbox_conversation").on(table.conversationId),
|
|
485
|
-
]
|
|
486
|
-
);
|
|
487
|
-
|
|
488
393
|
/** Native child identity and billing progress; transcript stays in EVE. */
|
|
489
394
|
const eveSubagentSession = pgTable(
|
|
490
395
|
"EveSubagentSession",
|
|
@@ -538,277 +443,13 @@ const eveUsage = pgTable(
|
|
|
538
443
|
]
|
|
539
444
|
);
|
|
540
445
|
|
|
541
|
-
const eveDocumentRevision = pgTable(
|
|
542
|
-
"EveDocumentRevision",
|
|
543
|
-
{
|
|
544
|
-
content: text("content").notNull(),
|
|
545
|
-
conversationId: uuid("conversationId").notNull(),
|
|
546
|
-
createdAt: timestamp("createdAt").notNull().defaultNow(),
|
|
547
|
-
documentId: uuid("documentId").notNull(),
|
|
548
|
-
fileIds: jsonb("fileIds").$type<readonly string[]>().notNull().default([]),
|
|
549
|
-
id: uuid("id").primaryKey().defaultRandom(),
|
|
550
|
-
kind: varchar("kind").notNull(),
|
|
551
|
-
operationId: text("operationId").notNull(),
|
|
552
|
-
ownerId: text("ownerId").notNull(),
|
|
553
|
-
parentRevisionId: uuid("parentRevisionId"),
|
|
554
|
-
title: text("title").notNull(),
|
|
555
|
-
turnIndex: integer("turnIndex"),
|
|
556
|
-
},
|
|
557
|
-
(table) => [
|
|
558
|
-
uniqueIndex("EveDocumentRevision_operation").on(
|
|
559
|
-
table.conversationId,
|
|
560
|
-
table.operationId
|
|
561
|
-
),
|
|
562
|
-
unique("EveDocumentRevision_identity").on(
|
|
563
|
-
table.id,
|
|
564
|
-
table.documentId,
|
|
565
|
-
table.ownerId
|
|
566
|
-
),
|
|
567
|
-
foreignKey({
|
|
568
|
-
columns: [table.conversationId, table.ownerId],
|
|
569
|
-
foreignColumns: [eveConversation.id, eveConversation.ownerId],
|
|
570
|
-
name: "EveDocumentRevision_conversation_owner_fk",
|
|
571
|
-
}),
|
|
572
|
-
foreignKey({
|
|
573
|
-
columns: [table.parentRevisionId, table.documentId, table.ownerId],
|
|
574
|
-
foreignColumns: [table.id, table.documentId, table.ownerId],
|
|
575
|
-
name: "EveDocumentRevision_parent_document_owner_fk",
|
|
576
|
-
}),
|
|
577
|
-
check("EveDocumentRevision_turn_nonnegative", sql`${table.turnIndex} >= 0`),
|
|
578
|
-
]
|
|
579
|
-
);
|
|
580
|
-
|
|
581
|
-
const eveDocumentHead = pgTable(
|
|
582
|
-
"EveDocumentHead",
|
|
583
|
-
{
|
|
584
|
-
conversationId: uuid("conversationId").notNull(),
|
|
585
|
-
documentId: uuid("documentId").notNull(),
|
|
586
|
-
ownerId: text("ownerId").notNull(),
|
|
587
|
-
revisionId: uuid("revisionId").notNull(),
|
|
588
|
-
},
|
|
589
|
-
(table) => [
|
|
590
|
-
primaryKey({ columns: [table.conversationId, table.documentId] }),
|
|
591
|
-
foreignKey({
|
|
592
|
-
columns: [table.conversationId, table.ownerId],
|
|
593
|
-
foreignColumns: [eveConversation.id, eveConversation.ownerId],
|
|
594
|
-
name: "EveDocumentHead_conversation_owner_fk",
|
|
595
|
-
}),
|
|
596
|
-
foreignKey({
|
|
597
|
-
columns: [table.revisionId, table.documentId, table.ownerId],
|
|
598
|
-
foreignColumns: [
|
|
599
|
-
eveDocumentRevision.id,
|
|
600
|
-
eveDocumentRevision.documentId,
|
|
601
|
-
eveDocumentRevision.ownerId,
|
|
602
|
-
],
|
|
603
|
-
name: "EveDocumentHead_revision_document_owner_fk",
|
|
604
|
-
}),
|
|
605
|
-
]
|
|
606
|
-
);
|
|
607
|
-
|
|
608
|
-
type EveDocumentRevision = InferSelectModel<typeof eveDocumentRevision>;
|
|
609
|
-
|
|
610
|
-
const eveDocumentCheckpoint = pgTable(
|
|
611
|
-
"EveDocumentCheckpoint",
|
|
612
|
-
{
|
|
613
|
-
conversationId: uuid("conversationId").notNull(),
|
|
614
|
-
ownerId: text("ownerId").notNull(),
|
|
615
|
-
turnIndex: integer("turnIndex").notNull(),
|
|
616
|
-
},
|
|
617
|
-
(table) => [
|
|
618
|
-
primaryKey({ columns: [table.conversationId, table.turnIndex] }),
|
|
619
|
-
unique("EveDocumentCheckpoint_owner_identity").on(
|
|
620
|
-
table.conversationId,
|
|
621
|
-
table.turnIndex,
|
|
622
|
-
table.ownerId
|
|
623
|
-
),
|
|
624
|
-
foreignKey({
|
|
625
|
-
columns: [table.conversationId, table.ownerId],
|
|
626
|
-
foreignColumns: [eveConversation.id, eveConversation.ownerId],
|
|
627
|
-
name: "EveDocumentCheckpoint_conversation_owner_fk",
|
|
628
|
-
}),
|
|
629
|
-
check(
|
|
630
|
-
"EveDocumentCheckpoint_turn_nonnegative",
|
|
631
|
-
sql`${table.turnIndex} >= 0`
|
|
632
|
-
),
|
|
633
|
-
]
|
|
634
|
-
);
|
|
635
|
-
|
|
636
|
-
const eveDocumentCheckpointEntry = pgTable(
|
|
637
|
-
"EveDocumentCheckpointEntry",
|
|
638
|
-
{
|
|
639
|
-
conversationId: uuid("conversationId").notNull(),
|
|
640
|
-
documentId: uuid("documentId").notNull(),
|
|
641
|
-
ownerId: text("ownerId").notNull(),
|
|
642
|
-
revisionId: uuid("revisionId").notNull(),
|
|
643
|
-
turnIndex: integer("turnIndex").notNull(),
|
|
644
|
-
},
|
|
645
|
-
(table) => [
|
|
646
|
-
primaryKey({
|
|
647
|
-
columns: [table.conversationId, table.turnIndex, table.documentId],
|
|
648
|
-
}),
|
|
649
|
-
foreignKey({
|
|
650
|
-
columns: [table.conversationId, table.turnIndex, table.ownerId],
|
|
651
|
-
foreignColumns: [
|
|
652
|
-
eveDocumentCheckpoint.conversationId,
|
|
653
|
-
eveDocumentCheckpoint.turnIndex,
|
|
654
|
-
eveDocumentCheckpoint.ownerId,
|
|
655
|
-
],
|
|
656
|
-
name: "EveDocumentCheckpointEntry_checkpoint_owner_fk",
|
|
657
|
-
}),
|
|
658
|
-
foreignKey({
|
|
659
|
-
columns: [table.revisionId, table.documentId, table.ownerId],
|
|
660
|
-
foreignColumns: [
|
|
661
|
-
eveDocumentRevision.id,
|
|
662
|
-
eveDocumentRevision.documentId,
|
|
663
|
-
eveDocumentRevision.ownerId,
|
|
664
|
-
],
|
|
665
|
-
name: "EveDocumentCheckpointEntry_revision_owner_fk",
|
|
666
|
-
}),
|
|
667
|
-
]
|
|
668
|
-
);
|
|
669
|
-
|
|
670
|
-
/** Immutable document boundary captured by a serialized native idle command. */
|
|
671
|
-
const eveNamedDocumentCheckpoint = pgTable(
|
|
672
|
-
"EveNamedDocumentCheckpoint",
|
|
673
|
-
{
|
|
674
|
-
checkpointId: uuid("checkpointId").notNull(),
|
|
675
|
-
conversationId: uuid("conversationId").notNull(),
|
|
676
|
-
ownerId: text("ownerId").notNull(),
|
|
677
|
-
turnIndex: integer("turnIndex").notNull(),
|
|
678
|
-
},
|
|
679
|
-
(table) => [
|
|
680
|
-
primaryKey({ columns: [table.conversationId, table.checkpointId] }),
|
|
681
|
-
unique("EveNamedDocumentCheckpoint_owner_identity").on(
|
|
682
|
-
table.conversationId,
|
|
683
|
-
table.checkpointId,
|
|
684
|
-
table.ownerId
|
|
685
|
-
),
|
|
686
|
-
foreignKey({
|
|
687
|
-
columns: [table.conversationId, table.ownerId],
|
|
688
|
-
foreignColumns: [eveConversation.id, eveConversation.ownerId],
|
|
689
|
-
name: "EveNamedDocumentCheckpoint_conversation_owner_fk",
|
|
690
|
-
}),
|
|
691
|
-
check(
|
|
692
|
-
"EveNamedDocumentCheckpoint_turn_nonnegative",
|
|
693
|
-
sql`${table.turnIndex} >= 0`
|
|
694
|
-
),
|
|
695
|
-
]
|
|
696
|
-
);
|
|
697
|
-
|
|
698
|
-
const eveNamedDocumentCheckpointEntry = pgTable(
|
|
699
|
-
"EveNamedDocumentCheckpointEntry",
|
|
700
|
-
{
|
|
701
|
-
checkpointId: uuid("checkpointId").notNull(),
|
|
702
|
-
conversationId: uuid("conversationId").notNull(),
|
|
703
|
-
documentId: uuid("documentId").notNull(),
|
|
704
|
-
ownerId: text("ownerId").notNull(),
|
|
705
|
-
revisionId: uuid("revisionId").notNull(),
|
|
706
|
-
},
|
|
707
|
-
(table) => [
|
|
708
|
-
primaryKey({
|
|
709
|
-
columns: [table.conversationId, table.checkpointId, table.documentId],
|
|
710
|
-
}),
|
|
711
|
-
foreignKey({
|
|
712
|
-
columns: [table.conversationId, table.checkpointId, table.ownerId],
|
|
713
|
-
foreignColumns: [
|
|
714
|
-
eveNamedDocumentCheckpoint.conversationId,
|
|
715
|
-
eveNamedDocumentCheckpoint.checkpointId,
|
|
716
|
-
eveNamedDocumentCheckpoint.ownerId,
|
|
717
|
-
],
|
|
718
|
-
name: "EveNamedDocumentCheckpointEntry_checkpoint_owner_fk",
|
|
719
|
-
}),
|
|
720
|
-
foreignKey({
|
|
721
|
-
columns: [table.revisionId, table.documentId, table.ownerId],
|
|
722
|
-
foreignColumns: [
|
|
723
|
-
eveDocumentRevision.id,
|
|
724
|
-
eveDocumentRevision.documentId,
|
|
725
|
-
eveDocumentRevision.ownerId,
|
|
726
|
-
],
|
|
727
|
-
name: "EveNamedDocumentCheckpointEntry_revision_owner_fk",
|
|
728
|
-
}),
|
|
729
|
-
]
|
|
730
|
-
);
|
|
731
|
-
|
|
732
|
-
/** Document heads at an imported transcript message boundary. */
|
|
733
|
-
const eveImportedDocumentCheckpoint = pgTable(
|
|
734
|
-
"EveImportedDocumentCheckpoint",
|
|
735
|
-
{
|
|
736
|
-
conversationId: uuid("conversationId").notNull(),
|
|
737
|
-
messageIndex: integer("messageIndex").notNull(),
|
|
738
|
-
ownerId: text("ownerId").notNull(),
|
|
739
|
-
},
|
|
740
|
-
(table) => [
|
|
741
|
-
primaryKey({ columns: [table.conversationId, table.messageIndex] }),
|
|
742
|
-
unique("EveImportedDocumentCheckpoint_owner_identity").on(
|
|
743
|
-
table.conversationId,
|
|
744
|
-
table.messageIndex,
|
|
745
|
-
table.ownerId
|
|
746
|
-
),
|
|
747
|
-
foreignKey({
|
|
748
|
-
columns: [table.conversationId, table.ownerId],
|
|
749
|
-
foreignColumns: [eveConversation.id, eveConversation.ownerId],
|
|
750
|
-
name: "EveImportedDocumentCheckpoint_conversation_owner_fk",
|
|
751
|
-
}),
|
|
752
|
-
check(
|
|
753
|
-
"EveImportedDocumentCheckpoint_message_range",
|
|
754
|
-
sql`${table.messageIndex} between 0 and 9999`
|
|
755
|
-
),
|
|
756
|
-
]
|
|
757
|
-
);
|
|
758
|
-
|
|
759
|
-
const eveImportedDocumentCheckpointEntry = pgTable(
|
|
760
|
-
"EveImportedDocumentCheckpointEntry",
|
|
761
|
-
{
|
|
762
|
-
conversationId: uuid("conversationId").notNull(),
|
|
763
|
-
documentId: uuid("documentId").notNull(),
|
|
764
|
-
messageIndex: integer("messageIndex").notNull(),
|
|
765
|
-
ownerId: text("ownerId").notNull(),
|
|
766
|
-
revisionId: uuid("revisionId").notNull(),
|
|
767
|
-
},
|
|
768
|
-
(table) => [
|
|
769
|
-
primaryKey({
|
|
770
|
-
columns: [table.conversationId, table.messageIndex, table.documentId],
|
|
771
|
-
}),
|
|
772
|
-
foreignKey({
|
|
773
|
-
columns: [table.conversationId, table.messageIndex, table.ownerId],
|
|
774
|
-
foreignColumns: [
|
|
775
|
-
eveImportedDocumentCheckpoint.conversationId,
|
|
776
|
-
eveImportedDocumentCheckpoint.messageIndex,
|
|
777
|
-
eveImportedDocumentCheckpoint.ownerId,
|
|
778
|
-
],
|
|
779
|
-
name: "EveImportedDocumentCheckpointEntry_checkpoint_owner_fk",
|
|
780
|
-
}),
|
|
781
|
-
foreignKey({
|
|
782
|
-
columns: [table.revisionId, table.documentId, table.ownerId],
|
|
783
|
-
foreignColumns: [
|
|
784
|
-
eveDocumentRevision.id,
|
|
785
|
-
eveDocumentRevision.documentId,
|
|
786
|
-
eveDocumentRevision.ownerId,
|
|
787
|
-
],
|
|
788
|
-
name: "EveImportedDocumentCheckpointEntry_revision_owner_fk",
|
|
789
|
-
}),
|
|
790
|
-
]
|
|
791
|
-
);
|
|
792
|
-
|
|
793
446
|
export {
|
|
794
447
|
eveWorkspace,
|
|
795
|
-
eveSandboxSession,
|
|
796
|
-
evePersistentSandbox,
|
|
797
448
|
eveDispatch,
|
|
798
449
|
account,
|
|
799
450
|
eveChat,
|
|
800
|
-
eveCodeSandbox,
|
|
801
451
|
eveConversation,
|
|
802
|
-
eveDocumentCheckpoint,
|
|
803
|
-
eveDocumentCheckpointEntry,
|
|
804
|
-
eveDocumentHead,
|
|
805
|
-
eveDocumentRevision,
|
|
806
452
|
eveFileReference,
|
|
807
|
-
eveWorkspaceAttachment,
|
|
808
|
-
eveImportedDocumentCheckpoint,
|
|
809
|
-
eveImportedDocumentCheckpointEntry,
|
|
810
|
-
eveNamedDocumentCheckpoint,
|
|
811
|
-
eveNamedDocumentCheckpointEntry,
|
|
812
453
|
eveResponseGroup,
|
|
813
454
|
eveStoredFile,
|
|
814
455
|
eveSubagentSession,
|
|
@@ -819,4 +460,4 @@ export {
|
|
|
819
460
|
user,
|
|
820
461
|
verification,
|
|
821
462
|
};
|
|
822
|
-
export type { EveChat,
|
|
463
|
+
export type { EveChat, User };
|
|
@@ -37,7 +37,6 @@ const MIN_NONEMPTY_ENV_VALUE_LENGTH = 1;
|
|
|
37
37
|
* Exported separately so callers can inspect schemas without createEnv validation.
|
|
38
38
|
*/
|
|
39
39
|
const serverEnvSchema = {
|
|
40
|
-
CHATJS_SANDBOX_DEV_RUN_ID: z.uuid().optional(),
|
|
41
40
|
APP_URL: z
|
|
42
41
|
.url()
|
|
43
42
|
.optional()
|
|
@@ -111,12 +110,6 @@ const serverEnvSchema = {
|
|
|
111
110
|
.string()
|
|
112
111
|
.optional()
|
|
113
112
|
.describe("Vercel OAuth integration client secret"),
|
|
114
|
-
VERCEL_AUTOMATION_BYPASS_SECRET: z
|
|
115
|
-
.string()
|
|
116
|
-
.optional()
|
|
117
|
-
.describe(
|
|
118
|
-
"Server-only credential for this project's protected Vercel deployments"
|
|
119
|
-
),
|
|
120
113
|
VERCEL_BRANCH_URL: z
|
|
121
114
|
.string()
|
|
122
115
|
.optional()
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineDynamic } from "eve/models";
|
|
2
|
+
import { defineState } from "eve/context";
|
|
3
|
+
import { wrapLanguageModel } from "ai";
|
|
4
|
+
import { webModels } from "@/integrations/chat/models";
|
|
5
|
+
import { isAccountSession } from "./session-identity";
|
|
6
|
+
import { installedToolAvailabilityMiddleware } from "./tool-availability";
|
|
7
|
+
|
|
8
|
+
const selectedModel = defineState<{ modelId?: string }>(
|
|
9
|
+
"chatjs.turn-model",
|
|
10
|
+
() => ({})
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
/** Web application model selection and optional billing; native callers use EVE directly. */
|
|
14
|
+
export const applicationModel = (model: string, allowWebSelection = true) =>
|
|
15
|
+
defineDynamic(async (context) => {
|
|
16
|
+
if (!isAccountSession(context.session)) {
|
|
17
|
+
if (
|
|
18
|
+
context.session.auth.initiator?.authenticator?.startsWith("chatjs-") !==
|
|
19
|
+
true
|
|
20
|
+
) {
|
|
21
|
+
return model;
|
|
22
|
+
}
|
|
23
|
+
const { findSessionProfile } = await import("./session-profile");
|
|
24
|
+
return await (findSessionProfile(context.session)?.resolveModel?.(
|
|
25
|
+
context,
|
|
26
|
+
model
|
|
27
|
+
) ?? model);
|
|
28
|
+
}
|
|
29
|
+
const requested = allowWebSelection
|
|
30
|
+
? context.session.auth.current?.attributes.modelId
|
|
31
|
+
: undefined;
|
|
32
|
+
if (typeof requested === "string") {
|
|
33
|
+
if (requested !== model && !webModels.allowedModels.includes(requested)) {
|
|
34
|
+
throw new Error("This model is not enabled for web chat.");
|
|
35
|
+
}
|
|
36
|
+
selectedModel.update(() => ({ modelId: requested }));
|
|
37
|
+
}
|
|
38
|
+
const modelId =
|
|
39
|
+
(allowWebSelection ? selectedModel.get().modelId : undefined) ?? model;
|
|
40
|
+
const { billing } = await import("@/integrations/billing");
|
|
41
|
+
const { resolveEveModel } = await import("./model-selection");
|
|
42
|
+
let resolved;
|
|
43
|
+
if (billing.debit === undefined) {
|
|
44
|
+
resolved = await resolveEveModel(modelId);
|
|
45
|
+
} else {
|
|
46
|
+
const { resolveAccountedEveModel } = await import("./model-accounting");
|
|
47
|
+
resolved = await resolveAccountedEveModel(modelId, context);
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
...resolved,
|
|
51
|
+
model: wrapLanguageModel({
|
|
52
|
+
middleware: installedToolAvailabilityMiddleware(context.session),
|
|
53
|
+
model: resolved.model,
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// Validate presentation data; EVE remains responsible for execution and job lifecycle.
|
|
4
|
+
const streams = {
|
|
5
|
+
stdout: z.string(),
|
|
6
|
+
stderr: z.string(),
|
|
7
|
+
truncated: z.boolean(),
|
|
8
|
+
};
|
|
9
|
+
export const bashResultSchema = z.discriminatedUnion("status", [
|
|
10
|
+
z.object({
|
|
11
|
+
...streams,
|
|
12
|
+
status: z.literal("completed"),
|
|
13
|
+
exitCode: z.number(),
|
|
14
|
+
}),
|
|
15
|
+
z.object({
|
|
16
|
+
...streams,
|
|
17
|
+
status: z.literal("running"),
|
|
18
|
+
pid: z.number(),
|
|
19
|
+
outputDirectory: z.string(),
|
|
20
|
+
message: z.string(),
|
|
21
|
+
}),
|
|
22
|
+
]);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { expect, it } from "vitest";
|
|
2
|
+
import { nativeBranchHistory } from "./branch-history";
|
|
3
|
+
import { parseEveCopySeed } from "./copy-seed";
|
|
4
|
+
|
|
5
|
+
it("imports completed content without exporting app metadata or runtime capabilities", () => {
|
|
6
|
+
const history = nativeBranchHistory(
|
|
7
|
+
parseEveCopySeed({
|
|
8
|
+
messages: [
|
|
9
|
+
{
|
|
10
|
+
role: "user",
|
|
11
|
+
metadata: { chatjs: { selectedTool: "generateImage" } },
|
|
12
|
+
parts: [
|
|
13
|
+
{
|
|
14
|
+
type: "file",
|
|
15
|
+
url: "https://app.test/api/files/owned",
|
|
16
|
+
mediaType: "application/pdf",
|
|
17
|
+
filename: "notes.pdf",
|
|
18
|
+
size: 42,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
role: "assistant",
|
|
24
|
+
modelId: "private/model",
|
|
25
|
+
parts: [
|
|
26
|
+
{
|
|
27
|
+
type: "dynamic-tool",
|
|
28
|
+
toolName: "readFile",
|
|
29
|
+
input: { path: "notes.pdf" },
|
|
30
|
+
state: "output-available",
|
|
31
|
+
output: "Original notes",
|
|
32
|
+
outputType: "text",
|
|
33
|
+
},
|
|
34
|
+
{ type: "text", text: "Summary" },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
})
|
|
39
|
+
);
|
|
40
|
+
expect(history.map((message) => message.id)).toEqual(["0", "1"]);
|
|
41
|
+
expect(history[0]?.parts[0]).toEqual({
|
|
42
|
+
type: "file",
|
|
43
|
+
url: "https://app.test/api/files/owned",
|
|
44
|
+
mediaType: "application/pdf",
|
|
45
|
+
filename: "notes.pdf",
|
|
46
|
+
});
|
|
47
|
+
expect(history[1]?.parts[0]).toMatchObject({
|
|
48
|
+
state: "output-available",
|
|
49
|
+
outputType: "text",
|
|
50
|
+
output: "Original notes",
|
|
51
|
+
});
|
|
52
|
+
expect(JSON.stringify(history)).not.toMatch(
|
|
53
|
+
/modelId|selectedTool|existingPath|size/u
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("permits an empty prefix when replacing the first message", () => {
|
|
58
|
+
expect(nativeBranchHistory(parseEveCopySeed({ messages: [] }))).toEqual([]);
|
|
59
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EveCopySeed } from "./copy-seed";
|
|
2
|
+
|
|
3
|
+
/** Import only model content; ownership and display metadata stay in ChatJS. */
|
|
4
|
+
export const nativeBranchHistory = (capture: EveCopySeed) =>
|
|
5
|
+
capture.messages.map((message, index) => ({
|
|
6
|
+
id: String(index),
|
|
7
|
+
role: message.role,
|
|
8
|
+
parts: message.parts.map((part) => {
|
|
9
|
+
if (part.type !== "file") {
|
|
10
|
+
return part;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
type: part.type,
|
|
14
|
+
url: part.url,
|
|
15
|
+
mediaType: part.mediaType,
|
|
16
|
+
...(part.filename === undefined ? {} : { filename: part.filename }),
|
|
17
|
+
};
|
|
18
|
+
}),
|
|
19
|
+
}));
|
|
@@ -4,19 +4,15 @@ import { fetchEveChannelFile } from "./channel-files";
|
|
|
4
4
|
|
|
5
5
|
const mocks = vi.hoisted(() => ({
|
|
6
6
|
download: vi.fn(),
|
|
7
|
-
retain: vi.fn(),
|
|
8
7
|
owned: vi.fn<typeof assertEveFilesOwned>(),
|
|
9
8
|
}));
|
|
10
9
|
vi.mock("../db/eve-files", () => ({ assertEveFilesOwned: mocks.owned }));
|
|
11
10
|
vi.mock("../file-storage", () => ({ downloadFile: mocks.download }));
|
|
12
|
-
vi.mock("./workspace-attachments", () => ({
|
|
13
|
-
retainWorkspaceAttachment: mocks.retain,
|
|
14
|
-
}));
|
|
15
11
|
|
|
16
12
|
const key = "abcdefghijklmnopqrstuvwx.png";
|
|
17
13
|
const owner = {
|
|
18
14
|
attributes: {},
|
|
19
|
-
authenticator: "
|
|
15
|
+
authenticator: "chatjs-gateway",
|
|
20
16
|
principalId: "destination-owner",
|
|
21
17
|
principalType: "user",
|
|
22
18
|
} satisfies NonNullable<
|
|
@@ -49,12 +45,6 @@ it("checks the destination owner before reading local storage, regardless of the
|
|
|
49
45
|
}
|
|
50
46
|
expect(result.bytes.toString()).toBe("image bytes");
|
|
51
47
|
expect(result.mediaType).toBe("image/png");
|
|
52
|
-
expect(mocks.retain).toHaveBeenCalledWith({
|
|
53
|
-
ownerId: owner.principalId,
|
|
54
|
-
sessionId: "native-session",
|
|
55
|
-
fileKey: key,
|
|
56
|
-
content: Buffer.from("image bytes"),
|
|
57
|
-
});
|
|
58
48
|
});
|
|
59
49
|
|
|
60
50
|
it("never reads a foreign or deleted file after an ownership rejection", async () => {
|
|
@@ -83,3 +73,16 @@ it.each([
|
|
|
83
73
|
expect(mocks.download).not.toHaveBeenCalled();
|
|
84
74
|
}
|
|
85
75
|
);
|
|
76
|
+
|
|
77
|
+
it("does not interpret a native-channel principal as a web account", async () => {
|
|
78
|
+
await expect(
|
|
79
|
+
fetchEveChannelFile(`/api/files/${key}`, {
|
|
80
|
+
session: {
|
|
81
|
+
id: "native",
|
|
82
|
+
auth: { current: { ...owner, authenticator: "slack-webhook" } },
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
).rejects.toThrow("authenticated owner");
|
|
86
|
+
expect(mocks.owned).not.toHaveBeenCalled();
|
|
87
|
+
expect(mocks.download).not.toHaveBeenCalled();
|
|
88
|
+
});
|
|
@@ -2,7 +2,6 @@ import type { EveChannelConfig } from "eve/channels/eve";
|
|
|
2
2
|
import { assertEveFilesOwned } from "@/lib/db/eve-files";
|
|
3
3
|
import { downloadFile } from "@/lib/file-storage";
|
|
4
4
|
import { keyFromFileUrl } from "@/lib/file-url";
|
|
5
|
-
import { retainWorkspaceAttachment } from "./workspace-attachments";
|
|
6
5
|
|
|
7
6
|
type FileContext = NonNullable<
|
|
8
7
|
Parameters<NonNullable<EveChannelConfig["fetchFile"]>>[1]
|
|
@@ -33,23 +32,14 @@ export const fetchEveChannelFile = async (
|
|
|
33
32
|
if (
|
|
34
33
|
auth === null ||
|
|
35
34
|
typeof auth !== "object" ||
|
|
36
|
-
auth.principalType
|
|
35
|
+
auth.principalType !== "user" ||
|
|
36
|
+
auth.authenticator !== "chatjs-gateway"
|
|
37
37
|
) {
|
|
38
38
|
throw new Error("Attachment resolution requires an authenticated owner.");
|
|
39
39
|
}
|
|
40
40
|
await assertEveFilesOwned(auth.principalId, [key]);
|
|
41
41
|
const file = await downloadFile(key);
|
|
42
42
|
const bytes = Buffer.from(await file.arrayBuffer());
|
|
43
|
-
const sessionId = context?.session?.id;
|
|
44
|
-
if (sessionId === undefined || sessionId === "") {
|
|
45
|
-
throw new Error("Attachment session is unavailable.");
|
|
46
|
-
}
|
|
47
|
-
await retainWorkspaceAttachment({
|
|
48
|
-
ownerId: auth.principalId,
|
|
49
|
-
sessionId,
|
|
50
|
-
fileKey: key,
|
|
51
|
-
content: bytes,
|
|
52
|
-
});
|
|
53
43
|
return {
|
|
54
44
|
bytes,
|
|
55
45
|
mediaType: file.type,
|