@chatcode/chatcode-cli 3.0.4 → 3.0.5-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.i18n.yaml +6 -6
  2. package/README.md +10 -4
  3. package/README.zh.md +10 -4
  4. package/lib/bin.js +23 -9
  5. package/lib/{command-errors-Ca64Lgba.js → command-errors-CsRCh0gk.js} +12 -12
  6. package/lib/{command-trees-CVc4Xu_z.js → command-trees-CD_43rxX.js} +2 -2
  7. package/lib/{component-identity-6aEut5Yt.js → component-identity-DGA2-TeB.js} +3 -3
  8. package/lib/{dump-config-ZzrfvtnX.js → dump-config-D8kXfdTs.js} +1 -1
  9. package/lib/dump-config-DuCc-QB7.js +2 -0
  10. package/lib/{dump-config-schema-BlO-eZ-J.js → dump-config-schema-CtZbroi6.js} +2 -2
  11. package/lib/{extension-events-C7MUpqVE.js → extension-events-D0BjYRqT.js} +21 -21
  12. package/lib/{host-access-CLbyAGT5.js → host-access-DLJjuR07.js} +1 -1
  13. package/lib/{keymap-82JwLLHe.js → keymap-C4cs2IBN.js} +2 -2
  14. package/lib/{plugin-BlQlWIR5.js → plugin-CGtTByud.js} +801 -456
  15. package/lib/{plugin-BZdazFXS.js → plugin-CYw-MBRn.js} +1 -1
  16. package/lib/{profile-boot-B0aEEQIR.js → profile-boot-CffsubnV.js} +7 -7
  17. package/lib/profile-boot.js +1 -1
  18. package/lib/{scenes-BNS0ZFyQ.js → scenes-CbAGK5Uy.js} +3 -3
  19. package/lib/{settings-sections-CXH24cu5.js → settings-sections-DYKDa04e.js} +3 -3
  20. package/lib/{statusBarSettings-BAMzn8fX.js → statusBarSettings-T1m8xad4.js} +3 -3
  21. package/lib/{themes-DXUIvP7m.js → themes-BY2ui1Dv.js} +12 -12
  22. package/lib/tui-compat-command-trees.js +1 -1
  23. package/lib/tui-compat-extensions.js +3 -3
  24. package/lib/tui-compat-plugin-host.js +5 -5
  25. package/lib/tui-compat-scenes.js +1 -1
  26. package/lib/tui-compat-settings-sections.js +1 -1
  27. package/lib/tui-compat-working-activity.js +1 -1
  28. package/lib/tui-compat-workspaces.js +1 -1
  29. package/lib/tui-compat.js +7 -7
  30. package/lib/types/bin.d.ts +9 -0
  31. package/lib/types/tui-compat.d.ts +1 -1
  32. package/lib/types/web-instance-process.d.ts +20 -0
  33. package/lib/{web-instance-DbP7IHPv.js → web-instance-D_Ppi2Zo.js} +176 -14
  34. package/lib/{web-instance-B0jec7cq.js → web-instance-amvCJWnq.js} +1 -1
  35. package/lib/{workspaces-CUJXNU5W.js → workspaces-D5VKbESy.js} +2 -2
  36. package/package.json +30 -31
  37. package/runtime/manifest.json +2 -2
  38. package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +7 -3
  39. package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +169 -11
  40. package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/lib/types/files.d.ts +25 -0
  41. package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/lib/types/rules.d.ts +25 -0
  42. package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +5 -2
  43. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +11 -3
  44. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/contract/snapshot.d.ts +1 -0
  45. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.d.ts +2 -0
  46. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.js +4 -0
  47. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +10 -3
  48. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +32 -11
  49. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/index.js +62 -11
  50. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/darwin-lock.d.ts +7 -0
  51. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/index.d.ts +7 -2
  52. package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/linux-lock.d.ts +1 -1
  53. package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
  54. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +62 -62
  55. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +10 -10
  56. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +49 -49
  57. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +204 -204
  58. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
  59. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +159 -157
  60. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/service.d.ts +4 -2
  61. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
  62. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +129 -123
  63. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/index.js +19 -14
  64. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/changes.d.ts +2 -2
  65. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/Deliverables.d.ts +1 -2
  66. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/locales.d.ts +2 -1
  67. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
  68. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +2 -4
  69. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
  70. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
  71. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
  72. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +37 -37
  73. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +9 -9
  74. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +12 -12
  75. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +119 -32
  76. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/catalog.d.ts +13 -0
  77. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +2 -0
  78. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/effort-preferences.d.ts +20 -0
  79. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/slots.d.ts +2 -1
  80. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +8 -8
  81. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
  82. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
  83. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +128 -128
  84. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +182 -182
  85. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +130 -130
  86. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +50 -50
  87. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +88 -88
  88. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +36 -36
  89. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +13 -13
  90. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/client.js +27 -27
  91. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/lib/client.js +42 -42
  92. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +44 -44
  93. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +25 -25
  94. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.excel.js +9 -9
  95. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +70 -70
  96. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +9 -9
  97. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +18 -18
  98. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +26 -26
  99. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +16 -16
  100. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
  101. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +20 -20
  102. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +37 -37
  103. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +27 -27
  104. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +95 -95
  105. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +197 -197
  106. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +49 -49
  107. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
  108. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +656 -152
  109. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +9 -2
  110. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +46 -0
  111. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +9 -10
  112. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/deletion.d.ts +57 -0
  113. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +2 -0
  114. package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +32 -32
  115. package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +24 -24
  116. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +899 -453
  117. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/adapter.d.ts +4 -20
  118. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/adapter.d.ts +8 -0
  119. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/serialize.d.ts +10 -0
  120. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/sse.d.ts +24 -0
  121. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/translate.d.ts +37 -0
  122. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/types.d.ts +159 -0
  123. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/file-store.d.ts +3 -0
  124. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/files-api.d.ts +4 -0
  125. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/index.d.ts +1 -0
  126. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol-adapter.d.ts +41 -0
  127. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol.d.ts +35 -0
  128. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/transport.d.ts +2 -1
  129. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/types.d.ts +2 -2
  130. package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +5 -4
  131. package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +4 -4
  132. package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/index.js +1 -1
  133. package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +2 -2
  134. package/runtime/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +33 -9
  135. package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +12 -10
  136. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/index.js +208 -39
  137. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.d.ts +47 -0
  138. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.js +129 -0
  139. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.d.ts +2 -0
  140. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.js +31 -8
  141. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.d.ts +7 -2
  142. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.js +35 -19
  143. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/types.d.ts +11 -10
  144. package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +1 -0
  145. package/scripts/link-embedded-runtime.mjs +1 -1
  146. package/lib/dump-config-CDixiJNt.js +0 -2
  147. package/lib/{home-migration-BjDmRwBB.js → home-migration-lRjtl2fP.js} +1 -1
  148. package/lib/{startup-diagnostics-C_hRCp-q.js → startup-diagnostics-4mLHYTFc.js} +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chatcode/chatcode-cli",
