dsh-plugin-guide 0.1.0

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 (374) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE.md +26 -0
  3. package/README.es.md +139 -0
  4. package/README.hi.md +138 -0
  5. package/README.md +165 -0
  6. package/README.pt.md +139 -0
  7. package/README.zh-CN.md +164 -0
  8. package/SKILL.md +69 -0
  9. package/cordis.patch.yml +4 -0
  10. package/guide/links.md +92 -0
  11. package/guide/plugin-dev-guide.md +429 -0
  12. package/guide/quick-reference.es.md +176 -0
  13. package/guide/quick-reference.hi.md +176 -0
  14. package/guide/quick-reference.md +176 -0
  15. package/guide/quick-reference.pt.md +176 -0
  16. package/guide/quick-reference.zh-CN.md +175 -0
  17. package/index.js +58 -0
  18. package/package.json +83 -0
  19. package/references/community-ecosystem.md +201 -0
  20. package/references/community-repo-deep-dive.md +695 -0
  21. package/references/cordis-paper-and-community.md +326 -0
  22. package/references/harness-repo.md +654 -0
  23. package/references/official-docs/AGENTS.md +149 -0
  24. package/references/official-docs/BENCHMARK.md +3 -0
  25. package/references/official-docs/CLAUDE.md +1 -0
  26. package/references/official-docs/CONTRIBUTING.i18n.yaml +6 -0
  27. package/references/official-docs/CONTRIBUTING.md +23 -0
  28. package/references/official-docs/CONTRIBUTING.zh.md +23 -0
  29. package/references/official-docs/LICENSE +21 -0
  30. package/references/official-docs/README.i18n.yaml +6 -0
  31. package/references/official-docs/README.md +35 -0
  32. package/references/official-docs/README.zh.md +74 -0
  33. package/references/official-docs/SNAPSHOT.md +16 -0
  34. package/references/official-docs/THIRD_PARTY_NOTICES.md +192 -0
  35. package/references/official-docs/docs/AGENTS.md +75 -0
  36. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +6 -0
  37. package/references/official-docs/docs/agent-lifecycle.md +82 -0
  38. package/references/official-docs/docs/agent-lifecycle.zh.md +84 -0
  39. package/references/official-docs/docs/api-gateway.i18n.yaml +6 -0
  40. package/references/official-docs/docs/api-gateway.md +164 -0
  41. package/references/official-docs/docs/api-gateway.zh.md +164 -0
  42. package/references/official-docs/docs/architecture.i18n.yaml +6 -0
  43. package/references/official-docs/docs/architecture.md +129 -0
  44. package/references/official-docs/docs/architecture.zh.md +133 -0
  45. package/references/official-docs/docs/capability-seams.i18n.yaml +6 -0
  46. package/references/official-docs/docs/capability-seams.md +471 -0
  47. package/references/official-docs/docs/capability-seams.zh.md +473 -0
  48. package/references/official-docs/docs/config-catalog.i18n.yaml +6 -0
  49. package/references/official-docs/docs/config-catalog.md +3151 -0
  50. package/references/official-docs/docs/config-catalog.zh.md +3152 -0
  51. package/references/official-docs/docs/cookbook/adding-a-conversation-node.i18n.yaml +6 -0
  52. package/references/official-docs/docs/cookbook/adding-a-conversation-node.md +233 -0
  53. package/references/official-docs/docs/cookbook/adding-a-conversation-node.zh.md +233 -0
  54. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +6 -0
  55. package/references/official-docs/docs/cookbook/adding-a-package.md +118 -0
  56. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +118 -0
  57. package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +6 -0
  58. package/references/official-docs/docs/cookbook/adding-a-tool.md +94 -0
  59. package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +96 -0
  60. package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +6 -0
  61. package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +59 -0
  62. package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +59 -0
  63. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +6 -0
  64. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.md +43 -0
  65. package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +43 -0
  66. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +6 -0
  67. package/references/official-docs/docs/cookbook/extension-cookbook.md +129 -0
  68. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +131 -0
  69. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +6 -0
  70. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.md +64 -0
  71. package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.zh.md +64 -0
  72. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +6 -0
  73. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.md +32 -0
  74. package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +32 -0
  75. package/references/official-docs/docs/cordis-api/context.i18n.yaml +6 -0
  76. package/references/official-docs/docs/cordis-api/context.md +364 -0
  77. package/references/official-docs/docs/cordis-api/context.zh.md +366 -0
  78. package/references/official-docs/docs/cordis-api/events.i18n.yaml +6 -0
  79. package/references/official-docs/docs/cordis-api/events.md +207 -0
  80. package/references/official-docs/docs/cordis-api/events.zh.md +209 -0
  81. package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +6 -0
  82. package/references/official-docs/docs/cordis-api/fiber.md +375 -0
  83. package/references/official-docs/docs/cordis-api/fiber.zh.md +377 -0
  84. package/references/official-docs/docs/cordis-api/inherited.md +39 -0
  85. package/references/official-docs/docs/cordis-api/registry.i18n.yaml +6 -0
  86. package/references/official-docs/docs/cordis-api/registry.md +152 -0
  87. package/references/official-docs/docs/cordis-api/registry.zh.md +154 -0
  88. package/references/official-docs/docs/cordis-api/service.i18n.yaml +6 -0
  89. package/references/official-docs/docs/cordis-api/service.md +102 -0
  90. package/references/official-docs/docs/cordis-api/service.zh.md +104 -0
  91. package/references/official-docs/docs/cordis-primer.i18n.yaml +6 -0
  92. package/references/official-docs/docs/cordis-primer.md +44 -0
  93. package/references/official-docs/docs/cordis-primer.zh.md +50 -0
  94. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +6 -0
  95. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.md +95 -0
  96. package/references/official-docs/docs/cordis-tutorial/01-first-plugin.zh.md +95 -0
  97. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +6 -0
  98. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
  99. package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
  100. package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +6 -0
  101. package/references/official-docs/docs/cordis-tutorial/03-services.md +98 -0
  102. package/references/official-docs/docs/cordis-tutorial/03-services.zh.md +98 -0
  103. package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +6 -0
  104. package/references/official-docs/docs/cordis-tutorial/04-events.md +144 -0
  105. package/references/official-docs/docs/cordis-tutorial/04-events.zh.md +144 -0
  106. package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +6 -0
  107. package/references/official-docs/docs/cordis-tutorial/05-config.md +84 -0
  108. package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +84 -0
  109. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +6 -0
  110. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.md +113 -0
  111. package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
  112. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +6 -0
  113. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.md +107 -0
  114. package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.zh.md +107 -0
  115. package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +6 -0
  116. package/references/official-docs/docs/cordis-tutorial/index.md +60 -0
  117. package/references/official-docs/docs/cordis-tutorial/index.zh.md +62 -0
  118. package/references/official-docs/docs/defensive-patterns.i18n.yaml +6 -0
  119. package/references/official-docs/docs/defensive-patterns.md +33 -0
  120. package/references/official-docs/docs/defensive-patterns.zh.md +33 -0
  121. package/references/official-docs/docs/development.i18n.yaml +6 -0
  122. package/references/official-docs/docs/development.md +171 -0
  123. package/references/official-docs/docs/development.zh.md +171 -0
  124. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +6 -0
  125. package/references/official-docs/docs/event-producer-consumer.md +76 -0
  126. package/references/official-docs/docs/event-producer-consumer.zh.md +78 -0
  127. package/references/official-docs/docs/glossary.i18n.yaml +6 -0
  128. package/references/official-docs/docs/glossary.md +45 -0
  129. package/references/official-docs/docs/glossary.zh.md +45 -0
  130. package/references/official-docs/docs/graph-atlas.i18n.yaml +6 -0
  131. package/references/official-docs/docs/graph-atlas.md +24 -0
  132. package/references/official-docs/docs/graph-atlas.zh.md +26 -0
  133. package/references/official-docs/docs/i18n/README.i18n.yaml +6 -0
  134. package/references/official-docs/docs/i18n/README.md +60 -0
  135. package/references/official-docs/docs/i18n/README.zh.md +60 -0
  136. package/references/official-docs/docs/i18n/style-samples.md +87 -0
  137. package/references/official-docs/docs/i18n/terminology.md +214 -0
  138. package/references/official-docs/docs/i18n/translation-prompt.md +263 -0
  139. package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +6 -0
  140. package/references/official-docs/docs/i18n/translation-rules.md +69 -0
  141. package/references/official-docs/docs/i18n/translation-rules.zh.md +69 -0
  142. package/references/official-docs/docs/module-graph.i18n.yaml +6 -0
  143. package/references/official-docs/docs/module-graph.md +1638 -0
  144. package/references/official-docs/docs/module-graph.zh.md +1640 -0
  145. package/references/official-docs/docs/persistence-catalog.i18n.yaml +6 -0
  146. package/references/official-docs/docs/persistence-catalog.md +944 -0
  147. package/references/official-docs/docs/persistence-catalog.zh.md +946 -0
  148. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +6 -0
  149. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.md +113 -0
  150. package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.zh.md +113 -0
  151. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +6 -0
  152. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +47 -0
  153. package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +47 -0
  154. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +6 -0
  155. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.md +53 -0
  156. package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +53 -0
  157. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +6 -0
  158. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +55 -0
  159. package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +55 -0
  160. package/references/official-docs/docs/postmortem/README.i18n.yaml +6 -0
  161. package/references/official-docs/docs/postmortem/README.md +18 -0
  162. package/references/official-docs/docs/postmortem/README.zh.md +18 -0
  163. package/references/official-docs/docs/rescope.i18n.yaml +6 -0
  164. package/references/official-docs/docs/rescope.md +53 -0
  165. package/references/official-docs/docs/rescope.zh.md +53 -0
  166. package/references/official-docs/docs/subsystems/README.i18n.yaml +6 -0
  167. package/references/official-docs/docs/subsystems/README.md +55 -0
  168. package/references/official-docs/docs/subsystems/README.zh.md +55 -0
  169. package/references/official-docs/docs/subsystems/approval.i18n.yaml +6 -0
  170. package/references/official-docs/docs/subsystems/approval.md +170 -0
  171. package/references/official-docs/docs/subsystems/approval.zh.md +170 -0
  172. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +6 -0
  173. package/references/official-docs/docs/subsystems/attachment.md +115 -0
  174. package/references/official-docs/docs/subsystems/attachment.zh.md +115 -0
  175. package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +6 -0
  176. package/references/official-docs/docs/subsystems/client-modules.md +118 -0
  177. package/references/official-docs/docs/subsystems/client-modules.zh.md +118 -0
  178. package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +6 -0
  179. package/references/official-docs/docs/subsystems/code-runtime.md +191 -0
  180. package/references/official-docs/docs/subsystems/code-runtime.zh.md +191 -0
  181. package/references/official-docs/docs/subsystems/commands.i18n.yaml +6 -0
  182. package/references/official-docs/docs/subsystems/commands.md +187 -0
  183. package/references/official-docs/docs/subsystems/commands.zh.md +187 -0
  184. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +6 -0
  185. package/references/official-docs/docs/subsystems/compaction.md +238 -0
  186. package/references/official-docs/docs/subsystems/compaction.zh.md +238 -0
  187. package/references/official-docs/docs/subsystems/core.i18n.yaml +6 -0
  188. package/references/official-docs/docs/subsystems/core.md +1070 -0
  189. package/references/official-docs/docs/subsystems/core.zh.md +1078 -0
  190. package/references/official-docs/docs/subsystems/credentials.i18n.yaml +6 -0
  191. package/references/official-docs/docs/subsystems/credentials.md +133 -0
  192. package/references/official-docs/docs/subsystems/credentials.zh.md +133 -0
  193. package/references/official-docs/docs/subsystems/extensions.i18n.yaml +6 -0
  194. package/references/official-docs/docs/subsystems/extensions.md +364 -0
  195. package/references/official-docs/docs/subsystems/extensions.zh.md +364 -0
  196. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +6 -0
  197. package/references/official-docs/docs/subsystems/feedback.md +266 -0
  198. package/references/official-docs/docs/subsystems/feedback.zh.md +266 -0
  199. package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +6 -0
  200. package/references/official-docs/docs/subsystems/filesystem.md +495 -0
  201. package/references/official-docs/docs/subsystems/filesystem.zh.md +495 -0
  202. package/references/official-docs/docs/subsystems/goal.i18n.yaml +6 -0
  203. package/references/official-docs/docs/subsystems/goal.md +277 -0
  204. package/references/official-docs/docs/subsystems/goal.zh.md +277 -0
  205. package/references/official-docs/docs/subsystems/invariants.i18n.yaml +6 -0
  206. package/references/official-docs/docs/subsystems/invariants.md +88 -0
  207. package/references/official-docs/docs/subsystems/invariants.zh.md +88 -0
  208. package/references/official-docs/docs/subsystems/jobs.i18n.yaml +6 -0
  209. package/references/official-docs/docs/subsystems/jobs.md +290 -0
  210. package/references/official-docs/docs/subsystems/jobs.zh.md +290 -0
  211. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +6 -0
  212. package/references/official-docs/docs/subsystems/llm-streaming.md +888 -0
  213. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +894 -0
  214. package/references/official-docs/docs/subsystems/lsp.i18n.yaml +6 -0
  215. package/references/official-docs/docs/subsystems/lsp.md +202 -0
  216. package/references/official-docs/docs/subsystems/lsp.zh.md +202 -0
  217. package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +6 -0
  218. package/references/official-docs/docs/subsystems/permission-presets.md +131 -0
  219. package/references/official-docs/docs/subsystems/permission-presets.zh.md +131 -0
  220. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +6 -0
  221. package/references/official-docs/docs/subsystems/persistence.md +385 -0
  222. package/references/official-docs/docs/subsystems/persistence.zh.md +385 -0
  223. package/references/official-docs/docs/subsystems/plan.i18n.yaml +6 -0
  224. package/references/official-docs/docs/subsystems/plan.md +87 -0
  225. package/references/official-docs/docs/subsystems/plan.zh.md +87 -0
  226. package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +6 -0
  227. package/references/official-docs/docs/subsystems/sandbox.md +218 -0
  228. package/references/official-docs/docs/subsystems/sandbox.zh.md +218 -0
  229. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +6 -0
  230. package/references/official-docs/docs/subsystems/schedule.md +186 -0
  231. package/references/official-docs/docs/subsystems/schedule.zh.md +186 -0
  232. package/references/official-docs/docs/subsystems/scope.i18n.yaml +6 -0
  233. package/references/official-docs/docs/subsystems/scope.md +59 -0
  234. package/references/official-docs/docs/subsystems/scope.zh.md +59 -0
  235. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +6 -0
  236. package/references/official-docs/docs/subsystems/session-projection.md +262 -0
  237. package/references/official-docs/docs/subsystems/session-projection.zh.md +262 -0
  238. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +6 -0
  239. package/references/official-docs/docs/subsystems/session-query.md +495 -0
  240. package/references/official-docs/docs/subsystems/session-query.zh.md +495 -0
  241. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +6 -0
  242. package/references/official-docs/docs/subsystems/session-reference.md +108 -0
  243. package/references/official-docs/docs/subsystems/session-reference.zh.md +108 -0
  244. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +6 -0
  245. package/references/official-docs/docs/subsystems/session-telemetry.md +194 -0
  246. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +194 -0
  247. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +6 -0
  248. package/references/official-docs/docs/subsystems/session-title.md +204 -0
  249. package/references/official-docs/docs/subsystems/session-title.zh.md +204 -0
  250. package/references/official-docs/docs/subsystems/session.i18n.yaml +6 -0
  251. package/references/official-docs/docs/subsystems/session.md +849 -0
  252. package/references/official-docs/docs/subsystems/session.zh.md +851 -0
  253. package/references/official-docs/docs/subsystems/settings.i18n.yaml +6 -0
  254. package/references/official-docs/docs/subsystems/settings.md +310 -0
  255. package/references/official-docs/docs/subsystems/settings.zh.md +310 -0
  256. package/references/official-docs/docs/subsystems/shell.i18n.yaml +6 -0
  257. package/references/official-docs/docs/subsystems/shell.md +303 -0
  258. package/references/official-docs/docs/subsystems/shell.zh.md +303 -0
  259. package/references/official-docs/docs/subsystems/skills.i18n.yaml +6 -0
  260. package/references/official-docs/docs/subsystems/skills.md +331 -0
  261. package/references/official-docs/docs/subsystems/skills.zh.md +331 -0
  262. package/references/official-docs/docs/subsystems/spill.i18n.yaml +6 -0
  263. package/references/official-docs/docs/subsystems/spill.md +117 -0
  264. package/references/official-docs/docs/subsystems/spill.zh.md +117 -0
  265. package/references/official-docs/docs/subsystems/storage.i18n.yaml +6 -0
  266. package/references/official-docs/docs/subsystems/storage.md +229 -0
  267. package/references/official-docs/docs/subsystems/storage.zh.md +229 -0
  268. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +6 -0
  269. package/references/official-docs/docs/subsystems/subagent.md +734 -0
  270. package/references/official-docs/docs/subsystems/subagent.zh.md +736 -0
  271. package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +6 -0
  272. package/references/official-docs/docs/subsystems/subprocess.md +324 -0
  273. package/references/official-docs/docs/subsystems/subprocess.zh.md +324 -0
  274. package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +6 -0
  275. package/references/official-docs/docs/subsystems/system-prompt.md +207 -0
  276. package/references/official-docs/docs/subsystems/system-prompt.zh.md +207 -0
  277. package/references/official-docs/docs/subsystems/terminal.i18n.yaml +6 -0
  278. package/references/official-docs/docs/subsystems/terminal.md +184 -0
  279. package/references/official-docs/docs/subsystems/terminal.zh.md +184 -0
  280. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +6 -0
  281. package/references/official-docs/docs/subsystems/token-meter.md +90 -0
  282. package/references/official-docs/docs/subsystems/token-meter.zh.md +90 -0
  283. package/references/official-docs/docs/subsystems/tools.i18n.yaml +6 -0
  284. package/references/official-docs/docs/subsystems/tools.md +720 -0
  285. package/references/official-docs/docs/subsystems/tools.zh.md +720 -0
  286. package/references/official-docs/docs/subsystems/typert.i18n.yaml +6 -0
  287. package/references/official-docs/docs/subsystems/typert.md +336 -0
  288. package/references/official-docs/docs/subsystems/typert.zh.md +336 -0
  289. package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +6 -0
  290. package/references/official-docs/docs/subsystems/user-questions.md +178 -0
  291. package/references/official-docs/docs/subsystems/user-questions.zh.md +178 -0
  292. package/references/official-docs/docs/subsystems/web-server.i18n.yaml +6 -0
  293. package/references/official-docs/docs/subsystems/web-server.md +108 -0
  294. package/references/official-docs/docs/subsystems/web-server.zh.md +108 -0
  295. package/references/official-docs/docs/subsystems/web.i18n.yaml +6 -0
  296. package/references/official-docs/docs/subsystems/web.md +199 -0
  297. package/references/official-docs/docs/subsystems/web.zh.md +199 -0
  298. package/references/official-docs/docs/subsystems/workflow.i18n.yaml +6 -0
  299. package/references/official-docs/docs/subsystems/workflow.md +278 -0
  300. package/references/official-docs/docs/subsystems/workflow.zh.md +278 -0
  301. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +6 -0
  302. package/references/official-docs/docs/subsystems/workspace.md +228 -0
  303. package/references/official-docs/docs/subsystems/workspace.zh.md +228 -0
  304. package/references/official-docs/docs/testing.i18n.yaml +6 -0
  305. package/references/official-docs/docs/testing.md +49 -0
  306. package/references/official-docs/docs/testing.zh.md +49 -0
  307. package/references/official-docs/docs/tool-catalog.i18n.yaml +6 -0
  308. package/references/official-docs/docs/tool-catalog.md +1873 -0
  309. package/references/official-docs/docs/tool-catalog.zh.md +1878 -0
  310. package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +6 -0
  311. package/references/official-docs/docs/tool-execution-pipeline.md +62 -0
  312. package/references/official-docs/docs/tool-execution-pipeline.zh.md +64 -0
  313. package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +6 -0
  314. package/references/official-docs/docs/user/develop/basic/config.md +106 -0
  315. package/references/official-docs/docs/user/develop/basic/config.zh.md +106 -0
  316. package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +6 -0
  317. package/references/official-docs/docs/user/develop/basic/index.md +144 -0
  318. package/references/official-docs/docs/user/develop/basic/index.zh.md +144 -0
  319. package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +6 -0
  320. package/references/official-docs/docs/user/develop/basic/publish.md +183 -0
  321. package/references/official-docs/docs/user/develop/basic/publish.zh.md +183 -0
  322. package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +6 -0
  323. package/references/official-docs/docs/user/develop/basic/tool.md +52 -0
  324. package/references/official-docs/docs/user/develop/basic/tool.zh.md +52 -0
  325. package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +6 -0
  326. package/references/official-docs/docs/user/develop/framework/events.md +143 -0
  327. package/references/official-docs/docs/user/develop/framework/events.zh.md +143 -0
  328. package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +6 -0
  329. package/references/official-docs/docs/user/develop/framework/index.md +137 -0
  330. package/references/official-docs/docs/user/develop/framework/index.zh.md +137 -0
  331. package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +6 -0
  332. package/references/official-docs/docs/user/develop/framework/service.md +148 -0
  333. package/references/official-docs/docs/user/develop/framework/service.zh.md +150 -0
  334. package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +6 -0
  335. package/references/official-docs/docs/user/develop/practice/index.md +155 -0
  336. package/references/official-docs/docs/user/develop/practice/index.zh.md +155 -0
  337. package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +6 -0
  338. package/references/official-docs/docs/user/develop/practice/llm-adapter.md +188 -0
  339. package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +188 -0
  340. package/references/official-docs/docs/user/guide/index.i18n.yaml +6 -0
  341. package/references/official-docs/docs/user/guide/index.md +30 -0
  342. package/references/official-docs/docs/user/guide/index.zh.md +30 -0
  343. package/references/official-docs/docs/user/guide/providers-custom-form.png +0 -0
  344. package/references/official-docs/docs/user/guide/providers-custom-form.zh.png +0 -0
  345. package/references/official-docs/docs/user/guide/providers-models-page.png +0 -0
  346. package/references/official-docs/docs/user/guide/providers-models-page.zh.png +0 -0
  347. package/references/official-docs/docs/user/guide/providers.i18n.yaml +6 -0
  348. package/references/official-docs/docs/user/guide/providers.md +98 -0
  349. package/references/official-docs/docs/user/guide/providers.zh.md +98 -0
  350. package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +6 -0
  351. package/references/official-docs/docs/user/guide/python-sdk.md +104 -0
  352. package/references/official-docs/docs/user/guide/python-sdk.zh.md +104 -0
  353. package/references/official-docs/docs/user/index.i18n.yaml +6 -0
  354. package/references/official-docs/docs/user/index.md +11 -0
  355. package/references/official-docs/docs/user/index.zh.md +11 -0
  356. package/references/official-docs/docs/web-styling.i18n.yaml +6 -0
  357. package/references/official-docs/docs/web-styling.md +25 -0
  358. package/references/official-docs/docs/web-styling.zh.md +25 -0
  359. package/references/official-docs/examples/AGENTS.md +20 -0
  360. package/references/official-docs/packages/AGENTS.md +27 -0
  361. package/references/official-docs/packages/README.md +69 -0
  362. package/references/official-docs/vendor/README.md +60 -0
  363. package/references/official-docs/website-docs.ts +524 -0
  364. package/references/sources.md +137 -0
  365. package/references/upstream-cordis.md +594 -0
  366. package/references/website-pages.md +668 -0
  367. package/scripts/archive-discussions.ps1 +154 -0
  368. package/scripts/download-community-articles.ps1 +188 -0
  369. package/scripts/download-community-repos.ps1 +232 -0
  370. package/scripts/download-sources.ps1 +195 -0
  371. package/scripts/gen-topic-snapshot.ps1 +91 -0
  372. package/scripts/install-skill.ps1 +63 -0
  373. package/scripts/sync-official-docs.ps1 +130 -0
  374. package/scripts/verify-kit.ps1 +191 -0
