@waq666/pneuma 0.7.1 → 0.8.1
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 +242 -206
- package/bin/dsc.js +9 -3
- package/bin/headless.cjs +1 -1
- package/lib/adapter/transcript.d.ts +19 -2
- package/lib/adapter/transcript.js +71 -14
- package/lib/app/AgentsOverlay.js +7 -6
- package/lib/app/App.js +1 -1
- package/lib/app/ApprovalCard.js +15 -9
- package/lib/app/ChatView.d.ts +3 -1
- package/lib/app/ChatView.js +21 -17
- package/lib/app/Composer.js +22 -4
- package/lib/app/MarkdownView.js +2 -1
- package/lib/app/ModelPicker.js +7 -6
- package/lib/app/PickerFrame.d.ts +4 -0
- package/lib/app/PickerFrame.js +18 -0
- package/lib/app/PlanReviewCard.js +2 -1
- package/lib/app/PresetPicker.js +8 -7
- package/lib/app/SessionPicker.js +21 -20
- package/lib/app/SettingsOverlay.js +1 -1
- package/lib/app/SkillsPicker.js +7 -6
- package/lib/app/StatusBar.js +3 -15
- package/lib/app/TaskStrips.js +1 -4
- package/lib/app/TimelineRail.js +2 -1
- package/lib/app/ToolCard.js +2 -6
- package/lib/app/Welcome.d.ts +1 -0
- package/lib/app/Welcome.js +1 -4
- package/lib/app/click.d.ts +0 -2
- package/lib/app/click.js +2 -21
- package/lib/app/display-width.d.ts +16 -0
- package/lib/app/display-width.js +33 -0
- package/lib/app/markdown.d.ts +1 -3
- package/lib/app/markdown.js +2 -19
- package/lib/app/scroll-model.js +1 -1
- package/lib/contract/approval.d.ts +91 -0
- package/lib/contract/approval.js +1 -0
- package/lib/contract/mode.d.ts +69 -0
- package/lib/contract/mode.js +1 -0
- package/lib/contract/plugin.d.ts +240 -0
- package/lib/contract/plugin.js +1 -0
- package/lib/contract/runtime.d.ts +282 -0
- package/lib/contract/runtime.js +1 -0
- package/lib/contract/session.d.ts +208 -0
- package/lib/contract/session.js +36 -0
- package/lib/contract/settings.d.ts +242 -0
- package/lib/contract/settings.js +1 -0
- package/lib/contract/snapshot.d.ts +453 -0
- package/lib/contract/snapshot.js +1 -0
- package/lib/contract/task.d.ts +189 -0
- package/lib/contract/task.js +10 -0
- package/lib/contract/transcript.d.ts +358 -0
- package/lib/contract/transcript.js +1 -0
- package/lib/contract/usage.d.ts +132 -0
- package/lib/contract/usage.js +10 -0
- package/lib/contract.d.ts +20 -1968
- package/lib/contract.js +19 -30
- package/lib/core/agent-roles.d.ts +1 -1
- package/lib/core/agent-roles.js +6 -5
- package/lib/core/approval-floor.d.ts +9 -0
- package/lib/core/approval-floor.js +152 -25
- package/lib/core/attachments.d.ts +185 -0
- package/lib/core/attachments.js +425 -0
- package/lib/core/bytes.d.ts +14 -0
- package/lib/core/bytes.js +28 -0
- package/lib/core/call-meaning.d.ts +20 -0
- package/lib/core/call-meaning.js +347 -0
- package/lib/core/cdp/actions.js +6 -0
- package/lib/core/cdp/launch.js +2 -2
- package/lib/core/cdp/report.d.ts +27 -0
- package/lib/core/cdp/report.js +50 -0
- package/lib/core/cdp/ring-buffer.d.ts +25 -0
- package/lib/core/cdp/ring-buffer.js +44 -0
- package/lib/core/cdp/snapshot.js +5 -9
- package/lib/core/cdp/transport.js +1 -1
- package/lib/core/clamp.d.ts +20 -0
- package/lib/core/clamp.js +24 -0
- package/lib/core/clock.d.ts +16 -0
- package/lib/core/clock.js +20 -0
- package/lib/core/command-policy.js +33 -1
- package/lib/core/commands-completion.d.ts +28 -0
- package/lib/core/commands-completion.js +108 -30
- package/lib/core/compact.d.ts +36 -6
- package/lib/core/compact.js +89 -17
- package/lib/core/desktop-control.js +1 -3
- package/lib/core/dsh-compat/llm-usage-event.d.ts +78 -0
- package/lib/core/dsh-compat/llm-usage-event.js +91 -0
- package/lib/core/dsh-compat/presentation.d.ts +84 -0
- package/lib/core/dsh-compat/presentation.js +105 -0
- package/lib/core/dsh-compat/resolve-hook.d.ts +3 -3
- package/lib/core/dsh-compat/resolve-hook.js +41 -13
- package/lib/core/dsh-compat/service-map.d.ts +52 -0
- package/lib/core/dsh-compat/service-map.js +87 -0
- package/lib/core/dsh-compat/session-bridge.d.ts +107 -0
- package/lib/core/dsh-compat/session-bridge.js +376 -0
- package/lib/core/dsh-compat/session-events.d.ts +54 -0
- package/lib/core/dsh-compat/session-events.js +297 -0
- package/lib/core/dsh-compat/shims/credentials.d.ts +62 -0
- package/lib/core/dsh-compat/shims/credentials.js +86 -0
- package/lib/core/dsh-compat/shims/home-paths.d.ts +77 -0
- package/lib/core/dsh-compat/shims/home-paths.js +143 -0
- package/lib/core/dsh-compat/tools-facade.d.ts +31 -1
- package/lib/core/dsh-compat/tools-facade.js +207 -3
- package/lib/core/err-text.d.ts +5 -0
- package/lib/core/err-text.js +5 -0
- package/lib/core/events.d.ts +31 -2
- package/lib/core/git-info.d.ts +127 -15
- package/lib/core/git-info.js +315 -34
- package/lib/core/git-surface.d.ts +17 -0
- package/lib/core/git-surface.js +7 -0
- package/lib/core/hooks.d.ts +19 -2
- package/lib/core/hooks.js +57 -13
- package/lib/core/host-methods.d.ts +1 -1
- package/lib/core/host-methods.js +4 -0
- package/lib/core/image-diet.js +1 -4
- package/lib/core/json-text.d.ts +11 -0
- package/lib/core/json-text.js +18 -0
- package/lib/core/learnings/skill-write.d.ts +1 -7
- package/lib/core/learnings/skill-write.js +3 -37
- package/lib/core/lifecycle-hooks.d.ts +11 -3
- package/lib/core/lifecycle-hooks.js +33 -42
- package/lib/core/llm.d.ts +42 -0
- package/lib/core/llm.js +40 -25
- package/lib/core/loop.d.ts +11 -1
- package/lib/core/loop.js +95 -28
- package/lib/core/lsp/client.js +30 -17
- package/lib/core/lsp/normalize.d.ts +0 -2
- package/lib/core/lsp/normalize.js +1 -6
- package/lib/core/lsp/servers.js +1 -4
- package/lib/core/mcp.d.ts +18 -0
- package/lib/core/mcp.js +60 -16
- package/lib/core/microcompact.d.ts +45 -0
- package/lib/core/microcompact.js +128 -0
- package/lib/core/native-bridge.js +2 -10
- package/lib/core/path-policy.d.ts +13 -1
- package/lib/core/path-policy.js +87 -18
- package/lib/core/permission-presets.d.ts +9 -5
- package/lib/core/permission-presets.js +14 -7
- package/lib/core/permission-scope.d.ts +65 -0
- package/lib/core/permission-scope.js +109 -0
- package/lib/core/plugin-bundle.d.ts +95 -0
- package/lib/core/plugin-bundle.js +137 -0
- package/lib/core/plugin-loader.d.ts +36 -1
- package/lib/core/plugin-loader.js +336 -12
- package/lib/core/plugin-patch.d.ts +64 -0
- package/lib/core/plugin-patch.js +146 -0
- package/lib/core/plugin-registry.d.ts +14 -0
- package/lib/core/plugin-registry.js +2 -0
- package/lib/core/prefs.js +40 -2
- package/lib/core/presets.d.ts +11 -0
- package/lib/core/presets.js +61 -22
- package/lib/core/profile-dir.d.ts +5 -0
- package/lib/core/profile-dir.js +40 -0
- package/lib/core/prompt.js +55 -19
- package/lib/core/ptc.d.ts +8 -2
- package/lib/core/ptc.js +18 -4
- package/lib/core/records.d.ts +16 -0
- package/lib/core/records.js +22 -0
- package/lib/core/remote/notify.js +1 -3
- package/lib/core/remote/push.js +2 -6
- package/lib/core/sandbox/execpolicy.js +27 -3
- package/lib/core/sandbox/net-proxy.js +2 -2
- package/lib/core/sandbox/policy.d.ts +1 -1
- package/lib/core/sandbox/policy.js +21 -15
- package/lib/core/sandbox/win/account.js +1 -4
- package/lib/core/sandbox/win/acl.js +1 -6
- package/lib/core/sandbox/win/backend.d.ts +24 -3
- package/lib/core/sandbox/win/backend.js +73 -23
- package/lib/core/sandbox/win/doctor.js +1 -4
- package/lib/core/sandbox/win/runner-entry.js +1 -6
- package/lib/core/sandbox/win/setup.js +1 -4
- package/lib/core/sandbox/win/utf16.d.ts +11 -0
- package/lib/core/sandbox/win/utf16.js +15 -0
- package/lib/core/sandbox/win/wfp.js +1 -4
- package/lib/core/schedule/rule.d.ts +0 -17
- package/lib/core/schedule/rule.js +1 -3
- package/lib/core/schedule/runner.d.ts +5 -2
- package/lib/core/schedule/runner.js +32 -9
- package/lib/core/schedule/store.d.ts +0 -2
- package/lib/core/schedule/store.js +2 -9
- package/lib/core/session-index.d.ts +50 -0
- package/lib/core/session-index.js +169 -3
- package/lib/core/session.d.ts +89 -13
- package/lib/core/session.js +385 -32
- package/lib/core/shell-quote.d.ts +21 -0
- package/lib/core/shell-quote.js +24 -0
- package/lib/core/side-ask.d.ts +52 -0
- package/lib/core/side-ask.js +89 -0
- package/lib/core/skills.d.ts +16 -0
- package/lib/core/skills.js +45 -8
- package/lib/core/snapshot-throttle.d.ts +8 -0
- package/lib/core/snapshot-throttle.js +24 -0
- package/lib/core/spill.d.ts +11 -5
- package/lib/core/spill.js +35 -36
- package/lib/core/strings.d.ts +21 -0
- package/lib/core/strings.js +33 -0
- package/lib/core/terminal-env.d.ts +61 -0
- package/lib/core/terminal-env.js +327 -0
- package/lib/core/text-format.d.ts +17 -0
- package/lib/core/text-format.js +26 -0
- package/lib/core/todo-reminder.d.ts +19 -14
- package/lib/core/todo-reminder.js +14 -23
- package/lib/core/token-estimate.d.ts +18 -2
- package/lib/core/token-estimate.js +10 -2
- package/lib/core/tool-result-prune.d.ts +42 -0
- package/lib/core/tool-result-prune.js +47 -0
- package/lib/core/tool-search.d.ts +3 -2
- package/lib/core/tool-search.js +3 -2
- package/lib/core/tools/bash.d.ts +35 -3
- package/lib/core/tools/bash.js +168 -41
- package/lib/core/tools/fs-tools.js +18 -17
- package/lib/core/tools/image-tool.d.ts +2 -0
- package/lib/core/tools/image-tool.js +59 -0
- package/lib/core/tools/path-args.d.ts +4 -0
- package/lib/core/tools/path-args.js +22 -0
- package/lib/core/tools/search-tools.d.ts +30 -0
- package/lib/core/tools/search-tools.js +321 -34
- package/lib/core/tools.d.ts +82 -0
- package/lib/core/tools.js +21 -0
- package/lib/core/transcript-text.d.ts +19 -0
- package/lib/core/transcript-text.js +44 -0
- package/lib/core/ui-boot-source.d.ts +5 -0
- package/lib/core/ui-boot-source.js +10 -3
- package/lib/core/ui-bundles.d.ts +80 -6
- package/lib/core/ui-bundles.js +700 -76
- package/lib/core/ui-events.d.ts +10 -0
- package/lib/core/ui-events.js +25 -0
- package/lib/core/ui-methods.d.ts +1 -1
- package/lib/core/ui-methods.js +42 -13
- package/lib/core/ui-route.js +11 -7
- package/lib/core/ui-server.d.ts +6 -0
- package/lib/core/ui-server.js +106 -1
- package/lib/core/unified-diff.d.ts +35 -0
- package/lib/core/unified-diff.js +86 -0
- package/lib/core/usage-log.js +39 -0
- package/lib/core/web-http.d.ts +1 -1
- package/lib/core/web-http.js +1 -3
- package/lib/host/kernel.js +57 -41
- package/lib/plugins/agent.js +101 -20
- package/lib/plugins/approval-floor.js +12 -8
- package/lib/plugins/approval.js +252 -80
- package/lib/plugins/ask.js +60 -8
- package/lib/plugins/browser.js +32 -84
- package/lib/plugins/commands.js +167 -57
- package/lib/plugins/compact.d.ts +2 -2
- package/lib/plugins/compact.js +200 -30
- package/lib/plugins/computer-use.js +34 -18
- package/lib/plugins/dock-browser.js +24 -65
- package/lib/plugins/dsh-compat.js +7 -0
- package/lib/plugins/file-review.js +59 -15
- package/lib/plugins/git.js +16 -8
- package/lib/plugins/goal.js +9 -8
- package/lib/plugins/hooks.js +4 -2
- package/lib/plugins/host-stdio.js +14 -16
- package/lib/plugins/lifecycle-hooks.d.ts +5 -4
- package/lib/plugins/lifecycle-hooks.js +12 -10
- package/lib/plugins/llm.js +74 -33
- package/lib/plugins/lsp.js +22 -27
- package/lib/plugins/mcp.js +16 -17
- package/lib/plugins/memory.js +3 -24
- package/lib/plugins/microcompact.d.ts +4 -1
- package/lib/plugins/microcompact.js +117 -19
- package/lib/plugins/mode.js +30 -11
- package/lib/plugins/permission-presets.d.ts +2 -1
- package/lib/plugins/permission-presets.js +55 -35
- package/lib/plugins/plugin-manager.js +4 -6
- package/lib/plugins/presets.js +56 -27
- package/lib/plugins/prompt.js +54 -11
- package/lib/plugins/ptc.d.ts +13 -0
- package/lib/plugins/ptc.js +121 -24
- package/lib/plugins/remote/types.d.ts +1 -1
- package/lib/plugins/remote/types.js +11 -0
- package/lib/plugins/remote.js +14 -15
- package/lib/plugins/runtime.js +91 -14
- package/lib/plugins/sandbox.js +181 -60
- package/lib/plugins/schedule.js +12 -11
- package/lib/plugins/self-improve.js +28 -18
- package/lib/plugins/session-search.js +18 -13
- package/lib/plugins/session-title.js +1 -1
- package/lib/plugins/session.js +103 -25
- package/lib/plugins/settings.js +16 -40
- package/lib/plugins/skills.js +18 -1
- package/lib/plugins/spill.js +18 -11
- package/lib/plugins/subagent.js +208 -42
- package/lib/plugins/team.js +11 -5
- package/lib/plugins/todo.d.ts +1 -1
- package/lib/plugins/todo.js +25 -19
- package/lib/plugins/tool-search.js +47 -28
- package/lib/plugins/tools-default.js +89 -5
- package/lib/plugins/tools.js +3 -3
- package/lib/plugins/transcript.js +116 -9
- package/lib/plugins/web-search.d.ts +1 -1
- package/lib/plugins/web-search.js +25 -16
- package/lib/plugins/webserver.js +40 -7
- package/lib/remote/assets/app-B3Id1EBq.js +14 -0
- package/lib/remote/assets/index.html +2 -2
- package/lib/remote/assets/{style-DIB6729x.css → style-NtlpbKOI.css} +1 -1
- package/lib/services/types.d.ts +247 -29
- package/lib/tools/plugin-cli.d.ts +1 -0
- package/lib/tools/plugin-cli.js +209 -0
- package/lib/ui/assets/app-B-Jx5dnh.js +90 -0
- package/lib/ui/assets/{chunk-BajyYBss.js → chunk-Bfdlo8Me.js} +1 -1
- package/lib/ui/assets/chunk-DGX-i4eb.js +12 -0
- package/lib/ui/assets/index.html +62 -14
- package/lib/ui/assets/style-WzxwEPaE.css +1 -0
- package/lib/ui/frames.js +1 -3
- package/lib/ui/index.d.ts +30 -1
- package/lib/ui/index.js +29 -0
- package/lib/ui/manifest.d.ts +24 -6
- package/lib/ui/manifest.js +3 -2
- package/lib/ui/plugins/actions/bundle.json +8 -0
- package/lib/ui/plugins/actions/client.js +43 -0
- package/lib/ui/plugins/ask/bundle.json +8 -0
- package/lib/ui/plugins/ask/client.js +415 -0
- package/lib/ui/plugins/browser/bundle.json +8 -0
- package/lib/ui/plugins/composer/bundle.json +9 -0
- package/lib/ui/plugins/composer/client.js +1806 -1087
- package/lib/ui/plugins/files/bundle.json +8 -0
- package/lib/ui/plugins/files/client.js +13 -98
- package/lib/ui/plugins/manifest.json +1 -104
- package/lib/ui/plugins/palette/bundle.json +8 -0
- package/lib/ui/plugins/palette/client.js +360 -0
- package/lib/ui/plugins/plugins/bundle.json +8 -0
- package/lib/ui/plugins/plugins/client.js +116 -38
- package/lib/ui/plugins/preview/bundle.json +8 -0
- package/lib/ui/plugins/preview/client.js +6 -16
- package/lib/ui/plugins/prompt/bundle.json +8 -0
- package/lib/ui/plugins/prompt/client.js +81 -47
- package/lib/ui/plugins/sessions/bundle.json +8 -0
- package/lib/ui/plugins/sessions/client.js +157 -111
- package/lib/ui/plugins/settings/bundle.json +8 -0
- package/lib/ui/plugins/settings/client.js +184 -170
- package/lib/ui/plugins/skills/bundle.json +8 -0
- package/lib/ui/plugins/skills/client.js +161 -79
- package/lib/ui/plugins/status/bundle.json +8 -0
- package/lib/ui/plugins/status/client.js +165 -26
- package/lib/ui/plugins/statusbar/bundle.json +9 -0
- package/lib/ui/plugins/statusbar/client.js +100 -144
- package/lib/ui/plugins/tasks/bundle.json +8 -0
- package/lib/ui/plugins/team/bundle.json +8 -0
- package/lib/ui/plugins/team/client.js +60 -58
- package/lib/ui/plugins/terminal/bundle.json +8 -0
- package/lib/ui/plugins/terminal/client.js +1 -7
- package/lib/ui/plugins/trace/bundle.json +11 -0
- package/lib/ui/plugins/trace/client.js +86 -179
- package/lib/ui/plugins/transcript/bundle.json +8 -0
- package/lib/ui/plugins/transcript/client.js +1608 -1243
- package/lib/ui/sdk/@dsc/ui/index.d.ts +54 -16
- package/lib/ui/sdk/@dsc/ui/package.json +1 -1
- package/lib/ui/sdk/@dsc/ui-core/contract.d.ts +20 -1968
- package/lib/ui/sdk/@dsc/ui-core/core/attachments.d.ts +185 -0
- package/lib/ui/sdk/@dsc/ui-core/core/bytes.d.ts +14 -0
- package/lib/ui/sdk/@dsc/ui-core/core/err-text.d.ts +18 -0
- package/lib/ui/sdk/@dsc/ui-core/core/git-surface.d.ts +17 -0
- package/lib/ui/sdk/@dsc/ui-core/core/json-text.d.ts +11 -0
- package/lib/ui/sdk/@dsc/ui-core/core/path-policy.d.ts +44 -0
- package/lib/ui/sdk/@dsc/ui-core/core/records.d.ts +16 -0
- package/lib/ui/sdk/@dsc/ui-core/core/throughput.d.ts +46 -0
- package/lib/ui/sdk/@dsc/ui-core/core/token-estimate.d.ts +18 -2
- package/lib/ui/sdk/@dsc/ui-core/core/unified-diff.d.ts +35 -0
- package/lib/ui/sdk/@dsc/ui-core/package.json +1 -1
- package/lib/ui/sdk/@dsc/ui-core/ui/index.d.ts +30 -1
- package/lib/ui/sdk/@dsc/ui-core/ui/manifest.d.ts +24 -6
- package/lib/ui/sdk/@dsc/ui-core/ui/services.d.ts +19 -8
- package/lib/ui/sdk/@dsc/ui-core/ui/signal.d.ts +49 -0
- package/lib/ui/sdk/@dsc/ui-dockkit/dock-model.d.ts +17 -3
- package/lib/ui/sdk/@dsc/ui-dockkit/dock-state.d.ts +1 -1
- package/lib/ui/sdk/@dsc/ui-dockkit/package.json +1 -1
- package/lib/ui/sdk/@dsc/ui-layout/app.d.ts +4 -0
- package/lib/ui/sdk/@dsc/ui-layout/appearance.d.ts +6 -1
- package/lib/ui/sdk/@dsc/ui-layout/host-channel.d.ts +21 -0
- package/lib/ui/sdk/@dsc/ui-layout/index.d.ts +1 -0
- package/lib/ui/sdk/@dsc/ui-layout/package.json +1 -1
- package/lib/ui/sdk/@dsc/ui-layout/page-state.d.ts +1 -1
- package/lib/ui/sdk/@dsc/ui-layout/runtime-context.d.ts +10 -1
- package/lib/ui/sdk/@dsc/ui-layout/thread-view.d.ts +1 -1
- package/lib/ui/sdk/@dsc/ui-layout/usage-today.d.ts +11 -0
- package/lib/ui/sdk/@dsc/ui-primitives/dialog-focus.d.ts +30 -0
- package/lib/ui/sdk/@dsc/ui-primitives/error-text.d.ts +12 -0
- package/lib/ui/sdk/@dsc/ui-primitives/git-surface.d.ts +9 -0
- package/lib/ui/sdk/@dsc/ui-primitives/highlight.d.ts +23 -0
- package/lib/ui/sdk/@dsc/ui-primitives/humanize-error.d.ts +35 -0
- package/lib/ui/sdk/@dsc/ui-primitives/icons-workspace.d.ts +33 -0
- package/lib/ui/sdk/@dsc/ui-primitives/icons.d.ts +21 -3
- package/lib/ui/sdk/@dsc/ui-primitives/image-lightbox.d.ts +21 -0
- package/lib/ui/sdk/@dsc/ui-primitives/index.d.ts +16 -0
- package/lib/ui/sdk/@dsc/ui-primitives/markdown.d.ts +10 -14
- package/lib/ui/sdk/@dsc/ui-primitives/package.json +1 -1
- package/lib/ui/sdk/@dsc/ui-primitives/panels.d.ts +31 -8
- package/lib/ui/sdk/@dsc/ui-primitives/paths.d.ts +2 -0
- package/lib/ui/sdk/@dsc/ui-primitives/review-findings-card.d.ts +25 -0
- package/lib/ui/sdk/@dsc/ui-primitives/review-findings.d.ts +64 -0
- package/lib/ui/sdk/@dsc/ui-primitives/review-notice-card.d.ts +27 -0
- package/lib/ui/sdk/@dsc/ui-primitives/review-notice.d.ts +80 -0
- package/lib/ui/sdk/@dsc/ui-primitives/signal.d.ts +9 -0
- package/lib/ui/sdk/@dsc/ui-primitives/sizes.d.ts +15 -0
- package/lib/ui/sdk/@dsc/ui-primitives/skeleton.d.ts +39 -0
- package/lib/ui/sdk/@dsc/ui-primitives/snapshot.d.ts +46 -0
- package/lib/ui/sdk/@dsc/ui-primitives/thread-resizer.d.ts +3 -3
- package/lib/ui/sdk/@dsc/ui-primitives/throughput.d.ts +13 -0
- package/lib/ui/sdk/@dsc/ui-primitives/tokens.d.ts +9 -0
- package/lib/ui/sdk/@dsc/ui-primitives/tool-args.d.ts +1 -1
- package/lib/ui/sdk/@dsc/ui-primitives/tool-summary.d.ts +30 -6
- package/lib/ui/sdk/@dsc/ui-primitives/unified-diff.d.ts +10 -0
- package/lib/ui/sdk/@dsc/ui-renderer/boot.d.ts +10 -1
- package/lib/ui/sdk/@dsc/ui-renderer/cordis-host.d.ts +113 -0
- package/lib/ui/sdk/@dsc/ui-renderer/package.json +1 -1
- package/lib/ui/sdk/@dsc/ui-slots/package.json +1 -1
- package/lib/ui/services.d.ts +19 -8
- package/lib/ui/services.js +20 -12
- package/lib/ui/signal.d.ts +49 -0
- package/lib/ui/signal.js +57 -0
- package/lib/ui/tui-plugins.js +36 -16
- package/package.json +71 -58
- package/lib/remote/assets/app-DAcUCOEn.js +0 -14
- package/lib/ui/assets/app-B70nVIKd.js +0 -69
- package/lib/ui/assets/chunk-BGcgwlCI.js +0 -12
- package/lib/ui/assets/style-Bq01xH_b.css +0 -1
|
@@ -49,7 +49,7 @@ function TerminalTab({ active }) {
|
|
|
49
49
|
function TerminalPane({ shell, visible, onShell }) {
|
|
50
50
|
const hostRef = react.useRef(null);
|
|
51
51
|
const native = ui$1.getHostNative();
|
|
52
|
-
const cwd = ui$1.useHostSelector(readCwd);
|
|
52
|
+
const cwd = ui$1.useHostSelector(uiPrimitives.readCwd);
|
|
53
53
|
const sessionRef = react.useRef("");
|
|
54
54
|
const termRef = react.useRef(null);
|
|
55
55
|
const fitRef = react.useRef(null);
|
|
@@ -222,11 +222,5 @@ function readTheme() {
|
|
|
222
222
|
pick("cyan", "--dsc-cyan");
|
|
223
223
|
return theme;
|
|
224
224
|
}
|
|
225
|
-
function readCwd(snapshot) {
|
|
226
|
-
const status = snapshot?.["status"];
|
|
227
|
-
if (typeof status !== "object" || status === null) return null;
|
|
228
|
-
const value = status["cwd"];
|
|
229
|
-
return typeof value === "string" && value !== "" ? value : null;
|
|
230
|
-
}
|
|
231
225
|
exports.default = ui;
|
|
232
226
|
};
|
|
@@ -474,17 +474,10 @@ function TraceTimeline(props) {
|
|
|
474
474
|
function TraceInspector(props) {
|
|
475
475
|
const { entry } = props;
|
|
476
476
|
const [zoom, setZoom] = react.useState(null);
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
props.onClose();
|
|
482
|
-
};
|
|
483
|
-
window.addEventListener("keydown", onKey);
|
|
484
|
-
return () => {
|
|
485
|
-
window.removeEventListener("keydown", onKey);
|
|
486
|
-
};
|
|
487
|
-
}, [props]);
|
|
477
|
+
const dialog = uiPrimitives.useDialogFocus(true, () => {
|
|
478
|
+
setZoom(null);
|
|
479
|
+
props.onClose();
|
|
480
|
+
});
|
|
488
481
|
const usage = entryUsage(entry);
|
|
489
482
|
const usageTotal = usage === null ? null : usage.inputTokens + usage.outputTokens;
|
|
490
483
|
const title = entry.kind === "tool" ? `${entry.call.name}${props.round === null ? "" : ` · 第 ${String(props.round + 1)} 轮`}` : entry.kind === "user" && props.round !== null ? `第 ${String(props.round + 1)} 轮` : entry.kind === "plan" ? entry.plan.title : "";
|
|
@@ -497,6 +490,7 @@ function TraceInspector(props) {
|
|
|
497
490
|
role: "dialog",
|
|
498
491
|
"aria-modal": "true",
|
|
499
492
|
"aria-label": "这一条记录的检查器",
|
|
493
|
+
ref: dialog.ref,
|
|
500
494
|
children: [
|
|
501
495
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ti-head", children: [
|
|
502
496
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ti-kind", children: entry.kind === "text" ? "正文" : KIND_LABEL[entry.kind] }),
|
|
@@ -704,80 +698,6 @@ function Attachments({
|
|
|
704
698
|
index
|
|
705
699
|
)) });
|
|
706
700
|
}
|
|
707
|
-
const REVIEW_NOTICE_BANNER = "【文件更改预览·尚未落盘】";
|
|
708
|
-
const REVIEW_ACTION_TEXT = {
|
|
709
|
-
create: "新建",
|
|
710
|
-
update: "修改"
|
|
711
|
-
};
|
|
712
|
-
function escapeRegExp(text) {
|
|
713
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
714
|
-
}
|
|
715
|
-
const HEAD_PATTERN = new RegExp(`^${escapeRegExp(REVIEW_NOTICE_BANNER)}(新建|修改) (.+)(([^()]*))$`);
|
|
716
|
-
function parseCounts(text) {
|
|
717
|
-
const match = /^\+(\d+) 行 \/ -(\d+) 行$/.exec(text);
|
|
718
|
-
if (match === null) return null;
|
|
719
|
-
const added = Number(match[1]);
|
|
720
|
-
const removed = Number(match[2]);
|
|
721
|
-
return Number.isFinite(added) && Number.isFinite(removed) ? { added, removed } : null;
|
|
722
|
-
}
|
|
723
|
-
function parseAction(verb) {
|
|
724
|
-
if (verb === "新建") return "create";
|
|
725
|
-
if (verb === "修改") return "update";
|
|
726
|
-
return null;
|
|
727
|
-
}
|
|
728
|
-
function reviewLineKindOf(line) {
|
|
729
|
-
if (line.startsWith("@@")) return "hunk";
|
|
730
|
-
if (line.startsWith("+")) return "add";
|
|
731
|
-
if (line.startsWith("-")) return "remove";
|
|
732
|
-
if (line.startsWith(" ")) return "context";
|
|
733
|
-
if (line.startsWith("(") || line.startsWith("…")) return "note";
|
|
734
|
-
return line === "" ? "context" : "note";
|
|
735
|
-
}
|
|
736
|
-
function isReviewNotice(text) {
|
|
737
|
-
return text.startsWith(REVIEW_NOTICE_BANNER);
|
|
738
|
-
}
|
|
739
|
-
function parseReviewNotice(text) {
|
|
740
|
-
if (!isReviewNotice(text)) return null;
|
|
741
|
-
const at = text.indexOf("\n");
|
|
742
|
-
const head = at === -1 ? text : text.slice(0, at);
|
|
743
|
-
const rest = at === -1 ? "" : text.slice(at + 1);
|
|
744
|
-
const lines = (rest === "" ? [] : rest.split("\n")).map((line) => ({
|
|
745
|
-
kind: reviewLineKindOf(line),
|
|
746
|
-
text: line
|
|
747
|
-
}));
|
|
748
|
-
const match = HEAD_PATTERN.exec(head);
|
|
749
|
-
if (match === null) {
|
|
750
|
-
return { head, action: null, path: null, counts: null, countsText: null, lines };
|
|
751
|
-
}
|
|
752
|
-
const countsText = match[3] ?? "";
|
|
753
|
-
return {
|
|
754
|
-
head,
|
|
755
|
-
action: parseAction(match[1] ?? ""),
|
|
756
|
-
// 路径**不 trim**:它原样进 title 与展示,动一个字符就可能是另一个文件
|
|
757
|
-
path: match[2] ?? "",
|
|
758
|
-
counts: parseCounts(countsText),
|
|
759
|
-
countsText,
|
|
760
|
-
lines
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
function ReviewNoticeCard({ notice, cwd }) {
|
|
764
|
-
const path = notice.path;
|
|
765
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "entry-review", "data-review-notice": "", "data-action": notice.action ?? void 0, children: [
|
|
766
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "entry-review-head", children: [
|
|
767
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui$1.FileIcon, { name: path ?? "", size: 14, className: "entry-review-icon" }),
|
|
768
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "entry-review-path", title: path ?? notice.head, children: path === null ? notice.head : uiPrimitives.displayPathOf(path, cwd) }),
|
|
769
|
-
notice.action !== null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: notice.action === "create" ? "diff-badge" : "entry-review-badge", children: REVIEW_ACTION_TEXT[notice.action] }) : null,
|
|
770
|
-
notice.counts !== null ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "changes-counts", children: [
|
|
771
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "changes-added", children: `+${String(notice.counts.added)} 行` }),
|
|
772
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "changes-removed", children: `-${String(notice.counts.removed)} 行` })
|
|
773
|
-
] }) : notice.countsText === null || notice.countsText === "" ? null : (
|
|
774
|
-
// 算不出逐行 diff 时宿主写「逐行 diff 未给出」——中性一行,不装成计数。
|
|
775
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "entry-review-counts", children: notice.countsText })
|
|
776
|
-
)
|
|
777
|
-
] }),
|
|
778
|
-
notice.lines.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "entry-review-diff", children: notice.lines.map((line, at) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "entry-review-line", "data-kind": line.kind, children: line.text }, String(at))) })
|
|
779
|
-
] });
|
|
780
|
-
}
|
|
781
701
|
const THINK_PREVIEW_LIMIT = 90;
|
|
782
702
|
const TRACE_PAUSE_EPS = 120;
|
|
783
703
|
const AT_BOTTOM_EPS = 32;
|
|
@@ -793,9 +713,9 @@ const ui = ui$1.defineUiPlugin({
|
|
|
793
713
|
}
|
|
794
714
|
});
|
|
795
715
|
function TraceView(props) {
|
|
796
|
-
const entries = ui$1.useHostSelector(readEntries);
|
|
797
|
-
const live = ui$1.useHostSelector(readLive);
|
|
798
|
-
const sessionPath = ui$1.useHostSelector(readSessionPath);
|
|
716
|
+
const entries = ui$1.useHostSelector(uiPrimitives.readEntries);
|
|
717
|
+
const live = ui$1.useHostSelector(uiPrimitives.readLive);
|
|
718
|
+
const sessionPath = ui$1.useHostSelector(uiPrimitives.readSessionPath);
|
|
799
719
|
const usage = ui$1.useHostSelector(readUsage);
|
|
800
720
|
const all = react.useMemo(() => [...entries, ...live], [entries, live]);
|
|
801
721
|
const model = react.useMemo(() => buildTraceModel(all), [all]);
|
|
@@ -960,80 +880,82 @@ function TraceView(props) {
|
|
|
960
880
|
};
|
|
961
881
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "trace-page", children: [
|
|
962
882
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "chat", ref: scroller, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chat-inner trace", children: [
|
|
963
|
-
/* @__PURE__ */ jsxRuntime.
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
/* @__PURE__ */ jsxRuntime.
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
"
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
"
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
883
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "trace-head", children: [
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
885
|
+
TraceTimeline,
|
|
886
|
+
{
|
|
887
|
+
marks: model.marks,
|
|
888
|
+
boundaries: model.boundaries,
|
|
889
|
+
spanStart: model.spanStart,
|
|
890
|
+
spanEnd: model.spanEnd,
|
|
891
|
+
selected,
|
|
892
|
+
selectedCount: hitIds.size,
|
|
893
|
+
resetKey: sessionPath ?? "",
|
|
894
|
+
onSelect: setSelected
|
|
895
|
+
}
|
|
896
|
+
),
|
|
897
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "trace-stats", "data-trace-query": search === null ? void 0 : "1", children: [
|
|
898
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
899
|
+
rounds.length,
|
|
900
|
+
" 轮"
|
|
901
|
+
] }),
|
|
902
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
903
|
+
toolCount,
|
|
904
|
+
" 次工具调用"
|
|
905
|
+
] }),
|
|
906
|
+
usage !== null && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
907
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui$1.IconCoins, { size: 12 }),
|
|
908
|
+
" ",
|
|
909
|
+
uiPrimitives.formatTokens(usage),
|
|
910
|
+
" tok"
|
|
911
|
+
] }),
|
|
912
|
+
selected !== null && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "trace-focus-chip", "data-trace-focus": "1", children: [
|
|
913
|
+
"已聚焦区间内 ",
|
|
914
|
+
hitIds.size,
|
|
915
|
+
" 步"
|
|
916
|
+
] }),
|
|
917
|
+
search !== null && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "trace-focus-chip", "data-trace-search-count": "1", children: [
|
|
918
|
+
"搜索命中 ",
|
|
919
|
+
search.count,
|
|
920
|
+
" 步"
|
|
921
|
+
] }),
|
|
922
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: "text-btn trace-toggle-all", onClick: toggleAll, children: allOpen ? "全部折叠" : "全部展开" }),
|
|
923
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "trace-search", children: [
|
|
924
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui$1.IconSearch, { size: 12 }),
|
|
925
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
926
|
+
"input",
|
|
927
|
+
{
|
|
928
|
+
type: "search",
|
|
929
|
+
className: "trace-search-input",
|
|
930
|
+
"data-trace-search": "1",
|
|
931
|
+
placeholder: "搜索步骤(工具名、参数、输出…)",
|
|
932
|
+
"aria-label": "搜索轨迹里的步骤",
|
|
933
|
+
value: query,
|
|
934
|
+
onChange: (event) => {
|
|
935
|
+
setQuery(event.currentTarget.value);
|
|
936
|
+
},
|
|
937
|
+
onKeyDown: (event) => {
|
|
938
|
+
if (event.key !== "Escape") return;
|
|
939
|
+
event.stopPropagation();
|
|
940
|
+
setQuery("");
|
|
941
|
+
}
|
|
1020
942
|
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
)
|
|
943
|
+
),
|
|
944
|
+
query === "" ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
945
|
+
"button",
|
|
946
|
+
{
|
|
947
|
+
type: "button",
|
|
948
|
+
className: "trace-search-clear",
|
|
949
|
+
"data-trace-search-clear": "1",
|
|
950
|
+
"data-tip": "清空搜索(Esc 也行)",
|
|
951
|
+
"aria-label": "清空搜索",
|
|
952
|
+
onClick: () => {
|
|
953
|
+
setQuery("");
|
|
954
|
+
},
|
|
955
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ui$1.IconClose, { size: 10 })
|
|
956
|
+
}
|
|
957
|
+
)
|
|
958
|
+
] })
|
|
1037
959
|
] })
|
|
1038
960
|
] }),
|
|
1039
961
|
search !== null && search.count === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "trace-empty", "data-trace-search-empty": "1", children: [
|
|
@@ -1278,11 +1200,11 @@ function StepRow({
|
|
|
1278
1200
|
);
|
|
1279
1201
|
}
|
|
1280
1202
|
function TraceSystemStep({ text }) {
|
|
1281
|
-
const notice = parseReviewNotice(text);
|
|
1203
|
+
const notice = uiPrimitives.parseReviewNotice(text);
|
|
1282
1204
|
if (notice === null) {
|
|
1283
1205
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "trace-sys", "data-tip": text, children: text });
|
|
1284
1206
|
}
|
|
1285
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "trace-review", children: /* @__PURE__ */ jsxRuntime.jsx(ReviewNoticeCard, { notice, cwd: "" }) });
|
|
1207
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "trace-review", children: /* @__PURE__ */ jsxRuntime.jsx(uiPrimitives.ReviewNoticeCard, { notice, cwd: "" }) });
|
|
1286
1208
|
}
|
|
1287
1209
|
function TraceStatus(props) {
|
|
1288
1210
|
const call = props.call;
|
|
@@ -1325,7 +1247,7 @@ function TraceToolRow({ entry }) {
|
|
|
1325
1247
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "tool-dot", "aria-hidden": "true" }),
|
|
1326
1248
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 14, className: "tool-icon" }),
|
|
1327
1249
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "verb", children: uiPrimitives.toolVerb(match.base, call.status) }),
|
|
1328
|
-
match.known ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "name", children: call.name }),
|
|
1250
|
+
match.known ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "name", children: `· ${call.name}` }),
|
|
1329
1251
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "preview", children: summary }),
|
|
1330
1252
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "status", children: [
|
|
1331
1253
|
call.status === "running" ? /* @__PURE__ */ jsxRuntime.jsx("i", { className: "tc-spin", "aria-hidden": "true" }) : null,
|
|
@@ -1346,21 +1268,6 @@ function TraceToolRow({ entry }) {
|
|
|
1346
1268
|
] }) : null
|
|
1347
1269
|
] });
|
|
1348
1270
|
}
|
|
1349
|
-
const NO_ENTRIES = Object.freeze([]);
|
|
1350
|
-
function readEntries(snapshot) {
|
|
1351
|
-
const value = snapshot?.entries;
|
|
1352
|
-
return Array.isArray(value) ? value : NO_ENTRIES;
|
|
1353
|
-
}
|
|
1354
|
-
function readLive(snapshot) {
|
|
1355
|
-
const value = snapshot?.liveEntries;
|
|
1356
|
-
return Array.isArray(value) ? value : NO_ENTRIES;
|
|
1357
|
-
}
|
|
1358
|
-
function readSessionPath(snapshot) {
|
|
1359
|
-
const status = snapshot?.["status"];
|
|
1360
|
-
if (typeof status !== "object" || status === null) return null;
|
|
1361
|
-
const value = status["sessionPath"];
|
|
1362
|
-
return typeof value === "string" ? value : null;
|
|
1363
|
-
}
|
|
1364
1271
|
function readUsage(snapshot) {
|
|
1365
1272
|
const status = snapshot?.["status"];
|
|
1366
1273
|
if (typeof status !== "object" || status === null) return null;
|