3
3
  "description": "ChatCode CLI: TUI-first coding agent, Web launcher, profiles, and legacy DSH-compatible plugins",
4
- "version": "3.0.4",
4
+ "version": "3.0.5-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -28,15 +28,15 @@
28
28
  "dependencies": {
29
29
  "@agentclientprotocol/sdk": "1.4.0",
30
30
  "@babel/code-frame": "^7.29.0",
31
- "@chatcode/cco-better-sidebar": "0.18.0-rc.11",
31
+ "@chatcode/cco-better-sidebar": "0.18.0-rc.12",
32
32
  "@chatcode/cco-builtin-browser": "0.1.21",
33
33
  "@chatcode/cco-chat-import": "0.17.0",
34
34
  "@chatcode/cco-computer-use": "0.3.2",
35
- "@chatcode/cco-llm-chatcode-config": "0.1.4-rc.9",
35
+ "@chatcode/cco-llm-chatcode-config": "0.1.4-rc.10",
36
36
  "@chatcode/cco-market": "1.45.2-rc.4",
37
- "@chatcode/cco-tui": "0.10.0-rc.21",
37
+ "@chatcode/cco-tui": "0.10.0-rc.22",
38
38
  "@deepseek-ai/libreoffice-kit": "^0.1.1",
39
- "@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.21",
39
+ "@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.22",
40
40
  "@earendil-works/pi-ai": "^0.85.1",
41
41
  "@eslint-community/regexpp": "^4.12.2",
42
42
  "@joplin/turndown-plugin-gfm": "^1.0.67",
@@ -58,11 +58,10 @@
58
58
  "commander": "^15.0.0",
59
59
  "compression": "^1.8.1",
60
60
  "diff": "^9.0.0",
61
- "dsh-better-sidebar": "npm:@chatcode/cco-better-sidebar@0.18.0-rc.11",
61
+ "dsh-better-sidebar": "npm:@chatcode/cco-better-sidebar@0.18.0-rc.12",
62
62
  "dsh-builtin-browser": "npm:@chatcode/cco-builtin-browser@0.1.21",
63
63
  "dsh-chat-import": "npm:@chatcode/cco-chat-import@0.17.0",
64
64
  "dsh-computer-use": "npm:@chatcode/cco-computer-use@0.3.2",
65
- "dsh-llm-chatcode-config": "npm:@chatcode/cco-llm-chatcode-config@0.1.4-rc.9",
66
65
  "dshmarket": "npm:@chatcode/cco-market@1.45.2-rc.4",
67
66
  "eventsource-parser": "^3.1.0",
68
67
  "execa": "^10.0.0",
@@ -75,7 +74,7 @@
75
74
  "node-addon-require-builtin": "^0.1.6",
76
75
  "node-pty": "1.2.0-beta.15",
77
76
  "open": "^11.0.0",
78
- "picomatch": "^4.0.3",
77
+ "picomatch": "^4.0.4",
79
78
  "react": "^18.2.0",
80
79
  "react-dom": "^18.2.0",
81
80
  "resolve.exports": "^2.0.3",
@@ -96,46 +95,46 @@
96
95
  "ajv": "^8.20.0",
97
96
  "execa": "^10.0.0",
98
97
  "ws": "8.21.0",
98
+ "@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
99
99
  "@deepseek-ai/dsh-acp": "0.1.7-rc.2",
100
- "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
101
- "@deepseek-ai/dsh-bash-local": "0.1.7-rc.2",
100
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
101
+ "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-rc.2",
102
102
  "@deepseek-ai/dsh-agent-loop": "0.1.7-rc.2",
103
+ "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
103
104
  "@deepseek-ai/dsh-credentials-local": "0.1.7-rc.2",
104
- "@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
105
- "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-rc.2",
105
+ "@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.1.7-rc.2",
106
+ "@deepseek-ai/dsh-bash-local": "0.1.7-rc.2",
106
107
  "@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.1.7-rc.2",
107
- "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
108
- "@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
109
108
  "@deepseek-ai/dsh-fs-observation-policy": "0.1.7-rc.2",
110
- "@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.1.7-rc.2",
111
109
  "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
112
- "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
110
+ "@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
111
+ "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
112
+ "@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
113
113
  "@deepseek-ai/dsh-llm-deepseek-account": "0.1.7-rc.2",
114
+ "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
114
115
  "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
115
- "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
116
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
117
+ "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
116
118
  "@deepseek-ai/dsh-llm-mock-server": "0.1.7-rc.2",
119
+ "@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.1.7-rc.2",
120
+ "@deepseek-ai/dsh-loader-smoke": "0.1.7-rc.2",
121
+ "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
117
122
  "@deepseek-ai/dsh-llm-replay": "0.1.7-rc.2",
123
+ "@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
124
+ "@deepseek-ai/dsh-session": "0.1.7-rc.2",
125
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
118
126
  "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2",
119
- "@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
120
- "@deepseek-ai/dsh-loader-smoke": "0.1.7-rc.2",
121
- "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
122
- "@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.1.7-rc.2",
127
+ "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
123
128
  "@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
124
- "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
125
129
  "@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
126
- "@deepseek-ai/dsh-session": "0.1.7-rc.2",
127
- "@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
128
- "@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
129
- "@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-rc.2",
130
130
  "@deepseek-ai/dsh-subagent": "0.1.7-rc.2",
131
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
132
- "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
133
- "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
131
+ "@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-rc.2",
134
132
  "@deepseek-ai/dsh-shell-env": "0.1.7-rc.2",
135
133
  "@deepseek-ai/dsh-subprocess-local": "0.1.7-rc.2",
136
- "@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
137
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
134
+ "@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
135
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
138
136
  "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
137
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
139
138
  "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2"
140
139
  },