@@ -0,0 +1,195 @@
1
+ # DeepSeek Harness 插件开发资料全量下载脚本
2
+ # 输出: dsh-plugin-guide/downloads/{web,github,community} + manifest.tsv
3
+ # 参数: -DocRoot <路径> 官方 checkout 的 docs 目录(Phase D 站点路由来源),默认本机 checkout。
4
+ param([string]$DocRoot = 'D:\deepseek-harness\docs')
5
+ $ErrorActionPreference = 'Continue'
6
+ $ProgressPreference = 'SilentlyContinue'
7
+
8
+ $kit = Split-Path $PSScriptRoot -Parent
9
+ $dl = Join-Path $kit 'downloads'
10
+ New-Item -ItemType Directory -Force -Path $dl | Out-Null
11
+ $manifest = New-Object System.Collections.Generic.List[string]
12
+ $manifest.Add("status`thttpcode`tbytes`turl`tfile")
13
+
14
+ function Log([string]$line) { $script:manifest.Add($line) }
15
+
16
+ function Do-Curl([string]$url, [string]$outFile, [string]$extra) {
17
+ $dir = Split-Path $outFile -Parent
18
+ if ($dir -and -not (Test-Path $dir)) { New-Item -ItemType Directory -Force -Path $dir | Out-Null }
19
+ $args1 = @('-sS','-L','--max-time','90','-o',$outFile)
20
+ if ($extra) { $args1 += $extra }
21
+ $args1 += @('-w','%{http_code}', $url)
22
+ $code = & curl.exe @args1 2>$null
23
+ if (($code -match '^2') -and (Test-Path $outFile)) {
24
+ $sz = (Get-Item $outFile).Length
25
+ if ($sz -eq 0) { Remove-Item $outFile -Force; Log "FAIL`t$code`t0`t$url"; return $false }
26
+ Log "OK`t$code`t$sz`t$url`t$outFile"
27
+ return $true
28
+ }
29
+ if (Test-Path $outFile) { Remove-Item $outFile -Force -ErrorAction SilentlyContinue }
30
+ Log "FAIL`t$code`t0`t$url"
31
+ return $false
32
+ }
33
+
34
+ function Download([string[]]$urls, [string]$outFile, [string]$extra) {
35
+ foreach ($u in $urls) { if (Do-Curl $u $outFile $extra) { return $true } }
36
+ return $false
37
+ }
38
+
39
+ function Get-DefaultBranch([string]$metaFile, [string]$fallback) {
40
+ if (!(Test-Path $metaFile)) { return $fallback }
41
+ try {
42
+ $m = Get-Content $metaFile -Raw | ConvertFrom-Json
43
+ if ($m.default_branch) { return $m.default_branch }
44
+ } catch { }
45
+ return $fallback
46
+ }
47
+
48
+ $ua = @('-H','User-Agent: dsh-plugin-guide-research')
49
+
50
+ # ---------- Phase A: 固定 URL ----------
51
+ Download @('https://raw.githubusercontent.com/cordiverse/cordis/HEAD/README.md',
52
+ 'https://raw.githubusercontent.com/cordiverse/cordis/master/README.md',
53
+ 'https://raw.githubusercontent.com/cordiverse/cordis/main/README.md') `
54
+ (Join-Path $dl 'github\cordis\README.md')
55
+ Download @('https://raw.githubusercontent.com/cordiverse/cordis/HEAD/package.json') `
56
+ (Join-Path $dl 'github\cordis\package.json')
57
+ Download @('https://api.github.com/repos/cordiverse/cordis') `
58
+ (Join-Path $dl 'github\cordis\repo.json') $ua
59
+
60
+ Download @('https://raw.githubusercontent.com/cordiverse/paper/HEAD/README.md',
61
+ 'https://raw.githubusercontent.com/cordiverse/paper/master/README.md',
62
+ 'https://raw.githubusercontent.com/cordiverse/paper/main/README.md') `
63
+ (Join-Path $dl 'github\paper\README.md')
64
+ Download @('https://api.github.com/repos/cordiverse/paper') `
65
+ (Join-Path $dl 'github\paper\repo.json') $ua
66
+
67
+ Download @('https://raw.githubusercontent.com/deepseek-ai/deepseek-harness/HEAD/README.md',
68
+ 'https://raw.githubusercontent.com/deepseek-ai/deepseek-harness/master/README.md',
69
+ 'https://raw.githubusercontent.com/deepseek-ai/deepseek-harness/main/README.md') `
70
+ (Join-Path $dl 'github\harness\README.md')
71
+ Download @('https://api.github.com/repos/deepseek-ai/deepseek-harness') `
72
+ (Join-Path $dl 'github\harness\repo.json') $ua
73
+
74
+ # 官网与文档站入口页
75
+ Download @('https://www.deepseek.com/harness/','https://www.deepseek.com/harness','https://deepseek.com/harness/') `
76
+ (Join-Path $dl 'web\deepseek-com-harness.html')
77
+ Download @('https://deepseek-harness.github.io/deepseek-harness/sitemap.xml') `
78
+ (Join-Path $dl 'web\sitemap.xml')
79
+ Download @('https://deepseek-harness.github.io/deepseek-harness/develop/basic/') `
80
+ (Join-Path $dl 'web\develop-basic.html')
81
+
82
+ # ---------- Phase B: cordis 仓库全量 md 文档 ----------
83
+ $cordisBranch = Get-DefaultBranch (Join-Path $dl 'github\cordis\repo.json') 'master'
84
+ $treeFile = Join-Path $dl 'github\cordis\tree.json'
85
+ Download @("https://api.github.com/repos/cordiverse/cordis/git/trees/$cordisBranch`?recursive=1") $treeFile $ua
86
+ if (Test-Path $treeFile) {
87
+ try {
88
+ $t = Get-Content $treeFile -Raw | ConvertFrom-Json
89
+ $i = 0
90
+ foreach ($item in $t.tree) {
91
+ if ($item.type -ne 'blob') { continue }
92
+ if ($item.path -notmatch '\.(md|mdx)$') { continue }
93
+ $i++
94
+ if ($i -gt 120) { break }
95
+ $out = Join-Path $dl ("github\cordis\repo\" + ($item.path -replace '/','\'))
96
+ Download @("https://raw.githubusercontent.com/cordiverse/cordis/$cordisBranch/$($item.path)") $out
97
+ }
98
+ } catch { Log "FAIL`tparse-tree`t0`tcordis tree.json 解析失败" }
99
+ }
100
+
101
+ # ---------- Phase C: paper 仓库 md/tex ----------
102
+ $paperBranch = Get-DefaultBranch (Join-Path $dl 'github\paper\repo.json') 'master'
103
+ $ptreeFile = Join-Path $dl 'github\paper\tree.json'
104
+ Download @("https://api.github.com/repos/cordiverse/paper/git/trees/$paperBranch`?recursive=1") $ptreeFile $ua
105
+ if (Test-Path $ptreeFile) {
106
+ try {
107
+ $t = Get-Content $ptreeFile -Raw | ConvertFrom-Json
108
+ $i = 0
109
+ foreach ($item in $t.tree) {
110
+ if ($item.type -ne 'blob') { continue }
111
+ if ($item.path -notmatch '\.(md|tex|bib|typ|pdf)$') { continue }
112
+ $i++
113
+ if ($i -gt 60) { break }
114
+ $out = Join-Path $dl ("github\paper\repo\" + ($item.path -replace '/','\'))
115
+ Download @("https://raw.githubusercontent.com/cordiverse/paper/$paperBranch/$($item.path)") $out
116
+ }
117
+ } catch { Log "FAIL`tparse-tree`t0`tpaper tree.json 解析失败" }
118
+ }
119
+
120
+ # ---------- Phase D: GitHub Pages 全站爬取 ----------
121
+ $siteBase = 'https://deepseek-harness.github.io/deepseek-harness/'
122
+ $docRoot = $DocRoot
123
+ $routes = New-Object System.Collections.Generic.HashSet[string]
124
+
125
+ function SitePath([string]$rel) {
126
+ $p = $rel -replace '\.zh\.md$','' -replace '\.md$',''
127
+ $p = $p -replace '\\','/'
128
+ if ($p -match '/index$') { $p = $p -replace '/index$','' }
129
+ return $p
130
+ }
131
+
132
+ Get-ChildItem (Join-Path $docRoot 'user') -Recurse -Filter *.md | ForEach-Object {
133
+ $rel = $_.FullName.Substring((Join-Path $docRoot 'user').Length + 1)
134
+ [void]$routes.Add((SitePath $rel))
135
+ }
136
+ Get-ChildItem (Join-Path $docRoot 'cordis-tutorial') -Filter *.md | ForEach-Object {
137
+ [void]$routes.Add('develop/cordis-tutorial/' + (SitePath $_.Name))
138
+ }
139
+ Get-ChildItem (Join-Path $docRoot 'subsystems') -Filter *.md | ForEach-Object {
140
+ $n = SitePath $_.Name
141
+ [void]$routes.Add($(if ($_.BaseName -eq 'README') { 'reference/subsystems' } else { "reference/subsystems/$n" }))
142
+ }
143
+ @('architecture','cordis-primer','capability-seams','agent-lifecycle','tool-execution-pipeline','config-catalog','tool-catalog','persistence-catalog') | ForEach-Object {
144
+ [void]$routes.Add("reference/$_")
145
+ }
146
+ Get-ChildItem (Join-Path $docRoot 'cordis-api') -Filter *.md | ForEach-Object {
147
+ [void]$routes.Add('reference/cordis-api/' + (SitePath $_.Name))
148
+ }
149
+ @('adding-a-package','adding-a-tool','adding-an-llm-adapter','extension-cookbook','adding-a-conversation-node') | ForEach-Object {
150
+ [void]$routes.Add("reference/cookbook/$_")
151
+ }
152
+
153
+ $siteCount = 0
154
+ foreach ($r in $routes) {
155
+ foreach ($loc in @('','en/')) {
156
+ $rel = $loc + $r
157
+ $url = $siteBase + $rel
158
+ $fname = $rel -replace '/','\'
159
+ if ($fname -eq '') { $fname = 'index' }
160
+ $out = Join-Path $dl ("web\site\$fname.html")
161
+ Do-Curl $url $out | Out-Null
162
+ $siteCount++
163
+ }
164
+ }
165
+ Log "INFO`t-`t$siteCount`tpages attempted`tghpages crawl"
166
+
167
+ # ---------- Phase E: 社区仓库 README ----------
168
+ $community = @(
169
+ @('AdamPlatin123','awesome-dsh-plugins'),
170
+ @('omdsh-dev','dsh-plugin-dev'),
171
+ @('omdsh-dev','plugin-template'),
172
+ @('omdsh-dev','dsh-plugin-skills'),
173
+ @('vlln','plugin-registry'),
174
+ @('0xsline','awesome-deepseek-harness'),
175
+ @('awesome-dsh-plugin','awesome-dsh-plugin'),
176
+ @('Alex-Yanggg','awesome-DSH-plugin'),
177
+ @('bruc3van','awesome-dsh-plugin'),
178
+ @('Dominic789654','awesome-deepseek-harness'),
179
+ @('hikariming','dshfind'),
180
+ @('dsh-external','hub'),
181
+ @('titanwings','colleague-skill')
182
+ )
183
+ foreach ($pair in $community) {
184
+ $owner = $pair[0]; $repo = $pair[1]
185
+ Download @("https://raw.githubusercontent.com/$owner/$repo/HEAD/README.md",
186
+ "https://raw.githubusercontent.com/$owner/$repo/master/README.md",
187
+ "https://raw.githubusercontent.com/$owner/$repo/main/README.md") `
188
+ (Join-Path $dl "community\$repo.md")
189
+ Download @("https://api.github.com/repos/$owner/$repo") `
190
+ (Join-Path $dl "community\$repo.json") $ua
191
+ }
192
+
193
+ # ---------- Phase F: manifest ----------
194
+ Set-Content -Path (Join-Path $dl 'manifest.tsv') -Value $manifest -Encoding UTF8
195
+ Write-Output ("DONE: " + $manifest.Count + " 条记录 -> " + (Join-Path $dl 'manifest.tsv'))
@@ -0,0 +1,91 @@
1
+ # dsh-plugin-guide 话题快照生成脚本
2
+ # 用途: 抓取 GitHub topic:dsh-plugin 全量仓库清单,产出与 sources.md §D.2 记录一致的快照目录
3
+ # <OutDir>/raw-github-api-page-<n>.json + repos.tsv + README.md(全量表)
4
+ # 用法: pwsh -File scripts/gen-topic-snapshot.ps1 -OutDir <路径> [-PerPage 100] [-MaxPages 10] [-DelaySeconds 6]
5
+ # 说明: 走 GitHub Search API(未认证 10 次/分钟、分页上限 1000 条),分页抓取、按 full_name 去重、按 star 降序;
6
+ # 提供 $env:GH_TOKEN / -Token 后限速提到 30 次/分钟且更稳定。
7
+ # 传输用 Invoke-WebRequest(PS 5.1 下 curl 数组参数的引号拆分会把 -H 头打碎——已规避)。
8
+ # 与 08-13/08-14 各期快照同构,便于续期对比(新增/消失仓库用 repos.tsv diff)。
9
+ param(
10
+ [Parameter(Mandatory=$true)][string]$OutDir,
11
+ [int]$PerPage = 100,
12
+ [int]$MaxPages = 10,
13
+ [int]$DelaySeconds = 6,
14
+ [string]$Token = $env:GH_TOKEN
15
+ )
16
+ $ErrorActionPreference = 'Stop'
17
+ $ProgressPreference = 'SilentlyContinue'
18
+ New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
19
+
20
+ $headers = @{ 'User-Agent' = 'dsh-plugin-guide-research'; 'Accept' = 'application/vnd.github+json' }
21
+ if ($Token) { $headers['Authorization'] = "Bearer $Token" }
22
+
23
+ $all = @()
24
+ $total = -1
25
+ for ($p = 1; $p -le $MaxPages; $p++) {
26
+ $r = $null
27
+ for ($a = 0; $a -lt 3 -and $null -eq $r; $a++) {
28
+ try {
29
+ $resp = Invoke-WebRequest -Uri "https://api.github.com/search/repositories?q=topic:dsh-plugin&per_page=$PerPage&page=$p" -Headers $headers -TimeoutSec 45 -UseBasicParsing
30
+ $r = $resp.Content | ConvertFrom-Json
31
+ } catch { Start-Sleep -Seconds 3 }
32
+ }
33
+ if ($null -eq $r) { Write-Output "page ${p} FAILED (after retries)"; break }
34
+ if ($r.PSObject.Properties.Name -contains 'message') { Write-Output "page ${p}: API message $($r.message)"; break }
35
+ if (@($r.items).Count -eq 0) { Write-Output "page ${p}: no items (end)"; break }
36
+ $total = $r.total_count
37
+ $all += @($r.items)
38
+ $raw = Join-Path $OutDir "raw-github-api-page-$p.json"
39
+ $r | ConvertTo-Json -Depth 6 | Set-Content $raw -Encoding UTF8
40
+ Write-Output "page ${p}: total=$($r.total_count) items=$(@($r.items).Count)"
41
+ Start-Sleep -Seconds $DelaySeconds
42
+ if ($all.Count -ge $total -or @($r.items).Count -lt $PerPage) { break }
43
+ }
44
+
45
+ $uniq = @{}
46
+ foreach ($i in $all) { if (-not $uniq.ContainsKey($i.full_name)) { $uniq[$i.full_name] = $i } }
47
+ $rows = @($uniq.Values | Sort-Object -Property stargazers_count -Descending)
48
+
49
+ $tsv = @("full_name`tstars`tlanguage`tlicense`tarchived`tpushed_at`tdescription")
50
+ foreach ($i in $rows) {
51
+ $desc = ($i.description -replace "[\r\n\t]", ' ')
52
+ $tsv += "{0}`t{1}`t{2}`t{3}`t{4}`t{5}`t{6}" -f $i.full_name, $i.stargazers_count, $i.language, $i.license.spdx_id, $i.archived, $i.pushed_at, $desc
53
+ }
54
+ Set-Content -Path (Join-Path $OutDir 'repos.tsv') -Value ($tsv -join "`r`n") -Encoding UTF8
55
+
56
+ $utc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mmZ')
57
+ $L = @()
58
+ $L += '# DeepSeek Harness `dsh-plugin` 话题全量清单'
59
+ $L += ''
60
+ $L += '> 数据来源:GitHub Search API `q=topic:dsh-plugin`(公开话题页 <https://github.com/topics/dsh-plugin>)。'
61
+ $L += "> 抓取时间:$utc(UTC)。API total_count $total;本清单去重收录 $($rows.Count) 个。"
62
+ $L += '> 注意:Search API 分页上限 1000 条,去重数与 total_count 都要记录(见 sources.md §D.2 惯例)。'
63
+ $L += ''
64
+ $L += '## 元信息'
65
+ $L += ''
66
+ $L += '| 项目 | 值 |'
67
+ $L += '|---|---|'
68
+ $L += '| 话题 | [dsh-plugin](https://github.com/topics/dsh-plugin) |'
69
+ $L += "| 仓库总数 | $($rows.Count)(API total_count $total) |"
70
+ $L += "| 抓取时间 (UTC) | $utc |"
71
+ $L += '| 排序 | star 数降序 |'
72
+ $L += ''
73
+ $L += '## 全量清单(按 star 排序)'
74
+ $L += ''
75
+ $L += '| # | 仓库 | ⭐ | 语言 | 许可 | 归档 | 功能 / 效果(官方描述) | 最近推送 (UTC) | 话题标签 |'
76
+ $L += '|---|------|----|------|------|------|----------------|----------------|----------|'
77
+ $n = 0
78
+ foreach ($i in $rows) {
79
+ $n++
80
+ $name = $i.full_name
81
+ $stars = $i.stargazers_count
82
+ $lang = $i.language
83
+ $lic = if ($i.license) { $i.license.spdx_id } else { '-' }
84
+ $arch = if ($i.archived) { '是' } else { '否' }
85
+ $desc = ($i.description -replace '\|','\|' -replace "[\r\n]", ' ')
86
+ $push = $i.pushed_at
87
+ $topics = if ($i.topics) { ($i.topics -join ', ') } else { '' }
88
+ $L += "| $n | [$name](https://github.com/$name) | $stars | $lang | $lic | $arch | $desc | $push | $topics |"
89
+ }
90
+ Set-Content -Path (Join-Path $OutDir 'README.md') -Value ($L -join "`r`n") -Encoding UTF8
91
+ Write-Output "DONE: $($rows.Count) unique repos -> $OutDir (README/repos.tsv/raw pages)"
@@ -0,0 +1,63 @@
1
+ # dsh-plugin-guide skill installer.
2
+ # Purpose: copy the KB (excluding generated/local-only parts) into an agent skill directory and verify byte parity.
3
+ # Usage: pwsh -File scripts/install-skill.ps1 -Target <skill-dir> [-Source <kb-root>]
4
+ # Scope: SKILL.md, guide/, references/ (incl. official-docs), scripts/, README*.md, LICENSE, NOTICE.md, CONTRIBUTING.md, SECURITY.md.
5
+ # Excluded: downloads/ (generated by scripts), .github/ (CI), .gitignore.
6
+ # Target must be the skill directory itself (e.g. ~/.deepseek/skills/dsh-plugin-guide or <project>/.agents/skills/dsh-plugin-guide).
7
+ param(
8
+ [Parameter(Mandatory=$true)][string]$Target,
9
+ [string]$Source = ''
10
+ )
11
+ $ErrorActionPreference = 'Stop'
12
+ if (-not $Source) { $Source = Split-Path $PSScriptRoot -Parent }
13
+ $src = (Resolve-Path $Source).Path
14
+ $top = @('SKILL.md','LICENSE','NOTICE.md','CONTRIBUTING.md','SECURITY.md') + @(Get-ChildItem $src -Filter 'README*.md' -File | ForEach-Object { $_.Name })
15
+ $dirs = @('guide','references','scripts')
16
+
17
+ New-Item -ItemType Directory -Force -Path $Target | Out-Null
18
+
19
+ foreach ($f in $top) { Copy-Item (Join-Path $src $f) (Join-Path $Target $f) -Force }
20
+ foreach ($d in $dirs) {
21
+ # Copy-Item -Recurse into an existing directory would nest the source inside it; replace the owned dir instead.
22
+ $td = Join-Path $Target $d
23
+ if (Test-Path $td) { Remove-Item $td -Recurse -Force }
24
+ Copy-Item (Join-Path $src $d) $td -Recurse -Force
25
+ }
26
+
27
+ # Prune target files under the owned scope that no longer exist in the source (keeps reinstalls clean).
28
+ foreach ($d in $dirs) {
29
+ $td = Join-Path $Target $d
30
+ if (Test-Path $td) {
31
+ $sd = Join-Path $src $d
32
+ $sRoot = (Resolve-Path $sd).Path
33
+ $tRoot = (Resolve-Path $td).Path
34
+ Get-ChildItem -Recurse -File $td | ForEach-Object {
35
+ $rel = $_.FullName.Substring($tRoot.Length + 1)
36
+ if (-not (Test-Path (Join-Path $sRoot $rel))) { Remove-Item $_.FullName -Force }
37
+ }
38
+ }
39
+ }
40
+ Get-ChildItem $Target -File -ErrorAction SilentlyContinue | ForEach-Object {
41
+ if (($_.Name -like 'README*.md' -or $top -contains $_.Name) -and -not (Test-Path (Join-Path $src $_.Name))) { Remove-Item $_.FullName -Force }
42
+ }
43
+
44
+ # Parity report: every scoped source file must exist in the target byte-for-byte.
45
+ $checked = 0; $mismatch = 0
46
+ foreach ($f in $top) {
47
+ $s = Join-Path $src $f; $t = Join-Path $Target $f
48
+ if (Test-Path $t) { $checked++; if ((Get-FileHash $s -Algorithm MD5).Hash -ne (Get-FileHash $t -Algorithm MD5).Hash) { $mismatch++; Write-Output "MISMATCH: $f" } }
49
+ else { $mismatch++; Write-Output "MISSING-TARGET: $f" }
50
+ }
51
+ foreach ($d in $dirs) {
52
+ $sd = Join-Path $src $d
53
+ $sRoot = (Resolve-Path $sd).Path
54
+ Get-ChildItem -Recurse -File $sd | ForEach-Object {
55
+ $rel = $_.FullName.Substring($sRoot.Length + 1)
56
+ $t = Join-Path (Join-Path $Target $d) $rel
57
+ if (Test-Path $t) { $checked++; if ((Get-FileHash $_.FullName -Algorithm MD5).Hash -ne (Get-FileHash $t -Algorithm MD5).Hash) { $mismatch++; Write-Output "MISMATCH: $d\$rel" } }
58
+ else { $mismatch++; Write-Output "MISSING-TARGET: $d\$rel" }
59
+ }
60
+ }
61
+ Write-Output "DONE: $checked scoped files verified, $mismatch mismatches -> $Target"
62
+ if ($mismatch -gt 0) { exit 1 }
63
+ exit 0
@@ -0,0 +1,130 @@
1
+ # dsh-plugin-guide official-docs sync script.
2
+ # Purpose: sync the deepseek-harness checkout's official docs into references/official-docs/ (verbatim copy).
3
+ # Source is pinned to origin/master (HEAD fallback): untracked drafts and unpushed commits in the checkout never enter the KB.
4
+ # Output: references/official-docs/SNAPSHOT.md (source ref/SHA, sync time, file counts - the freshness authority for READMEs).
5
+ # Usage: pwsh -File scripts/sync-official-docs.ps1 [-Checkout <path>] [-SkipGit]
6
+ # Verify: pwsh -File scripts/verify-kit.ps1 -Checkout <path> # drift report KB vs checkout (tracked files only)
7
+ param(
8
+ [string]$Checkout = 'D:\deepseek-harness',
9
+ [switch]$SkipGit
10
+ )
11
+ $ErrorActionPreference = 'Stop'
12
+ $kit = Split-Path $PSScriptRoot -Parent
13
+ $dest = Join-Path $kit 'references\official-docs'
14
+
15
+ if (-not (Test-Path $Checkout)) { Write-Error "checkout not found: $Checkout"; exit 1 }
16
+
17
+ $gitOk = $false
18
+ if (-not $SkipGit) {
19
+ $gitOk = (& git -C $Checkout rev-parse --is-inside-work-tree 2>$null) -eq 'true'
20
+ }
21
+
22
+ $ref = 'filesystem'
23
+ $sha = ''
24
+ $pruned = 0
25
+ $mdCount = 0
26
+ $zhCount = 0
27
+
28
+ # Sync scope: docs/, root AGENTS.md/BENCHMARK.md/CLAUDE.md/CONTRIBUTING.*/README.zh.md/README.i18n.yaml/THIRD_PARTY_NOTICES.md/LICENSE, packages/AGENTS.md, examples/AGENTS.md, packages/README.md, vendor/README.md, website/docs.ts
29
+ # 上游 root README.md 不在此列:official-docs/README.md 是 KB 自有索引(上游英文 README 快照在 downloads/github/harness/README.md)。
30
+ # pathspec 全部用 :(top) 锚定,避免 git 的 basename 全局匹配把仓库深处的同名 symlink(如各处 CLAUDE.md)误收进归档。
31
+ $paths = @(':(top)docs', ':(top)AGENTS.md', ':(top)BENCHMARK.md', ':(top)CONTRIBUTING.md', ':(top)CONTRIBUTING.zh.md', ':(top)CONTRIBUTING.i18n.yaml', ':(top)README.zh.md', ':(top)README.i18n.yaml', ':(top)THIRD_PARTY_NOTICES.md', ':(top)LICENSE', ':(top)packages/AGENTS.md', ':(top)examples/AGENTS.md', ':(top)packages/README.md', ':(top)vendor/README.md', ':(top)website/docs.ts')
32
+
33
+ if ($gitOk) {
34
+ # Prefer origin/master, fall back to HEAD - never the working tree (may contain untracked/unpushed content).
35
+ if ((& git -C $Checkout rev-parse --verify -q origin/master 2>$null)) { $ref = 'origin/master' } else { $ref = 'HEAD' }
36
+ $sha = (& git -C $Checkout rev-parse $ref).Trim()
37
+
38
+ $tmp = Join-Path ([System.IO.Path]::GetTempPath()) ("dsh-official-docs-$sha.tar")
39
+ Remove-Item $tmp -Force -ErrorAction SilentlyContinue
40
+ & git -C $Checkout archive -o $tmp $ref -- $paths
41
+ if ($LASTEXITCODE -ne 0) { Write-Error "git archive failed (ref=$ref)"; exit 1 }
42
+
43
+ New-Item -ItemType Directory -Force -Path $dest | Out-Null
44
+ & tar -xf $tmp -C $dest
45
+ if ($LASTEXITCODE -ne 0) { Write-Error 'tar extraction failed'; exit 1 }
46
+ Remove-Item $tmp -Force
47
+
48
+ # CLAUDE.md 在上游是 symlink(指向 AGENTS.md,mode 120000);Windows tar 无法解出 symlink,
49
+ # 且 pathspec 'CLAUDE.md' 会 basename 匹配到仓库深处同名 symlink,故不在 $paths 中——解包后按其
50
+ # symlink 目标文本落地同名普通文件(内容即上游 blob 原文)。
51
+ $claudeTarget = (& git -C $Checkout cat-file -p "${ref}:CLAUDE.md" 2>$null | Select-Object -First 1)
52
+ if (-not $claudeTarget) { $claudeTarget = 'AGENTS.md' }
53
+ Set-Content -Path (Join-Path $dest 'CLAUDE.md') -Value $claudeTarget -Encoding UTF8
54
+
55
+ # website/docs.ts keeps its in-repo filename in the archive; move it to the KB's flat name.
56
+ if (Test-Path (Join-Path $dest 'website\docs.ts')) {
57
+ Copy-Item (Join-Path $dest 'website\docs.ts') (Join-Path $dest 'website-docs.ts') -Force
58
+ Remove-Item (Join-Path $dest 'website\docs.ts') -Force
59
+ Remove-Item (Join-Path $dest 'website') -Force -Recurse -ErrorAction SilentlyContinue
60
+ }
61
+
62
+ # 目的目录只保留范围内条目(清掉历史抽取残留/上游删除的根文件,保证逐字副本无污染)。
63
+ $rootKeep = @('docs','examples','packages','vendor','AGENTS.md','BENCHMARK.md','CLAUDE.md','CONTRIBUTING.md','CONTRIBUTING.zh.md','CONTRIBUTING.i18n.yaml','LICENSE','README.zh.md','README.i18n.yaml','THIRD_PARTY_NOTICES.md','SNAPSHOT.md','README.md','website-docs.ts')
64
+ Get-ChildItem -Force $dest | Where-Object { $rootKeep -notcontains $_.Name } | ForEach-Object {
65
+ Remove-Item $_.FullName -Recurse -Force; $pruned++
66
+ }
67
+ foreach ($sub in @('examples','packages','vendor')) {
68
+ $subDir = Join-Path $dest $sub
69
+ if (Test-Path $subDir) {
70
+ $subKeep = @()
71
+ if ($sub -eq 'examples') { $subKeep = @('AGENTS.md') }
72
+ if ($sub -eq 'packages') { $subKeep = @('AGENTS.md','README.md') }
73
+ if ($sub -eq 'vendor') { $subKeep = @('README.md') }
74
+ Get-ChildItem -Force -Directory $subDir -ErrorAction SilentlyContinue | ForEach-Object {
75
+ Remove-Item $_.FullName -Recurse -Force; $pruned++
76
+ }
77
+ Get-ChildItem -Force -File $subDir -ErrorAction SilentlyContinue | Where-Object { $subKeep -notcontains $_.Name } | ForEach-Object {
78
+ Remove-Item $_.FullName -Force; $pruned++
79
+ }
80
+ }
81
+ }
82
+
83
+ # Prune docs/ files that no longer exist in the source ref (a verbatim copy does not keep upstream-deleted content).
84
+ $tracked = New-Object System.Collections.Generic.HashSet[string]
85
+ foreach ($t in (& git -C $Checkout ls-tree -r --name-only $ref -- docs)) { [void]$tracked.Add($t.Replace('\','/')) }
86
+ $docsDir = Join-Path $dest 'docs'
87
+ if (Test-Path $docsDir) {
88
+ $docsRoot = (Resolve-Path $docsDir).Path
89
+ Get-ChildItem -Recurse -File $docsDir | ForEach-Object {
90
+ $rel = 'docs/' + $_.FullName.Substring($docsRoot.Length + 1).Replace('\','/')
91
+ if (-not $tracked.Contains($rel)) { Remove-Item $_.FullName -Force; $pruned++ }
92
+ }
93
+ }
94
+ } else {
95
+ Write-Output 'WARN: checkout is not a git repo (or -SkipGit) - copying the filesystem as-is; untracked files are not filtered and no pruning runs.'
96
+ foreach ($p in $paths) {
97
+ $rel = $p -replace '^:\(top\)','' # 去掉 pathspec 锚定前缀得到仓库内相对路径
98
+ $srcFull = Join-Path $Checkout ($rel -replace '/','\')
99
+ if (-not (Test-Path $srcFull)) { Write-Output "SKIP(source missing): $rel"; continue }
100
+ $target = Join-Path $dest ($rel -replace '/','\')
101
+ $tdir = Split-Path $target -Parent
102
+ if ($tdir -and -not (Test-Path $tdir)) { New-Item -ItemType Directory -Force -Path $tdir | Out-Null }
103
+ Copy-Item $srcFull $target -Recurse -Force
104
+ }
105
+ }
106
+
107
+ $mdCount = (Get-ChildItem -Recurse -File (Join-Path $dest 'docs') -Filter *.md).Count
108
+ $zhCount = (Get-ChildItem -Recurse -File (Join-Path $dest 'docs') -Filter *.zh.md).Count
109
+ $utc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
110
+ $L = @(
111
+ '# official-docs snapshot (SNAPSHOT.md)',
112
+ '',
113
+ '> Generated by `scripts/sync-official-docs.ps1`. This file is the single authority for how `references/official-docs/` lines up with upstream deepseek-harness.',
114
+ '> The "last verified" dates and commit SHAs in README/guide must cite this file; do not hand-edit them.',
115
+ '',
116
+ '| Item | Value |',
117
+ '|---|---|',
118
+ "| Source checkout | ``$Checkout`` |",
119
+ "| Source ref | ``$ref`` |",
120
+ "| Source commit | ``$sha`` |",
121
+ "| Synced at (UTC) | $utc |",
122
+ '| Scope | tracked files at the ref: `docs/`, root `AGENTS.md`, `BENCHMARK.md`, `CLAUDE.md`(symlink 目标文本), `CONTRIBUTING.md`/`.zh.md`/`.i18n.yaml`, `README.zh.md`/`.i18n.yaml`(上游英文 `README.md` 不在本目录,快照见 `downloads/github/harness/README.md`), `THIRD_PARTY_NOTICES.md`, `LICENSE`, `packages/AGENTS.md`, `examples/AGENTS.md`, `packages/README.md`, `vendor/README.md`, `website/docs.ts` |',
123
+ "| File counts | docs/: $mdCount md files ($zhCount .zh.md pairs) |",
124
+ "| Pruned this run | $pruned 个不在范围内/上游已删除的条目 |",
125
+ '',
126
+ 'Drift check: `pwsh -File scripts/verify-kit.ps1 -Checkout <checkout>` (tracked files only).'
127
+ )
128
+ Set-Content -Path (Join-Path $dest 'SNAPSHOT.md') -Value ($L -join "`r`n") -Encoding UTF8
129
+
130
+ Write-Output "DONE: ref=$ref sha=$sha pruned=$pruned -> $dest"