@sixb/app 0.2.0 → 0.2.3
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/assets/connector-icons/README.md +1 -0
- package/assets/connector-icons/fleetio.ico +0 -0
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +9 -2
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-panel.d.ts +9 -1
- package/dist/agent/agent-panel.d.ts.map +1 -1
- package/dist/agent/agent-surface.d.ts.map +1 -1
- package/dist/agent/artifact-card.d.ts +3 -1
- package/dist/agent/artifact-card.d.ts.map +1 -1
- package/dist/agent/artifact-panel.d.ts +7 -1
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/background/background-card.d.ts +10 -0
- package/dist/agent/background/background-card.d.ts.map +1 -0
- package/dist/agent/background/background-tool-row.d.ts +9 -0
- package/dist/agent/background/background-tool-row.d.ts.map +1 -0
- package/dist/agent/background/context.d.ts +23 -0
- package/dist/agent/background/context.d.ts.map +1 -0
- package/dist/agent/background/interpret.d.ts +116 -0
- package/dist/agent/background/interpret.d.ts.map +1 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
- package/dist/agent/bash/interpret.d.ts +4 -0
- package/dist/agent/bash/interpret.d.ts.map +1 -1
- package/dist/agent/components/composer-menu.d.ts +3 -1
- package/dist/agent/components/composer-menu.d.ts.map +1 -1
- package/dist/agent/components/composer-place.d.ts +13 -0
- package/dist/agent/components/composer-place.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +23 -1
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/computer-place.d.ts +3 -1
- package/dist/agent/components/computer-place.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/context-meter.d.ts +1 -1
- package/dist/agent/components/conversation-panel.d.ts +3 -1
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +3 -1
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/transcript.d.ts +6 -0
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/components/web-fetch-tool-view.d.ts.map +1 -1
- package/dist/agent/composer-insertion.d.ts +24 -0
- package/dist/agent/composer-insertion.d.ts.map +1 -0
- package/dist/agent/delegation/child-parts.d.ts +2 -0
- package/dist/agent/delegation/child-parts.d.ts.map +1 -1
- package/dist/agent/delegation/use-children.d.ts +5 -5
- package/dist/agent/delegation/use-children.d.ts.map +1 -1
- package/dist/agent/hooks/use-agent-conversation.d.ts +24 -4
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-new-thread-place.d.ts +70 -0
- package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -0
- package/dist/agent/hooks/use-thread-lists.d.ts +40 -0
- package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
- package/dist/agent/i18n/en.d.ts +74 -0
- package/dist/agent/i18n/en.d.ts.map +1 -1
- package/dist/agent/i18n/fr.d.ts.map +1 -1
- package/dist/agent/i18n/index.d.ts +126 -0
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/observed-conversation.d.ts.map +1 -1
- package/dist/agent/publish-artifact/interpret.d.ts +8 -2
- package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
- package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/tool-views/built-in.d.ts.map +1 -1
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/utils/web-fetch.d.ts +33 -1
- package/dist/agent/utils/web-fetch.d.ts.map +1 -1
- package/dist/agent/utils/web-search.d.ts +14 -2
- package/dist/agent/utils/web-search.d.ts.map +1 -1
- package/dist/artifacts/artifact-page.d.ts.map +1 -1
- package/dist/artifacts/artifact-viewer.d.ts +16 -0
- package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts +1 -1
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/comments-context.d.ts +48 -0
- package/dist/artifacts/comments-context.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +6 -6
- package/dist/artifacts/edit-session.d.ts.map +1 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/frame.d.ts +10 -2
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/guest-badge.d.ts +8 -0
- package/dist/artifacts/guest-badge.d.ts.map +1 -0
- package/dist/artifacts/held-artifact.d.ts +19 -0
- package/dist/artifacts/held-artifact.d.ts.map +1 -0
- package/dist/artifacts/holders.d.ts +10 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/live/boards.d.ts +15 -0
- package/dist/artifacts/live/boards.d.ts.map +1 -0
- package/dist/artifacts/live/canvas.d.ts +79 -0
- package/dist/artifacts/live/canvas.d.ts.map +1 -0
- package/dist/artifacts/live/header.d.ts +29 -0
- package/dist/artifacts/live/header.d.ts.map +1 -0
- package/dist/artifacts/live/hooks.d.ts +21 -0
- package/dist/artifacts/live/hooks.d.ts.map +1 -0
- package/dist/artifacts/live/presence.d.ts +32 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/session.d.ts +130 -0
- package/dist/artifacts/live/session.d.ts.map +1 -0
- package/dist/artifacts/live/view.d.ts +28 -0
- package/dist/artifacts/live/view.d.ts.map +1 -0
- package/dist/artifacts/messages.d.ts +424 -14
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +2 -2
- package/dist/artifacts/page-queries.d.ts.map +1 -1
- package/dist/artifacts/page-state.d.ts.map +1 -1
- package/dist/artifacts/publish-edit.d.ts +24 -14
- package/dist/artifacts/publish-edit.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +490 -9
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/artifacts/references/references.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/arrows.d.ts +0 -18
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/board-editor.d.ts +43 -0
- package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
- package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
- package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +64 -19
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/canvas.d.ts +13 -4
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
- package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
- package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
- package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/focus.d.ts +40 -5
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
- package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
- package/dist/artifacts/version-menu.d.ts +19 -0
- package/dist/artifacts/version-menu.d.ts.map +1 -0
- package/dist/artifacts/view-context.d.ts +43 -0
- package/dist/artifacts/view-context.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/build.d.ts +5 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/{chunk-fw2bm6dq.js → chunk-001c4gnk.js} +8086 -3870
- package/dist/chunk-001c4gnk.js.map +204 -0
- package/dist/chunk-00wggsst.js +7 -0
- package/dist/chunk-00wggsst.js.map +10 -0
- package/dist/chunk-5crvhjp2.js +4704 -0
- package/dist/chunk-5crvhjp2.js.map +28 -0
- package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
- package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
- package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
- package/dist/chunk-fg6thecb.js.map +10 -0
- package/dist/{chunk-j9653e83.js → chunk-fwb9mxwm.js} +1 -1
- package/dist/{chunk-km25essq.js → chunk-kes4ygmz.js} +1 -1
- package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +930 -309
- package/dist/index.js.map +15 -10
- package/dist/locale-messages.d.ts +12 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +12 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts +8 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/console/action-run.d.ts.map +1 -1
- package/dist/pages/console/data/connectors.d.ts.map +1 -1
- package/dist/pages/console/data/datasets.d.ts.map +1 -1
- package/dist/pages/console/data/lake-health.d.ts +3 -0
- package/dist/pages/console/data/lake-health.d.ts.map +1 -0
- package/dist/pages/console/data/messages.d.ts +98 -2
- package/dist/pages/console/data/messages.d.ts.map +1 -1
- package/dist/pages/console/data/pipelines.d.ts.map +1 -1
- package/dist/pages/console/data/projections.d.ts.map +1 -1
- package/dist/pages/console/data/shared.d.ts.map +1 -1
- package/dist/pages/console/data/syncs.d.ts.map +1 -1
- package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
- package/dist/pages/console/ontology/actions.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
- package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
- package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
- package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
- package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
- package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
- package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
- package/dist/pages/console/ontology/objects.d.ts.map +1 -1
- package/dist/pages/console/ontology/rules.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
- package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
- package/dist/pages/console/skeletons.d.ts +30 -0
- package/dist/pages/console/skeletons.d.ts.map +1 -0
- package/dist/pages/console/workflow-run.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +11 -1
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts +25 -3
- package/dist/pages/section-ui.d.ts.map +1 -1
- package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
- package/dist/pages/settings/activity/connections.d.ts.map +1 -1
- package/dist/pages/settings/activity/page.d.ts.map +1 -1
- package/dist/pages/settings/activity/thread.d.ts.map +1 -1
- package/dist/pages/settings/activity/timeline.d.ts +2 -0
- package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
- package/dist/pages/settings/controls.d.ts +4 -0
- package/dist/pages/settings/controls.d.ts.map +1 -1
- package/dist/pages/settings/members.d.ts.map +1 -1
- package/dist/pages/settings/memory-history.d.ts +2 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -1
- package/dist/pages/settings/memory.d.ts.map +1 -1
- package/dist/pages/settings/service-accounts.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
- package/dist/pages/settings/usage/limits.d.ts.map +1 -1
- package/dist/pages/settings/usage/messages.d.ts +2 -2
- package/dist/pages/settings/usage/messages.d.ts.map +1 -1
- package/dist/pages/settings/usage/runs.d.ts +8 -2
- package/dist/pages/settings/usage/runs.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
- package/dist/pages/settings/usage/spend-model.d.ts +5 -0
- package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
- package/dist/pages/values.d.ts +6 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +4 -0
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +8195 -4841
- package/dist/pages.js.map +58 -49
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +294 -23
- package/dist/server.js.map +8 -7
- package/dist/service-worker.d.ts +39 -0
- package/dist/service-worker.d.ts.map +1 -0
- package/dist/shared-session.d.ts +25 -0
- package/dist/shared-session.d.ts.map +1 -0
- package/dist/shell/app-return.d.ts +35 -0
- package/dist/shell/app-return.d.ts.map +1 -0
- package/dist/shell/app-shell.d.ts +1 -1
- package/dist/shell/app-shell.d.ts.map +1 -1
- package/dist/shell/nav-items.d.ts +2 -0
- package/dist/shell/nav-items.d.ts.map +1 -1
- package/dist/shell/phone/back.d.ts +6 -0
- package/dist/shell/phone/back.d.ts.map +1 -0
- package/dist/shell/phone/launch.d.ts +7 -0
- package/dist/shell/phone/launch.d.ts.map +1 -0
- package/dist/shell/phone/more-sheet.d.ts +36 -0
- package/dist/shell/phone/more-sheet.d.ts.map +1 -0
- package/dist/shell/phone/phone-foundations.d.ts +9 -0
- package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
- package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
- package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
- package/dist/shell/phone/routes.d.ts +12 -0
- package/dist/shell/phone/routes.d.ts.map +1 -0
- package/dist/shell/phone/screen-motion.d.ts +11 -0
- package/dist/shell/phone/screen-motion.d.ts.map +1 -0
- package/dist/shell/phone/scroll-restoration.d.ts +7 -0
- package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
- package/dist/shell/phone/startup-image.d.ts +17 -0
- package/dist/shell/phone/startup-image.d.ts.map +1 -0
- package/dist/shell/phone/tab-bar.d.ts +14 -0
- package/dist/shell/phone/tab-bar.d.ts.map +1 -0
- package/dist/shell/phone/top-bar.d.ts +24 -0
- package/dist/shell/phone/top-bar.d.ts.map +1 -0
- package/dist/shell/search-command.d.ts +3 -1
- package/dist/shell/search-command.d.ts.map +1 -1
- package/dist/shell/user-menu.d.ts +2 -0
- package/dist/shell/user-menu.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/agent/activity-label.ts +6 -2
- package/src/agent/agent-chat.tsx +51 -8
- package/src/agent/agent-panel.tsx +12 -0
- package/src/agent/agent-surface.tsx +4 -0
- package/src/agent/agent.css +18 -0
- package/src/agent/artifact-card.tsx +84 -16
- package/src/agent/artifact-panel.tsx +63 -43
- package/src/agent/background/background-card.tsx +308 -0
- package/src/agent/background/background-tool-row.tsx +58 -0
- package/src/agent/background/context.ts +26 -0
- package/src/agent/background/interpret.ts +356 -0
- package/src/agent/bash/bash-tool-view.tsx +9 -4
- package/src/agent/bash/interpret.ts +21 -3
- package/src/agent/components/agent-message-body.tsx +1 -1
- package/src/agent/components/composer-menu.tsx +4 -1
- package/src/agent/components/composer-place.tsx +168 -0
- package/src/agent/components/composer.tsx +101 -3
- package/src/agent/components/computer-place.tsx +18 -1
- package/src/agent/components/context-chips.tsx +72 -2
- package/src/agent/components/conversation-panel.tsx +3 -2
- package/src/agent/components/message-parts.tsx +6 -1
- package/src/agent/components/thread-artifacts-menu.tsx +22 -5
- package/src/agent/components/transcript.tsx +33 -1
- package/src/agent/components/web-fetch-tool-view.tsx +94 -29
- package/src/agent/composer-insertion.ts +36 -0
- package/src/agent/delegation/child-parts.tsx +1 -1
- package/src/agent/hooks/use-agent-conversation.ts +101 -8
- package/src/agent/hooks/use-new-thread-place.ts +294 -0
- package/src/agent/i18n/en.ts +70 -3
- package/src/agent/i18n/fr.ts +70 -3
- package/src/agent/observed-conversation.tsx +3 -0
- package/src/agent/publish-artifact/interpret.ts +27 -5
- package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
- package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
- package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
- package/src/agent/react-router.tsx +2 -2
- package/src/agent/tool-views/built-in.tsx +29 -11
- package/src/agent/types.ts +4 -0
- package/src/agent/utils/web-fetch.ts +89 -10
- package/src/agent/utils/web-search.ts +67 -28
- package/src/artifacts/artifact-page.tsx +42 -17
- package/src/artifacts/artifact-viewer.tsx +56 -0
- package/src/artifacts/artifacts.css +80 -0
- package/src/artifacts/card-details.ts +2 -2
- package/src/artifacts/card-preview.tsx +17 -3
- package/src/artifacts/comments-context.ts +125 -0
- package/src/artifacts/edit-session.tsx +6 -6
- package/src/artifacts/file-source.ts +10 -3
- package/src/artifacts/frame.tsx +50 -12
- package/src/artifacts/gallery.tsx +9 -11
- package/src/artifacts/guest-badge.tsx +21 -0
- package/src/artifacts/held-artifact.tsx +241 -0
- package/src/artifacts/holders.tsx +170 -0
- package/src/artifacts/live/boards.ts +95 -0
- package/src/artifacts/live/canvas.ts +402 -0
- package/src/artifacts/live/header.tsx +137 -0
- package/src/artifacts/live/hooks.ts +94 -0
- package/src/artifacts/live/presence.ts +147 -0
- package/src/artifacts/live/session.ts +520 -0
- package/src/artifacts/live/view.ts +81 -0
- package/src/artifacts/messages.ts +415 -24
- package/src/artifacts/page-queries.ts +2 -3
- package/src/artifacts/page-state.ts +16 -7
- package/src/artifacts/publish-edit.ts +50 -22
- package/src/artifacts/queries.ts +108 -10
- package/src/artifacts/references/references.tsx +6 -9
- package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
- package/src/artifacts/renderers/canvas/board-editor.tsx +817 -0
- package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
- package/src/artifacts/renderers/canvas/board-source.ts +110 -0
- package/src/artifacts/renderers/canvas/board.tsx +309 -33
- package/src/artifacts/renderers/canvas/canvas.tsx +387 -72
- package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
- package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
- package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
- package/src/artifacts/renderers/canvas/comments.ts +225 -0
- package/src/artifacts/renderers/canvas/draft.ts +41 -50
- package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
- package/src/artifacts/renderers/canvas/focus.tsx +175 -24
- package/src/artifacts/renderers/canvas/items.tsx +179 -52
- package/src/artifacts/renderers/canvas/layout.ts +99 -47
- package/src/artifacts/renderers/canvas/presence.tsx +184 -0
- package/src/artifacts/renderers/canvas/previews.ts +127 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
- package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
- package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
- package/src/artifacts/renderers/slides/slides.tsx +1 -1
- package/src/artifacts/version-menu.tsx +438 -0
- package/src/artifacts/view-context.ts +102 -0
- package/src/artifacts/viewer.tsx +205 -147
- package/src/build.ts +96 -11
- package/src/codegen.ts +83 -5
- package/src/createCustomApp.ts +20 -7
- package/src/index.ts +12 -0
- package/src/locale-messages.ts +24 -0
- package/src/metadata.ts +12 -0
- package/src/pages/console/action-run.tsx +20 -0
- package/src/pages/console/data/connectors.tsx +27 -3
- package/src/pages/console/data/datasets.tsx +30 -1
- package/src/pages/console/data/lake-health.tsx +299 -0
- package/src/pages/console/data/messages.ts +143 -2
- package/src/pages/console/data/pipelines.tsx +91 -3
- package/src/pages/console/data/projections.tsx +23 -4
- package/src/pages/console/data/shared.tsx +1 -0
- package/src/pages/console/data/syncs.tsx +39 -2
- package/src/pages/console/ontology/action-runs.tsx +8 -2
- package/src/pages/console/ontology/actions.tsx +39 -15
- package/src/pages/console/ontology/components/action-button.tsx +10 -0
- package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
- package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
- package/src/pages/console/ontology/lib/action-params.ts +10 -0
- package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
- package/src/pages/console/ontology/object-page.tsx +2 -0
- package/src/pages/console/ontology/object-type.tsx +73 -14
- package/src/pages/console/ontology/object-types.tsx +56 -7
- package/src/pages/console/ontology/objects.tsx +167 -19
- package/src/pages/console/ontology/rules.tsx +186 -30
- package/src/pages/console/ontology/workflow.tsx +130 -74
- package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
- package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
- package/src/pages/console/ontology/workflows.tsx +34 -21
- package/src/pages/console/skeletons.tsx +99 -0
- package/src/pages/console/workflow-run.tsx +20 -0
- package/src/pages/section-page.tsx +37 -7
- package/src/pages/section-ui.tsx +96 -13
- package/src/pages/settings/activity/calendar.tsx +13 -6
- package/src/pages/settings/activity/connections.tsx +26 -9
- package/src/pages/settings/activity/page.tsx +31 -4
- package/src/pages/settings/activity/thread.tsx +32 -18
- package/src/pages/settings/activity/timeline.tsx +39 -0
- package/src/pages/settings/controls.tsx +19 -1
- package/src/pages/settings/developers.tsx +2 -2
- package/src/pages/settings/members.tsx +42 -9
- package/src/pages/settings/memory-history.tsx +76 -10
- package/src/pages/settings/memory.tsx +47 -5
- package/src/pages/settings/service-accounts.tsx +7 -2
- package/src/pages/settings/sessions.tsx +6 -2
- package/src/pages/settings/usage/breakdown.tsx +62 -2
- package/src/pages/settings/usage/limits.tsx +45 -3
- package/src/pages/settings/usage/messages.ts +2 -2
- package/src/pages/settings/usage/page.tsx +99 -52
- package/src/pages/settings/usage/runs.tsx +105 -8
- package/src/pages/settings/usage/spend-chart.tsx +79 -45
- package/src/pages/settings/usage/spend-model.ts +17 -0
- package/src/pages/values.tsx +72 -6
- package/src/pages.ts +4 -0
- package/src/sections/catalog.ts +6 -0
- package/src/sections/sections.tsx +2 -0
- package/src/service-worker.ts +176 -0
- package/src/shared-session.ts +73 -0
- package/src/shell/app-return.ts +115 -0
- package/src/shell/app-shell.tsx +125 -27
- package/src/shell/nav-items.tsx +2 -0
- package/src/shell/phone/back.ts +16 -0
- package/src/shell/phone/launch.ts +6 -0
- package/src/shell/phone/more-sheet.tsx +249 -0
- package/src/shell/phone/phone-foundations.tsx +43 -0
- package/src/shell/phone/phone.css +660 -0
- package/src/shell/phone/pull-to-refresh.tsx +201 -0
- package/src/shell/phone/routes.ts +34 -0
- package/src/shell/phone/screen-motion.ts +292 -0
- package/src/shell/phone/scroll-restoration.tsx +70 -0
- package/src/shell/phone/startup-image.ts +119 -0
- package/src/shell/phone/tab-bar.tsx +95 -0
- package/src/shell/phone/top-bar.tsx +195 -0
- package/src/shell/search-command.tsx +30 -14
- package/src/shell/user-menu.tsx +2 -1
- package/dist/chunk-4mprsd2n.js.map +0 -10
- package/dist/chunk-fw2bm6dq.js.map +0 -182
- package/dist/chunk-zxthr2q5.js +0 -1487
- package/dist/chunk-zxthr2q5.js.map +0 -18
- /package/dist/{chunk-j9653e83.js.map → chunk-fwb9mxwm.js.map} +0 -0
- /package/dist/{chunk-km25essq.js.map → chunk-kes4ygmz.js.map} +0 -0
- /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Terminal } from "lucide-react"
|
|
2
|
+
import { ActivityStatusText } from "../components/activity-status"
|
|
3
|
+
import { useAgentMessages } from "../i18n"
|
|
4
|
+
import type { NormalizedTool } from "../parts"
|
|
5
|
+
import { toolResultValue } from "../parts"
|
|
6
|
+
import { useBackgroundCards } from "./context"
|
|
7
|
+
import { backgroundRowLabel } from "./interpret"
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A call that starts, reads or stops a background command, as one quiet line of the work: the
|
|
11
|
+
* card under the work is where the command stands, so the line only says what the agent did.
|
|
12
|
+
*/
|
|
13
|
+
export function BackgroundToolRow({ tool }: { readonly tool: NormalizedTool }) {
|
|
14
|
+
const messages = useAgentMessages()
|
|
15
|
+
const context = useBackgroundCards()
|
|
16
|
+
const running = tool.state === "input-streaming" || tool.state === "input-available"
|
|
17
|
+
const label = backgroundRowLabel(tool, messages)
|
|
18
|
+
const detail = commandNamed(tool, context?.thread.commands)
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="flex w-fit max-w-full items-center gap-1.5 text-[13px] leading-normal text-muted-foreground">
|
|
22
|
+
<Terminal className="size-3.5 shrink-0" />
|
|
23
|
+
{running ? (
|
|
24
|
+
<ActivityStatusText label={label} className="font-medium shimmer" />
|
|
25
|
+
) : (
|
|
26
|
+
<span className="min-w-0 truncate font-medium">{label}</span>
|
|
27
|
+
)}
|
|
28
|
+
{detail ? (
|
|
29
|
+
// A phone keeps the line for what the agent did.
|
|
30
|
+
<span className="hidden min-w-0 shrink truncate font-mono text-xs text-muted-foreground/60 sm:inline">
|
|
31
|
+
{detail}
|
|
32
|
+
</span>
|
|
33
|
+
) : null}
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The command a call names: its own input, what it returned, or the start of that id. */
|
|
39
|
+
function commandNamed(
|
|
40
|
+
tool: NormalizedTool,
|
|
41
|
+
commands: ReadonlyMap<string, { readonly id: string; readonly command: string }> | undefined
|
|
42
|
+
): string {
|
|
43
|
+
const input = isRecord(tool.input) ? tool.input : {}
|
|
44
|
+
const output = toolResultValue(tool.output)
|
|
45
|
+
const named =
|
|
46
|
+
typeof input.command === "string"
|
|
47
|
+
? input.command
|
|
48
|
+
: isRecord(output) && typeof output.command === "string"
|
|
49
|
+
? output.command
|
|
50
|
+
: [...(commands?.values() ?? [])].reverse().find((command) => command.id === input.id)
|
|
51
|
+
?.command
|
|
52
|
+
const line = named?.trim().split("\n")[0] ?? ""
|
|
53
|
+
return line || (typeof input.id === "string" ? input.id : "")
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
57
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
58
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createContext, useContext } from "react"
|
|
2
|
+
import type { BackgroundSource, ThreadBackground } from "./interpret"
|
|
3
|
+
|
|
4
|
+
/** What a conversation knows of its background commands, and lets its reader do with them. */
|
|
5
|
+
export interface TranscriptBackground {
|
|
6
|
+
readonly source: BackgroundSource
|
|
7
|
+
/**
|
|
8
|
+
* Ask its computer to stop a command, which it does at once: its owner's, while their `sixb`
|
|
9
|
+
* runs it. Absent for anyone else.
|
|
10
|
+
*/
|
|
11
|
+
readonly stop?: (command: { readonly id: string; readonly startedAt: string }) => Promise<void>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** What the background command cards of a transcript read. */
|
|
15
|
+
export interface BackgroundCardsContext extends TranscriptBackground {
|
|
16
|
+
readonly thread: ThreadBackground
|
|
17
|
+
/** The turn streaming now, which runs the commands it started. */
|
|
18
|
+
readonly liveRunId: string | null
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Null outside a transcript, such as in a workflow's agent trace: no card is shown there. */
|
|
22
|
+
export const BackgroundCardsContext = createContext<BackgroundCardsContext | null>(null)
|
|
23
|
+
|
|
24
|
+
export function useBackgroundCards(): BackgroundCardsContext | null {
|
|
25
|
+
return useContext(BackgroundCardsContext)
|
|
26
|
+
}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import type { AgentConversationMessage } from "../conversation"
|
|
2
|
+
import type { AgentMessages } from "../i18n/en"
|
|
3
|
+
import type { NormalizedTool } from "../parts"
|
|
4
|
+
import { toolResultValue } from "../parts"
|
|
5
|
+
|
|
6
|
+
// A command the agent runs in the background outlives the call that started it: later calls read
|
|
7
|
+
// it (`bash_output`) or stop it (`bash_stop`), maybe turns later, and on the owner's computer the
|
|
8
|
+
// open `sixb` reports how it stands between turns. The chat shows it as one card in the work's
|
|
9
|
+
// steps, in place of its start, merging all of these: only a reader who opens the steps sees it.
|
|
10
|
+
|
|
11
|
+
export type BackgroundCommandStatus = "running" | "exited" | "stopped"
|
|
12
|
+
|
|
13
|
+
/** The tools that start, read and stop a background command. */
|
|
14
|
+
export const BACKGROUND_TOOLS: ReadonlySet<string> = new Set(["bash", "bash_output", "bash_stop"])
|
|
15
|
+
|
|
16
|
+
/** How much of what the agent read of a command the card keeps: its newest characters. */
|
|
17
|
+
const OUTPUT_TAIL_CHARS = 8_000
|
|
18
|
+
|
|
19
|
+
/** A background command by its start: an id is unique to its run, its start to the thread. */
|
|
20
|
+
export function backgroundKey(command: { readonly id: string; readonly startedAt: string }) {
|
|
21
|
+
return `${command.id}@${command.startedAt}`
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A command a work group started, which its card stands for under the work. */
|
|
25
|
+
export type BackgroundStart =
|
|
26
|
+
/** The call is on its way: the command does not run yet. */
|
|
27
|
+
| { readonly kind: "starting"; readonly key: string; readonly command: string }
|
|
28
|
+
| {
|
|
29
|
+
readonly kind: "started"
|
|
30
|
+
readonly key: string
|
|
31
|
+
readonly id: string
|
|
32
|
+
readonly startedAt: string
|
|
33
|
+
readonly command: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** What the conversation's calls say of a command, oldest to newest. */
|
|
37
|
+
export interface CommandFromCalls {
|
|
38
|
+
readonly id: string
|
|
39
|
+
readonly command: string
|
|
40
|
+
readonly startedAt: string
|
|
41
|
+
readonly status: BackgroundCommandStatus
|
|
42
|
+
readonly exitCode?: number
|
|
43
|
+
readonly endedAt?: string
|
|
44
|
+
readonly outputPath?: string
|
|
45
|
+
/** The turn that started it. */
|
|
46
|
+
readonly runId: string | null
|
|
47
|
+
/** What the agent read of its output, newest last; `truncated` when more came before. */
|
|
48
|
+
readonly output: string
|
|
49
|
+
readonly truncated: boolean
|
|
50
|
+
/** A call naming it is on its way: the agent reads it, waits for it, or stops it. */
|
|
51
|
+
readonly pending?: "reading" | "waiting" | "stopping"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** The thread's background commands as its calls tell them, by {@link backgroundKey}. */
|
|
55
|
+
export interface ThreadBackground {
|
|
56
|
+
readonly commands: ReadonlyMap<string, CommandFromCalls>
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** A command as the computer's `sixb` reports it to its owner, between turns too. */
|
|
60
|
+
export interface LiveBackgroundCommand {
|
|
61
|
+
readonly id: string
|
|
62
|
+
readonly command: string
|
|
63
|
+
readonly status: BackgroundCommandStatus
|
|
64
|
+
readonly exitCode?: number
|
|
65
|
+
readonly startedAt: string
|
|
66
|
+
readonly endedAt?: string
|
|
67
|
+
/** A stop its owner asked for is on its way to it. */
|
|
68
|
+
readonly stopping?: boolean
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Where the thread's commands run, and what is known of them now. */
|
|
72
|
+
export interface BackgroundSource {
|
|
73
|
+
/** The thread runs on its owner's computer, where a command outlives its turn. */
|
|
74
|
+
readonly onComputer: boolean
|
|
75
|
+
/**
|
|
76
|
+
* What the computer reports, to its owner alone: null for anyone else, and in the cloud. Empty
|
|
77
|
+
* when `sixb` is closed there, which stopped them.
|
|
78
|
+
*/
|
|
79
|
+
readonly live: readonly LiveBackgroundCommand[] | null
|
|
80
|
+
/** `sixb` is open in the thread's folder. */
|
|
81
|
+
readonly online: boolean
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** How the card shows a command now. */
|
|
85
|
+
export interface BackgroundCardState {
|
|
86
|
+
readonly status: "starting" | BackgroundCommandStatus | "unknown"
|
|
87
|
+
readonly command: string
|
|
88
|
+
readonly startedAt?: string
|
|
89
|
+
readonly endedAt?: string
|
|
90
|
+
readonly exitCode?: number
|
|
91
|
+
/** Why a command its calls last saw running is gone: its turn, or its `sixb`, ended. */
|
|
92
|
+
readonly endedWith?: "turn" | "sixb"
|
|
93
|
+
/** Unknown as its owner's `sixb` does not answer there: closed, or offline. */
|
|
94
|
+
readonly unreachable?: boolean
|
|
95
|
+
/** A stop is on its way: the agent's, or one its owner asked for. */
|
|
96
|
+
readonly stopping: boolean
|
|
97
|
+
/** The agent waits for it, or reads it, now. */
|
|
98
|
+
readonly pending?: "reading" | "waiting"
|
|
99
|
+
/** Its owner can stop it from the card: it runs on their open `sixb`. */
|
|
100
|
+
readonly canStop: boolean
|
|
101
|
+
readonly output: string
|
|
102
|
+
readonly truncated: boolean
|
|
103
|
+
readonly outputPath?: string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The command a background start stands for, by its call: on its way, or started with its id. Null
|
|
108
|
+
* for one that could not start, which is a failed call like any other.
|
|
109
|
+
*/
|
|
110
|
+
export function backgroundStartOf(tool: NormalizedTool): BackgroundStart | null {
|
|
111
|
+
if (!isBackgroundStart(tool)) return null
|
|
112
|
+
|
|
113
|
+
const command = commandOf(tool)
|
|
114
|
+
if (tool.state === "input-streaming" || tool.state === "input-available") {
|
|
115
|
+
return { kind: "starting", key: "starting", command }
|
|
116
|
+
}
|
|
117
|
+
const state = tool.state === "output-available" ? commandState(tool.output) : null
|
|
118
|
+
if (!state) return null
|
|
119
|
+
return {
|
|
120
|
+
kind: "started",
|
|
121
|
+
key: backgroundKey(state),
|
|
122
|
+
id: state.id,
|
|
123
|
+
startedAt: state.startedAt,
|
|
124
|
+
command: command || state.command,
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Whether a call starts a command in the background. */
|
|
129
|
+
export function isBackgroundStart(tool: NormalizedTool): boolean {
|
|
130
|
+
return tool.toolName === "bash" && isRecord(tool.input) && tool.input.run_in_background === true
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** Read the thread's background commands from its turns, oldest first, the one streaming last. */
|
|
134
|
+
export function readThreadBackground(
|
|
135
|
+
messages: readonly Pick<AgentConversationMessage, "role" | "runId" | "parts">[]
|
|
136
|
+
): ThreadBackground {
|
|
137
|
+
const commands = new Map<string, CommandFromCalls>()
|
|
138
|
+
// The newest command by id: a call on its way names one by id alone.
|
|
139
|
+
const byId = new Map<string, string>()
|
|
140
|
+
|
|
141
|
+
const merge = (key: string, change: Partial<CommandFromCalls>) => {
|
|
142
|
+
const current = commands.get(key)
|
|
143
|
+
if (current) commands.set(key, { ...current, ...change })
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
for (const message of messages) {
|
|
147
|
+
if (message.role !== "assistant") continue
|
|
148
|
+
|
|
149
|
+
for (const part of message.parts) {
|
|
150
|
+
if (part.type !== "tool" || !BACKGROUND_TOOLS.has(part.toolName)) continue
|
|
151
|
+
const tool = part as NormalizedTool
|
|
152
|
+
|
|
153
|
+
if (tool.toolName === "bash") {
|
|
154
|
+
const state =
|
|
155
|
+
isBackgroundStart(tool) && tool.state === "output-available"
|
|
156
|
+
? commandState(tool.output)
|
|
157
|
+
: null
|
|
158
|
+
if (!state) continue
|
|
159
|
+
|
|
160
|
+
const key = backgroundKey(state)
|
|
161
|
+
commands.set(key, {
|
|
162
|
+
...state,
|
|
163
|
+
command: commandOf(tool) || state.command,
|
|
164
|
+
runId: message.runId,
|
|
165
|
+
output: "",
|
|
166
|
+
truncated: false,
|
|
167
|
+
})
|
|
168
|
+
byId.set(state.id, key)
|
|
169
|
+
continue
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// A read or a stop on its way names the command it is for.
|
|
173
|
+
if (tool.state === "input-streaming" || tool.state === "input-available") {
|
|
174
|
+
const input = isRecord(tool.input) ? tool.input : {}
|
|
175
|
+
const key = typeof input.id === "string" ? byId.get(input.id) : undefined
|
|
176
|
+
if (!key) continue
|
|
177
|
+
const pending =
|
|
178
|
+
tool.toolName === "bash_stop"
|
|
179
|
+
? "stopping"
|
|
180
|
+
: typeof input.wait === "number" && input.wait > 0
|
|
181
|
+
? "waiting"
|
|
182
|
+
: "reading"
|
|
183
|
+
merge(key, { pending })
|
|
184
|
+
continue
|
|
185
|
+
}
|
|
186
|
+
if (tool.state !== "output-available") continue
|
|
187
|
+
|
|
188
|
+
const read = commandState(tool.output)
|
|
189
|
+
if (!read) continue
|
|
190
|
+
const key = backgroundKey(read)
|
|
191
|
+
const known = commands.get(key)
|
|
192
|
+
// Its start is beyond what the conversation shows: the read stands for it.
|
|
193
|
+
const current: CommandFromCalls = known ?? {
|
|
194
|
+
...read,
|
|
195
|
+
runId: message.runId,
|
|
196
|
+
output: "",
|
|
197
|
+
truncated: false,
|
|
198
|
+
}
|
|
199
|
+
byId.set(read.id, key)
|
|
200
|
+
|
|
201
|
+
const written =
|
|
202
|
+
typeof outputOf(tool.output)?.output === "string" ? outputOf(tool.output)?.output : ""
|
|
203
|
+
const skipped = Number(outputOf(tool.output)?.skippedBytes ?? 0) > 0
|
|
204
|
+
const joined = current.output + (written ?? "")
|
|
205
|
+
// An end is final: a later read never says it runs again.
|
|
206
|
+
const ended = current.status !== "running" ? current : read
|
|
207
|
+
const { pending: _pending, ...rest } = current
|
|
208
|
+
commands.set(key, {
|
|
209
|
+
...rest,
|
|
210
|
+
status: ended.status,
|
|
211
|
+
...(ended.exitCode === undefined ? {} : { exitCode: ended.exitCode }),
|
|
212
|
+
...(ended.endedAt === undefined ? {} : { endedAt: ended.endedAt }),
|
|
213
|
+
output: joined.slice(-OUTPUT_TAIL_CHARS),
|
|
214
|
+
truncated: current.truncated || skipped || joined.length > OUTPUT_TAIL_CHARS,
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return { commands }
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* How a command's card reads now: its calls, what its `sixb` reports, and whether its turn still
|
|
224
|
+
* works. Whatever says it ended wins; a command its calls last saw running is gone once nothing can
|
|
225
|
+
* still run it: its turn ended in the cloud, or its `sixb` closed or no longer reports it.
|
|
226
|
+
*/
|
|
227
|
+
export function backgroundCardState(input: {
|
|
228
|
+
readonly start: BackgroundStart
|
|
229
|
+
readonly calls?: CommandFromCalls
|
|
230
|
+
readonly source: BackgroundSource
|
|
231
|
+
/** The turn streaming now, if any. */
|
|
232
|
+
readonly liveRunId: string | null
|
|
233
|
+
/** A stop the reader asked for here, until the computer reports it. */
|
|
234
|
+
readonly stopAsked?: boolean
|
|
235
|
+
}): BackgroundCardState {
|
|
236
|
+
const { start, calls, source } = input
|
|
237
|
+
const empty = { output: "", truncated: false, stopping: false, canStop: false }
|
|
238
|
+
if (start.kind === "starting") return { ...empty, status: "starting", command: start.command }
|
|
239
|
+
|
|
240
|
+
const live = source.live?.find((command) => backgroundKey(command) === start.key)
|
|
241
|
+
const base = {
|
|
242
|
+
command: start.command,
|
|
243
|
+
startedAt: start.startedAt,
|
|
244
|
+
output: calls?.output ?? "",
|
|
245
|
+
truncated: calls?.truncated ?? false,
|
|
246
|
+
...(calls?.outputPath ? { outputPath: calls.outputPath } : {}),
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const ended = [calls, live].find((each) => each !== undefined && each.status !== "running")
|
|
250
|
+
if (ended) {
|
|
251
|
+
return {
|
|
252
|
+
...base,
|
|
253
|
+
status: ended.status,
|
|
254
|
+
...(ended.exitCode === undefined ? {} : { exitCode: ended.exitCode }),
|
|
255
|
+
...(ended.endedAt === undefined ? {} : { endedAt: ended.endedAt }),
|
|
256
|
+
stopping: false,
|
|
257
|
+
canStop: false,
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const agentStopping = calls?.pending === "stopping"
|
|
262
|
+
const pending =
|
|
263
|
+
calls?.pending === "reading" || calls?.pending === "waiting" ? calls.pending : undefined
|
|
264
|
+
const running = {
|
|
265
|
+
...base,
|
|
266
|
+
status: "running" as const,
|
|
267
|
+
...(pending ? { pending } : {}),
|
|
268
|
+
}
|
|
269
|
+
if (live) {
|
|
270
|
+
const stopping = agentStopping || live.stopping === true || input.stopAsked === true
|
|
271
|
+
return { ...running, stopping, canStop: !stopping }
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Its turn still works: the command runs, and `sixb` has not reported it yet.
|
|
275
|
+
const turnWorks =
|
|
276
|
+
calls?.runId !== null && calls?.runId !== undefined && calls.runId === input.liveRunId
|
|
277
|
+
if (turnWorks || (!calls && input.liveRunId !== null)) {
|
|
278
|
+
return { ...running, stopping: agentStopping, canStop: false }
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const gone = { ...base, status: "stopped" as const, stopping: false, canStop: false }
|
|
282
|
+
// In the cloud, a turn's commands stop as it ends.
|
|
283
|
+
if (!source.onComputer) return { ...gone, endedWith: "turn" }
|
|
284
|
+
// Its open sixb no longer runs it: it restarted, and stopped it as it quit.
|
|
285
|
+
if (source.live !== null && source.online) return { ...gone, endedWith: "sixb" }
|
|
286
|
+
// sixb is closed there, or keeps its commands from the web, or the computer is someone else's:
|
|
287
|
+
// nothing says how it stands now.
|
|
288
|
+
return {
|
|
289
|
+
...base,
|
|
290
|
+
status: "unknown",
|
|
291
|
+
...(source.live !== null ? { unreachable: true } : {}),
|
|
292
|
+
stopping: false,
|
|
293
|
+
canStop: false,
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** What a background call reads as, in the work and as the live label of a turn at work. */
|
|
298
|
+
export function backgroundRowLabel(tool: NormalizedTool, messages: AgentMessages): string {
|
|
299
|
+
const rows = messages.background.rows
|
|
300
|
+
const input = isRecord(tool.input) ? tool.input : {}
|
|
301
|
+
const row =
|
|
302
|
+
tool.toolName === "bash_stop"
|
|
303
|
+
? rows.stop
|
|
304
|
+
: tool.toolName === "bash_output"
|
|
305
|
+
? typeof input.wait === "number" && input.wait > 0
|
|
306
|
+
? rows.wait
|
|
307
|
+
: rows.read
|
|
308
|
+
: rows.start
|
|
309
|
+
return tool.state === "input-streaming" || tool.state === "input-available"
|
|
310
|
+
? row.running
|
|
311
|
+
: row.title
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/** The command a call names in its input, as the model wrote it. */
|
|
315
|
+
function commandOf(tool: NormalizedTool): string {
|
|
316
|
+
const input = isRecord(tool.input) ? tool.input : {}
|
|
317
|
+
if (typeof input.command === "string") return input.command
|
|
318
|
+
const partial = /"command"\s*:\s*"((?:[^"\\]|\\.)*)/.exec(tool.inputText ?? "")
|
|
319
|
+
return partial?.[1] ? partial[1].replace(/\\n/g, "\n").replace(/\\"/g, '"') : ""
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/** A command's state, as its tools return it. */
|
|
323
|
+
function commandState(output: unknown): {
|
|
324
|
+
readonly id: string
|
|
325
|
+
readonly command: string
|
|
326
|
+
readonly startedAt: string
|
|
327
|
+
readonly status: BackgroundCommandStatus
|
|
328
|
+
readonly exitCode?: number
|
|
329
|
+
readonly endedAt?: string
|
|
330
|
+
readonly outputPath?: string
|
|
331
|
+
} | null {
|
|
332
|
+
const value = outputOf(output)
|
|
333
|
+
if (!value) return null
|
|
334
|
+
const { id, command, startedAt, status, exitCode, endedAt, outputPath } = value
|
|
335
|
+
if (typeof id !== "string" || typeof startedAt !== "string") return null
|
|
336
|
+
if (status !== "running" && status !== "exited" && status !== "stopped") return null
|
|
337
|
+
|
|
338
|
+
return {
|
|
339
|
+
id,
|
|
340
|
+
command: typeof command === "string" ? command : "",
|
|
341
|
+
startedAt,
|
|
342
|
+
status,
|
|
343
|
+
...(typeof exitCode === "number" ? { exitCode } : {}),
|
|
344
|
+
...(typeof endedAt === "string" ? { endedAt } : {}),
|
|
345
|
+
...(typeof outputPath === "string" ? { outputPath } : {}),
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
function outputOf(output: unknown): Record<string, unknown> | null {
|
|
350
|
+
const value = toolResultValue(output)
|
|
351
|
+
return isRecord(value) ? value : null
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
355
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
356
|
+
}
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
coerceBashInput,
|
|
31
31
|
coerceBashOutput,
|
|
32
32
|
commandPreview,
|
|
33
|
+
commandTimeout,
|
|
33
34
|
describeBash,
|
|
34
35
|
humanize,
|
|
35
36
|
type ModelMedia,
|
|
@@ -118,15 +119,19 @@ export function BashToolView({ tool }: { tool: BashTool }) {
|
|
|
118
119
|
// users can still expand and debug it. (Exploratory commands often fail and the agent recovers;
|
|
119
120
|
// surfacing that in red just makes a working run look broken.)
|
|
120
121
|
if (isError && !running) {
|
|
122
|
+
// A timed-out command exits as its signal does (137): say what happened, not the code.
|
|
123
|
+
const detail = parsed?.timedOut
|
|
124
|
+
? [description.detail, messages.bash.timedOut(commandTimeout(input))]
|
|
125
|
+
.filter(Boolean)
|
|
126
|
+
.join(" · ")
|
|
127
|
+
: description.detail
|
|
121
128
|
return (
|
|
122
129
|
<Collapsible>
|
|
123
130
|
<CollapsibleTrigger className="group flex w-fit max-w-full items-center gap-1.5 text-[13px] leading-normal text-muted-foreground transition-colors hover:text-foreground">
|
|
124
131
|
<Icon className="size-3.5 shrink-0" />
|
|
125
132
|
<span className="min-w-0 truncate font-medium">{label}</span>
|
|
126
|
-
{
|
|
127
|
-
<span className="min-w-0 shrink truncate text-muted-foreground/60">
|
|
128
|
-
{description.detail}
|
|
129
|
-
</span>
|
|
133
|
+
{detail ? (
|
|
134
|
+
<span className="min-w-0 shrink truncate text-muted-foreground/60">{detail}</span>
|
|
130
135
|
) : null}
|
|
131
136
|
<ChevronRight className="size-3.5 shrink-0 opacity-0 transition-all group-hover:opacity-100 group-focus-visible:opacity-100 group-data-[state=open]:rotate-90 group-data-[state=open]:opacity-100" />
|
|
132
137
|
</CollapsibleTrigger>
|
|
@@ -79,6 +79,8 @@ export interface ParsedBashOutput {
|
|
|
79
79
|
readonly stderr: string
|
|
80
80
|
readonly durationMs: number
|
|
81
81
|
readonly truncated: boolean
|
|
82
|
+
/** The command was stopped at its timeout: its exit code is the signal's, not its verdict. */
|
|
83
|
+
readonly timedOut: boolean
|
|
82
84
|
/** Decoded stdout when it parsed as JSON, otherwise undefined. */
|
|
83
85
|
readonly json: unknown
|
|
84
86
|
}
|
|
@@ -97,19 +99,35 @@ export function coerceBashInput(input: unknown): BashInput | null {
|
|
|
97
99
|
export function coerceBashOutput(output: unknown): ParsedBashOutput | null {
|
|
98
100
|
if (!isRecord(output)) return null
|
|
99
101
|
const stdout = typeof output.stdout === "string" ? output.stdout : ""
|
|
100
|
-
const
|
|
102
|
+
const timedOut = output.timedOut === true
|
|
103
|
+
const rawStderr = typeof output.stderr === "string" ? output.stderr : ""
|
|
104
|
+
// The line the bash tool adds for the model (how long it had, how to ask for more) is not for
|
|
105
|
+
// people: the step's line says it in their words.
|
|
106
|
+
const stderr = timedOut ? rawStderr.replace(/(^|\n)\[SixbAgent\] [^\n]*$/, "") : rawStderr
|
|
101
107
|
const exitCode = typeof output.exitCode === "number" ? output.exitCode : 0
|
|
102
108
|
return {
|
|
103
|
-
ok: exitCode === 0,
|
|
109
|
+
ok: exitCode === 0 && !timedOut,
|
|
104
110
|
exitCode,
|
|
105
111
|
stdout,
|
|
106
112
|
stderr,
|
|
107
113
|
durationMs: typeof output.durationMs === "number" ? output.durationMs : 0,
|
|
108
114
|
truncated: output.stdoutTruncated === true || output.stderrTruncated === true,
|
|
109
|
-
|
|
115
|
+
timedOut,
|
|
116
|
+
json: exitCode === 0 && !timedOut ? tryParseJson(stdout) : undefined,
|
|
110
117
|
}
|
|
111
118
|
}
|
|
112
119
|
|
|
120
|
+
/** How long a command had, as the bash tool gives it: 2 minutes unless it asked, 10 at most. */
|
|
121
|
+
export function commandTimeout(input: BashInput | null): string {
|
|
122
|
+
const asked = input?.timeoutMs
|
|
123
|
+
const ms =
|
|
124
|
+
asked !== undefined && Number.isFinite(asked) && asked > 0
|
|
125
|
+
? Math.min(Math.floor(asked), 10 * 60_000)
|
|
126
|
+
: 2 * 60_000
|
|
127
|
+
if (ms % 60_000 === 0) return `${ms / 60_000} min`
|
|
128
|
+
return ms % 1000 === 0 ? `${ms / 1000} s` : `${ms} ms`
|
|
129
|
+
}
|
|
130
|
+
|
|
113
131
|
// --- Command classification ------------------------------------------------
|
|
114
132
|
|
|
115
133
|
export function classifyCommand(command: string): BashIntent {
|
|
@@ -27,7 +27,7 @@ export function AgentMessageBody({ message }: AgentMessageBodyProps) {
|
|
|
27
27
|
return (
|
|
28
28
|
<>
|
|
29
29
|
{message.id === null ? <LivePublishes runId={message.runId} parts={parts} /> : null}
|
|
30
|
-
<AssistantBody parts={parts} live={message.status === "streaming"} />
|
|
30
|
+
<AssistantBody parts={parts} live={message.status === "streaming"} runId={message.runId} />
|
|
31
31
|
</>
|
|
32
32
|
)
|
|
33
33
|
}
|
|
@@ -78,6 +78,7 @@ export function ComposerMenu({
|
|
|
78
78
|
trigger,
|
|
79
79
|
title,
|
|
80
80
|
align,
|
|
81
|
+
side = "top",
|
|
81
82
|
className,
|
|
82
83
|
onCloseAutoFocus,
|
|
83
84
|
children,
|
|
@@ -88,6 +89,8 @@ export function ComposerMenu({
|
|
|
88
89
|
/** Names the menu to assistive technology. */
|
|
89
90
|
readonly title: string
|
|
90
91
|
readonly align: "start" | "end"
|
|
92
|
+
/** Which way it opens, room allowing. By default, up, over what's above the composer. */
|
|
93
|
+
readonly side?: "top" | "bottom"
|
|
91
94
|
readonly className?: string
|
|
92
95
|
/** Where the focus goes once the menu closes; the trigger unless prevented. */
|
|
93
96
|
readonly onCloseAutoFocus?: (event: Event) => void
|
|
@@ -115,7 +118,7 @@ export function ComposerMenu({
|
|
|
115
118
|
<PopoverTrigger asChild>{trigger}</PopoverTrigger>
|
|
116
119
|
<PopoverContent
|
|
117
120
|
align={align}
|
|
118
|
-
side=
|
|
121
|
+
side={side}
|
|
119
122
|
sideOffset={10}
|
|
120
123
|
collisionPadding={12}
|
|
121
124
|
aria-label={title}
|