create-windy 0.8.2 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (574) hide show
  1. package/dist/cli.js +855 -560
  2. package/package.json +1 -1
  3. package/template/.windy-template.json +2 -2
  4. package/template/apps/agent-server/Dockerfile +92 -22
  5. package/template/apps/agent-server/README.md +47 -85
  6. package/template/apps/agent-server/documents/office.py +216 -0
  7. package/template/apps/agent-server/documents/query_report.py +136 -0
  8. package/template/apps/agent-server/documents/smoke.py +177 -0
  9. package/template/apps/agent-server/documents/test_boundaries.py +185 -0
  10. package/template/apps/agent-server/host-contracts.ts +56 -0
  11. package/template/apps/agent-server/install-native.ts +167 -0
  12. package/template/apps/agent-server/main.ts +179 -0
  13. package/template/apps/agent-server/native/EXTENSIONS.md +46 -0
  14. package/template/apps/agent-server/native/admission.ts +73 -0
  15. package/template/apps/agent-server/native/authorization.test.ts +176 -0
  16. package/template/apps/agent-server/native/authorization.ts +118 -0
  17. package/template/apps/agent-server/native/boundary-io.ts +93 -0
  18. package/template/apps/agent-server/native/boundary-product.ts +107 -0
  19. package/template/apps/agent-server/native/boundary-project.test.ts +247 -0
  20. package/template/apps/agent-server/native/boundary-project.ts +188 -0
  21. package/template/apps/agent-server/native/boundary.ts +188 -0
  22. package/template/apps/agent-server/native/compaction-policy.test.ts +175 -0
  23. package/template/apps/agent-server/native/config.ts +95 -0
  24. package/template/apps/agent-server/native/conversation-instructions.ts +9 -0
  25. package/template/apps/agent-server/native/extensions.test.ts +190 -0
  26. package/template/apps/agent-server/native/extensions.ts +31 -0
  27. package/template/apps/agent-server/native/host-profile.test.ts +91 -0
  28. package/template/apps/agent-server/native/host-profile.ts +33 -0
  29. package/template/apps/agent-server/native/host-test-fixture.ts +13 -0
  30. package/template/apps/agent-server/native/http.ts +129 -0
  31. package/template/apps/agent-server/native/lifecycle.test.ts +285 -0
  32. package/template/apps/agent-server/native/lifecycle.ts +136 -0
  33. package/template/apps/agent-server/native/manager.ts +292 -0
  34. package/template/apps/agent-server/native/native.test.ts +207 -0
  35. package/template/apps/agent-server/native/office-preview.test.ts +50 -0
  36. package/template/apps/agent-server/native/office-preview.ts +25 -0
  37. package/template/apps/agent-server/native/parallel-harness.ts +242 -0
  38. package/template/apps/agent-server/native/parallel-mcp-fixture.ts +97 -0
  39. package/template/apps/agent-server/native/parallel.test.ts +256 -0
  40. package/template/apps/agent-server/native/profile-composition.test.ts +147 -0
  41. package/template/apps/agent-server/native/profile.ts +307 -0
  42. package/template/apps/agent-server/native/request.ts +61 -0
  43. package/template/apps/agent-server/native/session-conflict.test.ts +235 -0
  44. package/template/apps/agent-server/native/session-conflict.ts +21 -0
  45. package/template/apps/agent-server/native/shared-skills.test.ts +128 -0
  46. package/template/apps/agent-server/native/shared-skills.ts +240 -0
  47. package/template/apps/agent-server/native/socket-lifecycle.test.ts +48 -0
  48. package/template/apps/agent-server/native/socket.ts +130 -0
  49. package/template/apps/agent-server/native/storage-lifecycle.test.ts +217 -0
  50. package/template/apps/agent-server/native/storage.ts +188 -0
  51. package/template/apps/agent-server/native/stream-authorization.test.ts +89 -0
  52. package/template/apps/agent-server/native/worker.ts +77 -0
  53. package/template/apps/agent-server/native-download.test.ts +119 -0
  54. package/template/apps/agent-server/native-download.ts +145 -0
  55. package/template/apps/agent-server/package.json +63 -0
  56. package/template/apps/agent-server/plugins/access.mjs +126 -0
  57. package/template/apps/agent-server/plugins/branding/README.md +9 -0
  58. package/template/apps/agent-server/plugins/branding/brand.css +85 -0
  59. package/template/apps/agent-server/plugins/branding/client.js +338 -0
  60. package/template/apps/agent-server/plugins/branding/index.mjs +35 -0
  61. package/template/apps/agent-server/plugins/branding/loading.d.mts +2 -0
  62. package/template/apps/agent-server/plugins/branding/loading.mjs +66 -0
  63. package/template/apps/agent-server/plugins/branding/loading.test.ts +89 -0
  64. package/template/apps/agent-server/plugins/branding/package.json +21 -0
  65. package/template/apps/agent-server/plugins/branding.test.ts +294 -0
  66. package/template/apps/agent-server/plugins/compaction.mjs +83 -0
  67. package/template/apps/agent-server/plugins/compaction.test.ts +91 -0
  68. package/template/apps/agent-server/plugins/confine-network.py +57 -0
  69. package/template/apps/agent-server/plugins/default-skills.test.ts +62 -0
  70. package/template/apps/agent-server/plugins/downloads/README.md +28 -0
  71. package/template/apps/agent-server/plugins/downloads/client.js +126 -0
  72. package/template/apps/agent-server/plugins/downloads/downloads.test.ts +222 -0
  73. package/template/apps/agent-server/plugins/downloads/index.d.mts +19 -0
  74. package/template/apps/agent-server/plugins/downloads/index.mjs +180 -0
  75. package/template/apps/agent-server/plugins/downloads/package.json +20 -0
  76. package/template/apps/agent-server/plugins/drop-overlay/README.md +24 -0
  77. package/template/apps/agent-server/plugins/drop-overlay/drop-overlay.test.ts +199 -0
  78. package/template/apps/agent-server/plugins/drop-overlay/index.d.mts +8 -0
  79. package/template/apps/agent-server/plugins/drop-overlay/index.mjs +12 -0
  80. package/template/apps/agent-server/plugins/drop-overlay/style.css +102 -0
  81. package/template/apps/agent-server/plugins/locale/client.js +61 -0
  82. package/template/apps/agent-server/plugins/locale/index.d.mts +9 -0
  83. package/template/apps/agent-server/plugins/locale/index.mjs +16 -0
  84. package/template/apps/agent-server/plugins/locale/locale.test.ts +217 -0
  85. package/template/apps/agent-server/plugins/locale/package.json +19 -0
  86. package/template/apps/agent-server/plugins/parallel.mjs +146 -0
  87. package/template/apps/agent-server/plugins/preset-registry.d.mts +2 -0
  88. package/template/apps/agent-server/plugins/preset-registry.mjs +41 -0
  89. package/template/apps/agent-server/plugins/preset-registry.test.ts +46 -0
  90. package/template/apps/agent-server/plugins/questions.d.mts +25 -0
  91. package/template/apps/agent-server/plugins/questions.mjs +142 -0
  92. package/template/apps/agent-server/plugins/questions.test.ts +105 -0
  93. package/template/apps/agent-server/plugins/settings/README.md +17 -0
  94. package/template/apps/agent-server/plugins/settings/client.js +102 -0
  95. package/template/apps/agent-server/plugins/settings/index.mjs +17 -0
  96. package/template/apps/agent-server/plugins/settings/package.json +19 -0
  97. package/template/apps/agent-server/plugins/settings/settings.test.ts +129 -0
  98. package/template/apps/agent-server/plugins/settings-controller.d.mts +4 -0
  99. package/template/apps/agent-server/plugins/settings-controller.mjs +31 -0
  100. package/template/apps/agent-server/plugins/settings-controller.test.ts +17 -0
  101. package/template/apps/agent-server/plugins/settings-dispatch.test.ts +34 -0
  102. package/template/apps/agent-server/plugins/shared-skills.d.mts +15 -0
  103. package/template/apps/agent-server/plugins/shared-skills.mjs +82 -0
  104. package/template/apps/agent-server/plugins/shared-skills.test.ts +51 -0
  105. package/template/apps/agent-server/plugins/skill-library/README.md +11 -0
  106. package/template/apps/agent-server/plugins/skill-library/archive.test.ts +43 -0
  107. package/template/apps/agent-server/plugins/skill-library/bundle.mjs +234 -0
  108. package/template/apps/agent-server/plugins/skill-library/client-chunks.test.ts +107 -0
  109. package/template/apps/agent-server/plugins/skill-library/client-form-mount.test.ts +139 -0
  110. package/template/apps/agent-server/plugins/skill-library/client-form.test.ts +261 -0
  111. package/template/apps/agent-server/plugins/skill-library/client-ui.test.ts +268 -0
  112. package/template/apps/agent-server/plugins/skill-library/client-use.test.ts +158 -0
  113. package/template/apps/agent-server/plugins/skill-library/client.editor.js +93 -0
  114. package/template/apps/agent-server/plugins/skill-library/client.form.js +316 -0
  115. package/template/apps/agent-server/plugins/skill-library/client.js +348 -0
  116. package/template/apps/agent-server/plugins/skill-library/client.request.js +52 -0
  117. package/template/apps/agent-server/plugins/skill-library/client.transfer.js +48 -0
  118. package/template/apps/agent-server/plugins/skill-library/client.use.js +46 -0
  119. package/template/apps/agent-server/plugins/skill-library/default-roots.test.ts +84 -0
  120. package/template/apps/agent-server/plugins/skill-library/draft.d.mts +17 -0
  121. package/template/apps/agent-server/plugins/skill-library/draft.mjs +152 -0
  122. package/template/apps/agent-server/plugins/skill-library/draft.test.ts +287 -0
  123. package/template/apps/agent-server/plugins/skill-library/index.d.mts +49 -0
  124. package/template/apps/agent-server/plugins/skill-library/index.mjs +226 -0
  125. package/template/apps/agent-server/plugins/skill-library/package.json +24 -0
  126. package/template/apps/agent-server/plugins/skill-library/presentation/README.md +27 -0
  127. package/template/apps/agent-server/plugins/skill-library/presentation/UPSTREAM.md +54 -0
  128. package/template/apps/agent-server/plugins/skill-library/presentation/boot.test.ts +150 -0
  129. package/template/apps/agent-server/plugins/skill-library/presentation/client.js +146 -0
  130. package/template/apps/agent-server/plugins/skill-library/presentation/client.test.ts +195 -0
  131. package/template/apps/agent-server/plugins/skill-library/presentation/index.d.mts +9 -0
  132. package/template/apps/agent-server/plugins/skill-library/presentation/index.mjs +30 -0
  133. package/template/apps/agent-server/plugins/skill-library/presentation/metadata.test.ts +82 -0
  134. package/template/apps/agent-server/plugins/skill-library/presentation/package.json +21 -0
  135. package/template/apps/agent-server/plugins/skill-library/presentation/react-boot.test.ts +162 -0
  136. package/template/apps/agent-server/plugins/skill-library/skills.test.ts +342 -0
  137. package/template/apps/agent-server/plugins/skill-library/storage.mjs +293 -0
  138. package/template/apps/agent-server/plugins/skill-library/style.css +229 -0
  139. package/template/apps/agent-server/plugins/skill-library/test-fixture.ts +77 -0
  140. package/template/apps/agent-server/plugins/skill-library/workflow.d.mts +18 -0
  141. package/template/apps/agent-server/plugins/skill-library/workflow.mjs +189 -0
  142. package/template/apps/agent-server/plugins/skill-library/workflow.test.ts +164 -0
  143. package/template/apps/agent-server/plugins/skills/README.md +5 -0
  144. package/template/apps/agent-server/plugins/skills/windy-data-summary/SKILL.md +14 -0
  145. package/template/apps/agent-server/plugins/skills/windy-extension-guide/SKILL.md +14 -0
  146. package/template/apps/agent-server/plugins/skills/windy-office/SKILL.md +14 -0
  147. package/template/apps/agent-server/plugins/skills/windy-skill-capture/SKILL.md +14 -0
  148. package/template/apps/agent-server/plugins/skills/windy-source-compare/SKILL.md +14 -0
  149. package/template/apps/agent-server/plugins/subprocess.mjs +40 -0
  150. package/template/apps/agent-server/plugins/theme/README.md +18 -0
  151. package/template/apps/agent-server/plugins/theme/client.js +18 -0
  152. package/template/apps/agent-server/plugins/theme/index.d.mts +9 -0
  153. package/template/apps/agent-server/plugins/theme/index.mjs +18 -0
  154. package/template/apps/agent-server/plugins/theme/package.json +19 -0
  155. package/template/apps/agent-server/plugins/theme/source-tokens.ts +82 -0
  156. package/template/apps/agent-server/plugins/theme/sync-tokens.ts +12 -0
  157. package/template/apps/agent-server/plugins/theme/theme.test.ts +193 -0
  158. package/template/apps/agent-server/plugins/theme/tokens.json +166 -0
  159. package/template/apps/agent-server/plugins/tool-catalog/README.md +79 -0
  160. package/template/apps/agent-server/plugins/tool-catalog/categories.mjs +111 -0
  161. package/template/apps/agent-server/plugins/tool-catalog/categories.test.ts +118 -0
  162. package/template/apps/agent-server/plugins/tool-catalog/client-cache.test.ts +264 -0
  163. package/template/apps/agent-server/plugins/tool-catalog/client.js +333 -0
  164. package/template/apps/agent-server/plugins/tool-catalog/client.test.ts +136 -0
  165. package/template/apps/agent-server/plugins/tool-catalog/discovery.d.mts +42 -0
  166. package/template/apps/agent-server/plugins/tool-catalog/discovery.mjs +242 -0
  167. package/template/apps/agent-server/plugins/tool-catalog/discovery.test.ts +229 -0
  168. package/template/apps/agent-server/plugins/tool-catalog/index.d.mts +5 -0
  169. package/template/apps/agent-server/plugins/tool-catalog/index.mjs +91 -0
  170. package/template/apps/agent-server/plugins/tool-catalog/package.json +23 -0
  171. package/template/apps/agent-server/plugins/tool-catalog/presentation.d.mts +21 -0
  172. package/template/apps/agent-server/plugins/tool-catalog/presentation.mjs +153 -0
  173. package/template/apps/agent-server/plugins/tool-catalog/presentation.test.ts +166 -0
  174. package/template/apps/agent-server/plugins/tool-catalog/routes.test.ts +209 -0
  175. package/template/apps/agent-server/plugins/tool-catalog/style.css +155 -0
  176. package/template/apps/agent-server/plugins/tool-catalog/use-tool.test.ts +160 -0
  177. package/template/apps/agent-server/plugins/tool-presentation/README.md +7 -0
  178. package/template/apps/agent-server/plugins/tool-presentation/build-client.ts +29 -0
  179. package/template/apps/agent-server/plugins/tool-presentation/client.js +312 -0
  180. package/template/apps/agent-server/plugins/tool-presentation/client.results.js +9 -0
  181. package/template/apps/agent-server/plugins/tool-presentation/client.test.ts +178 -0
  182. package/template/apps/agent-server/plugins/tool-presentation/index.mjs +10 -0
  183. package/template/apps/agent-server/plugins/tool-presentation/package.json +24 -0
  184. package/template/apps/agent-server/plugins/tool-presentation/result-discovery.mjs +43 -0
  185. package/template/apps/agent-server/plugins/tool-presentation/result-model.d.mts +51 -0
  186. package/template/apps/agent-server/plugins/tool-presentation/result-model.mjs +96 -0
  187. package/template/apps/agent-server/plugins/workspace/README.md +5 -0
  188. package/template/apps/agent-server/plugins/workspace/index.mjs +8 -0
  189. package/template/apps/agent-server/plugins/workspace/package.json +10 -0
  190. package/template/apps/agent-server/plugins/workspace/style.css +124 -0
  191. package/template/apps/agent-server/project/host.ts +13 -0
  192. package/template/apps/agent-server/runtime/artifacts.ts +115 -0
  193. package/template/apps/agent-server/runtime/audit.nodecheck.ts +60 -0
  194. package/template/apps/agent-server/runtime/capacity.ts +61 -0
  195. package/template/apps/agent-server/runtime/client-completion-budget.nodecheck.ts +92 -0
  196. package/template/apps/agent-server/runtime/compatibility.ts +33 -0
  197. package/template/apps/agent-server/runtime/completions.ts +320 -0
  198. package/template/apps/agent-server/runtime/config.ts +246 -0
  199. package/template/apps/agent-server/runtime/context-budget.ts +70 -0
  200. package/template/apps/agent-server/runtime/context-plugin.ts +306 -0
  201. package/template/apps/agent-server/runtime/context.nodecheck.ts +241 -0
  202. package/template/apps/agent-server/runtime/contracts.ts +201 -0
  203. package/template/apps/agent-server/runtime/dsh-engine.ts +196 -0
  204. package/template/apps/agent-server/runtime/evaluation-plugin.ts +115 -0
  205. package/template/apps/agent-server/runtime/evaluation.nodecheck.ts +194 -0
  206. package/template/apps/agent-server/runtime/events.ts +71 -0
  207. package/template/apps/agent-server/runtime/governance.ts +194 -0
  208. package/template/apps/agent-server/runtime/index.ts +339 -0
  209. package/template/apps/agent-server/runtime/internal-output.ts +37 -0
  210. package/template/apps/agent-server/runtime/isolation.nodecheck.ts +287 -0
  211. package/template/apps/agent-server/runtime/model-payload.ts +97 -0
  212. package/template/apps/agent-server/runtime/model-plugin.ts +308 -0
  213. package/template/apps/agent-server/runtime/model-route.ts +34 -0
  214. package/template/apps/agent-server/runtime/model-usage.ts +51 -0
  215. package/template/apps/agent-server/runtime/model-wire.ts +45 -0
  216. package/template/apps/agent-server/runtime/native-authorization.nodecheck.ts +126 -0
  217. package/template/apps/agent-server/runtime/native-completion.nodecheck.ts +81 -0
  218. package/template/apps/agent-server/runtime/output-validation.ts +66 -0
  219. package/template/apps/agent-server/runtime/production-capacity.nodecheck.ts +121 -0
  220. package/template/apps/agent-server/runtime/questions-workflow.nodecheck.ts +249 -0
  221. package/template/apps/agent-server/runtime/report-breakdown.ts +79 -0
  222. package/template/apps/agent-server/runtime/reporting.ts +219 -0
  223. package/template/apps/agent-server/runtime/run-completion.ts +39 -0
  224. package/template/apps/agent-server/runtime/run-request-digest.ts +18 -0
  225. package/template/apps/agent-server/runtime/runtime-test-fixtures.ts +264 -0
  226. package/template/apps/agent-server/runtime/runtime.nodecheck.ts +150 -0
  227. package/template/apps/agent-server/runtime/store-idempotency.nodecheck.ts +74 -0
  228. package/template/apps/agent-server/runtime/store.ts +324 -0
  229. package/template/apps/agent-server/runtime/structured-output-mode.nodecheck.ts +51 -0
  230. package/template/apps/agent-server/runtime/tool-name.ts +6 -0
  231. package/template/apps/agent-server/runtime/tool-plugin.ts +201 -0
  232. package/template/apps/agent-server/runtime/vision-readiness.ts +200 -0
  233. package/template/apps/agent-server/scripts/confinement-check.mjs +103 -0
  234. package/template/apps/agent-server/scripts/coordinator-check.mjs +344 -0
  235. package/template/apps/agent-server/scripts/documents-delivery-check.mjs +309 -0
  236. package/template/apps/agent-server/scripts/office-preview-check.mjs +92 -0
  237. package/template/apps/agent-server/scripts/test-confinement.ts +58 -0
  238. package/template/apps/agent-server/scripts/test-coordinator.ts +36 -0
  239. package/template/apps/agent-server/scripts/test-runtime.ts +46 -0
  240. package/template/apps/agent-server/tsconfig.json +21 -0
  241. package/template/apps/server/Dockerfile +3 -0
  242. package/template/apps/server/package.json +5 -1
  243. package/template/apps/server/scripts/check-dsh-platform-example.ts +251 -0
  244. package/template/apps/server/src/agent/admin-catalog-bootstrap.ts +25 -0
  245. package/template/apps/server/src/agent/agent-session-bootstrap.ts +7 -8
  246. package/template/apps/server/src/agent/agent-session-facade.ts +12 -0
  247. package/template/apps/server/src/agent/agent-session-validation.ts +43 -0
  248. package/template/apps/server/src/agent/dsh-runtime-wire.test.ts +33 -0
  249. package/template/apps/server/src/agent/governance-runtime.ts +41 -0
  250. package/template/apps/server/src/agent/operation-catalog.test.ts +202 -0
  251. package/template/apps/server/src/agent/operation-catalog.ts +135 -0
  252. package/template/apps/server/src/agent/remote-runtime-response.ts +1 -1
  253. package/template/apps/server/src/agent/run-browser-visibility.test.ts +59 -0
  254. package/template/apps/server/src/agent/run-browser-visibility.ts +11 -0
  255. package/template/apps/server/src/agent/run-contracts.ts +1 -0
  256. package/template/apps/server/src/agent/run-definition-support.ts +9 -0
  257. package/template/apps/server/src/agent/run-operation-policy.ts +1 -0
  258. package/template/apps/server/src/agent/run-route-response.ts +35 -0
  259. package/template/apps/server/src/agent/run-routes.ts +46 -43
  260. package/template/apps/server/src/agent/runtime-bootstrap.ts +21 -20
  261. package/template/apps/server/src/agent/runtime-disabled-composition.ts +28 -0
  262. package/template/apps/server/src/agent/runtime-tool-composition.ts +2 -0
  263. package/template/apps/server/src/agent/session-projection-facade.ts +8 -9
  264. package/template/apps/server/src/agent/session-projection-governance.ts +10 -0
  265. package/template/apps/server/src/agent/session-projection-view.ts +19 -16
  266. package/template/apps/server/src/agent/session-recording-reader.contract.test.ts +131 -0
  267. package/template/apps/server/src/agent/session-recording-reader.ts +62 -0
  268. package/template/apps/server/src/agent/tool-catalog-audit.ts +22 -0
  269. package/template/apps/server/src/agent/tool-catalog-availability.ts +21 -0
  270. package/template/apps/server/src/agent/tool-catalog-routes.test.ts +103 -0
  271. package/template/apps/server/src/agent/tool-catalog-routes.ts +62 -0
  272. package/template/apps/server/src/agent/tool-catalog.test.ts +122 -0
  273. package/template/apps/server/src/agent/tool-catalog.ts +44 -0
  274. package/template/apps/server/src/agent/tool-registry.ts +45 -14
  275. package/template/apps/server/src/agent/workbench-bootstrap.ts +39 -0
  276. package/template/apps/server/src/agent/workbench-event-projection.ts +115 -0
  277. package/template/apps/server/src/agent/workbench-facade.contract.test.ts +189 -0
  278. package/template/apps/server/src/agent/workbench-facade.ts +339 -0
  279. package/template/apps/server/src/agent/workbench-recording.contract.test.ts +328 -0
  280. package/template/apps/server/src/agent/workbench-routes.ts +97 -0
  281. package/template/apps/server/src/agent/workbench-run-integration.test.ts +231 -0
  282. package/template/apps/server/src/agent/workbench-run-reader.ts +187 -0
  283. package/template/apps/server/src/agent/workbench-safe-result.ts +61 -0
  284. package/template/apps/server/src/agent/workbench-sse.ts +50 -0
  285. package/template/apps/server/src/agent/workflow-runtime-bootstrap.ts +9 -0
  286. package/template/apps/server/src/agent-skills/access.ts +88 -0
  287. package/template/apps/server/src/agent-skills/bootstrap.ts +49 -0
  288. package/template/apps/server/src/agent-skills/builtin-registration.ts +83 -0
  289. package/template/apps/server/src/agent-skills/builtins.ts +19 -0
  290. package/template/apps/server/src/agent-skills/bundle-zip.ts +163 -0
  291. package/template/apps/server/src/agent-skills/bundle.test.ts +79 -0
  292. package/template/apps/server/src/agent-skills/bundle.ts +133 -0
  293. package/template/apps/server/src/agent-skills/contracts.ts +46 -0
  294. package/template/apps/server/src/agent-skills/drizzle-repository.ts +125 -0
  295. package/template/apps/server/src/agent-skills/input.ts +29 -0
  296. package/template/apps/server/src/agent-skills/postgres.integration.test.ts +348 -0
  297. package/template/apps/server/src/agent-skills/read-routes.test.ts +116 -0
  298. package/template/apps/server/src/agent-skills/reader.ts +108 -0
  299. package/template/apps/server/src/agent-skills/repository.ts +105 -0
  300. package/template/apps/server/src/agent-skills/routes.ts +176 -0
  301. package/template/apps/server/src/agent-skills/service.test.ts +295 -0
  302. package/template/apps/server/src/agent-skills/service.ts +301 -0
  303. package/template/apps/server/src/agent-workflow/preset-registry.test.ts +137 -0
  304. package/template/apps/server/src/agent-workflow/preset-registry.ts +191 -0
  305. package/template/apps/server/src/agent-workflow/preset-routes.test.ts +94 -0
  306. package/template/apps/server/src/agent-workflow/preset-routes.ts +45 -0
  307. package/template/apps/server/src/agent-workflow/query-service.ts +36 -0
  308. package/template/apps/server/src/agent-workflow/recording-projection.contract.test.ts +196 -0
  309. package/template/apps/server/src/agent-workflow/recording-projection.ts +86 -0
  310. package/template/apps/server/src/ai-runtime-report/service.test.ts +10 -7
  311. package/template/apps/server/src/ai-runtime-report/service.ts +1 -1
  312. package/template/apps/server/src/app/agent-workflow-presets.ts +4 -0
  313. package/template/apps/server/src/app/dsh-skill-draft-audit.test.ts +195 -0
  314. package/template/apps/server/src/app/dsh-skill-draft-audit.ts +115 -0
  315. package/template/apps/server/src/app/dsh-workbench-audit.test.ts +71 -0
  316. package/template/apps/server/src/app/dsh-workbench-audit.ts +34 -0
  317. package/template/apps/server/src/app/dsh-workbench-handshake.test.ts +63 -0
  318. package/template/apps/server/src/app/dsh-workbench-handshake.ts +48 -0
  319. package/template/apps/server/src/app/dsh-workbench-http.test.ts +96 -0
  320. package/template/apps/server/src/app/dsh-workbench-lan-origin.test.ts +114 -0
  321. package/template/apps/server/src/app/dsh-workbench-launch.test.ts +70 -0
  322. package/template/apps/server/src/app/dsh-workbench-origin.test.ts +54 -0
  323. package/template/apps/server/src/app/dsh-workbench-proxy.ts +205 -0
  324. package/template/apps/server/src/app/dsh-workbench-session-conflict.test.ts +61 -0
  325. package/template/apps/server/src/app/dsh-workbench-session.ts +59 -0
  326. package/template/apps/server/src/app/dsh-workbench-socket-audit.test.ts +115 -0
  327. package/template/apps/server/src/app/dsh-workbench-socket.test.ts +246 -0
  328. package/template/apps/server/src/app/dsh-workbench-socket.ts +272 -0
  329. package/template/apps/server/src/app/dsh-workbench-test-support.ts +158 -0
  330. package/template/apps/server/src/app/dsh-workbench.test.ts +213 -0
  331. package/template/apps/server/src/app/dsh-workbench.ts +279 -0
  332. package/template/apps/server/src/app/workbench-public-origin.ts +16 -0
  333. package/template/apps/server/src/data-governance/user-plaintext-routes.test.ts +3 -0
  334. package/template/apps/server/src/http-app.ts +31 -0
  335. package/template/apps/server/src/mcp/adapter.ts +1 -0
  336. package/template/apps/server/src/module-composition.test.ts +23 -0
  337. package/template/apps/server/src/module-composition.ts +9 -2
  338. package/template/apps/server/src/observability/bootstrap.ts +12 -0
  339. package/template/apps/server/src/observability/diagnostic-failure-recorder.ts +94 -0
  340. package/template/apps/server/src/observability/diagnostic-http-contract.test.ts +42 -0
  341. package/template/apps/server/src/observability/diagnostic-index.test.ts +89 -0
  342. package/template/apps/server/src/observability/diagnostic-index.ts +88 -0
  343. package/template/apps/server/src/observability/diagnostic-repository.ts +67 -0
  344. package/template/apps/server/src/platform-app-bootstrap.ts +42 -0
  345. package/template/apps/server/src/platform-http-runtime.ts +6 -0
  346. package/template/apps/server/src/runtime-development.test.ts +25 -0
  347. package/template/apps/server/src/runtime-development.ts +6 -44
  348. package/template/apps/server/src/system/diagnostic-routes.test.ts +78 -0
  349. package/template/apps/server/src/system/diagnostic-routes.ts +66 -0
  350. package/template/apps/web/Dockerfile +9 -1
  351. package/template/apps/web/dev/start.ts +21 -10
  352. package/template/apps/web/dsh-workbench-location.ts +21 -0
  353. package/template/apps/web/dsh-workbench-proxy.test.ts +121 -0
  354. package/template/apps/web/dsh-workbench-proxy.ts +194 -0
  355. package/template/apps/web/package.json +3 -1
  356. package/template/apps/web/server.ts +27 -6
  357. package/template/apps/web/src/composables/useLoginFlow.ts +13 -1
  358. package/template/apps/web/src/pages/errors/PlatformErrorPage.vue +6 -0
  359. package/template/apps/web/src/pages/errors/PlatformErrorPage.webtest.ts +14 -1
  360. package/template/apps/web/src/pages/errors/error-page-extension.ts +1 -0
  361. package/template/apps/web/src/pages/system/AgentDebugPage.vue +14 -0
  362. package/template/apps/web/src/pages/system/AgentNativePage.vue +44 -0
  363. package/template/apps/web/src/pages/system/AgentSessionPage.vue +29 -8
  364. package/template/apps/web/src/pages/system/AgentToolsPage.vue +76 -0
  365. package/template/apps/web/src/pages/system/AgentWorkflowPage.vue +20 -7
  366. package/template/apps/web/src/pages/system/DiagnosticLookupPage.vue +56 -0
  367. package/template/apps/web/src/pages/system/DiagnosticLookupPage.webtest.ts +99 -0
  368. package/template/apps/web/src/pages/system/SystemAgentSkillsPage.vue +88 -0
  369. package/template/apps/web/src/pages/system/components/DiagnosticRecordDetails.vue +52 -0
  370. package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillDetailDialog.vue +166 -0
  371. package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillGovernanceActionDialog.vue +51 -0
  372. package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillImportDialog.vue +320 -0
  373. package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillImportDialog.webtest.ts +96 -0
  374. package/template/apps/web/src/pages/system/components/agent-skills/AgentSkillsTable.vue +69 -0
  375. package/template/apps/web/src/pages/system/components/agent-workbench/AgentWorkbench.vue +236 -0
  376. package/template/apps/web/src/pages/system/components/agent-workbench/DraftLeaveDialog.vue +34 -0
  377. package/template/apps/web/src/pages/system/components/agent-workbench/ReplayEventDetail.vue +175 -0
  378. package/template/apps/web/src/pages/system/components/agent-workbench/SessionReplayTimeline.vue +142 -0
  379. package/template/apps/web/src/pages/system/components/agent-workbench/SessionReplayTimeline.webtest.ts +242 -0
  380. package/template/apps/web/src/pages/system/components/agent-workbench/TestRunComposer.vue +97 -0
  381. package/template/apps/web/src/pages/system/components/agent-workbench/ToolCatalogPanel.vue +100 -0
  382. package/template/apps/web/src/pages/system/components/agent-workbench/ToolCatalogPanel.webtest.ts +55 -0
  383. package/template/apps/web/src/pages/system/components/agent-workbench/ToolRuleDetail.vue +81 -0
  384. package/template/apps/web/src/pages/system/components/agent-workbench/WorkbenchSessionList.vue +57 -0
  385. package/template/apps/web/src/pages/system/components/agent-workbench/catalog-presenter.ts +20 -0
  386. package/template/apps/web/src/pages/system/components/agent-workbench/replay-presenter.ts +94 -0
  387. package/template/apps/web/src/pages/system/components/agent-workflow/WorkflowPresetCatalog.vue +82 -0
  388. package/template/apps/web/src/pages/system/components/agent-workflow/WorkflowPresetCatalog.webtest.ts +57 -0
  389. package/template/apps/web/src/pages/system/composables/useAgentSkillsGovernance.ts +105 -0
  390. package/template/apps/web/src/pages/system/composables/useAgentWorkbench.ts +298 -0
  391. package/template/apps/web/src/pages/system/composables/useAgentWorkbench.webtest.ts +164 -0
  392. package/template/apps/web/src/pages/system/composables/useAgentWorkflowPresets.ts +44 -0
  393. package/template/apps/web/src/pages/system/composables/useDiagnosticLookup.ts +64 -0
  394. package/template/apps/web/src/pages/system/composables/useSessionReplay.ts +48 -0
  395. package/template/apps/web/src/router/error-navigation.ts +3 -1
  396. package/template/apps/web/src/router/error-navigation.webtest.ts +14 -2
  397. package/template/apps/web/src/router/index.ts +8 -45
  398. package/template/apps/web/src/router/platform-admin-pages.ts +79 -0
  399. package/template/apps/web/src/router/platform-admin-route-bindings.ts +12 -0
  400. package/template/apps/web/src/services/agent-admin-api.ts +155 -0
  401. package/template/apps/web/src/services/agent-admin-api.webtest.ts +120 -0
  402. package/template/apps/web/src/services/agent-skills-api.ts +55 -0
  403. package/template/apps/web/src/services/agent-workbench-event.ts +60 -0
  404. package/template/apps/web/src/services/agent-workflow-api.ts +12 -0
  405. package/template/apps/web/src/services/diagnostics-api.ts +12 -0
  406. package/template/apps/web/src/services/http.ts +18 -0
  407. package/template/apps/web/src/services/http.webtest.ts +51 -0
  408. package/template/apps/web/vite.config.ts +39 -0
  409. package/template/deploy/dsh/README.md +5 -0
  410. package/template/deploy/dsh/documents/README.md +9 -0
  411. package/template/deploy/dsh/documents/requirements.in +6 -0
  412. package/template/deploy/dsh/documents/requirements.lock +72 -0
  413. package/template/docker-compose.yml +24 -10
  414. package/template/docs/adr/0004-embedded-dsh-runtime.md +9 -0
  415. package/template/docs/architecture/agent-admin-workbench-implementation.md +73 -0
  416. package/template/docs/architecture/agent-admin-workbench-plan.md +41 -0
  417. package/template/docs/architecture/agent-harness.md +6 -0
  418. package/template/docs/architecture/agent-runtime-compatibility.md +2 -0
  419. package/template/docs/architecture/embedded-dsh-integration.md +44 -0
  420. package/template/docs/development/dsh-plugins.md +55 -0
  421. package/template/docs/operations/dsh-agent-migration.md +98 -0
  422. package/template/docs/platform/agent-production-store.md +5 -78
  423. package/template/docs/platform/agent-runtime-observability.md +2 -0
  424. package/template/docs/platform/agent-runtime.md +2 -0
  425. package/template/docs/platform/agent-skills.md +25 -0
  426. package/template/package.json +4 -3
  427. package/template/packages/database/drizzle/0064_dsh_skills_diagnostics.sql +42 -0
  428. package/template/packages/database/drizzle/meta/0064_snapshot.json +15349 -0
  429. package/template/packages/database/drizzle/meta/_journal.json +7 -0
  430. package/template/packages/database/package.json +2 -2
  431. package/template/packages/database/src/schema/agent-skills.ts +65 -0
  432. package/template/packages/database/src/schema/diagnostics.ts +27 -0
  433. package/template/packages/database/src/schema/index.ts +8 -0
  434. package/template/packages/modules/package.json +1 -1
  435. package/template/packages/modules/src/ai-operation-composition.ts +9 -0
  436. package/template/packages/modules/src/ai-operation-visibility.test.ts +33 -0
  437. package/template/packages/modules/src/manifest.ts +2 -0
  438. package/template/packages/modules/src/system-admin-routes.ts +40 -0
  439. package/template/packages/modules/src/system-admin-ui-catalog.ts +24 -11
  440. package/template/packages/modules/src/system-agent-admin-bindings.ts +44 -0
  441. package/template/packages/modules/src/system-agent-admin-menus.ts +46 -0
  442. package/template/packages/modules/src/system-agent-admin-registration.test.ts +52 -0
  443. package/template/packages/modules/src/system-agent-audit-actions.ts +8 -0
  444. package/template/packages/modules/src/system-agent-dsh.ts +119 -0
  445. package/template/packages/modules/src/system-ai-api-bindings.ts +2 -0
  446. package/template/packages/modules/src/system-api-permissions.ts +9 -0
  447. package/template/packages/modules/src/system-audit-actions.ts +36 -0
  448. package/template/packages/modules/src/system-features.ts +24 -0
  449. package/template/packages/modules/src/system-module-audit-selection.ts +25 -0
  450. package/template/packages/modules/src/system-module-catalog.ts +22 -40
  451. package/template/packages/modules/src/system-module-ownership.ts +12 -0
  452. package/template/packages/modules/src/system-modules.ts +16 -3
  453. package/template/packages/modules/src/system-permissions.ts +15 -0
  454. package/template/packages/server-sdk/index.ts +2 -0
  455. package/template/packages/server-sdk/package.json +2 -2
  456. package/template/packages/server-sdk/src/agent-session-provider.ts +19 -0
  457. package/template/packages/shared/index.ts +14 -0
  458. package/template/packages/shared/package.json +1 -1
  459. package/template/packages/shared/src/agent-admin-catalog.ts +73 -0
  460. package/template/packages/shared/src/agent-skills.ts +68 -0
  461. package/template/packages/shared/src/agent-workbench.ts +100 -0
  462. package/template/packages/shared/src/agent-workflow-presets.ts +26 -0
  463. package/template/packages/shared/src/diagnostics.ts +13 -0
  464. package/template/packages/shared/src/rbac.ts +1 -0
  465. package/template/apps/agent-server/install-python-dependencies.sh +0 -92
  466. package/template/apps/agent-server/pyproject.toml +0 -51
  467. package/template/apps/agent-server/src/southwind_agent_server/__init__.py +0 -5
  468. package/template/apps/agent-server/src/southwind_agent_server/app.py +0 -344
  469. package/template/apps/agent-server/src/southwind_agent_server/approval_resolution.py +0 -30
  470. package/template/apps/agent-server/src/southwind_agent_server/artifact_input.py +0 -153
  471. package/template/apps/agent-server/src/southwind_agent_server/asgi.py +0 -8
  472. package/template/apps/agent-server/src/southwind_agent_server/attempt_context.py +0 -199
  473. package/template/apps/agent-server/src/southwind_agent_server/attempt_context_projection.py +0 -203
  474. package/template/apps/agent-server/src/southwind_agent_server/client_completion_contracts.py +0 -61
  475. package/template/apps/agent-server/src/southwind_agent_server/client_completion_governance.py +0 -82
  476. package/template/apps/agent-server/src/southwind_agent_server/client_completion_routes.py +0 -121
  477. package/template/apps/agent-server/src/southwind_agent_server/client_completion_runtime.py +0 -158
  478. package/template/apps/agent-server/src/southwind_agent_server/config.py +0 -267
  479. package/template/apps/agent-server/src/southwind_agent_server/context_message_digest.py +0 -24
  480. package/template/apps/agent-server/src/southwind_agent_server/context_version_contracts.py +0 -71
  481. package/template/apps/agent-server/src/southwind_agent_server/context_version_port.py +0 -307
  482. package/template/apps/agent-server/src/southwind_agent_server/contracts.py +0 -297
  483. package/template/apps/agent-server/src/southwind_agent_server/deterministic.py +0 -63
  484. package/template/apps/agent-server/src/southwind_agent_server/engine.py +0 -134
  485. package/template/apps/agent-server/src/southwind_agent_server/engine_capacity.py +0 -31
  486. package/template/apps/agent-server/src/southwind_agent_server/engine_identity.py +0 -2
  487. package/template/apps/agent-server/src/southwind_agent_server/fingerprint.py +0 -61
  488. package/template/apps/agent-server/src/southwind_agent_server/health_routes.py +0 -93
  489. package/template/apps/agent-server/src/southwind_agent_server/http_helpers.py +0 -62
  490. package/template/apps/agent-server/src/southwind_agent_server/lease.py +0 -15
  491. package/template/apps/agent-server/src/southwind_agent_server/multimodal.py +0 -76
  492. package/template/apps/agent-server/src/southwind_agent_server/openai_engine.py +0 -329
  493. package/template/apps/agent-server/src/southwind_agent_server/openai_engine_validation.py +0 -165
  494. package/template/apps/agent-server/src/southwind_agent_server/openai_provider.py +0 -345
  495. package/template/apps/agent-server/src/southwind_agent_server/postgres_report_insert.py +0 -37
  496. package/template/apps/agent-server/src/southwind_agent_server/postgres_report_queries.py +0 -235
  497. package/template/apps/agent-server/src/southwind_agent_server/postgres_report_replay.py +0 -44
  498. package/template/apps/agent-server/src/southwind_agent_server/postgres_report_status.py +0 -83
  499. package/template/apps/agent-server/src/southwind_agent_server/postgres_report_store.py +0 -336
  500. package/template/apps/agent-server/src/southwind_agent_server/postgres_report_summary.py +0 -304
  501. package/template/apps/agent-server/src/southwind_agent_server/postgres_store.py +0 -335
  502. package/template/apps/agent-server/src/southwind_agent_server/postgres_store_backend.py +0 -333
  503. package/template/apps/agent-server/src/southwind_agent_server/provider_audit.py +0 -144
  504. package/template/apps/agent-server/src/southwind_agent_server/provider_governance.py +0 -309
  505. package/template/apps/agent-server/src/southwind_agent_server/provider_output_guidance.py +0 -34
  506. package/template/apps/agent-server/src/southwind_agent_server/readiness_pin.py +0 -37
  507. package/template/apps/agent-server/src/southwind_agent_server/report_lifecycle.py +0 -218
  508. package/template/apps/agent-server/src/southwind_agent_server/report_metrics.py +0 -149
  509. package/template/apps/agent-server/src/southwind_agent_server/report_presenter.py +0 -300
  510. package/template/apps/agent-server/src/southwind_agent_server/report_routes.py +0 -132
  511. package/template/apps/agent-server/src/southwind_agent_server/report_store.py +0 -298
  512. package/template/apps/agent-server/src/southwind_agent_server/report_store_protocol.py +0 -75
  513. package/template/apps/agent-server/src/southwind_agent_server/report_types.py +0 -118
  514. package/template/apps/agent-server/src/southwind_agent_server/run_admission.py +0 -64
  515. package/template/apps/agent-server/src/southwind_agent_server/run_capacity.py +0 -59
  516. package/template/apps/agent-server/src/southwind_agent_server/runtime_budget.py +0 -74
  517. package/template/apps/agent-server/src/southwind_agent_server/runtime_compatibility.py +0 -89
  518. package/template/apps/agent-server/src/southwind_agent_server/runtime_factory.py +0 -105
  519. package/template/apps/agent-server/src/southwind_agent_server/runtime_logging.py +0 -57
  520. package/template/apps/agent-server/src/southwind_agent_server/service.py +0 -325
  521. package/template/apps/agent-server/src/southwind_agent_server/service_control.py +0 -64
  522. package/template/apps/agent-server/src/southwind_agent_server/service_errors.py +0 -4
  523. package/template/apps/agent-server/src/southwind_agent_server/service_execution.py +0 -34
  524. package/template/apps/agent-server/src/southwind_agent_server/service_tasks.py +0 -34
  525. package/template/apps/agent-server/src/southwind_agent_server/signal_events.py +0 -53
  526. package/template/apps/agent-server/src/southwind_agent_server/sqlite_catalog.py +0 -118
  527. package/template/apps/agent-server/src/southwind_agent_server/sqlite_errors.py +0 -2
  528. package/template/apps/agent-server/src/southwind_agent_server/sqlite_schema.py +0 -73
  529. package/template/apps/agent-server/src/southwind_agent_server/sqlite_serialization.py +0 -16
  530. package/template/apps/agent-server/src/southwind_agent_server/sqlite_store.py +0 -350
  531. package/template/apps/agent-server/src/southwind_agent_server/sse.py +0 -41
  532. package/template/apps/agent-server/src/southwind_agent_server/store.py +0 -255
  533. package/template/apps/agent-server/src/southwind_agent_server/store_cipher.py +0 -40
  534. package/template/apps/agent-server/src/southwind_agent_server/structured_logging.py +0 -145
  535. package/template/apps/agent-server/src/southwind_agent_server/telemetry.py +0 -93
  536. package/template/apps/agent-server/src/southwind_agent_server/tool_host.py +0 -152
  537. package/template/apps/agent-server/src/southwind_agent_server/trajectory.py +0 -137
  538. package/template/apps/agent-server/src/southwind_agent_server/unavailable_engine.py +0 -58
  539. package/template/apps/agent-server/src/southwind_agent_server/vision_probe.py +0 -87
  540. package/template/apps/agent-server/src/southwind_agent_server/vision_requirement.py +0 -28
  541. package/template/apps/agent-server/src/southwind_agent_server/vlm_readiness.py +0 -247
  542. package/template/apps/agent-server/tests/__init__.py +0 -1
  543. package/template/apps/agent-server/tests/openai_provider_test_support.py +0 -131
  544. package/template/apps/agent-server/tests/test_api.py +0 -305
  545. package/template/apps/agent-server/tests/test_artifact_input.py +0 -110
  546. package/template/apps/agent-server/tests/test_client_completion.py +0 -230
  547. package/template/apps/agent-server/tests/test_config.py +0 -106
  548. package/template/apps/agent-server/tests/test_fingerprint.py +0 -10
  549. package/template/apps/agent-server/tests/test_multimodal.py +0 -81
  550. package/template/apps/agent-server/tests/test_openai_provider.py +0 -320
  551. package/template/apps/agent-server/tests/test_postgres_report_status.py +0 -59
  552. package/template/apps/agent-server/tests/test_postgres_report_summary.py +0 -298
  553. package/template/apps/agent-server/tests/test_postgres_store.py +0 -135
  554. package/template/apps/agent-server/tests/test_provider_attempt_reporting.py +0 -140
  555. package/template/apps/agent-server/tests/test_provider_governance.py +0 -276
  556. package/template/apps/agent-server/tests/test_report_attempt_lifecycle.py +0 -126
  557. package/template/apps/agent-server/tests/test_report_resilience.py +0 -183
  558. package/template/apps/agent-server/tests/test_report_routes.py +0 -143
  559. package/template/apps/agent-server/tests/test_report_store.py +0 -347
  560. package/template/apps/agent-server/tests/test_report_summary_parity.py +0 -116
  561. package/template/apps/agent-server/tests/test_report_terminal_sync.py +0 -177
  562. package/template/apps/agent-server/tests/test_run_capacity.py +0 -112
  563. package/template/apps/agent-server/tests/test_run_operational_logging.py +0 -114
  564. package/template/apps/agent-server/tests/test_runtime_compatibility.py +0 -119
  565. package/template/apps/agent-server/tests/test_runtime_factory_readiness.py +0 -52
  566. package/template/apps/agent-server/tests/test_sqlite_store.py +0 -182
  567. package/template/apps/agent-server/tests/test_structured_logging.py +0 -142
  568. package/template/apps/agent-server/tests/test_telemetry.py +0 -25
  569. package/template/apps/agent-server/tests/test_tool_approval.py +0 -28
  570. package/template/apps/agent-server/tests/test_tool_structured_output.py +0 -347
  571. package/template/apps/agent-server/tests/test_trajectory.py +0 -91
  572. package/template/apps/agent-server/tests/test_vision_readiness_enforcement.py +0 -72
  573. package/template/apps/agent-server/tests/test_vlm_readiness.py +0 -106
  574. package/template/apps/agent-server/uv.lock +0 -831
