@deepseek-harness-tui/dsh-tui 0.6.1 → 0.7.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/README.md +74 -21
- package/bin/dsh-tui.js +115 -25
- package/cordis.patch.yml +69 -17
- package/cordis.yml +50 -12
- package/lib/types/activityPrefs.d.ts +1 -1
- package/lib/types/activityPrefs.js +3 -3
- package/lib/types/cc/figures.d.ts +27 -20
- package/lib/types/cc/figures.d.ts.map +1 -1
- package/lib/types/cc/figures.js +43 -34
- package/lib/types/cc/format.d.ts +18 -9
- package/lib/types/cc/format.d.ts.map +1 -1
- package/lib/types/cc/format.js +26 -18
- package/lib/types/cc/markdown.d.ts +31 -16
- package/lib/types/cc/markdown.d.ts.map +1 -1
- package/lib/types/cc/markdown.js +283 -260
- package/lib/types/cc/terminal.d.ts +10 -7
- package/lib/types/cc/terminal.d.ts.map +1 -1
- package/lib/types/cc/terminal.js +62 -50
- package/lib/types/command-trees.d.ts +3 -0
- package/lib/types/command-trees.d.ts.map +1 -0
- package/lib/types/command-trees.js +4 -0
- package/lib/types/commands.d.ts +37 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +68 -3
- package/lib/types/components/ActivityLine.d.ts +1 -1
- package/lib/types/components/ActivityLine.d.ts.map +1 -1
- package/lib/types/components/ActivityPicker.d.ts.map +1 -1
- package/lib/types/components/ActivityPicker.js +3 -4
- package/lib/types/components/BtwPanel.d.ts +16 -0
- package/lib/types/components/BtwPanel.d.ts.map +1 -0
- package/lib/types/components/BtwPanel.js +47 -0
- package/lib/types/components/CommandSuggestions.d.ts +4 -2
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +2 -2
- package/lib/types/components/EffortSlider.d.ts +15 -0
- package/lib/types/components/EffortSlider.d.ts.map +1 -0
- package/lib/types/components/EffortSlider.js +17 -0
- package/lib/types/components/GoalTodoPanel.d.ts +1 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.d.ts +5 -2
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +8 -3
- package/lib/types/components/HistorySearchDialog.d.ts +1 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +21 -10
- package/lib/types/components/InterruptedByUser.d.ts +2 -2
- package/lib/types/components/InterruptedByUser.d.ts.map +1 -1
- package/lib/types/components/InterruptedByUser.js +4 -3
- package/lib/types/components/LoadedContextPanel.d.ts +1 -1
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +2 -1
- package/lib/types/components/Markdown.d.ts +11 -11
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +63 -57
- package/lib/types/components/MarkdownTable.d.ts +1 -1
- package/lib/types/components/MarkdownTable.js +2 -2
- package/lib/types/components/MessageList.d.ts +10 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +17 -10
- package/lib/types/components/ModelPicker.d.ts +4 -1
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +16 -4
- package/lib/types/components/OverlayAbove.d.ts +20 -0
- package/lib/types/components/OverlayAbove.d.ts.map +1 -0
- package/lib/types/components/OverlayAbove.js +18 -0
- package/lib/types/components/PresetPicker.d.ts +1 -1
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +2 -3
- package/lib/types/components/PromptInput.d.ts +5 -4
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +186 -39
- package/lib/types/components/ResumePicker.d.ts +15 -4
- package/lib/types/components/ResumePicker.d.ts.map +1 -1
- package/lib/types/components/ResumePicker.js +25 -9
- package/lib/types/components/RewindPicker.d.ts +1 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +14 -5
- package/lib/types/components/SearchBox.d.ts +1 -1
- package/lib/types/components/SearchBox.js +1 -1
- package/lib/types/components/Spinner/GlimmerMessage.d.ts +1 -2
- package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -1
- package/lib/types/components/Spinner/GlimmerMessage.js +1 -2
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +1 -1
- package/lib/types/components/Spinner/SpinnerAnimationRow.js +2 -2
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts +1 -1
- package/lib/types/components/Spinner/SpinnerGlyph.js +1 -1
- package/lib/types/components/Spinner/spinnerUtils.d.ts +13 -18
- package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -1
- package/lib/types/components/Spinner/spinnerUtils.js +67 -71
- package/lib/types/components/Spinner/useStalledAnimation.d.ts +1 -2
- package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -1
- package/lib/types/components/Spinner/useStalledAnimation.js +1 -2
- package/lib/types/components/StreamingMarkdown.d.ts +1 -1
- package/lib/types/components/StreamingMarkdown.js +1 -1
- package/lib/types/components/ThemePicker.d.ts +13 -9
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +21 -15
- package/lib/types/components/ThinkingToggle.d.ts +1 -1
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
- package/lib/types/components/ThinkingToggle.js +8 -8
- package/lib/types/components/ToolUseLoader.d.ts +1 -1
- package/lib/types/components/ToolUseLoader.js +1 -1
- package/lib/types/components/WorkingSpinner.d.ts +2 -2
- package/lib/types/components/WorkingSpinner.js +2 -2
- package/lib/types/components/WorkspaceFlowPicker.d.ts +15 -0
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -0
- package/lib/types/components/WorkspaceFlowPicker.js +19 -0
- package/lib/types/components/WorkspacePicker.d.ts +9 -0
- package/lib/types/components/WorkspacePicker.d.ts.map +1 -0
- package/lib/types/components/WorkspacePicker.js +13 -0
- package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +2 -1
- package/lib/types/components/design-system/Byline.d.ts +1 -1
- package/lib/types/components/design-system/Byline.js +1 -1
- package/lib/types/components/design-system/Divider.d.ts +1 -1
- package/lib/types/components/design-system/Divider.js +1 -1
- package/lib/types/components/design-system/HintLine.d.ts +12 -0
- package/lib/types/components/design-system/HintLine.d.ts.map +1 -0
- package/lib/types/components/design-system/HintLine.js +15 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +1 -1
- package/lib/types/components/design-system/KeyboardShortcutHint.js +1 -1
- package/lib/types/components/design-system/ListItem.d.ts +2 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +35 -3
- package/lib/types/components/design-system/LoadingState.d.ts +1 -2
- package/lib/types/components/design-system/LoadingState.d.ts.map +1 -1
- package/lib/types/components/design-system/LoadingState.js +1 -2
- package/lib/types/components/design-system/Pane.d.ts +2 -2
- package/lib/types/components/design-system/Pane.js +2 -2
- package/lib/types/components/design-system/ProgressBar.d.ts +1 -2
- package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -1
- package/lib/types/components/design-system/ProgressBar.js +1 -2
- package/lib/types/components/design-system/StatusIcon.d.ts +2 -2
- package/lib/types/components/design-system/StatusIcon.js +2 -2
- package/lib/types/components/design-system/ThemeProvider.d.ts +1 -1
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +87 -26
- package/lib/types/components/design-system/ThemedBox.d.ts +1 -1
- package/lib/types/components/design-system/ThemedBox.js +1 -1
- package/lib/types/components/design-system/ThemedText.d.ts +2 -2
- package/lib/types/components/design-system/ThemedText.js +2 -2
- package/lib/types/components/listWindow.d.ts +26 -0
- package/lib/types/components/listWindow.d.ts.map +1 -0
- package/lib/types/components/listWindow.js +47 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts +1 -2
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantTextMessage.js +1 -2
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -2
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +6 -6
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +12 -4
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +9 -5
- package/lib/types/components/messages/MessageMetadata.d.ts +1 -1
- package/lib/types/components/messages/MessageMetadata.js +1 -1
- package/lib/types/components/messages/UserPromptMessage.d.ts +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +11 -9
- package/lib/types/components/questions/PlanReviewPanel.d.ts +1 -1
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +3 -2
- package/lib/types/components/trajectory/HotspotView.d.ts +14 -0
- package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -0
- package/lib/types/components/trajectory/HotspotView.js +83 -0
- package/lib/types/components/trajectory/Inspector.d.ts +31 -0
- package/lib/types/components/trajectory/Inspector.d.ts.map +1 -0
- package/lib/types/components/trajectory/Inspector.js +67 -0
- package/lib/types/components/trajectory/Ledger.d.ts +20 -0
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -0
- package/lib/types/components/trajectory/Ledger.js +112 -0
- package/lib/types/components/trajectory/MiniWake.d.ts +24 -0
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -0
- package/lib/types/components/trajectory/MiniWake.js +99 -0
- package/lib/types/components/trajectory/WaveBand.d.ts +33 -0
- package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -0
- package/lib/types/components/trajectory/WaveBand.js +145 -0
- package/lib/types/customTheme.d.ts +6 -6
- package/lib/types/customTheme.d.ts.map +1 -1
- package/lib/types/customTheme.js +15 -12
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -0
- package/lib/types/{channel.d.ts → dsh-adapter/channel.d.ts} +184 -43
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -0
- package/lib/types/{channel.js → dsh-adapter/channel.js} +972 -201
- package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -0
- package/lib/types/{childStderr.js → dsh-adapter/childStderr.js} +1 -1
- package/lib/types/dsh-adapter/command-trees.d.ts +27 -0
- package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -0
- package/lib/types/dsh-adapter/command-trees.js +42 -0
- package/lib/types/dsh-adapter/compat/index.d.ts +22 -0
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -0
- package/lib/types/{compat → dsh-adapter/compat}/index.js +7 -4
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +86 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/sessionLog.js +347 -0
- package/lib/types/dsh-adapter/contract.d.ts +20 -0
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/contract.js +109 -0
- package/lib/types/dsh-adapter/index.d.ts +80 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/index.js +45 -0
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -0
- package/lib/types/dsh-adapter/packaged-skills.d.ts.map +1 -0
- package/lib/types/{plugin.d.ts → dsh-adapter/plugin.d.ts} +17 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -0
- package/lib/types/{plugin.js → dsh-adapter/plugin.js} +280 -80
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +91 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/providerWizard.js +332 -0
- package/lib/types/{questions.d.ts → dsh-adapter/questions.d.ts} +7 -2
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -0
- package/lib/types/{questions.js → dsh-adapter/questions.js} +15 -7
- package/lib/types/dsh-adapter/sideQuestion.d.ts +38 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sideQuestion.js +69 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +46 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/aggregate.js +207 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +177 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/guards.js +235 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts +16 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/index.js +15 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +40 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/inspect.js +160 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +128 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/projection.js +653 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts +232 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/types.js +70 -0
- package/lib/types/dsh-adapter/trajectory/wave.d.ts +45 -0
- package/lib/types/dsh-adapter/trajectory/wave.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/wave.js +210 -0
- package/lib/types/dsh-adapter/types.d.ts +23 -0
- package/lib/types/dsh-adapter/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/types.js +1 -0
- package/lib/types/dsh-adapter/workspace.d.ts +22 -0
- package/lib/types/dsh-adapter/workspace.d.ts.map +1 -0
- package/lib/types/dsh-adapter/workspace.js +16 -0
- package/lib/types/dsh-adapter/workspaces.d.ts +118 -0
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -0
- package/lib/types/dsh-adapter/workspaces.js +290 -0
- package/lib/types/effortPrefs.d.ts +1 -1
- package/lib/types/effortPrefs.js +3 -3
- package/lib/types/history.js +2 -2
- package/lib/types/hooks/useBlink.d.ts +1 -1
- package/lib/types/hooks/useBlink.js +1 -1
- package/lib/types/i18n.d.ts +977 -36
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +307 -30
- package/lib/types/index.d.ts +1 -69
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +3 -31
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +33 -19
- package/lib/types/ink/dom.d.ts +15 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +32 -0
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.js +8 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts +1 -1
- package/lib/types/ink/hooks/use-terminal-size.js +1 -1
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +109 -28
- package/lib/types/ink/input-suppression.d.ts +20 -0
- package/lib/types/ink/input-suppression.d.ts.map +1 -0
- package/lib/types/ink/input-suppression.js +26 -0
- package/lib/types/ink/log-update.js +21 -6
- package/lib/types/ink/parse-keypress.d.ts +31 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +442 -8
- package/lib/types/ink/terminal-querier.d.ts +5 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +27 -3
- package/lib/types/ink/terminal.d.ts +18 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +32 -4
- package/lib/types/ink/termio/csi.d.ts +10 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +20 -0
- package/lib/types/ink/termio/tokenize.js +10 -0
- package/lib/types/modelPrefs.d.ts +1 -1
- package/lib/types/modelPrefs.js +3 -3
- package/lib/types/presetPrefs.d.ts +1 -1
- package/lib/types/presetPrefs.js +3 -3
- package/lib/types/screens/Chat.d.ts +20 -4
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +655 -55
- package/lib/types/screens/StatusLine.d.ts +17 -2
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +12 -4
- package/lib/types/screens/TrajectoryScene.d.ts +16 -0
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -0
- package/lib/types/screens/TrajectoryScene.js +305 -0
- package/lib/types/sessionHistory.d.ts +9 -1
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +56 -16
- package/lib/types/sessionModes.d.ts +29 -0
- package/lib/types/sessionModes.d.ts.map +1 -0
- package/lib/types/sessionModes.js +45 -0
- package/lib/types/theme.d.ts +27 -3
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +48 -4
- package/lib/types/themePrefs.d.ts +3 -3
- package/lib/types/themePrefs.js +5 -5
- package/lib/types/trajectory/format.d.ts +100 -0
- package/lib/types/trajectory/format.d.ts.map +1 -0
- package/lib/types/trajectory/format.js +213 -0
- package/lib/types/trajectory/motion.d.ts +99 -0
- package/lib/types/trajectory/motion.d.ts.map +1 -0
- package/lib/types/trajectory/motion.js +143 -0
- package/lib/types/trajectory/query.d.ts +83 -0
- package/lib/types/trajectory/query.d.ts.map +1 -0
- package/lib/types/trajectory/query.js +187 -0
- package/lib/types/trajectoryPrefs.d.ts +36 -0
- package/lib/types/trajectoryPrefs.d.ts.map +1 -0
- package/lib/types/trajectoryPrefs.js +65 -0
- package/lib/types/update.d.ts +3 -3
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +18 -7
- package/lib/types/utils/clipboard.d.ts +101 -29
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +533 -55
- package/lib/types/utils/debug.d.ts +1 -1
- package/lib/types/utils/debug.js +2 -2
- package/lib/types/utils/execFileNoThrow.d.ts.map +1 -1
- package/lib/types/utils/execFileNoThrow.js +16 -6
- package/lib/types/utils/externalEditor.d.ts +115 -0
- package/lib/types/utils/externalEditor.d.ts.map +1 -0
- package/lib/types/utils/externalEditor.js +270 -0
- package/lib/types/utils/fullscreen.d.ts +2 -2
- package/lib/types/utils/fullscreen.js +3 -3
- package/lib/types/utils/loaded-context.d.ts +1 -1
- package/lib/types/utils/loaded-context.d.ts.map +1 -1
- package/lib/types/utils/modifiers.d.ts +24 -0
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +27 -0
- package/lib/types/utils/paths.d.ts +45 -0
- package/lib/types/utils/paths.d.ts.map +1 -0
- package/lib/types/utils/paths.js +69 -0
- package/lib/types/utils/shellQuote.d.ts +14 -0
- package/lib/types/utils/shellQuote.d.ts.map +1 -0
- package/lib/types/utils/shellQuote.js +39 -0
- package/lib/types/utils/workspaceRoot.d.ts +21 -0
- package/lib/types/utils/workspaceRoot.d.ts.map +1 -0
- package/lib/types/utils/workspaceRoot.js +47 -0
- package/lib/types/workspaces.d.ts +3 -0
- package/lib/types/workspaces.d.ts.map +1 -0
- package/lib/types/workspaces.js +4 -0
- package/package.json +25 -7
- package/lib/types/approvals.d.ts.map +0 -1
- package/lib/types/channel.d.ts.map +0 -1
- package/lib/types/childStderr.d.ts.map +0 -1
- package/lib/types/compat/index.d.ts +0 -20
- package/lib/types/compat/index.d.ts.map +0 -1
- package/lib/types/compat/sessionLog.d.ts +0 -40
- package/lib/types/compat/sessionLog.d.ts.map +0 -1
- package/lib/types/compat/sessionLog.js +0 -226
- package/lib/types/invariant.d.ts.map +0 -1
- package/lib/types/packaged-skills.d.ts.map +0 -1
- package/lib/types/plugin.d.ts.map +0 -1
- package/lib/types/presets.d.ts.map +0 -1
- package/lib/types/questions.d.ts.map +0 -1
- /package/lib/types/{approvals.d.ts → dsh-adapter/approvals.d.ts} +0 -0
- /package/lib/types/{approvals.js → dsh-adapter/approvals.js} +0 -0
- /package/lib/types/{childStderr.d.ts → dsh-adapter/childStderr.d.ts} +0 -0
- /package/lib/types/{invariant.d.ts → dsh-adapter/invariant.d.ts} +0 -0
- /package/lib/types/{invariant.js → dsh-adapter/invariant.js} +0 -0
- /package/lib/types/{packaged-skills.d.ts → dsh-adapter/packaged-skills.d.ts} +0 -0
- /package/lib/types/{packaged-skills.js → dsh-adapter/packaged-skills.js} +0 -0
- /package/lib/types/{presets.d.ts → dsh-adapter/presets.d.ts} +0 -0
- /package/lib/types/{presets.js → dsh-adapter/presets.js} +0 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory aggregate — the hotspot view's data and the session totals.
|
|
3
|
+
*
|
|
4
|
+
* The ledger answers "what happened, in order". This module answers the other
|
|
5
|
+
* question a long session raises: **where did the time go**. Chronological
|
|
6
|
+
* order is the worst order for that, so everything here is grouped and ranked
|
|
7
|
+
* instead: cost per tool, cost per model phase (decode vs. waiting for the
|
|
8
|
+
* first token vs. retry backoff), cost per turn.
|
|
9
|
+
*
|
|
10
|
+
* Three details make the numbers trustworthy rather than merely plausible:
|
|
11
|
+
*
|
|
12
|
+
* - **Own duration only.** A turn's cost is its own bracket, never the sum of
|
|
13
|
+
* its children — summing both would double-count every tool inside it.
|
|
14
|
+
* - **No fabricated spans.** A step that produced no `assistant/chunk` (the
|
|
15
|
+
* request failed, or the log predates chunk capture) contributes no TTFT and
|
|
16
|
+
* no decode sample rather than a zero that would drag the average down.
|
|
17
|
+
* - **Bursts expand.** A folded run is one ledger row but N calls; the counts
|
|
18
|
+
* and totals here are over calls, so `count` matches what actually ran.
|
|
19
|
+
*/
|
|
20
|
+
/** Zero token accounting, used as the reduce seed. */
|
|
21
|
+
const NO_TOKENS = { input: 0, output: 0, think: 0, cacheRead: 0, cacheWrite: 0 };
|
|
22
|
+
/**
|
|
23
|
+
* Visit every logical call in ledger order, expanding burst rows.
|
|
24
|
+
*
|
|
25
|
+
* @param nodes - The folded ledger.
|
|
26
|
+
* @param visit - Receives each call node plus the ledger index of the row it
|
|
27
|
+
* is displayed under (the burst row's index, for folded members).
|
|
28
|
+
*/
|
|
29
|
+
export function forEachCall(nodes, visit) {
|
|
30
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
31
|
+
const node = nodes[index];
|
|
32
|
+
if (node.burst !== undefined) {
|
|
33
|
+
for (const member of node.burst.members)
|
|
34
|
+
visit(member, index);
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (node.kind === 'tool' || node.kind === 'subtool')
|
|
38
|
+
visit(node, index);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** Get or create a bucket, remembering the first ledger index that hit it. */
|
|
42
|
+
function bucket(map, key, ledgerIndex) {
|
|
43
|
+
let slot = map.get(key);
|
|
44
|
+
if (slot === undefined) {
|
|
45
|
+
slot = { totalMs: 0, count: 0, tokens: 0, firstIndex: ledgerIndex };
|
|
46
|
+
map.set(key, slot);
|
|
47
|
+
}
|
|
48
|
+
return slot;
|
|
49
|
+
}
|
|
50
|
+
/** Materialize and rank buckets. */
|
|
51
|
+
function rank(map, sort) {
|
|
52
|
+
const rows = [];
|
|
53
|
+
for (const [label, slot] of map) {
|
|
54
|
+
rows.push({
|
|
55
|
+
label,
|
|
56
|
+
totalMs: slot.totalMs,
|
|
57
|
+
count: slot.count,
|
|
58
|
+
tokens: slot.tokens,
|
|
59
|
+
error: slot.error,
|
|
60
|
+
firstIndex: slot.firstIndex,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return sortRows(rows, sort);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Rank hotspot rows by the active sort key.
|
|
67
|
+
*
|
|
68
|
+
* Ties break on label so the order is total — an unstable order would make
|
|
69
|
+
* rows jump between frames while the session streams.
|
|
70
|
+
*/
|
|
71
|
+
export function sortRows(rows, sort) {
|
|
72
|
+
const key = (row) => sort === 'count' ? row.count : sort === 'tokens' ? row.tokens : row.totalMs;
|
|
73
|
+
return [...rows].sort((a, b) => key(b) - key(a) || a.label.localeCompare(b.label));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Derive the hotspot groups and session totals from a projection.
|
|
77
|
+
*
|
|
78
|
+
* @param build - The current projection.
|
|
79
|
+
* @param sort - Ranking key for the tool and turn groups.
|
|
80
|
+
* @returns Ranked groups plus the counters the scene header and status badge
|
|
81
|
+
* read. Pure: nothing here mutates the build.
|
|
82
|
+
*/
|
|
83
|
+
export function aggregate(build, sort = 'duration') {
|
|
84
|
+
const { nodes, timing, counts } = build;
|
|
85
|
+
const tools = new Map();
|
|
86
|
+
const turns = new Map();
|
|
87
|
+
let calls = 0;
|
|
88
|
+
let toolMs = 0;
|
|
89
|
+
let retryMs = 0;
|
|
90
|
+
let steps = 0;
|
|
91
|
+
let turnCount = 0;
|
|
92
|
+
let tokens = NO_TOKENS;
|
|
93
|
+
forEachCall(nodes, (node, ledgerIndex) => {
|
|
94
|
+
calls += 1;
|
|
95
|
+
const slot = bucket(tools, node.label, ledgerIndex);
|
|
96
|
+
slot.count += 1;
|
|
97
|
+
slot.totalMs += node.durationMs ?? 0;
|
|
98
|
+
toolMs += node.durationMs ?? 0;
|
|
99
|
+
if (node.status === 'error')
|
|
100
|
+
slot.error = true;
|
|
101
|
+
});
|
|
102
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
103
|
+
const node = nodes[index];
|
|
104
|
+
switch (node.kind) {
|
|
105
|
+
case 'turn': {
|
|
106
|
+
turnCount += 1;
|
|
107
|
+
const slot = bucket(turns, node.label, index);
|
|
108
|
+
slot.count += 1;
|
|
109
|
+
slot.totalMs += node.durationMs ?? 0;
|
|
110
|
+
if (node.status === 'error')
|
|
111
|
+
slot.error = true;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case 'step':
|
|
115
|
+
steps += 1;
|
|
116
|
+
break;
|
|
117
|
+
case 'retry':
|
|
118
|
+
retryMs += node.durationMs ?? 0;
|
|
119
|
+
break;
|
|
120
|
+
default:
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
if (node.tokens !== undefined) {
|
|
124
|
+
tokens = {
|
|
125
|
+
input: tokens.input + node.tokens.input,
|
|
126
|
+
output: tokens.output + node.tokens.output,
|
|
127
|
+
think: tokens.think + node.tokens.think,
|
|
128
|
+
cacheRead: tokens.cacheRead + node.tokens.cacheRead,
|
|
129
|
+
cacheWrite: tokens.cacheWrite + node.tokens.cacheWrite,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// Attribute each step's token cost to its turn, so the turn ranking can be
|
|
134
|
+
// sorted by tokens as well as by wall-clock.
|
|
135
|
+
for (const node of nodes) {
|
|
136
|
+
if (node.tokens === undefined)
|
|
137
|
+
continue;
|
|
138
|
+
const slot = turns.get(`turn ${node.turn}`);
|
|
139
|
+
if (slot !== undefined) {
|
|
140
|
+
slot.tokens += node.tokens.input + node.tokens.output + node.tokens.think;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const { decodeMs, ttftMs, ttftSamples } = modelTiming(timing);
|
|
144
|
+
const model = [];
|
|
145
|
+
if (decodeMs > 0)
|
|
146
|
+
model.push({ label: 'decode', totalMs: decodeMs, count: ttftSamples, tokens: tokens.output, firstIndex: 0 });
|
|
147
|
+
if (ttftSamples > 0)
|
|
148
|
+
model.push({ label: 'ttft', totalMs: ttftMs, count: ttftSamples, tokens: 0, firstIndex: 0 });
|
|
149
|
+
if (retryMs > 0 || counts.retries > 0) {
|
|
150
|
+
const firstRetry = nodes.findIndex(node => node.kind === 'retry');
|
|
151
|
+
model.push({ label: 'retry', totalMs: retryMs, count: counts.retries, tokens: 0, error: true, firstIndex: Math.max(0, firstRetry) });
|
|
152
|
+
}
|
|
153
|
+
const first = nodes[0];
|
|
154
|
+
const last = nodes[nodes.length - 1];
|
|
155
|
+
const spanMs = first === undefined || last === undefined ? 0 : Math.max(0, lastTime(last) - first.time);
|
|
156
|
+
const totals = {
|
|
157
|
+
turns: turnCount,
|
|
158
|
+
steps,
|
|
159
|
+
rows: nodes.length,
|
|
160
|
+
calls,
|
|
161
|
+
// Failure and retry counts come from the fold's own O(1) counters rather
|
|
162
|
+
// than being recomputed here: the status-line chip reads them on every
|
|
163
|
+
// chat frame, and two independent tallies of the same session would
|
|
164
|
+
// eventually disagree — which is exactly what they did.
|
|
165
|
+
errors: counts.errors,
|
|
166
|
+
retries: counts.retries,
|
|
167
|
+
spanMs,
|
|
168
|
+
toolMs,
|
|
169
|
+
decodeMs,
|
|
170
|
+
ttftMs,
|
|
171
|
+
ttftSamples,
|
|
172
|
+
retryMs,
|
|
173
|
+
tokens,
|
|
174
|
+
};
|
|
175
|
+
return {
|
|
176
|
+
tools: rank(tools, sort),
|
|
177
|
+
model: sortRows(model, sort),
|
|
178
|
+
turns: rank(turns, sort),
|
|
179
|
+
totals,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/** The latest instant a node covers — its close, or its start when open. */
|
|
183
|
+
function lastTime(node) {
|
|
184
|
+
return node.time + (node.durationMs ?? 0);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Sum decode and time-to-first-token across steps.
|
|
188
|
+
*
|
|
189
|
+
* A step contributes only when it actually streamed: `firstChunk` present
|
|
190
|
+
* means the model produced output, so `firstChunk - startTime` is a real TTFT
|
|
191
|
+
* and `lastChunk - firstChunk` a real decode span. Steps without chunks are
|
|
192
|
+
* skipped entirely rather than counted as zero.
|
|
193
|
+
*/
|
|
194
|
+
function modelTiming(timing) {
|
|
195
|
+
let decodeMs = 0;
|
|
196
|
+
let ttftMs = 0;
|
|
197
|
+
let ttftSamples = 0;
|
|
198
|
+
for (const slot of timing.values()) {
|
|
199
|
+
if (slot.firstChunk === undefined)
|
|
200
|
+
continue;
|
|
201
|
+
ttftMs += Math.max(0, slot.firstChunk - slot.startTime);
|
|
202
|
+
ttftSamples += 1;
|
|
203
|
+
if (slot.lastChunk !== undefined)
|
|
204
|
+
decodeMs += Math.max(0, slot.lastChunk - slot.firstChunk);
|
|
205
|
+
}
|
|
206
|
+
return { decodeMs, ttftMs, ttftSamples };
|
|
207
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural guards for the session events the trajectory projection reads.
|
|
3
|
+
*
|
|
4
|
+
* ## Why guards instead of the declared types
|
|
5
|
+
*
|
|
6
|
+
* `SessionEventMap` declares twelve core event types. Everything else in the
|
|
7
|
+
* 44-name `KNOWN_SESSION_EVENT_TYPES` vocabulary arrives through *module
|
|
8
|
+
* augmentation* from the plugin that owns it — `llm/retry` from the LLM
|
|
9
|
+
* layer, `hook/*` from the hook runner, `tool/code-dispatch*` from the code
|
|
10
|
+
* runtime. Those declaration packages are not all in this bundle's dependency
|
|
11
|
+
* graph, so `event.type === 'llm/retry'` does not even type-check here: the
|
|
12
|
+
* literal is not a member of the union TypeScript can see.
|
|
13
|
+
*
|
|
14
|
+
* The answer is the one the adapter boundary already prescribes for upstream
|
|
15
|
+
* coupling — widen once, at a single auditable point ({@link asRawEvents}),
|
|
16
|
+
* then validate shapes at runtime. Every guard below is a *total function*:
|
|
17
|
+
* a payload that does not match returns `undefined` and the fold skips that
|
|
18
|
+
* event. An upstream release that renames a field degrades the trajectory by
|
|
19
|
+
* one row kind; it never throws inside a render.
|
|
20
|
+
*
|
|
21
|
+
* ## Why these exact shapes
|
|
22
|
+
*
|
|
23
|
+
* Each guard was written against payloads decoded out of real session logs
|
|
24
|
+
* (39 sessions, 96,836 events) rather than from documentation, and the
|
|
25
|
+
* corresponding fixture in `verify-trace-projection.mjs` reproduces the same
|
|
26
|
+
* shape. Where a field was absent from every observed sample it is optional
|
|
27
|
+
* here, so a future harness that starts emitting it is picked up for free.
|
|
28
|
+
*/
|
|
29
|
+
import type { SessionEvent } from '@deepseek-ai/dsh-session';
|
|
30
|
+
/**
|
|
31
|
+
* A session event reduced to the envelope the projection relies on. Only
|
|
32
|
+
* `type`, `seq` and `time` are contractual across every event; `data` is
|
|
33
|
+
* deliberately `unknown` so nothing downstream can read it without a guard.
|
|
34
|
+
*/
|
|
35
|
+
export interface RawTrajEvent {
|
|
36
|
+
readonly type: string;
|
|
37
|
+
readonly seq: number;
|
|
38
|
+
readonly time: number;
|
|
39
|
+
readonly data: unknown;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The single widening point for the whole trajectory feature.
|
|
43
|
+
*
|
|
44
|
+
* `SessionEvent`'s `type` is a union of the *locally declared* event names;
|
|
45
|
+
* the projection must also reason about augmented names it cannot see in the
|
|
46
|
+
* type graph. Widening the array element to {@link RawTrajEvent} keeps every
|
|
47
|
+
* field the projection reads (envelope) while forcing `data` through the
|
|
48
|
+
* guards below. The cast is structural-only — no property is added, removed,
|
|
49
|
+
* or reinterpreted — and it is the one place a reviewer must check.
|
|
50
|
+
*
|
|
51
|
+
* @param events - The session's immutable event snapshot.
|
|
52
|
+
* @returns The same array, typed for guard-mediated access.
|
|
53
|
+
*/
|
|
54
|
+
export declare function asRawEvents(events: readonly SessionEvent[]): readonly RawTrajEvent[];
|
|
55
|
+
/**
|
|
56
|
+
* An `llm/retry` payload.
|
|
57
|
+
*
|
|
58
|
+
* Observed shape: `{ retryId, turn, step, provider, mode, policyKey, retry,
|
|
59
|
+
* maxRetries, delayMs, failure: { message, code } }`. `retryId` pairs the
|
|
60
|
+
* event with the `llm/retry-started` that follows; `failure.code` is the
|
|
61
|
+
* classifier (`RATE_LIMIT` / `SERVER` / `TIMEOUT` / `TRANSPORT` /
|
|
62
|
+
* `EMPTY_RESPONSE`) shown as the row's error identity.
|
|
63
|
+
*/
|
|
64
|
+
export interface RetryPayload {
|
|
65
|
+
readonly retryId: string;
|
|
66
|
+
readonly turn?: number;
|
|
67
|
+
readonly step?: number;
|
|
68
|
+
/** Provider whose request failed — shown as an inspector fact. */
|
|
69
|
+
readonly provider?: string;
|
|
70
|
+
readonly retry: number;
|
|
71
|
+
readonly maxRetries?: number;
|
|
72
|
+
readonly delayMs: number;
|
|
73
|
+
readonly code?: string;
|
|
74
|
+
readonly message?: string;
|
|
75
|
+
}
|
|
76
|
+
/** Narrow an `llm/retry` payload; `undefined` when the shape does not match. */
|
|
77
|
+
export declare function readRetry(data: unknown): RetryPayload | undefined;
|
|
78
|
+
/** The `retryId` of an `llm/retry-started`, used to close the retry bracket. */
|
|
79
|
+
export declare function readRetryStarted(data: unknown): string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* A `tool/code-dispatch*` payload — the code runner's nested tool calls, and
|
|
82
|
+
* the only source of SUBTOOL rows.
|
|
83
|
+
*
|
|
84
|
+
* `tool/code-dispatch-start` opens and `tool/code-dispatch` closes, paired by
|
|
85
|
+
* `subCallId`; `rootCallId`/`parentCallId` give the enclosing model-issued
|
|
86
|
+
* call. `arguments` is a structured value here (unlike `tool/call`, whose
|
|
87
|
+
* `arguments` is the model's raw JSON string), so it is stringified for the
|
|
88
|
+
* preview at guard time — the payload object is small and already
|
|
89
|
+
* materialized by the log reader.
|
|
90
|
+
*/
|
|
91
|
+
export interface DispatchPayload {
|
|
92
|
+
readonly subCallId: string;
|
|
93
|
+
readonly rootCallId?: string;
|
|
94
|
+
readonly parentCallId?: string;
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly args?: string;
|
|
97
|
+
readonly isError?: boolean;
|
|
98
|
+
}
|
|
99
|
+
/** Narrow a `tool/code-dispatch*` payload. */
|
|
100
|
+
export declare function readDispatch(data: unknown): DispatchPayload | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* A `request/header` payload, reduced to the route facts the trajectory
|
|
103
|
+
* shows: which model actually served this request, at which effort. The full
|
|
104
|
+
* header (system prompt, tool catalog) stays in the log for the inspector.
|
|
105
|
+
*/
|
|
106
|
+
export interface RequestHeaderPayload {
|
|
107
|
+
readonly provider?: string;
|
|
108
|
+
readonly model?: string;
|
|
109
|
+
readonly effort?: string;
|
|
110
|
+
readonly reason?: string;
|
|
111
|
+
}
|
|
112
|
+
/** Narrow a `request/header` payload. */
|
|
113
|
+
export declare function readRequestHeader(data: unknown): RequestHeaderPayload | undefined;
|
|
114
|
+
/** A `subagent/descriptor` payload: what kind of child this session is. */
|
|
115
|
+
export interface SubagentPayload {
|
|
116
|
+
readonly label?: string;
|
|
117
|
+
readonly model?: string;
|
|
118
|
+
readonly mode?: string;
|
|
119
|
+
}
|
|
120
|
+
/** Narrow a `subagent/descriptor` payload. */
|
|
121
|
+
export declare function readSubagent(data: unknown): SubagentPayload | undefined;
|
|
122
|
+
/** An `approval/asked` payload. `id` pairs it with the `approval/decided`. */
|
|
123
|
+
export interface ApprovalAskedPayload {
|
|
124
|
+
readonly id: string;
|
|
125
|
+
readonly toolName?: string;
|
|
126
|
+
readonly callId?: string;
|
|
127
|
+
readonly reason?: string;
|
|
128
|
+
}
|
|
129
|
+
/** Narrow an `approval/asked` payload. */
|
|
130
|
+
export declare function readApprovalAsked(data: unknown): ApprovalAskedPayload | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* An `approval/decided` payload. `outcome` is a union upstream; it is read as
|
|
133
|
+
* a plain string here and only compared against the denial spellings, so a
|
|
134
|
+
* new outcome name degrades to "not a denial" rather than to a crash.
|
|
135
|
+
*/
|
|
136
|
+
export interface ApprovalDecidedPayload {
|
|
137
|
+
readonly id: string;
|
|
138
|
+
readonly outcome: string;
|
|
139
|
+
}
|
|
140
|
+
/** Narrow an `approval/decided` payload. */
|
|
141
|
+
export declare function readApprovalDecided(data: unknown): ApprovalDecidedPayload | undefined;
|
|
142
|
+
/** True when an approval outcome should render as an error. */
|
|
143
|
+
export declare function isApprovalDenied(outcome: string): boolean;
|
|
144
|
+
/** A `hook/invoked` payload. */
|
|
145
|
+
export interface HookPayload {
|
|
146
|
+
readonly id?: string;
|
|
147
|
+
readonly name: string;
|
|
148
|
+
readonly event?: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Narrow a `hook/invoked` / `hook/result` payload. No sample appeared in the
|
|
152
|
+
* surveyed logs (no hooks were configured), so the accepted key spellings are
|
|
153
|
+
* deliberately broad: any of `name`/`hook`/`hookName` identifies the hook.
|
|
154
|
+
*/
|
|
155
|
+
export declare function readHook(data: unknown): HookPayload | undefined;
|
|
156
|
+
/** A `sandbox/mode`, `plan/mode`, `approval/policy` or `permission/preset` value. */
|
|
157
|
+
export declare function readModeValue(data: unknown): string | undefined;
|
|
158
|
+
/** A `command/run` payload — the slash command the user dispatched. */
|
|
159
|
+
export declare function readCommandRun(data: unknown): {
|
|
160
|
+
name: string;
|
|
161
|
+
args?: string;
|
|
162
|
+
} | undefined;
|
|
163
|
+
/** A `compaction/*` payload; every field is optional across the bracket. */
|
|
164
|
+
export interface CompactionPayload {
|
|
165
|
+
readonly id?: string;
|
|
166
|
+
readonly reason?: string;
|
|
167
|
+
readonly removed?: number;
|
|
168
|
+
}
|
|
169
|
+
/** Narrow a `compaction/start` or `compaction/end` payload. */
|
|
170
|
+
export declare function readCompaction(data: unknown): CompactionPayload;
|
|
171
|
+
/** A `todo/write` payload, reduced to the progress counters. */
|
|
172
|
+
export declare function readTodos(data: unknown): {
|
|
173
|
+
done: number;
|
|
174
|
+
total: number;
|
|
175
|
+
current?: string;
|
|
176
|
+
} | undefined;
|
|
177
|
+
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/guards.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural guards for the session events the trajectory projection reads.
|
|
3
|
+
*
|
|
4
|
+
* ## Why guards instead of the declared types
|
|
5
|
+
*
|
|
6
|
+
* `SessionEventMap` declares twelve core event types. Everything else in the
|
|
7
|
+
* 44-name `KNOWN_SESSION_EVENT_TYPES` vocabulary arrives through *module
|
|
8
|
+
* augmentation* from the plugin that owns it — `llm/retry` from the LLM
|
|
9
|
+
* layer, `hook/*` from the hook runner, `tool/code-dispatch*` from the code
|
|
10
|
+
* runtime. Those declaration packages are not all in this bundle's dependency
|
|
11
|
+
* graph, so `event.type === 'llm/retry'` does not even type-check here: the
|
|
12
|
+
* literal is not a member of the union TypeScript can see.
|
|
13
|
+
*
|
|
14
|
+
* The answer is the one the adapter boundary already prescribes for upstream
|
|
15
|
+
* coupling — widen once, at a single auditable point ({@link asRawEvents}),
|
|
16
|
+
* then validate shapes at runtime. Every guard below is a *total function*:
|
|
17
|
+
* a payload that does not match returns `undefined` and the fold skips that
|
|
18
|
+
* event. An upstream release that renames a field degrades the trajectory by
|
|
19
|
+
* one row kind; it never throws inside a render.
|
|
20
|
+
*
|
|
21
|
+
* ## Why these exact shapes
|
|
22
|
+
*
|
|
23
|
+
* Each guard was written against payloads decoded out of real session logs
|
|
24
|
+
* (39 sessions, 96,836 events) rather than from documentation, and the
|
|
25
|
+
* corresponding fixture in `verify-trace-projection.mjs` reproduces the same
|
|
26
|
+
* shape. Where a field was absent from every observed sample it is optional
|
|
27
|
+
* here, so a future harness that starts emitting it is picked up for free.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The single widening point for the whole trajectory feature.
|
|
31
|
+
*
|
|
32
|
+
* `SessionEvent`'s `type` is a union of the *locally declared* event names;
|
|
33
|
+
* the projection must also reason about augmented names it cannot see in the
|
|
34
|
+
* type graph. Widening the array element to {@link RawTrajEvent} keeps every
|
|
35
|
+
* field the projection reads (envelope) while forcing `data` through the
|
|
36
|
+
* guards below. The cast is structural-only — no property is added, removed,
|
|
37
|
+
* or reinterpreted — and it is the one place a reviewer must check.
|
|
38
|
+
*
|
|
39
|
+
* @param events - The session's immutable event snapshot.
|
|
40
|
+
* @returns The same array, typed for guard-mediated access.
|
|
41
|
+
*/
|
|
42
|
+
export function asRawEvents(events) {
|
|
43
|
+
return events;
|
|
44
|
+
}
|
|
45
|
+
/** True for a non-null object — the precondition of every guard below. */
|
|
46
|
+
function isRecord(value) {
|
|
47
|
+
return typeof value === 'object' && value !== null;
|
|
48
|
+
}
|
|
49
|
+
/** Read a string property, or `undefined` when absent or the wrong type. */
|
|
50
|
+
function str(source, key) {
|
|
51
|
+
const value = source[key];
|
|
52
|
+
return typeof value === 'string' ? value : undefined;
|
|
53
|
+
}
|
|
54
|
+
/** Read a finite number property, or `undefined` when absent or non-finite. */
|
|
55
|
+
function num(source, key) {
|
|
56
|
+
const value = source[key];
|
|
57
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
58
|
+
}
|
|
59
|
+
/** Narrow an `llm/retry` payload; `undefined` when the shape does not match. */
|
|
60
|
+
export function readRetry(data) {
|
|
61
|
+
if (!isRecord(data))
|
|
62
|
+
return undefined;
|
|
63
|
+
const retryId = str(data, 'retryId');
|
|
64
|
+
const retry = num(data, 'retry');
|
|
65
|
+
const delayMs = num(data, 'delayMs');
|
|
66
|
+
if (retryId === undefined || retry === undefined || delayMs === undefined)
|
|
67
|
+
return undefined;
|
|
68
|
+
const failure = isRecord(data.failure) ? data.failure : undefined;
|
|
69
|
+
return {
|
|
70
|
+
retryId,
|
|
71
|
+
turn: num(data, 'turn'),
|
|
72
|
+
step: num(data, 'step'),
|
|
73
|
+
provider: str(data, 'provider'),
|
|
74
|
+
retry,
|
|
75
|
+
maxRetries: num(data, 'maxRetries'),
|
|
76
|
+
delayMs,
|
|
77
|
+
code: failure === undefined ? undefined : str(failure, 'code'),
|
|
78
|
+
message: failure === undefined ? undefined : str(failure, 'message'),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** The `retryId` of an `llm/retry-started`, used to close the retry bracket. */
|
|
82
|
+
export function readRetryStarted(data) {
|
|
83
|
+
return isRecord(data) ? str(data, 'retryId') : undefined;
|
|
84
|
+
}
|
|
85
|
+
/** Narrow a `tool/code-dispatch*` payload. */
|
|
86
|
+
export function readDispatch(data) {
|
|
87
|
+
if (!isRecord(data))
|
|
88
|
+
return undefined;
|
|
89
|
+
const subCallId = str(data, 'subCallId');
|
|
90
|
+
const name = str(data, 'name');
|
|
91
|
+
if (subCallId === undefined || name === undefined)
|
|
92
|
+
return undefined;
|
|
93
|
+
const rawArgs = data.arguments;
|
|
94
|
+
let args;
|
|
95
|
+
if (typeof rawArgs === 'string')
|
|
96
|
+
args = rawArgs;
|
|
97
|
+
else if (rawArgs !== undefined) {
|
|
98
|
+
// Structured arguments: a bounded stringify. JSON.stringify throws on
|
|
99
|
+
// circular references, which a JSON-validated log cannot contain — but
|
|
100
|
+
// the guard contract is "never throw", so it is caught regardless.
|
|
101
|
+
try {
|
|
102
|
+
args = JSON.stringify(rawArgs);
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
args = undefined;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const isError = data.isError;
|
|
109
|
+
return {
|
|
110
|
+
subCallId,
|
|
111
|
+
rootCallId: str(data, 'rootCallId'),
|
|
112
|
+
parentCallId: str(data, 'parentCallId'),
|
|
113
|
+
name,
|
|
114
|
+
args,
|
|
115
|
+
isError: typeof isError === 'boolean' ? isError : undefined,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/** Narrow a `request/header` payload. */
|
|
119
|
+
export function readRequestHeader(data) {
|
|
120
|
+
if (!isRecord(data))
|
|
121
|
+
return undefined;
|
|
122
|
+
const header = isRecord(data.header) ? data.header : undefined;
|
|
123
|
+
if (header === undefined)
|
|
124
|
+
return undefined;
|
|
125
|
+
const config = isRecord(header.config) ? header.config : undefined;
|
|
126
|
+
return {
|
|
127
|
+
provider: config === undefined ? undefined : str(config, 'provider'),
|
|
128
|
+
model: config === undefined ? undefined : str(config, 'model'),
|
|
129
|
+
effort: config === undefined ? undefined : str(config, 'reasoningEffort'),
|
|
130
|
+
reason: str(data, 'reason'),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/** Narrow a `subagent/descriptor` payload. */
|
|
134
|
+
export function readSubagent(data) {
|
|
135
|
+
if (!isRecord(data))
|
|
136
|
+
return undefined;
|
|
137
|
+
return {
|
|
138
|
+
label: str(data, 'label'),
|
|
139
|
+
model: str(data, 'agentModel'),
|
|
140
|
+
mode: str(data, 'mode'),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
/** Narrow an `approval/asked` payload. */
|
|
144
|
+
export function readApprovalAsked(data) {
|
|
145
|
+
if (!isRecord(data))
|
|
146
|
+
return undefined;
|
|
147
|
+
const id = str(data, 'id');
|
|
148
|
+
if (id === undefined)
|
|
149
|
+
return undefined;
|
|
150
|
+
return {
|
|
151
|
+
id,
|
|
152
|
+
toolName: str(data, 'toolName'),
|
|
153
|
+
callId: str(data, 'callId'),
|
|
154
|
+
reason: str(data, 'reason'),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/** Narrow an `approval/decided` payload. */
|
|
158
|
+
export function readApprovalDecided(data) {
|
|
159
|
+
if (!isRecord(data))
|
|
160
|
+
return undefined;
|
|
161
|
+
const id = str(data, 'id');
|
|
162
|
+
if (id === undefined)
|
|
163
|
+
return undefined;
|
|
164
|
+
const raw = data.outcome;
|
|
165
|
+
const outcome = typeof raw === 'string'
|
|
166
|
+
? raw
|
|
167
|
+
: isRecord(raw)
|
|
168
|
+
? (str(raw, 'kind') ?? str(raw, 'decision') ?? '')
|
|
169
|
+
: '';
|
|
170
|
+
return { id, outcome };
|
|
171
|
+
}
|
|
172
|
+
/** Outcomes that mark an approval row as failed. */
|
|
173
|
+
const DENIED = new Set(['denied', 'deny', 'rejected', 'cancelled', 'canceled', 'unavailable']);
|
|
174
|
+
/** True when an approval outcome should render as an error. */
|
|
175
|
+
export function isApprovalDenied(outcome) {
|
|
176
|
+
return DENIED.has(outcome.toLowerCase());
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Narrow a `hook/invoked` / `hook/result` payload. No sample appeared in the
|
|
180
|
+
* surveyed logs (no hooks were configured), so the accepted key spellings are
|
|
181
|
+
* deliberately broad: any of `name`/`hook`/`hookName` identifies the hook.
|
|
182
|
+
*/
|
|
183
|
+
export function readHook(data) {
|
|
184
|
+
if (!isRecord(data))
|
|
185
|
+
return undefined;
|
|
186
|
+
const name = str(data, 'name') ?? str(data, 'hook') ?? str(data, 'hookName');
|
|
187
|
+
if (name === undefined)
|
|
188
|
+
return undefined;
|
|
189
|
+
return { id: str(data, 'id') ?? str(data, 'invocationId'), name, event: str(data, 'event') };
|
|
190
|
+
}
|
|
191
|
+
/** A `sandbox/mode`, `plan/mode`, `approval/policy` or `permission/preset` value. */
|
|
192
|
+
export function readModeValue(data) {
|
|
193
|
+
if (!isRecord(data))
|
|
194
|
+
return undefined;
|
|
195
|
+
return str(data, 'mode') ?? str(data, 'policy') ?? str(data, 'preset') ?? str(data, 'name');
|
|
196
|
+
}
|
|
197
|
+
/** A `command/run` payload — the slash command the user dispatched. */
|
|
198
|
+
export function readCommandRun(data) {
|
|
199
|
+
if (!isRecord(data))
|
|
200
|
+
return undefined;
|
|
201
|
+
const name = str(data, 'name');
|
|
202
|
+
if (name === undefined)
|
|
203
|
+
return undefined;
|
|
204
|
+
return { name, args: str(data, 'args') };
|
|
205
|
+
}
|
|
206
|
+
/** Narrow a `compaction/start` or `compaction/end` payload. */
|
|
207
|
+
export function readCompaction(data) {
|
|
208
|
+
if (!isRecord(data))
|
|
209
|
+
return {};
|
|
210
|
+
return {
|
|
211
|
+
id: str(data, 'id') ?? str(data, 'compactionId'),
|
|
212
|
+
reason: str(data, 'reason') ?? str(data, 'trigger'),
|
|
213
|
+
removed: num(data, 'removed') ?? num(data, 'pruned'),
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
/** A `todo/write` payload, reduced to the progress counters. */
|
|
217
|
+
export function readTodos(data) {
|
|
218
|
+
if (!isRecord(data))
|
|
219
|
+
return undefined;
|
|
220
|
+
const todos = data.todos;
|
|
221
|
+
if (!Array.isArray(todos))
|
|
222
|
+
return undefined;
|
|
223
|
+
let done = 0;
|
|
224
|
+
let current;
|
|
225
|
+
for (const item of todos) {
|
|
226
|
+
if (!isRecord(item))
|
|
227
|
+
continue;
|
|
228
|
+
const status = str(item, 'status');
|
|
229
|
+
if (status === 'completed')
|
|
230
|
+
done += 1;
|
|
231
|
+
else if (status === 'in_progress' && current === undefined)
|
|
232
|
+
current = str(item, 'content');
|
|
233
|
+
}
|
|
234
|
+
return { done, total: todos.length, current };
|
|
235
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory projection — the adapter-side barrel.
|
|
3
|
+
*
|
|
4
|
+
* This directory is the only part of the trajectory feature allowed to import
|
|
5
|
+
* `@deepseek-ai/*` (enforced by `verify-adapter-boundary`). The scene, the
|
|
6
|
+
* ledger, the wave band and the hotspot view are pure UI over the types and
|
|
7
|
+
* functions re-exported here; they never touch a session event directly.
|
|
8
|
+
*
|
|
9
|
+
* @module @deepseek-harness-tui/dsh-tui/trajectory
|
|
10
|
+
*/
|
|
11
|
+
export { buildTrajectory, emptyTrajectory, extendTrajectory, type StepTiming, type TrajBuild, } from './projection.js';
|
|
12
|
+
export { aggregate, forEachCall, sortRows } from './aggregate.js';
|
|
13
|
+
export { inspectNode, type InspectDetail, type InspectSection } from './inspect.js';
|
|
14
|
+
export { channelOf, columnOfIndex, dominantChannel, projectWave } from './wave.js';
|
|
15
|
+
export { BURST_MIN, burstDurationMs, burstErrors, burstRunning, HOTSPOT_SORTS, previewText, WAVE_PROJECTIONS, type HotspotRow, type HotspotSort, type TrajAggregate, type TrajBurst, type TrajKind, type TrajNode, type TrajStatus, type TrajTokens, type TrajTotals, type WaveBand, type WaveBucket, type WaveChannel, type WaveProjection, } from './types.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/trajectory/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAEnF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAElF,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory projection — the adapter-side barrel.
|
|
3
|
+
*
|
|
4
|
+
* This directory is the only part of the trajectory feature allowed to import
|
|
5
|
+
* `@deepseek-ai/*` (enforced by `verify-adapter-boundary`). The scene, the
|
|
6
|
+
* ledger, the wave band and the hotspot view are pure UI over the types and
|
|
7
|
+
* functions re-exported here; they never touch a session event directly.
|
|
8
|
+
*
|
|
9
|
+
* @module @deepseek-harness-tui/dsh-tui/trajectory
|
|
10
|
+
*/
|
|
11
|
+
export { buildTrajectory, emptyTrajectory, extendTrajectory, } from './projection.js';
|
|
12
|
+
export { aggregate, forEachCall, sortRows } from './aggregate.js';
|
|
13
|
+
export { inspectNode } from './inspect.js';
|
|
14
|
+
export { channelOf, columnOfIndex, dominantChannel, projectWave } from './wave.js';
|
|
15
|
+
export { BURST_MIN, burstDurationMs, burstErrors, burstRunning, HOTSPOT_SORTS, previewText, WAVE_PROJECTIONS, } from './types.js';
|