@sixb/app 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +1 -1
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-context-provider.d.ts +1 -0
- package/dist/agent/agent-context-provider.d.ts.map +1 -1
- package/dist/agent/approvals.d.ts +110 -0
- package/dist/agent/approvals.d.ts.map +1 -0
- package/dist/agent/artifact-panel.d.ts +11 -7
- package/dist/agent/artifact-panel.d.ts.map +1 -1
- package/dist/agent/bash/bash-tool-view.d.ts +13 -0
- package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
- package/dist/agent/bash/interpret.d.ts +46 -2
- package/dist/agent/bash/interpret.d.ts.map +1 -1
- package/dist/agent/bash/model-media-view.d.ts +14 -0
- package/dist/agent/bash/model-media-view.d.ts.map +1 -0
- package/dist/agent/bash/shell.d.ts.map +1 -1
- package/dist/agent/components/agent-message-body.d.ts +21 -0
- package/dist/agent/components/agent-message-body.d.ts.map +1 -0
- package/dist/agent/components/agent-thread-switcher.d.ts +22 -1
- package/dist/agent/components/agent-thread-switcher.d.ts.map +1 -1
- package/dist/agent/components/approval-card.d.ts +17 -0
- package/dist/agent/components/approval-card.d.ts.map +1 -0
- package/dist/agent/components/approval-mode-chip.d.ts +17 -0
- package/dist/agent/components/approval-mode-chip.d.ts.map +1 -0
- package/dist/agent/components/auto-model-chip.d.ts +24 -0
- package/dist/agent/components/auto-model-chip.d.ts.map +1 -0
- package/dist/agent/components/composer.d.ts +21 -2
- package/dist/agent/components/composer.d.ts.map +1 -1
- package/dist/agent/components/context-chips.d.ts +4 -2
- package/dist/agent/components/context-chips.d.ts.map +1 -1
- package/dist/agent/components/conversation-panel.d.ts +13 -55
- package/dist/agent/components/conversation-panel.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +17 -3
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/message-view.d.ts +19 -21
- package/dist/agent/components/message-view.d.ts.map +1 -1
- package/dist/agent/components/model-controls.d.ts +8 -2
- package/dist/agent/components/model-controls.d.ts.map +1 -1
- package/dist/agent/components/model-picker-row.d.ts +5 -1
- package/dist/agent/components/model-picker-row.d.ts.map +1 -1
- package/dist/agent/components/participant-input.d.ts +29 -0
- package/dist/agent/components/participant-input.d.ts.map +1 -0
- package/dist/agent/components/provider-logo.d.ts +5 -4
- package/dist/agent/components/provider-logo.d.ts.map +1 -1
- package/dist/agent/components/reasoning-effort-slider.d.ts +8 -7
- package/dist/agent/components/reasoning-effort-slider.d.ts.map +1 -1
- package/dist/agent/components/sandbox-recovery.d.ts +8 -2
- package/dist/agent/components/sandbox-recovery.d.ts.map +1 -1
- package/dist/agent/components/shared-thread-notice.d.ts +10 -0
- package/dist/agent/components/shared-thread-notice.d.ts.map +1 -0
- package/dist/agent/components/thread-artifacts-menu.d.ts +8 -2
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
- package/dist/agent/components/thread-people.d.ts +24 -0
- package/dist/agent/components/thread-people.d.ts.map +1 -0
- package/dist/agent/components/transcript.d.ts +22 -29
- package/dist/agent/components/transcript.d.ts.map +1 -1
- package/dist/agent/conversation.d.ts +201 -0
- package/dist/agent/conversation.d.ts.map +1 -0
- package/dist/agent/delegation/child-card.d.ts +19 -0
- package/dist/agent/delegation/child-card.d.ts.map +1 -0
- package/dist/agent/delegation/child-cards.d.ts +9 -0
- package/dist/agent/delegation/child-cards.d.ts.map +1 -0
- package/dist/agent/delegation/child-group.d.ts +14 -0
- package/dist/agent/delegation/child-group.d.ts.map +1 -0
- package/dist/agent/delegation/child-parts.d.ts +50 -0
- package/dist/agent/delegation/child-parts.d.ts.map +1 -0
- package/dist/agent/delegation/child-work.d.ts +31 -0
- package/dist/agent/delegation/child-work.d.ts.map +1 -0
- package/dist/agent/delegation/context.d.ts +22 -0
- package/dist/agent/delegation/context.d.ts.map +1 -0
- package/dist/agent/delegation/interpret.d.ts +104 -0
- package/dist/agent/delegation/interpret.d.ts.map +1 -0
- package/dist/agent/delegation/model.d.ts +52 -0
- package/dist/agent/delegation/model.d.ts.map +1 -0
- package/dist/agent/delegation/use-children.d.ts +1007 -0
- package/dist/agent/delegation/use-children.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +692 -131
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/hooks/use-thread-sharing.d.ts +35 -0
- package/dist/agent/hooks/use-thread-sharing.d.ts.map +1 -0
- package/dist/agent/i18n/en.d.ts +313 -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 +608 -0
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/live-run.d.ts.map +1 -1
- package/dist/agent/memory-paths.d.ts +18 -0
- package/dist/agent/memory-paths.d.ts.map +1 -0
- package/dist/agent/message-agent/interpret.d.ts +21 -0
- package/dist/agent/message-agent/interpret.d.ts.map +1 -0
- package/dist/agent/message-authors.d.ts +56 -0
- package/dist/agent/message-authors.d.ts.map +1 -0
- package/dist/agent/model-selection.d.ts +10 -0
- package/dist/agent/model-selection.d.ts.map +1 -1
- package/dist/agent/observed-conversation.d.ts +26 -0
- package/dist/agent/observed-conversation.d.ts.map +1 -0
- package/dist/agent/observed-thread.d.ts +9 -0
- package/dist/agent/observed-thread.d.ts.map +1 -0
- package/dist/agent/parts.d.ts +5 -0
- package/dist/agent/parts.d.ts.map +1 -1
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +5 -2
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
- package/dist/agent/read/interpret.d.ts +2 -0
- package/dist/agent/read/interpret.d.ts.map +1 -1
- package/dist/agent/run-presentation.d.ts +11 -0
- package/dist/agent/run-presentation.d.ts.map +1 -1
- package/dist/agent/sharing.d.ts +42 -0
- package/dist/agent/sharing.d.ts.map +1 -0
- package/dist/agent/tool-views/built-in.d.ts +5 -0
- package/dist/agent/tool-views/built-in.d.ts.map +1 -0
- package/dist/agent/tool-views/define.d.ts +79 -0
- package/dist/agent/tool-views/define.d.ts.map +1 -0
- package/dist/agent/tool-views/registry.d.ts +28 -0
- package/dist/agent/tool-views/registry.d.ts.map +1 -0
- package/dist/agent/utils/radio-group.d.ts +11 -0
- package/dist/agent/utils/radio-group.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts.map +1 -1
- package/dist/artifacts/card-preview.d.ts.map +1 -1
- package/dist/artifacts/downloads.d.ts +26 -0
- package/dist/artifacts/downloads.d.ts.map +1 -0
- package/dist/artifacts/edit-session.d.ts +36 -0
- package/dist/artifacts/edit-session.d.ts.map +1 -0
- package/dist/artifacts/file-source.d.ts +27 -1
- package/dist/artifacts/file-source.d.ts.map +1 -1
- package/dist/artifacts/file-type-icon.d.ts +14 -0
- package/dist/artifacts/file-type-icon.d.ts.map +1 -0
- package/dist/artifacts/frame-embeds.d.ts +20 -0
- package/dist/artifacts/frame-embeds.d.ts.map +1 -0
- package/dist/artifacts/frame.d.ts +12 -1
- package/dist/artifacts/frame.d.ts.map +1 -1
- package/dist/artifacts/gallery.d.ts.map +1 -1
- package/dist/artifacts/history.d.ts +15 -0
- package/dist/artifacts/history.d.ts.map +1 -0
- package/dist/artifacts/kind-icon.d.ts +7 -0
- package/dist/artifacts/kind-icon.d.ts.map +1 -1
- package/dist/artifacts/messages.d.ts +518 -4
- package/dist/artifacts/messages.d.ts.map +1 -1
- package/dist/artifacts/page-queries.d.ts +22 -0
- package/dist/artifacts/page-queries.d.ts.map +1 -0
- package/dist/artifacts/page-state.d.ts +21 -0
- package/dist/artifacts/page-state.d.ts.map +1 -0
- package/dist/artifacts/people.d.ts +12 -0
- package/dist/artifacts/people.d.ts.map +1 -0
- package/dist/artifacts/person-avatar.d.ts +23 -0
- package/dist/artifacts/person-avatar.d.ts.map +1 -0
- package/dist/artifacts/publish-edit.d.ts +29 -0
- package/dist/artifacts/publish-edit.d.ts.map +1 -0
- package/dist/artifacts/queries.d.ts +77 -1
- 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 +21 -0
- package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/board.d.ts +54 -0
- package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/canvas.d.ts +27 -0
- package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/controls.d.ts +8 -0
- package/dist/artifacts/renderers/canvas/controls.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts +77 -0
- package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts +55 -0
- package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/editing.d.ts +40 -0
- package/dist/artifacts/renderers/canvas/editing.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/focus.d.ts +15 -0
- package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/items.d.ts +13 -0
- package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/layout.d.ts +46 -0
- package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts +13 -0
- package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts +10 -0
- package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -0
- package/dist/artifacts/renderers/canvas/toolbar.d.ts +15 -0
- package/dist/artifacts/renderers/canvas/toolbar.d.ts.map +1 -0
- package/dist/artifacts/renderers/notice.d.ts.map +1 -1
- package/dist/artifacts/renderers/page.d.ts +34 -0
- package/dist/artifacts/renderers/page.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/cell-editor.d.ts +21 -0
- package/dist/artifacts/renderers/sheet/cell-editor.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/cells.d.ts +93 -0
- package/dist/artifacts/renderers/sheet/cells.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-data.d.ts +27 -7
- package/dist/artifacts/renderers/sheet/chart-data.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/chart-icon.d.ts +5 -0
- package/dist/artifacts/renderers/sheet/chart-icon.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-locked.d.ts +9 -0
- package/dist/artifacts/renderers/sheet/chart-locked.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart.d.ts +2 -1
- package/dist/artifacts/renderers/sheet/chart.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/column-format.d.ts +28 -0
- package/dist/artifacts/renderers/sheet/column-format.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/column-menu.d.ts +51 -0
- package/dist/artifacts/renderers/sheet/column-menu.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/downloads.d.ts +10 -0
- package/dist/artifacts/renderers/sheet/downloads.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/draft.d.ts +131 -0
- package/dist/artifacts/renderers/sheet/draft.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/filter-panel.d.ts +20 -0
- package/dist/artifacts/renderers/sheet/filter-panel.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/filter.d.ts +40 -0
- package/dist/artifacts/renderers/sheet/filter.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/find-bar.d.ts +42 -0
- package/dist/artifacts/renderers/sheet/find-bar.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/find.d.ts +18 -0
- package/dist/artifacts/renderers/sheet/find.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/fit.d.ts +15 -0
- package/dist/artifacts/renderers/sheet/fit.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/format.d.ts +14 -6
- package/dist/artifacts/renderers/sheet/format.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/frame.d.ts +69 -0
- package/dist/artifacts/renderers/sheet/frame.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/grid.d.ts +69 -6
- package/dist/artifacts/renderers/sheet/grid.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/highlight.d.ts +32 -0
- package/dist/artifacts/renderers/sheet/highlight.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/input.d.ts +30 -0
- package/dist/artifacts/renderers/sheet/input.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/locked.d.ts +17 -0
- package/dist/artifacts/renderers/sheet/locked.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/mini-chart.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/model.d.ts +26 -4
- package/dist/artifacts/renderers/sheet/model.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/selection.d.ts +30 -6
- package/dist/artifacts/renderers/sheet/selection.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/sheet.d.ts +5 -5
- package/dist/artifacts/renderers/sheet/sheet.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/totals.d.ts +16 -0
- package/dist/artifacts/renderers/sheet/totals.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/view.d.ts +44 -0
- package/dist/artifacts/renderers/sheet/view.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/workbook.d.ts +23 -3
- package/dist/artifacts/renderers/sheet/workbook.d.ts.map +1 -1
- package/dist/artifacts/renderers/sheet/xlsx.d.ts +18 -0
- package/dist/artifacts/renderers/sheet/xlsx.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/zip.d.ts +12 -0
- package/dist/artifacts/renderers/sheet/zip.d.ts.map +1 -0
- package/dist/artifacts/renderers/slides/slides.d.ts.map +1 -1
- package/dist/artifacts/tones.d.ts +4 -0
- package/dist/artifacts/tones.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts +2 -0
- package/dist/artifacts/viewer.d.ts.map +1 -1
- package/dist/auth.d.ts +6 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/chunk-0yb22w6m.js +1487 -0
- package/dist/chunk-0yb22w6m.js.map +18 -0
- package/dist/{chunk-c7gy61rx.js → chunk-1rhht9y0.js} +165 -4
- package/dist/chunk-1rhht9y0.js.map +10 -0
- package/dist/{chunk-gn3k23q5.js → chunk-53z5653y.js} +64 -3
- package/dist/chunk-53z5653y.js.map +11 -0
- package/dist/chunk-aes17xmx.js +29190 -0
- package/dist/chunk-aes17xmx.js.map +172 -0
- package/dist/{chunk-g3f4cm8x.js → chunk-k4epnkcr.js} +1 -1
- package/dist/{chunk-ng0hdnrq.js → chunk-sw3pyqgy.js} +3 -1
- package/dist/chunk-sw3pyqgy.js.map +10 -0
- package/dist/{chunk-3schcf10.js → chunk-vtp6nk44.js} +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts +1 -0
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -7
- package/dist/index.js.map +3 -3
- package/dist/locale-messages.d.ts +1 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +1 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/metadata.d.ts.map +1 -1
- package/dist/pages/observability/action-run.d.ts.map +1 -1
- package/dist/pages/observability/activity/messages.d.ts +14 -0
- package/dist/pages/observability/activity/messages.d.ts.map +1 -1
- package/dist/pages/observability/activity/thread.d.ts +6 -0
- package/dist/pages/observability/activity/thread.d.ts.map +1 -0
- package/dist/pages/observability/activity/timeline.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/calls.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/format.d.ts +16 -5
- package/dist/pages/observability/ai-usage/format.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/kinds.d.ts +40 -0
- package/dist/pages/observability/ai-usage/kinds.d.ts.map +1 -0
- package/dist/pages/observability/ai-usage/messages.d.ts +74 -12
- package/dist/pages/observability/ai-usage/messages.d.ts.map +1 -1
- package/dist/pages/observability/ai-usage/page.d.ts.map +1 -1
- package/dist/pages/observability/messages.d.ts +4 -0
- package/dist/pages/observability/messages.d.ts.map +1 -1
- package/dist/pages/ontology/actions.d.ts.map +1 -1
- package/dist/pages/ontology/components/action-button.d.ts +6 -0
- package/dist/pages/ontology/components/action-button.d.ts.map +1 -1
- package/dist/pages/ontology/components/user-picker.d.ts +37 -0
- package/dist/pages/ontology/components/user-picker.d.ts.map +1 -0
- package/dist/pages/ontology/workflows/run-input-form.d.ts.map +1 -1
- package/dist/pages/routes.d.ts +2 -0
- package/dist/pages/routes.d.ts.map +1 -1
- package/dist/pages/section-page.d.ts +13 -0
- package/dist/pages/section-page.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts.map +1 -1
- 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-contents.d.ts +30 -0
- package/dist/pages/settings/memory-contents.d.ts.map +1 -0
- package/dist/pages/settings/memory-entries.d.ts +42 -0
- package/dist/pages/settings/memory-entries.d.ts.map +1 -0
- package/dist/pages/settings/memory-files.d.ts +49 -0
- package/dist/pages/settings/memory-files.d.ts.map +1 -0
- package/dist/pages/settings/memory-history.d.ts +8 -0
- package/dist/pages/settings/memory-history.d.ts.map +1 -0
- package/dist/pages/settings/memory.d.ts +21 -0
- package/dist/pages/settings/memory.d.ts.map +1 -0
- package/dist/pages/settings/messages.d.ts +206 -0
- package/dist/pages/settings/messages.d.ts.map +1 -1
- package/dist/pages/settings/personal.d.ts +2 -2
- package/dist/pages/settings/personal.d.ts.map +1 -1
- package/dist/pages/settings/sessions.d.ts.map +1 -1
- package/dist/pages/values.d.ts +1 -0
- package/dist/pages/values.d.ts.map +1 -1
- package/dist/pages.d.ts +13 -16
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +6729 -4370
- package/dist/pages.js.map +32 -26
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +68 -39
- package/dist/server.js.map +5 -5
- package/package.json +4 -4
- package/src/agent/activity-label.ts +17 -2
- package/src/agent/agent-chat.tsx +92 -104
- package/src/agent/agent-context-provider.tsx +1 -0
- package/src/agent/agent.css +82 -0
- package/src/agent/approvals.ts +268 -0
- package/src/agent/artifact-panel.tsx +22 -13
- package/src/agent/bash/bash-tool-view.tsx +98 -6
- package/src/agent/bash/interpret.ts +265 -3
- package/src/agent/bash/model-media-view.tsx +474 -0
- package/src/agent/bash/shell.ts +3 -2
- package/src/agent/components/agent-message-body.tsx +56 -0
- package/src/agent/components/agent-thread-switcher.tsx +216 -43
- package/src/agent/components/approval-card.tsx +840 -0
- package/src/agent/components/approval-mode-chip.tsx +227 -0
- package/src/agent/components/auto-model-chip.tsx +283 -0
- package/src/agent/components/composer.tsx +73 -3
- package/src/agent/components/context-chips.tsx +5 -6
- package/src/agent/components/conversation-panel.tsx +27 -149
- package/src/agent/components/message-parts.tsx +169 -54
- package/src/agent/components/message-view.tsx +114 -167
- package/src/agent/components/model-controls.tsx +29 -3
- package/src/agent/components/model-picker-row.tsx +22 -4
- package/src/agent/components/participant-input.tsx +165 -0
- package/src/agent/components/provider-logo.tsx +6 -1
- package/src/agent/components/reasoning-effort-slider.tsx +10 -8
- package/src/agent/components/sandbox-recovery.tsx +24 -5
- package/src/agent/components/shared-thread-notice.tsx +34 -0
- package/src/agent/components/thread-artifacts-menu.tsx +29 -12
- package/src/agent/components/thread-people.tsx +521 -0
- package/src/agent/components/transcript.tsx +314 -147
- package/src/agent/conversation.ts +634 -0
- package/src/agent/delegation/child-card.tsx +398 -0
- package/src/agent/delegation/child-cards.tsx +144 -0
- package/src/agent/delegation/child-group.tsx +150 -0
- package/src/agent/delegation/child-parts.tsx +321 -0
- package/src/agent/delegation/child-work.tsx +244 -0
- package/src/agent/delegation/context.ts +28 -0
- package/src/agent/delegation/interpret.ts +407 -0
- package/src/agent/delegation/model.ts +159 -0
- package/src/agent/delegation/use-children.ts +235 -0
- package/src/agent/hooks/use-agent-conversation.ts +856 -93
- package/src/agent/hooks/use-thread-sharing.ts +197 -0
- package/src/agent/i18n/en.ts +322 -0
- package/src/agent/i18n/fr.ts +334 -0
- package/src/agent/live-run.ts +23 -40
- package/src/agent/memory-paths.ts +41 -0
- package/src/agent/message-agent/interpret.ts +60 -0
- package/src/agent/message-authors.ts +115 -0
- package/src/agent/model-selection.ts +15 -0
- package/src/agent/observed-conversation.tsx +210 -0
- package/src/agent/observed-thread.ts +13 -0
- package/src/agent/parts.ts +23 -0
- package/src/agent/publish-artifact/use-live-publishes.ts +5 -2
- package/src/agent/read/interpret.ts +18 -0
- package/src/agent/read/read-tool-view.tsx +2 -2
- package/src/agent/run-presentation.ts +37 -1
- package/src/agent/sharing.ts +95 -0
- package/src/agent/tool-views/built-in.tsx +56 -0
- package/src/agent/tool-views/define.ts +150 -0
- package/src/agent/tool-views/registry.tsx +125 -0
- package/src/agent/utils/radio-group.ts +29 -0
- package/src/artifacts/artifacts.css +96 -0
- package/src/artifacts/card-details.ts +9 -1
- package/src/artifacts/card-preview.tsx +23 -12
- package/src/artifacts/downloads.tsx +130 -0
- package/src/artifacts/edit-session.tsx +115 -0
- package/src/artifacts/file-source.ts +94 -4
- package/src/artifacts/file-type-icon.tsx +114 -0
- package/src/artifacts/frame-embeds.tsx +113 -0
- package/src/artifacts/frame.tsx +143 -19
- package/src/artifacts/gallery.tsx +3 -0
- package/src/artifacts/history.ts +42 -0
- package/src/artifacts/kind-icon.tsx +31 -1
- package/src/artifacts/messages.ts +601 -16
- package/src/artifacts/page-queries.ts +80 -0
- package/src/artifacts/page-state.ts +211 -0
- package/src/artifacts/people.ts +19 -0
- package/src/artifacts/person-avatar.tsx +40 -0
- package/src/artifacts/publish-edit.ts +90 -0
- package/src/artifacts/queries.ts +242 -5
- package/src/artifacts/references/references.tsx +219 -18
- package/src/artifacts/renderers/canvas/arrows.tsx +134 -0
- package/src/artifacts/renderers/canvas/board.tsx +108 -0
- package/src/artifacts/renderers/canvas/canvas.tsx +195 -0
- package/src/artifacts/renderers/canvas/controls.tsx +75 -0
- package/src/artifacts/renderers/canvas/draft.ts +322 -0
- package/src/artifacts/renderers/canvas/edit-mode.tsx +301 -0
- package/src/artifacts/renderers/canvas/editing.tsx +187 -0
- package/src/artifacts/renderers/canvas/focus.tsx +128 -0
- package/src/artifacts/renderers/canvas/items.tsx +380 -0
- package/src/artifacts/renderers/canvas/layout.ts +132 -0
- package/src/artifacts/renderers/canvas/renderer.tsx +110 -0
- package/src/artifacts/renderers/canvas/thumbnail.tsx +144 -0
- package/src/artifacts/renderers/canvas/toolbar.tsx +316 -0
- package/src/artifacts/renderers/notice.tsx +3 -1
- package/src/artifacts/renderers/page.tsx +152 -0
- package/src/artifacts/renderers/sheet/cell-editor.tsx +125 -0
- package/src/artifacts/renderers/sheet/cells.tsx +462 -0
- package/src/artifacts/renderers/sheet/chart-data.ts +124 -14
- package/src/artifacts/renderers/sheet/chart-icon.ts +18 -0
- package/src/artifacts/renderers/sheet/chart-locked.tsx +30 -0
- package/src/artifacts/renderers/sheet/chart.tsx +153 -3
- package/src/artifacts/renderers/sheet/column-format.tsx +413 -0
- package/src/artifacts/renderers/sheet/column-menu.tsx +198 -0
- package/src/artifacts/renderers/sheet/downloads.tsx +88 -0
- package/src/artifacts/renderers/sheet/draft.ts +589 -0
- package/src/artifacts/renderers/sheet/filter-panel.tsx +255 -0
- package/src/artifacts/renderers/sheet/filter.ts +182 -0
- package/src/artifacts/renderers/sheet/find-bar.tsx +177 -0
- package/src/artifacts/renderers/sheet/find.ts +50 -0
- package/src/artifacts/renderers/sheet/fit.ts +54 -0
- package/src/artifacts/renderers/sheet/format.ts +48 -7
- package/src/artifacts/renderers/sheet/frame.tsx +531 -0
- package/src/artifacts/renderers/sheet/grid.tsx +1266 -287
- package/src/artifacts/renderers/sheet/highlight.ts +83 -0
- package/src/artifacts/renderers/sheet/input.ts +191 -0
- package/src/artifacts/renderers/sheet/locked.ts +112 -0
- package/src/artifacts/renderers/sheet/mini-chart.tsx +72 -4
- package/src/artifacts/renderers/sheet/model.ts +69 -8
- package/src/artifacts/renderers/sheet/selection.ts +136 -9
- package/src/artifacts/renderers/sheet/sheet.tsx +440 -264
- package/src/artifacts/renderers/sheet/totals.ts +54 -0
- package/src/artifacts/renderers/sheet/view.ts +96 -0
- package/src/artifacts/renderers/sheet/workbook.ts +107 -8
- package/src/artifacts/renderers/sheet/xlsx.ts +516 -0
- package/src/artifacts/renderers/sheet/zip.ts +108 -0
- package/src/artifacts/renderers/slides/slides.tsx +3 -55
- package/src/artifacts/tones.ts +14 -0
- package/src/artifacts/viewer.tsx +915 -96
- package/src/auth.ts +8 -2
- package/src/codegen.ts +29 -12
- package/src/createCustomApp.ts +59 -18
- package/src/index.ts +72 -2
- package/src/locale-messages.ts +2 -0
- package/src/metadata.ts +16 -3
- package/src/pages/observability/action-run.tsx +5 -1
- package/src/pages/observability/activity/messages.ts +16 -0
- package/src/pages/observability/activity/thread.tsx +150 -0
- package/src/pages/observability/activity/timeline.tsx +40 -3
- package/src/pages/observability/ai-usage/calls.tsx +61 -18
- package/src/pages/observability/ai-usage/format.ts +61 -8
- package/src/pages/observability/ai-usage/kinds.tsx +156 -0
- package/src/pages/observability/ai-usage/messages.ts +91 -14
- package/src/pages/observability/ai-usage/page.tsx +157 -48
- package/src/pages/observability/messages.ts +3 -0
- package/src/pages/ontology/actions.tsx +25 -4
- package/src/pages/ontology/components/action-button.tsx +53 -17
- package/src/pages/ontology/components/user-picker.tsx +161 -0
- package/src/pages/ontology/object-type.tsx +6 -0
- package/src/pages/ontology/workflows/run-input-form.tsx +12 -1
- package/src/pages/routes.ts +5 -0
- package/src/pages/section-page.tsx +27 -0
- package/src/pages/section-ui.tsx +3 -2
- package/src/pages/settings/controls.tsx +10 -2
- package/src/pages/settings/members.tsx +1 -5
- package/src/pages/settings/memory-contents.tsx +173 -0
- package/src/pages/settings/memory-entries.ts +112 -0
- package/src/pages/settings/memory-files.ts +195 -0
- package/src/pages/settings/memory-history.tsx +559 -0
- package/src/pages/settings/memory.tsx +993 -0
- package/src/pages/settings/messages.ts +232 -2
- package/src/pages/settings/personal.tsx +247 -27
- package/src/pages/settings/service-accounts.tsx +1 -1
- package/src/pages/settings/sessions.tsx +1 -4
- package/src/pages/values.tsx +65 -10
- package/src/pages.ts +16 -26
- package/src/sections/catalog.ts +18 -1
- package/src/sections/sections.tsx +2 -0
- package/dist/chunk-c7gy61rx.js.map +0 -10
- package/dist/chunk-gn3k23q5.js.map +0 -10
- package/dist/chunk-ng0hdnrq.js.map +0 -10
- package/dist/chunk-xxpdn63v.js +0 -15018
- package/dist/chunk-xxpdn63v.js.map +0 -105
- /package/dist/{chunk-g3f4cm8x.js.map → chunk-k4epnkcr.js.map} +0 -0
- /package/dist/{chunk-3schcf10.js.map → chunk-vtp6nk44.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,KAAK,aAAa,EAAM,MAAM,MAAM,CAAA;AAK7C,wFAAwF;AACxF,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,KAAK,aA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,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/D,wBAAgB,kBAAkB,CAAC,KAAK,GAAE,MAAM,GAAG,IAAW,GAAG,YAAY,CAc5E;AAED,oGAAoG;AACpG,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAEjE;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAGjF;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,YAAY,CAWvF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A memory file: its repo, and its path inside the repo. */
|
|
2
|
+
export interface MemoryFile {
|
|
3
|
+
readonly repo: "user" | "project";
|
|
4
|
+
readonly path: string;
|
|
5
|
+
}
|
|
6
|
+
/** Whether `text` names a memory file or folder. */
|
|
7
|
+
export declare function mentionsMemory(text: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The first memory file `text` names; the conflict copy names the file it is for. Its path is `""`
|
|
10
|
+
* for a repo itself. `null` when `text` names no memory file.
|
|
11
|
+
*/
|
|
12
|
+
export declare function memoryFile(text: string): MemoryFile | null;
|
|
13
|
+
/**
|
|
14
|
+
* A memory file as the chat names it: a note by its name in words, without its folder or `.md`;
|
|
15
|
+
* any other file by its file name. The index, `MEMORY.md`, is the memory itself and has no name.
|
|
16
|
+
*/
|
|
17
|
+
export declare function memoryFileLabel(path: string): string | undefined;
|
|
18
|
+
//# sourceMappingURL=memory-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-paths.d.ts","sourceRoot":"","sources":["../../src/agent/memory-paths.ts"],"names":[],"mappings":"AAOA,6DAA6D;AAC7D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,oDAAoD;AACpD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAO1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKhE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AgentMessages } from "../i18n/en";
|
|
2
|
+
import { type NormalizedTool } from "../parts";
|
|
3
|
+
export interface MessageAgentDescription {
|
|
4
|
+
/** The row's title: what the Agent told which child, or that it could not. */
|
|
5
|
+
readonly title: string;
|
|
6
|
+
/** The live label while it is the latest work: short, in the moment. */
|
|
7
|
+
readonly running: string;
|
|
8
|
+
}
|
|
9
|
+
/** A question a child waits on, as `wait_agent` returned it. */
|
|
10
|
+
export interface ChildQuestion {
|
|
11
|
+
readonly key: string;
|
|
12
|
+
readonly text: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* What a `message_agent` call reads as: while the Agent writes it, once sent, or refused. Sent to
|
|
16
|
+
* a child waiting on its question, it is the Agent's answer.
|
|
17
|
+
*/
|
|
18
|
+
export declare function describeMessageAgent(tool: NormalizedTool, messages: AgentMessages): MessageAgentDescription;
|
|
19
|
+
/** The questions a `wait_agent` call returned: the children that wait on the Agent's answer. */
|
|
20
|
+
export declare function childQuestions(tool: NormalizedTool): readonly ChildQuestion[];
|
|
21
|
+
//# sourceMappingURL=interpret.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpret.d.ts","sourceRoot":"","sources":["../../../src/agent/message-agent/interpret.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,UAAU,CAAA;AAE/D,MAAM,WAAW,uBAAuB;IACtC,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,aAAa,GACtB,uBAAuB,CAmBzB;AAED,gGAAgG;AAChG,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,aAAa,EAAE,CAU7E"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CurrentUser } from "../session";
|
|
2
|
+
import type { AgentThread } from "./types";
|
|
3
|
+
/** A message page's `authors`: who wrote its messages, with an account's display name. */
|
|
4
|
+
export interface MessageAuthor {
|
|
5
|
+
readonly type: string;
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly displayName?: string;
|
|
8
|
+
}
|
|
9
|
+
/** How a message names its author: what the line says, and whose initials the avatar shows. */
|
|
10
|
+
export interface AuthorLabel {
|
|
11
|
+
/** "You" for the reader, else the author's name. */
|
|
12
|
+
readonly label: string;
|
|
13
|
+
/** The author's name, or their id when their account has none. */
|
|
14
|
+
readonly name: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Set around a conversation whose messages name their author: someone else's, read by an observer,
|
|
18
|
+
* or one shared between several people.
|
|
19
|
+
*/
|
|
20
|
+
export interface MessageAuthors {
|
|
21
|
+
/** How a message names who wrote it, the reader included for a message not saved yet. */
|
|
22
|
+
readonly labelOf: (author: {
|
|
23
|
+
readonly type: string;
|
|
24
|
+
readonly id: string;
|
|
25
|
+
} | undefined) => AuthorLabel | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare const MessageAuthorsContext: import("react").Context<MessageAuthors | null>;
|
|
28
|
+
/** How messages name their author here, or null where they do not. */
|
|
29
|
+
export declare function useMessageAuthors(): MessageAuthors | null;
|
|
30
|
+
/** Authors by `type:id`, with their name or else their id. */
|
|
31
|
+
export declare function authorNames(authors: readonly MessageAuthor[] | undefined): ReadonlyMap<string, string>;
|
|
32
|
+
export declare function principalKey(principal: {
|
|
33
|
+
readonly type: string;
|
|
34
|
+
readonly id: string;
|
|
35
|
+
}): string;
|
|
36
|
+
/** Someone's name when the thread's people or the page's authors give one. */
|
|
37
|
+
export declare function knownName(principal: {
|
|
38
|
+
readonly type: string;
|
|
39
|
+
readonly id: string;
|
|
40
|
+
}, thread: AgentThread | null, authors: readonly MessageAuthor[] | undefined): string | undefined;
|
|
41
|
+
/** Names each message's author from a map of names; the reader's own say `you`. */
|
|
42
|
+
export declare function messageAuthors(names: ReadonlyMap<string, string>, reader?: {
|
|
43
|
+
readonly key: string;
|
|
44
|
+
readonly label: string;
|
|
45
|
+
}): MessageAuthors;
|
|
46
|
+
/**
|
|
47
|
+
* How the reader's own conversation names its authors: only once more than one person takes part,
|
|
48
|
+
* or more than one wrote in it, as in a copy of a shared conversation. The reader's own read `you`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function useConversationAuthors({ thread, authors, user, you, }: {
|
|
51
|
+
readonly thread: AgentThread | null;
|
|
52
|
+
readonly authors: readonly MessageAuthor[] | undefined;
|
|
53
|
+
readonly user: CurrentUser | null;
|
|
54
|
+
readonly you: string;
|
|
55
|
+
}): MessageAuthors | null;
|
|
56
|
+
//# sourceMappingURL=message-authors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-authors.d.ts","sourceRoot":"","sources":["../../src/agent/message-authors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,K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AAa,EAAE,GAAG,SAAS,GAC5C,MAAM,GAAG,SAAS,CAOpB;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,MAAM,CAAC,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACxD,cAAc,CAWhB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,OAAO,EACP,IAAI,EACJ,GAAG,GACJ,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,SAAS,CAAA;IACtD,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB,GAAG,cAAc,GAAG,IAAI,CAkBxB"}
|
|
@@ -10,11 +10,18 @@ export interface ModelPreference {
|
|
|
10
10
|
}
|
|
11
11
|
/** What the composer shows and what the next message asks the server for. */
|
|
12
12
|
export interface ResolvedModelSelection {
|
|
13
|
+
/** With tiers and no model pinned: Sixb picks each message's model, and nothing is asked for. */
|
|
14
|
+
readonly auto?: true;
|
|
13
15
|
readonly model?: LanguageModel;
|
|
14
16
|
readonly reasoning?: ModelReasoningLevel;
|
|
15
17
|
/** `undefined` while the user follows the project defaults: the server resolves them. */
|
|
16
18
|
readonly request?: ModelPreference;
|
|
17
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* With tiers, the chat starts on Auto: a decision model picks each message's model, and without
|
|
22
|
+
* one every message runs on `standard`. Choosing a model pins it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function hasTiers(models: readonly LanguageModel[]): boolean;
|
|
18
25
|
export declare function defaultLanguageModel(models: readonly LanguageModel[]): LanguageModel | undefined;
|
|
19
26
|
/** The level the server applies when a message selects this model without a reasoning. */
|
|
20
27
|
export declare function defaultReasoningLevel(model: LanguageModel): ModelReasoningLevel | undefined;
|
|
@@ -24,6 +31,9 @@ export declare function defaultReasoningLevel(model: LanguageModel): ModelReason
|
|
|
24
31
|
* so project default changes still reach them. A reasoning chosen without a model stays with
|
|
25
32
|
* whichever model is the project default. A preference the catalog no longer supports falls back
|
|
26
33
|
* the same way.
|
|
34
|
+
*
|
|
35
|
+
* With tiers, a chosen model pins it, with its reasoning; anything else is Auto, which asks for
|
|
36
|
+
* nothing so the server picks. A reasoning alone pins no model, so Auto drops it.
|
|
27
37
|
*/
|
|
28
38
|
export declare function resolveModelSelection(models: readonly LanguageModel[], preference: ModelPreference | null): ResolvedModelSelection;
|
|
29
39
|
/** Choosing an effort keeps the chosen model, if any: it never pins today's default model. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-selection.d.ts","sourceRoot":"","sources":["../../src/agent/model-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,SAAS,CAAC,CAAA;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAA;CACzC;AAED,6EAA6E;AAC7E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAA;IACxC,yFAAyF;IACzF,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAA;CACnC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,GAAG,aAAa,GAAG,SAAS,CAEhG;AAED,0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ACjC,SAAS,EAAE,mBAAmB,GAC7B,eAAe,CAGjB;AAED,8FAA8F;AAC9F,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,sBAAsB,GAChC,eAAe,GAAG,IAAI,CAGxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ArtifactTarget } from "../artifacts/target";
|
|
2
|
+
import type { AgentThread } from "./types";
|
|
3
|
+
type ReadStatus = "pending" | "error" | "success";
|
|
4
|
+
/**
|
|
5
|
+
* When to read an observed thread again: often while the agent answers, slowly while idle, as a
|
|
6
|
+
* run can start at any time. Never once a read fails, such as after the grant is revoked.
|
|
7
|
+
*/
|
|
8
|
+
export declare function observedThreadPollMs(status: ReadStatus, activeRunId: string | null | undefined): number | false;
|
|
9
|
+
/** When to read its messages and runs again: only while the agent answers, until a read fails. */
|
|
10
|
+
export declare function observedTranscriptPollMs(status: ReadStatus, answering: boolean): number | false;
|
|
11
|
+
export interface ObservedConversationProps {
|
|
12
|
+
/** Someone else's thread, as `GET /api/observed-agent-threads/:threadId` returns it. */
|
|
13
|
+
readonly thread: AgentThread;
|
|
14
|
+
readonly artifactTarget?: ArtifactTarget | null;
|
|
15
|
+
readonly onArtifactTargetChange?: (target: ArtifactTarget | null) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Someone else's conversation, read with `can.observe(agent.threads)`: the agent's transcript and
|
|
19
|
+
* artifact panel, without a composer or anything else that acts on the thread. Messages name their
|
|
20
|
+
* author. A turn in progress shows once it is saved, as the observer's reads are not streamed.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ObservedConversation({ thread, artifactTarget, onArtifactTargetChange, }: ObservedConversationProps): import("react").JSX.Element;
|
|
23
|
+
/** The conversation's authors by `type:id`, with their name or else their id. */
|
|
24
|
+
export declare function useObservedAuthors(threadId: string): ReadonlyMap<string, string>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=observed-conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observed-conversation.d.ts","sourceRoot":"","sources":["../../src/agent/observed-conversation.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAUzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAQ1C,KAAK,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;AAEjD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACrC,MAAM,GAAG,KAAK,CAGhB;AAED,kGAAkG;AAClG,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAE/F;AAID,MAAM,WAAW,yBAAyB;IACxC,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IAC/C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAA;CAC1E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,cAAc,EACd,sBAAsB,GACvB,EAAE,yBAAyB,+BAsH3B;AAOD,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAGhF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set around a conversation read with `can.observe(agent.threads)`: someone else's, so its
|
|
3
|
+
* sub-agents are read through the observer's routes. Its authors are named through
|
|
4
|
+
* `MessageAuthorsContext`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ObservedThreadContext: import("react").Context<boolean>;
|
|
7
|
+
/** Whether the conversation around a message is observed rather than the reader's own. */
|
|
8
|
+
export declare function useObservedThread(): boolean;
|
|
9
|
+
//# sourceMappingURL=observed-thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observed-thread.d.ts","sourceRoot":"","sources":["../../src/agent/observed-thread.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,kCAAuB,CAAA;AAEzD,0FAA0F;AAC1F,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C"}
|
package/dist/agent/parts.d.ts
CHANGED
|
@@ -39,4 +39,9 @@ export declare function toolResultFiles(output: unknown): {
|
|
|
39
39
|
readonly fileRef: AgentFileRef;
|
|
40
40
|
readonly contentIndex: number;
|
|
41
41
|
}[];
|
|
42
|
+
/**
|
|
43
|
+
* What a rich tool result says, for a tool shown without a view of its own: its text, as the value
|
|
44
|
+
* it holds when it is JSON. Any other output is returned as it is.
|
|
45
|
+
*/
|
|
46
|
+
export declare function toolResultValue(output: unknown): unknown;
|
|
42
47
|
//# sourceMappingURL=parts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../src/agent/parts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAK7D,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,CAAA;IAC3F,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,S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AAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAA;CACjF,GACL,cAAc,EAAE,CA0DlB;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAC7B,MAAM,EAAE,OAAO,GACd;IAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,EAAE,CASrE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAcxD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NormalizedPart } from "../parts";
|
|
2
2
|
/**
|
|
3
3
|
* Follows what a live turn publishes: each new version refreshes the artifact and every list of
|
|
4
4
|
* artifacts, and the turn's first publish opens the panel on it, at its latest version so later
|
|
@@ -6,5 +6,8 @@ import type { LiveRunState } from "../live-run";
|
|
|
6
6
|
* a dialog would take the reader's focus, and the composer's, while the Agent is still working,
|
|
7
7
|
* so there the card waits to be opened.
|
|
8
8
|
*/
|
|
9
|
-
export declare function useLivePublishes(live:
|
|
9
|
+
export declare function useLivePublishes(live: {
|
|
10
|
+
readonly runId: string | null;
|
|
11
|
+
readonly parts: readonly NormalizedPart[];
|
|
12
|
+
}): void;
|
|
10
13
|
//# sourceMappingURL=use-live-publishes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-live-publishes.d.ts","sourceRoot":"","sources":["../../../src/agent/publish-artifact/use-live-publishes.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"use-live-publishes.d.ts","sourceRoot":"","sources":["../../../src/agent/publish-artifact/use-live-publishes.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAM9C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAA;CAC1C,GAAG,IAAI,CA0BP"}
|
|
@@ -17,6 +17,8 @@ export interface ReadDescription {
|
|
|
17
17
|
readonly failedTitle: string;
|
|
18
18
|
readonly detail?: string;
|
|
19
19
|
readonly skill: boolean;
|
|
20
|
+
/** A file of the Agent's memory, which the detail names instead of the lines read. */
|
|
21
|
+
readonly memory: boolean;
|
|
20
22
|
}
|
|
21
23
|
export declare function coerceReadInput(value: unknown): ReadInput | null;
|
|
22
24
|
export declare function coerceReadOutput(value: unknown): ReadOutput | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interpret.d.ts","sourceRoot":"","sources":["../../../src/agent/read/interpret.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAM,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"interpret.d.ts","sourceRoot":"","sources":["../../../src/agent/read/interpret.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAM,MAAM,YAAY,CAAA;AAGnD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,sFAAsF;IACtF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAEhE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAuBlE;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,GAAG,IAAI,EACvB,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,QAAQ,GAAE,aAAkB,GAC3B,eAAe,CA6BjB"}
|
|
@@ -10,6 +10,17 @@ export declare function shouldShowExtendedWaitingStatus(run: Pick<AgentRun, "sta
|
|
|
10
10
|
* after a successful retry.
|
|
11
11
|
*/
|
|
12
12
|
export declare function findPreStreamFailedRun(runs: readonly AgentRun[], messages: readonly AgentMessage[]): AgentRun | null;
|
|
13
|
+
export declare function isContinuableDiagnostic(code: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the conversation offers Continue: a turn cut short with its progress saved, or, once
|
|
16
|
+
* nothing runs, a newest answer whose diagnostic says it stopped short of finishing.
|
|
17
|
+
*/
|
|
18
|
+
export declare function offersContinue(input: {
|
|
19
|
+
readonly presentation: ActiveTurnPresentation;
|
|
20
|
+
readonly isRunning: boolean;
|
|
21
|
+
readonly sandboxRecovery: boolean;
|
|
22
|
+
readonly messages: readonly AgentMessage[];
|
|
23
|
+
}): boolean;
|
|
13
24
|
/** Pick the run the conversation should follow: pending send, thread claim, then durable history. */
|
|
14
25
|
export declare function selectActiveRunId(sources: {
|
|
15
26
|
readonly pendingRun: AgentRun | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-presentation.d.ts","sourceR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AAE,CAAA;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAA;IAC1C,yFAAyF;IACzF,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;CAClC;AAED,MAAM,MAAM,sBAAsB;AAChC;+EAC+E;AAC7E;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,IAAI,CAAA;CAAE;AACtE,kGAAkG;GAChG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAA;CAAE;AACrD,8FAA8F;GAC5F;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAA;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AACH,8FAA8F;GAC5F;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;CAAE;AACzF,2DAA2D;GACzD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7B;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,sBAAsB,CA2FpF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CurrentUser } from "../session";
|
|
2
|
+
import type { AgentRun, AgentThread } from "./types";
|
|
3
|
+
/** How the signed-in person takes part in a conversation: its owner, or someone it was shared with. */
|
|
4
|
+
export type ThreadAccess = "owner" | "participant";
|
|
5
|
+
/** Someone in a conversation, with the name their account shows when it has one. */
|
|
6
|
+
export interface ThreadPerson {
|
|
7
|
+
readonly principal: {
|
|
8
|
+
readonly type: string;
|
|
9
|
+
readonly id: string;
|
|
10
|
+
};
|
|
11
|
+
readonly displayName?: string;
|
|
12
|
+
}
|
|
13
|
+
interface Principal {
|
|
14
|
+
readonly type: string;
|
|
15
|
+
readonly id: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function samePrincipal(a: Principal | null | undefined, b: Principal | null | undefined): boolean;
|
|
18
|
+
export declare function userPrincipal(user: CurrentUser | null): Principal | null;
|
|
19
|
+
/**
|
|
20
|
+
* The reader's part in a thread. Without a signed-in user (auth off) the app acts for the project,
|
|
21
|
+
* which owns every conversation it can read.
|
|
22
|
+
*/
|
|
23
|
+
export declare function threadAccess(thread: AgentThread, user: CurrentUser | null): ThreadAccess;
|
|
24
|
+
/** The thread's owner, with their name. */
|
|
25
|
+
export declare function threadOwner(thread: AgentThread): ThreadPerson;
|
|
26
|
+
/** The people the owner added, with their names. */
|
|
27
|
+
export declare function threadParticipants(thread: AgentThread): readonly ThreadPerson[];
|
|
28
|
+
/** A person's name, or their id when their account has none, as #825 names authors. */
|
|
29
|
+
export declare function personName(person: ThreadPerson): string;
|
|
30
|
+
/** Whether a conversation is read by more than its owner. */
|
|
31
|
+
export declare function isShared(thread: AgentThread | null): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Who may retry a run: only whoever asked for it, as it runs again with their rights. Without a
|
|
34
|
+
* signed-in user the project decides; a signed-in reader never retries a run nobody asked for.
|
|
35
|
+
*/
|
|
36
|
+
export declare function canRetryRun(run: AgentRun, user: CurrentUser | null): boolean;
|
|
37
|
+
/** Whether someone other than the reader asked for a run, as far as the reader can tell. */
|
|
38
|
+
export declare function requestedBySomeoneElse(run: AgentRun | null, user: CurrentUser | null): boolean;
|
|
39
|
+
/** Who may stop an answer: the thread's owner any answer, a participant only their own. */
|
|
40
|
+
export declare function canStopRun(run: AgentRun | null, access: ThreadAccess, user: CurrentUser | null): boolean;
|
|
41
|
+
export {};
|
|
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D;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAE5D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAK5E;AAED,4FAA4F;AAC5F,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAI9F;AAED,2FAA2F;AAC3F,wBAAgB,UAAU,CACxB,GAAG,EAAE,QAAQ,GAAG,IAAI,EACpB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,WAAW,GAAG,IAAI,GACvB,OAAO,CAKT"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { NormalizedTool } from "../parts";
|
|
3
|
+
/** The framework's row for a call, or null when the generic inspector shows it. */
|
|
4
|
+
export declare function builtInToolView(tool: NormalizedTool): ReactNode;
|
|
5
|
+
//# sourceMappingURL=built-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../src/agent/tool-views/built-in.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAgD9C,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,CAE/D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { AgentToolDefinition, InferAgentToolInput, InferAgentToolOutput } from "@sixb/core";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
/** Where a tool's view shows in the chat: in place of its row in the work, or in the answer. */
|
|
4
|
+
export type AgentToolViewPlacement = "work" | "answer";
|
|
5
|
+
/**
|
|
6
|
+
* What a tool's view receives, by the state of the call. A saved message holds only finished
|
|
7
|
+
* calls; a live reply goes through every state.
|
|
8
|
+
*/
|
|
9
|
+
export type AgentToolViewProps<TTool extends AgentToolDefinition = AgentToolDefinition> = {
|
|
10
|
+
/** The model is still writing the input. */
|
|
11
|
+
readonly state: "input-streaming";
|
|
12
|
+
/** The input written so far: partial JSON text. */
|
|
13
|
+
readonly inputText?: string;
|
|
14
|
+
readonly input?: undefined;
|
|
15
|
+
readonly output?: undefined;
|
|
16
|
+
readonly errorText?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
/** The input is valid and the tool is running. */
|
|
19
|
+
readonly state: "input-available";
|
|
20
|
+
readonly inputText?: undefined;
|
|
21
|
+
readonly input: InferAgentToolInput<TTool>;
|
|
22
|
+
readonly output?: undefined;
|
|
23
|
+
readonly errorText?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
readonly state: "output-available";
|
|
26
|
+
readonly inputText?: undefined;
|
|
27
|
+
readonly input: InferAgentToolInput<TTool>;
|
|
28
|
+
readonly output: InferAgentToolOutput<TTool>;
|
|
29
|
+
readonly errorText?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
readonly state: "output-error";
|
|
32
|
+
readonly inputText?: undefined;
|
|
33
|
+
/**
|
|
34
|
+
* What the model sent, when the call got that far. Not typed as the tool's input: a call
|
|
35
|
+
* refused for its input carries the input it was refused for, which may not match the schema.
|
|
36
|
+
*/
|
|
37
|
+
readonly input?: unknown;
|
|
38
|
+
readonly output?: undefined;
|
|
39
|
+
readonly errorText: string;
|
|
40
|
+
};
|
|
41
|
+
type StoredAgentToolViewRender<TTool extends AgentToolDefinition> = {
|
|
42
|
+
bivarianceHack(props: AgentToolViewProps<TTool>): ReactNode;
|
|
43
|
+
}["bivarianceHack"];
|
|
44
|
+
/** How the chat shows one tool's calls. Register it in the `toolViews` export of `app/layout.tsx`. */
|
|
45
|
+
export interface AgentToolView<TTool extends AgentToolDefinition = AgentToolDefinition> {
|
|
46
|
+
readonly kind: "agentToolView";
|
|
47
|
+
readonly toolName: TTool["name"];
|
|
48
|
+
readonly placement: AgentToolViewPlacement;
|
|
49
|
+
readonly render: StoredAgentToolViewRender<TTool>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Define how the chat shows a tool's calls. Type it with the tool's definition, imported as a type
|
|
53
|
+
* so nothing from the server reaches the browser:
|
|
54
|
+
*
|
|
55
|
+
* ```tsx
|
|
56
|
+
* import type { quoteShipping } from "../../agent-tools/quote-shipping"
|
|
57
|
+
*
|
|
58
|
+
* export const quoteView = defineAgentToolView<typeof quoteShipping>("quote_shipping", {
|
|
59
|
+
* placement: "answer",
|
|
60
|
+
* }).render(({ state, output }) => (state === "output-available" ? <Quote {...output} /> : null))
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* The component renders as a React component, so it can use hooks. A view that throws falls back
|
|
64
|
+
* to the tool's built-in row.
|
|
65
|
+
*/
|
|
66
|
+
export declare function defineAgentToolView<TTool extends AgentToolDefinition>(name: TTool["name"], options?: {
|
|
67
|
+
readonly placement?: AgentToolViewPlacement;
|
|
68
|
+
}): {
|
|
69
|
+
render(component: (props: AgentToolViewProps<TTool>) => ReactNode): AgentToolView<TTool>;
|
|
70
|
+
};
|
|
71
|
+
export declare function isAgentToolView(value: unknown): value is AgentToolView;
|
|
72
|
+
/**
|
|
73
|
+
* The views of a layout's `toolViews` export by tool name. Both the build, when it loads the
|
|
74
|
+
* layout, and the provider in the browser read the export through this, so a mistake is reported
|
|
75
|
+
* the same way: `fail` turns what is wrong into the error to throw.
|
|
76
|
+
*/
|
|
77
|
+
export declare function agentToolViews(views: unknown, fail?: (detail: string) => Error): ReadonlyMap<string, AgentToolView>;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../../src/agent/tool-views/define.ts"],"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C,CAkBpC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { NormalizedPart, NormalizedTool } from "../parts";
|
|
3
|
+
import { type AgentToolView, type AgentToolViewProps } from "./define";
|
|
4
|
+
/**
|
|
5
|
+
* Carries the project's `toolViews`, exported by `app/layout.tsx`, to every chat in the app. The
|
|
6
|
+
* generated app mounts it around the layout; without it, chats show the framework's views alone.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AgentToolViewsProvider({ views, children, }: {
|
|
9
|
+
readonly views: unknown;
|
|
10
|
+
readonly children: ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** The project's view of a tool, which takes the place of the framework's. */
|
|
13
|
+
export declare function useAgentToolView(toolName: string): AgentToolView | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The views of the turn's tools shown in the answer, in call order. Each call keeps its row in the
|
|
16
|
+
* work; a view that fails shows nothing here.
|
|
17
|
+
*/
|
|
18
|
+
export declare function AnswerToolViews({ parts }: {
|
|
19
|
+
readonly parts: readonly NormalizedPart[];
|
|
20
|
+
}): (import("react").JSX.Element | null)[];
|
|
21
|
+
/** A call shown through the project's view, or through `fallback` when the view throws. */
|
|
22
|
+
export declare function ProjectToolView({ view, tool, fallback, }: {
|
|
23
|
+
readonly view: AgentToolView;
|
|
24
|
+
readonly tool: NormalizedTool;
|
|
25
|
+
readonly fallback: ReactNode;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export declare function toolViewProps(tool: NormalizedTool): AgentToolViewProps;
|
|
28
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/agent/tool-views/registry.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAkB,MAAM,UAAU,CAAA;AAMtF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,+BAMA;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE5E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAA;CAAE,0CAUvF;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,+BAQA;AAOD,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,kBAAkB,CAiBtE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KeyboardEvent } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Arrow keys in a radio group made of buttons: the group is one tab stop (its checked radio, whose
|
|
4
|
+
* `tabIndex` is 0), and the arrows move between its radios. With `select`, moving also chooses, as
|
|
5
|
+
* a native radio group does; without it, as in a menu that closes on a choice, Enter or Space
|
|
6
|
+
* chooses the radio in focus.
|
|
7
|
+
*/
|
|
8
|
+
export declare function moveRadioFocus(event: KeyboardEvent<HTMLElement>, options?: {
|
|
9
|
+
readonly select?: boolean;
|
|
10
|
+
}): void;
|
|
11
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/agent/utils/radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,EACjC,OAAO,GAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC1C,IAAI,CAiBN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-details.d.ts","sourceRoot":"","sources":["../../src/artifacts/card-details.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,MAAM,GACb,MAAM,
|
|
1
|
+
{"version":3,"file":"card-details.d.ts","sourceRoot":"","sources":["../../src/artifacts/card-details.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,MAAM,GACb,MAAM,CAyCR;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,gBAAgB,GACzB,MAAM,EAAE,CA+BV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-preview.d.ts","sourceRoot":"","sources":["../../src/artifacts/card-preview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card-preview.d.ts","sourceRoot":"","sources":["../../src/artifacts/card-preview.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAA;AAK/C,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAErE,OAAO,EAAE,KAAK,eAAe,EAAoD,MAAM,WAAW,CAAA;AAQlG,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAYzE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,IAAI,EACJ,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;IAC7C,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B,+BAGA;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B,+BAmBA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,KAAK,EACL,IAAI,EACJ,KAAa,EACb,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,+BA2BA;AA2GD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;CAAE,+BAe3E;AAmKD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE,CAM1D;AA+GD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB,CAmBA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FileTypeName } from "./file-type-icon";
|
|
2
|
+
/** One file an artifact downloads as: a file to fetch, or one built when chosen. */
|
|
3
|
+
export interface DownloadOption {
|
|
4
|
+
readonly key: string;
|
|
5
|
+
readonly type: FileTypeName;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
/** A quieter line under the title: the file's name, or what it holds. */
|
|
8
|
+
readonly detail?: string;
|
|
9
|
+
/** The heading of the group it starts or belongs to, in the menu. */
|
|
10
|
+
readonly section?: string;
|
|
11
|
+
readonly href?: string;
|
|
12
|
+
/** The name it saves as, for a file fetched by `href`. */
|
|
13
|
+
readonly fileName?: string;
|
|
14
|
+
/** Builds and saves the file, for a download made in the browser. */
|
|
15
|
+
readonly run?: () => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The header's Download: a menu of the files an artifact downloads as, each with its type's icon,
|
|
19
|
+
* its name, and what it holds. A file built in the browser shows its progress on the button, and
|
|
20
|
+
* says so beside it when it fails.
|
|
21
|
+
*/
|
|
22
|
+
export declare function DownloadMenu({ options, className, }: {
|
|
23
|
+
readonly options: readonly DownloadOption[];
|
|
24
|
+
readonly className?: string;
|
|
25
|
+
}): import("react").JSX.Element | null;
|
|
26
|
+
//# sourceMappingURL=downloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"downloads.d.ts","sourceRoot":"","sources":["../../src/artifacts/downloads.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAGlE,oFAAoF;AACpF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAA;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,sCAwFA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PublishArtifactVersionResponse } from "@sixb/client";
|
|
2
|
+
import type { QueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { type ReactNode } from "react";
|
|
4
|
+
import { type ArtifactVersion } from "./queries";
|
|
5
|
+
/** What a renderer editing a version tells the viewer: whether it changed anything, and what. */
|
|
6
|
+
export interface ArtifactDraft {
|
|
7
|
+
readonly changed: boolean;
|
|
8
|
+
/** The files a save publishes: each changed path with its new text, or `null` to drop it. */
|
|
9
|
+
readonly files: () => ReadonlyMap<string, string | null>;
|
|
10
|
+
/** Takes back the last change; absent when there is none. */
|
|
11
|
+
readonly undo?: () => void;
|
|
12
|
+
/** Makes again the last change taken back; absent when there is none. */
|
|
13
|
+
readonly redo?: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface EditSession {
|
|
16
|
+
/** Whether the reader is editing the version shown. */
|
|
17
|
+
readonly editing: boolean;
|
|
18
|
+
readonly report: (draft: ArtifactDraft | null) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function EditSessionProvider({ editing, report, children, }: EditSession & {
|
|
21
|
+
readonly children: ReactNode;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
/** Whether the version shown is being edited: a renderer that edits shows its editing tools. */
|
|
24
|
+
export declare function useArtifactEditing(): boolean;
|
|
25
|
+
/** Tells the viewer what the renderer's draft holds, for the header's Save. */
|
|
26
|
+
export declare function useReportDraft(draft: ArtifactDraft | null): void;
|
|
27
|
+
/**
|
|
28
|
+
* Publishes a draft as the artifact's next version, and fills the cache with it: the new version,
|
|
29
|
+
* and each file's text, the changed ones from the draft and the rest from the version edited, so
|
|
30
|
+
* the new version opens at once, without reading again what the reader already has.
|
|
31
|
+
*/
|
|
32
|
+
export declare function saveDraft(queries: QueryClient, version: ArtifactVersion, draft: ArtifactDraft, options?: {
|
|
33
|
+
readonly baseVersion?: number;
|
|
34
|
+
}): Promise<PublishArtifactVersionResponse>;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=edit-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-session.d.ts","sourceRoot":"","sources":["../../src/artifacts/edit-session.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,cAAc,CA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