@@ -0,0 +1,72 @@
1
+ # Resolved from PyPI release metadata on 2026-10-15; no sdists or runtime downloads.
2
+ # Supported wheels: CPython 3.12/3.14, Linux glibc amd64/aarch64, macOS arm64/x86_64.
3
+ # Production runtime is Python 3.12; 3.14 wheels support host-only smoke checks.
4
+ # Online: python -m pip install --only-binary=:all: --require-hashes -r requirements.lock
5
+ # Offline: add --no-index --find-links=/wheelhouse to the same command.
6
+
7
+ python-docx==1.2.0 \
8
+ --hash=sha256:3fd478f3250fbbbfd3b94fe1e985955737c145627498896a8a6bf81f4baf66c7
9
+
10
+ openpyxl==3.1.5 \
11
+ --hash=sha256:5282c12b107bffeef825f4617dc029afaf41d0ea60823bbb665ef3079dc79de2
12
+
13
+ pypdf==6.20.1 \
14
+ --hash=sha256:aa5a55ddcffdc5e5ab291d5decb23f6383f4e56f8e3263dc39af41fff03885ad
15
+
16
+ reportlab==5.0.1 \
17
+ --hash=sha256:1c36e6bb0e71780c72331eba60da7f602e8d4389a8723825af71342e49d791e8
18
+
19
+ defusedxml==0.7.1 \
20
+ --hash=sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61
21
+
22
+ lxml==6.1.3 \
23
+ --hash=sha256:0c0710ac085a157b593c38fbcacd950f15c4afa8e2057527185875ab302752bc \
24
+ --hash=sha256:2221e88679d1351e9a40aaee54bc65679b9795bbd0160bc3d5e36b163344eb75 \
25
+ --hash=sha256:28a23fefdb345b2d4d0ff2860571b5ff9a89a28b6a120f720e8fb0324d346626 \
26
+ --hash=sha256:2bec13085dc8ef48a3fe62f7dfcacfeda2c785cdf19cc8eeda2bb9ed081da165 \
27
+ --hash=sha256:2cae5d5c90a62d9139c512a0cb1aad1d182b022b5740daea2617eb5bf7fc658e \
28
+ --hash=sha256:379f8a75cf6eb7eef0af074b55f49ab73b868388a98de14646abcdfa4564bb11 \
29
+ --hash=sha256:4f4db7c7e954d289d71878938348b3d91b904a3e8210a11939359fb758a58e7d \
30
+ --hash=sha256:545ccc14fb05485f48b4439ec35beb16d5b5280eb6c81c658bd4707a2a119414 \
31
+ --hash=sha256:5a143e6207579de8baeded4eaac9134413200359f1969d636f0bfb98ee8c3c8f \
32
+ --hash=sha256:623c8799c17128753c65699f1c3aa32402657393a9ad6db09ed8b98ddf76611d \
33
+ --hash=sha256:8db38ff3fb7aee7d6a82ae4da2eef1178656fe1216841fbd24870062a9d60473 \
34
+ --hash=sha256:909f4e927bb051f7740d6367285fc60cdcfdaf0258c2dba4ff5ba7eadadc250c \
35
+ --hash=sha256:a1cec0f99b9b914d39176347a93b7610dc09324491aee1cbc57cd291a41a1d55 \
36
+ --hash=sha256:a7eb78ba28b187e1e9203a55c60fcf70df2d22cb205fe6d51b9383d6097419f0 \
37
+ --hash=sha256:b37772102d44bb6628186accca3a121b1fa3a6b3d97518a8c29a5229ca4c0d0a \
38
+ --hash=sha256:c6c0c13128a32eb04a51357e56a094e13aa8e6d3d1884de2e9ae923f6915e1a8 \
39
+ --hash=sha256:f683dc6300317700025e41d89a43e0276692ded16113a3c43eab704d605c58e5 \
40
+ --hash=sha256:f6b9d2aad499c769ee8287609ab0e6de99d8bcea99c6e6c2e64945259fd52fb2
41
+
42
+ typing-extensions==4.16.0 \
43
+ --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8
44
+
45
+ et-xmlfile==2.0.0 \
46
+ --hash=sha256:7a91720bc756843502c3b7504c77b8fe44217c85c537d85037f0f536151b2caa
47
+
48
+ pillow==12.3.0 \
49
+ --hash=sha256:164b31cd1a0490ab6efae01aa5df49da7061be0af1b30e035b6e9a1bfe34ee6e \
50
+ --hash=sha256:251bf95b67017e27b13d82f5b326234ca62d70f9cf4c2b9032de2358a3b12c7b \
51
+ --hash=sha256:3edce1d53195db527e0191f84b71d02022de0540bf43a16ed734ed7537b07385 \
52
+ --hash=sha256:5afb51d599ea772b8365ae807ae557f18bccfe46ab261fd1c2a9ed700fc6eb17 \
53
+ --hash=sha256:78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91 \
54
+ --hash=sha256:ba09209fbe443b4acccebe845d8a138b89a8f4fbaeedd44953490b5315d5e965 \
55
+ --hash=sha256:ba54cfebe86920a559a7c4d6b9050791c20513650a1952ebe3368c7dc70306f8 \
56
+ --hash=sha256:bf16ba1b4d0b6b7c8e534936632270cf70eb00dbe09005bc345b2677b726855c \
57
+ --hash=sha256:d9c7f76c0673154f044e9d78c8655fb4213f6ca31a836df48b40fe5d187717b9 \
58
+ --hash=sha256:e158cb00350dc278f3b91551101aa7d12415a66ebf2c91d8d5ac14e56ddd3ad0 \
59
+ --hash=sha256:e9aeb04d6aef139de265b29683e119b638208f88cf73cdd1658aa07221165321 \
60
+ --hash=sha256:ffd0c5368496f41b0944be820fcb7a838aa6e623d250b01acf2643939c3f99d7
61
+
62
+ charset-normalizer==3.5.2 \
63
+ --hash=sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a \
64
+ --hash=sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649 \
65
+ --hash=sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80 \
66
+ --hash=sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13 \
67
+ --hash=sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685 \
68
+ --hash=sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c \
69
+ --hash=sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709 \
70
+ --hash=sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491 \
71
+ --hash=sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084 \
72
+ --hash=sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424
@@ -51,7 +51,7 @@ services:
51
51
  WINDY_SYSTEM_USAGE_PATHS: /app/data/audit
