@sixb/app 0.1.10 → 0.1.12
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 +25 -19
- 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 +24 -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 +27 -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/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 +13 -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/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/document-preview/classify.d.ts +4 -0
- package/dist/agent/document-preview/classify.d.ts.map +1 -0
- package/dist/agent/document-preview/content-policy.d.ts +10 -0
- package/dist/agent/document-preview/content-policy.d.ts.map +1 -0
- package/dist/agent/document-preview/content.d.ts +26 -0
- package/dist/agent/document-preview/content.d.ts.map +1 -0
- package/dist/agent/document-preview/delimited.d.ts +19 -0
- package/dist/agent/document-preview/delimited.d.ts.map +1 -0
- package/dist/agent/document-preview/document-preview-root.d.ts +24 -0
- package/dist/agent/document-preview/document-preview-root.d.ts.map +1 -0
- package/dist/agent/document-preview/file-size.d.ts +3 -0
- package/dist/agent/document-preview/file-size.d.ts.map +1 -0
- package/dist/agent/document-preview/html.d.ts +9 -0
- package/dist/agent/document-preview/html.d.ts.map +1 -0
- package/dist/agent/document-preview/persistence.d.ts +6 -0
- package/dist/agent/document-preview/persistence.d.ts.map +1 -0
- package/dist/agent/document-preview/presentation.d.ts +3 -0
- package/dist/agent/document-preview/presentation.d.ts.map +1 -0
- package/dist/agent/document-preview/rendering.d.ts +14 -0
- package/dist/agent/document-preview/rendering.d.ts.map +1 -0
- package/dist/agent/document-preview/source.d.ts +13 -0
- package/dist/agent/document-preview/source.d.ts.map +1 -0
- package/dist/agent/document-preview/state.d.ts +27 -0
- package/dist/agent/document-preview/state.d.ts.map +1 -0
- package/dist/agent/document-preview/types.d.ts +33 -0
- package/dist/agent/document-preview/types.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 +338 -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 +589 -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 +1161 -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/react-router.d.ts +8 -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/agent/workspace.d.ts +11 -0
- package/dist/agent/workspace.d.ts.map +1 -0
- package/dist/chunk-3a99tmwg.js +176 -0
- package/dist/chunk-3a99tmwg.js.map +10 -0
- package/dist/chunk-48pkffj6.js +20 -0
- package/dist/chunk-48pkffj6.js.map +10 -0
- package/dist/chunk-6n5pdqp0.js +115 -0
- package/dist/chunk-6n5pdqp0.js.map +11 -0
- package/dist/chunk-j97e06rg.js +10668 -0
- package/dist/chunk-j97e06rg.js.map +80 -0
- package/dist/chunk-md3p7qdt.js +379 -0
- package/dist/chunk-md3p7qdt.js.map +10 -0
- package/dist/chunk-shmw3f8t.js +251 -0
- package/dist/chunk-shmw3f8t.js.map +10 -0
- package/dist/chunk-yvhzn4ye.js +98 -0
- package/dist/chunk-yvhzn4ye.js.map +10 -0
- package/dist/chunk-zcxrt24m.js +148 -0
- package/dist/chunk-zcxrt24m.js.map +10 -0
- package/dist/codegen.d.ts +6 -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 +33 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +955 -2784
- package/dist/index.js.map +14 -13
- package/dist/locale-messages.d.ts +103 -0
- package/dist/locale-messages.d.ts.map +1 -0
- package/dist/locale.d.ts +111 -0
- package/dist/locale.d.ts.map +1 -0
- package/dist/locale.js +15 -0
- package/dist/{auth.js.map → locale.js.map} +1 -1
- 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/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 +19 -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 +211 -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 +42 -0
- package/dist/pages.d.ts.map +1 -0
- package/dist/pages.js +23931 -0
- package/dist/pages.js.map +85 -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 +2983 -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 +29 -20
- package/src/agent/activity-label.ts +63 -0
- package/src/agent/agent-chat.tsx +237 -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 +79 -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/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 +137 -0
- package/src/agent/components/message-parts.tsx +280 -0
- package/src/agent/components/message-view.tsx +428 -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/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/document-preview/classify.ts +55 -0
- package/src/agent/document-preview/content-policy.ts +37 -0
- package/src/agent/document-preview/content.ts +82 -0
- package/src/agent/document-preview/delimited.ts +118 -0
- package/src/agent/document-preview/document-preview-root.tsx +1017 -0
- package/src/agent/document-preview/file-size.ts +26 -0
- package/src/agent/document-preview/html.ts +67 -0
- package/src/agent/document-preview/persistence.ts +115 -0
- package/src/agent/document-preview/presentation.ts +13 -0
- package/src/agent/document-preview/rendering.ts +48 -0
- package/src/agent/document-preview/source.ts +48 -0
- package/src/agent/document-preview/state.ts +77 -0
- package/src/agent/document-preview/types.ts +36 -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 +542 -0
- package/src/agent/i18n/fr.ts +574 -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/react-router.tsx +84 -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 +120 -0
- package/src/{agents.ts → agent/workspace.ts} +4 -19
- package/src/codegen.ts +187 -103
- package/src/createCustomApp.ts +155 -67
- package/src/index.ts +52 -16
- package/src/locale-messages.ts +181 -0
- package/src/locale.ts +23 -0
- 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/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 +48 -0
- package/src/pages/section-page.tsx +272 -0
- package/src/pages/section-ui.tsx +771 -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 +56 -0
- package/src/runtime.ts +0 -3
- package/src/sections/catalog.ts +181 -0
- package/src/sections/counts.ts +33 -0
- package/src/sections/sections.tsx +257 -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 +158 -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/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-e1gj8c1a.js +0 -8
- package/dist/chunk-e1gj8c1a.js.map +0 -10
- package/src/browser.ts +0 -2
package/src/codegen.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { access, mkdir, readFile, writeFile } from "node:fs/promises"
|
|
2
2
|
import { join, relative, resolve } from "node:path"
|
|
3
|
-
import
|
|
3
|
+
import { en, fr } from "./locale-messages"
|
|
4
4
|
import { renderAppManifest } from "./manifest"
|
|
5
5
|
import { resolveAppMetadata } from "./metadata"
|
|
6
6
|
import { renderCustomAppRuntimeScript } from "./runtime"
|
|
@@ -9,7 +9,7 @@ import { type AppRouteLayout, type PageRoute, routePatternKey } from "./scanner"
|
|
|
9
9
|
export interface BuiltInRouteManifestEntry {
|
|
10
10
|
readonly path: string
|
|
11
11
|
readonly moduleSpecifier: string
|
|
12
|
-
readonly exportName
|
|
12
|
+
readonly exportName: string
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface GenerateRouteManifestOptions {
|
|
@@ -17,6 +17,11 @@ export interface GenerateRouteManifestOptions {
|
|
|
17
17
|
readonly layouts?: readonly AppRouteLayout[]
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/** The shared shell's unavailable message per language, inlined before any module loads. */
|
|
21
|
+
function sharedUnavailableTranslations(): Record<string, string> {
|
|
22
|
+
return { en: en.shared.unavailableDetail, fr: fr.shared.unavailableDetail }
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
export const AUTH_EXPERIENCE_BOOTSTRAP_PLACEHOLDER = "__SIXB_AUTH_BOOTSTRAP__"
|
|
21
26
|
|
|
22
27
|
function assertNoReservedSharedRoutes(routes: readonly PageRoute[]): void {
|
|
@@ -34,7 +39,7 @@ function assertNoReservedSharedRoutes(routes: readonly PageRoute[]): void {
|
|
|
34
39
|
* Generates `.sixb/generated/routes.ts` with static page/layout imports. Modules are
|
|
35
40
|
* eager on purpose: project-specific apps bundle small, and a single bundle
|
|
36
41
|
* (one JS file, one render-blocking CSS file) means no Suspense gap or
|
|
37
|
-
* late-arriving styles when navigating
|
|
42
|
+
* late-arriving styles when navigating.
|
|
38
43
|
*/
|
|
39
44
|
export async function generateRouteManifest(
|
|
40
45
|
routes: readonly PageRoute[],
|
|
@@ -56,13 +61,10 @@ export async function generateRouteManifest(
|
|
|
56
61
|
(route) => !projectRoutePatterns.has(routePatternKey(route.path))
|
|
57
62
|
)
|
|
58
63
|
const builtInImports = builtInRoutes
|
|
59
|
-
.map(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return `import BuiltInPage${index} from ${JSON.stringify(route.moduleSpecifier)}`
|
|
65
|
-
})
|
|
64
|
+
.map(
|
|
65
|
+
(route, index) =>
|
|
66
|
+
`import { ${route.exportName} as BuiltInPage${index} } from ${JSON.stringify(route.moduleSpecifier)}`
|
|
67
|
+
)
|
|
66
68
|
.join("\n")
|
|
67
69
|
const routePatterns = [...pages, ...builtInRoutes].map((route) => routePatternKey(route.path))
|
|
68
70
|
const layouts = [...(options.layouts ?? [])]
|
|
@@ -324,7 +326,7 @@ import { createRoot } from "react-dom/client"
|
|
|
324
326
|
import type {
|
|
325
327
|
AuthExperienceActions,
|
|
326
328
|
AuthExperienceState,
|
|
327
|
-
} from "@sixb/app
|
|
329
|
+
} from "@sixb/app"
|
|
328
330
|
import AuthExperience from ${JSON.stringify(authRel)}
|
|
329
331
|
${stylesheetImport}
|
|
330
332
|
|
|
@@ -435,7 +437,6 @@ export async function generateAppEntry(
|
|
|
435
437
|
generatedDir: string,
|
|
436
438
|
options: {
|
|
437
439
|
apiBaseUrl?: string
|
|
438
|
-
audience?: AuthSessionAudience
|
|
439
440
|
authEnabled?: boolean
|
|
440
441
|
appDir?: string
|
|
441
442
|
publicDir?: string
|
|
@@ -447,6 +448,10 @@ export async function generateAppEntry(
|
|
|
447
448
|
stylesheetPath?: string | null
|
|
448
449
|
/** Framework-owned stylesheets imported before the app stylesheet. */
|
|
449
450
|
frameworkStylesheetPaths?: readonly string[]
|
|
451
|
+
/** The built-in section pages are routed, so the app draws their navigation. */
|
|
452
|
+
sections?: boolean
|
|
453
|
+
/** The project has pages of its own in `app/`. */
|
|
454
|
+
projectPages?: boolean
|
|
450
455
|
} = {}
|
|
451
456
|
): Promise<{
|
|
452
457
|
htmlPath: string
|
|
@@ -482,13 +487,36 @@ export async function generateAppEntry(
|
|
|
482
487
|
const globalsCssImport = stylesheetPaths
|
|
483
488
|
.map((path) => `import ${JSON.stringify(relativeTo(generatedDir, path))}`)
|
|
484
489
|
.join("\n")
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
490
|
+
const sections = options.sections ?? false
|
|
491
|
+
// The namespace import reads the optional `visibility` export without naming it, so a layout
|
|
492
|
+
// that leaves it out still bundles without a missing-export warning.
|
|
493
|
+
const layoutImport = !hasLayout
|
|
494
|
+
? ""
|
|
495
|
+
: sections
|
|
496
|
+
? `import RootLayout, * as rootLayoutModule from ${JSON.stringify(layoutRel)}\n`
|
|
497
|
+
: `import RootLayout from ${JSON.stringify(layoutRel)}\n`
|
|
498
|
+
// A project with no `app/` of its own gets the default shell: its user menu is the way into every
|
|
499
|
+
// section. Pages without a layout keep rendering bare, as they did before the built-in pages.
|
|
500
|
+
const defaultShell = sections && !hasLayout && !options.projectPages
|
|
501
|
+
const sectionsImport = sections
|
|
502
|
+
? `import ${defaultShell ? "{ AppShell, type AppVisibility }" : "type { AppVisibility }"} from "@sixb/app"\nimport { SectionsProvider } from "@sixb/app/pages"\n`
|
|
503
|
+
: ""
|
|
504
|
+
// Who sees each built-in section, from the project's app/layout.tsx.
|
|
505
|
+
const sectionsSetup = !sections
|
|
506
|
+
? ""
|
|
507
|
+
: hasLayout
|
|
508
|
+
? `const visibility = Reflect.get(rootLayoutModule, "visibility") as AppVisibility | undefined`
|
|
509
|
+
: "const visibility = undefined"
|
|
510
|
+
const sectionsStart = sections
|
|
511
|
+
? `<SectionsProvider visibility={visibility} enabled={!basename}>`
|
|
512
|
+
: ""
|
|
513
|
+
const sectionsEnd = sections ? "</SectionsProvider>" : ""
|
|
514
|
+
const layoutWrapperStart = hasLayout ? "<RootLayout>" : defaultShell ? "<AppShell>" : "<>"
|
|
515
|
+
const layoutWrapperEnd = hasLayout ? "</RootLayout>" : defaultShell ? "</AppShell>" : "</>"
|
|
488
516
|
const runtimeConfigScript = options.apiBaseUrl
|
|
489
517
|
? renderCustomAppRuntimeScript({
|
|
490
518
|
api: { baseUrl: options.apiBaseUrl },
|
|
491
|
-
auth: {
|
|
519
|
+
auth: { enabled: options.authEnabled ?? true },
|
|
492
520
|
})
|
|
493
521
|
: ""
|
|
494
522
|
|
|
@@ -496,7 +524,7 @@ export async function generateAppEntry(
|
|
|
496
524
|
// shared entry imports it only after establishing a grant-bound session.
|
|
497
525
|
const runtimeContent = `import React from "react"
|
|
498
526
|
import { createRoot, type Root } from "react-dom/client"
|
|
499
|
-
import {
|
|
527
|
+
import type { GetAuthSessionResponse } from "@sixb/client"
|
|
500
528
|
import {
|
|
501
529
|
BrowserRouter,
|
|
502
530
|
matchPath,
|
|
@@ -504,9 +532,15 @@ import {
|
|
|
504
532
|
useNavigate,
|
|
505
533
|
useRoutes,
|
|
506
534
|
} from "react-router-dom"
|
|
507
|
-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
|
535
|
+
import { QueryClient, QueryClientProvider, useQuery } from "@tanstack/react-query"
|
|
508
536
|
import { isSixbApiError } from "@sixb/client/browser"
|
|
509
|
-
import {
|
|
537
|
+
import {
|
|
538
|
+
getAuthSessionQueryKey,
|
|
539
|
+
getProjectInfoOptions,
|
|
540
|
+
SixbEventsProvider,
|
|
541
|
+
} from "@sixb/client/hooks"
|
|
542
|
+
import { LocaleProvider, useAppMessages } from "@sixb/app/locale"
|
|
543
|
+
${sectionsImport}import { routePaths, routes } from "./routes"
|
|
510
544
|
${globalsCssImport}
|
|
511
545
|
${layoutImport}
|
|
512
546
|
|
|
@@ -517,6 +551,8 @@ interface CustomAppHotData {
|
|
|
517
551
|
|
|
518
552
|
export interface StartAppOptions {
|
|
519
553
|
readonly basename?: string
|
|
554
|
+
/** The session the bootstrap already loaded, so useCurrentUser does not fetch it again. */
|
|
555
|
+
readonly session?: GetAuthSessionResponse
|
|
520
556
|
}
|
|
521
557
|
|
|
522
558
|
if (import.meta.hot) import.meta.hot.accept()
|
|
@@ -695,6 +731,7 @@ function AppFallback({
|
|
|
695
731
|
showReload?: boolean
|
|
696
732
|
action?: React.ReactNode
|
|
697
733
|
}) {
|
|
734
|
+
const messages = useAppMessages()
|
|
698
735
|
return (
|
|
699
736
|
<div
|
|
700
737
|
role="alert"
|
|
@@ -730,7 +767,7 @@ function AppFallback({
|
|
|
730
767
|
textDecoration: "none",
|
|
731
768
|
}}
|
|
732
769
|
>
|
|
733
|
-
|
|
770
|
+
{messages.goHome}
|
|
734
771
|
</a>
|
|
735
772
|
{showReload ? (
|
|
736
773
|
<button
|
|
@@ -745,7 +782,7 @@ function AppFallback({
|
|
|
745
782
|
cursor: "pointer",
|
|
746
783
|
}}
|
|
747
784
|
>
|
|
748
|
-
|
|
785
|
+
{messages.reload}
|
|
749
786
|
</button>
|
|
750
787
|
) : null}
|
|
751
788
|
</>
|
|
@@ -755,53 +792,15 @@ function AppFallback({
|
|
|
755
792
|
)
|
|
756
793
|
}
|
|
757
794
|
|
|
758
|
-
function AccessDeniedView() {
|
|
759
|
-
const [isSigningOut, setIsSigningOut] = React.useState(false)
|
|
760
|
-
|
|
761
|
-
async function handleSignOut() {
|
|
762
|
-
setIsSigningOut(true)
|
|
763
|
-
try {
|
|
764
|
-
await signOut({ throwOnError: true })
|
|
765
|
-
window.location.reload()
|
|
766
|
-
} catch {
|
|
767
|
-
setIsSigningOut(false)
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
return (
|
|
772
|
-
<AppFallback
|
|
773
|
-
title="Access required"
|
|
774
|
-
detail="Your account is signed in, but it does not have permission to access this app."
|
|
775
|
-
showReload={false}
|
|
776
|
-
action={
|
|
777
|
-
<button
|
|
778
|
-
type="button"
|
|
779
|
-
disabled={isSigningOut}
|
|
780
|
-
onClick={handleSignOut}
|
|
781
|
-
style={{
|
|
782
|
-
padding: "0.5rem 1rem",
|
|
783
|
-
borderRadius: "var(--radius, 0.5rem)",
|
|
784
|
-
border: "1px solid var(--border, #cbd2d9)",
|
|
785
|
-
background: "transparent",
|
|
786
|
-
color: "inherit",
|
|
787
|
-
cursor: isSigningOut ? "default" : "pointer",
|
|
788
|
-
}}
|
|
789
|
-
>
|
|
790
|
-
{isSigningOut ? "Signing out…" : "Sign out"}
|
|
791
|
-
</button>
|
|
792
|
-
}
|
|
793
|
-
/>
|
|
794
|
-
)
|
|
795
|
-
}
|
|
796
|
-
|
|
797
795
|
// The not-found view. Rendered both for unmatched client routes (the catch-all
|
|
798
796
|
// route below) and for an expected 404 surfaced through a query. Apps will be
|
|
799
797
|
// able to override this via app/not-found.tsx.
|
|
800
798
|
function NotFoundView() {
|
|
799
|
+
const messages = useAppMessages().notFound
|
|
801
800
|
return (
|
|
802
801
|
<AppFallback
|
|
803
|
-
title=
|
|
804
|
-
detail=
|
|
802
|
+
title={messages.title}
|
|
803
|
+
detail={messages.detail}
|
|
805
804
|
showReload={false}
|
|
806
805
|
/>
|
|
807
806
|
)
|
|
@@ -819,15 +818,16 @@ function AppErrorFallback({
|
|
|
819
818
|
error: unknown
|
|
820
819
|
hideErrorDetails: boolean
|
|
821
820
|
}) {
|
|
821
|
+
const messages = useAppMessages().error
|
|
822
822
|
if (isSixbApiError(error) && error.status === 404) {
|
|
823
823
|
return <NotFoundView />
|
|
824
824
|
}
|
|
825
825
|
return (
|
|
826
826
|
<AppFallback
|
|
827
|
-
title=
|
|
827
|
+
title={messages.title}
|
|
828
828
|
detail={
|
|
829
829
|
hideErrorDetails
|
|
830
|
-
?
|
|
830
|
+
? messages.sharedDetail
|
|
831
831
|
: error instanceof Error
|
|
832
832
|
? error.message
|
|
833
833
|
: String(error)
|
|
@@ -894,6 +894,7 @@ function RoutedErrorBoundary({
|
|
|
894
894
|
}
|
|
895
895
|
|
|
896
896
|
const appRoutes = [...routes, { path: "*", element: <NotFoundView /> }]
|
|
897
|
+
${sectionsSetup}
|
|
897
898
|
|
|
898
899
|
function AppRoutes() {
|
|
899
900
|
return useRoutes(appRoutes)
|
|
@@ -909,30 +910,103 @@ function RoutedApp({ hideErrorDetails }: { readonly hideErrorDetails: boolean })
|
|
|
909
910
|
)
|
|
910
911
|
}
|
|
911
912
|
|
|
913
|
+
// Project settings do not change while the app runs: never refetch or collect them. Built on use:
|
|
914
|
+
// the query key captures the API base URL, which the bootstrap configures after this module loads.
|
|
915
|
+
function projectInfoQuery() {
|
|
916
|
+
return {
|
|
917
|
+
...getProjectInfoOptions(),
|
|
918
|
+
staleTime: Number.POSITIVE_INFINITY,
|
|
919
|
+
gcTime: Number.POSITIVE_INFINITY,
|
|
920
|
+
retry: false,
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
// Framework text follows the reader's browser languages and falls back to the project's. A shared
|
|
925
|
+
// link's grant cannot read project settings, so it keeps the browser's languages alone.
|
|
926
|
+
function ProjectLocale({
|
|
927
|
+
shared,
|
|
928
|
+
children,
|
|
929
|
+
}: {
|
|
930
|
+
readonly shared: boolean
|
|
931
|
+
readonly children: React.ReactNode
|
|
932
|
+
}) {
|
|
933
|
+
const { data: project } = useQuery({ ...projectInfoQuery(), enabled: !shared })
|
|
934
|
+
return <LocaleProvider fallbackLocale={project?.locale}>{children}</LocaleProvider>
|
|
935
|
+
}
|
|
936
|
+
|
|
912
937
|
function App({ basename }: StartAppOptions) {
|
|
913
938
|
return (
|
|
914
939
|
<QueryClientProvider client={queryClient}>
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
{
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
<
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
940
|
+
{/* One event socket for every live page, opened only once something subscribes. */}
|
|
941
|
+
<SixbEventsProvider>
|
|
942
|
+
<ProjectLocale shared={Boolean(basename)}>
|
|
943
|
+
${sectionsStart}
|
|
944
|
+
<BrowserRouter basename={basename}>
|
|
945
|
+
<SharedDocumentLinkInterceptor basename={basename} />
|
|
946
|
+
<InternalLinkInterceptor basename={basename} />
|
|
947
|
+
{basename ? (
|
|
948
|
+
<RoutedApp hideErrorDetails />
|
|
949
|
+
) : (
|
|
950
|
+
<SharedDocumentBoundary>
|
|
951
|
+
<RoutedApp hideErrorDetails={false} />
|
|
952
|
+
</SharedDocumentBoundary>
|
|
953
|
+
)}
|
|
954
|
+
</BrowserRouter>
|
|
955
|
+
${sectionsEnd}
|
|
956
|
+
</ProjectLocale>
|
|
957
|
+
</SixbEventsProvider>
|
|
926
958
|
</QueryClientProvider>
|
|
927
959
|
)
|
|
928
960
|
}
|
|
929
961
|
|
|
930
962
|
export function startApp(options: StartAppOptions = {}) {
|
|
963
|
+
if (options.session) queryClient.setQueryData(getAuthSessionQueryKey(), options.session)
|
|
964
|
+
// The HTML is built without loading the project: declare the project's language on the document
|
|
965
|
+
// as soon as the API answers, without waiting for the page tree to render.
|
|
966
|
+
if (!options.basename) {
|
|
967
|
+
void queryClient.fetchQuery(projectInfoQuery()).then(
|
|
968
|
+
(project) => {
|
|
969
|
+
document.documentElement.lang = project.locale
|
|
970
|
+
},
|
|
971
|
+
() => undefined
|
|
972
|
+
)
|
|
973
|
+
}
|
|
931
974
|
getRoot().render(<App basename={options.basename} />)
|
|
932
975
|
}
|
|
933
976
|
|
|
934
|
-
|
|
935
|
-
|
|
977
|
+
// Without a session the project's locale is unknown: this speaks the browser's language.
|
|
978
|
+
export function renderApiUnavailable(apiBaseUrl: string) {
|
|
979
|
+
getRoot().render(
|
|
980
|
+
<LocaleProvider>
|
|
981
|
+
<ApiUnavailableView apiBaseUrl={apiBaseUrl} />
|
|
982
|
+
</LocaleProvider>
|
|
983
|
+
)
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
function ApiUnavailableView({ apiBaseUrl }: { readonly apiBaseUrl: string }) {
|
|
987
|
+
const messages = useAppMessages()
|
|
988
|
+
return (
|
|
989
|
+
<AppFallback
|
|
990
|
+
title={messages.apiUnavailable.title}
|
|
991
|
+
detail={messages.apiUnavailable.detail(apiBaseUrl)}
|
|
992
|
+
action={
|
|
993
|
+
<button
|
|
994
|
+
type="button"
|
|
995
|
+
onClick={() => window.location.reload()}
|
|
996
|
+
style={{
|
|
997
|
+
padding: "0.5rem 1rem",
|
|
998
|
+
borderRadius: "var(--radius, 0.5rem)",
|
|
999
|
+
border: "1px solid var(--border, #cbd2d9)",
|
|
1000
|
+
background: "transparent",
|
|
1001
|
+
color: "inherit",
|
|
1002
|
+
cursor: "pointer",
|
|
1003
|
+
}}
|
|
1004
|
+
>
|
|
1005
|
+
{messages.retry}
|
|
1006
|
+
</button>
|
|
1007
|
+
}
|
|
1008
|
+
/>
|
|
1009
|
+
)
|
|
936
1010
|
}
|
|
937
1011
|
`
|
|
938
1012
|
|
|
@@ -946,9 +1020,9 @@ export function renderAccessDenied() {
|
|
|
946
1020
|
readSixbBrowserRuntimeConfig,
|
|
947
1021
|
requireSixbBrowserAuthSession,
|
|
948
1022
|
} from "@sixb/client/browser"
|
|
949
|
-
import {
|
|
1023
|
+
import { renderApiUnavailable, startApp } from "./app-runtime"
|
|
950
1024
|
|
|
951
|
-
const runtimeConfig = readSixbBrowserRuntimeConfig(
|
|
1025
|
+
const runtimeConfig = readSixbBrowserRuntimeConfig()
|
|
952
1026
|
const browserClient = configureSixbBrowserClient(runtimeConfig)
|
|
953
1027
|
|
|
954
1028
|
if (import.meta.hot) {
|
|
@@ -956,19 +1030,22 @@ if (import.meta.hot) {
|
|
|
956
1030
|
import.meta.hot.dispose(() => browserClient.dispose())
|
|
957
1031
|
}
|
|
958
1032
|
|
|
1033
|
+
// Without the API's answer the app can neither render nor send the user to sign in.
|
|
959
1034
|
const authSession = runtimeConfig.auth.enabled
|
|
960
|
-
? await requireSixbBrowserAuthSession(runtimeConfig, browserClient)
|
|
1035
|
+
? await requireSixbBrowserAuthSession(runtimeConfig, browserClient).catch((error: unknown) => {
|
|
1036
|
+
console.error("[SixbCustomApp] Could not load the session from the API:", error)
|
|
1037
|
+
return "unavailable" as const
|
|
1038
|
+
})
|
|
961
1039
|
: null
|
|
962
|
-
const applicationAccessDenied =
|
|
963
|
-
authSession?.authenticated === true && !authSession.applicationAccess.allowed
|
|
964
|
-
const canRenderApp =
|
|
965
|
-
!runtimeConfig.auth.enabled ||
|
|
966
|
-
(authSession?.authenticated === true && authSession.applicationAccess.allowed)
|
|
967
1040
|
|
|
968
|
-
if (
|
|
969
|
-
|
|
970
|
-
} else if (
|
|
971
|
-
|
|
1041
|
+
if (authSession === "unavailable") {
|
|
1042
|
+
renderApiUnavailable(runtimeConfig.api.baseUrl)
|
|
1043
|
+
} else if (
|
|
1044
|
+
!runtimeConfig.auth.enabled ||
|
|
1045
|
+
(authSession?.authenticated === false && authSession.authEnabled === false) ||
|
|
1046
|
+
authSession?.authenticated === true
|
|
1047
|
+
) {
|
|
1048
|
+
startApp({ session: authSession ?? undefined })
|
|
972
1049
|
}
|
|
973
1050
|
`
|
|
974
1051
|
|
|
@@ -977,7 +1054,8 @@ if (canRenderApp) {
|
|
|
977
1054
|
|
|
978
1055
|
// This module contains framework bootstrap only. It must never statically import routes, the
|
|
979
1056
|
// authored layout, or any page: that graph is imported after the session is accepted.
|
|
980
|
-
const sharedMainContent = `import {
|
|
1057
|
+
const sharedMainContent = `import { browserAppLocale, browserAppMessages } from "@sixb/app/locale"
|
|
1058
|
+
import {
|
|
981
1059
|
configureSixbSharedBrowserClient,
|
|
982
1060
|
isSixbApiError,
|
|
983
1061
|
readSixbBrowserRuntimeConfig,
|
|
@@ -1009,6 +1087,8 @@ export function startSharedApp(
|
|
|
1009
1087
|
bootstrap: SharedAppBootstrap,
|
|
1010
1088
|
options: SharedAppStartOptions = {}
|
|
1011
1089
|
): void {
|
|
1090
|
+
// A shared link speaks the reader's language: the grant cannot read the project's.
|
|
1091
|
+
document.documentElement.lang = browserAppLocale()
|
|
1012
1092
|
if (!isValidBootstrap(bootstrap)) {
|
|
1013
1093
|
renderSharedFallback("unavailable")
|
|
1014
1094
|
return
|
|
@@ -1019,10 +1099,7 @@ export function startSharedApp(
|
|
|
1019
1099
|
activeController?.dispose()
|
|
1020
1100
|
let controller: SixbSharedBrowserClientController
|
|
1021
1101
|
try {
|
|
1022
|
-
const runtimeConfig = readSixbBrowserRuntimeConfig({
|
|
1023
|
-
audience: "app",
|
|
1024
|
-
authEnabled: false,
|
|
1025
|
-
})
|
|
1102
|
+
const runtimeConfig = readSixbBrowserRuntimeConfig({ authEnabled: false })
|
|
1026
1103
|
controller = configureSixbSharedBrowserClient(runtimeConfig, {
|
|
1027
1104
|
grantId,
|
|
1028
1105
|
})
|
|
@@ -1137,28 +1214,29 @@ function renderSharedFallback(
|
|
|
1137
1214
|
"justify-content:center;gap:.75rem;padding:2rem;text-align:center;" +
|
|
1138
1215
|
"font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif"
|
|
1139
1216
|
|
|
1217
|
+
const messages = browserAppMessages().shared
|
|
1140
1218
|
const title = document.createElement("h1")
|
|
1141
1219
|
title.style.cssText = "margin:0;font-size:1.5rem"
|
|
1142
1220
|
title.textContent =
|
|
1143
1221
|
state === "loading"
|
|
1144
|
-
?
|
|
1222
|
+
? messages.opening
|
|
1145
1223
|
: state === "retryable"
|
|
1146
|
-
?
|
|
1147
|
-
:
|
|
1224
|
+
? messages.retryableTitle
|
|
1225
|
+
: messages.unavailableTitle
|
|
1148
1226
|
const detail = document.createElement("p")
|
|
1149
1227
|
detail.style.cssText = "margin:0;max-width:32rem"
|
|
1150
1228
|
detail.textContent =
|
|
1151
1229
|
state === "loading"
|
|
1152
|
-
?
|
|
1230
|
+
? messages.verifying
|
|
1153
1231
|
: state === "retryable"
|
|
1154
|
-
?
|
|
1155
|
-
:
|
|
1232
|
+
? messages.retryableDetail
|
|
1233
|
+
: messages.unavailableDetail
|
|
1156
1234
|
main.append(title, detail)
|
|
1157
1235
|
|
|
1158
1236
|
if (retry) {
|
|
1159
1237
|
const button = document.createElement("button")
|
|
1160
1238
|
button.type = "button"
|
|
1161
|
-
button.textContent =
|
|
1239
|
+
button.textContent = messages.tryAgain
|
|
1162
1240
|
button.style.cssText =
|
|
1163
1241
|
"margin-top:.25rem;padding:.625rem 1rem;border:1px solid currentColor;" +
|
|
1164
1242
|
"border-radius:.375rem;background:transparent;color:inherit;cursor:pointer;font:inherit"
|
|
@@ -1219,7 +1297,7 @@ ${metadataHead}
|
|
|
1219
1297
|
const sharedRuntimeConfigScript = options.apiBaseUrl
|
|
1220
1298
|
? renderCustomAppRuntimeScript({
|
|
1221
1299
|
api: { baseUrl: options.apiBaseUrl },
|
|
1222
|
-
auth: {
|
|
1300
|
+
auth: { enabled: false },
|
|
1223
1301
|
})
|
|
1224
1302
|
: ""
|
|
1225
1303
|
const sharedHtmlContent = `<!DOCTYPE html>
|
|
@@ -1249,7 +1327,13 @@ ${renderSharedMetadataHead(metadata)}
|
|
|
1249
1327
|
"min-height:100dvh;display:grid;place-items:center;padding:2rem;text-align:center;" +
|
|
1250
1328
|
"font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif"
|
|
1251
1329
|
const message = document.createElement("p")
|
|
1252
|
-
|
|
1330
|
+
// Inline and dependency-free: the translations travel with the page.
|
|
1331
|
+
const translations = ${JSON.stringify(sharedUnavailableTranslations())}
|
|
1332
|
+
const language = (navigator.languages || [navigator.language])
|
|
1333
|
+
.map((tag) => String(tag).split("-")[0].toLowerCase())
|
|
1334
|
+
.find((tag) => tag in translations)
|
|
1335
|
+
document.documentElement.lang = language || "en"
|
|
1336
|
+
message.textContent = translations[language || "en"]
|
|
1253
1337
|
main.append(message)
|
|
1254
1338
|
root.replaceChildren(main)
|
|
1255
1339
|
}
|