@meiyukichan/dsh-sandore 0.1.0-rc.6

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 (295) hide show
  1. package/LICENSE +201 -0
  2. package/cordis.patch.yml +39 -0
  3. package/dsh.plugin.json +16 -0
  4. package/lib/client/CommandEditor.d.ts +19 -0
  5. package/lib/client/DagEditor.d.ts +22 -0
  6. package/lib/client/DefinitionDetail.d.ts +13 -0
  7. package/lib/client/DefinitionList.d.ts +19 -0
  8. package/lib/client/DiscussionInput.d.ts +63 -0
  9. package/lib/client/DragHandle.d.ts +16 -0
  10. package/lib/client/EditorPane.d.ts +13 -0
  11. package/lib/client/FlowEditor.d.ts +31 -0
  12. package/lib/client/InstanceList.d.ts +24 -0
  13. package/lib/client/NewInstanceDialog.d.ts +19 -0
  14. package/lib/client/PreviewPanel.d.ts +13 -0
  15. package/lib/client/RunView.d.ts +79 -0
  16. package/lib/client/StepChatPanel.d.ts +34 -0
  17. package/lib/client/TreeNav.d.ts +27 -0
  18. package/lib/client/UnifiedTimeline.d.ts +11 -0
  19. package/lib/client/WorkflowButton.d.ts +11 -0
  20. package/lib/client/WorkflowList.d.ts +18 -0
  21. package/lib/client/WorkflowOverlay.d.ts +6 -0
  22. package/lib/client/chat/AssistantMarkdown.d.ts +22 -0
  23. package/lib/client/chat/CompactionItem.d.ts +24 -0
  24. package/lib/client/chat/ContextBody.d.ts +136 -0
  25. package/lib/client/chat/ContextInjectionRow.d.ts +25 -0
  26. package/lib/client/chat/GenericCommandCard.d.ts +10 -0
  27. package/lib/client/chat/MessageIconActions.d.ts +41 -0
  28. package/lib/client/chat/MessageItem.d.ts +65 -0
  29. package/lib/client/chat/ReasoningRow.d.ts +13 -0
  30. package/lib/client/chat/TurnTailNodeView.d.ts +29 -0
  31. package/lib/client/chat/UserMessageRow.d.ts +18 -0
  32. package/lib/client/chat/attachment/ImageLightbox.d.ts +26 -0
  33. package/lib/client/chat/attachment/MessageImage.d.ts +56 -0
  34. package/lib/client/chat/attachment/image-attachment.d.ts +41 -0
  35. package/lib/client/chat/attachment/image-labels.d.ts +21 -0
  36. package/lib/client/chat/message-chrome.d.ts +51 -0
  37. package/lib/client/chat/reference/ReferenceIcon.d.ts +20 -0
  38. package/lib/client/chat/turn-assistant.d.ts +12 -0
  39. package/lib/client/chat/turn-metrics.d.ts +42 -0
  40. package/lib/client/chat/use-calendar-day.d.ts +5 -0
  41. package/lib/client/chat/use-throttled-visual-update.d.ts +7 -0
  42. package/lib/client/chat-flow.d.ts +110 -0
  43. package/lib/client/composer-selects.d.ts +17 -0
  44. package/lib/client/dag-editor-model.d.ts +141 -0
  45. package/lib/client/describe-error.d.ts +9 -0
  46. package/lib/client/index.d.ts +6 -0
  47. package/lib/client/locales.d.ts +777 -0
  48. package/lib/client/model-faces.d.ts +156 -0
  49. package/lib/client/open-discussion.d.ts +24 -0
  50. package/lib/client/panel-model.d.ts +34 -0
  51. package/lib/client/remote.d.ts +34 -0
  52. package/lib/client/run-view-model.d.ts +304 -0
  53. package/lib/client/sandore-save.d.ts +41 -0
  54. package/lib/client/sandore-sse.d.ts +15 -0
  55. package/lib/client/step-chat-retry.d.ts +44 -0
  56. package/lib/client/tool/GenericToolCard.d.ts +28 -0
  57. package/lib/client/tool/ToolRow.d.ts +95 -0
  58. package/lib/client/tool/diff-card-model.d.ts +63 -0
  59. package/lib/client/tool/read-card-model.d.ts +67 -0
  60. package/lib/client/tool/search-card-model.d.ts +94 -0
  61. package/lib/client/tool/terminal-card-model.d.ts +86 -0
  62. package/lib/client/tool/tool-call-model.d.ts +74 -0
  63. package/lib/client/tool/web-card-model.d.ts +44 -0
  64. package/lib/client/use-focus-refresh.d.ts +1 -0
  65. package/lib/client/workflow-face.d.ts +68 -0
  66. package/lib/client/workflow-store.d.ts +80 -0
  67. package/lib/client/workspace-path.d.ts +15 -0
  68. package/lib/client.js +38389 -0
  69. package/lib/index.js +8854 -0
  70. package/lib/microflow/branch-evaluator.d.ts +290 -0
  71. package/lib/microflow/concurrency-limiter.d.ts +39 -0
  72. package/lib/microflow/errors.d.ts +39 -0
  73. package/lib/microflow/file-utils.d.ts +210 -0
  74. package/lib/microflow/finalize-manager.d.ts +414 -0
  75. package/lib/microflow/fork-session.d.ts +151 -0
  76. package/lib/microflow/index.d.ts +17 -0
  77. package/lib/microflow/internal.d.ts +56 -0
  78. package/lib/microflow/loop-manager.d.ts +127 -0
  79. package/lib/microflow/rules-resolver.d.ts +28 -0
  80. package/lib/microflow/stage-executor.d.ts +362 -0
  81. package/lib/microflow/step-navigator.d.ts +108 -0
  82. package/lib/microflow/step-runner.d.ts +190 -0
  83. package/lib/microflow/subagents.d.ts +380 -0
  84. package/lib/tool/index.d.ts +65 -0
  85. package/lib/typert.host.d.ts +16 -0
  86. package/lib/typert.host.js +25 -0
  87. package/lib/typert.remote-client.d.ts +114 -0
  88. package/lib/typert.remote-client.js +399 -0
  89. package/lib/workflow/ask-tool.d.ts +78 -0
  90. package/lib/workflow/dag-navigator.d.ts +136 -0
  91. package/lib/workflow/domain.d.ts +304 -0
  92. package/lib/workflow/engine-surface.d.ts +70 -0
  93. package/lib/workflow/errors.d.ts +13 -0
  94. package/lib/workflow/host-agent.d.ts +53 -0
  95. package/lib/workflow/index.d.ts +23 -0
  96. package/lib/workflow/interaction-manager.d.ts +170 -0
  97. package/lib/workflow/lifecycle-manager.d.ts +111 -0
  98. package/lib/workflow/persistence.d.ts +35 -0
  99. package/lib/workflow/plugin.d.ts +27 -0
  100. package/lib/workflow/reactive-state.d.ts +27 -0
  101. package/lib/workflow/recovery-manager.d.ts +158 -0
  102. package/lib/workflow/remote.d.ts +139 -0
  103. package/lib/workflow/schema.d.ts +1917 -0
  104. package/lib/workflow/seam.d.ts +254 -0
  105. package/lib/workflow/shell.d.ts +127 -0
  106. package/lib/workflow/sse.d.ts +16 -0
  107. package/lib/workflow/typert/typert.host.d.ts +16 -0
  108. package/lib/workflow/typert/typert.remote-client.d.ts +114 -0
  109. package/lib/workflow/types.d.ts +187 -0
  110. package/lib/workflow/wire.d.ts +256 -0
  111. package/lib/workflow/workflow-engine.d.ts +373 -0
  112. package/lib/workflow/yaml-error.d.ts +22 -0
  113. package/lib/workflow/yaml-parser.d.ts +23 -0
  114. package/package.json +140 -0
  115. package/packages/client/CommandEditor.tsx +73 -0
  116. package/packages/client/DagEditor.module.css +711 -0
  117. package/packages/client/DagEditor.tsx +1203 -0
  118. package/packages/client/DefinitionDetail.module.css +110 -0
  119. package/packages/client/DefinitionDetail.tsx +126 -0
  120. package/packages/client/DefinitionList.tsx +173 -0
  121. package/packages/client/DiscussionInput.tsx +763 -0
  122. package/packages/client/DragHandle.tsx +92 -0
  123. package/packages/client/EditorPane.tsx +70 -0
  124. package/packages/client/FlowEditor.tsx +227 -0
  125. package/packages/client/InstanceList.tsx +250 -0
  126. package/packages/client/NewInstanceDialog.module.css +244 -0
  127. package/packages/client/NewInstanceDialog.tsx +478 -0
  128. package/packages/client/PreviewPanel.tsx +55 -0
  129. package/packages/client/RunView.module.css +246 -0
  130. package/packages/client/RunView.tsx +314 -0
  131. package/packages/client/StepChatPanel.tsx +486 -0
  132. package/packages/client/TreeNav.tsx +294 -0
  133. package/packages/client/UnifiedTimeline.tsx +484 -0
  134. package/packages/client/WorkflowButton.module.css +72 -0
  135. package/packages/client/WorkflowButton.tsx +50 -0
  136. package/packages/client/WorkflowList.tsx +158 -0
  137. package/packages/client/WorkflowOverlay.module.css +390 -0
  138. package/packages/client/WorkflowOverlay.tsx +136 -0
  139. package/packages/client/WorkflowPanel.module.css +247 -0
  140. package/packages/client/chat/AssistantMarkdown.module.css +38 -0
  141. package/packages/client/chat/AssistantMarkdown.tsx +120 -0
  142. package/packages/client/chat/ChatView.module.css +198 -0
  143. package/packages/client/chat/CompactionItem.tsx +85 -0
  144. package/packages/client/chat/ContextBody.module.css +162 -0
  145. package/packages/client/chat/ContextBody.tsx +598 -0
  146. package/packages/client/chat/ContextInjectionRow.module.css +63 -0
  147. package/packages/client/chat/ContextInjectionRow.tsx +78 -0
  148. package/packages/client/chat/GenericCommandCard.module.css +87 -0
  149. package/packages/client/chat/GenericCommandCard.tsx +76 -0
  150. package/packages/client/chat/MessageIconActions.module.css +84 -0
  151. package/packages/client/chat/MessageIconActions.tsx +147 -0
  152. package/packages/client/chat/MessageItem.module.css +293 -0
  153. package/packages/client/chat/MessageItem.tsx +384 -0
  154. package/packages/client/chat/ReasoningRow.module.css +82 -0
  155. package/packages/client/chat/ReasoningRow.tsx +70 -0
  156. package/packages/client/chat/TurnTailNodeView.module.css +10 -0
  157. package/packages/client/chat/TurnTailNodeView.tsx +63 -0
  158. package/packages/client/chat/UserMessageRow.module.css +75 -0
  159. package/packages/client/chat/UserMessageRow.tsx +92 -0
  160. package/packages/client/chat/accessibility.module.css +9 -0
  161. package/packages/client/chat/attachment/ImageLightbox.module.css +45 -0
  162. package/packages/client/chat/attachment/ImageLightbox.tsx +70 -0
  163. package/packages/client/chat/attachment/MessageImage.module.css +70 -0
  164. package/packages/client/chat/attachment/MessageImage.tsx +136 -0
  165. package/packages/client/chat/attachment/image-attachment.ts +98 -0
  166. package/packages/client/chat/attachment/image-labels.ts +34 -0
  167. package/packages/client/chat/message-chrome.ts +96 -0
  168. package/packages/client/chat/reference/ReferenceIcon.tsx +40 -0
  169. package/packages/client/chat/turn-assistant.ts +15 -0
  170. package/packages/client/chat/turn-metrics.ts +102 -0
  171. package/packages/client/chat/use-calendar-day.ts +27 -0
  172. package/packages/client/chat/use-throttled-visual-update.ts +44 -0
  173. package/packages/client/chat-flow.spec.ts +357 -0
  174. package/packages/client/chat-flow.ts +278 -0
  175. package/packages/client/composer-selects.module.css +376 -0
  176. package/packages/client/composer-selects.tsx +531 -0
  177. package/packages/client/dag-editor-model.spec.ts +173 -0
  178. package/packages/client/dag-editor-model.ts +359 -0
  179. package/packages/client/describe-error.spec.ts +18 -0
  180. package/packages/client/describe-error.ts +12 -0
  181. package/packages/client/index.ts +144 -0
  182. package/packages/client/input.module.css +854 -0
  183. package/packages/client/is-conditional-check.spec.ts +34 -0
  184. package/packages/client/locales.ts +789 -0
  185. package/packages/client/model-faces.ts +225 -0
  186. package/packages/client/open-discussion.spec.ts +39 -0
  187. package/packages/client/open-discussion.ts +32 -0
  188. package/packages/client/panel-model.spec.ts +152 -0
  189. package/packages/client/panel-model.ts +72 -0
  190. package/packages/client/preview.module.css +95 -0
  191. package/packages/client/react-dom.d.ts +11 -0
  192. package/packages/client/reactflow-theme.css +91 -0
  193. package/packages/client/remote.spec.ts +41 -0
  194. package/packages/client/remote.ts +46 -0
  195. package/packages/client/run-view-model.spec.ts +641 -0
  196. package/packages/client/run-view-model.ts +636 -0
  197. package/packages/client/sandore-save.spec.ts +146 -0
  198. package/packages/client/sandore-save.ts +97 -0
  199. package/packages/client/sandore-sse.ts +59 -0
  200. package/packages/client/step-chat-retry.spec.ts +70 -0
  201. package/packages/client/step-chat-retry.ts +65 -0
  202. package/packages/client/timeline.module.css +503 -0
  203. package/packages/client/tool/GenericToolCard.tsx +99 -0
  204. package/packages/client/tool/ToolRow.module.css +308 -0
  205. package/packages/client/tool/ToolRow.tsx +328 -0
  206. package/packages/client/tool/diff-card-model.ts +103 -0
  207. package/packages/client/tool/read-card-model.ts +86 -0
  208. package/packages/client/tool/search-card-model.ts +166 -0
  209. package/packages/client/tool/terminal-card-model.ts +225 -0
  210. package/packages/client/tool/tool-call-model.ts +267 -0
  211. package/packages/client/tool/web-card-model.ts +80 -0
  212. package/packages/client/tree-nav.module.css +282 -0
  213. package/packages/client/use-focus-refresh.ts +23 -0
  214. package/packages/client/workflow-face.ts +72 -0
  215. package/packages/client/workflow-store.spec.ts +49 -0
  216. package/packages/client/workflow-store.ts +161 -0
  217. package/packages/client/workspace-path.ts +27 -0
  218. package/packages/css-modules.d.ts +6 -0
  219. package/packages/microflow/branch-evaluator.spec.ts +745 -0
  220. package/packages/microflow/branch-evaluator.ts +1037 -0
  221. package/packages/microflow/concurrency-limiter.ts +70 -0
  222. package/packages/microflow/errors.ts +64 -0
  223. package/packages/microflow/file-utils.spec.ts +604 -0
  224. package/packages/microflow/file-utils.ts +521 -0
  225. package/packages/microflow/finalize-manager.spec.ts +1977 -0
  226. package/packages/microflow/finalize-manager.ts +1464 -0
  227. package/packages/microflow/fork-session.spec.ts +184 -0
  228. package/packages/microflow/fork-session.ts +316 -0
  229. package/packages/microflow/index.ts +17 -0
  230. package/packages/microflow/internal.ts +166 -0
  231. package/packages/microflow/loop-manager.spec.ts +294 -0
  232. package/packages/microflow/loop-manager.ts +255 -0
  233. package/packages/microflow/rules-resolver.spec.ts +147 -0
  234. package/packages/microflow/rules-resolver.ts +58 -0
  235. package/packages/microflow/stage-executor.spec.ts +1577 -0
  236. package/packages/microflow/stage-executor.ts +1478 -0
  237. package/packages/microflow/step-navigator.spec.ts +301 -0
  238. package/packages/microflow/step-navigator.ts +300 -0
  239. package/packages/microflow/step-runner.spec.ts +1132 -0
  240. package/packages/microflow/step-runner.ts +752 -0
  241. package/packages/microflow/subagents.spec.ts +215 -0
  242. package/packages/microflow/subagents.ts +422 -0
  243. package/packages/tests/fixtures/test-workflow.yaml +128 -0
  244. package/packages/tests/mocks/agents.ts +206 -0
  245. package/packages/tests/mocks/llm.ts +46 -0
  246. package/packages/tests/mocks/session-title.ts +31 -0
  247. package/packages/tests/mocks/sessions.ts +131 -0
  248. package/packages/tests/mocks/shell.ts +60 -0
  249. package/packages/tests/mocks/storage-domain.ts +101 -0
  250. package/packages/tests/mocks/subagents.ts +197 -0
  251. package/packages/tests/mocks/subprocess.ts +59 -0
  252. package/packages/tests/mocks/user-questions.ts +33 -0
  253. package/packages/tests/mocks/workspace.ts +52 -0
  254. package/packages/tool/index.spec.ts +287 -0
  255. package/packages/tool/index.ts +348 -0
  256. package/packages/workflow/ask-tool.ts +173 -0
  257. package/packages/workflow/dag-navigator.spec.ts +236 -0
  258. package/packages/workflow/dag-navigator.ts +425 -0
  259. package/packages/workflow/domain.ts +26 -0
  260. package/packages/workflow/engine-surface.ts +71 -0
  261. package/packages/workflow/errors.ts +13 -0
  262. package/packages/workflow/host-agent.spec.ts +92 -0
  263. package/packages/workflow/host-agent.ts +62 -0
  264. package/packages/workflow/index.ts +25 -0
  265. package/packages/workflow/interaction-manager.spec.ts +390 -0
  266. package/packages/workflow/interaction-manager.ts +397 -0
  267. package/packages/workflow/lifecycle-manager.spec.ts +683 -0
  268. package/packages/workflow/lifecycle-manager.ts +288 -0
  269. package/packages/workflow/persistence.spec.ts +109 -0
  270. package/packages/workflow/persistence.ts +64 -0
  271. package/packages/workflow/plugin.ts +39 -0
  272. package/packages/workflow/reactive-state.spec.ts +69 -0
  273. package/packages/workflow/reactive-state.ts +52 -0
  274. package/packages/workflow/recovery-manager.spec.ts +606 -0
  275. package/packages/workflow/recovery-manager.ts +471 -0
  276. package/packages/workflow/remote.spec.ts +1045 -0
  277. package/packages/workflow/remote.ts +479 -0
  278. package/packages/workflow/schema.spec.ts +303 -0
  279. package/packages/workflow/schema.ts +562 -0
  280. package/packages/workflow/seam.ts +293 -0
  281. package/packages/workflow/shell.ts +142 -0
  282. package/packages/workflow/sse.ts +110 -0
  283. package/packages/workflow/typert/typert.host.d.ts +16 -0
  284. package/packages/workflow/typert/typert.host.js +25 -0
  285. package/packages/workflow/typert/typert.remote-client.d.ts +114 -0
  286. package/packages/workflow/typert/typert.remote-client.js +399 -0
  287. package/packages/workflow/types.ts +258 -0
  288. package/packages/workflow/wire.ts +267 -0
  289. package/packages/workflow/workflow-engine-e2e.spec.ts +262 -0
  290. package/packages/workflow/workflow-engine-real-e2e.spec.ts +922 -0
  291. package/packages/workflow/workflow-engine.spec.ts +4389 -0
  292. package/packages/workflow/workflow-engine.ts +2133 -0
  293. package/packages/workflow/yaml-error.ts +29 -0
  294. package/packages/workflow/yaml-parser.spec.ts +757 -0
  295. package/packages/workflow/yaml-parser.ts +287 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,39 @@
