@deepseek-harness-tui/dsh-tui 0.9.0 → 0.9.2
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 +69 -256
- package/bin/dsh-tui.js +172 -5
- package/cordis.patch.yml +16 -4
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
- package/dsh-ecosystem-spec/registry/README.md +14 -14
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
- package/lib/types/cc/hyperlink.d.ts +7 -1
- package/lib/types/cc/hyperlink.d.ts.map +1 -1
- package/lib/types/cc/hyperlink.js +3 -2
- package/lib/types/cc/markdown.d.ts.map +1 -1
- package/lib/types/cc/markdown.js +33 -3
- package/lib/types/cc/sessionColors.d.ts +27 -0
- package/lib/types/cc/sessionColors.d.ts.map +1 -0
- package/lib/types/cc/sessionColors.js +39 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +6 -0
- package/lib/types/components/AutoRecapRow.d.ts +23 -0
- package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
- package/lib/types/components/AutoRecapRow.js +23 -0
- package/lib/types/components/ColorPicker.d.ts +17 -0
- package/lib/types/components/ColorPicker.d.ts.map +1 -0
- package/lib/types/components/ColorPicker.js +20 -0
- package/lib/types/components/CommandSuggestions.d.ts +3 -1
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.d.ts +33 -0
- package/lib/types/components/ContextBarView.d.ts.map +1 -0
- package/lib/types/components/ContextBarView.js +46 -0
- package/lib/types/components/EffortInputBorder.d.ts +12 -1
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +22 -5
- package/lib/types/components/FileActionsPanel.d.ts +22 -0
- package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
- package/lib/types/components/FileActionsPanel.js +28 -0
- package/lib/types/components/FileSuggestions.d.ts +3 -1
- package/lib/types/components/FileSuggestions.d.ts.map +1 -1
- package/lib/types/components/MessageList.d.ts +3 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +13 -6
- package/lib/types/components/ModelPicker.d.ts +26 -4
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +26 -6
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +365 -57
- package/lib/types/components/RecapPanel.d.ts +25 -0
- package/lib/types/components/RecapPanel.d.ts.map +1 -0
- package/lib/types/components/RecapPanel.js +55 -0
- package/lib/types/components/ScrollbarGutter.d.ts.map +1 -1
- package/lib/types/components/ScrollbarGutter.js +55 -4
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +6 -4
- package/lib/types/components/SuggestionCard.d.ts +4 -2
- package/lib/types/components/SuggestionCard.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.js +9 -2
- package/lib/types/components/design-system/ThemeProvider.d.ts +7 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +8 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +36 -8
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +7 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +41 -9
- package/lib/types/dsh-adapter/channel.d.ts +101 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +969 -93
- package/lib/types/dsh-adapter/compat/index.d.ts +8 -6
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +8 -6
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +150 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +518 -41
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +1 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +1 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.d.ts +10 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +5 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +317 -8
- package/lib/types/dsh-adapter/presets.d.ts +18 -0
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +31 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +29 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +89 -5
- package/lib/types/dsh-adapter/questions.d.ts +19 -2
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +53 -10
- package/lib/types/dsh-adapter/recap.d.ts +49 -0
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
- package/lib/types/dsh-adapter/recap.js +121 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +314 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessionTree.js +954 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts +15 -44
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +28 -165
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/herdr.js +1 -1
- package/lib/types/i18n.d.ts +604 -176
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +206 -72
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +21 -0
- package/lib/types/migrationPrefs.d.ts +60 -0
- package/lib/types/migrationPrefs.d.ts.map +1 -0
- package/lib/types/migrationPrefs.js +97 -0
- package/lib/types/modelGroups.d.ts +72 -0
- package/lib/types/modelGroups.d.ts.map +1 -0
- package/lib/types/modelGroups.js +97 -0
- package/lib/types/modelRecents.d.ts +39 -0
- package/lib/types/modelRecents.d.ts.map +1 -0
- package/lib/types/modelRecents.js +97 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts +11 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +31 -1
- package/lib/types/oauth.d.ts +15 -0
- package/lib/types/oauth.d.ts.map +1 -0
- package/lib/types/oauth.js +14 -0
- package/lib/types/plugin-spec/registry.d.ts +1 -1
- package/lib/types/plugin-spec/registry.js +1 -1
- package/lib/types/reload.d.ts +109 -0
- package/lib/types/reload.d.ts.map +1 -0
- package/lib/types/reload.js +118 -0
- package/lib/types/screens/Chat.d.ts +3 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +588 -64
- package/lib/types/screens/SessionTree.d.ts +27 -0
- package/lib/types/screens/SessionTree.d.ts.map +1 -0
- package/lib/types/screens/SessionTree.js +555 -0
- package/lib/types/screens/StatusLine.d.ts +0 -9
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +215 -52
- package/lib/types/screens/StatusMetrics.d.ts +35 -3
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +63 -8
- package/lib/types/screens/chatOverlay.d.ts +17 -1
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +3 -1
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +22 -4
- package/lib/types/update.d.ts +159 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +496 -30
- package/lib/types/utils/debug.d.ts +1 -1
- package/lib/types/utils/debug.js +3 -3
- package/lib/types/utils/fileTarget.d.ts +46 -0
- package/lib/types/utils/fileTarget.d.ts.map +1 -0
- package/lib/types/utils/fileTarget.js +178 -0
- package/lib/types/utils/keymap.d.ts +134 -0
- package/lib/types/utils/keymap.d.ts.map +1 -0
- package/lib/types/utils/keymap.js +311 -0
- package/lib/types/utils/mentions.d.ts +25 -2
- package/lib/types/utils/mentions.d.ts.map +1 -1
- package/lib/types/utils/mentions.js +69 -10
- package/lib/types/utils/openExternal.d.ts +50 -0
- package/lib/types/utils/openExternal.d.ts.map +1 -0
- package/lib/types/utils/openExternal.js +170 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +21 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +140 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +11 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +44 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.d.ts +14 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.js +67 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.d.ts +64 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.js +170 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.d.ts +79 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.js +196 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.d.ts +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +193 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.d.ts +32 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.js +101 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.d.ts +31 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +68 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.d.ts +69 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +129 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +70 -0
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/command/LICENSE +21 -21
- package/node_modules/@dsh-std/command/README.md +26 -26
- package/node_modules/@dsh-std/command/README.zh.md +28 -28
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/command/package.json +22 -22
- package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/node_modules/@dsh-std/connection/README.md +42 -42
- package/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/node_modules/@dsh-std/connection/package.json +20 -20
- package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/core/LICENSE +21 -21
- package/node_modules/@dsh-std/core/README.md +13 -13
- package/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/core/package.json +21 -21
- package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/node_modules/@dsh-std/manifest/README.md +5 -5
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/manifest/package.json +20 -20
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/messages/LICENSE +21 -21
- package/node_modules/@dsh-std/messages/README.md +5 -5
- package/node_modules/@dsh-std/messages/README.zh.md +7 -7
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/messages/package.json +20 -20
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
- package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/node_modules/@dsh-std/presentation/README.md +27 -27
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/presentation/package.json +25 -25
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/storage/LICENSE +21 -21
- package/node_modules/@dsh-std/storage/README.md +5 -5
- package/node_modules/@dsh-std/storage/README.zh.md +7 -7
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/storage/package.json +20 -20
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
- package/package.json +17 -5
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/instruction-hint.mjs +8 -0
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Current residents:
|
|
13
13
|
* - sessionLog: tolerant title reads plus offline rename/delete helpers for
|
|
14
|
-
* persisted sessions that are not currently owned by a live Agent,
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* persisted sessions that are not currently owned by a live Agent, the
|
|
15
|
+
* resume-seam registration of vouched-for legacy event types into every
|
|
16
|
+
* reachable KNOWN_SESSION_EVENT_TYPES copy (retiring the day upstream's
|
|
17
|
+
* shared catalog adopts the types or ships a real registration API —
|
|
18
|
+
* issue #153), and the bounded read-only log reader behind the session
|
|
19
|
+
* tree (chunked I/O, lazy zstd frame walk, event + scan budgets,
|
|
20
|
+
* inherited-prefix skip).
|
|
19
21
|
* @module @deepseek-harness-tui/dsh-tui/compat
|
|
20
22
|
*/
|
|
21
|
-
export { appendSessionTitle, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readSessionTitleFromLog, sessionsRoots, } from './sessionLog.js';
|
|
23
|
+
export { appendSessionTitle, defaultMaxScanned, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readSessionEventsFromFile, readSessionEventsFromLog, readSessionTitleFromLog, type SessionLogRead, sessionsRoots, } from './sessionLog.js';
|
|
22
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,cAAc,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAA"}
|
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Current residents:
|
|
13
13
|
* - sessionLog: tolerant title reads plus offline rename/delete helpers for
|
|
14
|
-
* persisted sessions that are not currently owned by a live Agent,
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* persisted sessions that are not currently owned by a live Agent, the
|
|
15
|
+
* resume-seam registration of vouched-for legacy event types into every
|
|
16
|
+
* reachable KNOWN_SESSION_EVENT_TYPES copy (retiring the day upstream's
|
|
17
|
+
* shared catalog adopts the types or ships a real registration API —
|
|
18
|
+
* issue #153), and the bounded read-only log reader behind the session
|
|
19
|
+
* tree (chunked I/O, lazy zstd frame walk, event + scan budgets,
|
|
20
|
+
* inherited-prefix skip).
|
|
19
21
|
* @module @deepseek-harness-tui/dsh-tui/compat
|
|
20
22
|
*/
|
|
21
|
-
export { appendSessionTitle, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readSessionTitleFromLog, sessionsRoots, } from './sessionLog.js';
|
|
23
|
+
export { appendSessionTitle, defaultMaxScanned, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readSessionEventsFromFile, readSessionEventsFromLog, readSessionTitleFromLog, sessionsRoots, } from './sessionLog.js';
|
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-log compatibility helpers.
|
|
3
|
+
*
|
|
4
|
+
* Title lookup tolerates event types unknown to the current harness. Offline
|
|
5
|
+
* rename and delete support the `/resume` picker when no live Agent owns the
|
|
6
|
+
* selected persisted session. The resume seam registers vouched-for legacy
|
|
7
|
+
* event types into every reachable KNOWN_SESSION_EVENT_TYPES copy so the
|
|
8
|
+
* strict read path stops rejecting whole sessions over them (issue #153).
|
|
9
|
+
*
|
|
10
|
+
* Registration background: plugins like dsh-working-activity (< the publish
|
|
11
|
+
* cut) appended `activity/status` through `session.append`, but rc.6's
|
|
12
|
+
* append exposes no `ignorable` flag and the type is absent from
|
|
13
|
+
* KNOWN_SESSION_EVENT_TYPES — so resume's seed validation rejects the WHOLE
|
|
14
|
+
* session ("unknown to this harness and not marked ignorable"). Upstream's
|
|
15
|
+
* catalog header defers a registration surface "until such a consumer
|
|
16
|
+
* exists"; the working-activity plugin became that consumer at #119 and
|
|
17
|
+
* registers its type at load. Logs written BEFORE that cut, resumed in a
|
|
18
|
+
* process where the plugin's registration never ran (plugin unmounted, or
|
|
19
|
+
* a bare cordis.yml), still hit the rejection — this module is the consumer
|
|
20
|
+
* for exactly that residue.
|
|
21
|
+
*
|
|
22
|
+
* Why registration and NOT rewriting the log to mark events `ignorable`
|
|
23
|
+
* (the #107 approach, restored then replaced after review): the store is
|
|
24
|
+
* shared with dsh web (#24) and possibly a second TUI instance (#153), and
|
|
25
|
+
* a whole-file tmp+rename swap (a) loses frames an already-open appender
|
|
26
|
+
* lands on the replaced inode, (b) drops the backend's 0600 artifact mode,
|
|
27
|
+
* (c) re-encodes frames without the writer's checksum flag, and (d) dies on
|
|
28
|
+
* torn tails the backend itself can recover. Registration touches nothing
|
|
29
|
+
* on disk and degrades to exactly the pre-patch behavior when no copy
|
|
30
|
+
* resolves.
|
|
31
|
+
*
|
|
32
|
+
* Whitelist discipline: ONLY `activity/status` — the type the plugin
|
|
33
|
+
* provably wrote as ephemeral UI frames. Anything else unknown stays
|
|
34
|
+
* unknown: upstream's fail-closed ("likely written by a newer harness") is
|
|
35
|
+
* a feature — silently skipping a REQUIRED future event would reconstruct
|
|
36
|
+
* a wrong session. Retires the day upstream's shared catalog adopts the
|
|
37
|
+
* type or ships a real registration API (the add() calls become no-ops).
|
|
38
|
+
*
|
|
39
|
+
* The second half of this module is the bounded, tolerant, read-only log
|
|
40
|
+
* reader behind the session tree (channel.buildSessionTree): 64 KiB chunked
|
|
41
|
+
* I/O, lazy per-frame zstd decode over an RFC 8878 structural frame walk (a
|
|
42
|
+
* torn final frame — crash mid-flush — is dropped as uncommitted, never
|
|
43
|
+
* fatal), packed-row expansion, an event budget plus a scanned-envelope
|
|
44
|
+
* budget so ignorable-heavy logs cannot multiply the cost of opening the
|
|
45
|
+
* panel, and an inherited-prefix skip so a fork's event budget pays only for
|
|
46
|
+
* its OWN events. It never writes; both stock encodings are read.
|
|
47
|
+
*
|
|
48
|
+
* @module @deepseek-harness-tui/dsh-tui/compat/sessionLog
|
|
49
|
+
*/
|
|
50
|
+
import type { SessionEvent } from '@deepseek-ai/dsh-session';
|
|
1
51
|
/**
|
|
2
52
|
* Legacy third-party session-event types the TUI vouches for as ephemeral
|
|
3
53
|
* UI frames — safe for the strict read path to accept and skip. Exported
|
|
@@ -22,6 +72,106 @@ export declare function sessionsRoots(): string[];
|
|
|
22
72
|
* @returns Absolute path of session.jsonl.zstd, or undefined when absent.
|
|
23
73
|
*/
|
|
24
74
|
export declare function findSessionLogFile(sessionId: string): string | undefined;
|
|
75
|
+
/** Outcome of reading an EXISTING log through the bounded reader. */
|
|
76
|
+
export interface SessionLogRead {
|
|
77
|
+
readonly events: readonly SessionEvent[];
|
|
78
|
+
/** False when the read stopped early (event/scan budget) — a plain
|
|
79
|
+
* truncation; the collected prefix is fully usable. */
|
|
80
|
+
readonly complete: boolean;
|
|
81
|
+
/** Envelopes inspected (collected or skipped) — the real scan cost. */
|
|
82
|
+
readonly scanned: number;
|
|
83
|
+
/** True when an EXISTING log could not be read: corruption, a torn first
|
|
84
|
+
* frame, an over-cap frame, a decode bomb. Distinct from ABSENT (which
|
|
85
|
+
* reports `undefined`): a failed log must degrade to a structure-only
|
|
86
|
+
* placeholder and must NOT be retried through an unbounded strict read —
|
|
87
|
+
* that fallback would defeat every cap this reader exists to enforce.
|
|
88
|
+
* `events` keeps the partial prefix collected before the failure, for
|
|
89
|
+
* diagnostics; callers building trees ignore it. */
|
|
90
|
+
readonly failed?: boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Default scan budget derived from the event budget: 4× headroom over the
|
|
94
|
+
* collectible events (legitimate logs interleave a modest share of skipped
|
|
95
|
+
* rows — headers, repair-marked ignorable frames), plus a floor so even a
|
|
96
|
+
* tiny `maxEvents` tolerates a noisy prefix. Unbounded reads stay unbounded.
|
|
97
|
+
*/
|
|
98
|
+
export declare function defaultMaxScanned(maxEvents: number): number;
|
|
99
|
+
/**
|
|
100
|
+
* File-level sibling of {@link readSessionEventsFromLog} for paths resolved
|
|
101
|
+
* by the backend itself (`persistence.locate`) — covers a custom-configured
|
|
102
|
+
* root that none of the stock sessionsRoots() candidates describes.
|
|
103
|
+
* @param path - Absolute artifact path (physical or logical name).
|
|
104
|
+
* @param maxEvents - Stop before collecting more than this many events.
|
|
105
|
+
* @param maxScanned - Stop after INSPECTING this many envelopes, collected
|
|
106
|
+
* or skipped (default: {@link defaultMaxScanned} of maxEvents).
|
|
107
|
+
* @param skipBelowSeq - Inherited-prefix cutoff (session-tree dedup):
|
|
108
|
+
* seq'd events below it are skipped without spending the event budget —
|
|
109
|
+
* they still count against maxScanned. `session/title` events are always
|
|
110
|
+
* collected (branch-head labels need them; they never become entries).
|
|
111
|
+
* @returns The read outcome, or undefined ONLY when nothing materialized at
|
|
112
|
+
* the path — an existing-but-undecodable log reports `failed: true`.
|
|
113
|
+
*/
|
|
114
|
+
export declare function readSessionEventsFromFile(path: string, maxEvents?: number, maxScanned?: number, skipBelowSeq?: number): SessionLogRead | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Read a session's events from its persisted log — tolerant, read-only, and
|
|
117
|
+
* cost-bounded. Built for the session tree (buildSessionTree), whose browse
|
|
118
|
+
* must satisfy three constraints the strict backend read cannot:
|
|
119
|
+
*
|
|
120
|
+
* - READ-ONLY: `persistence.inspect` rejects logs carrying third-party
|
|
121
|
+
* event types (working-activity's `activity/status`), and the resume
|
|
122
|
+
* seam's answer (in-process type registration, issue #153) must not be
|
|
123
|
+
* inverted here: opening a picker never rewrites a history log. This
|
|
124
|
+
* reader never writes; unknown types are simply passed through
|
|
125
|
+
* (extractEntries skips what it does not know).
|
|
126
|
+
* - TOLERANT: envelope-shape or decode anomalies degrade to
|
|
127
|
+
* `failed: true` (a structure-only tree node) instead of rejecting the
|
|
128
|
+
* whole log — and a torn FINAL zstd frame (crash mid-flush) is dropped
|
|
129
|
+
* as uncommitted, keeping the frames before it readable.
|
|
130
|
+
* - BOUNDED: the file is read in 64 KiB slices and frames decode lazily,
|
|
131
|
+
* stopping the moment `maxEvents` events have been collected — a
|
|
132
|
+
* 200k-event log costs budget × per-event work, not a whole-file read +
|
|
133
|
+
* decompress + parse. `complete: false` marks the early stop (the caller
|
|
134
|
+
* surfaces it as `truncated`). One honest exception: a single zstd FRAME
|
|
135
|
+
* is the atomic unit (see logRecords) — the budget bounds work ACROSS
|
|
136
|
+
* frames, never inside one giant flush.
|
|
137
|
+
*
|
|
138
|
+
* Packed rows are expanded with the backend's own `decodeStorageRecord`:
|
|
139
|
+
* the packChunks writer folds each run of same-block delta chunks into ONE
|
|
140
|
+
* `text-chunks`/`reasoning-chunks`/`tool-call-chunks` line (the default —
|
|
141
|
+
* the finding that motivated this reader's third revision), so a line is a
|
|
142
|
+
* storage record, not an event, and seq-less rows must not be dropped as if
|
|
143
|
+
* they were headers. The budget counts EXPANDED events, matching the tree's
|
|
144
|
+
* per-event cost. Malformed packed rows throw inside decodeStorageRecord —
|
|
145
|
+
* corrupt storage degrades to `undefined`, never to silently dropped runs.
|
|
146
|
+
*
|
|
147
|
+
* Torn-tail semantics mirror the backend's own reader: a plain log's
|
|
148
|
+
* unterminated final line (crash mid-append) is uncommitted data and
|
|
149
|
+
* ignored, while an unterminated record INSIDE a complete zstd frame is
|
|
150
|
+
* corruption and fails the read.
|
|
151
|
+
*
|
|
152
|
+
* Envelopes with `ignorable: true` are skipped (the read path's own skip
|
|
153
|
+
* signal) and the seq-less header row is metadata, not an event. Skipped
|
|
154
|
+
* envelopes still count against the SCAN budget (maxScanned): skipping is
|
|
155
|
+
* not free — the I/O, decompress and JSON.parse for them have already been
|
|
156
|
+
* paid — so an ignorable-heavy log cannot bypass the cost bound by keeping
|
|
157
|
+
* its collectible count low. Never throws; returns undefined ONLY when the
|
|
158
|
+
* log is absent — an existing-but-undecodable log returns `failed: true`
|
|
159
|
+
* so the caller degrades to a placeholder instead of escalating to an
|
|
160
|
+
* unbounded strict re-read.
|
|
161
|
+
* @param sessionId - Session whose log should be read.
|
|
162
|
+
* @param maxEvents - Stop before collecting more than this many events
|
|
163
|
+
* (default: unbounded). 0 collects nothing and reports complete: false
|
|
164
|
+
* whenever the log holds any collectible event.
|
|
165
|
+
* @param maxScanned - Stop after INSPECTING this many envelopes, collected
|
|
166
|
+
* or skipped (default: 4× maxEvents + 4096; unbounded when maxEvents is).
|
|
167
|
+
* @param skipBelowSeq - Inherited-prefix cutoff (session-tree dedup):
|
|
168
|
+
* seq'd events below it are skipped without spending the event budget —
|
|
169
|
+
* they still count against maxScanned. `session/title` events are always
|
|
170
|
+
* collected (branch-head labels need them; they never become entries).
|
|
171
|
+
* @returns The read outcome — events, completeness, real scan cost, and a
|
|
172
|
+
* `failed` marker for safety-cap/corruption bailouts.
|
|
173
|
+
*/
|
|
174
|
+
export declare function readSessionEventsFromLog(sessionId: string, maxEvents?: number, maxScanned?: number, skipBelowSeq?: number): SessionLogRead | undefined;
|
|
25
175
|
/**
|
|
26
176
|
* Register every {@link LEGACY_SESSION_EVENT_TYPES} type as known in EVERY
|
|
27
177
|
* reachable KNOWN_SESSION_EVENT_TYPES copy, ahead of the strict read path
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionLog.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/sessionLog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sessionLog.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/sessionLog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAiB5D;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAAwB,CAAA;AAKhF;;;;;;;GAOG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CASxC;AAaD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAexE;AAsXD,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAA;IACxC;4DACwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB;;;;;;yDAMqD;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B;AA+DD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,MAAiC,EAC5C,UAAU,GAAE,MAAqC,EACjD,YAAY,GAAE,MAAU,GACvB,cAAc,GAAG,SAAS,CAI5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAiC,EAC5C,UAAU,GAAE,MAAqC,EACjD,YAAY,GAAE,MAAU,GACvB,cAAc,GAAG,SAAS,CAI5B;AA+BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAkCpD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAChB;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAyBzD;AAyBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,CAwB/F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAwB7E"}
|