@deepseek-harness-tui/dsh-tui 0.10.0 → 0.10.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 +5 -2
- package/bin/dsh-tui.js +99 -33
- package/cordis.patch.yml +25 -5
- package/lib/types/adapter/channel/actions.d.ts +17 -0
- package/lib/types/adapter/channel/actions.d.ts.map +1 -0
- package/lib/types/adapter/channel/actions.js +28 -0
- package/lib/types/adapter/channel/consumer.d.ts +34 -0
- package/lib/types/adapter/channel/consumer.d.ts.map +1 -0
- package/lib/types/adapter/channel/consumer.js +87 -0
- package/lib/types/adapter/channel/features.d.ts +12 -0
- package/lib/types/adapter/channel/features.d.ts.map +1 -0
- package/lib/types/adapter/channel/features.js +41 -0
- package/lib/types/adapter/channel/host-registry.d.ts +40 -0
- package/lib/types/adapter/channel/host-registry.d.ts.map +1 -0
- package/lib/types/adapter/channel/host-registry.js +120 -0
- package/lib/types/adapter/channel/index.d.ts +22 -0
- package/lib/types/adapter/channel/index.d.ts.map +1 -0
- package/lib/types/adapter/channel/index.js +21 -0
- package/lib/types/adapter/channel/internal-token.d.ts +12 -0
- package/lib/types/adapter/channel/internal-token.d.ts.map +1 -0
- package/lib/types/adapter/channel/internal-token.js +11 -0
- package/lib/types/adapter/channel/plugins.d.ts +17 -0
- package/lib/types/adapter/channel/plugins.d.ts.map +1 -0
- package/lib/types/adapter/channel/plugins.js +47 -0
- package/lib/types/adapter/channel/projection.d.ts +15 -0
- package/lib/types/adapter/channel/projection.d.ts.map +1 -0
- package/lib/types/adapter/channel/projection.js +59 -0
- package/lib/types/adapter/channel/provider.d.ts +52 -0
- package/lib/types/adapter/channel/provider.d.ts.map +1 -0
- package/lib/types/adapter/channel/provider.js +231 -0
- package/lib/types/adapter/channel/read-view.d.ts +4 -0
- package/lib/types/adapter/channel/read-view.d.ts.map +1 -0
- package/lib/types/adapter/channel/read-view.js +132 -0
- package/lib/types/adapter/channel/session-projection.d.ts +56 -0
- package/lib/types/adapter/channel/session-projection.d.ts.map +1 -0
- package/lib/types/adapter/channel/session-projection.js +247 -0
- package/lib/types/adapter/channel/state.d.ts +11 -0
- package/lib/types/adapter/channel/state.d.ts.map +1 -0
- package/lib/types/adapter/channel/state.js +55 -0
- package/lib/types/adapter/channel/transcript.d.ts +15 -0
- package/lib/types/adapter/channel/transcript.d.ts.map +1 -0
- package/lib/types/adapter/channel/transcript.js +22 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +106 -0
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -0
- package/lib/types/adapter/channel/ui-policy.js +166 -0
- package/lib/types/adapter/channel/ui.d.ts +16 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -0
- package/lib/types/adapter/channel/ui.js +168 -0
- package/lib/types/adapter/index.d.ts +20 -0
- package/lib/types/adapter/index.d.ts.map +1 -0
- package/lib/types/adapter/index.js +19 -0
- package/lib/types/adapter/kernel/contract-catalog.d.ts +12 -0
- package/lib/types/adapter/kernel/contract-catalog.d.ts.map +1 -0
- package/lib/types/adapter/kernel/contract-catalog.js +11 -0
- package/lib/types/adapter/kernel/diagnostics.d.ts +18 -0
- package/lib/types/adapter/kernel/diagnostics.d.ts.map +1 -0
- package/lib/types/adapter/kernel/diagnostics.js +16 -0
- package/lib/types/adapter/kernel/driver-types.d.ts +16 -0
- package/lib/types/adapter/kernel/driver-types.d.ts.map +1 -0
- package/lib/types/adapter/kernel/driver-types.js +8 -0
- package/lib/types/adapter/kernel/host-facade.d.ts +65 -0
- package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -0
- package/lib/types/adapter/kernel/host-facade.js +215 -0
- package/lib/types/adapter/kernel/host-probe-access.d.ts +71 -0
- package/lib/types/adapter/kernel/host-probe-access.d.ts.map +1 -0
- package/lib/types/adapter/kernel/host-probe-access.js +121 -0
- package/lib/types/adapter/kernel/index.d.ts +20 -0
- package/lib/types/adapter/kernel/index.d.ts.map +1 -0
- package/lib/types/adapter/kernel/index.js +19 -0
- package/lib/types/adapter/kernel/kernel-runtime.d.ts +138 -0
- package/lib/types/adapter/kernel/kernel-runtime.d.ts.map +1 -0
- package/lib/types/adapter/kernel/kernel-runtime.js +572 -0
- package/lib/types/adapter/kernel/ledger.d.ts +55 -0
- package/lib/types/adapter/kernel/ledger.d.ts.map +1 -0
- package/lib/types/adapter/kernel/ledger.js +33 -0
- package/lib/types/adapter/kernel/legacy-facade.d.ts +22 -0
- package/lib/types/adapter/kernel/legacy-facade.d.ts.map +1 -0
- package/lib/types/adapter/kernel/legacy-facade.js +34 -0
- package/lib/types/adapter/kernel/lifecycle.d.ts +38 -0
- package/lib/types/adapter/kernel/lifecycle.d.ts.map +1 -0
- package/lib/types/adapter/kernel/lifecycle.js +53 -0
- package/lib/types/adapter/kernel/replay-isolation.d.ts +27 -0
- package/lib/types/adapter/kernel/replay-isolation.d.ts.map +1 -0
- package/lib/types/adapter/kernel/replay-isolation.js +45 -0
- package/lib/types/adapter/kernel/replay.d.ts +132 -0
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -0
- package/lib/types/adapter/kernel/replay.js +425 -0
- package/lib/types/adapter/kernel/runtime-context.d.ts +15 -0
- package/lib/types/adapter/kernel/runtime-context.d.ts.map +1 -0
- package/lib/types/adapter/kernel/runtime-context.js +24 -0
- package/lib/types/adapter/kernel/runtime.d.ts +70 -0
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -0
- package/lib/types/adapter/kernel/runtime.js +325 -0
- package/lib/types/adapter/kernel/slices/channel.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/channel.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/channel.js +8 -0
- package/lib/types/adapter/kernel/slices/decisions.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/decisions.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/decisions.js +10 -0
- package/lib/types/adapter/kernel/slices/extensions.d.ts +8 -0
- package/lib/types/adapter/kernel/slices/extensions.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/extensions.js +43 -0
- package/lib/types/adapter/kernel/slices/index.d.ts +19 -0
- package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/index.js +36 -0
- package/lib/types/adapter/kernel/slices/presentation.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/presentation.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/presentation.js +14 -0
- package/lib/types/adapter/kernel/slices/scenes.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/scenes.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/scenes.js +14 -0
- package/lib/types/adapter/kernel/slices/settings.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/settings.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/settings.js +12 -0
- package/lib/types/adapter/kernel/slices/types.d.ts +20 -0
- package/lib/types/adapter/kernel/slices/types.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/types.js +12 -0
- package/lib/types/adapter/kernel/slices/workspace.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/workspace.js +15 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +90 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-catalog.js +2 -0
- package/lib/types/adapter/ports/channel-display.d.ts +90 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-display.js +2 -0
- package/lib/types/adapter/ports/channel-session.d.ts +229 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-session.js +2 -0
- package/lib/types/adapter/ports/channel-settings.d.ts +273 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-settings.js +1 -0
- package/lib/types/adapter/ports/channel-ui.d.ts +569 -0
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-ui.js +1 -0
- package/lib/types/adapter/ports/channel-view.d.ts +609 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-view.js +2 -0
- package/lib/types/adapter/ports/channel-workspace.d.ts +45 -0
- package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-workspace.js +2 -0
- package/lib/types/adapter/ports/channel.d.ts +145 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel.js +22 -0
- package/lib/types/adapter/ports/decisions.d.ts +18 -0
- package/lib/types/adapter/ports/decisions.d.ts.map +1 -0
- package/lib/types/adapter/ports/decisions.js +9 -0
- package/lib/types/adapter/ports/descriptor.d.ts +25 -0
- package/lib/types/adapter/ports/descriptor.d.ts.map +1 -0
- package/lib/types/adapter/ports/descriptor.js +11 -0
- package/lib/types/adapter/ports/extensions.d.ts +86 -0
- package/lib/types/adapter/ports/extensions.d.ts.map +1 -0
- package/lib/types/adapter/ports/extensions.js +9 -0
- package/lib/types/adapter/ports/index.d.ts +23 -0
- package/lib/types/adapter/ports/index.d.ts.map +1 -0
- package/lib/types/adapter/ports/index.js +14 -0
- package/lib/types/adapter/ports/owner.d.ts +19 -0
- package/lib/types/adapter/ports/owner.d.ts.map +1 -0
- package/lib/types/adapter/ports/owner.js +9 -0
- package/lib/types/adapter/ports/presentation.d.ts +81 -0
- package/lib/types/adapter/ports/presentation.d.ts.map +1 -0
- package/lib/types/adapter/ports/presentation.js +10 -0
- package/lib/types/adapter/ports/scenes.d.ts +24 -0
- package/lib/types/adapter/ports/scenes.d.ts.map +1 -0
- package/lib/types/adapter/ports/scenes.js +8 -0
- package/lib/types/adapter/ports/settings.d.ts +44 -0
- package/lib/types/adapter/ports/settings.d.ts.map +1 -0
- package/lib/types/adapter/ports/settings.js +9 -0
- package/lib/types/adapter/ports/workspace.d.ts +60 -0
- package/lib/types/adapter/ports/workspace.d.ts.map +1 -0
- package/lib/types/adapter/ports/workspace.js +8 -0
- package/lib/types/adapter/spec/index.d.ts +11 -0
- package/lib/types/adapter/spec/index.d.ts.map +1 -0
- package/lib/types/adapter/spec/index.js +10 -0
- package/lib/types/adapter/spec/profile.d.ts +10 -0
- package/lib/types/adapter/spec/profile.d.ts.map +1 -0
- package/lib/types/adapter/spec/profile.js +9 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts +60 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -0
- package/lib/types/adapter/spec/protocol-constants.js +129 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts +18 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -0
- package/lib/types/adapter/spec/tui-contributions.js +19 -0
- package/lib/types/adapter/standard/admission.d.ts +11 -0
- package/lib/types/adapter/standard/admission.d.ts.map +1 -0
- package/lib/types/adapter/standard/admission.js +10 -0
- package/lib/types/adapter/standard/descriptor.d.ts +74 -0
- package/lib/types/adapter/standard/descriptor.d.ts.map +1 -0
- package/lib/types/adapter/standard/descriptor.js +356 -0
- package/lib/types/{dsh-adapter → adapter/standard}/grants.d.ts +8 -3
- package/lib/types/adapter/standard/grants.d.ts.map +1 -0
- package/lib/types/{dsh-adapter → adapter/standard}/grants.js +14 -8
- package/lib/types/adapter/standard/index.d.ts +25 -0
- package/lib/types/adapter/standard/index.d.ts.map +1 -0
- package/lib/types/adapter/standard/index.js +24 -0
- package/lib/types/adapter/standard/negotiate.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/permission-scope.d.ts +3 -8
- package/lib/types/adapter/standard/permission-scope.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/permission-scope.js +4 -26
- package/lib/types/adapter/standard/protocols.d.ts +12 -0
- package/lib/types/adapter/standard/protocols.d.ts.map +1 -0
- package/lib/types/adapter/standard/protocols.js +11 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/registry.js +3 -15
- package/lib/types/adapter/standard/schema-check.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/schema-check.js +4 -2
- package/lib/types/adapter/standard/tui-extension.d.ts +25 -0
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -0
- package/lib/types/adapter/standard/tui-extension.js +45 -0
- package/lib/types/{plugin-spec → adapter/standard}/types.d.ts +3 -9
- package/lib/types/adapter/standard/types.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/validate.d.ts +3 -3
- package/lib/types/adapter/standard/validate.d.ts.map +1 -0
- package/lib/types/{plugin-spec → adapter/standard}/validate.js +14 -13
- package/lib/types/adapter/upstream/channel-driver.d.ts +22 -0
- package/lib/types/adapter/upstream/channel-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/channel-driver.js +424 -0
- package/lib/types/adapter/upstream/decisions-driver.d.ts +15 -0
- package/lib/types/adapter/upstream/decisions-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/decisions-driver.js +141 -0
- package/lib/types/adapter/upstream/detection.d.ts +26 -0
- package/lib/types/adapter/upstream/detection.d.ts.map +1 -0
- package/lib/types/adapter/upstream/detection.js +9 -0
- package/lib/types/adapter/upstream/driver.d.ts +50 -0
- package/lib/types/adapter/upstream/driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/driver.js +8 -0
- package/lib/types/adapter/upstream/extensions-driver.d.ts +24 -0
- package/lib/types/adapter/upstream/extensions-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/extensions-driver.js +697 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts +45 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/host-descriptor-driver.js +606 -0
- package/lib/types/adapter/upstream/index.d.ts +18 -0
- package/lib/types/adapter/upstream/index.d.ts.map +1 -0
- package/lib/types/adapter/upstream/index.js +15 -0
- package/lib/types/adapter/upstream/presentation-driver.d.ts +17 -0
- package/lib/types/adapter/upstream/presentation-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/presentation-driver.js +129 -0
- package/lib/types/adapter/upstream/scenes-driver.d.ts +18 -0
- package/lib/types/adapter/upstream/scenes-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/scenes-driver.js +170 -0
- package/lib/types/adapter/upstream/settings-driver.d.ts +20 -0
- package/lib/types/adapter/upstream/settings-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/settings-driver.js +173 -0
- package/lib/types/adapter/upstream/workspace-driver.d.ts +19 -0
- package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/workspace-driver.js +190 -0
- package/lib/types/api.d.ts +1 -1
- package/lib/types/api.d.ts.map +1 -1
- package/lib/types/commands.d.ts +2 -41
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +1 -1
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +8 -1
- package/lib/types/components/GoalTodoPanel.d.ts +2 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +7 -5
- package/lib/types/components/Markdown.d.ts +2 -2
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +28 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +46 -17
- package/lib/types/components/ModelPicker.d.ts +1 -1
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +8 -4
- package/lib/types/components/OverlayAbove.d.ts +22 -1
- package/lib/types/components/OverlayAbove.d.ts.map +1 -1
- package/lib/types/components/OverlayAbove.js +74 -5
- package/lib/types/components/PromptInput.d.ts +2 -1
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.d.ts.map +1 -1
- package/lib/types/components/RewindPicker.js +14 -6
- package/lib/types/components/SkillsPicker.d.ts.map +1 -1
- package/lib/types/components/SkillsPicker.js +6 -4
- package/lib/types/components/Spinner/spinnerMode.d.ts +1 -5
- package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +61 -9
- package/lib/types/components/design-system/ThemedBox.d.ts +4 -2
- package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedBox.js +2 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +69 -25
- package/lib/types/components/overlayBudget.d.ts +39 -0
- package/lib/types/components/overlayBudget.d.ts.map +1 -0
- package/lib/types/components/overlayBudget.js +43 -0
- package/lib/types/deepseekBalance.d.ts +2 -36
- package/lib/types/deepseekBalance.d.ts.map +1 -1
- package/lib/types/deepseekBalance.js +0 -14
- package/lib/types/deepseekPricing.d.ts +2 -1
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +8 -1
- package/lib/types/dsh-adapter/approvals.d.ts +11 -1
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +32 -12
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/action-readiness.js +83 -0
- package/lib/types/dsh-adapter/channel/activity.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/activity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/activity.js +113 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +64 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +295 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts +41 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/background-action.js +86 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +65 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding-events.js +169 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts +41 -0
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/binding.js +227 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +29 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.js +94 -0
- package/lib/types/dsh-adapter/channel/commands.d.ts +8 -0
- package/lib/types/dsh-adapter/channel/commands.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/commands.js +9 -0
- package/lib/types/dsh-adapter/channel/compaction.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/compaction.js +116 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +57 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/composer-images.js +217 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts +15 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/composer-mentions.js +200 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +26 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +30 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/decisions.js +90 -0
- package/lib/types/dsh-adapter/channel/emitter.d.ts +10 -0
- package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/emitter.js +71 -0
- package/lib/types/dsh-adapter/channel/external-commands.d.ts +31 -0
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/external-commands.js +187 -0
- package/lib/types/dsh-adapter/channel/file-actions.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/file-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/file-actions.js +45 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/input-actions.js +135 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +37 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/input-delivery.js +305 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +28 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/job-projection.js +150 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/lifetime-resources.js +33 -0
- package/lib/types/dsh-adapter/channel/loaded-context.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/loaded-context.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/loaded-context.js +62 -0
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +70 -0
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-actions.js +108 -0
- package/lib/types/dsh-adapter/channel/mentions.d.ts +29 -0
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mentions.js +235 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +30 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-actions.js +247 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +35 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +199 -0
- package/lib/types/dsh-adapter/channel/mode-permission.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/mode-permission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-permission.js +240 -0
- package/lib/types/dsh-adapter/channel/mode-roster.d.ts +51 -0
- package/lib/types/dsh-adapter/channel/mode-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/mode-roster.js +119 -0
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-actions.js +275 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-switch.js +98 -0
- package/lib/types/dsh-adapter/channel/notifications.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/notifications.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/notifications.js +24 -0
- package/lib/types/dsh-adapter/channel/owner.d.ts +18 -0
- package/lib/types/dsh-adapter/channel/owner.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/owner.js +73 -0
- package/lib/types/dsh-adapter/channel/paths.d.ts +31 -0
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/paths.js +147 -0
- package/lib/types/dsh-adapter/channel/permissions.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/permissions.js +187 -0
- package/lib/types/dsh-adapter/channel/preferences.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/preferences.js +103 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/projection-helpers.js +63 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/projection.js +1021 -0
- package/lib/types/dsh-adapter/channel/reports.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/reports.js +171 -0
- package/lib/types/dsh-adapter/channel/session-actions.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/session-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-actions.js +29 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-adoption.js +35 -0
- package/lib/types/dsh-adapter/channel/session-fork.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-fork.js +85 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +32 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +62 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-metadata.js +209 -0
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +11 -0
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-reset.js +44 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +56 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-resume.js +240 -0
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-rewind.js +128 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +19 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +138 -0
- package/lib/types/dsh-adapter/channel/session-tree.d.ts +10 -0
- package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-tree.js +503 -0
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/settings-host.js +256 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +33 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.js +215 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/state.js +31 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +47 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-projection.js +140 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +73 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/transcript.js +312 -0
- package/lib/types/dsh-adapter/channel/types.d.ts +162 -0
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/types.js +1 -0
- package/lib/types/dsh-adapter/channel/usage.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/usage.js +48 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.js +56 -0
- package/lib/types/dsh-adapter/channel-facade-actions.d.ts +25 -0
- package/lib/types/dsh-adapter/channel-facade-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-facade-actions.js +55 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.d.ts +6 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-scene-outlet.js +13 -0
- package/lib/types/dsh-adapter/channel-ui.d.ts +9 -0
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel-ui.js +128 -0
- package/lib/types/dsh-adapter/channel.d.ts +9 -1525
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +753 -8145
- package/lib/types/dsh-adapter/command-trees.d.ts +1 -0
- package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -1
- package/lib/types/dsh-adapter/command-trees.js +20 -1
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +8 -4
- package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/liveSession.js +28 -3
- package/lib/types/dsh-adapter/compat/persistence.d.ts +21 -0
- package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/persistence.js +17 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +50 -11
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +325 -36
- package/lib/types/dsh-adapter/component-identity.d.ts +1 -1
- package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -1
- package/lib/types/dsh-adapter/component-identity.js +1 -1
- package/lib/types/dsh-adapter/contract.d.ts +11 -9
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +19 -12
- package/lib/types/dsh-adapter/decision-guard.d.ts +56 -12
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/decision-guard.js +134 -22
- package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/dialogs.js +13 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts +5 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +53 -15
- package/lib/types/dsh-adapter/extension-events.d.ts +2 -9
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extension-events.js +0 -20
- package/lib/types/dsh-adapter/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extensions.js +3 -2
- package/lib/types/dsh-adapter/host-grants.d.ts +23 -0
- package/lib/types/dsh-adapter/host-grants.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-grants.js +45 -0
- package/lib/types/dsh-adapter/jobs.d.ts +2 -46
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +0 -25
- package/lib/types/dsh-adapter/message-observer.d.ts +15 -2
- package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -1
- package/lib/types/dsh-adapter/message-observer.js +157 -28
- package/lib/types/dsh-adapter/plugin-host.d.ts +80 -11
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +438 -41
- package/lib/types/dsh-adapter/plugin-storage.d.ts +11 -1
- package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-storage.js +150 -11
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +75 -34
- package/lib/types/dsh-adapter/plugins-info.d.ts +2 -2
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +11 -6
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +3 -2
- package/lib/types/dsh-adapter/providerWizard.d.ts +2 -159
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.d.ts +8 -0
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +18 -0
- package/lib/types/dsh-adapter/recap.d.ts +1 -9
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
- package/lib/types/dsh-adapter/recap.js +0 -14
- package/lib/types/dsh-adapter/renderers.d.ts +1 -0
- package/lib/types/dsh-adapter/renderers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/renderers.js +26 -1
- package/lib/types/dsh-adapter/scenes.d.ts +3 -1
- package/lib/types/dsh-adapter/scenes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/scenes.js +31 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts +14 -95
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessionTree.js +51 -36
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +40 -19
- package/lib/types/dsh-adapter/sessions/frames.js +2 -0
- package/lib/types/dsh-adapter/sessions/index.d.ts +1 -1
- package/lib/types/dsh-adapter/sessions/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/index.js +1 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts +23 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +28 -17
- package/lib/types/dsh-adapter/sessions/store.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +12 -11
- package/lib/types/dsh-adapter/sessions/types.d.ts +4 -128
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/types.js +0 -13
- package/lib/types/dsh-adapter/settings-sections.d.ts +4 -95
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +50 -13
- package/lib/types/dsh-adapter/settingsEditor.d.ts +2 -36
- package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settingsEditor.js +0 -18
- package/lib/types/dsh-adapter/shortcuts.d.ts +5 -0
- package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +49 -0
- package/lib/types/dsh-adapter/status.d.ts +5 -0
- package/lib/types/dsh-adapter/status.d.ts.map +1 -1
- package/lib/types/dsh-adapter/status.js +29 -0
- package/lib/types/dsh-adapter/subagents.d.ts +9 -49
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +92 -1
- package/lib/types/dsh-adapter/themes.d.ts +1 -0
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/themes.js +29 -0
- package/lib/types/dsh-adapter/toast.d.ts +13 -0
- package/lib/types/dsh-adapter/toast.d.ts.map +1 -1
- package/lib/types/dsh-adapter/toast.js +31 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +2 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/aggregate.js +2 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +37 -18
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +43 -5
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +2 -2
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +31 -13
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +71 -14
- package/lib/types/dsh-adapter/trajectory/types.d.ts +1 -1
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/transcript-images.d.ts +2 -19
- package/lib/types/dsh-adapter/transcript-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.d.ts +2 -49
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.js +23 -3
- package/lib/types/i18n.d.ts +19 -7
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +8 -3
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +30 -33
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +32 -64
- package/lib/types/ink/get-max-width.d.ts +7 -15
- package/lib/types/ink/get-max-width.d.ts.map +1 -1
- package/lib/types/ink/get-max-width.js +7 -20
- package/lib/types/ink/ink.d.ts +1 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +22 -3
- package/lib/types/ink/layout/node.d.ts +2 -0
- package/lib/types/ink/layout/node.d.ts.map +1 -1
- package/lib/types/ink/layout/yoga.d.ts +1 -0
- package/lib/types/ink/layout/yoga.d.ts.map +1 -1
- package/lib/types/ink/layout/yoga.js +3 -0
- package/lib/types/ink/node-cache.d.ts +11 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/node-cache.js +3 -0
- package/lib/types/ink/output.d.ts +6 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +55 -65
- package/lib/types/ink/render-node-to-output.d.ts +24 -1
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +195 -71
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +14 -2
- package/lib/types/ink/styles.d.ts +12 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/tabstops.d.ts +3 -2
- package/lib/types/ink/tabstops.d.ts.map +1 -1
- package/lib/types/ink/tabstops.js +5 -4
- package/lib/types/ink/wrap-text.js +2 -2
- package/lib/types/modelGroups.d.ts +1 -1
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelRoute.js +1 -1
- package/lib/types/native-ts/yoga-layout/index.d.ts +8 -3
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +23 -8
- package/lib/types/plugin-host.d.ts +3 -4
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/plugin-host.js +8 -6
- package/lib/types/screens/AgentView.d.ts +1 -1
- package/lib/types/screens/AgentView.d.ts.map +1 -1
- package/lib/types/screens/Chat.d.ts +3 -2
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +91 -17
- package/lib/types/screens/SessionBrowser.d.ts +1 -1
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionTree.d.ts +1 -1
- package/lib/types/screens/SessionTree.d.ts.map +1 -1
- package/lib/types/screens/Settings.d.ts +1 -1
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.d.ts +1 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +40 -1
- package/lib/types/screens/TrajectoryScene.d.ts +1 -1
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/sessionModes.d.ts +11 -15
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +11 -0
- package/lib/types/tuiDisplayPrefs.d.ts +2 -68
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +5 -1
- package/lib/types/utils/credentials.d.ts +13 -0
- package/lib/types/utils/credentials.d.ts.map +1 -0
- package/lib/types/utils/credentials.js +41 -0
- package/lib/types/utils/fileSuggestions.d.ts +2 -9
- package/lib/types/utils/fileSuggestions.d.ts.map +1 -1
- package/lib/types/utils/fold-long-lines.d.ts +38 -0
- package/lib/types/utils/fold-long-lines.d.ts.map +1 -0
- package/lib/types/utils/fold-long-lines.js +91 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/pi-ai.d.ts +1 -1
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +4 -0
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +15 -2
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +10 -10
- package/package.json +125 -81
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/agent.cordis.yml +20 -4
- package/presets/liangshen/compaction-epoch.mjs +3 -1
- package/presets/liangshen/instruction-hint.mjs +2 -1
- package/presets/liangshen/session-events.mjs +8 -0
- package/lib/types/dsh-adapter/grants.d.ts.map +0 -1
- package/lib/types/dsh-adapter/host-descriptor.d.ts +0 -24
- package/lib/types/dsh-adapter/host-descriptor.d.ts.map +0 -1
- package/lib/types/dsh-adapter/host-descriptor.js +0 -169
- package/lib/types/dsh-adapter/plugin-test-utils.d.ts +0 -62
- package/lib/types/dsh-adapter/plugin-test-utils.d.ts.map +0 -1
- package/lib/types/dsh-adapter/plugin-test-utils.js +0 -61
- package/lib/types/plugin-spec/negotiate.d.ts.map +0 -1
- package/lib/types/plugin-spec/permission-scope.d.ts.map +0 -1
- package/lib/types/plugin-spec/registry.d.ts.map +0 -1
- package/lib/types/plugin-spec/schema-check.d.ts.map +0 -1
- package/lib/types/plugin-spec/tui-extension.d.ts +0 -16
- package/lib/types/plugin-spec/tui-extension.d.ts.map +0 -1
- package/lib/types/plugin-spec/tui-extension.js +0 -79
- package/lib/types/plugin-spec/types.d.ts.map +0 -1
- package/lib/types/plugin-spec/validate.d.ts.map +0 -1
- package/lib/types/test-utils.d.ts +0 -2
- package/lib/types/test-utils.d.ts.map +0 -1
- package/lib/types/test-utils.js +0 -8
- /package/lib/types/{plugin-spec → adapter/standard}/negotiate.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/negotiate.js +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/registry.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/schema-check.d.ts +0 -0
- /package/lib/types/{plugin-spec → adapter/standard}/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionTree.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/sessionTree.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sessionTree.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/sessionTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAiE,MAAM,qCAAqC,CAAA;AAC9J,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC9J;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,KAAK,CAAA;AACrE,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAAgD,CAAA;AAE9F,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B;;;mDAG+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAA;IACxC,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B;;kEAE8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;;qDAKiD;IACjD,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,8EAA8E;AAC9E,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B;;;uEAGmE;IACnE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAUjG;AAED,sEAAsE;AACtE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB;;uEAEmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAA;IACd,0EAA0E;IAC1E,aAAa,EAAE,OAAO,CAAA;IACtB,mDAAmD;IACnD,MAAM,EAAE,OAAO,CAAA;IACf,6EAA6E;IAC7E,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IAC9B,4DAA4D;IAC5D,kBAAkB,EAAE,OAAO,CAAA;IAC3B,2EAA2E;IAC3E,aAAa,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;CACd;AA2BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,YAAY,EAAE,CAoCpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAUjF;AAED,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CA0BvF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAkBrF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,SAAS,EAAE,MAAM,GAChB,SAAS,YAAY,EAAE,CAyBzB;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAgBjF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,EAAE,CAqK9F;AAcD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,aAAa,EAAE,EAClC,aAAa,EAAE,MAAM,EACrB,SAAS,UAAQ,GAChB,eAAe,CAoQjB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,EAAE,CA0F/F;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,SAAS,QAAQ,EAAE,EACzB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,GACZ,QAAQ,EAAE,CA+FZ;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,QAAQ,EAAE,EAC5B,IAAI,EAAE,SAAS,QAAQ,EAAE,EACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,MAAM,CAaR"}
|
|
@@ -38,41 +38,53 @@ function firstTextOf(content) {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Coalesce runs of same-type assistant/chunk deltas into single synthetic
|
|
41
|
-
* events for REPLAY only. A streamed turn logs one event per token
|
|
42
|
-
* events in long sessions); replaying them one at a time costs
|
|
43
|
-
* string growth on every row (quadratic in the turn's length).
|
|
44
|
-
* outcome-identical: ensureStreaming/ensureReasoning only read
|
|
45
|
-
* and the concatenated text, and the row's seq comes from the
|
|
46
|
-
* chunk (the fork boundary rewindToNode derives from it). Parts
|
|
47
|
-
* no quadratic concat. Live events never go through this.
|
|
41
|
+
* events for REPLAY only. A streamed pre-V3 turn logs one event per token
|
|
42
|
+
* (~100k events in long sessions); replaying them one at a time costs
|
|
43
|
+
* per-chunk string growth on every row (quadratic in the turn's length).
|
|
44
|
+
* Merging is outcome-identical: ensureStreaming/ensureReasoning only read
|
|
45
|
+
* chunk.type and the concatenated text, and the row's seq comes from the
|
|
46
|
+
* run's FIRST chunk (the fork boundary rewindToNode derives from it). Parts
|
|
47
|
+
* join once — no quadratic concat. Live events never go through this.
|
|
48
|
+
*
|
|
49
|
+
* Pre-V3 durable logs only: 0.1.5 removed `assistant/chunk` from the event
|
|
50
|
+
* union (V3 embeds the compacted stream in `assistant/message.stream`), so
|
|
51
|
+
* the merger works on the widened structural shape — runtime payloads from
|
|
52
|
+
* raw pre-V3 logs remain typed as SessionEvent by the reader.
|
|
48
53
|
*
|
|
49
54
|
* (Moved from channel.ts: the transcript replay and the tree extraction
|
|
50
55
|
* share it.)
|
|
51
56
|
*/
|
|
52
57
|
export function coalesceReplayEvents(events) {
|
|
58
|
+
const legacyChunkDataOf = (event) => {
|
|
59
|
+
if (event.type !== 'assistant/chunk')
|
|
60
|
+
return undefined;
|
|
61
|
+
const data = event.data;
|
|
62
|
+
if (data.chunk?.type !== 'text-delta' && data.chunk?.type !== 'reasoning-delta')
|
|
63
|
+
return undefined;
|
|
64
|
+
return data;
|
|
65
|
+
};
|
|
53
66
|
const out = [];
|
|
54
67
|
let run = null;
|
|
55
68
|
const flush = () => {
|
|
56
69
|
if (run === null)
|
|
57
70
|
return;
|
|
58
|
-
const chunk = run.event.data.chunk;
|
|
59
71
|
out.push({
|
|
60
72
|
...run.event,
|
|
61
|
-
data: { ...run.
|
|
73
|
+
data: { ...run.data, chunk: { ...run.data.chunk, text: run.parts.join('') } },
|
|
62
74
|
});
|
|
63
75
|
run = null;
|
|
64
76
|
};
|
|
65
77
|
for (const event of events) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (run !== null && run.type ===
|
|
78
|
+
const data = legacyChunkDataOf(event);
|
|
79
|
+
if (data !== undefined) {
|
|
80
|
+
if (run !== null && run.data.chunk.type === data.chunk.type) {
|
|
69
81
|
// oxlint-disable-next-line typescript/no-unnecessary-condition -- durable replay data may lack text
|
|
70
|
-
run.parts.push(
|
|
82
|
+
run.parts.push(data.chunk.text ?? '');
|
|
71
83
|
continue;
|
|
72
84
|
}
|
|
73
85
|
flush();
|
|
74
86
|
// oxlint-disable-next-line typescript/no-unnecessary-condition -- durable replay data may lack text
|
|
75
|
-
run = { event,
|
|
87
|
+
run = { event, data, parts: [data.chunk.text ?? ''] };
|
|
76
88
|
continue;
|
|
77
89
|
}
|
|
78
90
|
flush();
|
|
@@ -305,6 +317,31 @@ export function extractEntries(sessionId, events) {
|
|
|
305
317
|
inFirstTurn = markFirstTurn && turnsSeen === 1;
|
|
306
318
|
continue;
|
|
307
319
|
}
|
|
320
|
+
// Pre-V3 durable logs only: per-token chunk events predate the 0.1.5
|
|
321
|
+
// union (V3 embeds the stream in assistant/message.stream), so they are
|
|
322
|
+
// handled structurally outside the typed switch.
|
|
323
|
+
if (event.type === 'assistant/chunk') {
|
|
324
|
+
const data = event.data;
|
|
325
|
+
if (data.chunk.type === 'text-delta') {
|
|
326
|
+
const text = data.chunk.text ?? '';
|
|
327
|
+
if (text.trim()) {
|
|
328
|
+
const key = `${data.turn}:${data.step}`;
|
|
329
|
+
const index = push({
|
|
330
|
+
seq: event.seq,
|
|
331
|
+
kind: 'assistant',
|
|
332
|
+
text: preview(text),
|
|
333
|
+
searchText: `assistant ${text}`,
|
|
334
|
+
time: event.time,
|
|
335
|
+
});
|
|
336
|
+
const group = tentatives.get(key);
|
|
337
|
+
if (group === undefined)
|
|
338
|
+
tentatives.set(key, [index]);
|
|
339
|
+
else
|
|
340
|
+
group.push(index);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
308
345
|
switch (event.type) {
|
|
309
346
|
case 'user/message': {
|
|
310
347
|
const source = event.data.source;
|
|
@@ -349,28 +386,6 @@ export function extractEntries(sessionId, events) {
|
|
|
349
386
|
}
|
|
350
387
|
break;
|
|
351
388
|
}
|
|
352
|
-
case 'assistant/chunk': {
|
|
353
|
-
const chunk = event.data.chunk;
|
|
354
|
-
if (chunk.type !== 'text-delta')
|
|
355
|
-
break;
|
|
356
|
-
const text = 'text' in chunk ? (chunk.text ?? '') : '';
|
|
357
|
-
if (!text.trim())
|
|
358
|
-
break;
|
|
359
|
-
const key = `${event.data.turn}:${event.data.step}`;
|
|
360
|
-
const index = push({
|
|
361
|
-
seq: event.seq,
|
|
362
|
-
kind: 'assistant',
|
|
363
|
-
text: preview(text),
|
|
364
|
-
searchText: `assistant ${text}`,
|
|
365
|
-
time: event.time,
|
|
366
|
-
});
|
|
367
|
-
const group = tentatives.get(key);
|
|
368
|
-
if (group === undefined)
|
|
369
|
-
tentatives.set(key, [index]);
|
|
370
|
-
else
|
|
371
|
-
group.push(index);
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
389
|
case 'tool/call': {
|
|
375
390
|
if (event.data.name === 'ask_user_question')
|
|
376
391
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/digest.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,QAAY,CAAA;AAC1C,+EAA+E;AAC/E,eAAO,MAAM,eAAe,MAAM,CAAA;AAClC,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB,QAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/digest.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,QAAY,CAAA;AAC1C,+EAA+E;AAC/E,eAAO,MAAM,eAAe,MAAM,CAAA;AAClC,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB,QAAa,CAAA;AAwG3C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAyDtE;AAID,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IACxC,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B;AA2GD,sEAAsE;AACtE,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,CAgCjE;AA8CD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAS/B;AAED,iFAAiF;AACjF,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAiB7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAyB1E"}
|
|
@@ -25,7 +25,7 @@ import { createHash } from 'node:crypto';
|
|
|
25
25
|
import { open } from 'node:fs/promises';
|
|
26
26
|
import { basename } from 'node:path';
|
|
27
27
|
import { scheduler } from 'node:timers/promises';
|
|
28
|
-
import { decodeFrame,
|
|
28
|
+
import { decodeFrame, decodeTail, readWindow, resyncFrames, walkFrames } from './frames.js';
|
|
29
29
|
/** Head window budget. Eight times the measured worst-case prompt offset. */
|
|
30
30
|
export const HEAD_WINDOW_BYTES = 64 * 1024;
|
|
31
31
|
/** Head frame ceiling — a cost bound independent of how the bytes compress. */
|
|
@@ -71,14 +71,14 @@ function isHumanSource(source) {
|
|
|
71
71
|
return false;
|
|
72
72
|
return source['kind'] === 'user';
|
|
73
73
|
}
|
|
74
|
-
/**
|
|
74
|
+
/** A human message is conversation evidence even when it has no title text. */
|
|
75
75
|
function humanPrompt(line) {
|
|
76
76
|
const data = line['data'];
|
|
77
77
|
if (data === null || typeof data !== 'object')
|
|
78
78
|
return undefined;
|
|
79
79
|
const record = data;
|
|
80
80
|
if (line['type'] === 'user/message') {
|
|
81
|
-
return isHumanSource(record['source']) ? textOfContent(record['content']) : undefined;
|
|
81
|
+
return isHumanSource(record['source']) ? { text: textOfContent(record['content']) } : undefined;
|
|
82
82
|
}
|
|
83
83
|
// The inbox splice precedes the durable user/message and reaches the log
|
|
84
84
|
// several frames earlier, which is what keeps the head window small.
|
|
@@ -86,16 +86,20 @@ function humanPrompt(line) {
|
|
|
86
86
|
const inserted = record['inserted'];
|
|
87
87
|
if (!Array.isArray(inserted))
|
|
88
88
|
return undefined;
|
|
89
|
+
let found = false;
|
|
89
90
|
for (const message of inserted) {
|
|
90
91
|
if (message === null || typeof message !== 'object')
|
|
91
92
|
continue;
|
|
92
93
|
const entry = message;
|
|
93
94
|
if (entry['role'] !== 'user' || !isHumanSource(entry['source']))
|
|
94
95
|
continue;
|
|
96
|
+
found = true;
|
|
95
97
|
const text = textOfContent(entry['content']);
|
|
96
98
|
if (text !== undefined)
|
|
97
|
-
return text;
|
|
99
|
+
return { text };
|
|
98
100
|
}
|
|
101
|
+
if (found)
|
|
102
|
+
return { text: undefined };
|
|
99
103
|
}
|
|
100
104
|
return undefined;
|
|
101
105
|
}
|
|
@@ -152,24 +156,36 @@ function timeOf(line) {
|
|
|
152
156
|
export function digestSession(path, cwd) {
|
|
153
157
|
const head = readWindow(path, HEAD_WINDOW_BYTES);
|
|
154
158
|
if (head === undefined) {
|
|
155
|
-
return { title: undefined, hasPrompt:
|
|
159
|
+
return { title: undefined, hasPrompt: true, model: undefined, label: undefined };
|
|
156
160
|
}
|
|
157
|
-
const
|
|
161
|
+
const headFrames = walkFrames(head.buffer, 0, HEAD_MAX_FRAMES);
|
|
162
|
+
const headLines = [];
|
|
163
|
+
let completeHead = head.whole && headFrames.at(-1)?.end === head.buffer.length;
|
|
164
|
+
for (const frame of headFrames) {
|
|
165
|
+
const lines = decodeFrame(head.buffer, frame);
|
|
166
|
+
if (lines === undefined)
|
|
167
|
+
completeHead = false;
|
|
168
|
+
else
|
|
169
|
+
headLines.push(...lines);
|
|
170
|
+
}
|
|
171
|
+
completeHead &&= headLines[0]?.['type'] === 'session';
|
|
158
172
|
let prompt;
|
|
173
|
+
let hasHumanMessage = false;
|
|
159
174
|
let headTitle;
|
|
160
175
|
let label;
|
|
161
176
|
for (const line of headLines) {
|
|
162
|
-
|
|
177
|
+
const human = humanPrompt(line);
|
|
178
|
+
hasHumanMessage ||= human !== undefined;
|
|
179
|
+
prompt ??= human?.text;
|
|
163
180
|
headTitle ??= titleOf(line);
|
|
164
181
|
label ??= labelOf(line);
|
|
165
182
|
}
|
|
166
|
-
//
|
|
167
|
-
//
|
|
168
|
-
//
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const tail = head.whole ? undefined : readWindow(path, TAIL_WINDOW_BYTES, true);
|
|
183
|
+
// The byte window, frame limit, decoding and parsing must ALL cover the
|
|
184
|
+
// log before absence proves emptiness. Unknown is visible, never eligible
|
|
185
|
+
// for destructive cleanup; title text is not required for image-only input.
|
|
186
|
+
const hasPrompt = hasHumanMessage || !completeHead;
|
|
187
|
+
// Only a completely decoded head can stand in for the tail.
|
|
188
|
+
const tail = completeHead ? undefined : readWindow(path, TAIL_WINDOW_BYTES, true);
|
|
173
189
|
const tailLines = tail === undefined ? headLines : decodeTail(tail);
|
|
174
190
|
let tailTitle;
|
|
175
191
|
let model;
|
|
@@ -189,7 +205,7 @@ export function digestSession(path, cwd) {
|
|
|
189
205
|
hasPrompt,
|
|
190
206
|
model,
|
|
191
207
|
label,
|
|
192
|
-
...(!
|
|
208
|
+
...(!completeHead && tailTitle === undefined ? {} : { titleComplete: true }),
|
|
193
209
|
};
|
|
194
210
|
}
|
|
195
211
|
/** Read exactly one stable range from an already-open snapshot. */
|
|
@@ -341,6 +357,7 @@ async function recoverFirstPrompt(path, bytes, signal) {
|
|
|
341
357
|
}
|
|
342
358
|
try {
|
|
343
359
|
let position = 0;
|
|
360
|
+
let hasPrompt = false;
|
|
344
361
|
while (position < bytes) {
|
|
345
362
|
signal?.throwIfAborted();
|
|
346
363
|
const page = await forwardPage(handle, position, bytes, signal);
|
|
@@ -350,10 +367,14 @@ async function recoverFirstPrompt(path, bytes, signal) {
|
|
|
350
367
|
const lines = decodeFrame(page.buffer, frame);
|
|
351
368
|
if (lines === undefined)
|
|
352
369
|
return { prompt: undefined, complete: false };
|
|
370
|
+
if (position === 0 && frame.start === 0 && lines[0]?.['type'] !== 'session') {
|
|
371
|
+
return { prompt: undefined, complete: false };
|
|
372
|
+
}
|
|
353
373
|
for (const line of lines) {
|
|
354
374
|
const prompt = humanPrompt(line);
|
|
355
|
-
|
|
356
|
-
|
|
375
|
+
hasPrompt ||= prompt !== undefined;
|
|
376
|
+
if (prompt?.text !== undefined)
|
|
377
|
+
return { prompt: prompt.text, complete: true, hasPrompt: true };
|
|
357
378
|
}
|
|
358
379
|
}
|
|
359
380
|
const consumed = page.frames[page.frames.length - 1].end;
|
|
@@ -362,7 +383,7 @@ async function recoverFirstPrompt(path, bytes, signal) {
|
|
|
362
383
|
position += consumed;
|
|
363
384
|
await scheduler.yield();
|
|
364
385
|
}
|
|
365
|
-
return { prompt: undefined, complete:
|
|
386
|
+
return { prompt: undefined, complete: bytes > 0, ...(bytes > 0 ? { hasPrompt } : {}) };
|
|
366
387
|
}
|
|
367
388
|
finally {
|
|
368
389
|
await handle.close().catch(() => { });
|
|
@@ -381,7 +402,7 @@ export async function recoverSessionTitle(path, bytes, signal) {
|
|
|
381
402
|
return {
|
|
382
403
|
title: opening.prompt === undefined ? undefined : { text: opening.prompt, source: 'prompt' },
|
|
383
404
|
complete: opening.complete,
|
|
384
|
-
...(opening.
|
|
405
|
+
...(opening.hasPrompt === undefined ? {} : { hasPrompt: opening.hasPrompt }),
|
|
385
406
|
};
|
|
386
407
|
}
|
|
387
408
|
/** Hash the previous EOF neighborhood before carrying title evidence forward. */
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export { classify, readHeader, readInheritedCut, type RawSessionHeader, } from './header.js';
|
|
13
13
|
export { digestSession, previewSession } from './digest.js';
|
|
14
|
-
export { listSummaries, locateSession, type SessionSource } from './list.js';
|
|
14
|
+
export { enumerateSessions, listSummaries, locateSession, type SessionSource } from './list.js';
|
|
15
15
|
export { noteBranch, readIndex, writeIndex, type IndexEntry, type SessionIndex } from './store.js';
|
|
16
16
|
export type { PreviewEntry, SessionDigest, SessionKind, SessionSummary, SessionTitle, TitleSource, } from './types.js';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE3D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE3D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;AAE/F,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAElG,YAAY,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAA"}
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export { classify, readHeader, readInheritedCut, } from './header.js';
|
|
13
13
|
export { digestSession, previewSession } from './digest.js';
|
|
14
|
-
export { listSummaries, locateSession } from './list.js';
|
|
14
|
+
export { enumerateSessions, listSummaries, locateSession } from './list.js';
|
|
15
15
|
export { noteBranch, readIndex, writeIndex } from './store.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RawSessionHeader } from './header.js';
|
|
1
2
|
import type { SessionSummary } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* The slice of `ctx.sessionPersistence` this module uses.
|
|
@@ -14,6 +15,27 @@ export interface SessionSource {
|
|
|
14
15
|
/** Absolute artifact path for one header; absent for storeless backends. */
|
|
15
16
|
locate?: (meta: unknown) => unknown;
|
|
16
17
|
}
|
|
18
|
+
/** A header paired with the backend's change token, when it offered one. */
|
|
19
|
+
interface Listed {
|
|
20
|
+
readonly header: RawSessionHeader;
|
|
21
|
+
readonly raw: unknown;
|
|
22
|
+
readonly revision: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Enumerate stored sessions.
|
|
26
|
+
*
|
|
27
|
+
* Prefers `listSnapshots()` because its revision is the backend's own answer
|
|
28
|
+
* to "has this log changed", and falls back to `list()` when the resolved
|
|
29
|
+
* service predates it — in which case the change token is derived from the
|
|
30
|
+
* file's own size and mtime further down. Both are honest change tokens for an
|
|
31
|
+
* append-only log; only the authority differs.
|
|
32
|
+
*
|
|
33
|
+
* `list()` itself is read dual-shape: 0.1.5 folded snapshots INTO it (each
|
|
34
|
+
* element is `{ header, revision, sizeBytes }`), while every older backend
|
|
35
|
+
* returns bare headers — so each element is tried as a snapshot first and
|
|
36
|
+
* then as a bare header.
|
|
37
|
+
*/
|
|
38
|
+
export declare function enumerateSessions(source: SessionSource, signal?: AbortSignal): Promise<Listed[]>;
|
|
17
39
|
/**
|
|
18
40
|
* Read every stored session into a complete summary.
|
|
19
41
|
*
|
|
@@ -38,4 +60,5 @@ export declare function listSummaries(source: SessionSource, signal?: AbortSigna
|
|
|
38
60
|
* per-session file or the session is gone.
|
|
39
61
|
*/
|
|
40
62
|
export declare function locateSession(source: SessionSource, sessionId: string, signal?: AbortSignal): Promise<string | undefined>;
|
|
63
|
+
export {};
|
|
41
64
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/list.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAGzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAMhD;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAAA;IACrE,iEAAiE;IACjE,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAAA;IAC5D,4EAA4E;IAC5E,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;CACpC;AAED,4EAA4E;AAC5E,UAAU,MAAM;IACd,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CACtC;AAaD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAYtG;AAwCD;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAqNpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAS7B"}
|
|
@@ -22,7 +22,7 @@ import { basename } from 'node:path';
|
|
|
22
22
|
import { digestSession, recoverAppendedTitle, recoverSessionTitle, sessionTitleAnchor, } from './digest.js';
|
|
23
23
|
import { fileFacts } from './frames.js';
|
|
24
24
|
import { classify, readHeader } from './header.js';
|
|
25
|
-
import { findSessionLogFile } from '../compat/sessionLog.js';
|
|
25
|
+
import { findSessionLogFile, resolveLocatedPath } from '../compat/sessionLog.js';
|
|
26
26
|
import { readIndex, writeIndex } from './store.js';
|
|
27
27
|
import { readLastUsed } from '../../sessionHistory.js';
|
|
28
28
|
/** Compressed bytes one listing may spend on full-log title recovery scans. */
|
|
@@ -47,8 +47,13 @@ function readSnapshot(value) {
|
|
|
47
47
|
* service predates it — in which case the change token is derived from the
|
|
48
48
|
* file's own size and mtime further down. Both are honest change tokens for an
|
|
49
49
|
* append-only log; only the authority differs.
|
|
50
|
+
*
|
|
51
|
+
* `list()` itself is read dual-shape: 0.1.5 folded snapshots INTO it (each
|
|
52
|
+
* element is `{ header, revision, sizeBytes }`), while every older backend
|
|
53
|
+
* returns bare headers — so each element is tried as a snapshot first and
|
|
54
|
+
* then as a bare header.
|
|
50
55
|
*/
|
|
51
|
-
async function
|
|
56
|
+
export async function enumerateSessions(source, signal) {
|
|
52
57
|
if (typeof source.listSnapshots === 'function') {
|
|
53
58
|
const snapshots = await source.listSnapshots(signal);
|
|
54
59
|
return snapshots.map(readSnapshot).filter((entry) => entry !== undefined);
|
|
@@ -56,22 +61,28 @@ async function enumerate(source, signal) {
|
|
|
56
61
|
if (typeof source.list === 'function') {
|
|
57
62
|
const headers = await source.list(signal);
|
|
58
63
|
return headers
|
|
59
|
-
.map((raw) =>
|
|
60
|
-
const header = readHeader(raw);
|
|
61
|
-
return header === undefined ? undefined : { header, raw, revision: undefined };
|
|
62
|
-
})
|
|
64
|
+
.map((raw) => readSnapshot(raw) ?? bareListed(raw))
|
|
63
65
|
.filter((entry) => entry !== undefined);
|
|
64
66
|
}
|
|
65
67
|
return [];
|
|
66
68
|
}
|
|
69
|
+
/** Pull a bare header out of one pre-0.1.5 `list()` element. */
|
|
70
|
+
function bareListed(raw) {
|
|
71
|
+
const header = readHeader(raw);
|
|
72
|
+
return header === undefined ? undefined : { header, raw, revision: undefined };
|
|
73
|
+
}
|
|
67
74
|
/**
|
|
68
75
|
* Absolute artifact path for one session.
|
|
69
76
|
*
|
|
70
|
-
* The backend's own `locate()` is authoritative and is asked first
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
77
|
+
* The backend's own `locate()` is authoritative and is asked first — but
|
|
78
|
+
* since 0.1.5 it answers the CURRENT generation's path without touching the
|
|
79
|
+
* filesystem, which does not exist for a session still stored as an older
|
|
80
|
+
* generation; resolve older generations inside that same directory. Only
|
|
81
|
+
* backends without a location fall back to scanning session roots, as the
|
|
82
|
+
* compat layer has always done (generation-aware there) and is deliberately
|
|
83
|
+
* independent of the backend's workspace-key scheme — so a runtime whose
|
|
84
|
+
* persistence service predates `locate`, whose key sanitization changes, or
|
|
85
|
+
* whose current-generation path has not materialized yet still resolves.
|
|
75
86
|
*
|
|
76
87
|
* A backend that stores no per-session artifact (SQLite) answers neither, and
|
|
77
88
|
* its sessions are summarized from their headers alone.
|
|
@@ -88,7 +99,7 @@ function locate(source, raw, sessionId) {
|
|
|
88
99
|
if (location !== null && typeof location === 'object') {
|
|
89
100
|
const path = location['path'];
|
|
90
101
|
if (typeof path === 'string' && path.length > 0)
|
|
91
|
-
return path;
|
|
102
|
+
return resolveLocatedPath(path)?.path;
|
|
92
103
|
}
|
|
93
104
|
}
|
|
94
105
|
return findSessionLogFile(sessionId);
|
|
@@ -105,7 +116,7 @@ function locate(source, raw, sessionId) {
|
|
|
105
116
|
export async function listSummaries(source, signal) {
|
|
106
117
|
let listed;
|
|
107
118
|
try {
|
|
108
|
-
listed = await
|
|
119
|
+
listed = await enumerateSessions(source, signal);
|
|
109
120
|
}
|
|
110
121
|
catch {
|
|
111
122
|
return [];
|
|
@@ -146,13 +157,15 @@ export async function listSummaries(source, signal) {
|
|
|
146
157
|
else if (path !== undefined && token !== undefined) {
|
|
147
158
|
const digest = digestSession(path, header.cwd ?? '');
|
|
148
159
|
let title = digest.title;
|
|
149
|
-
|
|
160
|
+
const hasPrompt = digest.hasPrompt;
|
|
150
161
|
let titleComplete = digest.titleComplete === true;
|
|
151
162
|
const previous = cached?.derived;
|
|
152
163
|
// Across an append-only revision, validate the old EOF neighborhood then
|
|
153
164
|
// scan only the new frames. This preserves an older authoritative title
|
|
154
165
|
// without trusting file size alone, and still observes a newly appended
|
|
155
166
|
// rename even when later output pushed it outside the cheap tail window.
|
|
167
|
+
// Only title evidence carries forward: a formerly empty session can
|
|
168
|
+
// have acquired its first human message in the appended suffix.
|
|
156
169
|
if (!titleComplete &&
|
|
157
170
|
previous !== undefined &&
|
|
158
171
|
facts !== undefined &&
|
|
@@ -166,7 +179,6 @@ export async function listSummaries(source, signal) {
|
|
|
166
179
|
title = previous.title.length === 0
|
|
167
180
|
? undefined
|
|
168
181
|
: { text: previous.title, source: previous.titleSource };
|
|
169
|
-
hasPrompt = previous.hasPrompt;
|
|
170
182
|
titleComplete = true;
|
|
171
183
|
}
|
|
172
184
|
else if (facts.bytes > previous.bytes) {
|
|
@@ -179,7 +191,6 @@ export async function listSummaries(source, signal) {
|
|
|
179
191
|
? undefined
|
|
180
192
|
: { text: previous.title, source: previous.titleSource };
|
|
181
193
|
}
|
|
182
|
-
hasPrompt = previous.hasPrompt;
|
|
183
194
|
titleComplete = true;
|
|
184
195
|
}
|
|
185
196
|
}
|
|
@@ -320,7 +331,7 @@ export async function listSummaries(source, signal) {
|
|
|
320
331
|
export async function locateSession(source, sessionId, signal) {
|
|
321
332
|
let listed;
|
|
322
333
|
try {
|
|
323
|
-
listed = await
|
|
334
|
+
listed = await enumerateSessions(source, signal);
|
|
324
335
|
}
|
|
325
336
|
catch {
|
|
326
337
|
return undefined;
|
|
@@ -26,8 +26,8 @@ export interface IndexEntry {
|
|
|
26
26
|
export type SessionIndex = Map<string, IndexEntry>;
|
|
27
27
|
/**
|
|
28
28
|
* Load the cache.
|
|
29
|
-
* @returns The parsed index;
|
|
30
|
-
*
|
|
29
|
+
* @returns The parsed index; old derived facts are discarded for a rebuild.
|
|
30
|
+
* Version 2 retains branch notes; unrecognized files yield an empty index.
|
|
31
31
|
*/
|
|
32
32
|
export declare function readIndex(): SessionIndex;
|
|
33
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/store.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAW7C,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CACnC;AAED,gFAAgF;AAChF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,CAAA;IAC1C,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC;AAED,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/sessions/store.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAW7C,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CACnC;AAED,gFAAgF;AAChF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,CAAA;IAC1C,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC;AAED,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAuDlD;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,YAAY,CAkBxC;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAwBpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAO9E"}
|
|
@@ -31,11 +31,11 @@ import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node
|
|
|
31
31
|
import { join } from 'node:path';
|
|
32
32
|
import { DATA_DIR } from '../../utils/paths.js';
|
|
33
33
|
/**
|
|
34
|
-
* Bumped when
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* Bumped when derived facts change shape or meaning. Version 2 could cache
|
|
35
|
+
* incomplete reads as empty: discard those derivations, retaining only the
|
|
36
|
+
* branch notes that cannot be recovered from the session log.
|
|
37
37
|
*/
|
|
38
|
-
const SCHEMA_VERSION =
|
|
38
|
+
const SCHEMA_VERSION = 3;
|
|
39
39
|
const INDEX_FILE = join(DATA_DIR, 'session-index.json');
|
|
40
40
|
/** A title source as written to disk, or undefined for anything unexpected. */
|
|
41
41
|
function readTitleSource(value) {
|
|
@@ -44,12 +44,12 @@ function readTitleSource(value) {
|
|
|
44
44
|
: undefined;
|
|
45
45
|
}
|
|
46
46
|
/** Narrow one persisted entry; an unrecognizable record is simply absent. */
|
|
47
|
-
function readEntry(value) {
|
|
47
|
+
function readEntry(value, derivedValid) {
|
|
48
48
|
if (value === null || typeof value !== 'object')
|
|
49
49
|
return undefined;
|
|
50
50
|
const record = value;
|
|
51
51
|
const branch = typeof record['branch'] === 'string' ? record['branch'] : undefined;
|
|
52
|
-
const raw = record['derived'];
|
|
52
|
+
const raw = derivedValid ? record['derived'] : undefined;
|
|
53
53
|
if (raw === null || typeof raw !== 'object')
|
|
54
54
|
return { derived: undefined, branch };
|
|
55
55
|
const derived = raw;
|
|
@@ -68,7 +68,8 @@ function readEntry(value) {
|
|
|
68
68
|
(anchor !== undefined && typeof anchor !== 'string') ||
|
|
69
69
|
typeof title !== 'string' ||
|
|
70
70
|
titleSource === undefined ||
|
|
71
|
-
typeof titleComplete !== 'boolean'
|
|
71
|
+
typeof titleComplete !== 'boolean' ||
|
|
72
|
+
typeof derived['hasPrompt'] !== 'boolean') {
|
|
72
73
|
return { derived: undefined, branch };
|
|
73
74
|
}
|
|
74
75
|
return {
|
|
@@ -89,8 +90,8 @@ function readEntry(value) {
|
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
92
|
* Load the cache.
|
|
92
|
-
* @returns The parsed index;
|
|
93
|
-
*
|
|
93
|
+
* @returns The parsed index; old derived facts are discarded for a rebuild.
|
|
94
|
+
* Version 2 retains branch notes; unrecognized files yield an empty index.
|
|
94
95
|
*/
|
|
95
96
|
export function readIndex() {
|
|
96
97
|
const index = new Map();
|
|
@@ -104,13 +105,13 @@ export function readIndex() {
|
|
|
104
105
|
if (parsed === null || typeof parsed !== 'object')
|
|
105
106
|
return index;
|
|
106
107
|
const file = parsed;
|
|
107
|
-
if (file['version'] !== SCHEMA_VERSION)
|
|
108
|
+
if (file['version'] !== SCHEMA_VERSION && file['version'] !== 2)
|
|
108
109
|
return index;
|
|
109
110
|
const entries = file['entries'];
|
|
110
111
|
if (entries === null || typeof entries !== 'object')
|
|
111
112
|
return index;
|
|
112
113
|
for (const [id, value] of Object.entries(entries)) {
|
|
113
|
-
const entry = readEntry(value);
|
|
114
|
+
const entry = readEntry(value, file['version'] === SCHEMA_VERSION);
|
|
114
115
|
if (entry !== undefined)
|
|
115
116
|
index.set(id, entry);
|
|
116
117
|
}
|