52
52
  PLATFORM_ENABLE_AI: ${PLATFORM_ENABLE_AI:-false}
53
53
  AGENT_SERVER_URL: http://agent-server:8080
54
- WINDY_PUBLIC_BASE_URL: ${WINDY_PUBLIC_BASE_URL:-http://localhost:9747}
54
+ WINDY_PUBLIC_BASE_URL: "${WINDY_PUBLIC_BASE_URL:-}"
55
55
  AGENT_TOOL_HOST_URL: http://server:9747
56
56
  TOOL_SANDBOX_SOCKET: /run/windy-tool-sandbox/worker.sock
57
57
  AGENT_SERVER_INTERNAL_TOKEN: ${AGENT_SERVER_INTERNAL_TOKEN:-}
@@ -161,23 +161,38 @@ services:
161
161
  context: .
162
162
  dockerfile: apps/agent-server/Dockerfile
163
163
  args:
164
- WINDY_PYPI_INDEX_URL: ${WINDY_PYPI_INDEX_URL:-http://mirrors.cloud.tencent.com/pypi/simple}
164
+ WINDY_AGENT_NATIVE_REGISTRY: ${WINDY_AGENT_NATIVE_REGISTRY:-https://registry.npmjs.org}
165
+ WINDY_PYPI_INDEX_URL: ${WINDY_PYPI_INDEX_URL:-https://pypi.org/simple}
166
+ cap_drop: ["ALL"]
167
+ cap_add: ["SETUID", "SETGID", "CHOWN", "DAC_OVERRIDE", "KILL"]
168
+ security_opt:
169
+ - no-new-privileges:true
170
+ pids_limit: 512
171
+ mem_limit: ${AGENT_SERVER_MEMORY_LIMIT:-4g}
172
+ cpus: ${AGENT_SERVER_CPU_LIMIT:-2}
165
173
  environment:
166
174
  AGENT_SERVER_INTERNAL_TOKEN: ${AGENT_SERVER_INTERNAL_TOKEN:-}
167
175
  AGENT_CONTEXT_HOST_URL: http://server:9747
168
- AGENT_RUN_STORE_PATH: /app/data/agent/runs.sqlite3
169
- AGENT_DATABASE_URL: postgresql://windy:${POSTGRES_PASSWORD}@postgres:5432/windy
170
- AGENT_RUN_ENCRYPTION_SECRET: ${AGENT_RUN_ENCRYPTION_SECRET:-}
171
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-}
172
- OTEL_EXPORTER_OTLP_HEADERS: ${OTEL_EXPORTER_OTLP_HEADERS:-}
173
- AI_PROVIDER_AUDIT_STORE_PATH: /app/data/agent/provider-audit.sqlite3
176
+ AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET: ${AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET:-}
177
+ AGENT_RUNTIME_DATABASE_PATH: /app/data/agent/embedded-dsh.sqlite
178
+ AI_TOOL_HOST_URL: http://server:9747
179
+ AI_ARTIFACT_URL: http://server:9747/api/internal/ai/artifacts
180
+ AGENT_DSH_HOME: /app/data/agent/dsh
181
+ AGENT_DSH_MAX_USERS: ${AGENT_DSH_MAX_USERS:-2}
182
+ AGENT_DSH_USER_EXTENSIONS: ${AGENT_DSH_USER_EXTENSIONS:-1}
183
+ AGENT_DSH_MAX_ACTIVE_RUNS: ${AGENT_DSH_MAX_ACTIVE_RUNS:-2}
184
+ AGENT_DSH_WORKSPACE_MAX_BYTES: ${AGENT_DSH_WORKSPACE_MAX_BYTES:-536870912}
174
185
  AI_PROVIDER_AUDIT_RETENTION_DAYS: ${AI_PROVIDER_AUDIT_RETENTION_DAYS:-90}
175
186
  QWEN_API_URL: ${QWEN_API_URL:-}
176
187
  QWEN_API_KEY: ${QWEN_API_KEY:-}
177
188
  QWEN_MODEL: ${QWEN_MODEL:-}
189
+ QWEN_STRUCTURED_OUTPUT_MODE: ${QWEN_STRUCTURED_OUTPUT_MODE:-json_schema}
178
190
  AI_PROVIDER_HTTPS_HOST_ALLOWLIST: ${AI_PROVIDER_HTTPS_HOST_ALLOWLIST:-}
179
- AI_PROVIDER_CONNECT_TIMEOUT_MS: ${AI_PROVIDER_CONNECT_TIMEOUT_MS:-5000}
180
191
  AI_PROVIDER_REQUEST_TIMEOUT_MS: ${AI_PROVIDER_REQUEST_TIMEOUT_MS:-60000}
192
+ AI_PROVIDER_CONTEXT_TOKENS: ${AI_PROVIDER_CONTEXT_TOKENS:-}
193
+ AI_PROVIDER_TOKENIZE_PATH: ${AI_PROVIDER_TOKENIZE_PATH:-}
194
+ AI_PROVIDER_OUTPUT_RESERVE_TOKENS: ${AI_PROVIDER_OUTPUT_RESERVE_TOKENS:-4096}
195
+ AI_PROVIDER_CONTEXT_SAFETY_TOKENS: ${AI_PROVIDER_CONTEXT_SAFETY_TOKENS:-512}
181
196
  AI_PROVIDER_MAX_RESPONSE_BYTES: ${AI_PROVIDER_MAX_RESPONSE_BYTES:-2097152}
182
197
  AI_PROVIDER_MAX_DURATION_SECONDS: ${AI_PROVIDER_MAX_DURATION_SECONDS:-300}
183
198
  AI_PROVIDER_MAX_INPUT_BYTES: ${AI_PROVIDER_MAX_INPUT_BYTES:-67108864}
@@ -197,7 +212,6 @@ services:
197
212
  condition: service_completed_successfully
198
213
  server:
199
214
  condition: service_started
200
-
201
215
  document-server:
202
216
  profiles: ["document"]
203
217
  build:
@@ -0,0 +1,9 @@
1
+ # 内置 DSH 接管通用 Agent 执行
2
+
3
+ 日期:2026-10-29。状态:接受。
4
+
5
+ Windy采用sharp-sword验证过的官方DSH嵌入模式,用Node/TypeScript Agent Server替换Python Direct Engine。DSH负责通用模型循环、原生会话、工作区与插件;Windy保留canonical Run、身份/授权、工具审批、审计、Artifact、长期业务Session/Memory与Workflow义务。
6
+
7
+ 该决定不改变ADR0003的业务Session事实源。DSH原生历史不是业务事实库,不将模型总结自动升级为领域事实。共享技能统一为DSH文件包及宿主版本治理,退役旧Code Skill执行依赖。
8
+
9
+ 取舍:复用公开上游能力,减少双引擎与业务项目维护负担;接受固定预发布版本的升级复核责任、Linux隔离要求及当前单副本SQLite边界。允许重置旧Agent专用数据,不提供旧Python历史迁移,业务数据库及文件保留。实现见[架构](../architecture/embedded-dsh-integration.md)。
@@ -0,0 +1,73 @@
1
+ # Agent 管理工作台技术实现
2
+
3
+ 日期:2026-10-07。对应[方案](./agent-admin-workbench-plan.md)。本轮实现已合入 main,0.8.3 已按用户授权跳过 gate 直接发布,见[发布记录](../operations/create-windy-0.8.3-release.md);尚未证明下游升级或生产部署。
4
+
5
+ ## 交付入口与业务结果
6
+
7
+ - `/admin/system/agent-tools`:管理员可按模块、Operation、当前条件及关键词查看实际装配的工具,并查看完整 JSON Schema、权限、Feature、审批、幂等、Scope、实际 Host/Sandbox 执行模式和预算。页面没有直接 Tool 执行按钮。
8
+ - `/admin/system/agent-debug`:支持授权 Operation 选择、JSON 输入、真实测试 Session/Run、实时事件、安全结果和取消;同一个本工作台新建测试 Session 可多轮运行。历史业务/Harness 会话在同一工作台逐步回放。
9
+ - 原 `/admin/system/agent-sessions` 提供受权限保护的回放入口;AI Runtime 报表和 Workflow 入口继续承担原业务职责。
10
+
11
+ 每一项执行使用当前登录用户、Operation Manifest 与正常 Run API。选择历史会话后发起测试必须创建独立 Session,回放播放器不调用任何执行、取消或业务写入 API。未保存测试输入在离开、切换模式/会话和刷新前确认;浏览器退出使用 beforeunload。离开运行页面仅断开查看,不自动取消运行。
12
+
13
+ ## 运行链与授权
14
+
15
+ `runtime-tool-composition` 构造 GovernedToolRegistry;动态目录复用注册表和正式 Operation 注册。`runtime-bootstrap` 装配目录与工作台,AI 关闭时目录仍显示契约,Operation 不可启动。声明 readiness 的 Operation 使用实际只读 readiness 投影,失败不降级。
16
+
17
+ 新能力在 system.agent 的 Feature、Permission、API、菜单、Admin Route、审计和 module distribution 一起登记:`system.agent-tools.read`、`system.agent-debug.read/manage`。创建测试会话还要求 `system.agent-session.manage`;读 Harness 要求 session.read;业务 Provider 和每一个 Run/Workflow 再按自身当前 Guard、Actor 和 Scope 重新授权。
18
+
19
+ 测试创建通过 PostgreSQL AH-1 Session 服务,随后正常 `/api/agent/runs` 签发授权、准备输入并启动 Runtime。缺少持久 Session 或 Run Runtime 时返回 503,不制造内存假会话。运行结果路径负责现有 Memory/Turn 终态投影;回放通过独立只读 Reader 读取 Runtime,不借用会写终态的普通 result 路径。
20
+
21
+ Manifest 新增可选 `visibility: public|internal`,缺省 public,未知值装配拒绝。internal Operation 的浏览器创建、events、result、cancel、attach 和历史 Reader 全部关闭;可信服务端编排仍通过正常 Facade Guard。Workflow-only 和尚未交付的隔离执行不从普通调试入口启动。
22
+
23
+ ## 业务会话接入
24
+
25
+ 继续使用 `registerAgentSessionProviders()`;旧 `registerDebugSessionProviders()` alias 保持兼容。Provider get() 在当前 Actor、案件范围及 revision 下读取业务消息,可提供可选:
26
+
27
+ ```ts
28
+ const sessionReferences = {
29
+ runRefs: [
30
+ {
31
+ runId: "run_1",
32
+ operationKey: "analysis.copilot.case",
33
+ messageSequence: 3,
34
+ },
35
+ ],
36
+ workflowRefs: [{ workflowRunId: "workflow_run_1", messageSequence: 3 }],
37
+ truncated: true,
38
+ };
39
+ ```
40
+
41
+ Run 引用还可声明真实 sessionId、turnId 和 workflowRunId;具体定义以 SDK TypeScript 类型为准。引用必须来自真实已验证历史,不允许按文本推断。平台校验有界数量、唯一 ID、合法 Operation 和消息序号;Provider 授权通过仍不能代替逐 Run/Workflow 重新授权。历史 Run binding 已过期、权限收回、Scope 改变或 Runtime 记录不可用时显示缺失,不旁路授权。
42
+
43
+ 利剑 `createCopilotDebugSessionProvider()` 保留当前案件与 revision 校验,从本次显示的已完成、runtimeVerified 助手消息取 runId/operationKey,关联 messageSequence。超过 16 条可见消息返回 truncated:true,不扩大业务消息披露范围。当前集成是源码补丁,不能宣称利剑已通过新发布版本官方升级。
44
+
45
+ ## 事件与关联
46
+
47
+ Fork 回放复用 AH-1 checkpoint/lineage replay,并逐父/子 Session 当前重授权,以分段保留独立序号。
48
+
49
+ Session、业务消息、Run 和 Workflow 分别保持各自 ledger 顺序,不把相互独立 sequence 合并成伪全局序列。播放器展示明确的父记录与子日志,并支持 Run/Turn/Step、model attempt/usage、Tool call、审批、Artifact 及节点尝试/分支定位。Tool 请求和结果按 toolCallId 互跳;Workflow 节点优先 nodeRunId。审批节点只从 approval-work-item adapter 的真实安全坐标投影 workItemId,并关联同节点的事件,不披露审批 payload。
50
+
51
+ Run 事件白名单保留 canonical answer delta、Tool/审批坐标、usage/attempt 和安全错误代码,丢弃原始参数、Provider body 和未知事件细节。安全历史结果有界裁剪;internal 结果不读取。Workflow 查询端口读取所有 nodeRuns,保留之前的失败与重试,不使用原详情的 latest-only 投影冒充完整历史。事件读取、业务窗口和 Workflow 发现有界截断时显示 partial/missing。
52
+
53
+ 未记录的模型尝试、进程丢失前未结算的事件、旧记录缺少 Run 引用均无法恢复。当前使用已交付 canonical 事件,不把尚未发布的 Execution Runtime/Workspace/Process/Job 轨迹能力混入验收;对应独立 Trace 待办仍保留。
54
+
55
+ ## 升级与运维
56
+
57
+ 新 Server 子目录随 system.agent 整体分发;新增页面、composables、services、共享 DTO、模块辅助文件和文档均归属 system.agent。Shared/router/Manifest import 使用 module marker,未选择 Agent 时可裁剪。Module ownership selector 拆出独立 helper,保持目录文件大小。
58
+
59
+ 源码已合入 main;本次用户明确授权跳过全部门禁,0.8.3 已直接发布,冻结 SHA 与公开字节及 CLI 消费事实已核验,不声明完整发布矩阵通过。下游升级 owner 已收到通知,使用官方 windy update 事务及 doctor,再验证新菜单权限、Runtime/readiness、PostgreSQL Session 和业务 Provider。业务 Provider 及 Router/page loader 的项目代码是 preserve 层接入,需要由下游 owner 对照新契约集成。
60
+
61
+ ## 验证证据与边界
62
+
63
+ - 目录与 internal 可见性:22 项定向测试、55 个断言通过;读取不调用 prepare、Provider 或 Tool。
64
+ - Manifest 组合与注册:10 项测试、62 个断言通过。
65
+ - Agent Facade、会话兼容与可选模块裁剪:30 项集中回归、217 个断言通过。
66
+ - Web API 编排、目录、播放器和 fork 分段:主 Agent 集中 15 项定向测试通过,Web 类型检查、Oxfmt、Oxlint 通过。
67
+ - 利剑 Provider 关联:12 项相关测试、42 个断言通过;三文件定向 TypeScript、Oxfmt、Oxlint 通过。
68
+ - 目录、internal 可见性、工作台、只读 Reader、Session/fork、SSE 和 HTTP 接缝:主 Agent 集中 29 项定向测试、113 个断言通过;Workflow 投影单独定向验证保留全部节点尝试。
69
+ - 主 Agent 新增 Session 服务 → PersistentRunLink → 普通 Run HTTP → 终态投影 → 只读记录链路契约测试:1 项、18 个断言通过,确认回放不追加日志或重启 Runtime。该检查的持久适配器和 Runtime 是受控内存 fixture。
70
+
71
+ 后端提交 `a0a626c2`,UI 与分发提交 `5cbd5565`;利剑 Provider 提交 `a5e615e50`。提交门禁的全项目 TypeScript/Vue 类型检查及所提交文件 Oxfmt/Oxlint 通过;最终 Manifest composition 验证通过。
72
+
73
+ 这些检查使用受控 fixtures,不冒充新工作台真实 Provider、PostgreSQL 部署或浏览器端到端验收。此前 0.8.2 模型链路证据不自动等同于新工作台部署验证。未运行 Playwright、Chrome、GitHub Actions 或完整发布矩阵。
@@ -0,0 +1,41 @@
1
+ # Agent 工具目录与调试工作台方案
2
+
3
+ 日期:2026-10-07。状态:源码实现已合入 main,0.8.3 已按用户授权跳过 gate 直接发布,见[发布记录](../operations/create-windy-0.8.3-release.md);下游升级与部署待独立验收。
4
+
5
+ ## 业务场景与验收边界
6
+
7
+ 平台管理员需要确认已安装模块提供哪些工具、当前账号为何能或不能调用;业务支持人员需要在当前权限和材料范围内创建测试会话,定位模型调用、工具调用、审批和 Workflow 的失败;审计人员需要回放业务会话已有的调用事实。
8
+
9
+ 工具目录可查看不代表可执行。测试会话使用正常治理链;历史回放只读取已记录事实,不重新调用模型、工具或业务写入,不增加模型用量,也不计算节省时间。旧记录关联不足时标记缺失,不根据消息猜测执行经过。矛盾分析和聊天记录分析由利剑业务 owner 完成合入,本次保留业务实现,通过公开平台契约对接。
10
+
11
+ ## 复用与结构
12
+
13
+ - 动态目录由已安装 Module Manifest、GovernedToolRegistry 和已注册 Operation Handler 生成,包含 Schema、Guard、数据分类、审批、幂等、预算、执行方式和允许的 Operation;不维护利剑专属工具列表。
14
+ - `/admin/system/agent-tools` 展示目录;`/admin/system/agent-debug` 在一个工作台中创建测试 Session/Run、接收 SSE、展示受控结果,以及选择并逐步回放已有会话。
15
+ - 测试 Session 必须由 PostgreSQL AH-1 Session 服务创建,随后通过普通 Run API 提交。无持久 Session 能力时明确拒绝,不降级到虚构会话。
16
+ - 回放复用 AH-1 append-only 日志与 lineage/checkpoint,以及 `registerAgentSessionProviders()` 返回的业务消息。业务 Provider 可提供可选 Run/Workflow 引用,平台逐个按当前账号和 Scope 重新授权读取。
17
+ - Workflow 通过公开查询接口提供全部节点尝试、分支、失败、重试和产物引用。事件只提供白名单摘要;不暴露密钥、原始推理链、Provider body 或私有 Locator。
18
+ - internal Operation 不通过浏览器 Run 入口或历史结果读取;Workflow 专属 Operation 不通过普通调试启动。目录资格不会签发 ExecutionGrant 或代替审批。
19
+
20
+ ## Manifest 与接口
21
+
22
+ 能力基础 Key 为 `system.agent-tools`(read)和 `system.agent-debug`(read/manage)。菜单、路由、API、Feature 与审计动作在 system.agent 模块内统一登记。业务 Operation/Session/Workflow 自身权限仍要逐项通过。
23
+
24
+ | 接口 | 行为 |
25
+ | ---------------------------------------------------- | -------------------------------- |
26
+ | GET `/api/agent/admin/tools` | 当前工具契约与安全拒绝原因 |
27
+ | GET `/api/agent/admin/operations` | 当前 Operation 及调试启动资格 |
28
+ | GET `/api/agent/admin/session-recordings` | 授权 Harness 或业务会话列表 |
29
+ | GET `/api/agent/admin/session-recordings/:sessionId` | 只读、受控、标明关联完整性的记录 |
30
+ | POST `/api/agent/admin/test-sessions` | 持久测试 Session 创建 |
31
+ | 普通 `/api/agent/runs`、events、result、cancel | 真实测试执行治理链 |
32
+
33
+ ## 实施与验证
34
+
35
+ 按目录、会话关联投影、工作台 UI 三个独立工作流实现,主 Agent 集成 Manifest、分发文件、文档与集中验证。验证包括动态模块增删、Guard 拒绝、internal 隔离、只读零执行、断线事件顺序、关联缺失、节点重试历史、未保存输入与取消。禁止用静态检查冒充测试或部署验收;不使用 Playwright、Chrome 或 GitHub Actions 自测。
36
+
37
+ 最终技术实现文档记录实际接口、业务 Provider 接入、升级分发、运行限制与检查证据。0.8.3 已发布并通知下游升级 owner,不代表下游已完成升级。
38
+
39
+ ## 参考与取舍
40
+
41
+ 采用已存在的 Windy [Harness](./agent-harness.md) 和 [AH-1 Session](../adr/0003-agent-session-event-source.md),保留平台治理与业务 Provider 边界。[DeepSeek Harness 架构](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/architecture.md) 的持久事件与投影分离可用于理解回放:只重建已落盘事实,实时临时输出不能替代持久结算记录。本次不迁移其插件框架。
@@ -1,5 +1,7 @@
1
1
  # Windy Agent Harness:移除 ADK 与可插拔演进方案
2
2
 
3
+ > 2026-10-29:执行层现由[内置DSH](./embedded-dsh-integration.md)接管。下文涉及Python Direct Engine、旧安装/存储及OTEL配置的内容属于历史实现;当前启动、配置与限制以[迁移运维](../operations/dsh-agent-migration.md)为准。canonical API、业务长期Session和治理契约继续有效。
4
+
3
5
  状态:AH-0 仓库实现完成,候选集中验证与发布证据待执行
4
6
 
5
7
  更新时间:2026-08-27
@@ -462,3 +464,7 @@ Compose、`service_adk_debug` 或活跃 `ADK_DEBUG_*` 配置。
462
464
  - [DeepSeek Harness Architecture](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/architecture.md)
463
465
  - [Vue Flow](https://vueflow.dev/):Vue 3 Workflow 画布候选;采用前仍需完成依赖评估与固定版本。
464
466
  - [PageAgent](https://github.com/alibaba/page-agent):页面理解与浏览器动作复用边界。
467
+
468
+ ## 管理端调试与业务回放(2026-10-07)
469
+
470
+ 动态工具目录与统一调试工作台沿用本 Harness 治理边界;业务会话可提供真实 Run/Workflow 引用,父子 Session 回放沿用 AH-1 checkpoint/lineage。历史只读取已有记录,缺少引用或超出有界窗口时显示 partial/missing。测试运行新建独立 Session,不在历史回放中启动模型或工具。实现与发布边界见[工作台技术实现](./agent-admin-workbench-implementation.md),本节不将尚未发布的隔离执行与 Trace 扩展视为已交付。
@@ -1,5 +1,7 @@
1
1
  # Remote Agent Runtime 兼容契约
2
2
 
3
+ > 2026-10-29:执行层现由[内置DSH](./embedded-dsh-integration.md)接管。下文涉及Python Direct Engine、旧安装/存储及OTEL配置的内容属于历史实现;当前启动、配置与限制以[迁移运维](../operations/dsh-agent-migration.md)为准。canonical API、业务长期Session和治理契约继续有效。
4
+
3
5
  更新时间:2026-09-02。
4
6
 
5
7
  状态:WAI-1 V1 兼容协商基础已实现。它不开放新的业务 Run 入口,也不代表外部业务系统已经可以
@@ -0,0 +1,44 @@
1
+ # Windy 内置 DSH Agent 平台
2
+
3
+ 2026-10-29。参考 sharp-sword `d8e1b68219a448d5c470f6ff298fd7114db40c5c`,在 Windy `1ad816a89455b8b4c3ce37f1e3732759fafa8f48` 上提取。验收证据另见[迁移操作与验证](../operations/dsh-agent-migration.md)。
4
+
5
+ ## 使用者与结果
6
+
7
+ 业务用户通过独立同源 `/agent` 使用会话、文件、文档工具和技能;管理员在 Windy Admin 查看工具契约、调试/回放、技能版本、Workflow 预设和运行事实。可用性取决于当前登录、License、Feature、RBAC、数据范围、模型容量及 Linux 隔离。工具目录或技能可见不代表拥有执行权限。
8
+
9
+ ## 实现与职责
10
+
11
+ Agent Server 是 Node 24.7+ 与 TypeScript workspace,固定官方 DSH `0.2.1-rc.2` 和 Cordis `4.0.5`。Bun 管理依赖及构建;DSH 原生插件安装器需要的 pnpm 随同镜像交付。通过公开 AgentLoop、Skill Provider、MCP、生命周期及 UI slot 接入,没有自维护的 DSH 内核。
12
+
13
+ | 所有者 | 职责 |
14
+ | -------------- | --------------------------------------------------------------------------------------------------------- |
15
+ | Windy Server | 当前登录、Feature/License/RBAC、数据范围、Tool Host、审批、Artifact、长期业务 Session、审计及共享技能版本 |
16
+ | Agent 协调器 | canonical HTTP/SSE、Provider 治理、容量、SQLite、凭据保管、用户进程及受控模型/MCP边界 |
17
+ | DSH 与通用插件 | 原生会话、工作区、模型工具循环、压缩、文件/命令、中文、品牌、呈现、技能和有界子任务 |
18
+ | 项目组合 | 领域指令、领域技能、业务范围和业务呈现;调用公开平台服务,不复制平台执行器 |
19
+
20
+ `/api/agent/runs` 的创建、状态、结果、取消、幂等与 SSE 语义保留;Client Agent Session 模型协议也保留。canonical Operation 的结构化输出继续经过 Schema 校验。Execution Grant、逐次工具授权、审批、出网 DLP、内部结果加密、图片和 Context prepare/commit 由 Host 接缝执行。
21
+
22
+ ## 两种会话事实
23
+
24
+ DSH 原生 Session 管理交互历史、文件上下文和子任务。它不替代 ADR 0003 定义的长期业务 Session,也不自动成为业务 Memory 或正式事实。业务 Workflow 的审批、不可变 Release、幂等副作用与恢复继续由现有服务持有。无需为每个 DSH 内部步骤额外创建 Windy Run。
25
+
26
+ ## 入口、身份和隔离
27
+
28
+ `/agent` 与 `/agent/` 都由 Web 代理到产品 Server,再到 Agent Server。原生 HTML 固定相对资源基址;HTTP 与 WS 均验证来源。浏览器指定的内部身份头与转发来源不能进入可信边界。Vue 登录完成后以文档导航进入原生入口,管理面仍单独验证 `system.admin.access`。
29
+
30
+ `system.agent-workbench.use` 控制原生工作台;当前产品登录在每次模型/MCP边界和连接周期重新校验。同一账号的活动 Worker 绑定已有登录及公开来源,新登录冲突返回409。登出或确认撤权回收进程、连接和模型请求;暂时无法核实授权时拒绝传输,不冒充已经登出。
31
+
32
+ Linux 协调器仅为 UID/GID 切换和进程管理使用必要能力,用户 Worker 独立 UID 与0700 HOME。默认子进程通过官方扩展点继承 Landlock 文件约束和 seccomp 网络约束;隔离能力不足时拒绝执行。Provider Key、产品 Session 和内部服务 Token 不进入 Worker。共享技能附件由协调器在账号隔离目录中只读物化。
33
+
34
+ 用户安装的插件是该用户授权的可信代码,可访问自己的 HOME 和网络,不受默认终端子进程沙箱等同约束。个人扩展默认开放;关闭管理入口不等于停用已有插件,撤销方式见运维文档。
35
+
36
+ ## 容量、文件和限制
37
+
38
+ 原生模型请求共享 canonical 容量,并至少为既有调用链预留一个槽位。全局容量为1时原生模型任务不可用;不得根据硬件名称自动提高容量。子任务深度1、活动上限2,共享家族预算,父取消同时停止排队和子任务。
39
+
40
+ 默认工作区软配额512MiB、用户Worker最多2个;限制及容器资源以Compose和运行配置为准,不是并发人数承诺。当前协调器仅支持单副本SQLite,不承诺跨副本容量或HA。
41
+
42
+ Office文档工具随同一镜像离线交付。DOCX预览使用固定LibreOffice WASM转PDF;Python只用于文档工具。转换、输出、缓存与期限有界,原生下载继续经过当前用户边界。复杂排版、客户模型质量和现场吞吐须独立验收。
43
+
44
+ 扩展方式见[DSH插件与项目接入](../development/dsh-plugins.md),技能治理见[Agent技能](../platform/agent-skills.md)。
@@ -0,0 +1,55 @@
1
+ # DSH 插件与项目接入
2
+
3
+ 运行基线固定为官方DSH `0.2.1-rc.2`、Cordis `4.0.5`和Node 24.7+。不要把本次回迁同时当作上游升级。官方依赖通过Bun与锁文件安装;不修改node_modules或复制上游内核。
4
+
5
+ ## 项目扩展
6
+
7
+ `apps/agent-server/project/host.ts`是project-owned组合,类型为`DshHostConfiguration`。可声明助理文案、工作区名称、额外指令、只读技能目录和可信Host插件。项目插件配置不承载Secret或客户端自报权限;模型、MCP身份、隔离与部署约束由最后的托管配置持有。
8
+
9
+ `presetId`是部署固定的会话身份,默认`windy`。接管已有原生会话时保留其原ID;Registry、handoff和子任务统一使用该值,不重写既有会话文件。名称和说明可另行修改。项目插件可用`replaces: ["session-controller"]`接管官方公开SessionController,实现业务只读历史投影;平台先停用原条目再装入Adapter,拒绝重复接管或替换模型、身份、预算等其它托管条目。
10
+
11
+ 项目只读资源与插件放入`project/`,通过相对Agent Server的路径引用。整个目录随镜像交付、root所有且Worker只读;个人会话与技能仍保存在各自HOME,不通过重新初始化HOME做接管。
12
+
13
+ ### 受控业务边界
14
+
15
+ `boundaryRoutes`可声明固定GET/POST路径,模板只支持字面片段与`:id`参数,参数仅接受最多128位字母、数字、连字符或下划线;无通配符,不得覆盖`/mcp`、`/skills`或`/v1`。重复或交叠路由在启动时拒绝。业务Handler只依赖标准TypeScript的`DshBoundaryRequest`/`DshBoundaryContext`,不接触DSH私有类型、Worker或产品Session。
16
+
17
+ ```ts
18
+ boundaryRoutes: [
19
+ {
20
+ key: "project.history",
21
+ method: "GET",
22
+ path: "/business-history/:id",
23
+ maxResponseBytes: 2 * 1024 * 1024,
24
+ timeoutMs: 15_000,
25
+ handle: (request, context) =>
26
+ context.fetchProduct(`/api/my-module/history/${request.parameters.id}`),
27
+ },
28
+ ];
29
+ ```
30
+
31
+ Handler收到`method/path/parameters/searchParams/body/signal`;查询参数仍须按业务协议校验。每次`fetchProduct`先重查当前登录,再向固定产品origin的相对`/api/`路径调用,继续经过产品API既有Manifest、Feature、License、RBAC与Scope。禁止外部URL、路径穿越、内部API、客户凭据/headers/redirect参数;HTTP方法必须与声明路由一致,仅允许JSON或二进制content-type。产品响应只保留content-type与no-store,不向Worker转发Set-Cookie或其它凭据头。
32
+
33
+ GET不接收正文,POST默认64KiB,可声明`maxBodyBytes`至多20MiB;回源正文遵守同一上限,响应默认2MiB、至多20MiB。整体处理默认15秒、最多30秒,包含回源授权、HTTP及响应读取;撤权、取消和超时中止后续调用。项目声明只负责接线,不授予业务权限。业务错误回执可返回原受控状态,框架错误只返回安全码;临时登录核验故障保持503,不能误报为已登出。
34
+
35
+ 已匹配请求的路径上限2048字符、查询上限4096字符,回源相对URL上限8192字符;Handler不接收入站headers,产品请求headers由平台固定生成。额外只读技能目录同时进入官方发现和内置技能管理列表,不能通过个人管理入口修改或删除。
36
+
37
+ 通过公开Cordis service/event和DSH Slot、Skill Provider、MCP、LocalSubprocessRuntime接口扩展;监听、定时器和资源使用生命周期释放。普通业务DTO只依赖平台类型,不导入DSH私有类型。Client bundle源与生成文件一同维护,更新chunk时重建主入口revision。
38
+
39
+ 工作台品牌读取现有`/api/platform/branding`的softwareName、logoUrl和description。中文是部署策略,不新增i18n框架。主题复用平台语义token,不在各插件重复覆盖全局颜色。
40
+
41
+ 开发 Compose 和生成项目默认将`WINDY_PUBLIC_BASE_URL`留空,工作台按浏览器同源Host确定来源,不能把内部API端口9747固定为Web来源。显式配置优先且必须是用户实际访问的Web origin;HTTPS反向代理或生产Client Agent Session仍须配置该基址,后者缺失时继续fail closed。
42
+
43
+ `apps/server/src/app/agent-workflow-presets.ts`是project-owned的预设注册入口。注册项必须引用已安装模块、已声明Feature/Permission和有效Workflow定义;可提供安全的同源业务入口及readiness。后台只读展示目录,正式启动仍由业务入口取得当前授权、不可变Release和材料。
44
+
45
+ ## 个人扩展
46
+
47
+ 个人插件及技能管理默认开放,按用户持久化。个人插件是该账号信任的代码;DSH官方安装器需要pnpm语义,镜像中提供固定安装器,项目包管理仍使用Bun。受部署固定的模型和身份不能通过个人profile替换。
48
+
49
+ `AGENT_DSH_USER_EXTENSIONS=0`关闭管理入口及个人技能发现,但不卸载、停用已保存插件。撤销插件应先通过原生管理界面停用/卸载,再重新创建该用户Worker;保护工作区、会话和必要文件。
50
+
51
+ ## 验证与升级
52
+
53
+ 新增能力先补成功、拒绝、声明漂移和清理测试。合并候选集中执行`bun run test:merge`;Node运行时检查由`test:agent`承载。Linux协调器与沙箱检查分别使用Agent Server的`test:coordinator`和`test:confinement`。
54
+
55
+ 上游升级必须同批更新直接依赖和Cordis,检查公开API、最终profile合成、原生依赖完整性、UI slots、授权、取消、Office预览与隔离。依赖版本与SHA来源必须可追溯,不能仅手工改锁文件字符串。验证缺口写入交付文档。
@@ -0,0 +1,98 @@
1
+ # DSH Agent 回迁、部署与验收
2
+
3
+ 2026-10-29。开发分支 `rayjason/dsh-agent-platform-migration`。本次交付源码、生成升级支持及本地验证;不发布npm、不推送镜像、不部署生产。
4
+
5
+ ## 切换与回退
6
+
7
+ 1. 固定当前应用SHA、镜像digest、环境配置与Agent专用volume备份。确认没有正在执行的Agent任务,停止旧Agent服务。
8
+ 2. 按新源码统一构建Agent Server、Server和Web。Node工作台代理、后台API与引擎需要同批更新,不能只替换Agent镜像。
9
+ 3. 运行正式前向数据库迁移;新增DSH技能版本/幂等回执和诊断索引。既有业务库、上传文件、长期业务Session和Workflow记录保留。
10
+ 4. 使用新的`AGENT_RUNTIME_DATABASE_PATH`,默认`/app/data/agent/embedded-dsh.sqlite`。原生HOME默认`/app/data/agent/dsh`。不读取、不迁移旧Python Run Store;旧历史详情无法回读时明确显示“运行详情不可用”,说明范围、过期或旧Agent数据重置等可能原因,统一404避免泄露记录存在性,不自动重新执行。
11
+ 5. 验证就绪、当前登录、权限拒绝、canonical调用、原生入口、撤权及文件成果。验收后再按备份策略人工清理旧Agent专用文件,禁止清理业务PostgreSQL或共享文件存储。
12
+ 6. 回退时停止新Agent,恢复同一批旧镜像及其专用备份。追加的数据库表可保留,不回写已发布迁移或回滚业务数据。
13
+
14
+ 升级器按文件所有权处理:未修改的旧受管Python文件可删除;客户修改的受管文件报冲突;`apps/agent-server/project/host.ts`等项目扩展保留。DSH接线涉及项目拥有的路由和组合文件时只接受已知默认基线或已经完成的目标内容,修改过的文件需人工整合,不能静默覆盖。
15
+
16
+ ## 配置与资源
17
+
18
+ - Node要求24.7+;Linux内核必须满足Landlock完整约束及seccomp。协调器使用root切换UID,容器drop ALL后仅补SETUID、SETGID、CHOWN、DAC_OVERRIDE、KILL,启用no-new-privileges。
19
+ - `AGENT_SERVER_INTERNAL_TOKEN`是内部服务认证;Provider继续使用`QWEN_API_URL/QWEN_API_KEY/QWEN_MODEL`。HTTPS Provider域名须在`AI_PROVIDER_HTTPS_HOST_ALLOWLIST`,内部结果加密使用`AGENT_INTERNAL_OUTPUT_ENCRYPTION_SECRET`。不向用户进程下发这些真实凭据。
20
+ - 全局模型容量由`AI_PROVIDER_MAX_CONCURRENT_RUNS`控制。Compose保留1槽、0队列默认值;因此原生模型任务显示容量预留不可用。现场确认模型和内存后才能提高上限;原生请求始终保留至少1槽给既有调用链。
21
+ - 原生任务上限`AGENT_DSH_MAX_ACTIVE_RUNS=2`,用户Worker默认2,工作区软配额512MiB,容器4GiB/2CPU/512PID。软配额不代替磁盘硬配额,WASM峰值RSS也不等于V8 heap限制。
22
+ - `AI_PROVIDER_CONTEXT_TOKENS`只能填现场确认的模型serving容量;未配置时不能用DSH界面估计当作容量证明。
23
+ - `WINDY_PUBLIC_BASE_URL`可固定公开来源;为空时同源HTTP入口保留浏览器Host用于局域网动态地址。HTTPS终止代理应设置正确公开基址,外部转发头不能代替部署配置。
24
+ - `AGENT_DSH_HOME`父目录必须专用于Agent数据,启动会收紧普通文件权限。当前SQLite/容量仅支持单副本。
25
+
26
+ 个人扩展默认开放。`AGENT_DSH_USER_EXTENSIONS=0`关闭管理入口及个人技能发现;要撤销已安装插件,先停用或卸载,再重建该用户Worker。保留该用户工作区、技能和会话;禁止把关入口当作已撤销插件代码的证明。
27
+
28
+ ## 构建与检查入口
29
+
30
+ ```sh
31
+ bun install --frozen-lockfile
32
+ bun run --cwd apps/agent-server typecheck
33
+ bun run --cwd apps/agent-server build
34
+ bun run test:merge
35
+ # 合成Provider + 实际平台用户查询工具:
36
+ bun apps/server/scripts/check-dsh-platform-example.ts
37
+ # 只运行新增三表与 Repository 契约,自动创建并删除专用 PG18 容器:
38
+ WINDY_DSH_POSTGRES_TEST=1 bun test ./apps/server/src/agent-skills/postgres.integration.test.ts
39
+ # Agent专用原生架构镜像构建后:
40
+ bun run --cwd apps/agent-server test:coordinator
41
+ bun run --cwd apps/agent-server test:confinement
42
+ ```
43
+
44
+ 普通小提交只执行静态检查;合并候选集中执行merge gate。Node契约检查使用真实DSH Loop与合成Provider。Linux原生镜像检查验证协调器、不同UID、MCP/WS、凭据剥离、撤权、共享技能与文件约束。Office另用合成DOCX验证实际转换及产物回读。
45
+
46
+ 正式发布才运行完整`release:verify`,本次不运行完整发布矩阵或GitHub Actions,不使用Playwright/Chrome。
47
+
48
+ ## 验证记录
49
+
50
+ ### 来源与提交
51
+
52
+ 同步远端后从 Windy `1ad816a89455b8b4c3ce37f1e3732759fafa8f48` 创建本分支,参考 sharp-sword 远端 `d8e1b68219a448d5c470f6ff298fd7114db40c5c`。sharp-sword 原有2个本地提交及 Server/Web Dockerfile 未提交改动保留。
53
+
54
+ | 提交 | 切片 |
55
+ | ---------- | -------------------------------------------------------------------- |
56
+ | `3771afc4` | Node/DSH 运行时、原生工作台、隔离及通用插件,退役 Python 引擎 |
57
+ | `6c59d398` | 工作台代理与准入、共享技能治理、Workflow 预设、诊断、后台及 Manifest |
58
+ | `b5620876` | create-windy 生成、裁剪、升级、Docker 与构建分发 |
59
+ | `5a536e11` | 架构决策、平台职责、插件接缝及迁移运维文档 |
60
+ | `d1939dc2` | Tool Schema 透传及未终止 Run 的协议状态 |
61
+ | `d389ecbf` | 能力目录与开发组合接线 |
62
+ | `e262ad4e` | Windy 主题、加载页及打包契约 |
63
+ | `a7767955` | 受治理平台用户查询示例探针 |
64
+ | `f546b11d` | WS 启动校验、Admin 目录一致性、开发身份敏感权限拒绝 |
65
+ | `1eb71c8e` | Node 检查入口及旧运行详情不可用说明 |
66
+ | `9844e08a` | 精简 Agent 项目的调度/运维共同裁剪归属 |
67
+ | `f83af3a5` | 真实 PostgreSQL 18 与 Linux 文档交付检查 |
68
+ | `54f71825` | 配额目录替换与子任务预算检查使用显式同步,消除调度假设 |
69
+
70
+ ### 本地验收
71
+
72
+ 本地证据保存在忽略目录 `.artifacts/dsh-agent-platform-migration/` 及 `.artifacts/dsh-windy-20261029/`;不把合成产物、临时数据库或完整日志作为平台源文件提交。
73
+
74
+ 代码候选为 `54f718258ef1d589f97bc9c9cfdc62d606ff0cf0`。本机原生 Linux ARM64 镜像:Agent `sha256:e98e7522c1962e49f906de7bda88cc93c388717a2bc3059265895d04f28936d5`;Web `sha256:08ed2a3b79bce939682af0ab6ac345c5ef696a866e1c2564018dc4b0bfa65693`。均只在本地构建,未推送。
75
+
76
+ | 范围 | 实际检查与结果 |
77
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
78
+ | 静态检查 | 提交钩子执行 Oxfmt、Oxlint 与根 TypeScript 检查,全部通过。它们不计为测试。 |
79
+ | 合并候选 | `54f71825` 上最终 `bun run test:merge` 退出0:Bun 2508通过/142跳过,Web 115文件335项通过,License 15文件49项通过,Node Agent 35项通过,Document/Speech/Embedding分别79/29/19项通过;合计3054项通过、0失败。 |
80
+ | 真实 DSH Loop | 35项 Node 检查通过;使用合成 Provider,覆盖结构化输出、工具/审批、授权重检、幂等与唯一终态、重放/重启、取消、连续单容量 Run、Client Agent 传输及内部结果加密。 |
81
+ | 同源工作台 | 实际 HTTP/WS 双跳、裸 `/agent` 相对资源、动态 LAN 来源、伪造身份头、登录冲突、撤权、冷启动预算及连接清理均有合约检查。 |
82
+ | Linux ARM64 | 固定镜像实测独立 UID/HOME、跨用户文件拒绝、凭据剥离、当前 MCP 身份、共享技能只读及版本撤销、登出回收/另一用户存活;Landlock 为 full,直接/子进程/继承句柄/PTY 的文件和网络限制通过。 |
83
+ | 生产 Web 镜像 | Node构建和Bun生产启动通过;只读容器中用合成同容器API上游验证就绪、静态首页、原生HTTP/WS转发及伪造内部身份头剥离,不涉及浏览器。 |
84
+ | 技能与诊断持久化 | 专用 PostgreSQL 18 容器执行0064三表迁移及真实 Repository:4项、37个断言通过,包括并发 CAS、幂等、重建连接池后的待审计恢复、停用/回滚及30天精确过期边界/有界清理。未连接业务数据库。 |
85
+ | 技能界面与权限 | 导入包边界、共享范围、依赖、读取与变更审计、版本冲突、停用/回滚及未保存输入保护由服务/API/组件检查覆盖;没有浏览器 E2E。 |
86
+ | Workflow/错误诊断 | 动态预设只读注册、当前授权与可用性说明;实际 HTTP 失败生成诊断号,只存路由模板/安全码,拒绝越权查询并审计。查询立即排除过期记录,物理清理在失败记录写入时按分钟节流、有界执行。 |
87
+ | 非案件示例 | 真实平台 ToolRegistry 的 `system.users.list` 经真实 DSH Loop 调用1次,合成 Provider 调用2次,canonical SSE 与结构化汇总返回授权示例用户数1。没有利剑案件依赖。 |
88
+ | 文档与下载 | Linux UID20000、无外网、只读输入下读取 `windy-office` 技能,使用镜像文档工具生成新 DOCX/XLSX 并独立回读,保留来源摘要和文本编号001;生产下载插件+真实 LocalFileSystem+HTTP 验证字节/摘要/中文文件名及匿名、跨会话、越界、软链拒绝。Session坐标和连接身份明确使用合成 fixture。 |
89
+ | Office 预览 | 固定 WASM 将36778字节合成 DOCX 转为29653字节完整 PDF,用时2402ms,峰值RSS1527008KiB、缺失字体为空;另行回读PDF有1页且包含中文平台用户汇总。超限前拒绝、预取消、禁用后台转换均通过。 |
90
+ | 生成与升级 | 真实 core 与精简 Agent 项目生成、依赖安装及完整类型检查通过;Agent 另通过实际启动组合及 Compose 配置校验。安装使用 `--ignore-scripts`,不宣称客户项目运行验收。升级的精确基线/已采纳/客户修改/删除状态、旧文件退役与环境只报告键名由契约检查覆盖。 |
91
+
92
+ 文档下载复现使用 `apps/agent-server/scripts/documents-delivery-check.mjs`,通过只读 bind mount 挂到镜像相同目录,以 `--user 20000:20000 --network none --read-only --cap-drop ALL` 运行;fixture目录挂为`/fixtures`。输入为查询探针的`platform-example.json`、含工具名和汇总的合成`source.docx`、两列“编号/平台用户数”及数据“001/1”的`users.xlsx`。预览检查为`scripts/office-preview-check.mjs`,同样挂载运行,读取`/fixture/source.docx`及显式`WINDY_OFFICE_TEST_CONFIG`限制。
93
+
94
+ ### 验收边界
95
+
96
+ 本次不运行完整发布矩阵、全历史数据库迁移矩阵、客户模型/业务数据、现场并发容量或浏览器 E2E;不使用 Playwright、Chrome、GitHub Actions,不执行发布或生产部署。新表轻量检查不代替发布时完整迁移验证。DOCX复杂版式与分页未验收;示例表格没有公式,不据此声称公式重算。Office单次RSS用于资源观察,不是吞吐或并发承诺。
97
+
98
+ 运行边界仍为单副本SQLite和Linux隔离。默认全局1槽为既有调用链预留,原生模型任务需在现场确认容量后配置。个人扩展默认开放,插件撤销必须执行前述停用/卸载与Worker重建;试验记忆方案未启用。
@@ -1,82 +1,9 @@
1
- # Agent 生产 Store、不可变 Release 与评估追踪
1
+ # Agent 运行存储
2
2
 
3
- ## 目标与边界
3
+ 2026-10-29。Agent Server 已由Node/DSH接管。canonical运行、SSE事件、Provider审计与原生用户工作区使用Agent专用本地存储;默认数据库为`AGENT_RUNTIME_DATABASE_PATH=/app/data/agent/embedded-dsh.sqlite`。
4
4
 
5
- Agent Runtime 的 PostgreSQL Store 是多副本生产默认实现。它只保存 Run
6
- 执行事实、加密后的调用/事件/结果、Release 快照和评估结果,不保存业务会话、消息、
7
- 标题、案件范围或归档策略。业务事实仍由业务模块持久化。
5
+ 当前只支持单副本,不承诺旧Python PostgreSQL Store模式或跨副本容量/HA。旧`AGENT_RUN_STORE_PATH`、`AGENT_DATABASE_URL`、`AI_PROVIDER_AUDIT_STORE_PATH`不能作为新实现已启用的证据。
8
6
 
9
- SQLite Store 只用于单副本本地开发和确定性验证;未配置
10
- `AGENT_DATABASE_URL` 且配置了 `AGENT_RUN_STORE_PATH` 时才启用。生产部署不得用
11
- 共享文件系统模拟多副本 SQLite。
7
+ 产品PostgreSQL继续保存业务长期Session/Memory/Workflow、授权、运行绑定与报表治理事实;DSH存储不替代这些职责。内部结果仍使用Host声明的加密策略,普通历史读取不泄露internal输出。
12
8
 
13
- ## 状态与反馈闭环
14
-
15
- 同一个 `Idempotency-Key` 只能对应同一请求指纹。Run 的 canonical event 使用
16
- `run_id + sequence` 唯一键,读取接口按 cursor 重放;终态后追加、完成和取消都是
17
- 幂等操作。事件或输出超过上限时,Store 写入唯一的 `run.failed`,避免运行态无限
18
- 增长。
19
-
20
- 每个工作副本领取 30 秒租约,并每 10 秒续租。租约丢失会中止当前执行,保留加密
21
- 调用快照供其他副本接管;恢复轮询使用行锁和 `skip locked` 防止重复领取。终态数据
22
- 按 TTL 清理,运行中数据不会被 TTL 清理。
23
-
24
- ## 不可变 Release 与回滚
25
-
26
- 每次 Run 固定以下坐标:
27
-
28
- - Operation 与模块版本;
29
- - Workflow、Prompt 和模型 Route 版本;
30
- - Tool/输出 Schema 摘要;
31
- - Manifest 摘要。
32
-
33
- 这些坐标生成稳定的 `releaseId`。同一 `releaseId` 只能对应同一快照,冲突时
34
- fail closed,不能原地修改。业务模块通过
35
- `ModuleAiOperationHandlerRegistration.release` 显式声明 Workflow、Prompt 和
36
- Route 版本;未声明时使用模块版本。
37
-
38
- 回滚不是修改历史 Release,而是重新部署此前的模块/注册版本。旧 Release 仍保留,
39
- 新 Run 会固定到回滚后的旧坐标,历史 Run、评估和审计关联不会被改写。
40
-
41
- ## 评估、用量、Attempt、审计和 Trace
42
-
43
- `POST /api/agent/evaluations` 仅接受内部 Token,可按 Release、评估集 Key 和评估集
44
- 版本幂等记录指标;同一坐标提交不同结果会拒绝。`usage.reported` 作为加密 canonical
45
- event 保存。Provider attempt 审计以 `runId + attempt` 唯一保存,并可通过 Run 关联
46
- Release、usage 和平台 Audit。
47
-
48
- 平台将请求关联值哈希为 128 位 Trace ID。Agent Runtime 用它建立 OTel 父 Trace,
49
- Span 只包含 Run ID、Operation Key、Release ID 和终态,不写 Prompt、业务输入、
50
- 模型输出、Tool 参数、Actor 或 Secret。配置
51
- `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` 后启用 OTLP/HTTP 导出,认证头由
52
- `OTEL_EXPORTER_OTLP_HEADERS` 注入。
53
-
54
- ## 运维配置
55
-
56
- 生产 Agent profile 必须配置:
57
-
58
- ```dotenv
59
- AGENT_DATABASE_URL=postgresql://...
60
- AGENT_RUN_ENCRYPTION_SECRET=至少32字节随机值
61
- AGENT_SERVER_INTERNAL_TOKEN=随机内部令牌
62
- ```
63
-
64
- 可选配置:
65
-
66
- ```dotenv
67
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://collector.example/v1/traces
68
- OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20...
69
- ```
70
-
71
- 加密密钥缺失或不足 32 字节时 Runtime 拒绝启动。数据库迁移必须先于 Agent Server
72
- 启动。Provider attempt 的独立审计 Store 仍按
73
- `AI_PROVIDER_AUDIT_RETENTION_DAYS` 执行留存;不可把它与业务日志混用。
74
-
75
- ## 故障与恢复
76
-
77
- - PostgreSQL 不可用:启动 fail closed;运行中的副本停止续租,不继续产生副作用。
78
- - 副本退出:租约过期后由其他副本恢复加密调用,不创建新 Run。
79
- - OTLP 不可用:BatchSpanProcessor 按 OTel 导出策略处理,不向业务响应暴露 Collector
80
- 细节;Run Store 与平台 Audit 仍是业务审计事实。
81
- - Release 快照冲突、评估结果漂移或幂等键漂移:稳定拒绝,要求修正发布输入。
82
- - 超过容量、事件数或输出大小:写入或返回有界失败,不允许无界降级。
9
+ 备份时协调停止Agent写入,保存SQLite主文件及WAL一致边界和原生HOME。采用新数据路径并允许旧Agent专用数据重置;业务数据库和文件必须保留。具体切换与回退见[迁移运维](../operations/dsh-agent-migration.md)。
@@ -1,5 +1,7 @@
1
1
  # AI Runtime 用量与运行报表
2
2
 
3
+ > 2026-10-29:执行层现由[内置DSH](../architecture/embedded-dsh-integration.md)接管。下文涉及Python Direct Engine、旧安装/存储及OTEL配置的内容属于历史实现;当前启动、配置与限制以[迁移运维](../operations/dsh-agent-migration.md)为准。canonical API、业务长期Session和治理契约继续有效。
4
+
3
5
  `system.ai-runtime` 为 `system.agent` 提供运行事实、模型用量和缓存覆盖的管理面。它读取
4
6
  canonical Agent Run 与每次 Provider Attempt 的独立报表投影,不把管理报表变成新的
5
7
  执行入口,也不以报表写入结果改写 canonical Run 终态。
@@ -1,5 +1,7 @@
1
1
  # Agent Runtime 接入
2
2
 
3
+ > 2026-10-29:执行层现由[内置DSH](../architecture/embedded-dsh-integration.md)接管。下文涉及Python Direct Engine、旧安装/存储及OTEL配置的内容属于历史实现;当前启动、配置与限制以[迁移运维](../operations/dsh-agent-migration.md)为准。canonical API、业务长期Session和治理契约继续有效。
4
+
3
5
  ## 当前基线
4
6
 
5
7
  Windy 的服务端 Agent Runtime 由独立 Python Agent Server 承载,生产默认 Engine 是