@toddzheng024/dscode-desktop 0.0.0-stage → 0.7.33
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/LICENSE +21 -0
- package/README.md +120 -2
- package/THIRD_PARTY_NOTICES.md +30 -0
- package/bin/apply_patch +9 -0
- package/cordis.patch.yml +433 -0
- package/docs/CHANGELOG.md +641 -0
- package/docs/account-login.md +44 -0
- package/docs/auto-review.md +128 -0
- package/docs/browser-use.md +783 -0
- package/docs/computer-use.md +81 -0
- package/docs/custom-providers.md +88 -0
- package/docs/demo.md +76 -0
- package/docs/distribution.md +58 -0
- package/docs/dscode-ultra.md +75 -0
- package/docs/email.md +296 -0
- package/docs/exec.md +40 -0
- package/docs/hub-distribution.md +190 -0
- package/docs/memory.md +121 -0
- package/docs/opencode-go.md +61 -0
- package/docs/plugin-hub.md +68 -0
- package/docs/releases/0.2.0.md +28 -0
- package/docs/releases/0.3.0.md +21 -0
- package/docs/releases/0.4.0.md +20 -0
- package/docs/releases/0.5.0.md +19 -0
- package/docs/releases/0.6.0.md +20 -0
- package/docs/releases/0.7.0.md +22 -0
- package/docs/releases/0.7.1.md +20 -0
- package/docs/releases/0.7.10.md +10 -0
- package/docs/releases/0.7.11.md +17 -0
- package/docs/releases/0.7.12.md +11 -0
- package/docs/releases/0.7.13.md +12 -0
- package/docs/releases/0.7.14.md +11 -0
- package/docs/releases/0.7.15.md +11 -0
- package/docs/releases/0.7.16.md +10 -0
- package/docs/releases/0.7.17.md +12 -0
- package/docs/releases/0.7.18.md +13 -0
- package/docs/releases/0.7.19.md +8 -0
- package/docs/releases/0.7.2.md +19 -0
- package/docs/releases/0.7.20.md +10 -0
- package/docs/releases/0.7.21.md +9 -0
- package/docs/releases/0.7.22.md +11 -0
- package/docs/releases/0.7.23.md +14 -0
- package/docs/releases/0.7.24.md +11 -0
- package/docs/releases/0.7.25.md +8 -0
- package/docs/releases/0.7.26.md +18 -0
- package/docs/releases/0.7.27.md +8 -0
- package/docs/releases/0.7.28.md +22 -0
- package/docs/releases/0.7.29.md +12 -0
- package/docs/releases/0.7.3.md +23 -0
- package/docs/releases/0.7.30.md +19 -0
- package/docs/releases/0.7.31.md +14 -0
- package/docs/releases/0.7.32.md +14 -0
- package/docs/releases/0.7.33.md +30 -0
- package/docs/releases/0.7.4.md +16 -0
- package/docs/releases/0.7.5.md +18 -0
- package/docs/releases/0.7.6.md +29 -0
- package/docs/releases/0.7.7.md +36 -0
- package/docs/releases/0.7.8.md +14 -0
- package/docs/releases/0.7.9.md +15 -0
- package/docs/session-bridge.md +80 -0
- package/docs/session-cards.md +53 -0
- package/docs/session-communication.md +186 -0
- package/docs/session-metrics.md +41 -0
- package/docs/skills.md +81 -0
- package/docs/triggers.md +338 -0
- package/docs/tui-commands.md +204 -0
- package/extensions/browser/manifest.json +22 -0
- package/extensions/browser/popup.css +6 -0
- package/extensions/browser/popup.html +11 -0
- package/extensions/browser/popup.mjs +47 -0
- package/extensions/browser/protocol.mjs +168 -0
- package/extensions/browser/worker.mjs +94 -0
- package/icon.svg +7 -0
- package/locale/en.json +6 -0
- package/locale/zh-cn.json +6 -0
- package/node_modules/@deepseek-ai/node-addon-system/LICENSE +21 -0
- package/node_modules/@deepseek-ai/node-addon-system/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system/README.md +15 -0
- package/node_modules/@deepseek-ai/node-addon-system/README.zh.md +15 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/flock.d.ts +13 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/flock.js +51 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/index.d.ts +73 -0
- package/node_modules/@deepseek-ai/node-addon-system/lib/index.js +98 -0
- package/node_modules/@deepseek-ai/node-addon-system/package.json +45 -0
- package/node_modules/@deepseek-ai/node-addon-system/src/flock.c +164 -0
- package/node_modules/@deepseek-ai/node-addon-system/src/main.c +298 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.zh.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/bin/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/prebuilds.json +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.zh.md +9 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/bin/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-darwin-x64/prebuilds.json +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.zh.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/glibc/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/landlock-run +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/bin/musl/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-arm64/prebuilds.json +24 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/LICENSE +28 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.zh.md +11 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/glibc/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/landlock-run +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/bin/musl/system.node +0 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/package.json +31 -0
- package/node_modules/@deepseek-ai/node-addon-system-linux-x64/prebuilds.json +24 -0
- package/package.json +156 -4
- package/plugins/account/index.mjs +178 -0
- package/plugins/account/state.mjs +123 -0
- package/plugins/auto-review/audit.mjs +24 -0
- package/plugins/auto-review/index.mjs +267 -0
- package/plugins/auto-review/policy.mjs +92 -0
- package/plugins/browser/SKILL.md +158 -0
- package/plugins/browser/access.mjs +143 -0
- package/plugins/browser/config.mjs +60 -0
- package/plugins/browser/connection.mjs +385 -0
- package/plugins/browser/desktop-client.mjs +282 -0
- package/plugins/browser/desktop-host.mjs +74 -0
- package/plugins/browser/document-identity.mjs +57 -0
- package/plugins/browser/extension-relay.mjs +66 -0
- package/plugins/browser/files.mjs +32 -0
- package/plugins/browser/index.mjs +235 -0
- package/plugins/browser/mcp-entry.mjs +18 -0
- package/plugins/browser/mcp-tools.mjs +21 -0
- package/plugins/browser/presentation.mjs +45 -0
- package/plugins/browser/preview.mjs +77 -0
- package/plugins/browser/review.mjs +20 -0
- package/plugins/browser/screenshots.mjs +35 -0
- package/plugins/clipboard-image/clipboard-image.swift +56 -0
- package/plugins/clipboard-image/index.mjs +70 -0
- package/plugins/code-review/baseline.mjs +143 -0
- package/plugins/code-review/git.mjs +163 -0
- package/plugins/code-review/index.mjs +236 -0
- package/plugins/compaction/engine.mjs +304 -0
- package/plugins/compaction/tetris.mjs +65 -0
- package/plugins/compaction/threshold.mjs +98 -0
- package/plugins/computer-use/DESKTOP-SKILL.md +64 -0
- package/plugins/computer-use/desktop-host.mjs +75 -0
- package/plugins/computer-use/desktop-skill.mjs +28 -0
- package/plugins/computer-use/desktop-upstream.mjs +3 -0
- package/plugins/computer-use/index.mjs +37 -0
- package/plugins/cordis-config/plain.mjs +31 -0
- package/plugins/credentials/index.mjs +73 -0
- package/plugins/custom/adapter.mjs +110 -0
- package/plugins/custom/config.mjs +85 -0
- package/plugins/custom/desktop-client.mjs +150 -0
- package/plugins/custom/desktop-host.mjs +78 -0
- package/plugins/custom/images.mjs +32 -0
- package/plugins/custom/index.mjs +145 -0
- package/plugins/custom/wire.mjs +179 -0
- package/plugins/desktop/client.mjs +1041 -0
- package/plugins/desktop/index.mjs +10 -0
- package/plugins/desktop/shell-environment.mjs +9 -0
- package/plugins/desktop-workspace/hooks.mjs +29 -0
- package/plugins/desktop-workspace/index.mjs +37 -0
- package/plugins/dscode/board.mjs +260 -0
- package/plugins/dscode/child-target.mjs +11 -0
- package/plugins/dscode/control.mjs +17 -0
- package/plugins/dscode/desktop-client.mjs +55 -0
- package/plugins/dscode/desktop-host.mjs +37 -0
- package/plugins/dscode/index.mjs +270 -0
- package/plugins/email/cli.mjs +32 -0
- package/plugins/email/contacts.mjs +36 -0
- package/plugins/email/desktop-client.mjs +117 -0
- package/plugins/email/desktop-host.mjs +54 -0
- package/plugins/email/desktop-service.mjs +106 -0
- package/plugins/email/gmail-oauth.mjs +69 -0
- package/plugins/email/gmail-store.mjs +2 -0
- package/plugins/email/gmail.mjs +194 -0
- package/plugins/email/imap.mjs +136 -0
- package/plugins/email/inbox.d.mts +25 -0
- package/plugins/email/inbox.mjs +76 -0
- package/plugins/email/smtp.mjs +70 -0
- package/plugins/email/store.mjs +32 -0
- package/plugins/email-tools/index.mjs +46 -0
- package/plugins/exec/cli.mjs +64 -0
- package/plugins/exec/index.mjs +112 -0
- package/plugins/grok/adapter.mjs +114 -0
- package/plugins/grok/auth.mjs +76 -0
- package/plugins/grok/billing.mjs +146 -0
- package/plugins/grok/index.mjs +122 -0
- package/plugins/grok/models.mjs +129 -0
- package/plugins/grok/status.mjs +28 -0
- package/plugins/grok/wire.mjs +268 -0
- package/plugins/hub/catalog.mjs +82 -0
- package/plugins/hub/desktop-client.mjs +114 -0
- package/plugins/hub/desktop-host.mjs +129 -0
- package/plugins/i18n/messages.d.mts +21 -0
- package/plugins/i18n/messages.mjs +537 -0
- package/plugins/jev/approval.mjs +131 -0
- package/plugins/jev/client.mjs +74 -0
- package/plugins/jev/index.mjs +99 -0
- package/plugins/memory/content.mjs +57 -0
- package/plugins/memory/desktop-host.mjs +3 -0
- package/plugins/memory/index.mjs +168 -0
- package/plugins/memory/pipeline.mjs +79 -0
- package/plugins/memory/store.mjs +93 -0
- package/plugins/message-source/kind.mjs +20 -0
- package/plugins/opencode-go/adapter.mjs +96 -0
- package/plugins/opencode-go/command.mjs +128 -0
- package/plugins/opencode-go/index.mjs +120 -0
- package/plugins/opencode-go/models.mjs +58 -0
- package/plugins/opencode-go/oauth.mjs +194 -0
- package/plugins/opencode-go/search.mjs +86 -0
- package/plugins/opencode-go/usage.mjs +119 -0
- package/plugins/opencode-go/version.mjs +10 -0
- package/plugins/opencode-go/wire.mjs +73 -0
- package/plugins/openrouter/adapter.mjs +232 -0
- package/plugins/openrouter/index.mjs +123 -0
- package/plugins/openrouter/models.mjs +157 -0
- package/plugins/openrouter/search.mjs +113 -0
- package/plugins/openrouter/wire.mjs +101 -0
- package/plugins/providers/catalog.mjs +160 -0
- package/plugins/providers/chat-messages.mjs +120 -0
- package/plugins/providers/chat-stream.mjs +174 -0
- package/plugins/providers/desktop-client.mjs +84 -0
- package/plugins/providers/desktop-host.mjs +63 -0
- package/plugins/providers/effort.mjs +35 -0
- package/plugins/providers/http-errors.mjs +50 -0
- package/plugins/providers/openrouter-account.mjs +171 -0
- package/plugins/session-bridge/client.mjs +106 -0
- package/plugins/session-bridge/communication.mjs +260 -0
- package/plugins/session-bridge/index.mjs +68 -0
- package/plugins/session-bridge/mailbox.mjs +267 -0
- package/plugins/session-bridge/paths.mjs +21 -0
- package/plugins/session-bridge/server.mjs +172 -0
- package/plugins/session-bridge/tasks.mjs +229 -0
- package/plugins/session-cards/content.mjs +64 -0
- package/plugins/session-cards/index.mjs +38 -0
- package/plugins/session-cards/manager.mjs +140 -0
- package/plugins/session-metrics/attribution.mjs +30 -0
- package/plugins/session-metrics/balance.mjs +81 -0
- package/plugins/session-metrics/desktop-client.mjs +62 -0
- package/plugins/session-metrics/desktop-host.mjs +46 -0
- package/plugins/session-metrics/index.mjs +96 -0
- package/plugins/session-metrics/pricing.mjs +84 -0
- package/plugins/session-metrics/rate.mjs +59 -0
- package/plugins/session-metrics/store.mjs +75 -0
- package/plugins/session-metrics/turns.mjs +134 -0
- package/plugins/session-metrics/view.mjs +271 -0
- package/plugins/time-marks/desktop-host.mjs +2 -0
- package/plugins/time-marks/index.mjs +116 -0
- package/plugins/time-marks/marks.mjs +152 -0
- package/plugins/triggers/cli.mjs +558 -0
- package/plugins/triggers/commands.mjs +143 -0
- package/plugins/triggers/config.mjs +264 -0
- package/plugins/triggers/desktop-client.mjs +155 -0
- package/plugins/triggers/desktop-host.mjs +88 -0
- package/plugins/triggers/desktop-management.mjs +97 -0
- package/plugins/triggers/desktop-scheduler.mjs +125 -0
- package/plugins/triggers/host.mjs +24 -0
- package/plugins/triggers/index.mjs +27 -0
- package/plugins/triggers/job-cli.mjs +110 -0
- package/plugins/triggers/jobs.mjs +156 -0
- package/plugins/triggers/launchd.mjs +101 -0
- package/plugins/triggers/lease.mjs +24 -0
- package/plugins/triggers/log.mjs +104 -0
- package/plugins/triggers/management.mjs +181 -0
- package/plugins/triggers/options.mjs +117 -0
- package/plugins/triggers/overlay.mjs +7 -0
- package/plugins/triggers/poll.mjs +65 -0
- package/plugins/triggers/run.mjs +157 -0
- package/plugins/triggers/schedule.mjs +40 -0
- package/plugins/triggers/scheduler-service.mjs +46 -0
- package/plugins/triggers/scheduler.mjs +92 -0
- package/plugins/triggers/session-run.mjs +125 -0
- package/plugins/triggers/session.mjs +48 -0
- package/plugins/triggers/source-emit.mjs +19 -0
- package/plugins/triggers/source-host.mjs +78 -0
- package/plugins/triggers/source-ingress.mjs +70 -0
- package/plugins/triggers/source-sandbox.mjs +35 -0
- package/plugins/triggers/sources.mjs +45 -0
- package/plugins/triggers/spool.mjs +145 -0
- package/plugins/triggers/tools.mjs +67 -0
- package/plugins/triggers/unattended.mjs +18 -0
- package/plugins/tui-tools/composition.mjs +28 -0
- package/plugins/tui-tools/desktop-host.mjs +2 -0
- package/plugins/tui-tools/doctor-cli.mjs +22 -0
- package/plugins/tui-tools/doctor.mjs +148 -0
- package/plugins/tui-tools/hook-sources.mjs +113 -0
- package/plugins/tui-tools/hooks.mjs +23 -0
- package/plugins/tui-tools/index.mjs +268 -0
- package/plugins/tui-tools/sandbox-runner.mjs +123 -0
- package/plugins/tui-tools/shell.mjs +27 -0
- package/plugins/tui-tools/update.mjs +111 -0
- package/plugins/tui-tools/workspace-discovery.mjs +129 -0
- package/plugins/ultra/policy.mjs +42 -0
- package/plugins/worktree-subagent/worktree.mjs +56 -0
- package/runtime-sources.json +94 -0
- package/vendor/bash/LICENSE +21 -0
- package/vendor/bash/index.js +717 -0
- package/vendor/bash/types/background.d.ts +50 -0
- package/vendor/bash/types/index.d.ts +38 -0
- package/vendor/bash/types/render.d.ts +57 -0
- package/vendor/command-goal/LICENSE +21 -0
- package/vendor/command-goal/index.js +210 -0
- package/vendor/command-goal/types/index.d.ts +10 -0
- package/vendor/computer-use/LICENSE +21 -0
- package/vendor/computer-use/lib/approval-policy.js +12 -0
- package/vendor/computer-use/lib/approval-policy.js.map +1 -0
- package/vendor/computer-use/lib/artifacts.js +79 -0
- package/vendor/computer-use/lib/artifacts.js.map +1 -0
- package/vendor/computer-use/lib/backend.js +3 -0
- package/vendor/computer-use/lib/backend.js.map +1 -0
- package/vendor/computer-use/lib/client.js +369 -0
- package/vendor/computer-use/lib/client.js.map +1 -0
- package/vendor/computer-use/lib/config.js +159 -0
- package/vendor/computer-use/lib/config.js.map +1 -0
- package/vendor/computer-use/lib/confirmations.js +99 -0
- package/vendor/computer-use/lib/confirmations.js.map +1 -0
- package/vendor/computer-use/lib/diff.js +58 -0
- package/vendor/computer-use/lib/diff.js.map +1 -0
- package/vendor/computer-use/lib/errors.js +22 -0
- package/vendor/computer-use/lib/errors.js.map +1 -0
- package/vendor/computer-use/lib/exposure.js +244 -0
- package/vendor/computer-use/lib/exposure.js.map +1 -0
- package/vendor/computer-use/lib/index.js +66 -0
- package/vendor/computer-use/lib/index.js.map +1 -0
- package/vendor/computer-use/lib/leases.js +262 -0
- package/vendor/computer-use/lib/leases.js.map +1 -0
- package/vendor/computer-use/lib/providers/macos.js +243 -0
- package/vendor/computer-use/lib/providers/macos.js.map +1 -0
- package/vendor/computer-use/lib/providers/native-helper.js +726 -0
- package/vendor/computer-use/lib/providers/native-helper.js.map +1 -0
- package/vendor/computer-use/lib/providers/unsupported.js +51 -0
- package/vendor/computer-use/lib/providers/unsupported.js.map +1 -0
- package/vendor/computer-use/lib/service.js +608 -0
- package/vendor/computer-use/lib/service.js.map +1 -0
- package/vendor/computer-use/lib/skill.js +136 -0
- package/vendor/computer-use/lib/skill.js.map +1 -0
- package/vendor/computer-use/lib/target-resolver.js +180 -0
- package/vendor/computer-use/lib/target-resolver.js.map +1 -0
- package/vendor/computer-use/lib/tools.js +511 -0
- package/vendor/computer-use/lib/tools.js.map +1 -0
- package/vendor/computer-use/lib/types/approval-policy.d.ts +13 -0
- package/vendor/computer-use/lib/types/approval-policy.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/artifacts.d.ts +10 -0
- package/vendor/computer-use/lib/types/artifacts.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/backend.d.ts +124 -0
- package/vendor/computer-use/lib/types/backend.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/client/index.d.ts +83 -0
- package/vendor/computer-use/lib/types/client/index.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/config.d.ts +94 -0
- package/vendor/computer-use/lib/types/config.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/confirmations.d.ts +23 -0
- package/vendor/computer-use/lib/types/confirmations.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/diff.d.ts +5 -0
- package/vendor/computer-use/lib/types/diff.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/errors.d.ts +15 -0
- package/vendor/computer-use/lib/types/errors.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/exposure.d.ts +30 -0
- package/vendor/computer-use/lib/types/exposure.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/index.d.ts +21 -0
- package/vendor/computer-use/lib/types/index.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/leases.d.ts +81 -0
- package/vendor/computer-use/lib/types/leases.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/providers/macos.d.ts +39 -0
- package/vendor/computer-use/lib/types/providers/macos.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/providers/native-helper.d.ts +48 -0
- package/vendor/computer-use/lib/types/providers/native-helper.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/providers/unsupported.d.ts +23 -0
- package/vendor/computer-use/lib/types/providers/unsupported.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/service.d.ts +58 -0
- package/vendor/computer-use/lib/types/service.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/skill.d.ts +14 -0
- package/vendor/computer-use/lib/types/skill.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/target-resolver.d.ts +38 -0
- package/vendor/computer-use/lib/types/target-resolver.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/tools.d.ts +6 -0
- package/vendor/computer-use/lib/types/tools.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/types.d.ts +270 -0
- package/vendor/computer-use/lib/types/types.d.ts.map +1 -0
- package/vendor/computer-use/lib/types/web.d.ts +33 -0
- package/vendor/computer-use/lib/types/web.d.ts.map +1 -0
- package/vendor/computer-use/lib/types.js +9 -0
- package/vendor/computer-use/lib/types.js.map +1 -0
- package/vendor/computer-use/lib/web.js +188 -0
- package/vendor/computer-use/lib/web.js.map +1 -0
- package/vendor/computer-use/native/macos/Sources/Fixture/main.swift +412 -0
- package/vendor/computer-use/native/macos/Sources/Helper/CursorImage.swift +11 -0
- package/vendor/computer-use/native/macos/Sources/Helper/CursorMotion.swift +67 -0
- package/vendor/computer-use/native/macos/Sources/Helper/CursorOverlay.swift +840 -0
- package/vendor/computer-use/native/macos/Sources/Helper/TargetedPointer.swift +327 -0
- package/vendor/computer-use/native/macos/Sources/Helper/WindowNumberMatcher.swift +29 -0
- package/vendor/computer-use/native/macos/Sources/Helper/main.swift +1244 -0
- package/vendor/computer-use/native/macos/Sources/Monitor/main.swift +153 -0
- package/vendor/computer-use/native/macos/bin/dsh-computer-use-helper +0 -0
- package/vendor/computer-use/native/macos/manifest.json +14 -0
- package/vendor/persistent/LICENSE +21 -0
- package/vendor/persistent/index.js +411 -0
- package/vendor/persistent/types/index.d.ts +24 -0
- package/vendor/subagent/LICENSE +21 -0
- package/vendor/subagent/index.js +694 -0
- package/vendor/subagent/invariant.js +52 -0
- package/vendor/subagent/model-selection-settings.js +68 -0
- package/vendor/subagent/types/index.d.ts +82 -0
- package/vendor/subagent/types/invariant.d.ts +16 -0
- package/vendor/subagent/types/list-models.d.ts +10 -0
- package/vendor/subagent/types/model-selection-settings.d.ts +45 -0
- package/vendor/subagent/types/model-selection-state.d.ts +48 -0
- package/vendor/subagent/types/model-selection.d.ts +81 -0
- package/vendor/subagent-core/LICENSE +21 -0
- package/vendor/subagent-core/index.js +3202 -0
- package/vendor/subagent-core/invariant.js +76 -0
- package/vendor/subagent-core/typert.host.d.ts +3 -0
- package/vendor/subagent-core/typert.host.js +978 -0
- package/vendor/subagent-core/typert.remote-client.d.ts +25 -0
- package/vendor/subagent-core/typert.remote-client.js +114 -0
- package/vendor/subagent-core/types/archive-admission.d.ts +16 -0
- package/vendor/subagent-core/types/archive-admission.js +151 -0
- package/vendor/subagent-core/types/assistant-output.d.ts +48 -0
- package/vendor/subagent-core/types/assistant-output.js +73 -0
- package/vendor/subagent-core/types/catalog.d.ts +84 -0
- package/vendor/subagent-core/types/catalog.js +109 -0
- package/vendor/subagent-core/types/child-agent.d.ts +156 -0
- package/vendor/subagent-core/types/child-agent.js +213 -0
- package/vendor/subagent-core/types/client.d.ts +8 -0
- package/vendor/subagent-core/types/client.js +7 -0
- package/vendor/subagent-core/types/continuation-activation.d.ts +267 -0
- package/vendor/subagent-core/types/continuation-activation.js +700 -0
- package/vendor/subagent-core/types/continuation-messages.d.ts +62 -0
- package/vendor/subagent-core/types/continuation-messages.js +106 -0
- package/vendor/subagent-core/types/continuation.d.ts +124 -0
- package/vendor/subagent-core/types/continuation.js +455 -0
- package/vendor/subagent-core/types/control-types.d.ts +135 -0
- package/vendor/subagent-core/types/control-types.js +8 -0
- package/vendor/subagent-core/types/control.d.ts +45 -0
- package/vendor/subagent-core/types/control.js +79 -0
- package/vendor/subagent-core/types/depth.d.ts +31 -0
- package/vendor/subagent-core/types/depth.js +39 -0
- package/vendor/subagent-core/types/descriptor.d.ts +144 -0
- package/vendor/subagent-core/types/descriptor.js +193 -0
- package/vendor/subagent-core/types/error.d.ts +11 -0
- package/vendor/subagent-core/types/error.js +14 -0
- package/vendor/subagent-core/types/inbox.d.ts +43 -0
- package/vendor/subagent-core/types/inbox.js +61 -0
- package/vendor/subagent-core/types/index.d.ts +320 -0
- package/vendor/subagent-core/types/index.js +475 -0
- package/vendor/subagent-core/types/internal.d.ts +58 -0
- package/vendor/subagent-core/types/internal.js +58 -0
- package/vendor/subagent-core/types/invariant.d.ts +13 -0
- package/vendor/subagent-core/types/invariant.js +91 -0
- package/vendor/subagent-core/types/lifecycle.d.ts +113 -0
- package/vendor/subagent-core/types/lifecycle.js +180 -0
- package/vendor/subagent-core/types/list-children.d.ts +36 -0
- package/vendor/subagent-core/types/list-children.js +166 -0
- package/vendor/subagent-core/types/out-of-process.d.ts +118 -0
- package/vendor/subagent-core/types/out-of-process.js +219 -0
- package/vendor/subagent-core/types/projection-types.d.ts +82 -0
- package/vendor/subagent-core/types/projection-types.js +7 -0
- package/vendor/subagent-core/types/projection.d.ts +100 -0
- package/vendor/subagent-core/types/projection.js +157 -0
- package/vendor/subagent-core/types/run-settlement.d.ts +17 -0
- package/vendor/subagent-core/types/run-settlement.js +70 -0
- package/vendor/subagent-core/types/types.d.ts +377 -0
- package/vendor/subagent-core/types/types.js +19 -0
- package/vendor/subagent-driver/LICENSE +21 -0
- package/vendor/subagent-driver/index.js +255 -0
- package/vendor/subagent-driver/types/index.d.ts +33 -0
- package/vendor/subagent-driver/types/structured.d.ts +42 -0
- package/vendor/subagent-fork/LICENSE +21 -0
- package/vendor/subagent-fork/index.js +61 -0
- package/vendor/subagent-fork/types/index.d.ts +20 -0
- package/vendor/subagent-spawn/LICENSE +21 -0
- package/vendor/subagent-spawn/index.js +45 -0
- package/vendor/subagent-spawn/types/index.d.ts +19 -0
- package/vendor/terminal/LICENSE +21 -0
- package/vendor/terminal/index.js +1093 -0
- package/vendor/terminal/types/config.d.ts +82 -0
- package/vendor/terminal/types/index.d.ts +36 -0
- package/vendor/terminal/types/sanitize.d.ts +47 -0
- package/vendor/terminal/types/session.d.ts +87 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# One session, many sources
|
|
2
|
+
|
|
3
|
+
Supported since DSCODE 0.2.0. A running dscode Host holds the single Agent/session; other terminals and scripts attach to it over a Unix socket. A client never starts another Harness, resumes a session, or opens a session write handle.
|
|
4
|
+
|
|
5
|
+
Built-in agent communication tools, `defer` notes, a persisted mailbox and anti-loop budgets are covered in [Agent-to-agent tasks](session-communication.md). The read/watch cursors below still belong to the native session log; the mailbox uses its own cursor.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Start or resume the TUI first. Inside the TUI, `/session` shows the full session ID and the socket address. From another terminal:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
dscode sessions
|
|
13
|
+
dscode send SESSION_ID --source script "check why the tests fail first"
|
|
14
|
+
dscode send SESSION_ID --source ci --title "fix the build failure" "look at this build log"
|
|
15
|
+
dscode send SESSION_ID --source editor --steer "also: change only the parser module"
|
|
16
|
+
dscode read SESSION_ID
|
|
17
|
+
dscode watch SESSION_ID
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`send` delivers into the next turn by default; `--steer` delivers into the next step without interrupting the running model request or tool. A source name may contain letters (Latin or CJK), digits and `_.:@/-`, up to 64 characters. A message body is at most 64000 bytes. Put a body that starts with `-` after `--`.
|
|
21
|
+
|
|
22
|
+
`--title` explicitly sets the current session's title, persisted through the native title service and announced to the TUI; later automatic naming will not overwrite it. A title is stripped of control characters, whitespace-collapsed and truncated to the native limit (80 UTF-8 bytes by default). An empty title is refused; omitting the option changes nothing and calls no model. `sessions`, `read` and the send response all carry the current `title`, which is `null` while unnamed.
|
|
23
|
+
|
|
24
|
+
In the TUI an external message shows its full body with an `[External source: ...]` label and also enters the native pending-message queue. The log still marks it as a plugin relay: it never impersonates local user input or a permission approval. The source label is for recognition, not authentication; under one OS user, any process able to reach the socket has session access.
|
|
25
|
+
|
|
26
|
+
`sessions` lists only running root sessions in the current state directory. Either the full ID or a unique prefix works; when several Hosts carry the same ID, the send is refused. An exited session must be resumed in the TUI first. Child agents expose no direct write entry point.
|
|
27
|
+
|
|
28
|
+
`sessions` and `read` also return the descriptive `card` (project, workspace, recent user-request topics) and the separate `cardState` update status. The TUI `/session` shows them too. A card carries no conclusions; see [Session cards](session-cards.md).
|
|
29
|
+
|
|
30
|
+
The source entry point looks in the project `.runtime` by default; the npm launcher uses `$DSCODE_HOME` or `~/.local/share/dscode-hub`. Every client command accepts `--home /absolute/state/directory` to reach another installation or a temporary profile.
|
|
31
|
+
|
|
32
|
+
## Writing and retrying
|
|
33
|
+
|
|
34
|
+
A message enters the inbox through the native `Agent.followup()` / `Agent.steer()`, and the model and its tools are still scheduled by the single native driver. There is no asynchronous gap between validation, de-duplication and inbox submission; a slow model request holds no write lock. TUI input and external input share one inbox.
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
dscode send SESSION_ID --source ci --request-id build-123 "the build failed, please look"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
An `accepted: true` response means the message passed the native session's persistence flush barrier; it does not mean the task is done. The client prints the request ID to stderr before submitting, so a lost response is retried with the same ID, source, mode and body. A repeated request returns `duplicate: true` and is not delivered again; the same ID with different content is an error.
|
|
41
|
+
|
|
42
|
+
With `--title`, the title is part of the request identity and must stay the same on a retry. A repeated request will not pull a later title change back to the old value.
|
|
43
|
+
|
|
44
|
+
De-duplication evidence comes from persisted inbox events, so it survives a normal exit and a resume. Cancelling or deleting a queued message does not erase the fact that it was received; use a new ID to genuinely send it again.
|
|
45
|
+
|
|
46
|
+
This is message-reception de-duplication, not an exactly-once guarantee for tool side effects. When sources send at the same time, the order is whatever order the Host actually completes inbox submission in; the wall-clock send order of different processes is not preserved.
|
|
47
|
+
|
|
48
|
+
## Reading without contending for the write lock
|
|
49
|
+
|
|
50
|
+
`read` returns JSON: an immutable event page, the current status, the inbox, a page-tail `cursor` and the log tail `head` at snapshot time. Keep paging while `cursor < head`:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
dscode read SESSION_ID --after 123 --limit 100
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`--after` is the last event sequence already received and defaults to `-1`; `--limit` defaults to 100 and caps at 500. Take the next page from the previous `cursor`; do not use `head` to skip events you have not read.
|
|
57
|
+
|
|
58
|
+
`watch` emits NDJSON: `ready` first, then the history after `after`, then `caught-up`, then every new event as it happens. Subscribing and taking the snapshot happen in the same synchronous boundary, and overlapping events are de-duplicated by sequence. Leaving the session emits `closed`; an unexpected disconnect is an error, and the client can reconnect manually with the last `event.seq` it received:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
dscode watch SESSION_ID --after 123
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
What is subscribed here is the persisted model's event stream: messages, inbox, tool and status events. It does not carry uncommitted per-token assistant chunks. An event can be observed live before it reaches the disk persistence barrier; a cursor that jumps past the recovery log across a crash is reported as an explicit error and needs a fresh baseline read. Reading acquires no session write lock, but it still pays serialisation and disk-flush cost, so no strict lock-free algorithm is claimed.
|
|
65
|
+
|
|
66
|
+
A slow subscriber that exceeds the 8 MiB send buffer is disconnected rather than blocking the agent's writes; the client should catch up from the last sequence it received. A single oversized response or event also disconnects, so this interface is not a way to move large files: reference files by path instead.
|
|
67
|
+
|
|
68
|
+
## Local protocol and implementation
|
|
69
|
+
|
|
70
|
+
A Host creates its own socket under `/tmp/dscode-UID-HASH/`, isolated by a hash of the state directory. The directory is mode 0700, the socket mode 0600, and nothing listens on TCP. The socket path stays short enough for macOS. Each connection accepts one newline-terminated JSON request:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{"method":"send","sessionId":"...","source":"editor","requestId":"edit-123","mode":"queue","text":"check the change"}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The methods are `list`, `send`, `read` and `watch`. A normal response is `{"result":...}`, a failure `{"error":"..."}`. `watch` emits the event frames above. A Host releases its socket on shutdown; a stale socket left by a crash is ignored by discovering clients when it refuses the connection.
|
|
77
|
+
|
|
78
|
+
The implementation reuses the native Agent inbox, session snapshots, event notifications and persistence flush. It adds no second task queue and mounts neither the Web Session Controller's media upload nor its web gateway and other dependencies. A future ACP layer can adapt the same entry point.
|
|
79
|
+
|
|
80
|
+
Verification: `node --test tests/session-bridge.test.mjs`; `node scripts/verify-session-bridge.mjs` uses a real Harness and a local deterministic model to check two client processes, queue/steer while busy, reads, persisted de-duplication and recovery. The tests need permission to listen on a local Unix socket.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Descriptive session cards
|
|
2
|
+
|
|
3
|
+
Supported since DSCODE 0.2.0, session cards appear in `dscode sessions`, `dscode read SESSION_ID` and the TUI `/session`. A card has just three fields:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"project": { "name": "dscode", "id": "github.com/qiz029/dscode" },
|
|
8
|
+
"workspace": "/work/dscode-feature",
|
|
9
|
+
"topics": [
|
|
10
|
+
{ "text": "add project, workspace and recent-request topics to a session", "sourceSeqs": [125, 129] },
|
|
11
|
+
{ "text": "cancel the whale animation plan", "sourceSeqs": [98, 112] }
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The project comes from local Git information: the credential-free origin repository identity when one is recognisable, otherwise the path of the Git common directory. Worktrees of one repository therefore share a project, while the workspace keeps the session's original cwd: a session binds to the folder it is created in, and resuming it elsewhere still runs it in that folder. A non-Git directory has a `null` project, so the model is never asked to guess one. Reading Git information does not touch the network.
|
|
17
|
+
|
|
18
|
+
A topic describes what the user asked for: at most 5 by default, ordered by most recent mention, each citing the event sequence numbers of the original user messages. The extraction prompt requires consecutive follow-ups to be merged, an explicit cancellation or replacement to be described, and a bare acknowledgement to be ignored; it forbids conclusions, results, completion states and inferred agent plans. Structural validation rejects extra fields and message references that do not exist, while the meaning of the text still depends on how well the model follows the prompt.
|
|
19
|
+
|
|
20
|
+
## Background updates
|
|
21
|
+
|
|
22
|
+
Project and workspace are available immediately (Git detection completes asynchronously). Topic extraction starts after 3 non-empty user text inputs by default; new input waits 1.5 seconds to be merged, and two extractions for one session are at least 60 seconds apart. Only user text in raw `user/message` events is scanned: assistant output, tool results and external plugin relays are not read. That is why `dscode send` never becomes "a topic the user asked for".
|
|
23
|
+
|
|
24
|
+
Each extraction reads at most the latest 32 user texts, 16000 characters in total and 4000 characters per message; earlier topics may no longer be retained. This is an index of recent requests, not a summary of the whole session. Common credential patterns are redacted, but no guarantee is made that every sensitive string is recognised.
|
|
25
|
+
|
|
26
|
+
The extraction uses the session's provider/model, at a fixed, independent `low` effort that does not inherit the main agent's ultra; a provider/model can be configured separately. Each Host runs at most one extraction at a time, with a 30-second timeout; it creates no second Agent, uses no tools and writes nothing into the session context. New user input invalidates an older version still being generated; a failure keeps the previous version and retries with backoff. This background call costs extra model usage: its call count and token usage are recorded in the card cache and are not currently part of the TUI's session cost figures.
|
|
27
|
+
|
|
28
|
+
`cardState` sits outside `card` and provides `status`, `updatedAt`, `coveredUserSeq` and `latestUserSeq`. The status can be `empty`, `insufficient`, `pending`, `updating`, `ready`, `error` or `disabled`, which lets a consumer recognise a stale card. A background card update is not a persisted session event, so `watch` does not push it; call `sessions` or `read` again when you need it.
|
|
29
|
+
|
|
30
|
+
The derived cache is written atomically under `session-cards/` in the state directory and holds only cards and generation metadata, never a second copy of the user's text. A resumed session can reuse an unchanged card, and a corrupt cache can be rebuilt. `sessions` still lists running root sessions only; no offline session directory and no automatic cross-session sending were added.
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
Configure the existing plugin in the Harness profile overlay:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
- id: dscode-session-cards
|
|
38
|
+
config:
|
|
39
|
+
enabled: true
|
|
40
|
+
topicCount: 5
|
|
41
|
+
minMessages: 3
|
|
42
|
+
debounceMs: 1500
|
|
43
|
+
cooldownMs: 60000
|
|
44
|
+
timeoutMs: 30000
|
|
45
|
+
maxMessages: 32
|
|
46
|
+
maxInputChars: 16000
|
|
47
|
+
# provider: your-provider
|
|
48
|
+
# model: your-model
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`enabled: false` stops model extraction while local project, workspace and cached topics remain readable. provider/model must be configured as a pair. `minMessages` cannot exceed `maxMessages`.
|
|
52
|
+
|
|
53
|
+
Verification: `node --test tests/session-cards.test.mjs` and `node scripts/verify-session-cards.mjs`. The latter uses a real Harness, native sessions, a Unix socket and a deterministic local model to cover the independent effort, input isolation, reads and recovery; it does not mean topic text quality from a real remote model has been accepted.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Agent-to-agent tasks
|
|
2
|
+
|
|
3
|
+
Supported since DSCODE 0.2.0. An agent can read session cards and use built-in tools to send messages to a loaded dscode root session in the same state directory. This is how one running session reaches another; to start an unattended run in a fresh or trigger-owned persistent session from an event — a schedule, a file change, a poll, a CI job — see [Triggers](triggers.md). The receiver keeps using the single native runtime; the TUI, the CLI and the agent tools share the session bridge. An offline session is never opened automatically.
|
|
4
|
+
|
|
5
|
+
## Delivery modes
|
|
6
|
+
|
|
7
|
+
| mode | Target idle | Target running |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| queue | wakes a new turn | queued behind the current turn |
|
|
10
|
+
| steer | wakes a new turn | joins the current execution at the next safe step, without cancelling tools |
|
|
11
|
+
| defer | leaves a note, does not wake | claimed when the next turn starts, never in the current turn |
|
|
12
|
+
|
|
13
|
+
defer is a one-shot note. Reading the mailbox or resuming the session does not wake it on its own. Notes beyond the current turn's batch size keep waiting for a naturally occurring turn; they never start extra turns.
|
|
14
|
+
|
|
15
|
+
Message meaning is independent of delivery: `request` asks for work, `notify` passes information without requiring a reply, and `reply` is the single final answer tied to an original request. A notify may wake the target with queue or steer, or it may defer; the protocol never auto-replies "acknowledged".
|
|
16
|
+
|
|
17
|
+
## CLI and TUI
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
dscode sessions
|
|
21
|
+
dscode send SESSION_ID --kind request "check the parser's edge cases"
|
|
22
|
+
dscode send SESSION_ID --steer --kind notify "also: only check UTF-8 input"
|
|
23
|
+
dscode send SESSION_ID --defer --kind notify "watch this compatibility issue next time"
|
|
24
|
+
dscode send SESSION_ID --defer --title "Parser compatibility" "check UTF-8 later"
|
|
25
|
+
dscode mailbox SESSION_ID
|
|
26
|
+
dscode mailbox SESSION_ID --after 12 --limit 50
|
|
27
|
+
dscode watch-mailbox SESSION_ID --after 0
|
|
28
|
+
dscode cancel SESSION_ID MESSAGE_ID
|
|
29
|
+
dscode new-task SESSION_ID
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`--steer` and `--defer` are mutually exclusive, and queue is the default. An explicit `--title` sets the title immediately instead of waiting for a defer to be claimed; a repeated send does not overwrite a title that was changed later. Before sending, the client prints the requestId to stderr; when the receipt is lost, retry with the same `--request-id`, target, kind, mode, body and title.
|
|
33
|
+
|
|
34
|
+
The `/session` command shows the mailbox counts and CLI examples with the current
|
|
35
|
+
state directory in `--home`; `/mailbox` lists messages and `/mailbox cancel
|
|
36
|
+
MESSAGE_ID` cancels a request or an unclaimed message. The experimental
|
|
37
|
+
[combined Desktop package](browser-use.md#install-the-experimental-combined-desktop-package)
|
|
38
|
+
mounts these same services and commands. Use its printed `--home` when addressing
|
|
39
|
+
a Desktop session from the separately installed DSCODE CLI; the terminal's
|
|
40
|
+
default state directory can be different.
|
|
41
|
+
|
|
42
|
+
## Time context for delayed work
|
|
43
|
+
|
|
44
|
+
The terminal and experimental combined Desktop package give DSCODE agents clock
|
|
45
|
+
readings when inbox messages enter a model step. Each reading names the time zone
|
|
46
|
+
and UTC offset. A relay with a saved composition time also reports how long it
|
|
47
|
+
waited, starting at one second. The following step can report the previous turn's
|
|
48
|
+
end and duration. These readings describe the Host clock and delivery timing;
|
|
49
|
+
they do not add instructions to the original message body.
|
|
50
|
+
|
|
51
|
+
Marks are durable auxiliary context: they consume model context and replay with
|
|
52
|
+
the session. Normal terminal and Desktop chat hide them; Desktop's **Trajectory**
|
|
53
|
+
view shows them for inspection. Native Standard sessions receive no DSCODE marks.
|
|
54
|
+
Runtime snapshots and skill catalogs are not inbox arrivals and receive no mark.
|
|
55
|
+
|
|
56
|
+
Each step adds at most eight lines, with arrivals first. An arrival burst can
|
|
57
|
+
omit arrival readings beyond that limit; it leaves pending turn endings for a
|
|
58
|
+
later step. Resume or plugin reload recovers up to eight recent unreported turn
|
|
59
|
+
endings from the native session log. A fresh load into an older session may
|
|
60
|
+
therefore report recent endings that occurred while the plugin was absent.
|
|
61
|
+
Unloading stops new marks and retains existing history.
|
|
62
|
+
|
|
63
|
+
The `dscode-time-marks` plugin's `timeZone` setting accepts an IANA zone such as
|
|
64
|
+
`UTC` or `America/Los_Angeles`; empty uses the Host zone. An invalid zone rejects
|
|
65
|
+
the plugin configuration. Clock accuracy depends on the Host system clock.
|
|
66
|
+
|
|
67
|
+
## Seeing the traffic in the terminal
|
|
68
|
+
|
|
69
|
+
Cross-session traffic is visible as it happens, without expanding a tool card:
|
|
70
|
+
|
|
71
|
+
- While a `send_session` or `reply_session` call is running, the activity line reads `⇄ sending to <peer>`; once the call settles and the message was a `request` with no answer yet, it reads `⇄ waiting for <peer>` until a relay from that peer arrives. A `notify` never shows as waiting, and a failed send stops waiting immediately.
|
|
72
|
+
- A settled send prints one notice line (`→ <peer> <kind>`, plus `— failed` when the result was an error), and an inbound relay prints `← <peer> · <bounded text>`.
|
|
73
|
+
- `/tasks` lists the same history on demand as one text block, newest last, with the delivery mode and whether each send is still `awaiting reply`; it reads the session's own log, so it shows what this session sent and received and nothing about other pairs.
|
|
74
|
+
|
|
75
|
+
Both surfaces use the `steered` violet and the `⇄`/`→`/`←` glyph family, never the brand blue and `•` of ordinary local notices or the plain text of a tool result, so a line about another session is recognisable at a glance. The view is folded from the root session's own log — `tool/call` and `tool/result` for the outbound side, the bridge's relayed `user/message` for the inbound side — so a resumed session rebuilds the same history and a restart announces only traffic that happened in that session, not the whole past.
|
|
76
|
+
Stopping natively also cancels pending native inbox messages; a standalone defer note has to be cancelled explicitly in the mailbox. A message that is received and enters the context still shows as a relay with its source.
|
|
77
|
+
|
|
78
|
+
`/session-new-task` or `dscode new-task SESSION_ID` explicitly starts a fresh communication budget while the session is idle. Ordinary follow-ups, automatic continuation and a resume do not reset the budget. When an older request returns later or an older note is claimed, it still carries its original chain and may therefore be limited by it again.
|
|
79
|
+
|
|
80
|
+
The CLI can answer, on behalf of the current session, a cross-session request that was genuinely addressed to it:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
dscode reply RECEIVING_SESSION_ID --reply-to REQUEST_MESSAGE_ID "final answer"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
A request sent by an external script has no other agent session as a reply address; read its progress and output through read/watch.
|
|
87
|
+
|
|
88
|
+
## Built-in agent tools
|
|
89
|
+
|
|
90
|
+
- `list_sessions`: reads cards and run status, with exact project/workspace filtering and pagination.
|
|
91
|
+
- `read_session`: reads the named session's native event page and the head of its mailbox, without waking it or claiming anything.
|
|
92
|
+
- `send_session`: sends request/notify; the full session ID, mode, body and a stable `idempotency_key` are required.
|
|
93
|
+
- `reply_session`: replies against the original request ID; the runtime determines the target, and queue is the default.
|
|
94
|
+
|
|
95
|
+
A progress notify may carry `in_reply_to` back to the original requester; the target ID must match the original sender. Each request allows at most one final reply. A tool returns only the reception receipt, so a model should end its turn and wait for the answer rather than polling read in a loop.
|
|
96
|
+
|
|
97
|
+
The sender's session identity is bound by a runtime credential; a model cannot supply its own chainId, budget, sender or new-task authorisation. A child agent inherits its parent's task chain, but in this first version cross-session send/reply is performed by root sessions only, and a child agent should hand back to its parent through the native collaboration entry points; a child agent is not an independent recipient address either. A session card still describes only the original user requests, and a relay never enters the card topics.
|
|
98
|
+
|
|
99
|
+
## Choosing a target and a delivery mode
|
|
100
|
+
|
|
101
|
+
Routing has two steps: pick a session from its card, then pick the delivery mode from the target's current status and the nature of this message. Where the fields come from and when they are produced is covered in [Session cards](session-cards.md); this section only covers how to use them.
|
|
102
|
+
|
|
103
|
+
### 1. List targets
|
|
104
|
+
|
|
105
|
+
With no filter, `list_sessions` returns every active root session in the same state directory; `project` and `workspace` are exact filters for when you already know whom you want:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
list_sessions({})
|
|
109
|
+
list_sessions({ "workspace": "/abs/path/to/project" })
|
|
110
|
+
list_sessions({ "project": "github.com/owner/repo" })
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The result is ordered by session ID, not by activity or recency; `limit` defaults to 20 and caps at 100, so pass `limit: 100` to list everything and page with `nextCursor`. Cross-project collaboration needs no extra argument.
|
|
114
|
+
|
|
115
|
+
### 2. Which fields to judge by
|
|
116
|
+
|
|
117
|
+
| Field | Meaning |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| `card.project` | Normalised from the local Git origin into `name` and `id`; worktrees of one repository share a project, and a non-Git directory is `null`. |
|
|
120
|
+
| `cwd` / `card.workspace` | The exact workspace path, and the basis of the `workspace` filter. |
|
|
121
|
+
| `title` | A human-readable title, possibly unset (`null`). |
|
|
122
|
+
| `card.topics[].text` | Recent user-request topics, the main semantic routing signal, though only an index of recent requests. |
|
|
123
|
+
| `status` | `idle` or `running`, which decides the mode. |
|
|
124
|
+
| `mailbox` | Current `queue`/`steer`/`defer` pending counts; a large number means the target already has a backlog. |
|
|
125
|
+
| `cardState` | `status` is the card's update state; a gap between `coveredUserSeq` and `latestUserSeq` says whether new user input arrived after the card was built. |
|
|
126
|
+
|
|
127
|
+
`card.project`, `card.workspace`, `card.topics` and `cardState` may all be absent; treat them as absent rather than assuming they exist.
|
|
128
|
+
|
|
129
|
+
### 3. Pick a target
|
|
130
|
+
|
|
131
|
+
Lock the project with `card.project.id` or `cwd` first; when several sessions share a project, use `title` and `card.topics` to tell which one is working on the relevant task.
|
|
132
|
+
|
|
133
|
+
When `cardState.status` is `empty`, `insufficient`, `pending`, `updating` or `error`, the topics may be empty, not yet updated or stale: judge only by project, workspace and title, and do not read the target's current work from an old topic. `disabled` means card extraction is switched off, while project and workspace remain available.
|
|
134
|
+
|
|
135
|
+
### 4. Pick a mode
|
|
136
|
+
|
|
137
|
+
| Target status and intent | Choice |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Idle, should start work, and you expect an answer | `queue` + `request` |
|
|
140
|
+
| Running, adding a constraint or a correction you want inside this turn | `steer` + `request` |
|
|
141
|
+
| Running, not urgent, let it pick the note up on its next natural turn | `defer` + `request` |
|
|
142
|
+
| Only informing, no reply needed | set `kind: "notify"` and choose the mode from the timing rules above |
|
|
143
|
+
|
|
144
|
+
kind and mode are independent. Use `request` when you want an answer and `notify` to pass information; a final `reply` must be tied to the original `request_message_id` and cannot answer another reply. `status` is only a snapshot: the target may have changed after you chose the mode, and the runtime's delivery semantics keep the message from being lost because of it.
|
|
145
|
+
|
|
146
|
+
### 5. Common mistakes
|
|
147
|
+
|
|
148
|
+
- Judging how far the target has got from a topic. A topic only describes what the user asked for, never a conclusion, a result or a completion state; use `read_session` on the event page for progress.
|
|
149
|
+
- Forgetting pagination. Without `limit` you see 20 entries, which easily hides the target in cross-project work.
|
|
150
|
+
- Confusing `status` with `cardState.status`. The first is the session's busy state, the second the card's update state.
|
|
151
|
+
- Reading the `mailbox` counts as history. They count only unexpired accepted or admitted messages, not consumed ones.
|
|
152
|
+
- Sending as soon as a target is picked. Read a page or two with `read_session` first (defaults `after: -1`, `limit: 50`, returning `cursor`/`head`) to confirm where it is, and avoid a duplicate ask or an interruption.
|
|
153
|
+
|
|
154
|
+
## Anti-loop budgets and persistence
|
|
155
|
+
|
|
156
|
+
This first version fixes these limits: 3 delegation levels per task chain, 8 request/notify messages, 1 reserved final reply per request, and a 1-hour validity window. An external send that creates a root request also counts towards the 8. Queue, steer and defer all count; once the new-message ceiling is reached, the reserved final reply can still return.
|
|
157
|
+
|
|
158
|
+
Sending a new task to yourself or to an ancestor in the current delegation path is forbidden; a legitimate reply tied to the original request and a progress report are allowed to return. After several chains merge, all their constraints apply and you cannot choose the one with more remaining budget. An ordinary continuation, a reply and a notification keep their current causal relationship; when a new turn is started purely by communication requests, it adopts the chains those requests already have, so unrelated finished work is not mixed in. This creates no new budget. At most 32 distinct causal paths are retained; beyond that the request is explicitly refused rather than silently dropping the relationship, and the user has to draw the boundary of the new task.
|
|
159
|
+
|
|
160
|
+
Each session's unclaimed mailbox holds at most 100 notes with 1 MiB of bodies in total; a single body is at most 64000 bytes, and a full envelope with metadata and headroom is at most 96000 bytes. A single defer batch is under the same full-size limit. An expired note keeps a readable record but is no longer claimed automatically.
|
|
161
|
+
|
|
162
|
+
All Hosts share the state directory's `session-communication/mailbox.sqlite`. Admission, idempotency, budget and reply slots commit in short SQLite transactions. The ledger owns communication only; model execution keeps using the native inbox, and a session's write exclusivity is still guaranteed by the native JSONL kernel lock. The owner generation rejects stale runtime credentials, and a missing heartbeat times out and seizes the lock.
|
|
163
|
+
|
|
164
|
+
Receipts and records are distinct:
|
|
165
|
+
|
|
166
|
+
| delivery | Meaning |
|
|
167
|
+
| --- | --- |
|
|
168
|
+
| accepted | Persisted in the mailbox; a defer may stay here |
|
|
169
|
+
| admitted | Entered the native inbox or the claiming flow |
|
|
170
|
+
| consumed | Matched against a native user/message and flushed; does not mean the task is done |
|
|
171
|
+
| cancelled / expired | No longer delivered automatically |
|
|
172
|
+
| late | A final reply that arrived late; recorded only, no wake-up |
|
|
173
|
+
|
|
174
|
+
A successful queue/steer receipt waits for the native inbox flush; defer waits for the mailbox commit. The gap where the ledger commits before the inbox write is recovered by re-delivering a stable messageId, and a message already in the native log is never added twice. Native-exit inbox cleanup and an explicit user cancellation are handled separately: the first allows unconsumed communication to be recovered from the ledger, the second never revives a cancelled message.
|
|
175
|
+
|
|
176
|
+
**The cancellation boundary is the claim.** An unclaimed message with `alreadyClaimed: false` can be stopped from being claimed later; an already claimed input cannot be guaranteed recalled, and the receipt marks it true. A cancel request closes the reply relationship, so a late reply does not wake the target; it does not kill the target's other work or roll back tool side effects. A defer note's batch record and its native consumption acknowledgement are stored separately, so they can be checked again after an interruption.
|
|
177
|
+
|
|
178
|
+
`watch-mailbox` uses its own monotonic event cursor and reads the shared ledger every 250ms; only a subscribed connection polls, and it drives no agent. It covers reception, admission, consumption, cancellation and refusal. `watch` keeps using the native session seq, and the two cursors cannot be mixed. read/list claims nothing, and a WAL snapshot acquires no session write lock.
|
|
179
|
+
|
|
180
|
+
Under one OS user, a program that can read the state and credentials can still call the external entry points; these limits stop accidental loops in normal tool use and are not a security boundary against a program with arbitrary shell access. Tool loops and model usage inside a single agent still need its execution budget.
|
|
181
|
+
|
|
182
|
+
## Verification
|
|
183
|
+
|
|
184
|
+
`node --test tests/*.test.mjs` covers protocol validation, idempotency, loops/depth, budget, concurrent-process admission, expiry, cancellation and post-encoding size limits.
|
|
185
|
+
|
|
186
|
+
`node scripts/verify-session-messaging.mjs` uses two real Harness Hosts and a local deterministic model to check sending through the registered tools, a model-invoked reply, the defer deadline boundary and its lack of a wake-up, recovery after a forced exit, recovery with a pre-existing native inbox, de-duplication, cancellation and mailbox subscription. `node scripts/verify-runtime-foundations.mjs` checks the kernel lock and the native input hooks. No claim is made that remote-model collaboration quality, human UI acceptance or side-effect exactly-once has been verified.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Session footer
|
|
2
|
+
|
|
3
|
+
## Experimental Desktop usage
|
|
4
|
+
|
|
5
|
+
The experimental combined Desktop package adds **Open right sidebar → Session
|
|
6
|
+
usage** for the selected open DSCODE session. It reads the same local ledger and
|
|
7
|
+
live token meter as the terminal footer. The panel shows recorded cost, model
|
|
8
|
+
calls, pending calls, context percentage, input cache share, smoothed request
|
|
9
|
+
speed, session-average speed and the latest 50 per-turn cost estimates. The
|
|
10
|
+
session total includes all recorded turns, attributed child calls and background
|
|
11
|
+
work. Cost outside recorded turn windows is shown separately. Known cached
|
|
12
|
+
provider balance or subscription figures are included; opening or refreshing the
|
|
13
|
+
panel does not request new account data or start a model turn.
|
|
14
|
+
|
|
15
|
+
The panel refreshes once per second while visible and clears its state when
|
|
16
|
+
hidden or switched to another session. Refresh failures clear the old figures
|
|
17
|
+
and display an error. Standard sessions and closed sessions have no DSCODE usage
|
|
18
|
+
view. Unknown values remain explicit; `+` marks a partial cost and pending calls
|
|
19
|
+
have not settled. Prices, historical gaps and speed definitions follow the same
|
|
20
|
+
rules below. The panel displays a configured cost budget but does not introduce
|
|
21
|
+
a Desktop spending enforcement mechanism.
|
|
22
|
+
|
|
23
|
+
## Terminal presentation
|
|
24
|
+
|
|
25
|
+
The footer keeps session identity and permissions on row 1. Row 2 places TPS, session-average TPS, context and the loaded skill count on the left; session cost, DeepSeek balance and peak/off-peak marker, optional last-turn cost, and cache rate form one group aligned to the right edge. Space separates the two groups, with `·` inside each group. When they cannot share a row, the financial group moves intact to a right-aligned third row. At narrow widths the average TPS yields before current TPS, context and skills; the metrics no longer disappear wholesale below 48 columns. Extremely narrow terminals may omit the optional last-turn cost and clip the financial group with an ellipsis. The composer and IME cursor account for the actual footer height. On the Grok and OpenCode Go subscription routes the money figure is the plan's usage instead of a cost: Grok's weekly credits, and Go's share of its five-hour, weekly and monthly caps (see [OpenCode Go](opencode-go.md)).
|
|
26
|
+
|
|
27
|
+
- **current**: a normalized exponential moving average (EWMA) of the root agent's completed request rates. Each request's rate is its provider-reported final `outputTokens` / its full request duration, including the first-token wait. Each valid completion gives the new rate weight 1 and multiplies all older weights by `0.5`; the displayed rate is the weighted sum divided by the weight sum. Thus newer requests always carry more weight, and each newer valid request halves every older sample's weight. The first valid request initializes the reading. Idle time, tools and in-flight requests do not decay it; aborted or invalid/missing-usage calls do not update it. Starting a request with a different provider, model or reasoning effort clears the history; that route shows `--` until its first valid completion. Text lengths never estimate tokens, and auxiliary and child calls do not enter the root's rate. A resumed session starts without a smoothed reading. This is a smoothed request rate, not instantaneous output or a fixed time window.
|
|
28
|
+
- **average**: settled assistant output tokens for the current root session / total LLM call time for those requests (each step from request start to settle, including the wait for the first token). Tool execution and idle time between two user turns do not count; child agent output does not count; a request still in flight does not count before it settles. If any message lacks exact usage or its step-start event, the figure shows `--`.
|
|
29
|
+
- **context**: the current session's token-meter context estimate / the model context window, recomputed after compaction. It covers the currently visible context; extra text an adapter injects temporarily is not part of the local estimate. If live telemetry is unavailable, the footer falls back to the latest recorded prompt usage, including cache reads and writes, against the recorded model window. That fallback describes the last request rather than estimating subsequent output or edits. Before any usable reading exists, it shows `--`.
|
|
30
|
+
- **session**: a dollar estimate accumulating the recorded model calls of the current session and its child agents, including compaction, title generation and auto review. A resumed session keeps the accumulated value; a new session starts over. Jev Decisions attempts are also included: a reported non-negative billed cost is used directly; a missing or invalid cost makes the total partial. MCP/API service costs outside the model are not included.
|
|
31
|
+
- **cache**: cumulative cache-read tokens / cumulative all input tokens, weighted by tokens, not a request hit rate and not the average of per-request percentages.
|
|
32
|
+
|
|
33
|
+
`+` means only part of the cost is computable; `--` means the data or the price is unknown; `…` means a request has not finished. The cost of the current request is not advanced before usage arrives. The footer refreshes every second and makes no extra model request.
|
|
34
|
+
|
|
35
|
+
A small activity indicator beside the first TPS figure spins while the main model request is waiting or streaming. It stops when that request completes or aborts, including while tools are running. With animations disabled, an active request shows a static circle. The slot stays reserved while idle so the numbers do not shift. The indicator follows the footer's one-second refresh; its animation never interpolates or alters the TPS number, which changes only when a completed request supplies valid usage.
|
|
36
|
+
|
|
37
|
+
`current` and `average` are each coloured by their own TPS: yellow below 75, green from 75 to below 150, blue from 150 to 250 inclusive, purple above 250. The cache rate is coloured the same way on its own bands: red below 90%, yellow to 95, green to 98, blue above. An unknown `--` keeps the normal colour; labels, units and separators never change colour with the figure.
|
|
38
|
+
|
|
39
|
+
Prices use a 2026-09-11 snapshot of the [official DeepSeek price list](https://api-docs.deepseek.com/quick_start/pricing/), distinguishing peak and off-peak by request start time and matching only supported official providers/models. A price update means updating `plugins/session-metrics/pricing.mjs`; the figure shown is not a vendor invoice. An older session can recover part of its calls from the log, but historical review/title/child-agent usage may be incomplete, which is why it is marked as a partial total.
|
|
40
|
+
|
|
41
|
+
Records are stored in `$DSH_HOME/session-metrics/` and contain only metadata such as model, times, usage and cost, never prompts or credentials. Every model call writes one `start` row (`time` is the request start, `purpose` is `agent`, `compaction`, `session-title`, `review`, `memory`, `session-card` or `doctor`) and one `end` row; an `end` row's `time` is still the start time (used for pricing), `endTime` is when the stream finished, and `firstTokenTime` is when the first text, reasoning or tool-argument increment arrived (omitted when there was no output), so a single LLM call takes `endTime - time` and its first-token latency is `firstTokenTime - time`. Calls for automatic permission review, code review, memory extraction, session cards and `/doctor` do not carry a `sessionId` in the request (avoiding session-log delivery, cache affinity and agent-only prompt rewriting) but are attributed through async context to the session that made them; memory extraction and consolidation keep the initiating session captured at run start, even if another session starts or that owner closes. Manual `/memories run` and `note` use their caller; see [Memory](memory.md) for periodic-run attribution. A call that cannot be attributed to a session (such as the `dscode doctor` command line) is not recorded. The raw session log gains no custom events.
|
package/docs/skills.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Skills and workspace instructions
|
|
2
|
+
|
|
3
|
+
Skill discovery and body loading come from `@deepseek-ai/dsh-skill-filesystem`, and workspace instructions come from `@deepseek-ai/dsh-agent-instructions`. This page covers what each one scans, how the upward-discovery switch is configured, and where the boundary between them lies.
|
|
4
|
+
|
|
5
|
+
## Default discovery scope
|
|
6
|
+
|
|
7
|
+
| rank | Source | Path |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| 100 | `project-dsh` | `<project root>/.dsh/skills` |
|
|
10
|
+
| 200 | `project-agents` | `<project root>/.agents/skills` |
|
|
11
|
+
| 300 | `custom` | `customSkillDirs` (the ancestor mode registers here) |
|
|
12
|
+
| 400 | `user-dsh` | `$DSH_HOME/skills` (skipping its `.system` subdirectory) |
|
|
13
|
+
| 500 | `user-agents` | `$DSH_AGENTS_HOME/skills` |
|
|
14
|
+
| 600 | bundled | when `bundledSkillDir` is configured |
|
|
15
|
+
|
|
16
|
+
The project root is the **nearest ancestor directory containing `.git`**, or the current directory when there is none. A lower rank is scanned first and wins, a duplicate name goes to the one that appeared first, and `/skills conflicts` lists them.
|
|
17
|
+
|
|
18
|
+
Each root is scanned only for its **top-level** `<name>/SKILL.md` or `<name>.md`; a nested `**/SKILL.md` is deliberately not discovered. Frontmatter requires `name` and `description` and may add `user-invocable` and `disable-model-invocation`. The directory entries (name + description) are in the context every turn, and a body is read only when it is invoked.
|
|
19
|
+
|
|
20
|
+
## Upward discovery (ancestor mode)
|
|
21
|
+
|
|
22
|
+
On by **default**. The following three roots in **every** directory between the working directory and home are registered at rank 300:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
<each level>/.dsh/skills
|
|
26
|
+
<each level>/.agents/skills
|
|
27
|
+
<each level>/.claude/skills
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For example `~/Workspace/.dsh/skills` becomes visible to every project under `~/Workspace`. Rules:
|
|
31
|
+
|
|
32
|
+
- **Only headers enter the catalog**; bodies stay lazy-loaded, exactly like a project-local skill.
|
|
33
|
+
- **Nearest wins**: a directory closer to the cwd registers first. Rank 300 is below the project root's 100/200 and above the user roots' 400/500, so a project or ancestor skill beats a user-level one, and within rank 300 the roots are registered nearest-first, so a nearer ancestor beats a farther one. The single inversion is a directory between the working directory and the project root (for example `repo/src` while the session runs in it and `repo` is the project root): it ranks 300 while the project root's own `.dsh/skills` and `.agents/skills` rank 100/200, so the project root's definition of a duplicate name wins there.
|
|
34
|
+
- A project root's `.dsh/skills` and `.agents/skills` are the provider's own roots and are **not registered twice**; a project root's `.claude/skills` is not one of the provider's roots, so it is included.
|
|
35
|
+
- **Nothing above home is read**; when the cwd is not under home (for example `/Volumes/...`) no ancestor root is added.
|
|
36
|
+
- The list is resolved **once at startup**: `/cd` inside a session, or creating an ancestor skill directory, needs dscode to be reopened before it takes effect (adding, changing and removing a skill file itself still has a watcher).
|
|
37
|
+
|
|
38
|
+
### Switch
|
|
39
|
+
|
|
40
|
+
Environment variable `DSCODE_SKILL_ANCESTORS`:
|
|
41
|
+
|
|
42
|
+
| Value | Result |
|
|
43
|
+
|---|---|
|
|
44
|
+
| unset, empty, or any unrecognised value | on |
|
|
45
|
+
| `0`, `off`, `false`, `no`, `none`, `disable` (case-insensitive) | off |
|
|
46
|
+
|
|
47
|
+
How to turn it off:
|
|
48
|
+
|
|
49
|
+
| Way | Command / location | Scope |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| One run | `DSCODE_SKILL_ANCESTORS=0 dscode` | this launch |
|
|
52
|
+
| Persistent (source / tar) | the repository's or installation's `.env` (already gitignored) | every later launch |
|
|
53
|
+
| Persistent (npm / Hub) | `$DSCODE_HOME/.env`, by default `~/.local/share/dscode-hub/.env` | every later launch |
|
|
54
|
+
|
|
55
|
+
`config/harness.local.yml` has **no effect** on this switch: it is a DSH patch that only applies after the preset is mounted, whereas the ancestor list has to be computed before mounting.
|
|
56
|
+
|
|
57
|
+
The launcher (source form) or the bundle's bootstrap (npm/Hub form) resolves the directory list and passes it to the preset's `customSkillDirs` through `DSCODE_SKILL_ANCESTOR_DIRS`; this internal variable does not need to be set by hand.
|
|
58
|
+
|
|
59
|
+
## Workspace instructions AGENTS.md / CLAUDE.md
|
|
60
|
+
|
|
61
|
+
**Project chain (on by default)**: from the project root down to the session working directory, each directory contributes `AGENTS.md` and `CLAUDE.md`, followed by `AGENTS.local.md` and `CLAUDE.local.md`; there is also a user-level `$DSH_HOME/AGENTS.md`. The project chain does **not** cover directories above the project root.
|
|
62
|
+
|
|
63
|
+
**Above the project root (on by default, only when the file exists)**: the launcher aggregates `AGENTS.md` / `CLAUDE.md` from every level between home and the project root into `$DSH_HOME/workspace-instructions/AGENTS.md`, ordered **user-level original file first, then the farthest ancestor → the nearest ancestor**, and points the preset at that directory with `dshHome`, leaving rendering and de-duplication to upstream. When there is no ancestor instruction file at all, no file is written and `$DSH_HOME/AGENTS.md` is read exactly as before.
|
|
64
|
+
|
|
65
|
+
The byte budget keeps upstream's `maxBytes: 65536`: over budget, a wider file is dropped whole first and the most specific file is truncated last, with a visible budget notice. The ancestor aggregate file itself has a 60 KiB cap (below `maxBytes`, leaving headroom): upstream drops a **wider file over budget whole**, and the aggregate file occupies the widest user-global slot, so without a cap one oversized ancestor file would take the user-level `AGENTS.md` down with it. A single source over budget is skipped whole rather than half-truncated, and the user-level file and the nearest ancestor are kept first.
|
|
66
|
+
|
|
67
|
+
## Verification and troubleshooting
|
|
68
|
+
|
|
69
|
+
| Command | Purpose |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `/skills` | the effective catalog: source, provider, user/model invocation permission |
|
|
72
|
+
| `/skills <name>` | description and effective path, without injecting the body |
|
|
73
|
+
| `/skills conflicts` | same-name overrides and their effective source |
|
|
74
|
+
|
|
75
|
+
To confirm ancestor mode is active, run `/skills` after startup: entries from an ancestor directory have `source` `custom`, and `/skills <name>` gives the file path directly. The footer's `skills` figure carries the same catalog's size and updates with it (`/statusline` toggles the item); it stays `--` until the first catalog read settles.
|
|
76
|
+
|
|
77
|
+
## Limits
|
|
78
|
+
|
|
79
|
+
- Ancestor discovery is on by default, so the content-cost of the wider scope and the fact that ancestor directories sit outside version control are the default experience; set `DSCODE_SKILL_ANCESTORS=0` to go back to the project and user roots alone.
|
|
80
|
+
- The ancestor list is fixed at startup and does not follow `/cd`.
|
|
81
|
+
- `/skills conflicts` cannot enumerate hidden candidates from a runtime or a remote provider.
|