@sixb/app 0.1.11 → 0.1.13
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/LICENSE +2 -0
- package/README.md +27 -26
- package/assets/connector-icons/README.md +29 -0
- package/assets/connector-icons/ace-iot.ico +0 -0
- package/assets/connector-icons/companycam.png +0 -0
- package/assets/connector-icons/exa.png +0 -0
- package/assets/connector-icons/github.svg +1 -0
- package/assets/connector-icons/google.ico +0 -0
- package/assets/connector-icons/googleads.svg +29 -0
- package/assets/connector-icons/linkedin.svg +1 -0
- package/assets/connector-icons/mercury.svg +1 -0
- package/assets/connector-icons/meta.svg +1 -0
- package/assets/connector-icons/microsoft.ico +0 -0
- package/assets/connector-icons/notion.svg +1 -0
- package/assets/connector-icons/pandadoc.png +0 -0
- package/assets/connector-icons/pennylane.ico +0 -0
- package/assets/connector-icons/pipedrive.png +0 -0
- package/assets/connector-icons/plaud.png +0 -0
- package/assets/connector-icons/quickbooks.svg +1 -0
- package/assets/connector-icons/stripe.svg +1 -0
- package/assets/connector-icons/teamleader.ico +0 -0
- package/assets/connector-icons/tiktok.svg +1 -0
- package/assets/connector-icons/unipile.png +0 -0
- package/dist/agent/activity-label.d.ts +5 -0
- package/dist/agent/activity-label.d.ts.map +1 -0
- package/dist/agent/agent-chat.d.ts +25 -0
- package/dist/agent/agent-chat.d.ts.map +1 -0
- package/dist/agent/agent-context-provider.d.ts +9 -0
- package/dist/agent/agent-context-provider.d.ts.map +1 -0
- package/dist/agent/agent-execution-trace.d.ts +9 -0
- package/dist/agent/agent-execution-trace.d.ts.map +1 -0
- package/dist/agent/agent-panel.d.ts +24 -0
- package/dist/agent/agent-panel.d.ts.map +1 -0
- package/dist/agent/agent-surface-state.d.ts +22 -0
- package/dist/agent/agent-surface-state.d.ts.map +1 -0
- package/dist/agent/agent-surface.d.ts +46 -0
- package/dist/agent/agent-surface.d.ts.map +1 -0
- package/dist/agent/agents-page.d.ts +4 -0
- package/dist/agent/agents-page.d.ts.map +1 -0
- package/dist/agent/artifact-card.d.ts +9 -0
- package/dist/agent/artifact-card.d.ts.map +1 -0
- package/dist/agent/artifact-panel-state.d.ts +16 -0
- package/dist/agent/artifact-panel-state.d.ts.map +1 -0
- package/dist/agent/artifact-panel.d.ts +38 -0
- package/dist/agent/artifact-panel.d.ts.map +1 -0
- package/dist/agent/bash/bash-tool-view.d.ts +17 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -0
- package/dist/agent/bash/data.d.ts +35 -0
- package/dist/agent/bash/data.d.ts.map +1 -0
- package/dist/agent/bash/interpret.d.ts +84 -0
- package/dist/agent/bash/interpret.d.ts.map +1 -0
- package/dist/agent/bash/renderers.d.ts +31 -0
- package/dist/agent/bash/renderers.d.ts.map +1 -0
- package/dist/agent/bash/shell.d.ts +16 -0
- package/dist/agent/bash/shell.d.ts.map +1 -0
- package/dist/agent/components/activity-status.d.ts +13 -0
- package/dist/agent/components/activity-status.d.ts.map +1 -0
- package/dist/agent/components/agent-thread-switcher.d.ts +16 -0
- package/dist/agent/components/agent-thread-switcher.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +47 -0
- package/dist/agent/components/composer.d.ts.map +1 -0
- package/dist/agent/components/context-chips.d.ts +7 -0
- package/dist/agent/components/context-chips.d.ts.map +1 -0
- package/dist/agent/components/context-picker.d.ts +16 -0
- package/dist/agent/components/context-picker.d.ts.map +1 -0
- package/dist/agent/components/conversation-panel.d.ts +82 -0
- package/dist/agent/components/conversation-panel.d.ts.map +1 -0
- package/dist/agent/components/file-attachment-card.d.ts +8 -0
- package/dist/agent/components/file-attachment-card.d.ts.map +1 -0
- package/dist/agent/components/message-parts.d.ts +14 -0
- package/dist/agent/components/message-parts.d.ts.map +1 -0
- package/dist/agent/components/message-view.d.ts +58 -0
- package/dist/agent/components/message-view.d.ts.map +1 -0
- package/dist/agent/components/model-controls.d.ts +20 -0
- package/dist/agent/components/model-controls.d.ts.map +1 -0
- package/dist/agent/components/model-picker-row.d.ts +8 -0
- package/dist/agent/components/model-picker-row.d.ts.map +1 -0
- package/dist/agent/components/provider-logo.d.ts +6 -0
- package/dist/agent/components/provider-logo.d.ts.map +1 -0
- package/dist/agent/components/provider-logos.d.ts +3 -0
- package/dist/agent/components/provider-logos.d.ts.map +1 -0
- package/dist/agent/components/reasoning-effort-slider.d.ts +11 -0
- package/dist/agent/components/reasoning-effort-slider.d.ts.map +1 -0
- package/dist/agent/components/sandbox-recovery.d.ts +6 -0
- package/dist/agent/components/sandbox-recovery.d.ts.map +1 -0
- package/dist/agent/components/thread-artifacts-menu.d.ts +8 -0
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -0
- package/dist/agent/components/transcript.d.ts +36 -0
- package/dist/agent/components/transcript.d.ts.map +1 -0
- package/dist/agent/components/web-fetch-tool-view.d.ts +5 -0
- package/dist/agent/components/web-fetch-tool-view.d.ts.map +1 -0
- package/dist/agent/components/web-search-tool-view.d.ts +5 -0
- package/dist/agent/components/web-search-tool-view.d.ts.map +1 -0
- package/dist/agent/components/web-sources.d.ts +9 -0
- package/dist/agent/components/web-sources.d.ts.map +1 -0
- package/dist/agent/format.d.ts +12 -0
- package/dist/agent/format.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +337 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -0
- package/dist/agent/hooks/use-thread-stream.d.ts +22 -0
- package/dist/agent/hooks/use-thread-stream.d.ts.map +1 -0
- package/dist/agent/i18n/en.d.ts +550 -0
- package/dist/agent/i18n/en.d.ts.map +1 -0
- package/dist/agent/i18n/fr.d.ts +4 -0
- package/dist/agent/i18n/fr.d.ts.map +1 -0
- package/dist/agent/i18n/index.d.ts +1079 -0
- package/dist/agent/i18n/index.d.ts.map +1 -0
- package/dist/agent/live-run.d.ts +48 -0
- package/dist/agent/live-run.d.ts.map +1 -0
- package/dist/agent/model-selection.d.ts +33 -0
- package/dist/agent/model-selection.d.ts.map +1 -0
- package/dist/agent/object-context-title.d.ts +22 -0
- package/dist/agent/object-context-title.d.ts.map +1 -0
- package/dist/agent/parts.d.ts +42 -0
- package/dist/agent/parts.d.ts.map +1 -0
- package/dist/agent/publish-artifact/interpret.d.ts +32 -0
- package/dist/agent/publish-artifact/interpret.d.ts.map +1 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +9 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -0
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +10 -0
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -0
- package/dist/agent/react-router.d.ts +7 -0
- package/dist/agent/react-router.d.ts.map +1 -0
- package/dist/agent/read/interpret.d.ts +24 -0
- package/dist/agent/read/interpret.d.ts.map +1 -0
- package/dist/agent/read/read-tool-view.d.ts +5 -0
- package/dist/agent/read/read-tool-view.d.ts.map +1 -0
- package/dist/agent/requester-settings.d.ts +15 -0
- package/dist/agent/requester-settings.d.ts.map +1 -0
- package/dist/agent/run-presentation.d.ts +70 -0
- package/dist/agent/run-presentation.d.ts.map +1 -0
- package/dist/agent/thread-navigation.d.ts +5 -0
- package/dist/agent/thread-navigation.d.ts.map +1 -0
- package/dist/agent/types.d.ts +22 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/utils/context-display.d.ts +5 -0
- package/dist/agent/utils/context-display.d.ts.map +1 -0
- package/dist/agent/utils/context-mention.d.ts +12 -0
- package/dist/agent/utils/context-mention.d.ts.map +1 -0
- package/dist/agent/utils/web-fetch.d.ts +4 -0
- package/dist/agent/utils/web-fetch.d.ts.map +1 -0
- package/dist/agent/utils/web-search.d.ts +20 -0
- package/dist/agent/utils/web-search.d.ts.map +1 -0
- package/dist/agent/view-file/interpret.d.ts +9 -0
- package/dist/agent/view-file/interpret.d.ts.map +1 -0
- package/dist/agent/view-file/view-file-tool-view.d.ts +9 -0
- package/dist/agent/view-file/view-file-tool-view.d.ts.map +1 -0
- package/dist/artifacts/artifact-page.d.ts +7 -0
- package/dist/artifacts/artifact-page.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts +15 -0
- package/dist/artifacts/card-details.d.ts.map +1 -0
- package/dist/artifacts/card-preview.d.ts +59 -0
- package/dist/artifacts/card-preview.d.ts.map +1 -0
- package/dist/artifacts/copy-feedback.d.ts +6 -0
- package/dist/artifacts/copy-feedback.d.ts.map +1 -0
- package/dist/artifacts/file-size.d.ts +11 -0
- package/dist/artifacts/file-size.d.ts.map +1 -0
- package/dist/artifacts/file-source.d.ts +45 -0
- package/dist/artifacts/file-source.d.ts.map +1 -0
- package/dist/artifacts/file-view.d.ts +9 -0
- package/dist/artifacts/file-view.d.ts.map +1 -0
- package/dist/artifacts/frame.d.ts +45 -0
- package/dist/artifacts/frame.d.ts.map +1 -0
- package/dist/artifacts/gallery.d.ts +6 -0
- package/dist/artifacts/gallery.d.ts.map +1 -0
- package/dist/artifacts/kind-icon.d.ts +8 -0
- package/dist/artifacts/kind-icon.d.ts.map +1 -0
- package/dist/artifacts/markdown-tree.d.ts +22 -0
- package/dist/artifacts/markdown-tree.d.ts.map +1 -0
- package/dist/artifacts/messages.d.ts +301 -0
- package/dist/artifacts/messages.d.ts.map +1 -0
- package/dist/artifacts/queries.d.ts +21 -0
- package/dist/artifacts/queries.d.ts.map +1 -0
- package/dist/artifacts/references/embed-tree.d.ts +17 -0
- package/dist/artifacts/references/embed-tree.d.ts.map +1 -0
- package/dist/artifacts/references/references.d.ts +50 -0
- package/dist/artifacts/references/references.d.ts.map +1 -0
- package/dist/artifacts/renderers/document-tree.d.ts +11 -0
- package/dist/artifacts/renderers/document-tree.d.ts.map +1 -0
- package/dist/artifacts/renderers/document.d.ts +17 -0
- package/dist/artifacts/renderers/document.d.ts.map +1 -0
- package/dist/artifacts/renderers/file.d.ts +10 -0
- package/dist/artifacts/renderers/file.d.ts.map +1 -0
- package/dist/artifacts/renderers/notice.d.ts +12 -0
- package/dist/artifacts/renderers/notice.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-data.d.ts +33 -0
- package/dist/artifacts/renderers/sheet/chart-data.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart.d.ts +15 -0
- package/dist/artifacts/renderers/sheet/chart.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/format.d.ts +35 -0
- package/dist/artifacts/renderers/sheet/format.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/grid.d.ts +25 -0
- package/dist/artifacts/renderers/sheet/grid.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/mini-chart.d.ts +7 -0
- package/dist/artifacts/renderers/sheet/mini-chart.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/model.d.ts +29 -0
- package/dist/artifacts/renderers/sheet/model.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/selection.d.ts +42 -0
- package/dist/artifacts/renderers/sheet/selection.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/sheet.d.ts +17 -0
- package/dist/artifacts/renderers/sheet/sheet.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/virtual.d.ts +13 -0
- package/dist/artifacts/renderers/sheet/virtual.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/workbook.d.ts +24 -0
- package/dist/artifacts/renderers/sheet/workbook.d.ts.map +1 -0
- package/dist/artifacts/renderers/slides/navigation.d.ts +17 -0
- package/dist/artifacts/renderers/slides/navigation.d.ts.map +1 -0
- package/dist/artifacts/renderers/slides/slides.d.ts +14 -0
- package/dist/artifacts/renderers/slides/slides.d.ts.map +1 -0
- package/dist/artifacts/target.d.ts +29 -0
- package/dist/artifacts/target.d.ts.map +1 -0
- package/dist/artifacts/theme.d.ts +18 -0
- package/dist/artifacts/theme.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts +19 -0
- package/dist/artifacts/viewer.d.ts.map +1 -0
- package/dist/chunk-3schcf10.js +251 -0
- package/dist/chunk-3schcf10.js.map +10 -0
- package/dist/chunk-6n5pdqp0.js +115 -0
- package/dist/chunk-6n5pdqp0.js.map +11 -0
- package/dist/chunk-c7gy61rx.js +276 -0
- package/dist/chunk-c7gy61rx.js.map +10 -0
- package/dist/chunk-g3f4cm8x.js +20 -0
- package/dist/chunk-g3f4cm8x.js.map +10 -0
- package/dist/chunk-gn3k23q5.js +149 -0
- package/dist/chunk-gn3k23q5.js.map +10 -0
- package/dist/chunk-md3p7qdt.js +379 -0
- package/dist/chunk-md3p7qdt.js.map +10 -0
- package/dist/chunk-ng0hdnrq.js +183 -0
- package/dist/chunk-ng0hdnrq.js.map +10 -0
- package/dist/chunk-xxpdn63v.js +15018 -0
- package/dist/chunk-xxpdn63v.js.map +105 -0
- package/dist/chunk-yvhzn4ye.js +98 -0
- package/dist/chunk-yvhzn4ye.js.map +10 -0
- package/dist/codegen.d.ts +8 -4
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts +14 -7
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +31 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +962 -2891
- package/dist/index.js.map +14 -13
- package/dist/locale-messages.d.ts +74 -6
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +75 -8
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +10 -19
- package/dist/locale.js.map +3 -4
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/data/connectors.d.ts +5 -0
- package/dist/pages/data/connectors.d.ts.map +1 -0
- package/dist/pages/data/datasets.d.ts +30 -0
- package/dist/pages/data/datasets.d.ts.map +1 -0
- package/dist/pages/data/live-updates.d.ts +13 -0
- package/dist/pages/data/live-updates.d.ts.map +1 -0
- package/dist/pages/data/messages.d.ts +354 -0
- package/dist/pages/data/messages.d.ts.map +1 -0
- package/dist/pages/data/pipeline-canvas.d.ts +34 -0
- package/dist/pages/data/pipeline-canvas.d.ts.map +1 -0
- package/dist/pages/data/pipelines.d.ts +9 -0
- package/dist/pages/data/pipelines.d.ts.map +1 -0
- package/dist/pages/data/projections.d.ts +10 -0
- package/dist/pages/data/projections.d.ts.map +1 -0
- package/dist/pages/data/schema.d.ts +20 -0
- package/dist/pages/data/schema.d.ts.map +1 -0
- package/dist/pages/data/shared.d.ts +13 -0
- package/dist/pages/data/shared.d.ts.map +1 -0
- package/dist/pages/data/sync-button.d.ts +15 -0
- package/dist/pages/data/sync-button.d.ts.map +1 -0
- package/dist/pages/data/syncs.d.ts +5 -0
- package/dist/pages/data/syncs.d.ts.map +1 -0
- package/dist/pages/home.d.ts +6 -0
- package/dist/pages/home.d.ts.map +1 -0
- package/dist/pages/mosaic.d.ts +5 -0
- package/dist/pages/mosaic.d.ts.map +1 -0
- package/dist/pages/observability/action-run.d.ts +19 -0
- package/dist/pages/observability/action-run.d.ts.map +1 -0
- package/dist/pages/observability/activity/calendar.d.ts +9 -0
- package/dist/pages/observability/activity/calendar.d.ts.map +1 -0
- package/dist/pages/observability/activity/connections.d.ts +7 -0
- package/dist/pages/observability/activity/connections.d.ts.map +1 -0
- package/dist/pages/observability/activity/format.d.ts +11 -0
- package/dist/pages/observability/activity/format.d.ts.map +1 -0
- package/dist/pages/observability/activity/messages.d.ts +231 -0
- package/dist/pages/observability/activity/messages.d.ts.map +1 -0
- package/dist/pages/observability/activity/meta-items.d.ts +10 -0
- package/dist/pages/observability/activity/meta-items.d.ts.map +1 -0
- package/dist/pages/observability/activity/page.d.ts +6 -0
- package/dist/pages/observability/activity/page.d.ts.map +1 -0
- package/dist/pages/observability/activity/period.d.ts +31 -0
- package/dist/pages/observability/activity/period.d.ts.map +1 -0
- package/dist/pages/observability/activity/steps.d.ts +44 -0
- package/dist/pages/observability/activity/steps.d.ts.map +1 -0
- package/dist/pages/observability/activity/timeline.d.ts +36 -0
- package/dist/pages/observability/activity/timeline.d.ts.map +1 -0
- package/dist/pages/observability/activity/users.d.ts +18 -0
- package/dist/pages/observability/activity/users.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/calls.d.ts +27 -0
- package/dist/pages/observability/ai-usage/calls.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/charts.d.ts +23 -0
- package/dist/pages/observability/ai-usage/charts.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/format.d.ts +101 -0
- package/dist/pages/observability/ai-usage/format.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/limits.d.ts +12 -0
- package/dist/pages/observability/ai-usage/limits.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/messages.d.ts +431 -0
- package/dist/pages/observability/ai-usage/messages.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/page.d.ts +6 -0
- package/dist/pages/observability/ai-usage/page.d.ts.map +1 -0
- package/dist/pages/observability/live-updates.d.ts +3 -0
- package/dist/pages/observability/live-updates.d.ts.map +1 -0
- package/dist/pages/observability/logs.d.ts +11 -0
- package/dist/pages/observability/logs.d.ts.map +1 -0
- package/dist/pages/observability/messages.d.ts +329 -0
- package/dist/pages/observability/messages.d.ts.map +1 -0
- package/dist/pages/observability/runs.d.ts +7 -0
- package/dist/pages/observability/runs.d.ts.map +1 -0
- package/dist/pages/observability/workflow-run.d.ts +6 -0
- package/dist/pages/observability/workflow-run.d.ts.map +1 -0
- package/dist/pages/ontology/actions.d.ts +3 -0
- package/dist/pages/ontology/actions.d.ts.map +1 -0
- package/dist/pages/ontology/components/action-button.d.ts +12 -0
- package/dist/pages/ontology/components/action-button.d.ts.map +1 -0
- package/dist/pages/ontology/components/action-param-null-control.d.ts +7 -0
- package/dist/pages/ontology/components/action-param-null-control.d.ts.map +1 -0
- package/dist/pages/ontology/components/collection-toolbar.d.ts +21 -0
- package/dist/pages/ontology/components/collection-toolbar.d.ts.map +1 -0
- package/dist/pages/ontology/components/common.d.ts +16 -0
- package/dist/pages/ontology/components/common.d.ts.map +1 -0
- package/dist/pages/ontology/components/file-ref-upload-field.d.ts +13 -0
- package/dist/pages/ontology/components/file-ref-upload-field.d.ts.map +1 -0
- package/dist/pages/ontology/components/object-filter-popover.d.ts +9 -0
- package/dist/pages/ontology/components/object-filter-popover.d.ts.map +1 -0
- package/dist/pages/ontology/components/object-icon.d.ts +7 -0
- package/dist/pages/ontology/components/object-icon.d.ts.map +1 -0
- package/dist/pages/ontology/components/object-query-bar.d.ts +21 -0
- package/dist/pages/ontology/components/object-query-bar.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-chart.d.ts +18 -0
- package/dist/pages/ontology/components/telemetry-chart.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-grid.d.ts +19 -0
- package/dist/pages/ontology/components/telemetry-grid.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-tile.d.ts +18 -0
- package/dist/pages/ontology/components/telemetry-tile.d.ts.map +1 -0
- package/dist/pages/ontology/components/telemetry-value.d.ts +10 -0
- package/dist/pages/ontology/components/telemetry-value.d.ts.map +1 -0
- package/dist/pages/ontology/components/usage-bar.d.ts +12 -0
- package/dist/pages/ontology/components/usage-bar.d.ts.map +1 -0
- package/dist/pages/ontology/graph.d.ts +6 -0
- package/dist/pages/ontology/graph.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/object-live-updates.d.ts +5 -0
- package/dist/pages/ontology/hooks/object-live-updates.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/object-telemetry-updates.d.ts +8 -0
- package/dist/pages/ontology/hooks/object-telemetry-updates.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/object-type-counts.d.ts +5 -0
- package/dist/pages/ontology/hooks/object-type-counts.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/rule-live-updates.d.ts +9 -0
- package/dist/pages/ontology/hooks/rule-live-updates.d.ts.map +1 -0
- package/dist/pages/ontology/hooks/workflow-live-updates.d.ts +6 -0
- package/dist/pages/ontology/hooks/workflow-live-updates.d.ts.map +1 -0
- package/dist/pages/ontology/lib/action-params.d.ts +55 -0
- package/dist/pages/ontology/lib/action-params.d.ts.map +1 -0
- package/dist/pages/ontology/lib/format-value.d.ts +3 -0
- package/dist/pages/ontology/lib/format-value.d.ts.map +1 -0
- package/dist/pages/ontology/lib/labels.d.ts +3 -0
- package/dist/pages/ontology/lib/labels.d.ts.map +1 -0
- package/dist/pages/ontology/lib/live-update-keys.d.ts +15 -0
- package/dist/pages/ontology/lib/live-update-keys.d.ts.map +1 -0
- package/dist/pages/ontology/lib/object-query.d.ts +72 -0
- package/dist/pages/ontology/lib/object-query.d.ts.map +1 -0
- package/dist/pages/ontology/lib/ontology-graph-layout.d.ts +68 -0
- package/dist/pages/ontology/lib/ontology-graph-layout.d.ts.map +1 -0
- package/dist/pages/ontology/lib/ontology-graph-links.d.ts +4 -0
- package/dist/pages/ontology/lib/ontology-graph-links.d.ts.map +1 -0
- package/dist/pages/ontology/lib/telemetry-history.d.ts +10 -0
- package/dist/pages/ontology/lib/telemetry-history.d.ts.map +1 -0
- package/dist/pages/ontology/lib/time.d.ts +3 -0
- package/dist/pages/ontology/lib/time.d.ts.map +1 -0
- package/dist/pages/ontology/lib/user-preferences.d.ts +8 -0
- package/dist/pages/ontology/lib/user-preferences.d.ts.map +1 -0
- package/dist/pages/ontology/object-page.d.ts +7 -0
- package/dist/pages/ontology/object-page.d.ts.map +1 -0
- package/dist/pages/ontology/object-type.d.ts +3 -0
- package/dist/pages/ontology/object-type.d.ts.map +1 -0
- package/dist/pages/ontology/object-types.d.ts +7 -0
- package/dist/pages/ontology/object-types.d.ts.map +1 -0
- package/dist/pages/ontology/objects.d.ts +6 -0
- package/dist/pages/ontology/objects.d.ts.map +1 -0
- package/dist/pages/ontology/rules.d.ts +32 -0
- package/dist/pages/ontology/rules.d.ts.map +1 -0
- package/dist/pages/ontology/workflow.d.ts +6 -0
- package/dist/pages/ontology/workflow.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/agent-execution-panel.d.ts +17 -0
- package/dist/pages/ontology/workflows/agent-execution-panel.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/intervention-panel.d.ts +5 -0
- package/dist/pages/ontology/workflows/intervention-panel.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/node-execution-panel.d.ts +11 -0
- package/dist/pages/ontology/workflows/node-execution-panel.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/request-run-dialog.d.ts +5 -0
- package/dist/pages/ontology/workflows/request-run-dialog.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-debug-section.d.ts +11 -0
- package/dist/pages/ontology/workflows/run-debug-section.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-input-form.d.ts +18 -0
- package/dist/pages/ontology/workflows/run-input-form.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-progress.d.ts +15 -0
- package/dist/pages/ontology/workflows/run-progress.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/schema-shape.d.ts +10 -0
- package/dist/pages/ontology/workflows/schema-shape.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/status-badge.d.ts +5 -0
- package/dist/pages/ontology/workflows/status-badge.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/utils.d.ts +29 -0
- package/dist/pages/ontology/workflows/utils.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/workflow-card.d.ts +5 -0
- package/dist/pages/ontology/workflows/workflow-card.d.ts.map +1 -0
- package/dist/pages/ontology/workflows.d.ts +3 -0
- package/dist/pages/ontology/workflows.d.ts.map +1 -0
- package/dist/pages/routes.d.ts +26 -0
- package/dist/pages/routes.d.ts.map +1 -0
- package/dist/pages/section-page.d.ts +91 -0
- package/dist/pages/section-page.d.ts.map +1 -0
- package/dist/pages/section-ui.d.ts +212 -0
- package/dist/pages/section-ui.d.ts.map +1 -0
- package/dist/pages/settings/controls.d.ts +94 -0
- package/dist/pages/settings/controls.d.ts.map +1 -0
- package/dist/pages/settings/developers.d.ts +3 -0
- package/dist/pages/settings/developers.d.ts.map +1 -0
- package/dist/pages/settings/members.d.ts +3 -0
- package/dist/pages/settings/members.d.ts.map +1 -0
- package/dist/pages/settings/messages.d.ts +538 -0
- package/dist/pages/settings/messages.d.ts.map +1 -0
- package/dist/pages/settings/personal.d.ts +6 -0
- package/dist/pages/settings/personal.d.ts.map +1 -0
- package/dist/pages/settings/service-accounts.d.ts +3 -0
- package/dist/pages/settings/service-accounts.d.ts.map +1 -0
- package/dist/pages/settings/sessions.d.ts +3 -0
- package/dist/pages/settings/sessions.d.ts.map +1 -0
- package/dist/pages/values.d.ts +77 -0
- package/dist/pages/values.d.ts.map +1 -0
- package/dist/pages.d.ts +45 -0
- package/dist/pages.d.ts.map +1 -0
- package/dist/pages.js +26029 -0
- package/dist/pages.js.map +98 -0
- package/dist/runtime.d.ts +0 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/sections/catalog.d.ts +37 -0
- package/dist/sections/catalog.d.ts.map +1 -0
- package/dist/sections/counts.d.ts +7 -0
- package/dist/sections/counts.d.ts.map +1 -0
- package/dist/sections/sections.d.ts +67 -0
- package/dist/sections/sections.d.ts.map +1 -0
- package/dist/server.d.ts +8 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +3036 -0
- package/dist/server.js.map +19 -0
- package/dist/session.d.ts +18 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/shell/agent-dock.d.ts +7 -0
- package/dist/shell/agent-dock.d.ts.map +1 -0
- package/dist/shell/app-shell.d.ts +42 -0
- package/dist/shell/app-shell.d.ts.map +1 -0
- package/dist/shell/brand.d.ts +15 -0
- package/dist/shell/brand.d.ts.map +1 -0
- package/dist/shell/nav-items.d.ts +34 -0
- package/dist/shell/nav-items.d.ts.map +1 -0
- package/dist/shell/search-command.d.ts +12 -0
- package/dist/shell/search-command.d.ts.map +1 -0
- package/dist/shell/section-nav.d.ts +13 -0
- package/dist/shell/section-nav.d.ts.map +1 -0
- package/dist/shell/user-menu.d.ts +25 -0
- package/dist/shell/user-menu.d.ts.map +1 -0
- package/dist/tailwind.d.ts +4 -4
- package/dist/tailwind.d.ts.map +1 -1
- package/package.json +22 -21
- package/src/agent/activity-label.ts +70 -0
- package/src/agent/agent-chat.tsx +248 -0
- package/src/agent/agent-context-provider.tsx +92 -0
- package/src/agent/agent-execution-trace.tsx +316 -0
- package/src/agent/agent-panel.tsx +74 -0
- package/src/agent/agent-surface-state.ts +113 -0
- package/src/agent/agent-surface.tsx +363 -0
- package/src/agent/agent.css +231 -0
- package/src/agent/agents-page.ts +7 -0
- package/src/agent/artifact-card.tsx +190 -0
- package/src/agent/artifact-panel-state.ts +38 -0
- package/src/agent/artifact-panel.tsx +320 -0
- package/src/agent/bash/bash-tool-view.tsx +288 -0
- package/src/agent/bash/data.ts +137 -0
- package/src/agent/bash/interpret.ts +769 -0
- package/src/agent/bash/renderers.tsx +503 -0
- package/src/agent/bash/shell.ts +195 -0
- package/src/agent/components/activity-status.tsx +86 -0
- package/src/agent/components/agent-thread-switcher.tsx +346 -0
- package/src/agent/components/composer.tsx +870 -0
- package/src/agent/components/context-chips.tsx +63 -0
- package/src/agent/components/context-picker.tsx +88 -0
- package/src/agent/components/conversation-panel.tsx +352 -0
- package/src/agent/components/file-attachment-card.tsx +136 -0
- package/src/agent/components/message-parts.tsx +305 -0
- package/src/agent/components/message-view.tsx +422 -0
- package/src/agent/components/model-controls.tsx +204 -0
- package/src/agent/components/model-picker-row.tsx +136 -0
- package/src/agent/components/provider-logo.tsx +31 -0
- package/src/agent/components/provider-logos.ts +24 -0
- package/src/agent/components/reasoning-effort-slider.tsx +121 -0
- package/src/agent/components/sandbox-recovery.tsx +49 -0
- package/src/agent/components/thread-artifacts-menu.tsx +77 -0
- package/src/agent/components/transcript.tsx +239 -0
- package/src/agent/components/web-fetch-tool-view.tsx +69 -0
- package/src/agent/components/web-search-tool-view.tsx +37 -0
- package/src/agent/components/web-sources.tsx +159 -0
- package/src/agent/format.ts +60 -0
- package/src/agent/hooks/use-agent-conversation.ts +536 -0
- package/src/agent/hooks/use-thread-stream.ts +121 -0
- package/src/agent/i18n/en.ts +500 -0
- package/src/agent/i18n/fr.ts +530 -0
- package/src/agent/i18n/index.ts +14 -0
- package/src/agent/live-run.ts +257 -0
- package/src/agent/model-selection.ts +88 -0
- package/src/agent/object-context-title.ts +57 -0
- package/src/agent/parts.ts +119 -0
- package/src/agent/publish-artifact/interpret.ts +110 -0
- package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +62 -0
- package/src/agent/publish-artifact/use-live-publishes.ts +45 -0
- package/src/agent/react-router.tsx +103 -0
- package/src/agent/read/interpret.ts +101 -0
- package/src/agent/read/read-tool-view.tsx +92 -0
- package/src/agent/requester-settings.ts +55 -0
- package/src/agent/run-presentation.ts +211 -0
- package/src/agent/thread-navigation.ts +11 -0
- package/src/agent/types.ts +37 -0
- package/src/agent/utils/context-display.ts +72 -0
- package/src/agent/utils/context-mention.ts +28 -0
- package/src/agent/utils/web-fetch.ts +20 -0
- package/src/agent/utils/web-search.ts +106 -0
- package/src/agent/view-file/interpret.ts +22 -0
- package/src/agent/view-file/view-file-tool-view.tsx +123 -0
- package/src/artifacts/artifact-page.tsx +61 -0
- package/src/artifacts/artifacts.css +172 -0
- package/src/artifacts/card-details.ts +92 -0
- package/src/artifacts/card-preview.tsx +612 -0
- package/src/artifacts/copy-feedback.ts +25 -0
- package/src/artifacts/file-size.ts +24 -0
- package/src/artifacts/file-source.ts +109 -0
- package/src/artifacts/file-view.ts +57 -0
- package/src/artifacts/frame.tsx +288 -0
- package/src/artifacts/gallery.tsx +405 -0
- package/src/artifacts/kind-icon.tsx +23 -0
- package/src/artifacts/markdown-tree.ts +32 -0
- package/src/artifacts/messages.ts +317 -0
- package/src/artifacts/queries.ts +85 -0
- package/src/artifacts/references/embed-tree.ts +86 -0
- package/src/artifacts/references/references.tsx +739 -0
- package/src/artifacts/renderers/document-tree.ts +157 -0
- package/src/artifacts/renderers/document.tsx +334 -0
- package/src/artifacts/renderers/file.tsx +160 -0
- package/src/artifacts/renderers/notice.tsx +38 -0
- package/src/artifacts/renderers/sheet/chart-data.ts +73 -0
- package/src/artifacts/renderers/sheet/chart.tsx +288 -0
- package/src/artifacts/renderers/sheet/format.ts +142 -0
- package/src/artifacts/renderers/sheet/grid.tsx +709 -0
- package/src/artifacts/renderers/sheet/mini-chart.tsx +241 -0
- package/src/artifacts/renderers/sheet/model.ts +136 -0
- package/src/artifacts/renderers/sheet/selection.ts +152 -0
- package/src/artifacts/renderers/sheet/sheet.tsx +471 -0
- package/src/artifacts/renderers/sheet/virtual.ts +49 -0
- package/src/artifacts/renderers/sheet/workbook.ts +57 -0
- package/src/artifacts/renderers/slides/navigation.ts +38 -0
- package/src/artifacts/renderers/slides/slides.tsx +441 -0
- package/src/artifacts/target.ts +76 -0
- package/src/artifacts/theme.ts +29 -0
- package/src/artifacts/viewer.tsx +476 -0
- package/src/build.ts +13 -2
- package/src/codegen.ts +98 -80
- package/src/createCustomApp.ts +175 -67
- package/src/index.ts +47 -16
- package/src/locale-messages.ts +128 -12
- package/src/locale.ts +1 -2
- package/src/metadata.ts +35 -1
- package/src/pages/canvas.css +43 -0
- package/src/pages/data/connectors.tsx +317 -0
- package/src/pages/data/datasets.tsx +731 -0
- package/src/pages/data/live-updates.ts +71 -0
- package/src/pages/data/messages.ts +349 -0
- package/src/pages/data/pipeline-canvas.tsx +288 -0
- package/src/pages/data/pipelines.tsx +710 -0
- package/src/pages/data/projections.tsx +482 -0
- package/src/pages/data/schema.tsx +62 -0
- package/src/pages/data/shared.tsx +78 -0
- package/src/pages/data/sync-button.tsx +103 -0
- package/src/pages/data/syncs.tsx +326 -0
- package/src/pages/home.tsx +64 -0
- package/src/pages/mosaic.tsx +97 -0
- package/src/pages/observability/action-run.tsx +229 -0
- package/src/pages/observability/activity/calendar.tsx +239 -0
- package/src/pages/observability/activity/connections.tsx +144 -0
- package/src/pages/observability/activity/format.ts +49 -0
- package/src/pages/observability/activity/messages.ts +255 -0
- package/src/pages/observability/activity/meta-items.tsx +23 -0
- package/src/pages/observability/activity/page.tsx +605 -0
- package/src/pages/observability/activity/period.ts +63 -0
- package/src/pages/observability/activity/steps.ts +102 -0
- package/src/pages/observability/activity/timeline.tsx +411 -0
- package/src/pages/observability/activity/users.tsx +133 -0
- package/src/pages/observability/ai-usage/calls.tsx +541 -0
- package/src/pages/observability/ai-usage/charts.tsx +126 -0
- package/src/pages/observability/ai-usage/format.ts +276 -0
- package/src/pages/observability/ai-usage/limits.tsx +629 -0
- package/src/pages/observability/ai-usage/messages.ts +446 -0
- package/src/pages/observability/ai-usage/page.tsx +814 -0
- package/src/pages/observability/live-updates.ts +19 -0
- package/src/pages/observability/logs.tsx +617 -0
- package/src/pages/observability/messages.ts +336 -0
- package/src/pages/observability/runs.tsx +732 -0
- package/src/pages/observability/workflow-run.tsx +323 -0
- package/src/pages/ontology/actions.tsx +749 -0
- package/src/pages/ontology/components/action-button.tsx +355 -0
- package/src/pages/ontology/components/action-param-null-control.tsx +35 -0
- package/src/pages/ontology/components/collection-toolbar.tsx +61 -0
- package/src/pages/ontology/components/common.tsx +60 -0
- package/src/pages/ontology/components/file-ref-upload-field.tsx +279 -0
- package/src/pages/ontology/components/object-filter-popover.tsx +311 -0
- package/src/pages/ontology/components/object-icon.tsx +133 -0
- package/src/pages/ontology/components/object-query-bar.tsx +217 -0
- package/src/pages/ontology/components/telemetry-chart.tsx +392 -0
- package/src/pages/ontology/components/telemetry-grid.tsx +137 -0
- package/src/pages/ontology/components/telemetry-tile.tsx +164 -0
- package/src/pages/ontology/components/telemetry-value.tsx +91 -0
- package/src/pages/ontology/components/usage-bar.tsx +64 -0
- package/src/pages/ontology/graph.tsx +1283 -0
- package/src/pages/ontology/hooks/object-live-updates.ts +53 -0
- package/src/pages/ontology/hooks/object-telemetry-updates.ts +45 -0
- package/src/pages/ontology/hooks/object-type-counts.ts +27 -0
- package/src/pages/ontology/hooks/rule-live-updates.ts +28 -0
- package/src/pages/ontology/hooks/workflow-live-updates.ts +20 -0
- package/src/pages/ontology/lib/action-params.ts +231 -0
- package/src/pages/ontology/lib/format-value.ts +34 -0
- package/src/pages/ontology/lib/labels.ts +50 -0
- package/src/pages/ontology/lib/live-update-keys.ts +62 -0
- package/src/pages/ontology/lib/object-query.ts +372 -0
- package/src/pages/ontology/lib/ontology-graph-layout.ts +1004 -0
- package/src/pages/ontology/lib/ontology-graph-links.ts +15 -0
- package/src/pages/ontology/lib/telemetry-history.ts +56 -0
- package/src/pages/ontology/lib/time.ts +23 -0
- package/src/pages/ontology/lib/user-preferences.ts +52 -0
- package/src/pages/ontology/object-page.tsx +1029 -0
- package/src/pages/ontology/object-type.tsx +910 -0
- package/src/pages/ontology/object-types.tsx +240 -0
- package/src/pages/ontology/objects.tsx +938 -0
- package/src/pages/ontology/rules.tsx +805 -0
- package/src/pages/ontology/workflow.tsx +1485 -0
- package/src/pages/ontology/workflows/agent-execution-panel.tsx +340 -0
- package/src/pages/ontology/workflows/intervention-panel.tsx +261 -0
- package/src/pages/ontology/workflows/node-execution-panel.tsx +86 -0
- package/src/pages/ontology/workflows/request-run-dialog.tsx +197 -0
- package/src/pages/ontology/workflows/run-debug-section.tsx +54 -0
- package/src/pages/ontology/workflows/run-input-form.tsx +900 -0
- package/src/pages/ontology/workflows/run-progress.tsx +83 -0
- package/src/pages/ontology/workflows/schema-shape.tsx +206 -0
- package/src/pages/ontology/workflows/status-badge.tsx +15 -0
- package/src/pages/ontology/workflows/utils.ts +107 -0
- package/src/pages/ontology/workflows/workflow-card.tsx +48 -0
- package/src/pages/ontology/workflows.tsx +143 -0
- package/src/pages/routes.ts +63 -0
- package/src/pages/section-page.tsx +272 -0
- package/src/pages/section-ui.tsx +773 -0
- package/src/pages/settings/controls.tsx +721 -0
- package/src/pages/settings/developers.tsx +163 -0
- package/src/pages/settings/members.tsx +1018 -0
- package/src/pages/settings/messages.ts +551 -0
- package/src/pages/settings/personal.tsx +97 -0
- package/src/pages/settings/service-accounts.tsx +623 -0
- package/src/pages/settings/sessions.tsx +183 -0
- package/src/pages/values.tsx +700 -0
- package/src/pages.ts +59 -0
- package/src/runtime.ts +0 -3
- package/src/sections/catalog.ts +182 -0
- package/src/sections/counts.ts +33 -0
- package/src/sections/sections.tsx +259 -0
- package/src/server.ts +19 -0
- package/src/session.ts +29 -0
- package/src/shell/agent-dock.tsx +32 -0
- package/src/shell/app-shell.tsx +142 -0
- package/src/shell/brand.tsx +47 -0
- package/src/shell/nav-items.tsx +136 -0
- package/src/shell/search-command.tsx +160 -0
- package/src/shell/section-nav.tsx +61 -0
- package/src/shell/user-menu.tsx +206 -0
- package/src/tailwind.ts +4 -4
- package/dist/agents.d.ts +0 -11
- package/dist/agents.d.ts.map +0 -1
- package/dist/agents.js +0 -41
- package/dist/agents.js.map +0 -10
- package/dist/auth.js +0 -3
- package/dist/auth.js.map +0 -9
- package/dist/browser.d.ts +0 -3
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.js +0 -9
- package/dist/browser.js.map +0 -9
- package/dist/chunk-cftmy40z.js +0 -70
- package/dist/chunk-cftmy40z.js.map +0 -10
- package/dist/chunk-e1gj8c1a.js +0 -8
- package/dist/chunk-e1gj8c1a.js.map +0 -10
- package/src/agents.ts +0 -48
- package/src/browser.ts +0 -2
package/src/createCustomApp.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { randomBytes } from "node:crypto"
|
|
2
|
-
import { watch } from "node:fs"
|
|
2
|
+
import { existsSync, watch } from "node:fs"
|
|
3
3
|
import { access, cp, mkdir, readFile, rm, writeFile } from "node:fs/promises"
|
|
4
4
|
import { dirname, isAbsolute, join, normalize, relative, resolve } from "node:path"
|
|
5
5
|
import { pathToFileURL } from "node:url"
|
|
6
|
-
import type { AuthSessionAudience } from "@sixb/core"
|
|
7
6
|
import {
|
|
8
7
|
type BuildAppResult,
|
|
9
8
|
type BuildSharedAppDevResult,
|
|
@@ -23,6 +22,7 @@ import {
|
|
|
23
22
|
import { devReloadResponse } from "./dev-reload"
|
|
24
23
|
import { collectPublicEnv, renderCustomAppRuntimeScript } from "./runtime"
|
|
25
24
|
import { type PageRoute, routePatternKey, scanAppRoutes } from "./scanner"
|
|
25
|
+
import { sectionCatalog } from "./sections/catalog"
|
|
26
26
|
import { type CustomAppStylesheet, resolveCustomAppStylesheet } from "./styles"
|
|
27
27
|
import { createTailwindCssCompiler, type TailwindCssCompiler } from "./tailwind"
|
|
28
28
|
|
|
@@ -32,9 +32,9 @@ export interface CreateCustomAppOptions {
|
|
|
32
32
|
generatedDir?: string
|
|
33
33
|
publicDir?: string
|
|
34
34
|
apiBaseUrl?: string
|
|
35
|
-
audience?: AuthSessionAudience
|
|
36
35
|
authEnabled?: boolean
|
|
37
|
-
|
|
36
|
+
/** Home, the agent, object pages and the sections. On unless a test turns them off. */
|
|
37
|
+
builtInPages?: boolean
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export interface CustomAppDevOptions {
|
|
@@ -59,36 +59,51 @@ export interface CustomAppStartOptions {
|
|
|
59
59
|
port?: number
|
|
60
60
|
outdir?: string
|
|
61
61
|
apiBaseUrl?: string
|
|
62
|
-
audience?: AuthSessionAudience
|
|
63
62
|
authEnabled?: boolean
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
export interface
|
|
65
|
+
export interface CustomAppServer {
|
|
67
66
|
host: string
|
|
68
67
|
port: number
|
|
69
68
|
url: string
|
|
70
69
|
stop(): Promise<void>
|
|
71
70
|
}
|
|
72
71
|
|
|
72
|
+
export interface CustomAppDevServer extends CustomAppServer {
|
|
73
|
+
/** Whether it reloads the app's sources itself: not while the project has no `app/` folder. */
|
|
74
|
+
watchesSources: boolean
|
|
75
|
+
}
|
|
76
|
+
|
|
73
77
|
export interface CustomAppInstance {
|
|
74
78
|
scanRoutes(): Promise<PageRoute[]>
|
|
75
|
-
hasRoutes(): Promise<boolean>
|
|
76
79
|
prepareAuthExperience(
|
|
77
80
|
options?: CustomAuthExperienceBuildOptions
|
|
78
81
|
): Promise<CustomAuthExperienceBuildResult | null>
|
|
79
82
|
dev(options?: CustomAppDevOptions): Promise<CustomAppDevServer>
|
|
80
83
|
build(options?: CustomAppBuildOptions): Promise<BuildAppResult>
|
|
81
|
-
start(options?: CustomAppStartOptions): Promise<
|
|
84
|
+
start(options?: CustomAppStartOptions): Promise<CustomAppServer>
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
type BunServeRoutes = NonNullable<Parameters<typeof Bun.serve>[0]["routes"]>
|
|
85
88
|
type BunServeRoute = BunServeRoutes[string]
|
|
86
89
|
const packageRoot = resolve(import.meta.dir, "..")
|
|
87
|
-
const builtInAgentRouteModule = "@sixb/app/agents"
|
|
88
90
|
const builtInAgentRoutePaths = ["/agents", "/agents/new/:agentId", "/agents/:threadId"] as const
|
|
89
|
-
|
|
91
|
+
// The shell parts a layout imports from `@sixb/app` style themselves with the same Tailwind build.
|
|
92
|
+
const shellSourcePath = join(packageRoot, "src", "shell")
|
|
93
|
+
const builtInPageModule = "@sixb/app/pages"
|
|
94
|
+
const builtInPageSourcePath = join(packageRoot, "src", "pages")
|
|
95
|
+
// Styles built-in pages need beyond utilities: the pipeline canvas.
|
|
96
|
+
const builtInPageStylesheetPath = join(packageRoot, "src", "pages", "canvas.css")
|
|
97
|
+
// The agent's styles beyond utilities, and the `@source` for its components.
|
|
98
|
+
const agentStylesheetPath = join(packageRoot, "src", "agent", "agent.css")
|
|
99
|
+
// The artifact viewer's: the document page and the `@source` for its components.
|
|
100
|
+
const artifactsStylesheetPath = join(packageRoot, "src", "artifacts", "artifacts.css")
|
|
90
101
|
const customAppManifestRoute = "/app.webmanifest"
|
|
91
102
|
const internalAppShellRoute = "/__sixb/generated/app-shell"
|
|
103
|
+
// Files the built-in pages show, such as connector logos, served from the package itself so they
|
|
104
|
+
// need no build step of the project's.
|
|
105
|
+
const frameworkAssetsRoute = "/__sixb/assets"
|
|
106
|
+
const frameworkAssetsDir = join(packageRoot, "assets")
|
|
92
107
|
const internalSharedAppShellRoute = "/__sixb/generated/shared-app-shell"
|
|
93
108
|
|
|
94
109
|
export async function createCustomApp(options: CreateCustomAppOptions): Promise<CustomAppInstance> {
|
|
@@ -99,18 +114,23 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
99
114
|
? resolve(rootDir, options.publicDir)
|
|
100
115
|
: resolve(appDir, "public")
|
|
101
116
|
const apiBaseUrl = options.apiBaseUrl
|
|
102
|
-
const audience = options.audience ?? "app"
|
|
103
117
|
const authEnabled = options.authEnabled ?? true
|
|
104
|
-
const
|
|
118
|
+
const builtInPagesEnabled = options.builtInPages ?? true
|
|
105
119
|
|
|
106
120
|
async function scanRoutes(): Promise<PageRoute[]> {
|
|
107
121
|
return [...(await scanAppRoutes(appDir)).pages]
|
|
108
122
|
}
|
|
109
123
|
|
|
124
|
+
// With the built-in pages on, every project is an app, even without an `app/` folder: they fill
|
|
125
|
+
// its routes, Home included.
|
|
126
|
+
function servesApp(routes: readonly PageRoute[]): boolean {
|
|
127
|
+
return routes.length > 0 || builtInPagesEnabled
|
|
128
|
+
}
|
|
129
|
+
|
|
110
130
|
let tailwindCompiler: TailwindCssCompiler | null = null
|
|
111
131
|
let tailwindCompilerKey: string | null = null
|
|
112
132
|
let authTailwindCompiler: TailwindCssCompiler | null = null
|
|
113
|
-
let
|
|
133
|
+
let frameworkCssCompiler: TailwindCssCompiler | null = null
|
|
114
134
|
|
|
115
135
|
// `app/globals.css` is source. When it uses Tailwind, compile it to
|
|
116
136
|
// `.sixb/generated/app.css` and bundle that; plain CSS bundles as-is. This
|
|
@@ -152,19 +172,21 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
152
172
|
await compiler.compile()
|
|
153
173
|
}
|
|
154
174
|
|
|
155
|
-
async function
|
|
175
|
+
async function prepareCombinedStylesheet(
|
|
156
176
|
stylesheet: Extract<CustomAppStylesheet, { kind: "tailwind" }>
|
|
157
177
|
): Promise<string> {
|
|
158
178
|
const inputPath = join(generatedDir, "app.input.css")
|
|
159
179
|
const uiGlobalsPath = Bun.resolveSync("@sixb/ui/globals.css", packageRoot)
|
|
160
|
-
const agentUiGlobalsPath = Bun.resolveSync("@sixb/agent-ui/globals.css", packageRoot)
|
|
161
180
|
await writeFileIfChanged(
|
|
162
181
|
inputPath,
|
|
163
182
|
[
|
|
164
183
|
`@import ${JSON.stringify(uiGlobalsPath)};`,
|
|
165
|
-
`@source ${JSON.stringify(
|
|
184
|
+
`@source ${JSON.stringify(shellSourcePath)};`,
|
|
185
|
+
`@source ${JSON.stringify(builtInPageSourcePath)};`,
|
|
186
|
+
`@import ${JSON.stringify(builtInPageStylesheetPath)};`,
|
|
166
187
|
`@import ${JSON.stringify(stylesheet.sourcePath)};`,
|
|
167
|
-
`@import ${JSON.stringify(
|
|
188
|
+
`@import ${JSON.stringify(agentStylesheetPath)};`,
|
|
189
|
+
`@import ${JSON.stringify(artifactsStylesheetPath)};`,
|
|
168
190
|
"",
|
|
169
191
|
].join("\n")
|
|
170
192
|
)
|
|
@@ -181,16 +203,16 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
181
203
|
|
|
182
204
|
if (stylesheet.kind === "tailwind" && builtInRoutes.length > 0) {
|
|
183
205
|
return {
|
|
184
|
-
stylesheetPath: await
|
|
206
|
+
stylesheetPath: await prepareCombinedStylesheet(stylesheet),
|
|
185
207
|
frameworkStylesheetPaths: [],
|
|
186
208
|
}
|
|
187
209
|
}
|
|
188
210
|
|
|
189
211
|
const preparedStylesheet = await prepareStylesheet(stylesheet)
|
|
190
|
-
const
|
|
212
|
+
const frameworkStylesheetPath = await prepareFrameworkStylesheet(builtInRoutes)
|
|
191
213
|
|
|
192
214
|
return {
|
|
193
|
-
frameworkStylesheetPaths:
|
|
215
|
+
frameworkStylesheetPaths: frameworkStylesheetPath ? [frameworkStylesheetPath] : [],
|
|
194
216
|
stylesheetPath:
|
|
195
217
|
preparedStylesheet.kind === "none"
|
|
196
218
|
? null
|
|
@@ -200,35 +222,37 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
200
222
|
}
|
|
201
223
|
}
|
|
202
224
|
|
|
203
|
-
async function
|
|
225
|
+
async function prepareFrameworkStylesheet(
|
|
204
226
|
builtInRoutes: readonly BuiltInRouteManifestEntry[]
|
|
205
227
|
): Promise<string | null> {
|
|
206
228
|
if (builtInRoutes.length === 0) {
|
|
207
229
|
return null
|
|
208
230
|
}
|
|
209
231
|
|
|
210
|
-
const inputPath = join(generatedDir, "
|
|
211
|
-
const outputPath = join(generatedDir, "
|
|
232
|
+
const inputPath = join(generatedDir, "framework.input.css")
|
|
233
|
+
const outputPath = join(generatedDir, "framework.css")
|
|
212
234
|
const uiGlobalsPath = Bun.resolveSync("@sixb/ui/globals.css", packageRoot)
|
|
213
|
-
const agentUiGlobalsPath = Bun.resolveSync("@sixb/agent-ui/globals.css", packageRoot)
|
|
214
235
|
await writeFileIfChanged(
|
|
215
236
|
inputPath,
|
|
216
237
|
[
|
|
217
238
|
`@import ${JSON.stringify(uiGlobalsPath)};`,
|
|
218
|
-
`@source ${JSON.stringify(
|
|
219
|
-
`@
|
|
239
|
+
`@source ${JSON.stringify(shellSourcePath)};`,
|
|
240
|
+
`@source ${JSON.stringify(builtInPageSourcePath)};`,
|
|
241
|
+
`@import ${JSON.stringify(builtInPageStylesheetPath)};`,
|
|
242
|
+
`@import ${JSON.stringify(agentStylesheetPath)};`,
|
|
243
|
+
`@import ${JSON.stringify(artifactsStylesheetPath)};`,
|
|
220
244
|
"",
|
|
221
245
|
].join("\n")
|
|
222
246
|
)
|
|
223
247
|
|
|
224
|
-
|
|
248
|
+
frameworkCssCompiler ??= createTailwindCssCompiler({
|
|
225
249
|
inputPath,
|
|
226
250
|
outputPath,
|
|
227
251
|
cwd: packageRoot,
|
|
228
252
|
resolveFrom: packageRoot,
|
|
229
253
|
label: "[SixbCustomApp]",
|
|
230
254
|
})
|
|
231
|
-
await
|
|
255
|
+
await frameworkCssCompiler.compile()
|
|
232
256
|
return outputPath
|
|
233
257
|
}
|
|
234
258
|
|
|
@@ -241,13 +265,14 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
241
265
|
sharedMainPath: string
|
|
242
266
|
routes: PageRoute[]
|
|
243
267
|
}> {
|
|
268
|
+
assertAppPackagesInstalled(rootDir)
|
|
244
269
|
const discovery = await scanAppRoutes(appDir)
|
|
245
270
|
const routes = [...discovery.pages]
|
|
246
|
-
if (routes
|
|
271
|
+
if (!servesApp(routes)) {
|
|
247
272
|
throw new Error(`[SixbCustomApp] No app routes found in ${appDir}`)
|
|
248
273
|
}
|
|
249
274
|
|
|
250
|
-
const builtInRoutes =
|
|
275
|
+
const builtInRoutes = builtInPagesEnabled ? builtInRoutesFor(routes) : []
|
|
251
276
|
const stylesheets = await prepareStylesheets(builtInRoutes)
|
|
252
277
|
await generateRouteManifest(routes, generatedDir, {
|
|
253
278
|
builtInRoutes,
|
|
@@ -255,12 +280,13 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
255
280
|
})
|
|
256
281
|
const entry = await generateAppEntry(rootDir, generatedDir, {
|
|
257
282
|
apiBaseUrl,
|
|
258
|
-
audience,
|
|
259
283
|
authEnabled,
|
|
260
284
|
appDir,
|
|
261
285
|
publicDir,
|
|
262
286
|
frameworkStylesheetPaths: stylesheets.frameworkStylesheetPaths,
|
|
263
287
|
stylesheetPath: stylesheets.stylesheetPath,
|
|
288
|
+
sections: builtInPagesEnabled,
|
|
289
|
+
projectPages: routes.length > 0,
|
|
264
290
|
})
|
|
265
291
|
return { ...entry, routes }
|
|
266
292
|
}
|
|
@@ -322,11 +348,6 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
322
348
|
return await scanRoutes()
|
|
323
349
|
},
|
|
324
350
|
|
|
325
|
-
async hasRoutes() {
|
|
326
|
-
const routes = await scanRoutes()
|
|
327
|
-
return routes.length > 0
|
|
328
|
-
},
|
|
329
|
-
|
|
330
351
|
async prepareAuthExperience(options) {
|
|
331
352
|
return await prepareAuthExperience(options)
|
|
332
353
|
},
|
|
@@ -334,9 +355,9 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
334
355
|
async dev(devOptions: CustomAppDevOptions = {}) {
|
|
335
356
|
const publicEnv = collectPublicEnv()
|
|
336
357
|
const withRuntime = (html: string) =>
|
|
337
|
-
injectRuntimeConfig(html, { apiBaseUrl,
|
|
358
|
+
injectRuntimeConfig(html, { apiBaseUrl, authEnabled, publicEnv })
|
|
338
359
|
const host = devOptions.host ?? "0.0.0.0"
|
|
339
|
-
const port = devOptions.port ??
|
|
360
|
+
const port = devOptions.port ?? 3000
|
|
340
361
|
const { htmlPath, manifestPath, sharedHtmlPath, sharedMainPath } = await prepareGeneratedApp()
|
|
341
362
|
await prepareAuthExperience()
|
|
342
363
|
let htmlImportVersion = 0
|
|
@@ -364,13 +385,15 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
364
385
|
...sharedAssetRoutes,
|
|
365
386
|
...reservedSixbRoutes(),
|
|
366
387
|
"/__sixb/dev-reload.js": getHeadRoute(devReloadResponse),
|
|
388
|
+
[`${frameworkAssetsRoute}/*`]: getHeadRoute((request) =>
|
|
389
|
+
frameworkAssetResponse(request, new URL(request.url).pathname)
|
|
390
|
+
),
|
|
367
391
|
[customAppManifestRoute]: manifestRoute(manifestPath),
|
|
368
392
|
[privateAppShellRoute]: htmlBundleRoute(bundle),
|
|
369
393
|
...sharedAppDevRoutes(
|
|
370
394
|
async () =>
|
|
371
395
|
injectRuntimeConfig((await ensureSharedBuild()).html, {
|
|
372
396
|
apiBaseUrl,
|
|
373
|
-
audience: "app",
|
|
374
397
|
authEnabled: false,
|
|
375
398
|
publicEnv,
|
|
376
399
|
}),
|
|
@@ -459,23 +482,27 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
459
482
|
console.error(`[SixbCustomApp] Rebuild failed: ${message}`)
|
|
460
483
|
})
|
|
461
484
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
485
|
+
// A project without an `app/` folder serves the built-in pages alone. Nothing here can
|
|
486
|
+
// watch a folder that does not exist yet, so `sixb dev` restarts when one is created.
|
|
487
|
+
const watcher = (await pathExists(appDir))
|
|
488
|
+
? watch(appDir, { recursive: true }, (_eventType, filename) => {
|
|
489
|
+
if (!filename) return
|
|
490
|
+
if (!/\.(ts|tsx|css)$/.test(String(filename))) return
|
|
491
|
+
|
|
492
|
+
if (rebuildTimer) {
|
|
493
|
+
clearTimeout(rebuildTimer)
|
|
494
|
+
}
|
|
495
|
+
rebuildTimer = setTimeout(() => {
|
|
496
|
+
rebuildTimer = null
|
|
497
|
+
enqueueRebuild()
|
|
498
|
+
}, 80)
|
|
499
|
+
})
|
|
500
|
+
: null
|
|
474
501
|
|
|
475
502
|
// An FSWatcher emits `error` as an event, and an unhandled one takes the whole dev process
|
|
476
503
|
// down — the `.catch()` above only covers a failed rebuild. Losing file watching should cost
|
|
477
504
|
// hot reload, not the server: keep serving the last good build and say so.
|
|
478
|
-
watcher
|
|
505
|
+
watcher?.on("error", (error: unknown) => {
|
|
479
506
|
const message = error instanceof Error ? error.message : String(error)
|
|
480
507
|
console.error(
|
|
481
508
|
`[SixbCustomApp] Stopped watching ${appDir}: ${message}. ` +
|
|
@@ -489,17 +516,18 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
489
516
|
host,
|
|
490
517
|
port,
|
|
491
518
|
url: `http://${displayHost}:${port}`,
|
|
519
|
+
watchesSources: watcher !== null,
|
|
492
520
|
async stop() {
|
|
493
521
|
stopping = true
|
|
494
522
|
if (rebuildTimer) {
|
|
495
523
|
clearTimeout(rebuildTimer)
|
|
496
524
|
rebuildTimer = null
|
|
497
525
|
}
|
|
498
|
-
watcher
|
|
526
|
+
watcher?.close()
|
|
499
527
|
await rebuildChain
|
|
500
528
|
await tailwindCompiler?.stop()
|
|
501
529
|
await authTailwindCompiler?.stop()
|
|
502
|
-
await
|
|
530
|
+
await frameworkCssCompiler?.stop()
|
|
503
531
|
const activeServer = server
|
|
504
532
|
server = null
|
|
505
533
|
activeServer?.stop(true)
|
|
@@ -547,7 +575,7 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
547
575
|
async start(startOptions: CustomAppStartOptions = {}) {
|
|
548
576
|
const publicEnv = collectPublicEnv()
|
|
549
577
|
const host = startOptions.host ?? "0.0.0.0"
|
|
550
|
-
const port = startOptions.port ??
|
|
578
|
+
const port = startOptions.port ?? 3000
|
|
551
579
|
const outdir = resolve(rootDir, startOptions.outdir ?? join(".sixb", "dist", "app"))
|
|
552
580
|
const indexPath = join(outdir, "index.html")
|
|
553
581
|
const sharedIndexPath = join(outdir, SHARED_APP_SHELL_FILE_NAME)
|
|
@@ -563,13 +591,11 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
563
591
|
|
|
564
592
|
const indexHtml = injectRuntimeConfig(await Bun.file(indexPath).text(), {
|
|
565
593
|
apiBaseUrl: startOptions.apiBaseUrl ?? apiBaseUrl,
|
|
566
|
-
audience: startOptions.audience ?? audience,
|
|
567
594
|
authEnabled: startOptions.authEnabled ?? authEnabled,
|
|
568
595
|
publicEnv,
|
|
569
596
|
})
|
|
570
597
|
const sharedIndexHtml = injectRuntimeConfig(await Bun.file(sharedIndexPath).text(), {
|
|
571
598
|
apiBaseUrl: startOptions.apiBaseUrl ?? apiBaseUrl,
|
|
572
|
-
audience: "app",
|
|
573
599
|
authEnabled: false,
|
|
574
600
|
publicEnv,
|
|
575
601
|
})
|
|
@@ -592,6 +618,10 @@ export async function createCustomApp(options: CreateCustomAppOptions): Promise<
|
|
|
592
618
|
return notFoundResponse()
|
|
593
619
|
}
|
|
594
620
|
|
|
621
|
+
if (url.pathname.startsWith(`${frameworkAssetsRoute}/`)) {
|
|
622
|
+
return frameworkAssetResponse(req, url.pathname)
|
|
623
|
+
}
|
|
624
|
+
|
|
595
625
|
if (isSharedAppRoute(url.pathname)) {
|
|
596
626
|
if (isAssetRequest(url.pathname)) {
|
|
597
627
|
return notFoundResponse()
|
|
@@ -664,15 +694,84 @@ async function pathExists(path: string): Promise<boolean> {
|
|
|
664
694
|
}
|
|
665
695
|
}
|
|
666
696
|
|
|
667
|
-
|
|
668
|
-
|
|
697
|
+
// The generated app imports these from the project, so the page code and the framework share one
|
|
698
|
+
// copy of React. `@sixb/app` only names them as peers.
|
|
699
|
+
const appPeerPackages = ["react", "react-dom", "react-router-dom", "@tanstack/react-query"] as const
|
|
700
|
+
|
|
701
|
+
// Looks for `node_modules` as the bundler does. `Bun.resolveSync` would also find Bun's global
|
|
702
|
+
// install cache, which the bundler never reads.
|
|
703
|
+
function assertAppPackagesInstalled(rootDir: string): void {
|
|
704
|
+
const missing = appPeerPackages.filter((name) => {
|
|
705
|
+
for (let dir = rootDir; ; dir = dirname(dir)) {
|
|
706
|
+
if (existsSync(join(dir, "node_modules", name, "package.json"))) return false
|
|
707
|
+
if (dirname(dir) === dir) return true
|
|
708
|
+
}
|
|
709
|
+
})
|
|
710
|
+
if (missing.length > 0) throw new AppPackagesMissingError(missing)
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/** The project lacks packages the app is bundled from. `sixb dev` keeps the API running. */
|
|
714
|
+
export class AppPackagesMissingError extends Error {
|
|
715
|
+
readonly name = "AppPackagesMissingError"
|
|
716
|
+
|
|
717
|
+
constructor(readonly missing: readonly string[]) {
|
|
718
|
+
super(
|
|
719
|
+
`[SixbCustomApp] The app needs ${missing.join(", ")} in this project. Install them with: ` +
|
|
720
|
+
`bun add ${missing.join(" ")}`
|
|
721
|
+
)
|
|
722
|
+
}
|
|
723
|
+
}
|
|
669
724
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
725
|
+
function builtInRoutesFor(routes: readonly PageRoute[]): BuiltInRouteManifestEntry[] {
|
|
726
|
+
const projectRoutePatterns = new Set(routes.map((route) => routePatternKey(route.path)))
|
|
727
|
+
const builtInRoutes: BuiltInRouteManifestEntry[] = [
|
|
728
|
+
...builtInAgentRoutePaths.map((path) => ({
|
|
673
729
|
path,
|
|
674
|
-
moduleSpecifier:
|
|
675
|
-
|
|
730
|
+
moduleSpecifier: builtInPageModule,
|
|
731
|
+
exportName: "AgentsPage",
|
|
732
|
+
})),
|
|
733
|
+
// Home starts conversations that continue on the agent routes, so it ships with them.
|
|
734
|
+
{ path: "/", moduleSpecifier: builtInPageModule, exportName: "HomePage" },
|
|
735
|
+
// Every object has a page, outside any section: grants decide who reads it.
|
|
736
|
+
{
|
|
737
|
+
path: "/objects/:objectTypeId/:primaryId",
|
|
738
|
+
moduleSpecifier: builtInPageModule,
|
|
739
|
+
exportName: "ObjectPage",
|
|
740
|
+
},
|
|
741
|
+
// So does every artifact: its owner reads it wherever a link to it leads, and finds it among
|
|
742
|
+
// the rest in the gallery.
|
|
743
|
+
{ path: "/artifacts", moduleSpecifier: builtInPageModule, exportName: "ArtifactsPage" },
|
|
744
|
+
{
|
|
745
|
+
path: "/artifacts/:artifactId",
|
|
746
|
+
moduleSpecifier: builtInPageModule,
|
|
747
|
+
exportName: "ArtifactPage",
|
|
748
|
+
},
|
|
749
|
+
// The sections are developer tooling: opening one is not using the app.
|
|
750
|
+
...sectionCatalog.flatMap((section) => [
|
|
751
|
+
{
|
|
752
|
+
path: section.path,
|
|
753
|
+
moduleSpecifier: builtInPageModule,
|
|
754
|
+
exportName: section.indexExportName,
|
|
755
|
+
recordsActivity: false,
|
|
756
|
+
},
|
|
757
|
+
...section.pages.flatMap((page) => [
|
|
758
|
+
{
|
|
759
|
+
path: page.path,
|
|
760
|
+
moduleSpecifier: builtInPageModule,
|
|
761
|
+
exportName: page.exportName,
|
|
762
|
+
recordsActivity: false,
|
|
763
|
+
},
|
|
764
|
+
...(page.details ?? []).map((detail) => ({
|
|
765
|
+
path: detail.path,
|
|
766
|
+
moduleSpecifier: builtInPageModule,
|
|
767
|
+
exportName: detail.exportName,
|
|
768
|
+
recordsActivity: false,
|
|
769
|
+
})),
|
|
770
|
+
]),
|
|
771
|
+
]),
|
|
772
|
+
]
|
|
773
|
+
|
|
774
|
+
return builtInRoutes.filter((route) => !projectRoutePatterns.has(routePatternKey(route.path)))
|
|
676
775
|
}
|
|
677
776
|
|
|
678
777
|
async function writeFileIfChanged(path: string, content: string): Promise<void> {
|
|
@@ -698,6 +797,16 @@ function isFileNotFoundError(error: unknown): boolean {
|
|
|
698
797
|
)
|
|
699
798
|
}
|
|
700
799
|
|
|
800
|
+
async function frameworkAssetResponse(request: Request, pathname: string): Promise<Response> {
|
|
801
|
+
const resolvedPath = resolveStaticPath(
|
|
802
|
+
frameworkAssetsDir,
|
|
803
|
+
pathname.slice(frameworkAssetsRoute.length)
|
|
804
|
+
)
|
|
805
|
+
if (!resolvedPath || !(await Bun.file(resolvedPath).exists())) return notFoundResponse()
|
|
806
|
+
// A release replaces the package, and with it every asset, so a day of caching is safe.
|
|
807
|
+
return staticFileResponse(request, resolvedPath, { "cache-control": "public, max-age=86400" })
|
|
808
|
+
}
|
|
809
|
+
|
|
701
810
|
async function createPublicRoutes(publicDir: string): Promise<BunServeRoutes> {
|
|
702
811
|
const files = new Bun.Glob("**/*").scan({
|
|
703
812
|
cwd: publicDir,
|
|
@@ -912,7 +1021,6 @@ function injectRuntimeConfig(
|
|
|
912
1021
|
html: string,
|
|
913
1022
|
config: {
|
|
914
1023
|
readonly apiBaseUrl?: string
|
|
915
|
-
readonly audience: AuthSessionAudience
|
|
916
1024
|
readonly authEnabled: boolean
|
|
917
1025
|
readonly publicEnv: Record<string, string>
|
|
918
1026
|
}
|
|
@@ -920,12 +1028,12 @@ function injectRuntimeConfig(
|
|
|
920
1028
|
const existingRuntimeScript = /<script>window\.__SIXB_RUNTIME__ = (.*?);<\/script>/
|
|
921
1029
|
const existingConfig = html.match(existingRuntimeScript)?.[1]
|
|
922
1030
|
const script = renderCustomAppRuntimeScript({
|
|
923
|
-
auth: {
|
|
1031
|
+
auth: { enabled: config.authEnabled },
|
|
924
1032
|
...(existingConfig ? JSON.parse(existingConfig) : {}),
|
|
925
1033
|
...(config.apiBaseUrl
|
|
926
1034
|
? {
|
|
927
1035
|
api: { baseUrl: config.apiBaseUrl },
|
|
928
|
-
auth: {
|
|
1036
|
+
auth: { enabled: config.authEnabled },
|
|
929
1037
|
}
|
|
930
1038
|
: {}),
|
|
931
1039
|
publicEnv: config.publicEnv,
|
package/src/index.ts
CHANGED
|
@@ -1,19 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export {
|
|
1
|
+
/**
|
|
2
|
+
* Everything `@sixb/app` offers code in a project's `app/` directory.
|
|
3
|
+
*
|
|
4
|
+
* One module for both places that code runs: the browser bundle, and Bun when the build imports
|
|
5
|
+
* `app/layout.tsx` to read its exports. Nothing here may need Node or Bun, and nothing may touch
|
|
6
|
+
* `window` or `document` at module scope. The CLI's tooling lives in `@sixb/app/server`.
|
|
7
|
+
*
|
|
8
|
+
* Components and data stay where they live: `@sixb/ui` for the design system and `@sixb/client`
|
|
9
|
+
* for the API. This entry never re-exports them, so each name has one import path.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export { agentContext } from "@sixb/core/agents/context"
|
|
13
|
+
export type { ModelReasoningLevel } from "@sixb/core/models"
|
|
14
|
+
export { AgentContextProvider, useAgentContext } from "./agent/agent-context-provider"
|
|
15
|
+
export { AgentPanel, type AgentPanelProps } from "./agent/agent-panel"
|
|
16
|
+
export { AgentSurface, type AgentSurfaceMode, type AgentSurfaceProps } from "./agent/agent-surface"
|
|
17
|
+
export { setAgentSurfaceMode } from "./agent/agent-surface-state"
|
|
18
|
+
export { Composer, type ComposerProps } from "./agent/components/composer"
|
|
19
|
+
export { AgentChatPage, type AgentChatPageProps } from "./agent/react-router"
|
|
20
|
+
export type { LanguageModel } from "./agent/types"
|
|
21
|
+
export type { AuthExperienceActions, AuthExperienceProps, AuthExperienceState } from "./auth"
|
|
13
22
|
export type { AppMetadata } from "./metadata"
|
|
23
|
+
export { SyncButton, type SyncButtonProps } from "./pages/data/sync-button"
|
|
14
24
|
export { publicEnv } from "./public-env"
|
|
25
|
+
export type { AppSectionId } from "./sections/catalog"
|
|
26
|
+
export {
|
|
27
|
+
type AppSection,
|
|
28
|
+
type AppVisibility,
|
|
29
|
+
useCurrentSection,
|
|
30
|
+
useSections,
|
|
31
|
+
} from "./sections/sections"
|
|
32
|
+
export { type CurrentUser, useCurrentUser, useSignOut } from "./session"
|
|
33
|
+
export { AgentDock } from "./shell/agent-dock"
|
|
34
|
+
export {
|
|
35
|
+
AppShell,
|
|
36
|
+
type AppShellProps,
|
|
37
|
+
AppShellProvider,
|
|
38
|
+
type AppShellProviderProps,
|
|
39
|
+
} from "./shell/app-shell"
|
|
40
|
+
export { Brand, type BrandProps } from "./shell/brand"
|
|
15
41
|
export {
|
|
16
|
-
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
|
|
42
|
+
type NavEntry,
|
|
43
|
+
type NavGroup,
|
|
44
|
+
type NavItem,
|
|
45
|
+
NavItems,
|
|
46
|
+
type NavItemsProps,
|
|
47
|
+
} from "./shell/nav-items"
|
|
48
|
+
export { SearchCommand, type SearchCommandProps } from "./shell/search-command"
|
|
49
|
+
export { SectionNav, type SectionNavProps } from "./shell/section-nav"
|
|
50
|
+
export { UserMenu, type UserMenuItemProps, type UserMenuProps } from "./shell/user-menu"
|