@mastra/playground-ui 68.0.0-alpha.2 → 68.0.0
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/dist/{FilterBar-CQl04O6t.cjs → FilterBar-BSP2UTjc.cjs} +2 -2
- package/dist/{FilterBar-CQl04O6t.cjs.map → FilterBar-BSP2UTjc.cjs.map} +1 -1
- package/dist/{FilterBar-BgW2dqRQ.js → FilterBar-PSQ1OwqH.js} +2 -2
- package/dist/{FilterBar-BgW2dqRQ.js.map → FilterBar-PSQ1OwqH.js.map} +1 -1
- package/dist/KnowledgePageGraph.css +55 -0
- package/dist/{MarkdownRenderer-2GOXQJEv.js → MarkdownRenderer-CI30RqdB.js} +19 -6
- package/dist/MarkdownRenderer-CI30RqdB.js.map +1 -0
- package/dist/{MarkdownRenderer-CB8Z_CHc.cjs → MarkdownRenderer-y65WGBhC.cjs} +19 -6
- package/dist/MarkdownRenderer-y65WGBhC.cjs.map +1 -0
- package/dist/{MetricsCard-CEB-f2sv.cjs → MetricsCard-BEwiS7Pe.cjs} +8 -8
- package/dist/MetricsCard-BEwiS7Pe.cjs.map +1 -0
- package/dist/{MetricsCard-M8awJ2B_.js → MetricsCard-ua6C6b8a.js} +10 -10
- package/dist/MetricsCard-ua6C6b8a.js.map +1 -0
- package/dist/{MetricsLineChart-BhHoduO0.js → MetricsLineChart-4SwxBbQx.js} +14 -3
- package/dist/MetricsLineChart-4SwxBbQx.js.map +1 -0
- package/dist/{MetricsLineChart-CjBm4IXu.cjs → MetricsLineChart-tZxsauau.cjs} +13 -2
- package/dist/MetricsLineChart-tZxsauau.cjs.map +1 -0
- package/dist/{MetricsStackedBarChart-BdMlKv6G.cjs → MetricsStackedBarChart-CDLE76IB.cjs} +2 -2
- package/dist/{MetricsStackedBarChart-BdMlKv6G.cjs.map → MetricsStackedBarChart-CDLE76IB.cjs.map} +1 -1
- package/dist/{MetricsStackedBarChart-BRuA6MTE.js → MetricsStackedBarChart-D2QyS4-z.js} +2 -2
- package/dist/{MetricsStackedBarChart-BRuA6MTE.js.map → MetricsStackedBarChart-D2QyS4-z.js.map} +1 -1
- package/dist/{activity-rJ1NQl_2.js → activity-C8Ql81WM.js} +2 -2
- package/dist/{activity-rJ1NQl_2.js.map → activity-C8Ql81WM.js.map} +1 -1
- package/dist/{activity-DyB5H3gF.cjs → activity-CcQZeDYi.cjs} +2 -2
- package/dist/{activity-DyB5H3gF.cjs.map → activity-CcQZeDYi.cjs.map} +1 -1
- package/dist/components/DateTimeRangePicker.cjs.js +1 -1
- package/dist/components/DateTimeRangePicker.es.js +1 -1
- package/dist/components/FilterBar.cjs.js +2 -2
- package/dist/components/FilterBar.es.js +2 -2
- package/dist/components/MarkdownRenderer.cjs.js +1 -1
- package/dist/components/MarkdownRenderer.es.js +1 -1
- package/dist/components/MetricsCard.cjs.js +1 -1
- package/dist/components/MetricsCard.es.js +1 -1
- package/dist/components/MetricsLineChart.cjs.js +1 -1
- package/dist/components/MetricsLineChart.es.js +1 -1
- package/dist/components/MetricsStackedBarChart.cjs.js +1 -1
- package/dist/components/MetricsStackedBarChart.es.js +1 -1
- package/dist/components/SavedViews.cjs.js +1 -1
- package/dist/components/SavedViews.es.js +1 -1
- package/dist/components/ai/activity.cjs.js +1 -1
- package/dist/components/ai/activity.es.js +1 -1
- package/dist/components/ai/plan.cjs.js +1 -1
- package/dist/components/ai/plan.es.js +1 -1
- package/dist/components/ai/tool-approval.cjs.js +1 -1
- package/dist/components/ai/tool-approval.es.js +1 -1
- package/dist/components/ai/tool-call.cjs.js +2 -2
- package/dist/components/ai/tool-call.es.js +2 -2
- package/dist/{date-time-range-picker-CTt7Od0P.cjs → date-time-range-picker-CWGjoR3j.cjs} +40 -13
- package/dist/date-time-range-picker-CWGjoR3j.cjs.map +1 -0
- package/dist/{date-time-range-picker-DKh1K9Iy.js → date-time-range-picker-CdSiXwB4.js} +40 -13
- package/dist/date-time-range-picker-CdSiXwB4.js.map +1 -0
- package/dist/domains/chat/activity/activity-stretch-line.cjs.js +1 -1
- package/dist/domains/chat/activity/activity-stretch-line.es.js +1 -1
- package/dist/domains/chat/activity/components/activity-fold.cjs.js +1 -1
- package/dist/domains/chat/activity/components/activity-fold.es.js +1 -1
- package/dist/domains/chat/activity/components/activity-timed-trigger.cjs.js +1 -1
- package/dist/domains/chat/activity/components/activity-timed-trigger.es.js +1 -1
- package/dist/domains/chat/activity/components/calls-panel.cjs.js +1 -1
- package/dist/domains/chat/activity/components/calls-panel.es.js +1 -1
- package/dist/domains/chat/activity/components/stretch-content.cjs.js +1 -1
- package/dist/domains/chat/activity/components/stretch-content.es.js +1 -1
- package/dist/domains/chat/activity/components/stretch-thought.cjs.js +1 -1
- package/dist/domains/chat/activity/components/stretch-thought.es.js +1 -1
- package/dist/domains/chat/activity/model/activity-segments.cjs.js +1 -1
- package/dist/domains/chat/activity/model/activity-segments.es.js +1 -1
- package/dist/domains/chat/activity/model/activity-words.cjs.js +2 -2
- package/dist/domains/chat/activity/model/activity-words.es.js +2 -2
- package/dist/domains/chat/components/badge-wrapper.cjs.js +1 -1
- package/dist/domains/chat/components/badge-wrapper.es.js +1 -1
- package/dist/domains/chat/knowledge/knowledge-links.cjs.js +52 -6
- package/dist/domains/chat/knowledge/knowledge-links.cjs.js.map +1 -1
- package/dist/domains/chat/knowledge/knowledge-links.es.js +53 -9
- package/dist/domains/chat/knowledge/knowledge-links.es.js.map +1 -1
- package/dist/domains/chat/knowledge/pinned-knowledge-data.cjs.js +10 -3
- package/dist/domains/chat/knowledge/pinned-knowledge-data.cjs.js.map +1 -1
- package/dist/domains/chat/knowledge/pinned-knowledge-data.es.js +10 -3
- package/dist/domains/chat/knowledge/pinned-knowledge-data.es.js.map +1 -1
- package/dist/domains/chat/knowledge/pinned-knowledge.cjs.js +8 -3
- package/dist/domains/chat/knowledge/pinned-knowledge.cjs.js.map +1 -1
- package/dist/domains/chat/knowledge/pinned-knowledge.es.js +8 -3
- package/dist/domains/chat/knowledge/pinned-knowledge.es.js.map +1 -1
- package/dist/domains/chat/knowledge.cjs.js +2 -0
- package/dist/domains/chat/knowledge.es.js +2 -2
- package/dist/domains/chat/messages/message-row.cjs.js +3 -3
- package/dist/domains/chat/messages/message-row.es.js +3 -3
- package/dist/domains/chat/messages/notification-signal-notice.cjs.js +1 -1
- package/dist/domains/chat/messages/notification-signal-notice.es.js +1 -1
- package/dist/domains/chat/messages/reasoning-content.cjs.js +1 -1
- package/dist/domains/chat/messages/reasoning-content.es.js +1 -1
- package/dist/domains/chat/messages/renderers/message-text.cjs.js +35 -1
- package/dist/domains/chat/messages/renderers/message-text.cjs.js.map +1 -1
- package/dist/domains/chat/messages/renderers/message-text.es.js +36 -2
- package/dist/domains/chat/messages/renderers/message-text.es.js.map +1 -1
- package/dist/domains/chat/messages/renderers/reasoning-part-renderer.cjs.js +1 -1
- package/dist/domains/chat/messages/renderers/reasoning-part-renderer.es.js +1 -1
- package/dist/domains/chat/messages/signal-badge.cjs.js +1 -1
- package/dist/domains/chat/messages/signal-badge.es.js +1 -1
- package/dist/domains/chat/messages/skill-message.cjs.js +2 -2
- package/dist/domains/chat/messages/skill-message.es.js +2 -2
- package/dist/domains/chat/messages/system-reminder-badge.cjs.js +1 -1
- package/dist/domains/chat/messages/system-reminder-badge.es.js +1 -1
- package/dist/domains/chat/tools/badges/agent-badge-wrapper.cjs.js +1 -1
- package/dist/domains/chat/tools/badges/agent-badge-wrapper.es.js +1 -1
- package/dist/domains/chat/tools/badges/agent-badge.cjs.js +1 -1
- package/dist/domains/chat/tools/badges/agent-badge.es.js +1 -1
- package/dist/domains/chat/tools/badges/file-tree-badge.cjs.js +2 -2
- package/dist/domains/chat/tools/badges/file-tree-badge.es.js +2 -2
- package/dist/domains/chat/tools/badges/knowledge-body-range.cjs.js +80 -0
- package/dist/domains/chat/tools/badges/knowledge-body-range.cjs.js.map +1 -0
- package/dist/domains/chat/tools/badges/knowledge-body-range.d.ts +1 -0
- package/dist/domains/chat/tools/badges/knowledge-body-range.es.js +78 -0
- package/dist/domains/chat/tools/badges/knowledge-body-range.es.js.map +1 -0
- package/dist/domains/chat/tools/badges/knowledge-tool-badge.cjs.js +163 -13
- package/dist/domains/chat/tools/badges/knowledge-tool-badge.cjs.js.map +1 -1
- package/dist/domains/chat/tools/badges/knowledge-tool-badge.es.js +165 -15
- package/dist/domains/chat/tools/badges/knowledge-tool-badge.es.js.map +1 -1
- package/dist/domains/chat/tools/badges/mcp-input-request-badge.cjs.js +51 -0
- package/dist/domains/chat/tools/badges/mcp-input-request-badge.cjs.js.map +1 -0
- package/dist/domains/chat/tools/badges/mcp-input-request-badge.d.ts +1 -0
- package/dist/domains/chat/tools/badges/mcp-input-request-badge.es.js +49 -0
- package/dist/domains/chat/tools/badges/mcp-input-request-badge.es.js.map +1 -0
- package/dist/domains/chat/tools/badges/mcp-task-chip.cjs.js +7 -2
- package/dist/domains/chat/tools/badges/mcp-task-chip.cjs.js.map +1 -1
- package/dist/domains/chat/tools/badges/mcp-task-chip.es.js +7 -2
- package/dist/domains/chat/tools/badges/mcp-task-chip.es.js.map +1 -1
- package/dist/domains/chat/tools/badges/observation-marker-badge.cjs.js +2 -2
- package/dist/domains/chat/tools/badges/observation-marker-badge.es.js +2 -2
- package/dist/domains/chat/tools/badges/observation-marker-details.cjs.js +2 -2
- package/dist/domains/chat/tools/badges/observation-marker-details.es.js +2 -2
- package/dist/domains/chat/tools/badges/observation-renderer.cjs.js +1 -1
- package/dist/domains/chat/tools/badges/observation-renderer.es.js +1 -1
- package/dist/domains/chat/tools/badges/sandbox-execution-badge.cjs.js +2 -2
- package/dist/domains/chat/tools/badges/sandbox-execution-badge.es.js +2 -2
- package/dist/domains/chat/tools/badges/tool-approval-badge.cjs.js +1 -1
- package/dist/domains/chat/tools/badges/tool-approval-badge.es.js +1 -1
- package/dist/domains/chat/tools/badges/tool-badge.cjs.js +9 -4
- package/dist/domains/chat/tools/badges/tool-badge.cjs.js.map +1 -1
- package/dist/domains/chat/tools/badges/tool-badge.es.js +9 -4
- package/dist/domains/chat/tools/badges/tool-badge.es.js.map +1 -1
- package/dist/domains/chat/tools/badges/use-deferred-input-request.cjs.js +81 -0
- package/dist/domains/chat/tools/badges/use-deferred-input-request.cjs.js.map +1 -0
- package/dist/domains/chat/tools/badges/use-deferred-input-request.d.ts +1 -0
- package/dist/domains/chat/tools/badges/use-deferred-input-request.es.js +77 -0
- package/dist/domains/chat/tools/badges/use-deferred-input-request.es.js.map +1 -0
- package/dist/domains/chat/tools/badges/use-mcp-task-progress.cjs.js +11 -2
- package/dist/domains/chat/tools/badges/use-mcp-task-progress.cjs.js.map +1 -1
- package/dist/domains/chat/tools/badges/use-mcp-task-progress.es.js +11 -2
- package/dist/domains/chat/tools/badges/use-mcp-task-progress.es.js.map +1 -1
- package/dist/domains/chat/tools/badges/workflow-badge.cjs.js +1 -1
- package/dist/domains/chat/tools/badges/workflow-badge.es.js +1 -1
- package/dist/domains/chat/tools/connect-prompt-tool.cjs.js +79 -4
- package/dist/domains/chat/tools/connect-prompt-tool.cjs.js.map +1 -1
- package/dist/domains/chat/tools/connect-prompt-tool.es.js +79 -4
- package/dist/domains/chat/tools/connect-prompt-tool.es.js.map +1 -1
- package/dist/domains/chat/tools/mcp-input-request-tool.cjs.js +238 -0
- package/dist/domains/chat/tools/mcp-input-request-tool.cjs.js.map +1 -0
- package/dist/domains/chat/tools/mcp-input-request-tool.d.ts +1 -0
- package/dist/domains/chat/tools/mcp-input-request-tool.es.js +237 -0
- package/dist/domains/chat/tools/mcp-input-request-tool.es.js.map +1 -0
- package/dist/domains/chat/tools/mcp-input-request.cjs.js +40 -0
- package/dist/domains/chat/tools/mcp-input-request.cjs.js.map +1 -0
- package/dist/domains/chat/tools/mcp-input-request.d.ts +1 -0
- package/dist/domains/chat/tools/mcp-input-request.es.js +33 -0
- package/dist/domains/chat/tools/mcp-input-request.es.js.map +1 -0
- package/dist/domains/chat/tools/tool-card-kind.cjs.js +9 -4
- package/dist/domains/chat/tools/tool-card-kind.cjs.js.map +1 -1
- package/dist/domains/chat/tools/tool-card-kind.es.js +9 -5
- package/dist/domains/chat/tools/tool-card-kind.es.js.map +1 -1
- package/dist/domains/chat/tools/tool-card.cjs.js +1 -1
- package/dist/domains/chat/tools/tool-card.es.js +1 -1
- package/dist/domains/chat/tools/tool-groups.cjs.js +1 -1
- package/dist/domains/chat/tools/tool-groups.es.js +1 -1
- package/dist/domains/chat.cjs.js +5 -3
- package/dist/domains/chat.es.js +4 -4
- package/dist/domains/connect/types.cjs.js.map +1 -1
- package/dist/domains/connect/types.es.js.map +1 -1
- package/dist/domains/connect/use-user-connect.cjs.js +19 -2
- package/dist/domains/connect/use-user-connect.cjs.js.map +1 -1
- package/dist/domains/connect/use-user-connect.es.js +19 -2
- package/dist/domains/connect/use-user-connect.es.js.map +1 -1
- package/dist/domains/dashboards/components/dashboard-renderer.cjs.js +4 -3
- package/dist/domains/dashboards/components/dashboard-renderer.cjs.js.map +1 -1
- package/dist/domains/dashboards/components/dashboard-renderer.es.js +4 -3
- package/dist/domains/dashboards/components/dashboard-renderer.es.js.map +1 -1
- package/dist/domains/dashboards/components/widget-chrome.cjs.js +1 -1
- package/dist/domains/dashboards/components/widget-chrome.es.js +1 -1
- package/dist/domains/dashboards/components/widget-error.cjs.js +1 -1
- package/dist/domains/dashboards/components/widget-error.es.js +1 -1
- package/dist/domains/dashboards/hooks/use-widget-views.cjs.js +4 -3
- package/dist/domains/dashboards/hooks/use-widget-views.cjs.js.map +1 -1
- package/dist/domains/dashboards/hooks/use-widget-views.es.js +4 -3
- package/dist/domains/dashboards/hooks/use-widget-views.es.js.map +1 -1
- package/dist/domains/dashboards/kinds/scores/scores-widget.cjs.js +9 -6
- package/dist/domains/dashboards/kinds/scores/scores-widget.cjs.js.map +1 -1
- package/dist/domains/dashboards/kinds/scores/scores-widget.es.js +9 -6
- package/dist/domains/dashboards/kinds/scores/scores-widget.es.js.map +1 -1
- package/dist/domains/dashboards/kinds/table/table-tabs.cjs.js +2 -2
- package/dist/domains/dashboards/kinds/table/table-tabs.es.js +2 -2
- package/dist/domains/dashboards/kinds/table/table-widget.cjs.js +1 -1
- package/dist/domains/dashboards/kinds/table/table-widget.es.js +1 -1
- package/dist/domains/dashboards/kinds/timeseries/timeseries-widget.cjs.js +6 -5
- package/dist/domains/dashboards/kinds/timeseries/timeseries-widget.cjs.js.map +1 -1
- package/dist/domains/dashboards/kinds/timeseries/timeseries-widget.es.js +6 -5
- package/dist/domains/dashboards/kinds/timeseries/timeseries-widget.es.js.map +1 -1
- package/dist/domains/dashboards/lib/chrome.cjs.js +9 -2
- package/dist/domains/dashboards/lib/chrome.cjs.js.map +1 -1
- package/dist/domains/dashboards/lib/chrome.es.js +9 -2
- package/dist/domains/dashboards/lib/chrome.es.js.map +1 -1
- package/dist/domains/dashboards/widget-kind.cjs.js.map +1 -1
- package/dist/domains/dashboards/widget-kind.es.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageCard.cjs.js +48 -0
- package/dist/domains/knowledge/components/KnowledgePageCard.cjs.js.map +1 -0
- package/dist/domains/knowledge/components/KnowledgePageCard.d.ts +1 -0
- package/dist/domains/knowledge/components/KnowledgePageCard.es.js +47 -0
- package/dist/domains/knowledge/components/KnowledgePageCard.es.js.map +1 -0
- package/dist/domains/knowledge/components/KnowledgePageDetail.cjs.js +63 -5
- package/dist/domains/knowledge/components/KnowledgePageDetail.cjs.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageDetail.es.js +64 -6
- package/dist/domains/knowledge/components/KnowledgePageDetail.es.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageExplorer.cjs.js +485 -47
- package/dist/domains/knowledge/components/KnowledgePageExplorer.cjs.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageExplorer.es.js +487 -50
- package/dist/domains/knowledge/components/KnowledgePageExplorer.es.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageGraph.cjs.js +1051 -123
- package/dist/domains/knowledge/components/KnowledgePageGraph.cjs.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageGraph.es.js +1054 -126
- package/dist/domains/knowledge/components/KnowledgePageGraph.es.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageTree.cjs.js +75 -3
- package/dist/domains/knowledge/components/KnowledgePageTree.cjs.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageTree.es.js +76 -4
- package/dist/domains/knowledge/components/KnowledgePageTree.es.js.map +1 -1
- package/dist/domains/knowledge/lib/circleText.cjs.js +9 -0
- package/dist/domains/knowledge/lib/circleText.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/circleText.d.ts +1 -0
- package/dist/domains/knowledge/lib/circleText.es.js +8 -0
- package/dist/domains/knowledge/lib/circleText.es.js.map +1 -0
- package/dist/domains/knowledge/lib/fitViewport.cjs.js +82 -0
- package/dist/domains/knowledge/lib/fitViewport.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/fitViewport.d.ts +1 -0
- package/dist/domains/knowledge/lib/fitViewport.es.js +73 -0
- package/dist/domains/knowledge/lib/fitViewport.es.js.map +1 -0
- package/dist/domains/knowledge/lib/graphShape.cjs.js +524 -0
- package/dist/domains/knowledge/lib/graphShape.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/graphShape.d.ts +1 -0
- package/dist/domains/knowledge/lib/graphShape.es.js +499 -0
- package/dist/domains/knowledge/lib/graphShape.es.js.map +1 -0
- package/dist/domains/knowledge/lib/linkCountsText.cjs.js +11 -0
- package/dist/domains/knowledge/lib/linkCountsText.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/linkCountsText.d.ts +1 -0
- package/dist/domains/knowledge/lib/linkCountsText.es.js +10 -0
- package/dist/domains/knowledge/lib/linkCountsText.es.js.map +1 -0
- package/dist/domains/knowledge/lib/pageAddress.cjs.js +29 -0
- package/dist/domains/knowledge/lib/pageAddress.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/pageAddress.d.ts +1 -0
- package/dist/domains/knowledge/lib/pageAddress.es.js +27 -0
- package/dist/domains/knowledge/lib/pageAddress.es.js.map +1 -0
- package/dist/domains/knowledge/lib/pageGraph.cjs.js +11 -11
- package/dist/domains/knowledge/lib/pageGraph.cjs.js.map +1 -1
- package/dist/domains/knowledge/lib/pageGraph.es.js +11 -11
- package/dist/domains/knowledge/lib/pageGraph.es.js.map +1 -1
- package/dist/domains/knowledge/lib/pageRefs.cjs.js +69 -0
- package/dist/domains/knowledge/lib/pageRefs.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/pageRefs.d.ts +1 -0
- package/dist/domains/knowledge/lib/pageRefs.es.js +66 -0
- package/dist/domains/knowledge/lib/pageRefs.es.js.map +1 -0
- package/dist/domains/knowledge/lib/pageTree.cjs.js +5 -0
- package/dist/domains/knowledge/lib/pageTree.cjs.js.map +1 -1
- package/dist/domains/knowledge/lib/pageTree.es.js +5 -1
- package/dist/domains/knowledge/lib/pageTree.es.js.map +1 -1
- package/dist/domains/knowledge/lib/remarkKnowledgeLinks.cjs.js +82 -0
- package/dist/domains/knowledge/lib/remarkKnowledgeLinks.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/remarkKnowledgeLinks.d.ts +1 -0
- package/dist/domains/knowledge/lib/remarkKnowledgeLinks.es.js +78 -0
- package/dist/domains/knowledge/lib/remarkKnowledgeLinks.es.js.map +1 -0
- package/dist/domains/knowledge/lib/tooltipSide.cjs.js +77 -0
- package/dist/domains/knowledge/lib/tooltipSide.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/tooltipSide.d.ts +1 -0
- package/dist/domains/knowledge/lib/tooltipSide.es.js +75 -0
- package/dist/domains/knowledge/lib/tooltipSide.es.js.map +1 -0
- package/dist/domains/knowledge/lib/useLeavingNodes.cjs.js +65 -0
- package/dist/domains/knowledge/lib/useLeavingNodes.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/useLeavingNodes.d.ts +1 -0
- package/dist/domains/knowledge/lib/useLeavingNodes.es.js +62 -0
- package/dist/domains/knowledge/lib/useLeavingNodes.es.js.map +1 -0
- package/dist/domains/knowledge/lib/useStableWhile.cjs.js +15 -0
- package/dist/domains/knowledge/lib/useStableWhile.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/useStableWhile.d.ts +1 -0
- package/dist/domains/knowledge/lib/useStableWhile.es.js +14 -0
- package/dist/domains/knowledge/lib/useStableWhile.es.js.map +1 -0
- package/dist/domains/metrics/components/agent-runs-card.cjs.js +3 -3
- package/dist/domains/metrics/components/agent-runs-card.es.js +3 -3
- package/dist/domains/metrics/components/breakdown/breakdown-tab-body.cjs.js +1 -1
- package/dist/domains/metrics/components/breakdown/breakdown-tab-body.es.js +1 -1
- package/dist/domains/metrics/components/breakdown-card.cjs.js +1 -1
- package/dist/domains/metrics/components/breakdown-card.es.js +1 -1
- package/dist/domains/metrics/components/chart-area.cjs.js +1 -1
- package/dist/domains/metrics/components/chart-area.es.js +1 -1
- package/dist/domains/metrics/components/chart-card-error.cjs.js +1 -1
- package/dist/domains/metrics/components/chart-card-error.es.js +1 -1
- package/dist/domains/metrics/components/chart-card.cjs.js +1 -1
- package/dist/domains/metrics/components/chart-card.es.js +1 -1
- package/dist/domains/metrics/components/date-range-selector.cjs.js +1 -1
- package/dist/domains/metrics/components/date-range-selector.es.js +1 -1
- package/dist/domains/metrics/components/distinct-ids/distinct-ids-chart.cjs.js +3 -2
- package/dist/domains/metrics/components/distinct-ids/distinct-ids-chart.cjs.js.map +1 -1
- package/dist/domains/metrics/components/distinct-ids/distinct-ids-chart.es.js +3 -2
- package/dist/domains/metrics/components/distinct-ids/distinct-ids-chart.es.js.map +1 -1
- package/dist/domains/metrics/components/failure-rate-card.cjs.js +3 -2
- package/dist/domains/metrics/components/failure-rate-card.cjs.js.map +1 -1
- package/dist/domains/metrics/components/failure-rate-card.es.js +3 -2
- package/dist/domains/metrics/components/failure-rate-card.es.js.map +1 -1
- package/dist/domains/metrics/components/latency-card.cjs.js +3 -2
- package/dist/domains/metrics/components/latency-card.cjs.js.map +1 -1
- package/dist/domains/metrics/components/latency-card.es.js +3 -2
- package/dist/domains/metrics/components/latency-card.es.js.map +1 -1
- package/dist/domains/metrics/components/metrics-time-range-chip.cjs.js +1 -1
- package/dist/domains/metrics/components/metrics-time-range-chip.es.js +1 -1
- package/dist/domains/metrics/components/scores-card.cjs.js +2 -1
- package/dist/domains/metrics/components/scores-card.cjs.js.map +1 -1
- package/dist/domains/metrics/components/scores-card.es.js +2 -1
- package/dist/domains/metrics/components/scores-card.es.js.map +1 -1
- package/dist/domains/metrics/components/token-usage-card.cjs.js +3 -3
- package/dist/domains/metrics/components/token-usage-card.es.js +3 -3
- package/dist/domains/metrics/components/trace-aggregate-card.cjs.js +1 -1
- package/dist/domains/metrics/components/trace-aggregate-card.es.js +1 -1
- package/dist/domains/observability/components/observability-histogram.cjs.js +1 -1
- package/dist/domains/observability/components/observability-histogram.es.js +1 -1
- package/dist/domains/scores/components/trace-scores-list.cjs.js +2 -2
- package/dist/domains/scores/components/trace-scores-list.es.js +2 -2
- package/dist/domains/skills/skill-simple-form.cjs.js +1 -1
- package/dist/domains/skills/skill-simple-form.es.js +1 -1
- package/dist/domains/spans/components/spans-filter-bar.cjs.js +2 -2
- package/dist/domains/spans/components/spans-filter-bar.es.js +2 -2
- package/dist/domains/spans/hooks/use-spans-filter-bar.cjs.js +1 -1
- package/dist/domains/spans/hooks/use-spans-filter-bar.es.js +1 -1
- package/dist/domains/threads/components/threads-filter-bar.cjs.js +2 -2
- package/dist/domains/threads/components/threads-filter-bar.es.js +2 -2
- package/dist/domains/threads/hooks/use-threads-filter-bar.cjs.js +1 -1
- package/dist/domains/threads/hooks/use-threads-filter-bar.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-error-renderer.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-error-renderer.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-input-renderers.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-input-renderers.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-output-renderers.cjs.js +2 -2
- package/dist/domains/traces/components/span-payload/span-output-renderers.es.js +2 -2
- package/dist/domains/traces/components/span-payload/span-payload-messages.cjs.js +2 -2
- package/dist/domains/traces/components/span-payload/span-payload-messages.es.js +2 -2
- package/dist/domains/traces/components/span-payload/span-payload-primitives.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-payload-primitives.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-payload-processor.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-payload-processor.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-payload-tool.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-payload-tool.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-processor-mutations.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-processor-mutations.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-tools-section.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-tools-section.es.js +1 -1
- package/dist/domains/traces/components/span-timeline-row.cjs.js +1 -1
- package/dist/domains/traces/components/span-timeline-row.es.js +1 -1
- package/dist/domains/traces/components/span-timing-hover-card.cjs.js +1 -1
- package/dist/domains/traces/components/span-timing-hover-card.es.js +1 -1
- package/dist/domains/traces/components/trace-data-panel-view.cjs.js +8 -2
- package/dist/domains/traces/components/trace-data-panel-view.cjs.js.map +1 -1
- package/dist/domains/traces/components/trace-data-panel-view.es.js +8 -2
- package/dist/domains/traces/components/trace-data-panel-view.es.js.map +1 -1
- package/dist/domains/traces/components/trace-error-cell.cjs.js +1 -1
- package/dist/domains/traces/components/trace-error-cell.es.js +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.cjs.js +2 -2
- package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.es.js +2 -2
- package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.cjs.js +1 -1
- package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.es.js +1 -1
- package/dist/domains/workflows/runs/workflow-run-list.cjs.js +1 -1
- package/dist/domains/workflows/runs/workflow-run-list.es.js +1 -1
- package/dist/domains/workflows/workflow/input/workflow-processor-input.cjs.js +2 -2
- package/dist/domains/workflows/workflow/input/workflow-processor-input.es.js +2 -2
- package/dist/domains/workflows/workflow/use-workflow-trigger.cjs.js +3 -3
- package/dist/domains/workflows/workflow/use-workflow-trigger.es.js +3 -3
- package/dist/domains/workflows/workflow/workflow-input-data.cjs.js +1 -1
- package/dist/domains/workflows/workflow/workflow-input-data.es.js +1 -1
- package/dist/domains/workflows/workflow/workflow-suspended-steps.cjs.js +2 -2
- package/dist/domains/workflows/workflow/workflow-suspended-steps.es.js +2 -2
- package/dist/domains/workflows/workflow/workflow-time-travel-form.cjs.js +2 -2
- package/dist/domains/workflows/workflow/workflow-time-travel-form.es.js +2 -2
- package/dist/domains/workspace/components/workspace-add-skill-dialog.cjs.js +1 -1
- package/dist/domains/workspace/components/workspace-add-skill-dialog.es.js +1 -1
- package/dist/domains/workspace/components/workspace-markdown-preview.cjs.js +1 -1
- package/dist/domains/workspace/components/workspace-markdown-preview.es.js +1 -1
- package/dist/{filter-bar-time-range-mg9JeYue.js → filter-bar-time-range-qlV8p7hp.js} +2 -2
- package/dist/{filter-bar-time-range-mg9JeYue.js.map → filter-bar-time-range-qlV8p7hp.js.map} +1 -1
- package/dist/{filter-bar-time-range-BA-pXMlo.cjs → filter-bar-time-range-zdM024JD.cjs} +2 -2
- package/dist/{filter-bar-time-range-BA-pXMlo.cjs.map → filter-bar-time-range-zdM024JD.cjs.map} +1 -1
- package/dist/lib/form/dynamic-form.cjs.js +2 -2
- package/dist/lib/form/dynamic-form.es.js +2 -2
- package/dist/lib/form/json-draft.cjs.js +1 -1
- package/dist/lib/form/json-draft.es.js +1 -1
- package/dist/lib/form/zod-provider.cjs.js +1 -1
- package/dist/lib/form/zod-provider.es.js +1 -1
- package/dist/{span-payload-primitives-B3RdahsC.js → span-payload-primitives-CKKIAVPJ.js} +4 -4
- package/dist/{span-payload-primitives-B3RdahsC.js.map → span-payload-primitives-CKKIAVPJ.js.map} +1 -1
- package/dist/{span-payload-primitives-_2d-pAOD.cjs → span-payload-primitives-D4tHWN2W.cjs} +4 -4
- package/dist/{span-payload-primitives-_2d-pAOD.cjs.map → span-payload-primitives-D4tHWN2W.cjs.map} +1 -1
- package/dist/src/domains/chat/knowledge/knowledge-links.d.ts +32 -4
- package/dist/src/domains/chat/knowledge/pinned-knowledge-data.d.ts +2 -0
- package/dist/src/domains/chat/tools/badges/knowledge-body-range.d.ts +12 -0
- package/dist/src/domains/chat/tools/badges/knowledge-tool-badge.d.ts +5 -2
- package/dist/src/domains/chat/tools/badges/mcp-input-request-badge.d.ts +18 -0
- package/dist/src/domains/chat/tools/badges/tool-badge.d.ts +4 -1
- package/dist/src/domains/chat/tools/badges/use-deferred-input-request.d.ts +44 -0
- package/dist/src/domains/chat/tools/badges/use-mcp-task-progress.d.ts +6 -1
- package/dist/src/domains/chat/tools/connect-prompt-tool.d.ts +10 -1
- package/dist/src/domains/chat/tools/mcp-input-request-tool.d.ts +18 -0
- package/dist/src/domains/chat/tools/mcp-input-request.d.ts +40 -0
- package/dist/src/domains/chat/tools/tool-card-kind.d.ts +4 -2
- package/dist/src/domains/chat/tools/tool-card.d.ts +1 -1
- package/dist/src/domains/connect/types.d.ts +16 -0
- package/dist/src/domains/dashboards/components/dashboard-renderer.d.ts +4 -2
- package/dist/src/domains/dashboards/hooks/use-widget-views.d.ts +4 -3
- package/dist/src/domains/dashboards/index.d.ts +1 -1
- package/dist/src/domains/dashboards/kinds/scores/scores-widget.d.ts +1 -1
- package/dist/src/domains/dashboards/lib/chrome.d.ts +6 -4
- package/dist/src/domains/dashboards/widget-kind.d.ts +12 -0
- package/dist/src/domains/knowledge/components/KnowledgePageCard.d.ts +23 -0
- package/dist/src/domains/knowledge/components/KnowledgePageExplorer.d.ts +29 -0
- package/dist/src/domains/knowledge/components/KnowledgePageGraph.d.ts +27 -1
- package/dist/src/domains/knowledge/components/KnowledgePageTree.d.ts +2 -1
- package/dist/src/domains/knowledge/lib/circleText.d.ts +2 -0
- package/dist/src/domains/knowledge/lib/fitViewport.d.ts +67 -0
- package/dist/src/domains/knowledge/lib/graphShape.d.ts +131 -0
- package/dist/src/domains/knowledge/lib/linkCountsText.d.ts +5 -0
- package/dist/src/domains/knowledge/lib/pageAddress.d.ts +5 -0
- package/dist/src/domains/knowledge/lib/pageGraph.d.ts +4 -4
- package/dist/src/domains/knowledge/lib/pageRefs.d.ts +15 -0
- package/dist/src/domains/knowledge/lib/pageTree.d.ts +2 -0
- package/dist/src/domains/knowledge/lib/remarkKnowledgeLinks.d.ts +13 -0
- package/dist/src/domains/knowledge/lib/tooltipSide.d.ts +40 -0
- package/dist/src/domains/knowledge/lib/useLeavingNodes.d.ts +14 -0
- package/dist/src/domains/knowledge/lib/useStableWhile.d.ts +5 -0
- package/dist/src/domains/knowledge/pageTypes.d.ts +6 -1
- package/dist/src/ds/components/DateTimeRangePicker/date-time-range-picker.d.ts +12 -1
- package/dist/src/ds/components/MarkdownRenderer/markdown-renderer.d.ts +8 -1
- package/dist/src/ds/components/MetricsCard/metrics-card-headline.d.ts +1 -1
- package/dist/src/ds/components/MetricsLineChart/metrics-line-chart.d.ts +8 -0
- package/dist/src/ds/components/ai/tool-call/tool-phrases.d.ts +6 -0
- package/dist/style.css +73 -2
- package/dist/{tool-approval-1qiB4hhG.cjs → tool-approval-CJvPDL7D.cjs} +4 -4
- package/dist/{tool-approval-1qiB4hhG.cjs.map → tool-approval-CJvPDL7D.cjs.map} +1 -1
- package/dist/{tool-approval-B6MFcaKV.js → tool-approval-DyN11vFA.js} +4 -4
- package/dist/{tool-approval-B6MFcaKV.js.map → tool-approval-DyN11vFA.js.map} +1 -1
- package/dist/{tool-call-Bu66PkD-.cjs → tool-call-DBn14X-3.cjs} +9 -3
- package/dist/{tool-call-Bu66PkD-.cjs.map → tool-call-DBn14X-3.cjs.map} +1 -1
- package/dist/{tool-call-Ch9-jjXU.js → tool-call-Dsj43lvJ.js} +9 -3
- package/dist/{tool-call-Ch9-jjXU.js.map → tool-call-Dsj43lvJ.js.map} +1 -1
- package/dist/{tool-card-DrqPZfPQ.cjs → tool-card-BOLXeKIp.cjs} +167 -126
- package/dist/tool-card-BOLXeKIp.cjs.map +1 -0
- package/dist/{tool-card-sO6P2Qj4.js → tool-card-HZ5bm7ue.js} +168 -127
- package/dist/tool-card-HZ5bm7ue.js.map +1 -0
- package/dist/{tool-presentation-DvCsb_kz.js → tool-presentation-CvibOP1J.js} +6 -1
- package/dist/tool-presentation-CvibOP1J.js.map +1 -0
- package/dist/{tool-presentation-CQlDEwgS.cjs → tool-presentation-D6nzVruN.cjs} +6 -1
- package/dist/tool-presentation-D6nzVruN.cjs.map +1 -0
- package/package.json +11 -11
- package/dist/MarkdownRenderer-2GOXQJEv.js.map +0 -1
- package/dist/MarkdownRenderer-CB8Z_CHc.cjs.map +0 -1
- package/dist/MetricsCard-CEB-f2sv.cjs.map +0 -1
- package/dist/MetricsCard-M8awJ2B_.js.map +0 -1
- package/dist/MetricsLineChart-BhHoduO0.js.map +0 -1
- package/dist/MetricsLineChart-CjBm4IXu.cjs.map +0 -1
- package/dist/date-time-range-picker-CTt7Od0P.cjs.map +0 -1
- package/dist/date-time-range-picker-DKh1K9Iy.js.map +0 -1
- package/dist/domains/knowledge/lib/pageLayout.cjs.js +0 -49
- package/dist/domains/knowledge/lib/pageLayout.cjs.js.map +0 -1
- package/dist/domains/knowledge/lib/pageLayout.d.ts +0 -1
- package/dist/domains/knowledge/lib/pageLayout.es.js +0 -48
- package/dist/domains/knowledge/lib/pageLayout.es.js.map +0 -1
- package/dist/src/domains/knowledge/lib/pageLayout.d.ts +0 -24
- package/dist/tool-card-DrqPZfPQ.cjs.map +0 -1
- package/dist/tool-card-sO6P2Qj4.js.map +0 -1
- package/dist/tool-presentation-CQlDEwgS.cjs.map +0 -1
- package/dist/tool-presentation-DvCsb_kz.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** What part of a page a Knowledge call read or wrote: a short tag for the collapsed row, a sentence for the body. */
|
|
2
|
+
export interface BodyExtent {
|
|
3
|
+
row: string | undefined;
|
|
4
|
+
summary: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Which part of the body a `knowledge_read` result holds, from the call's arguments and its page. A whole
|
|
8
|
+
* body has no row tag; undefined when the result is not a body read at all (a notes-only read, a scope listing).
|
|
9
|
+
*/
|
|
10
|
+
export declare function readExtent(output: Record<string, unknown>, args: Record<string, unknown>): BodyExtent | undefined;
|
|
11
|
+
/** Which lines a `knowledge_page` write replaced, from its `range` argument; undefined for a whole-body write. */
|
|
12
|
+
export declare function writeExtent(args: Record<string, unknown>): BodyExtent | undefined;
|
|
@@ -9,8 +9,11 @@ export interface KnowledgeCard {
|
|
|
9
9
|
detail?: string;
|
|
10
10
|
body: ReactNode;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* What each Knowledge tool's settled result says, or null when the shape isn't one we know.
|
|
14
|
+
* A failed call (`errorText` set) gets a card naming what it tried and the error it got.
|
|
15
|
+
*/
|
|
16
|
+
export declare function knowledgeCard(toolName: string, input: unknown, output: unknown, errorText?: string): KnowledgeCard | null;
|
|
14
17
|
export interface KnowledgeToolBadgeProps extends Omit<ToolApprovalRequest, 'toolCalled'> {
|
|
15
18
|
card: KnowledgeCard;
|
|
16
19
|
metadata?: MessageMetadata;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { McpInputRequestPayload } from '../mcp-input-request';
|
|
2
|
+
import type { OpenInputRequest } from './use-deferred-input-request';
|
|
3
|
+
/** A call the run is parked on: answering resumes the run, like any other suspended tool. */
|
|
4
|
+
export declare function ForegroundMcpInputRequest({ toolCallId, payload, readOnly, isNetwork, }: {
|
|
5
|
+
toolCallId: string;
|
|
6
|
+
payload: McpInputRequestPayload;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
/** A network run resumes through its own route, which can't carry these answers yet. */
|
|
9
|
+
isNetwork?: boolean;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* A deferred call whose background task waits on the question. The agent's turn already ended, so
|
|
13
|
+
* the answer goes to the task directly and the chat stays free for other messages meanwhile.
|
|
14
|
+
*/
|
|
15
|
+
export declare function DeferredMcpInputRequest({ backgroundTaskId, request, }: {
|
|
16
|
+
backgroundTaskId: string;
|
|
17
|
+
request: OpenInputRequest;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { McpInputRequestPayload } from '../mcp-input-request';
|
|
1
2
|
import type { MessageMetadata } from '../..';
|
|
2
3
|
import type { ToolApprovalRequest } from './tool-approval-badge';
|
|
3
4
|
import type { ActivityStatus } from '../../../../ds/components/ai/activity';
|
|
@@ -17,5 +18,7 @@ export interface ToolBadgeProps extends Omit<ToolApprovalRequest, 'toolCalled'>
|
|
|
17
18
|
backgroundTaskId?: string;
|
|
18
19
|
/** `running` while the part holds a deferred call's placeholder; `completed`/`failed` once it holds the result. */
|
|
19
20
|
backgroundTaskStatus?: string;
|
|
21
|
+
/** The MCP task question the call is waiting on, if it is. */
|
|
22
|
+
mcpInputRequest?: McpInputRequestPayload;
|
|
20
23
|
}
|
|
21
|
-
export declare const ToolBadge: ({ toolName, args, result, metadata, toolOutput, toolCallId, toolApprovalMetadata, suspendPayload, isNetwork, toolCalled: toolCalledProp, withoutArgs, status, backgroundTaskId, backgroundTaskStatus, }: ToolBadgeProps) => import("react").JSX.Element;
|
|
24
|
+
export declare const ToolBadge: ({ toolName, args, result, metadata, toolOutput, toolCallId, toolApprovalMetadata, suspendPayload, isNetwork, toolCalled: toolCalledProp, withoutArgs, status, backgroundTaskId, backgroundTaskStatus, mcpInputRequest, }: ToolBadgeProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { McpInputRequestPayload, McpInputResumeData } from '../mcp-input-request';
|
|
2
|
+
export declare const backgroundTaskQueryKey: (backgroundTaskId: string) => readonly ['background-task', string];
|
|
3
|
+
export interface OpenInputRequest {
|
|
4
|
+
payload: McpInputRequestPayload;
|
|
5
|
+
/** The suspension being answered; the server refuses an answer to an older one. */
|
|
6
|
+
suspendedAt?: string | Date;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The MCP input request a deferred call's background task is suspended on, if any. The task is read
|
|
10
|
+
* once (so a reloaded chat still sees an open request) and then followed over the task's event
|
|
11
|
+
* stream, whose events are folded into the same cache entry the task chip polls.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useDeferredInputRequest(backgroundTaskId: string, enabled: boolean): OpenInputRequest | undefined;
|
|
14
|
+
/** Answers a deferred call's suspended background task, fenced on the suspension that was shown. */
|
|
15
|
+
export declare function useResumeBackgroundTask(backgroundTaskId: string): import("@tanstack/react-query").UseMutationResult<{
|
|
16
|
+
id: string;
|
|
17
|
+
status: 'pending' | 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled' | 'timed_out';
|
|
18
|
+
toolName: string;
|
|
19
|
+
toolCallId: string;
|
|
20
|
+
args: {
|
|
21
|
+
[x: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
agentId: string;
|
|
24
|
+
threadId?: string | undefined;
|
|
25
|
+
resourceId?: string | undefined;
|
|
26
|
+
runId: string;
|
|
27
|
+
result?: unknown | undefined;
|
|
28
|
+
error?: {
|
|
29
|
+
message: string;
|
|
30
|
+
stack?: string | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
startedAt?: string | undefined;
|
|
34
|
+
completedAt?: string | undefined;
|
|
35
|
+
retryCount: number;
|
|
36
|
+
maxRetries: number;
|
|
37
|
+
timeoutMs: number;
|
|
38
|
+
suspendPayload?: unknown | undefined;
|
|
39
|
+
suspendedAt?: string | undefined;
|
|
40
|
+
}, Error, {
|
|
41
|
+
resumeData: McpInputResumeData;
|
|
42
|
+
suspendedAt?: string | Date;
|
|
43
|
+
}, unknown>;
|
|
44
|
+
export declare const resumeErrorMessage: (error: Error) => string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { McpInputRequestPayload } from '../mcp-input-request';
|
|
1
2
|
import type { ActivityStatus } from '../../../../ds/components/ai/activity';
|
|
2
3
|
export type McpTaskStatus = 'working' | 'input_required' | 'completed' | 'failed' | 'cancelled';
|
|
3
4
|
/** What `@mastra/mcp`'s client writes to a task-backed tool's output stream (`MCPTaskProgress`). */
|
|
@@ -21,7 +22,11 @@ export interface McpTaskView extends McpTaskProgress {
|
|
|
21
22
|
*
|
|
22
23
|
* A deferred call (one running as a Mastra background task) settles its part with a placeholder
|
|
23
24
|
* long before the task ends, so its end is never inferred here: the background task says when.
|
|
25
|
+
*
|
|
26
|
+
* While the call is suspended on the task's input request, the request names the task, so the chip
|
|
27
|
+
* reads `input_required` even on a reloaded card with no progress.
|
|
24
28
|
*/
|
|
25
|
-
export declare function useMcpTaskProgress(result: unknown, status: ActivityStatus, { deferred }?: {
|
|
29
|
+
export declare function useMcpTaskProgress(result: unknown, status: ActivityStatus, { deferred, request }?: {
|
|
26
30
|
deferred?: boolean;
|
|
31
|
+
request?: McpInputRequestPayload;
|
|
27
32
|
}): McpTaskView | undefined;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { MessageMetadata } from '../messages/message-metadata';
|
|
1
2
|
export { CONNECT_PROMPT_TOOL_NAME } from './connect-prompt-tool-id';
|
|
2
3
|
export interface ConnectPromptToolProps {
|
|
4
|
+
toolName: string;
|
|
5
|
+
toolCallId: string;
|
|
3
6
|
output: unknown;
|
|
7
|
+
metadata?: MessageMetadata;
|
|
4
8
|
/** Historical rendering: show the card but suppress the connect action. */
|
|
5
9
|
readOnly?: boolean;
|
|
6
10
|
}
|
|
@@ -11,5 +15,10 @@ export interface ConnectPromptToolProps {
|
|
|
11
15
|
* the mounted `/connect` routes, drives the OAuth flow in a popup through the
|
|
12
16
|
* server's launch gate (which verifies this browser owns the pending session
|
|
13
17
|
* before redirecting to the vendor), and polls until the connection settles.
|
|
18
|
+
*
|
|
19
|
+
* The tool pauses the agent run while the card is up. Once the connection
|
|
20
|
+
* settles, the card resumes the paused call with the outcome — connected, or
|
|
21
|
+
* the reason it failed — so the agent continues from the tool's result rather
|
|
22
|
+
* than a chat message.
|
|
14
23
|
*/
|
|
15
|
-
export declare const ConnectPromptTool: ({ output, readOnly }: ConnectPromptToolProps) => import("react").JSX.Element | null;
|
|
24
|
+
export declare const ConnectPromptTool: ({ toolName, toolCallId, output, metadata, readOnly, }: ConnectPromptToolProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { McpInputRequestPayload, McpInputResumeData } from './mcp-input-request';
|
|
2
|
+
export interface McpInputRequestToolProps {
|
|
3
|
+
payload: McpInputRequestPayload;
|
|
4
|
+
/** Sends the answers; the request stays open (and answerable again) if the returned promise rejects. */
|
|
5
|
+
onSubmit: (resumeData: McpInputResumeData) => void | Promise<unknown>;
|
|
6
|
+
isSubmitting?: boolean;
|
|
7
|
+
/** Why the last answer didn't go through. */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** History view: show the question without answering it. */
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
/** Why the request can't be answered here, shown with the questions. */
|
|
12
|
+
notice?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The questions an MCP server asked while a tool call's task waits. Every request key needs an answer
|
|
16
|
+
* before the call can continue, so answers are held until the last one is given, then sent together.
|
|
17
|
+
*/
|
|
18
|
+
export declare function McpInputRequestTool({ payload, onSubmit, isSubmitting, error, readOnly, notice, }: McpInputRequestToolProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { MessageMetadata, SuspendedToolMetadata } from '../messages/message-metadata';
|
|
2
|
+
/** An embedded request an MCP server sent while its task waits (`{ method, params }`). */
|
|
3
|
+
export interface McpInputRequest {
|
|
4
|
+
method: string;
|
|
5
|
+
params?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
/** What `@mastra/mcp` suspends a task-backed tool call with (`MCPInputRequestSuspendPayload`). */
|
|
8
|
+
export interface McpInputRequestPayload {
|
|
9
|
+
type: 'mcp-input-request';
|
|
10
|
+
serverName: string;
|
|
11
|
+
toolName: string;
|
|
12
|
+
taskId: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
/** When the call suspended; new each time the same task asks again, unlike `createdAt`. */
|
|
15
|
+
requestedAt?: string;
|
|
16
|
+
requests: Record<string, McpInputRequest>;
|
|
17
|
+
}
|
|
18
|
+
export type McpInputAction = 'accept' | 'decline' | 'cancel';
|
|
19
|
+
export interface McpInputResponse {
|
|
20
|
+
action: McpInputAction;
|
|
21
|
+
content?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/** Resume data answering every request key (`MCPInputRequestResumeData`). */
|
|
24
|
+
export interface McpInputResumeData {
|
|
25
|
+
inputResponses: Record<string, McpInputResponse>;
|
|
26
|
+
}
|
|
27
|
+
export declare function isMcpInputRequest(payload: unknown): payload is McpInputRequestPayload;
|
|
28
|
+
/** More questions at once than any real task asks; the server decides these, so Studio bounds them. */
|
|
29
|
+
export declare const MAX_INPUT_REQUESTS = 20;
|
|
30
|
+
export declare const MAX_REQUEST_MESSAGE_LENGTH = 2000;
|
|
31
|
+
export declare const MAX_INPUT_REQUESTS_SIZE: number;
|
|
32
|
+
/** Whether the server sent more than Studio draws: too many questions, a huge message, or huge params. */
|
|
33
|
+
export declare function inputRequestTooLarge(payload: McpInputRequestPayload): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* This call's own suspension. Saved entries are keyed by call id, but a live run keys them by tool
|
|
36
|
+
* name (two calls of one tool share that key), so the entry's own `toolCallId` decides.
|
|
37
|
+
*/
|
|
38
|
+
export declare function findSuspension(metadata: MessageMetadata | undefined, toolCallId: string): SuspendedToolMetadata | undefined;
|
|
39
|
+
/** The MCP input request this call is suspended on, if it is. */
|
|
40
|
+
export declare function suspendedMcpInputRequest(metadata: MessageMetadata | undefined, toolCallId: string): McpInputRequestPayload | undefined;
|
|
@@ -2,7 +2,7 @@ import type { MessageMetadata, SuspendedToolMetadata, ToolApprovalMetadata } fro
|
|
|
2
2
|
import type { ToolPartFields } from '../messages/renderers/tool-part';
|
|
3
3
|
import type { ActivityStatus } from '../../../ds/components/ai/activity';
|
|
4
4
|
/** Which card draws a call. Decided once, shared by the dispatcher and the fold. */
|
|
5
|
-
export type ToolCardKind = 'hidden' | 'observation' | 'ask_user' | 'connect_prompt' | 'submit_plan' | 'background' | 'agent' | 'workflow' | 'file_tree' | 'sandbox' | 'code_mode' | 'mcp_app' | 'knowledge' | 'plain';
|
|
5
|
+
export type ToolCardKind = 'hidden' | 'observation' | 'ask_user' | 'connect_prompt' | 'submit_plan' | 'mcp_input_request' | 'background' | 'agent' | 'workflow' | 'file_tree' | 'sandbox' | 'code_mode' | 'mcp_app' | 'knowledge' | 'plain';
|
|
6
6
|
export interface ToolCardContext {
|
|
7
7
|
metadata?: MessageMetadata;
|
|
8
8
|
mcpAppTools?: Record<string, unknown>;
|
|
@@ -14,6 +14,8 @@ export interface ToolInteraction {
|
|
|
14
14
|
export declare const isAgentCall: (metadata: MessageMetadata | undefined, toolName: string) => boolean;
|
|
15
15
|
export declare const isWorkflowCall: (metadata: MessageMetadata | undefined, toolName: string) => boolean;
|
|
16
16
|
export declare const isSettledState: (state: string | undefined) => boolean;
|
|
17
|
+
/** A call running as a Mastra background task. An awaited call's part also names its task, but holds the final result. */
|
|
18
|
+
export declare const isDeferredCall: (backgroundTaskId: string | undefined, backgroundTaskStatus: string | undefined) => boolean;
|
|
17
19
|
/** A call neither settled nor carried by a live run reads as idle, so stale history never shimmers. */
|
|
18
20
|
export declare function badgeStatus(state: string | undefined, chatRunning: boolean): ActivityStatus;
|
|
19
21
|
export declare const codeModeCall: (input: unknown, output: unknown) => {
|
|
@@ -24,4 +26,4 @@ export declare const codeModeCall: (input: unknown, output: unknown) => {
|
|
|
24
26
|
export declare function toolInteraction(metadata: MessageMetadata | undefined, toolName: string, toolCallId: string): ToolInteraction;
|
|
25
27
|
/** Tools the transcript never draws: working memory updates and task tools (shown in the docked task list). */
|
|
26
28
|
export declare function isHiddenTool(toolName: string): boolean;
|
|
27
|
-
export declare function toolCardKind({ toolName, toolCallId, input, output, state }: ToolPartFields, { metadata, mcpAppTools }: ToolCardContext): ToolCardKind;
|
|
29
|
+
export declare function toolCardKind({ toolName, toolCallId, input, output, state, backgroundTaskId, backgroundTaskStatus }: ToolPartFields, { metadata, mcpAppTools }: ToolCardContext): ToolCardKind;
|
|
@@ -27,4 +27,4 @@ export interface ToolCardProps {
|
|
|
27
27
|
}
|
|
28
28
|
/** Its own workflow run scope, so a streaming workflow result can drive a live graph inside the card. */
|
|
29
29
|
export declare const ToolCard: (props: ToolCardProps) => import("react").JSX.Element;
|
|
30
|
-
export declare const ToolCardInner: ({ toolName, input, output, modelOutput, backgroundTaskId, backgroundTaskStatus, toolCallId, state, errorText, metadata, dataParts, readOnly, }: ToolCardProps) => import("react").JSX.Element
|
|
30
|
+
export declare const ToolCardInner: ({ toolName, input, output, modelOutput, backgroundTaskId, backgroundTaskStatus, toolCallId, state, errorText, metadata, dataParts, readOnly, }: ToolCardProps) => import("react").JSX.Element;
|
|
@@ -103,6 +103,22 @@ export interface ConnectPromptPayload {
|
|
|
103
103
|
type: 'connect-prompt';
|
|
104
104
|
requestedProvider?: string;
|
|
105
105
|
providers: ConnectPromptProvider[];
|
|
106
|
+
/** Outcome for the model once a paused prompt resumes, e.g. "Linear connected successfully." */
|
|
107
|
+
message?: string;
|
|
108
|
+
/** Why the connection failed, when a paused prompt resumed without one. */
|
|
109
|
+
error?: string;
|
|
106
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* What the card resumes a paused `request_connection` call with once the
|
|
113
|
+
* connection settles: `active`, or `failed` with the reason the card showed.
|
|
114
|
+
*/
|
|
115
|
+
export type ConnectPromptResume = {
|
|
116
|
+
provider: string;
|
|
117
|
+
status: 'active';
|
|
118
|
+
} | {
|
|
119
|
+
provider: string;
|
|
120
|
+
status: 'failed';
|
|
121
|
+
error: string;
|
|
122
|
+
};
|
|
107
123
|
/** Narrows an arbitrary tool output to a connect-prompt payload. */
|
|
108
124
|
export declare function isConnectPromptPayload(output: unknown): output is ConnectPromptPayload;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { DashboardDefinition } from '@mastra/client-js';
|
|
2
2
|
import type { DashboardScope, OnDashboardDrilldown } from '../lib/definition';
|
|
3
|
-
import type { AnyWidgetKind } from '../widget-kind';
|
|
3
|
+
import type { AnyWidgetKind, DashboardExpand } from '../widget-kind';
|
|
4
4
|
export type DashboardRendererProps = {
|
|
5
5
|
definition: DashboardDefinition;
|
|
6
6
|
/** Which widgets, views and columns show: `org` spans several projects, `project` is one. */
|
|
7
7
|
scope: DashboardScope;
|
|
8
8
|
/** Opens a drilldown; each host routes to its own Traces or Logs page. */
|
|
9
9
|
onDrilldown?: OnDashboardDrilldown;
|
|
10
|
+
/** Where chart cards expand to, e.g. the host's query page; see `DashboardExpand`. */
|
|
11
|
+
expand?: DashboardExpand;
|
|
10
12
|
/** Kinds beyond the built-in ones; a kind of the same name replaces the built-in. */
|
|
11
13
|
kinds?: AnyWidgetKind[];
|
|
12
14
|
className?: string;
|
|
@@ -16,4 +18,4 @@ export type DashboardRendererProps = {
|
|
|
16
18
|
* owns the range and filters. Each widget is checked and rendered on its own: one that fails to
|
|
17
19
|
* parse, query or render shows its own error, and the rest of the dashboard still renders.
|
|
18
20
|
*/
|
|
19
|
-
export declare function DashboardRenderer({ definition, scope, onDrilldown, kinds, className }: DashboardRendererProps): import("react").JSX.Element;
|
|
21
|
+
export declare function DashboardRenderer({ definition, scope, onDrilldown, expand, kinds, className, }: DashboardRendererProps): import("react").JSX.Element;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { DashboardWidget, DashboardWidgetView } from '@mastra/client-js';
|
|
2
2
|
import type { DrilldownScope } from '../../metrics/drilldown';
|
|
3
3
|
import type { OnDashboardDrilldown } from '../lib/definition';
|
|
4
|
-
import type { ResolvedView } from '../widget-kind';
|
|
4
|
+
import type { DashboardExpand, ResolvedView } from '../widget-kind';
|
|
5
5
|
export type Views<Options> = readonly [ResolvedView<Options>, ...ResolvedView<Options>[]];
|
|
6
6
|
/**
|
|
7
7
|
* The open view of a widget, `defaultIndex` until one is picked, and the card title for it
|
|
8
|
-
* (`title`, and `titleMenu` with several views) to spread into
|
|
8
|
+
* (`title`, and `titleMenu` with several views, or an expand link with `expand`) to spread into
|
|
9
|
+
* `ChartCard`.
|
|
9
10
|
*/
|
|
10
|
-
export declare function useViewMenu<Options>(widget: DashboardWidget, views: Views<Options>, defaultIndex?: number): {
|
|
11
|
+
export declare function useViewMenu<Options>(widget: DashboardWidget, views: Views<Options>, defaultIndex?: number, expand?: DashboardExpand): {
|
|
11
12
|
view: ResolvedView<Options>;
|
|
12
13
|
index: number;
|
|
13
14
|
heading: import("../lib/chrome").ViewHeading;
|
|
@@ -16,4 +16,4 @@ export type { DashboardScope, OnDashboardDrilldown } from './lib/definition';
|
|
|
16
16
|
export { buildRequest } from './lib/requests';
|
|
17
17
|
export type { DashboardPageContext, DashboardRequest } from './lib/requests';
|
|
18
18
|
export { defineWidgetKind } from './widget-kind';
|
|
19
|
-
export type { AnyWidgetKind, ResolvedView, WidgetKind, WidgetKindProps } from './widget-kind';
|
|
19
|
+
export type { AnyWidgetKind, DashboardExpand, ResolvedView, WidgetKind, WidgetKindProps } from './widget-kind';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { WidgetKindProps } from '../../widget-kind';
|
|
2
2
|
import type { ScoresOptions } from './options';
|
|
3
|
-
export declare function ScoresWidget({ widget, views }: WidgetKindProps<ScoresOptions>): import("react").JSX.Element;
|
|
3
|
+
export declare function ScoresWidget({ widget, views, expand }: WidgetKindProps<ScoresOptions>): import("react").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DashboardWidget, DashboardWidgetView } from '@mastra/client-js';
|
|
2
2
|
import type { ChartCardProps } from '../../metrics/components/chart-card';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import type { DashboardExpand } from '../widget-kind';
|
|
4
|
+
/** What a widget's card shows as its title: `title`, and `titleMenu` with several views or an expand link. */
|
|
5
|
+
export type ViewHeading = Pick<ChartCardProps, 'title' | 'titleMenu' | 'href' | 'LinkComponent'>;
|
|
5
6
|
export declare const unsupportedMessage: (fields: string[], names?: Record<string, string>) => string;
|
|
6
7
|
/** A view's value in the card's menu: its label in kebab case (`Token usage` → `token-usage`), or its position when unlabelled or blank. */
|
|
7
8
|
export declare const viewValue: (label: string | undefined, index: number) => string;
|
|
@@ -9,6 +10,7 @@ export declare const viewValue: (label: string | undefined, index: number) => st
|
|
|
9
10
|
export declare const viewLabel: (label: string | undefined, index: number) => string;
|
|
10
11
|
/**
|
|
11
12
|
* The card title for the open view: the widget's title for a single view; with several, the open
|
|
12
|
-
* view's label, as a menu of every view (as the metrics cards switch views).
|
|
13
|
+
* view's label, as a menu of every view (as the metrics cards switch views). With somewhere to
|
|
14
|
+
* expand to, the widget's title links there instead.
|
|
13
15
|
*/
|
|
14
|
-
export declare function viewTitle(widget: DashboardWidget, views: readonly DashboardWidgetView[], index: number, onChoose: (index: number) => void): ViewHeading;
|
|
16
|
+
export declare function viewTitle(widget: DashboardWidget, views: readonly DashboardWidgetView[], index: number, onChoose: (index: number) => void, expand?: DashboardExpand): ViewHeading;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DashboardWidget, DashboardWidgetView } from '@mastra/client-js';
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
3
|
import type { z } from 'zod/v4';
|
|
4
|
+
import type { ChartCardProps } from '../metrics/components/chart-card';
|
|
4
5
|
import type { DashboardScope, OnDashboardDrilldown } from './lib/definition';
|
|
5
6
|
/** A view whose options passed its kind's schema. */
|
|
6
7
|
export type ResolvedView<Options> = DashboardWidgetView & {
|
|
@@ -12,6 +13,17 @@ export type WidgetKindProps<Options> = {
|
|
|
12
13
|
views: [ResolvedView<Options>, ...ResolvedView<Options>[]];
|
|
13
14
|
scope: DashboardScope;
|
|
14
15
|
onDrilldown?: OnDashboardDrilldown;
|
|
16
|
+
/** Where a chart card expands to; see `DashboardExpand`. */
|
|
17
|
+
expand?: DashboardExpand;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Where a chart widget expands to (a host's query page), as the Gateway Overview's cards do: the card
|
|
21
|
+
* shows its title with an expand icon linking there, in place of its views menu, on its first view.
|
|
22
|
+
* `href` returns `undefined` for a widget with nowhere to go; that card keeps its menu.
|
|
23
|
+
*/
|
|
24
|
+
export type DashboardExpand = {
|
|
25
|
+
href: (widget: DashboardWidget) => string | undefined;
|
|
26
|
+
LinkComponent: NonNullable<ChartCardProps['LinkComponent']>;
|
|
15
27
|
};
|
|
16
28
|
/**
|
|
17
29
|
* One kind of widget, self-contained: the renderer only looks it up by name, checks each view's
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface KnowledgePageCardProps {
|
|
2
|
+
name: string;
|
|
3
|
+
/** `Page`, `Scope` or a scope's display label. */
|
|
4
|
+
kind: string;
|
|
5
|
+
/** Where the page is addressed, e.g. `org:acme#policies/refunds`. */
|
|
6
|
+
pageRef?: string;
|
|
7
|
+
/** Where the page sits, from its root scope down. */
|
|
8
|
+
path?: string;
|
|
9
|
+
/** Already formatted (`1000+` when the server capped the count); left out when unknown or zero. */
|
|
10
|
+
childCount?: string;
|
|
11
|
+
/** Left out when unknown or both zero. */
|
|
12
|
+
links?: {
|
|
13
|
+
in: number;
|
|
14
|
+
out: number;
|
|
15
|
+
};
|
|
16
|
+
/** Of `links`, how many go to pages the graph doesn't draw. */
|
|
17
|
+
notShown?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What the explorer's graph tooltip says about a page: name, kind and ref, children, links. The graph's
|
|
21
|
+
* dots and the hover cards on page links in chat both draw it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function KnowledgePageCard({ name, kind, pageRef, path, childCount, links, notShown }: KnowledgePageCardProps): import("react").JSX.Element;
|
|
@@ -36,6 +36,16 @@ export interface KnowledgeExplorerQueryState<T> {
|
|
|
36
36
|
isError: boolean;
|
|
37
37
|
error: Error | null;
|
|
38
38
|
}
|
|
39
|
+
export interface KnowledgeExplorerPageLinks {
|
|
40
|
+
edges: Array<{
|
|
41
|
+
fromPageId: string;
|
|
42
|
+
toPageId: string;
|
|
43
|
+
kind: 'body' | 'note';
|
|
44
|
+
count: number;
|
|
45
|
+
}>;
|
|
46
|
+
pages: KnowledgePagePayload[];
|
|
47
|
+
truncated: boolean;
|
|
48
|
+
}
|
|
39
49
|
/** One request for a tree level: `parentId: null` for the root scopes. */
|
|
40
50
|
export interface KnowledgeExplorerTreeRequest {
|
|
41
51
|
parentId: string | null;
|
|
@@ -58,6 +68,23 @@ export interface KnowledgeExplorerSource {
|
|
|
58
68
|
};
|
|
59
69
|
/** Tree levels, one result per request in order (e.g. `useQueries`). Enables the lazily loaded tree and child pages. */
|
|
60
70
|
useTreeLevels?: (requests: KnowledgeExplorerTreeRequest[]) => Array<KnowledgeExplorerQueryState<KnowledgeExplorerTreeLevel>>;
|
|
71
|
+
/**
|
|
72
|
+
* Pages a link reaches, by id or `[[ref]]` (`scope#path`), one result per entry in order (e.g.
|
|
73
|
+
* `useQueries`). Lets the focused page draw links to pages the graph hasn't loaded; without it only
|
|
74
|
+
* links to loaded pages are drawn. A key the host can't resolve should come back as an error.
|
|
75
|
+
*/
|
|
76
|
+
useLinkedPages?: (keys: string[]) => Array<KnowledgeExplorerQueryState<KnowledgeExplorerPageDetail>>;
|
|
77
|
+
/**
|
|
78
|
+
* Exact links into and out of each page (by `[[ref]]` or note mention), counted over the whole store, for
|
|
79
|
+
* the pages the graph draws. Without it, or when it errors (a server with no link index answers 501), the
|
|
80
|
+
* graph counts only the links between pages it has loaded.
|
|
81
|
+
*/
|
|
82
|
+
useLinkCounts?: (pageIds: string[]) => KnowledgeExplorerQueryState<Record<string, {
|
|
83
|
+
in: number;
|
|
84
|
+
out: number;
|
|
85
|
+
}>>;
|
|
86
|
+
/** One page's links with the pages at their other ends; fetched for the page under the pointer. Null disables it. */
|
|
87
|
+
usePageLinks?: (pageId: string | null) => KnowledgeExplorerQueryState<KnowledgeExplorerPageLinks>;
|
|
61
88
|
/** A page's recent activity, newest first. */
|
|
62
89
|
useActivity?: (pageId: string) => KnowledgeExplorerQueryState<KnowledgeExplorerActivity>;
|
|
63
90
|
}
|
|
@@ -70,6 +97,8 @@ export interface KnowledgePageExplorerProps {
|
|
|
70
97
|
view: KnowledgeExplorerView;
|
|
71
98
|
onViewChange: (view: KnowledgeExplorerView) => void;
|
|
72
99
|
}
|
|
100
|
+
/** Links of the selected page drawn at most in each direction; the rest are counted. */
|
|
101
|
+
export declare const FOCUS_LINK_CAP = 20;
|
|
73
102
|
/**
|
|
74
103
|
* Search, the page tree, and either the page graph or the selected page, kept in sync on one selection.
|
|
75
104
|
* Wide screens show the tree beside the graph or the page; below `lg` one toggle picks tree, graph or page.
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
import type { KnowledgePageEdge, KnowledgePagePayload, KnowledgeScopeGrantPayload } from '../pageTypes';
|
|
2
2
|
export interface KnowledgePageGraphProps {
|
|
3
3
|
pages: KnowledgePagePayload[];
|
|
4
|
-
/** Mention edges between pages; parent edges are derived from `pages`. */
|
|
4
|
+
/** Mention and body-link edges between pages; parent edges are derived from `pages`. */
|
|
5
5
|
edges: KnowledgePageEdge[];
|
|
6
6
|
pinnedIds?: readonly string[];
|
|
7
7
|
/** Access grants between scopes, drawn from each principal scope to the scope it reaches. */
|
|
8
8
|
grants?: readonly KnowledgeScopeGrantPayload[];
|
|
9
9
|
selectedPageId?: string | null;
|
|
10
|
+
/** The page the layout centres on when none is selected, drawn like a focused page without the ring. */
|
|
11
|
+
centerId?: string | null;
|
|
12
|
+
/** Per page, links into and out of it that the graph doesn't draw; shown as `→in out→` on full circles. */
|
|
13
|
+
hiddenLinks?: ReadonlyMap<string, {
|
|
14
|
+
in: number;
|
|
15
|
+
out: number;
|
|
16
|
+
}>;
|
|
17
|
+
/** Every link between pages, drawn or not: hovering a page draws its own, and tooltips count them. */
|
|
18
|
+
knownLinks?: readonly KnowledgePageEdge[];
|
|
19
|
+
/** Pages the focus links to or from that the hierarchy doesn't reach: drawn close around the focus. */
|
|
20
|
+
nearIds?: ReadonlySet<string>;
|
|
21
|
+
/** False while the pages the selected page needs are loading: the graph keeps its last layout until they are in. */
|
|
22
|
+
settled?: boolean;
|
|
23
|
+
/** Exact links into and out of pages, from the store; they replace the counts taken from `knownLinks`. */
|
|
24
|
+
exactLinkCounts?: ReadonlyMap<string, {
|
|
25
|
+
in: number;
|
|
26
|
+
out: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Links fetched for the page under the pointer: drawn on hover, never counted or laid out. */
|
|
29
|
+
fetchedLinks?: readonly KnowledgePageEdge[];
|
|
30
|
+
/** The page under the pointer, or null: a host can fetch that page's links. */
|
|
31
|
+
onHover?: (pageId: string | null) => void;
|
|
32
|
+
/** Write each dot's total of links in and out inside it. */
|
|
33
|
+
showCounts?: boolean;
|
|
34
|
+
/** The pointer rests on a dot or stand-in: a host can load what it stands for. */
|
|
35
|
+
onPreview?: (page: KnowledgePagePayload) => void;
|
|
10
36
|
/** A page that wasn't selected was clicked, tapped, or activated with Enter or Space: select it. */
|
|
11
37
|
onSelect: (page: KnowledgePagePayload) => void;
|
|
12
38
|
/** The already-selected page was clicked, tapped, or activated again: open it. Without it, that only reselects. */
|
|
@@ -9,7 +9,8 @@ export declare const KNOWLEDGE_TREE_ROOT = "";
|
|
|
9
9
|
*
|
|
10
10
|
* A host that loads the tree a level at a time passes `mayHaveChildren` (so unloaded pages still offer
|
|
11
11
|
* a chevron), listens to `onExpandedChange` to load the opened levels, and passes `loadMore` for
|
|
12
|
-
* levels with more children to fetch.
|
|
12
|
+
* levels with more children to fetch. A page's `childCount`, when the server sends one, shows beside
|
|
13
|
+
* its name. Selecting a page with children also opens it.
|
|
13
14
|
*/
|
|
14
15
|
export declare function KnowledgePageTree({ pages, pinnedIds, selectedPageId, onSelect, initiallyExpanded, mayHaveChildren, onExpandedChange, loadMore, 'aria-label': ariaLabel, }: {
|
|
15
16
|
pages: KnowledgePagePayload[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Viewport } from '@xyflow/react';
|
|
2
|
+
/** How far Fit view may zoom out to frame a ring of linked pages, which the readable floor would crop. */
|
|
3
|
+
export declare const RING_MIN_ZOOM = 0.15;
|
|
4
|
+
interface FitInput {
|
|
5
|
+
bounds: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
/** Fit view on a focus with an outer ring of linked pages: frame all of it, below the readable floor if need be. */
|
|
14
|
+
ring?: boolean;
|
|
15
|
+
/** The focus (or the layout's centre): what stays centred when a floor stops the fit. */
|
|
16
|
+
anchor?: {
|
|
17
|
+
position: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The viewport that frames `bounds`. Zoom stops at the readable floor, so what is cropped is the edge, not
|
|
27
|
+
* the page being looked at; only Fit view, with an outer ring, goes lower so the whole ring shows.
|
|
28
|
+
*/
|
|
29
|
+
export declare function fitViewport({ bounds, width, height, ring, anchor }: FitInput): Viewport;
|
|
30
|
+
/** Margin around the drawn nodes on the first view, as a share of the pane. */
|
|
31
|
+
export declare const INITIAL_FIT_PADDING = 0.05;
|
|
32
|
+
/** The first view never zooms in past the pages' own size, however few there are. */
|
|
33
|
+
export declare const INITIAL_FIT_MAX_ZOOM = 1;
|
|
34
|
+
/** How long after the first view the graph keeps refitting as pages arrive, unless the user acts first. */
|
|
35
|
+
export declare const INITIAL_SETTLE_MS = 3000;
|
|
36
|
+
type Rect = {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The first view of a graph: every drawn node in the pane with a small margin, never zoomed in past what
|
|
44
|
+
* fits, and clear of `legend` (the box, in pane pixels, an overlay covers at the top left). When the plain
|
|
45
|
+
* fit would put a node under the legend, the pane is fitted again beside it or below it, whichever keeps
|
|
46
|
+
* the pages larger.
|
|
47
|
+
*/
|
|
48
|
+
export declare function fitAllViewport({ bounds, nodes, width, height, legend, }: {
|
|
49
|
+
bounds: Rect;
|
|
50
|
+
nodes: Rect[];
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
legend?: {
|
|
54
|
+
right: number;
|
|
55
|
+
bottom: number;
|
|
56
|
+
};
|
|
57
|
+
}): Viewport;
|
|
58
|
+
/** How long a view change animates: the same as the layout's own transition, and none under reduced motion. */
|
|
59
|
+
export declare const fitDuration: (motion: boolean) => 0 | 700;
|
|
60
|
+
/** How close to the pane's edge a refocused page may sit before the view moves to bring it in. */
|
|
61
|
+
export declare const NUDGE_PADDING = 24;
|
|
62
|
+
/**
|
|
63
|
+
* How far to move the view along one axis so a page at `start` (screen position) of `size` stays inside a
|
|
64
|
+
* pane of `extent`, with padding. Zero when it already is; centred when it can't fit with the padding.
|
|
65
|
+
*/
|
|
66
|
+
export declare function nudgeAxis(start: number, size: number, extent: number): number;
|
|
67
|
+
export {};
|