141
140
  "exports": {
@@ -282,6 +282,6 @@
282
282
  "@deepseek-ai/node-addon-system",
283
283
  "@deepseek-ai/schemastery"
284
284
  ],
285
- "fileCount": 3611,
286
- "byteCount": 68765128
285
+ "fileCount": 3624,
286
+ "byteCount": 68871835
287
287
  }
@@ -17,17 +17,19 @@ function selection(settings) {
17
17
  ...settings.reasoningEffort === void 0 ? {} : { reasoningEffort: ReasoningEffortId(settings.reasoningEffort) }
18
18
  };
19
19
  }
20
- /** Parse one product-wide model preference without accepting partial records. */
20
+ /** Parse a complete route, preferring nested effort metadata over legacy top-level metadata. */
21
21
  function sharedPreference(path, warn) {
22
22
  try {
23
23
  const parsed = JSON.parse(readFileSync(path, "utf8"));
24
24
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("expected a model preference object");
25
25
  const record = parsed;
26
26
  if (typeof record.provider !== "string" || record.provider.length === 0 || typeof record.model !== "string" || record.model.length === 0) throw new Error("expected non-empty provider and model IDs");
27
+ const reasoning = record.reasoning;
28
+ const effort = reasoning === void 0 ? record.reasoningEffort : typeof reasoning === "object" && reasoning !== null && !Array.isArray(reasoning) ? reasoning.effort : void 0;
27
29
  const route = selection({
28
30
  provider: record.provider,
29
31
  model: record.model,
30
- ...typeof record.reasoningEffort === "string" && record.reasoningEffort.length > 0 ? { reasoningEffort: record.reasoningEffort } : {}
32
+ ...typeof effort === "string" && effort.length > 0 ? { reasoningEffort: effort } : {}
31
33
  });
32
34
  const displayName = typeof record.displayName === "string" ? record.displayName.trim() : "";
33
35
  return {
@@ -203,8 +205,10 @@ var AgentDefaultModelConfig = class extends Service {
203
205
  const previous = this.sharedDisplayName();
204
206
  let displayName = previous?.provider === config.provider && previous.model === config.model ? previous.name : void 0;
205
207
  if (name?.trim()) displayName = name.trim();
208
+ const { reasoningEffort, ...route } = config;
206
209
  const preference = {
207
- ...config,
210
+ ...route,
211
+ ...reasoningEffort === void 0 ? {} : { reasoning: { effort: reasoningEffort } },
208
212
  ...displayName === void 0 ? {} : { displayName }
209
213
  };
210
214
  const path = this.sharedPath;
@@ -1,12 +1,14 @@
1
1
  import { isDeepStrictEqual } from "node:util";
2
2
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
3
- import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
3
+ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
4
4
  import z from "@deepseek-ai/schemastery";
5
5
  import { chatCodeCliHomeDisplay, resolveChatCodeCliHome } from "@deepseek-ai/dsh-home-paths";
6
6
  import { createReadStream } from "node:fs";
7
- import { stat } from "node:fs/promises";
7
+ import { readdir, realpath, stat } from "node:fs/promises";
8
8
  import { assertNever } from "@deepseek-ai/dsh-util-values";
9
9
  import { createHash } from "node:crypto";
10
+ import picomatch from "picomatch";
11
+ import { parse } from "yaml";
10
12
  //#region lib/types/config.js
11
13
  /**
12
14
  * Configuration normalization for workspace instruction discovery and rendering.
@@ -40,6 +42,7 @@ const Config = z.object({
40
42
  */
41
43
  function workspaceBaselineIdentity(config, cwd, projectRoot) {
42
44
  return JSON.stringify({
45
+ chatCodeRules: true,
43
46
  projectRoot: relative(cwd, projectRoot),
44
47
  projectRootMarkers: config.projectRootMarkers,
45
48
  maxBytes: config.maxBytes,
@@ -103,6 +106,92 @@ function trimmedInstructionDigest(content) {
103
106
  return instructionContentSha1(content.trim());
104
107
  }
105
108
  //#endregion
109
+ //#region lib/types/rules.js
110
+ /**
111
+ * Recursive ChatCode rule discovery and path-conditional applicability.
112
+ *
113
+ * @module @deepseek-ai/dsh-agent-instructions/rules
114
+ */
115
+ /**
116
+ * List Markdown rules recursively, following each directory identity at most once.
117
+ * @param root - absolute rules directory.
118
+ * @param fileSystem - optional filesystem provider used for all probes.
119
+ * @param signal - cancellation for directory probes.
120
+ * @returns paths in deterministic depth-first filename order; absent roots contribute none.
121
+ */
122
+ async function discoverRulePaths(root, fileSystem, signal) {
123
+ const seen = /* @__PURE__ */ new Set();
124
+ const visit = async (directory) => {
125
+ signal?.throwIfAborted();
126
+ try {
127
+ const target = fileSystem === void 0 ? void 0 : await fileSystem.resolve(directory, signal === void 0 ? void 0 : { signal });
128
+ const identity = target?.targetKey ?? await realpath(directory);
129
+ if (seen.has(identity)) return [];
130
+ seen.add(identity);
131
+ const entries = fileSystem !== void 0 && target !== void 0 ? (await fileSystem.listDir(target, signal)).map((entry) => ({
132
+ name: entry.name,
133
+ directory: entry.type === "directory",
134
+ file: entry.type === "file"
135
+ })) : (await readdir(directory, { withFileTypes: true })).map((entry) => ({
136
+ name: entry.name,
137
+ directory: entry.isDirectory(),
138
+ file: entry.isFile()
139
+ }));
140
+ const paths = [];
141
+ for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
142
+ const path = join(directory, entry.name);
143
+ if (entry.directory) paths.push(...await visit(path));
144
+ else if (entry.file && entry.name.endsWith(".md")) paths.push(path);
145
+ }
146
+ return paths;
147
+ } catch (error) {
148
+ signal?.throwIfAborted();
149
+ if (typeof error === "object" && error !== null && "code" in error && [
150
+ "ENOENT",
151
+ "ENOTDIR",
152
+ "FS_NOT_FOUND",
153
+ "FS_NOT_DIRECTORY"
154
+ ].includes(String(error.code))) return [];
155
+ throw error;
156
+ }
157
+ };
158
+ return visit(root);
159
+ }
160
+ /**
161
+ * Decide whether a rule applies to this request's file activity.
162
+ * @param content - rule Markdown, optionally carrying YAML `paths` frontmatter.
163
+ * @param base - project directory against which rule patterns are evaluated.
164
+ * @param cwd - session directory used for relative tool paths.
165
+ * @param touchedPaths - successful first-party filesystem targets.
166
+ * @param active - whether this rule has already entered the session.
167
+ * @returns whether to retain the rule; malformed conditions never become unconditional.
168
+ */
169
+ function ruleApplies(content, base, cwd, touchedPaths, active = false) {
170
+ const normalized = content.replace(/^\uFEFF/, "").replaceAll("\r\n", "\n");
171
+ if (!normalized.startsWith("---\n")) return true;
172
+ const frontmatter = /^---\n([\s\S]*?)^---(?:\n|$)/m.exec(normalized);
173
+ if (frontmatter === null) return false;
174
+ let data;
175
+ try {
176
+ data = parse(frontmatter[1] ?? "");
177
+ } catch {
178
+ return false;
179
+ }
180
+ if (data === null || data === void 0) return true;
181
+ if (typeof data !== "object" || Array.isArray(data)) return false;
182
+ if (!("paths" in data) || data.paths === void 0) return true;
183
+ const paths = typeof data.paths === "string" ? [data.paths] : data.paths;
184
+ if (!Array.isArray(paths) || paths.some((path) => typeof path !== "string" || path.trim() === "")) return false;
185
+ if (paths.length === 0) return true;
186
+ if (active) return true;
187
+ const matches = picomatch(paths, { dot: true });
188
+ return touchedPaths.some((path) => {
189
+ const child = relative(base, resolve(cwd, path));
190
+ if (child === ".." || child.startsWith(`..${sep}`) || isAbsolute(child)) return false;
191
+ return matches(child.split(sep).join("/"));
192
+ });
193
+ }
194
+ //#endregion
106
195
  //#region lib/types/render.js
107
196
  /**
108
197
  * Model-facing workspace instruction rendering within an explicit byte budget.
@@ -146,7 +235,10 @@ const USER_GLOBAL_FILE = "AGENTS.md";
146
235
  * @returns `user-global`, `.`, or the containing project-relative directory.
147
236
  */
148
237
  function scopeForDisplayPath(displayPath) {
149
- if (displayPath === "~/.chatcode-cli/AGENTS.md" || displayPath === "$CHATCODE_CLI_HOME/AGENTS.md") return USER_GLOBAL_DIRECTORY;
238
+ const path = displayPath.replaceAll("\\", "/");
239
+ if (path.startsWith("~/.chatcode-cli/") || path.startsWith("$CHATCODE_CLI_HOME/")) return USER_GLOBAL_DIRECTORY;
240
+ const config = path.indexOf(".chatcode-cli/");
241
+ if (config >= 0) return path.slice(0, config).replace(/\/$/, "") || ".";
150
242
  return dirname(displayPath);
151
243
  }
152
244
  const SCOPE_SEPARATOR = "\0";
@@ -170,7 +262,9 @@ function candidateScopeKey(directory, candidateName) {
170
262
  * @returns the scope key pairing the file's directory with its name.
171
263
  */
172
264
  function instructionScopeKey(displayPath) {
173
- return candidateScopeKey(scopeForDisplayPath(displayPath), basename(displayPath));
265
+ const path = displayPath.replaceAll("\\", "/");
266
+ for (const prefix of ["~/.chatcode-cli/", "$CHATCODE_CLI_HOME/"]) if (path.startsWith(prefix)) return candidateScopeKey(USER_GLOBAL_DIRECTORY, path.slice(prefix.length));
267
+ return candidateScopeKey(dirname(displayPath), basename(displayPath));
174
268
  }
175
269
  /**
176
270
  * Recover the directory and candidate name that {@link candidateScopeKey} encoded.
@@ -402,6 +496,47 @@ function renderAgentInstructions(files, options) {
402
496
  *
403
497
  * @module @deepseek-ai/dsh-agent-instructions/files
404
498
  */
499
+ /**
500
+ * Discover additive ChatCode project instructions and recursive Markdown rules.
501
+ * @param dir - project directory, or the ChatCode home for a global scan.
502
+ * @param root - project display base.
503
+ * @param fileSystem - optional filesystem provider.
504
+ * @param signal - cancellation for filesystem probes.
505
+ * @param userGlobal - whether `dir` is the ChatCode home.
506
+ * @returns present files in base-before-rules order.
507
+ */
508
+ async function discoverChatCodeInstructions(dir, root, fileSystem, signal, userGlobal = false) {
509
+ const configDir = userGlobal ? dir : join(dir, ".chatcode-cli");
510
+ const files = [];
511
+ if (!userGlobal) files.push(...await allExistingInstructionFiles(configDir, root, ["AGENTS.md"], fileSystem, signal));
512
+ for (const absolutePath of await discoverRulePaths(join(configDir, "rules"), fileSystem, signal)) {
513
+ const probe = await statFile(absolutePath, fileSystem, signal);
514
+ if (probe.kind !== "present") continue;
515
+ files.push({
516
+ absolutePath,
517
+ ...probe.info,
518
+ displayPath: userGlobal ? `${chatCodeCliHomeDisplay(dir)}/${relative(dir, absolutePath).split("\\").join("/")}` : relativeDisplay(root, absolutePath)
519
+ });
520
+ }
521
+ return files;
522
+ }
523
+ /**
524
+ * Check a loaded ChatCode rule's path conditions without changing ordinary instruction files.
525
+ * @param file - loaded instruction file.
526
+ * @param projectRoot - project base for global rule patterns.
527
+ * @param cwd - session directory.
528
+ * @param touchedPaths - successful filesystem targets for conditional activation.
529
+ * @param active - whether this rule is already visible in the session.
530
+ * @returns whether the file is applicable.
531
+ */
532
+ function instructionApplies(file, projectRoot, cwd, touchedPaths, active = false) {
533
+ const display = file.displayPath.split("\\").join("/");
534
+ const projectRules = display.indexOf(".chatcode-cli/rules/");
535
+ const global = display.startsWith("~/.chatcode-cli/rules/") || display.startsWith("$CHATCODE_CLI_HOME/rules/");
536
+ if (!global && projectRules < 0) return true;
537
+ const base = global ? projectRoot : resolve(projectRoot, display.slice(0, projectRules) || ".");
538
+ return ruleApplies(file.content, base, cwd, touchedPaths, active);
539
+ }
405
540
  function signalOptions(signal) {
406
541
  return signal === void 0 ? void 0 : { signal };
407
542
  }
@@ -574,9 +709,13 @@ async function discoverInstructionFiles(options, fileSystem) {
574
709
  /* v8 ignore next 2 -- StatFileProbe is closed; this arm only makes adding a kind a compile error. */
575
710
  default: assertNever(userGlobalProbe, "StatFileProbe");
576
711
  }
712
+ for (const file of await discoverChatCodeInstructions(config.dshHome, options.cwd, fileSystem, options.signal, true)) addFile(file);
577
713
  const cwd = resolve(options.cwd);
578
714
  const projectRoot = options.projectRoot ?? await findProjectRoot(cwd, config.projectRootMarkers, fileSystem, options.signal);
579
- for (const dir of ancestorChain(projectRoot, cwd)) for (const candidates of [config.instructionFileCandidates, config.localInstructionFileCandidates]) for (const file of await allExistingInstructionFiles(dir, projectRoot, candidates, fileSystem, options.signal)) addFile(file);
715
+ for (const dir of ancestorChain(projectRoot, cwd)) {
716
+ for (const candidates of [config.instructionFileCandidates, config.localInstructionFileCandidates]) for (const file of await allExistingInstructionFiles(dir, projectRoot, candidates, fileSystem, options.signal)) addFile(file);
717
+ for (const file of await discoverChatCodeInstructions(dir, projectRoot, fileSystem, options.signal)) addFile(file);
718
+ }
580
719
  return files;
581
720
  }
582
721
  /**
@@ -668,11 +807,18 @@ async function loadBaselineInstructionSet(options, fileSystem) {
668
807
  const config = resolveConfig(options);
669
808
  if (config.maxBytes <= 0 || !Number.isFinite(config.maxBytes)) return void 0;
670
809
  if (config.maxSourceBytes <= 0 || !Number.isFinite(config.maxSourceBytes)) return void 0;
671
- const discovered = await discoverInstructionFiles(options, fileSystem);
810
+ const projectRoot = options.projectRoot ?? await findProjectRoot(options.cwd, config.projectRootMarkers, fileSystem, options.signal);
811
+ const discovered = await discoverInstructionFiles({
812
+ ...options,
813
+ projectRoot
814
+ }, fileSystem);
672
815
  const loaded = [];
673
816
  for (const file of discovered) {
674
817
  const content = await readBounded(file, config.maxSourceBytes, fileSystem, options.signal);
675
- if (content !== void 0) loaded.push({
818
+ if (content !== void 0 && instructionApplies({
819
+ ...file,
820
+ content
821
+ }, projectRoot, options.cwd, [])) loaded.push({
676
822
  absolutePath: file.absolutePath,
677
823
  displayPath: file.displayPath,
678
824
  content,
@@ -728,7 +874,7 @@ async function probeScopeInstruction(scope, projectRoot, resolved, fileSystem, s
728
874
  kind: "present",
729
875
  file: {
730
876
  absolutePath,
731
- displayPath: directory === "user-global" ? userGlobalDisplayPath(resolved.dshHome) : relativeDisplay(projectRoot, absolutePath),
877
+ displayPath: directory === "user-global" ? `${chatCodeCliHomeDisplay(resolved.dshHome)}/${candidateName.split("\\").join("/")}` : relativeDisplay(projectRoot, absolutePath),
732
878
  target,
733
879
  version: info.version,
734
880
  ...info.size === void 0 ? {} : { size: info.size }
@@ -922,7 +1068,14 @@ async function reconcileInstructionContext(agent, resolved, versionCache, fileSy
922
1068
  addDirScopes(target, relativeScope(projectRoot, dir));
923
1069
  };
924
1070
  baselineScopes.add(candidateScopeKey(USER_GLOBAL_DIRECTORY, USER_GLOBAL_FILE));
925
- for (const dir of ancestorChain(projectRoot, cwd)) addProjectScopes(baselineScopes, dir);
1071
+ const addChatCodeScopes = async (target, dir, userGlobal = false) => {
1072
+ for (const file of await discoverChatCodeInstructions(dir, projectRoot, fileSystem, options.signal, userGlobal)) target.add(instructionScopeKey(file.displayPath));
1073
+ };
1074
+ await addChatCodeScopes(baselineScopes, resolved.dshHome, true);
1075
+ for (const dir of ancestorChain(projectRoot, cwd)) {
1076
+ addProjectScopes(baselineScopes, dir);
1077
+ await addChatCodeScopes(baselineScopes, dir);
1078
+ }
926
1079
  if (options.includeBaselineScopes) for (const scope of baselineScopes) scopes.add(scope);
927
1080
  for (const message of options.scopeMessages) {
928
1081
  /* v8 ignore next -- the plugin passes its workspace-only pending projection. */
@@ -935,10 +1088,14 @@ async function reconcileInstructionContext(agent, resolved, versionCache, fileSy
935
1088
  for (const scope of effective.keys()) {
936
1089
  if (!options.includeBaselineScopes && baselineScopes.has(scope)) continue;
937
1090
  const { directory } = decodeScopeKey(scope);
938
- if (directory === "user-global") scopes.add(candidateScopeKey(USER_GLOBAL_DIRECTORY, USER_GLOBAL_FILE));
1091
+ if (directory === "user-global" || directory.replaceAll("\\", "/").split("/").includes(".chatcode-cli")) scopes.add(scope);
939
1092
  else addDirScopes(scopes, directory);
940
1093
  }
941
- for (const touchedPath of options.touchedPaths) for (const dir of descendantDirsBetween(cwd, touchedPath)) addProjectScopes(scopes, dir);
1094
+ if (options.touchedPaths.length > 0) for (const scope of baselineScopes) scopes.add(scope);
1095
+ for (const touchedPath of options.touchedPaths) for (const dir of descendantDirsBetween(cwd, touchedPath)) {
1096
+ addProjectScopes(scopes, dir);
1097
+ await addChatCodeScopes(scopes, dir);
1098
+ }
942
1099
  const versions = versionStatesFor(session, versionCache);
943
1100
  const seenAbsolutePaths = /* @__PURE__ */ new Set();
944
1101
  const keptTrimmedByDir = /* @__PURE__ */ new Map();
@@ -1017,6 +1174,7 @@ async function reconcileInstructionContext(agent, resolved, versionCache, fileSy
1017
1174
  }
1018
1175
  const file = await readScopeInstruction(probedFile, resolved.maxSourceBytes, fileSystem, options.signal);
1019
1176
  if (file === void 0) continue;
1177
+ if (!instructionApplies(file, projectRoot, cwd, options.touchedPaths, previous !== void 0 && previous.action !== "remove")) continue;
1020
1178
  const currentDigest = instructionContentSha1(file.content);
1021
1179
  const trimmedDigest = trimmedInstructionDigest(file.content);
1022
1180
  if (registerKeptTrimmed(directory, trimmedDigest)) {
@@ -17,6 +17,11 @@ export interface LoadedInstructionFile extends InstructionFile {
17
17
  /** Provider freshness token when the file was loaded through `ctx.fs`. */
18
18
  version?: FsVersion;
19
19
  }
20
+ interface DiscoveredInstructionFile extends InstructionFile {
21
+ target?: FsTarget;
22
+ size?: number;
23
+ version?: FsVersion;
24
+ }
20
25
  /** Provider metadata for a probed scope candidate before its content is read. */
21
26
  export interface ProbedInstructionFile extends InstructionFile {
22
27
  target: FsTarget;
@@ -38,6 +43,26 @@ interface LoadOptions extends DiscoverOptions {
38
43
  maxSourceBytes?: number;
39
44
  replacePreviousBaseline?: boolean;
40
45
  }
46
+ /**
47
+ * Discover additive ChatCode project instructions and recursive Markdown rules.
48
+ * @param dir - project directory, or the ChatCode home for a global scan.
49
+ * @param root - project display base.
50
+ * @param fileSystem - optional filesystem provider.
51
+ * @param signal - cancellation for filesystem probes.
52
+ * @param userGlobal - whether `dir` is the ChatCode home.
53
+ * @returns present files in base-before-rules order.
54
+ */
55
+ export declare function discoverChatCodeInstructions(dir: string, root: string, fileSystem?: FileSystem, signal?: AbortSignal, userGlobal?: boolean): Promise<DiscoveredInstructionFile[]>;
56
+ /**
57
+ * Check a loaded ChatCode rule's path conditions without changing ordinary instruction files.
58
+ * @param file - loaded instruction file.
59
+ * @param projectRoot - project base for global rule patterns.
60
+ * @param cwd - session directory.
61
+ * @param touchedPaths - successful filesystem targets for conditional activation.
62
+ * @param active - whether this rule is already visible in the session.
63
+ * @returns whether the file is applicable.
64
+ */
65
+ export declare function instructionApplies(file: LoadedInstructionFile, projectRoot: string, cwd: string, touchedPaths: readonly string[], active?: boolean): boolean;
41
66
  /** Rendered baseline plus the successfully read and byte-budget-retained files. */
42
67
  export interface RenderedInstructionSet {
43
68
  rendered: RenderedAgentInstructions;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Recursive ChatCode rule discovery and path-conditional applicability.
3
+ *
4
+ * @module @deepseek-ai/dsh-agent-instructions/rules
5
+ */
6
+ import type { FileSystem } from '@deepseek-ai/dsh-fs';
7
+ /**
8
+ * List Markdown rules recursively, following each directory identity at most once.
9
+ * @param root - absolute rules directory.
10
+ * @param fileSystem - optional filesystem provider used for all probes.
11
+ * @param signal - cancellation for directory probes.
12
+ * @returns paths in deterministic depth-first filename order; absent roots contribute none.
13
+ */
14
+ export declare function discoverRulePaths(root: string, fileSystem?: FileSystem, signal?: AbortSignal): Promise<string[]>;
15
+ /**
16
+ * Decide whether a rule applies to this request's file activity.
17
+ * @param content - rule Markdown, optionally carrying YAML `paths` frontmatter.
18
+ * @param base - project directory against which rule patterns are evaluated.
19
+ * @param cwd - session directory used for relative tool paths.
20
+ * @param touchedPaths - successful first-party filesystem targets.
21
+ * @param active - whether this rule has already entered the session.
22
+ * @returns whether to retain the rule; malformed conditions never become unconditional.
23
+ */
24
+ export declare function ruleApplies(content: string, base: string, cwd: string, touchedPaths: readonly string[], active?: boolean): boolean;
25
+ //# sourceMappingURL=rules.d.ts.map
@@ -38,7 +38,9 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@deepseek-ai/dsh-util-values": "workspace:*",
41
- "@deepseek-ai/schemastery": "workspace:~"
41
+ "@deepseek-ai/schemastery": "workspace:~",
42
+ "picomatch": "^4.0.4",
43
+ "yaml": "^2.4.2"
42
44
  },
43
45
  "devDependencies": {
44
46
  "@deepseek-ai/cordis": "workspace:~",
@@ -56,6 +58,7 @@
56
58
  "@deepseek-ai/dsh-session-projection": "workspace:*",
57
59
  "@deepseek-ai/dsh-system-prompt": "workspace:*",
58
60
  "@deepseek-ai/dsh-tool-fs": "workspace:*",
59
- "@deepseek-ai/dsh-tools": "workspace:*"
61
+ "@deepseek-ai/dsh-tools": "workspace:*",
62
+ "@types/picomatch": "^4.0.2"
60
63
  }
61
64
  }
@@ -1383,6 +1383,10 @@ window.__ModuleLoader__.load({
1383
1383
  publishedSeqs = /* @__PURE__ */ new Set();
1384
1384
  durableCursor = -1;
1385
1385
  transientInGap = 0;
1386
+ /** Whether the followed Assistant attempt is still awaiting its terminal frame. */
1387
+ get streaming() {
1388
+ return this.activeAttempt !== void 0;
1389
+ }
1386
1390
  /**
1387
1391
  * Replace the durable Web window and adopt an optional reconnect baseline.
1388
1392
  * @param entries - durable entries in the replacement window.
@@ -1683,7 +1687,7 @@ window.__ModuleLoader__.load({
1683
1687
  */
1684
1688
  beginSubmission(input) {
1685
1689
  const requestId = randomUUID();
1686
- const placement = this.running ? input.mode === "steer" ? "steering" : "queued" : "transcript";
1690
+ const placement = this.getSnapshot().running ? input.mode === "steer" ? "steering" : "queued" : "transcript";
1687
1691
  this.pendingSubmissions = [...this.pendingSubmissions, {
1688
1692
  requestId,
1689
1693
  placement,
@@ -2076,7 +2080,11 @@ window.__ModuleLoader__.load({
2076
2080
  case "append":
2077
2081
  this.publishAssistantEntry(this.assistantStream.acceptDurable(change.entry));
2078
2082
  return;
2079
- case "assistant-stream": this.publishAssistantEntry(this.assistantStream.acceptFrame(change.frame));
2083
+ case "assistant-stream": {
2084
+ const wasStreaming = this.assistantStream.streaming;
2085
+ this.publishAssistantEntry(this.assistantStream.acceptFrame(change.frame));
2086
+ if (wasStreaming !== this.assistantStream.streaming) this.notifier.markDirty();
2087
+ }
2080
2088
  }
2081
2089
  }
2082
2090
  /** Replace the complete contiguous window and apply page-owned projection metadata. */
@@ -2275,7 +2283,7 @@ window.__ModuleLoader__.load({
2275
2283
  return {
2276
2284
  sessionId: this.sessionId,
2277
2285
  pendingSubmissions: this.pendingSubmissions,
2278
- running: this.running,
2286
+ running: this.running || this.openState !== "error" && this.assistantStream.streaming,
2279
2287
  subagent: this.address === void 0 ? null : {
2280
2288
  address: this.address.mode === "unknown" && identity != null ? {
2281
2289
  ...this.address,
@@ -59,6 +59,7 @@ export interface SessionSnapshot {
59
59
  readonly sessionId: SessionId;
60
60
  /** Local prompt-submission echoes not yet observed as durable events or queue occurrences. */
61
61
  readonly pendingSubmissions: readonly PendingSubmission[];
62
+ /** Host Agent activity or an Assistant attempt on a usable follow stream that has not ended. */
62
63
  readonly running: boolean;
63
64
  readonly subagent: {
64
65
  readonly address: SubagentAddress;
@@ -29,6 +29,8 @@ export declare class ClientAssistantStream {
29
29
  private publishedSeqs;
30
30
  private durableCursor;
31
31
  private transientInGap;
32
+ /** Whether the followed Assistant attempt is still awaiting its terminal frame. */
33
+ get streaming(): boolean;
32
34
  /**
33
35
  * Replace the durable Web window and adopt an optional reconnect baseline.
34
36
  * @param entries - durable entries in the replacement window.
@@ -8,6 +8,10 @@ export class ClientAssistantStream {
8
8
  publishedSeqs = new Set();
9
9
  durableCursor = -1;
10
10
  transientInGap = 0;
11
+ /** Whether the followed Assistant attempt is still awaiting its terminal frame. */
12
+ get streaming() {
13
+ return this.activeAttempt !== undefined;
14
+ }
11
15
  /**
12
16
  * Replace the durable Web window and adopt an optional reconnect baseline.
13
17
  * @param entries - durable entries in the replacement window.
@@ -147,7 +147,7 @@ export class Session {
147
147
  */
148
148
  beginSubmission(input) {
149
149
  const requestId = randomUUID();
150
- const placement = this.running ? input.mode === 'steer' ? 'steering' : 'queued' : 'transcript';
150
+ const placement = this.getSnapshot().running ? input.mode === 'steer' ? 'steering' : 'queued' : 'transcript';
151
151
  this.pendingSubmissions = [...this.pendingSubmissions, {
152
152
  requestId,
153
153
  placement,
@@ -573,8 +573,13 @@ export class Session {
573
573
  case 'append':
574
574
  this.publishAssistantEntry(this.assistantStream.acceptDurable(change.entry));
575
575
  return;
576
- case 'assistant-stream':
576
+ case 'assistant-stream': {
577
+ const wasStreaming = this.assistantStream.streaming;
577
578
  this.publishAssistantEntry(this.assistantStream.acceptFrame(change.frame));
579
+ // Start/end frames can change activity without publishing a text entry.
580
+ if (wasStreaming !== this.assistantStream.streaming)
581
+ this.notifier.markDirty();
582
+ }
578
583
  }
579
584
  }
580
585
  /** Replace the complete contiguous window and apply page-owned projection metadata. */
@@ -814,7 +819,9 @@ export class Session {
814
819
  return {
815
820
  sessionId: this.sessionId,
816
821
  pendingSubmissions: this.pendingSubmissions,
817
- running: this.running,
822
+ // Host status and followed Assistant frames arrive independently. Keep
823
+ // the composer busy until the visible attempt receives its end frame.
824
+ running: this.running || (this.openState !== 'error' && this.assistantStream.streaming),
818
825
  subagent: this.address === undefined
819
826
  ? null
820
827
  : {