1
+ # dsh-sandore bundle patch
2
+ #
3
+ # 本文件是 `dsh.bundle.patch` 层:通过官方 CLI 安装时——
4
+ #
5
+ # dsh plugin --profile <name> add dsh-sandore
6
+ #
7
+ # 命令会把 `dsh-sandore` 追加进 profile 的 `dsh.profile.bundles` 层栈;启动时
8
+ # profile boot 合并本 patch(单条 `insert` 插件行 + storage 路由),无需手改任何
9
+ # profile 文件。一个命令完成安装与挂载(host 引擎 + client UI + sqlite 持久化)。
10
+ #
11
+ # 行 id 用语义前缀 `sandore`:DSH bundle 的行 id 都是语义前缀(ui-* / tool-* /
12
+ # storage-* 等),`sandore` 唯一且不易与其它 overlay 的 id patch 冲突。
13
+ #
14
+ # 插件行 name = 本包名('dsh-sandore'):host 半由 main 提供;client 半经
15
+ # package.json 的 `dsh.client` 声明被 client-modules 扫描发现(exports["./client"])。
16
+ #
17
+ # storage 路由固化在此:sandore 存储域路由到 sqlite(行级读写,避免 json 后端把
18
+ # 整个 unit 全量重写进 sandore.json 导致膨胀)。`- id: storage-domain` 的 patch
19
+ # 会整行替换该行 config,所以必须同时带 `backend: json`(DSH bundle 默认)。
20
+ # storage-sqlite 包随本包 dependencies 安装(^0.1.0-rc.6),profile 可直接解析。
21
+
22
+ - insert:
23
+ - id: sandore
24
+ name: 'dsh-sandore'
25
+ config:
26
+ defaultTimeoutMs: 7200000
27
+ maxConcurrentSteps: 0
28
+ - id: storage-sqlite
29
+ name: '@deepseek-ai/dsh-storage-sqlite'
30
+ config:
31
+ path: !!js dshHomePath('storages/sandore.sqlite')
32
+
33
+ # sandore 持久化走 sqlite:把 sandore 存储域路由到 sqlite 后端,
34
+ # 其余域保持 json 默认不变。
35
+ - id: storage-domain
36
+ config:
37
+ backend: json
38
+ routes:
39
+ sandore: sqlite
@@ -0,0 +1,16 @@
1
+ {
2
+ "id": "dsh-external/dsh-sandore",
3
+ "version": "0.1.0",
4
+ "main": "./lib/index.js",
5
+ "description": "sandore: workflow orchestration engine for DSH — host engine + client UI in one bundle package",
6
+ "engines": {
7
+ "dsh": ">=0.0.1"
8
+ },
9
+ "contributes": {
10
+ "tools": [],
11
+ "skills": []
12
+ },
13
+ "client": {
14
+ "main": "./lib/client.js"
15
+ }
16
+ }
@@ -0,0 +1,19 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { CommandConfig } from 'dsh-sandore/schema';
3
+ import { type CommandType } from './dag-editor-model.ts';
4
+ /** 命令类型的本地化标签键。 */
5
+ export declare const COMMAND_LABEL_KEYS: {
6
+ readonly shell: "editor.command.shell";
7
+ readonly prompt: "editor.command.prompt";
8
+ readonly agent: "editor.command.agent";
9
+ readonly skill: "editor.command.skill";
10
+ readonly mcp: "editor.command.mcp";
11
+ };
12
+ /** 渲染命令编辑(类型选择 + 对应 value 字段)。`types` 可限定可选类型(如条件判断仅 bash/prompt)。 */
13
+ export declare function CommandEditor({ command, onChange, t, types }: {
14
+ readonly command: CommandConfig;
15
+ readonly onChange: (command: CommandConfig) => void;
16
+ readonly t: TranslateNS<'sandore'>;
17
+ /** 允许选择的命令类型;缺省为全部五类型。 */
18
+ readonly types?: readonly CommandType[] | undefined;
19
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import '@xyflow/react/dist/style.css';
2
+ import './reactflow-theme.css';
3
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
4
+ import { type SaveDefinition } from './sandore-save.ts';
5
+ import type { WorkflowOverlayFace } from './workflow-face.ts';
6
+ /** DagEditor 接收的最小业务 props:初始定义 + 保存回调 + face + locale。 */
7
+ export interface DagEditorProps {
8
+ /** 类型化的翻译函数(sandore 命名空间)。 */
9
+ t: TranslateNS<'sandore'>;
10
+ /** 已有定义的原始 YAML;省略时进入新建(空白骨架)。 */
11
+ initialYaml?: string | undefined;
12
+ /** 已有定义 id;新建时省略(首次保存后由保存回调返回并回填)。 */
13
+ initialId?: string | undefined;
14
+ /** 保存回调:`id` 为 `undefined` 时走 `createDefinition`,否则走 `updateYaml`;返回持久化后的 id。 */
15
+ save: SaveDefinition;
16
+ /** 保存成功回调(携带持久化后的 id),供宿主刷新定义列表等。 */
17
+ onSaved?: (id: string) => void;
18
+ /** 业务 face(「▶ 测试运行」复用 NewInstanceDialog 选工作目录后启动实例,无 job 概念)。 */
19
+ face: WorkflowOverlayFace;
20
+ }
21
+ /** 渲染 DagEditor(两层 DAG 画布 + 编辑侧栏 + YAML 预览)。 */
22
+ export declare function DagEditor({ t, initialYaml, initialId, save, onSaved, face }: DagEditorProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { WorkflowDefinition } from 'dsh-sandore/schema';
3
+ /** WorkflowDetailFields 接收的 props。 */
4
+ export interface WorkflowDetailFieldsProps {
5
+ /** 类型化翻译函数。 */
6
+ t: TranslateNS<'sandore'>;
7
+ /** 当前编辑态定义(由宿主持有)。 */
8
+ definition: WorkflowDefinition;
9
+ /** 字段变更回调(宿主合并更新 definition)。 */
10
+ onChange(next: WorkflowDefinition): void;
11
+ }
12
+ /** 渲染工作流详情字段表单(右侧面板默认视图)。 */
13
+ export declare function WorkflowDetailFields({ t, definition, onChange }: WorkflowDetailFieldsProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { WorkflowDefinitionEntry } from 'dsh-sandore/remote';
3
+ /** DefinitionList 接收的普通业务 props。 */
4
+ export interface DefinitionListProps {
5
+ /** 类型化的翻译函数(sandore 命名空间)。 */
6
+ t: TranslateNS<'sandore'>;
7
+ /** 客户端过滤关键词(匹配 name / id)。 */
8
+ query: string;
9
+ /** 当前选中定义 id(高亮行;缺省不高亮)。 */
10
+ activeId?: string | undefined;
11
+ /** 拉取定义列表(RPC 已解包)。 */
12
+ listDefinitions(): Promise<WorkflowDefinitionEntry[]>;
13
+ /** 删除定义(RPC 已解包)。 */
14
+ deleteDefinition(id: string): Promise<boolean>;
15
+ /** 点击定义行下钻 DagEditor(传入 id 与原始 yaml)。 */
16
+ onOpen(definitionId: string, initialYaml: string): void;
17
+ }
18
+ /** 渲染 DefinitionList。 */
19
+ export declare function DefinitionList({ t, query, activeId, listDefinitions, deleteDefinition, onOpen }: DefinitionListProps): import("react").JSX.Element;
@@ -0,0 +1,63 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { PendingPermissionEntry, PendingQuestionEntry } from 'dsh-sandore/schema';
3
+ import { type AnswerItem, type DagRunStatus, type ExecutedStep, type RevertBoundaryOption, type RetryMode } from './run-view-model.ts';
4
+ import type { ModelDirectoryFace, ObservableFace, PermissionSelectValue } from './model-faces.ts';
5
+ /** DiscussionInput 接收的 props。 */
6
+ export interface DiscussionInputProps {
7
+ /** 类型化翻译函数。 */
8
+ t: TranslateNS<'sandore'>;
9
+ /** 实例生命周期状态。 */
10
+ status: DagRunStatus;
11
+ /** 已执行 Step 列表(供 @Step 选择、失败默认目标与接管面板 step 名反查)。 */
12
+ steps: readonly ExecutedStep[];
13
+ /** 待答问题条目(接管 QuestionComposer)。 */
14
+ questions: readonly PendingQuestionEntry[];
15
+ /** 待批权限条目(接管 ApprovalPanel)。 */
16
+ permissions: readonly PendingPermissionEntry[];
17
+ /** 动作进行中(禁用交互)。 */
18
+ pending: boolean;
19
+ /** 暂停全部(running 态主操作)。 */
20
+ onPauseAll(): void;
21
+ /** 广播恢复(文本作 resumePrompt)。 */
22
+ onResumeAll(resumePrompt: string): void;
23
+ /** 定点恢复指定 Step。 */
24
+ onResumeStep(stepId: string, resumePrompt: string): void;
25
+ /** 重试指定 Step(失败态;revert 模式可选 revertBoundary 指定更早闭合 turn/end)。 */
26
+ onRetryStep(stepId: string, mode: RetryMode, message: string, revertBoundary?: number): void;
27
+ /** 向运行中 Step 子代理追加 @mention 消息(running 态;缺陷 31)。 */
28
+ onSendStepMessage(stepId: string, message: string): void;
29
+ /** 查询某 Step 子代理会话中可用的闭合 turn 回退点候选(revert 回退点选择数据源)。 */
30
+ onListRevertBoundaries(stepId: string): Promise<RevertBoundaryOption[]>;
31
+ /** 回复问答(整批回答)。 */
32
+ onReplyQuestion(requestId: string, answers: AnswerItem[]): void;
33
+ /** 拒绝问答(标对应 Step failed,缺陷 26)。 */
34
+ onRejectQuestion(requestId: string): void;
35
+ /** 回复权限(once/always/reject)。 */
36
+ onReplyPermission(requestId: string, reply: 'once' | 'always' | 'reject'): void;
37
+ /** 中止实例(running/paused 态 trailing 的 ghost 按钮)。 */
38
+ onAbort?(): void;
39
+ /** 目标工作流实例 id(宿主 Session id;模型目录/权限/命令都绑定它)。 */
40
+ instanceId: string;
41
+ /** 复用 DSH `ctx.modelDirectories` 的每会话模型目录。 */
42
+ modelDirectory(sessionId: string): ModelDirectoryFace;
43
+ /** 当前实例会话的权限投影(`projections.permissions`)。 */
44
+ sessionPermissions: ObservableFace<PermissionSelectValue | undefined>;
45
+ /** 对实例会话执行命令(`/permission <id>`)。 */
46
+ runCommand(sessionId: string, line: string): Promise<boolean>;
47
+ /** 权限投影缺失回退:查询当前权限预设与可用列表。 */
48
+ queryPermission(): Promise<PermissionSelectValue | undefined>;
49
+ }
50
+ /** QuestionCard 接收的 props(讨论页接管面板 / 主会话 composer 问答卡共用)。 */
51
+ export interface QuestionCardProps {
52
+ readonly entry: PendingQuestionEntry;
53
+ readonly steps: readonly ExecutedStep[];
54
+ readonly t: TranslateNS<'sandore'>;
55
+ readonly pending: boolean;
56
+ readonly onReply: (requestId: string, answers: AnswerItem[]) => void;
57
+ readonly onReject: (requestId: string) => void;
58
+ /** 实例标注(主会话 composer 多实例聚合时展示 `[workflowName]` 前缀;缺省不显示)。 */
59
+ readonly workflowLabel?: string | undefined;
60
+ }
61
+ export declare function QuestionCard({ entry, steps, t, pending, onReply, onReject, workflowLabel }: QuestionCardProps): import("react").JSX.Element;
62
+ /** 渲染执行详情底部(composer 或接管面板)。 */
63
+ export declare function DiscussionInput({ t, status, steps, questions, permissions, pending, onPauseAll, onResumeAll, onResumeStep, onRetryStep, onSendStepMessage, onListRevertBoundaries, onReplyQuestion, onRejectQuestion, onReplyPermission, onAbort, instanceId, modelDirectory, sessionPermissions, runCommand, queryPermission }: DiscussionInputProps): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 为元素挂接拖拽监听(约 40 行,同 AppFrame.makeDragHandle 语义)。
3
+ * @param el - 分隔条元素。
4
+ * @param onDrag - 位移回调(px,正值向右)。
5
+ * @returns 移除监听的 disposer。
6
+ */
7
+ export declare function attachDragHandle(el: HTMLElement, onDrag: (dx: number) => void): () => void;
8
+ /** React 拖拽分隔条组件:渲染 7px 分隔条并挂接拖拽。 */
9
+ export declare function DragHandle({ onDrag, side, className }: {
10
+ /** 拖拽位移回调(px)。 */
11
+ onDrag(dx: number): void;
12
+ /** 语义标记(data-side,供样式/测试区分)。 */
13
+ side: string;
14
+ /** 附加 class。 */
15
+ className?: string | undefined;
16
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { WorkflowOverlayFace } from './workflow-face.ts';
3
+ /** EditorPane 接收的 props。 */
4
+ export interface EditorPaneProps {
5
+ /** 类型化的翻译函数(sandore 命名空间)。 */
6
+ t: TranslateNS<'sandore'>;
7
+ /** 业务 face(RPC 已解包)。 */
8
+ face: WorkflowOverlayFace;
9
+ /** 保存成功后刷新左列表(由 overlay 逐级透传)。 */
10
+ onSaved(id: string): void;
11
+ }
12
+ /** 渲染右栏编辑区。 */
13
+ export declare function EditorPane({ t, face, onSaved }: EditorPaneProps): import("react").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { DagBranch } from 'dsh-sandore/schema';
3
+ import { type CommandType, type MergedStep } from './dag-editor-model.ts';
4
+ /** 流控目标节点(下拉选项)。 */
5
+ export interface FlowTarget {
6
+ readonly id: string;
7
+ readonly name: string;
8
+ }
9
+ /** 节点的流控字段集合(出边统一在 branches)。 */
10
+ export interface FlowFields {
11
+ readonly branches?: readonly DagBranch[] | undefined;
12
+ }
13
+ /**
14
+ * 渲染 Stage/Step 流控编辑器(分支列表:每条 = 类型下拉 + 只读目标 + 判断条件 + 循环)。
15
+ * 循环由画布回环连线自动产生(loop 必填),详情不做手动添加。
16
+ * @param stageSteps - 当前 Stage 内全部合并 step(含 branches 流控),用于计算回环环上节点。
17
+ * @param currentId - 当前编辑节点 id。
18
+ * @param conditionTypes - 判断条件命令可选类型(缺省 = 全部五类型;Stage 层 shell/prompt)。
19
+ */
20
+ export declare function FlowEditor({ t, flow, targets, onChange, stageSteps, currentId, conditionTypes }: {
21
+ readonly t: TranslateNS<'sandore'>;
22
+ readonly flow: FlowFields;
23
+ readonly targets: readonly FlowTarget[];
24
+ readonly onChange: (flow: FlowFields) => void;
25
+ /** 当前 Stage 内全部合并 step(含 branches);缺省时不做环上节点过滤。 */
26
+ readonly stageSteps?: readonly MergedStep[] | undefined;
27
+ /** 当前编辑节点 id(用于计算回环区间)。 */
28
+ readonly currentId?: string | undefined;
29
+ /** 判断条件命令可选类型(缺省 = 全部五类型)。 */
30
+ readonly conditionTypes?: readonly CommandType[] | undefined;
31
+ }): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client';
3
+ import type { InstanceSummary } from 'dsh-sandore/remote';
4
+ /** InstanceList 接收的普通业务 props。 */
5
+ export interface InstanceListProps {
6
+ /** 类型化的翻译函数(sandore 命名空间)。 */
7
+ t: TranslateNS<'sandore'>;
8
+ /** 工作区成员表(WorkspaceView[].sessionIds 为会话账号)。 */
9
+ workspaces: readonly WorkspaceView[];
10
+ /** 客户端过滤关键词(匹配 instanceId / workflowId)。 */
11
+ query: string;
12
+ /** 当前选中实例 id(高亮行;缺省不高亮)。 */
13
+ activeId?: string | undefined;
14
+ /** 拉取实例摘要(RPC 已解包)。 */
15
+ listInstances(): Promise<InstanceSummary[]>;
16
+ /** 删除实例(RPC 已解包;state 表行级删除)。 */
17
+ deleteInstance(instanceId: string): Promise<boolean>;
18
+ /** 删除成功后回调(宿主重挂载列表,立即刷新;不必等轮询)。 */
19
+ onInstanceDeleted?(): void;
20
+ /** 点击实例行下钻 RunView。 */
21
+ onOpen(instanceId: string): void;
22
+ }
23
+ /** 渲染 InstanceList。 */
24
+ export declare function InstanceList({ t, workspaces, query, activeId, listInstances, deleteInstance, onInstanceDeleted, onOpen }: InstanceListProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { WorkflowOverlayFace } from './workflow-face.ts';
3
+ /** NewInstanceDialog 接收的 props。 */
4
+ export interface NewInstanceDialogProps {
5
+ /** 类型化的翻译函数(sandore 命名空间)。 */
6
+ t: TranslateNS<'sandore'>;
7
+ /** 业务 face(RPC 已解包)。 */
8
+ face: WorkflowOverlayFace;
9
+ /** 预选的工作流 id(「测试运行」复用弹窗时传入;缺省不预选)。 */
10
+ initialWorkflowId?: string;
11
+ /** 预填的作业需求(「测试运行」复用弹窗时传入;缺省空)。 */
12
+ initialRequirement?: string;
13
+ /** 关闭弹窗。 */
14
+ onClose(): void;
15
+ /** 创建成功回调(携带实例 id,供宿主切执行态并选中)。 */
16
+ onCreated(instanceId: string): void;
17
+ }
18
+ /** 渲染「新增实例」弹窗。 */
19
+ export declare function NewInstanceDialog({ t, face, initialWorkflowId, initialRequirement, onClose, onCreated }: NewInstanceDialogProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { PreviewTarget } from './workflow-store.ts';
3
+ /** PreviewPanel 接收的 props。 */
4
+ export interface PreviewPanelProps {
5
+ /** 类型化翻译函数。 */
6
+ t: TranslateNS<'sandore'>;
7
+ /** 预览目标(null = 关闭/隐藏)。 */
8
+ target: PreviewTarget | null;
9
+ /** 关闭预览。 */
10
+ onClose(): void;
11
+ }
12
+ /** 渲染右栏预览。 */
13
+ export declare function PreviewPanel({ t, target, onClose }: PreviewPanelProps): import("react").JSX.Element | null;
@@ -0,0 +1,79 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
3
+ import type { ArtifactEntry } from 'dsh-sandore/remote';
4
+ import type { RevertBoundaryOption } from 'dsh-sandore/types';
5
+ import { type RetryMode } from './run-view-model.ts';
6
+ import type { ModelDirectoryFace, ObservableFace, PermissionSelectValue } from './model-faces.ts';
7
+ /** RunView 所需的最小 `ctx.remote.sandore` 访问面。 */
8
+ export interface RunViewRemote {
9
+ getInstanceState(instanceId: string): Promise<RemoteResult<unknown>>;
10
+ getArtifacts(instanceId: string, stageId?: string): Promise<RemoteResult<ArtifactEntry[]>>;
11
+ abortInstance(instanceId: string): Promise<RemoteResult<void>>;
12
+ pauseAll(input: {
13
+ instanceId: string;
14
+ }): Promise<RemoteResult<void>>;
15
+ resumeAll(input: {
16
+ instanceId: string;
17
+ resumePrompt?: string;
18
+ }): Promise<RemoteResult<void>>;
19
+ pauseStep(input: {
20
+ instanceId: string;
21
+ stepId: string;
22
+ }): Promise<RemoteResult<void>>;
23
+ resumeStep(input: {
24
+ instanceId: string;
25
+ stepId: string;
26
+ resumePrompt?: string;
27
+ }): Promise<RemoteResult<void>>;
28
+ retryStep(input: {
29
+ instanceId: string;
30
+ stepId: string;
31
+ mode: RetryMode;
32
+ message: string;
33
+ revertBoundary?: number;
34
+ }): Promise<RemoteResult<void>>;
35
+ listRevertBoundaries(input: {
36
+ instanceId: string;
37
+ stepId: string;
38
+ }): Promise<RemoteResult<RevertBoundaryOption[]>>;
39
+ sendStepMessage(input: {
40
+ instanceId: string;
41
+ stepId: string;
42
+ message: string;
43
+ }): Promise<RemoteResult<void>>;
44
+ replyQuestion(input: {
45
+ instanceId: string;
46
+ requestId: string;
47
+ answers: unknown;
48
+ }): Promise<RemoteResult<void>>;
49
+ rejectQuestion(input: {
50
+ instanceId: string;
51
+ requestId: string;
52
+ }): Promise<RemoteResult<void>>;
53
+ replyPermission(input: {
54
+ instanceId: string;
55
+ requestId: string;
56
+ reply: 'once' | 'always' | 'reject';
57
+ }): Promise<RemoteResult<void>>;
58
+ }
59
+ /** RunView 接收的普通业务 props(instanceId + 跳会话回调 + remote 访问面 + locale)。 */
60
+ export interface RunViewProps {
61
+ /** 类型化的翻译函数(sandore 命名空间)。 */
62
+ t: TranslateNS<'sandore'>;
63
+ /** 目标工作流实例 id(宿主 Session id == instanceId)。 */
64
+ instanceId: string;
65
+ /** 跳会话回调(agent 标题 → DSH 现成子代理会话页)。 */
66
+ openSession(id: string): void;
67
+ /** `ctx.remote.sandore` 的最小 RPC 访问面(返回 `RemoteResult`,经 `unwrap` 解包)。 */
68
+ remote: RunViewRemote;
69
+ /** 某会话的共享模型目录(复用 DSH `ctx.modelDirectories`)。 */
70
+ modelDirectory(sessionId: string): ModelDirectoryFace;
71
+ /** 某会话的权限投影(`projections.permissions`)。 */
72
+ permissions(sessionId: string): ObservableFace<PermissionSelectValue | undefined>;
73
+ /** 对某会话执行一行命令(`/permission <id>`)。 */
74
+ runCommand(sessionId: string, line: string): Promise<boolean>;
75
+ /** 权限投影缺失回退:经 `/permission`(无参)查询。 */
76
+ queryPermission(sessionId: string): Promise<PermissionSelectValue | undefined>;
77
+ }
78
+ /** 渲染 RunView(树形导航 + 执行详情页)。 */
79
+ export declare function RunView({ t, instanceId, openSession, remote, modelDirectory, permissions: sessionPermissionsOf, runCommand, queryPermission }: RunViewProps): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import { type ISessions } from '@deepseek-ai/dsh-client-runtime/client';
3
+ import { type StepChatTailData } from './chat-flow.ts';
4
+ /** workspaces 服务的最小注入面(`openPath` 为主;runtime WorkspaceRuntime 结构满足)。 */
5
+ export interface StepChatWorkspacesLike {
6
+ openPath(path: string): Promise<void>;
7
+ }
8
+ /**
9
+ * 安装 sessions 服务到模块级单例(插件 apply 时经 ctx.effect 调用)。
10
+ * @param sessions - `ctx.sessions`(ISessions 公开面)。
11
+ * @returns disposer:插件卸载时清除(避免残留引用串台)。
12
+ */
13
+ export declare function installStepChatSessions(sessions: ISessions): () => void;
14
+ /**
15
+ * 安装 workspaces 服务到模块级单例(插件 apply 时经 ctx.effect 调用;文件路径打开用)。
16
+ * @param workspaces - `ctx.workspaces`(openPath 面)。
17
+ * @returns disposer:插件卸载时清除。
18
+ */
19
+ export declare function installStepChatWorkspaces(workspaces: StepChatWorkspacesLike): () => void;
20
+ /**
21
+ * 面板根:解析 binding(订阅会话列表——子代理会话可能晚于 step 出现,host 流推送
22
+ * 进列表后 binding 才可解析),绑定可用后挂载 `StepChatBody`。
23
+ *
24
+ * Round 25:binding 缺失(子代理 settle/dispose 后 host 广播 `session-removed` →
25
+ * client 列表移除该 child)时按退避序列有界重拉 host 会话列表(`sessions.refresh()`,
26
+ * host 列表包含持久化冷会话,refresh 后 child 可重新绑定);达上限后停在 loading
27
+ * 占位,避免对已删除 child 空转。
28
+ */
29
+ export declare function StepChatPanel({ sessionId, t }: {
30
+ readonly sessionId: string;
31
+ readonly t: TranslateNS<'sandore'>;
32
+ }): import("react").JSX.Element;
33
+ /** 类型导出:turn-tail 数据(供 FlowRow 外部引用时使用)。 */
34
+ export type { StepChatTailData };