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,154 @@
1
+ # dsh-plugin-guide 官方 GitHub Discussions 归档脚本(可复跑,幂等)
2
+ # 输出: downloads/github/harness/discussions/
3
+ # list.json 全部讨论(title/body/category/answers/labels 等,正文即文档)
4
+ # comments-<n>.json 精选线程的全部评论(选择规则见下)
5
+ # _selection.tsv 精选线程清单
6
+ # README.md 分类统计 + 精选清单
7
+ # 说明: GitHub REST API;未提供 Token 时走匿名配额(60/h,可能不够),建议
8
+ # $env:GH_TOKEN 或 -Token <token>(经典 PAT,只需 public_repo 读权限)。
9
+ # 选择规则(与 08-14 首版覆盖度一致): Announcements 全部; Q&A/Ideas 评论>=1;
10
+ # General/Show and tell 评论>=3 且标题不含拉群/招聘/广告词。
11
+ # 传输用 Invoke-WebRequest(而非 curl.exe 数组参数): PS 5.1 下 curl 数组参数
12
+ # 的引号拆分会把 -H 头打碎,导致静默拿到错误对象——本脚本已规避该坑。
13
+ # 参数: -OutDir <dir> 覆盖输出目录; -SkipComments 只刷新 list.json 不拉评论。
14
+ param(
15
+ [string]$OutDir = '',
16
+ [string]$Repo = 'deepseek-ai/deepseek-harness',
17
+ [string]$Token = $env:GH_TOKEN,
18
+ [switch]$SkipComments
19
+ )
20
+ $ErrorActionPreference = 'Stop'
21
+ $ProgressPreference = 'SilentlyContinue'
22
+ if (-not $OutDir) { $OutDir = Join-Path (Split-Path $PSScriptRoot -Parent) 'downloads\github\harness\discussions' }
23
+ New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
24
+
25
+ $headers = @{ 'User-Agent' = 'dsh-plugin-guide-research'; 'Accept' = 'application/vnd.github+json' }
26
+ if ($Token) { $headers['Authorization'] = "Bearer $Token" }
27
+
28
+ function Get-Api([string]$url) {
29
+ # 返回对象数组;失败/限流时抛错(带状态码),由调用方决定重试或中止。
30
+ try {
31
+ $resp = Invoke-WebRequest -Uri $url -Headers $headers -TimeoutSec 60 -UseBasicParsing
32
+ } catch {
33
+ $code = if ($_.Exception.Response) { [int]$_.Exception.Response.StatusCode } else { 0 }
34
+ throw "HTTP $code : $url"
35
+ }
36
+ $obj = $null
37
+ try { $obj = $resp.Content | ConvertFrom-Json } catch { throw "JSON parse failed: $url" }
38
+ if ($obj -is [System.Management.Automation.PSCustomObject] -and $obj.PSObject.Properties.Name -contains 'message') {
39
+ throw "API message '$($obj.message)' : $url"
40
+ }
41
+ return @($obj)
42
+ }
43
+
44
+ # ---- 1) 全量 list(按创建序分页;REST 的 direction 参数对 discussions 无效,只能从头翻到尾) ----
45
+ $prevCount = 0
46
+ if (Test-Path (Join-Path $OutDir 'list.json')) {
47
+ try { $prev = @((Get-Content (Join-Path $OutDir 'list.json') -Raw -Encoding UTF8 | ConvertFrom-Json)); $prevCount = $prev.Count } catch { $prevCount = 0 }
48
+ }
49
+ $all = @()
50
+ $page = 1
51
+ while ($page -le 50) {
52
+ $items = Get-Api "https://api.github.com/repos/$Repo/discussions?per_page=100&page=$page&sort=created"
53
+ if ($items.Count -eq 0) { Write-Output "page ${page}: 空页,列表结束"; break }
54
+ $all += $items
55
+ Write-Output ("page {0}: +{1} (累计 {2})" -f $page, $items.Count, $all.Count)
56
+ if ($items.Count -lt 100) { break }
57
+ $page++
58
+ Start-Sleep -Milliseconds 500
59
+ }
60
+ if ($all.Count -eq 0) { throw 'discussions 列表抓取失败(0 条)' }
61
+ if ($prevCount -gt 0 -and $all.Count -lt [Math]::Floor($prevCount * 0.9)) {
62
+ throw "列表疑似缩水: 上次 $prevCount 条, 本次仅 $all.Count 条 —— 拒绝覆盖归档,请检查网络/配额后重跑"
63
+ }
64
+
65
+ # 按 number 去重(分页边界可能重复)
66
+ $uniq = @{}
67
+ foreach ($d in $all) { $uniq[[int]$d.number] = $d }
68
+ $discs = @($uniq.Values | Sort-Object { [int]$_.number })
69
+ $listPath = Join-Path $OutDir 'list.json'
70
+ $discs | ConvertTo-Json -Depth 6 | Set-Content -Path $listPath -Encoding UTF8
71
+ Write-Output "list.json: $($discs.Count) 条 -> $listPath"
72
+
73
+ # ---- 2) 精选线程 + 评论 ----
74
+ $sel = @()
75
+ foreach ($d in $discs) {
76
+ $cat = $d.category.name
77
+ $c = [int]$d.comments
78
+ $t = [string]$d.title
79
+ $pick = $false
80
+ if ($cat -eq 'Announcements') { $pick = $true }
81
+ elseif ($cat -eq 'Q&A' -and $c -ge 1) { $pick = $true }
82
+ elseif ($cat -eq 'Ideas' -and $c -ge 1) { $pick = $true }
83
+ elseif (($cat -eq 'General' -or $cat -eq 'Show and tell') -and $c -ge 3) {
84
+ # 非社群拉群帖: 标题含拉群/扫码/加群/招聘/广告类词的不收
85
+ if ($t -notmatch '群|扫码|加群|招聘|内推|广告|投简历|纳新') { $pick = $true }
86
+ }
87
+ if ($pick) { $sel += $d }
88
+ }
89
+ $sel = @($sel | Sort-Object { [int]$_.number })
90
+ Write-Output "精选线程: $($sel.Count) 条"
91
+
92
+ if (-not $SkipComments) {
93
+ $n = 0
94
+ foreach ($d in $sel) {
95
+ $num = [int]$d.number
96
+ $comments = @()
97
+ $cp = 1
98
+ while ($cp -le 20) {
99
+ $ci = Get-Api "https://api.github.com/repos/$Repo/discussions/$num/comments?per_page=100&page=$cp"
100
+ if ($ci.Count -eq 0) { break }
101
+ $comments += $ci
102
+ if ($ci.Count -lt 100) { break }
103
+ $cp++
104
+ Start-Sleep -Milliseconds 300
105
+ }
106
+ $comments | ConvertTo-Json -Depth 6 | Set-Content -Path (Join-Path $OutDir "comments-$num.json") -Encoding UTF8
107
+ $n++
108
+ if ($n % 20 -eq 0) { Write-Output "comments: $n / $($sel.Count)" }
109
+ Start-Sleep -Milliseconds 200
110
+ }
111
+ Write-Output "comments: 完成 $n 个线程"
112
+ # 清掉列表里已不存在的旧 comments 文件
113
+ $keep = New-Object System.Collections.Generic.HashSet[string]
114
+ foreach ($d in $sel) { [void]$keep.Add("comments-$([int]$d.number).json") }
115
+ Get-ChildItem $OutDir -Filter 'comments-*.json' | Where-Object { -not $keep.Contains($_.Name) } | Remove-Item -Force
116
+ } else {
117
+ Write-Output 'comments: 跳过(-SkipComments)'
118
+ }
119
+
120
+ # ---- 3) _selection.tsv 与 README.md ----
121
+ $selLines = @('number' + "`t" + 'category' + "`t" + 'comments' + "`t" + 'title')
122
+ foreach ($d in $sel) { $selLines += ("{0}`t{1}`t{2}`t{3}" -f $d.number, $d.category.name, $d.comments, ($d.title -replace "`t",' ')) }
123
+ Set-Content -Path (Join-Path $OutDir '_selection.tsv') -Value $selLines -Encoding UTF8
124
+
125
+ $cats = @{}
126
+ foreach ($d in $discs) { $k = [string]$d.category.name; if (-not $cats.ContainsKey($k)) { $cats[$k] = 0 }; $cats[$k]++ }
127
+ $utc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
128
+ $L = @()
129
+ $L += '# 官方 GitHub Discussions 归档(自动生成,见抓取时间)'
130
+ $L += ''
131
+ $L += '> 来源:https://github.com/deepseek-ai/deepseek-harness/discussions (官方仓库 Issues 关闭,Discussions 为反馈主渠道)。'
132
+ $L += '> 抓取:GitHub REST API(list 含每条正文;comments-<n>.json 为精选线程的全部评论)。'
133
+ $L += "> 更新:提供 ``GH_TOKEN`` 后可由 ``scripts/archive-discussions.ps1`` 幂等刷新;抓取时间 $utc (UTC)。"
134
+ $L += ''
135
+ $L += '## 文件'
136
+ $L += ''
137
+ $L += "- list.json — 全部 $($discs.Count) 条讨论(含 title/body/category/answers/labels 等字段,正文即模型可读文档)。"
138
+ $L += "- comments-<n>.json — 精选 $($sel.Count) 条线程的评论(选择规则:Announcements/Q&A/Ideas 评论>=1;General/Show and tell 评论>=3 且非社群拉群帖)。"
139
+ $L += '- _selection.tsv — 精选线程清单(编号/分类/评论数/标题)。'
140
+ $L += ''
141
+ $L += '## 分类统计'
142
+ $L += ''
143
+ foreach ($k in @($cats.Keys | Sort-Object)) { $L += "- $k:$($cats[$k]) 条" }
144
+ $L += ''
145
+ $L += '## 有归档评论的精选线程'
146
+ $L += ''
147
+ $L += '| # | 分类 | 评论 | 标题 |'
148
+ $L += '|---|---|---|---|'
149
+ foreach ($d in $sel) {
150
+ $title = ($d.title -replace '\|','\|' -replace "[\r\n]",' ')
151
+ $L += "| [#$($d.number)](https://github.com/deepseek-ai/deepseek-harness/discussions/$($d.number)) | $($d.category.name) | $($d.comments) | $title |"
152
+ }
153
+ Set-Content -Path (Join-Path $OutDir 'README.md') -Value ($L -join "`r`n") -Encoding UTF8
154
+ Write-Output "DONE: list=$($discs.Count) selected=$($sel.Count) -> $OutDir"
@@ -0,0 +1,188 @@
1
+ # dsh-plugin-guide 社区文章归档脚本(幂等:已存在且非空则跳过)
2
+ # 输出: downloads/web/community-articles/{zh,en,hn}/<slug>.html + _download.log + README.md
3
+ # 来源: downloads/_research/{chinese,english}-community-scan.md 中标 200 的 URL + 08-15 增量扫描线索。
4
+ # 已知反爬站(知乎/InfoQ/venturebeat/thenextweb/twitter/youtube/reddit/腾讯新闻 501 等)不在清单内,记录见两份扫描报告。
5
+ # 注意: PS 5.1 下 curl 的 -A/-o 参数若经变量数组传入会被拆词;本脚本用 Invoke-Expression
6
+ # 拼完整命令行字符串,引号在字符串内显式给出,规避该坑。
7
+ # 参数: -Force 强制全部重下; -Lang zh|en|hn 只处理某语言段。
8
+ param([switch]$Force, [string]$Lang = '')
9
+ $ErrorActionPreference = 'Continue'
10
+ $ProgressPreference = 'SilentlyContinue'
11
+
12
+ $kb = Split-Path $PSScriptRoot -Parent
13
+ $out = Join-Path $kb 'downloads\web\community-articles'
14
+ $ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0 Safari/537.36'
15
+ $curl = Get-Command curl.exe -ErrorAction SilentlyContinue
16
+ if (-not $curl) { $curl = "$env:SystemRoot\System32\curl.exe" } else { $curl = $curl.Source }
17
+
18
+ # slug => url(语言段前缀 zh:/en:/hn: 决定落盘目录)
19
+ $list = @(
20
+ # ---------- zh ----------
21
+ 'zh:cnblogs-pc2005-npm-publish = https://www.cnblogs.com/pc2005/p/22477987',
22
+ 'zh:cnblogs-qq8864-session-export = https://www.cnblogs.com/qq8864/articles/22476471',
23
+ 'zh:cnblogs-qq8864-plugin-vs-tool = https://www.cnblogs.com/qq8864/articles/22478648',
24
+ 'zh:csdn-yuqingteck-hello-tool = https://yuqingteck.blog.csdn.net/article/details/163735126',
25
+ 'zh:cnblogs-sing1ee-agent-loop = https://www.cnblogs.com/sing1ee/p/22479295',
26
+ 'zh:cnblogs-sing1ee-guide = https://www.cnblogs.com/sing1ee/p/22455466',
27
+ 'zh:cnblogs-knqiufan-context = https://www.cnblogs.com/knqiufan/p/22472410',
28
+ 'zh:cnblogs-foxcharon-install = https://www.cnblogs.com/foxcharon/p/22467976',
29
+ 'zh:cnblogs-pc2005-getting-started = https://www.cnblogs.com/pc2005/p/22477984',
30
+ 'zh:cnblogs-adgine-ai-engineering = https://www.cnblogs.com/adgine-ai/articles/22473232',
31
+ 'zh:cnblogs-itech-architecture = https://www.cnblogs.com/itech/p/22460843',
32
+ 'zh:cnblogs-isLinXu-analysis = https://www.cnblogs.com/isLinXu/p/22457058',
33
+ 'zh:csdn-damodev-monorepo = https://damodev.csdn.net/6a7dd787662f9a54cb9c6da0.html',
34
+ 'zh:51cto-v4pro-runtime = https://www.51cto.com/article/852965.html',
35
+ 'zh:51cto-blog-observability = https://blog.51cto.com/u_16175471/14797309',
36
+ 'zh:aliyun-first-tutorial = https://developer.aliyun.com/article/1755786',
37
+ 'zh:aliyun-everything-plugin = https://developer.aliyun.com/article/1755877',
38
+ 'zh:bibigpt-skill-video = https://bibigpt.co/zh/blog/posts/deepseek-harness-skill-ai-video-summary',
39
+ 'zh:aixq-visual-tutorial = https://www.aixq.cc/62178.html',
40
+ 'zh:qbitai-review = https://www.qbitai.com/2026/08/472208.html',
41
+ 'zh:zhidx-review = https://www.zhidx.com/p/584897.html',
42
+ 'zh:pingwest-review = https://www.pingwest.com/a/316436',
43
+ 'zh:dtinsight-review = https://www.dtinsight.com.cn/sys-nd/4072.html',
44
+ 'zh:v2ex-1234341-quickref = https://global.v2ex.co/t/1234341',
45
+ 'zh:v2ex-1234203 = https://global.v2ex.co/t/1234203',
46
+ 'zh:v2ex-1234320-tools-limit = https://global.v2ex.co/t/1234320',
47
+ 'zh:v2ex-1234424-shell = https://global.v2ex.co/t/1234424',
48
+ 'zh:v2ex-1234521-v4flash = https://global.v2ex.co/t/1234521',
49
+ 'zh:v2ex-1231389-pre-release = https://global.v2ex.co/t/1231389',
50
+ 'zh:v2ex-1214141-hiring = https://global.v2ex.co/t/1214141',
51
+ 'zh:36kr-black-whale = https://www.36kr.com/p/3938566998834308',
52
+ 'zh:jiemian-lego = https://www.jiemian.com/article/14922169.html',
53
+ 'zh:80aj-doc-reader = https://www.80aj.com/2026/08/14/agent-doc-reader-plugin/',
54
+ 'zh:80aj-vscode-search = https://www.80aj.com/2026/08/14/deepseek-vscode-plugin-search/',
55
+ 'zh:locdd-80299 = https://locdd.com/t/topic/80299/7',
56
+ 'zh:locdd-80207 = https://locdd.com/t/topic/80207',
57
+ 'zh:53ai-first-test = https://www.53ai.com/news/LargeLanguageModel/2026081423497.html',
58
+ 'zh:53ai-plugin-tutorial-0815 = https://www.53ai.com/news/OpenSourceLLM/2026081561375.html',
59
+ 'zh:csdn-zhuosj-black-whale = https://zhuosj.blog.csdn.net/article/details/163757323',
60
+ 'zh:csdn-aiutools-install = https://aiutools.blog.csdn.net/article/details/163758630',
61
+ 'zh:csdn-qq8864-plugin-tool = https://blog.csdn.net/qq8864/article/details/163760812',
62
+ 'zh:163-architecture = https://www.163.com/dy/article/L4AHS9B70518R7MO.html',
63
+ 'zh:163-install-tutorial = https://www.163.com/dy/article/L4AUJ7A305568W0A.html',
64
+ 'zh:qq-news-hot = https://news.qq.com/rain/a/20260814A048HD00',
65
+ 'zh:csdnnews-28k-star = https://csdnnews.blog.csdn.net/article/details/163747298',
66
+ 'zh:geekpark-50k = https://w.geekpark.net/news/368809',
67
+ 'zh:pedaily-investment = https://news.pedaily.cn/202608/567694.shtml',
68
+ 'zh:weibo-beta-share = https://weibo.com/2/detail/5331613565062839',
69
+ 'zh:csdn-aicoding-roles = https://aicoding.csdn.net/6a23863d662f9a54cb7a4fed.html',
70
+ 'zh:aitop100-v01 = https://www.aitop100.cn/infomation/details/34468.html',
71
+ 'zh:bilibili-BV1WmgF6qEMn = https://www.bilibili.com/video/BV1WmgF6qEMn/',
72
+ 'zh:bilibili-BV1iAgc6xEj7 = https://www.bilibili.com/video/BV1iAgc6xEj7/',
73
+ 'zh:bilibili-BV1KFgF6zEtk = https://www.bilibili.com/video/BV1KFgF6zEtk/',
74
+ 'zh:bilibili-BV1NKgw6VErB = https://www.bilibili.com/video/BV1NKgw6VErB/',
75
+ 'zh:bilibili-BV1o4gP6iEeo = https://www.bilibili.com/video/BV1o4gP6iEeo/',
76
+ 'zh:bilibili-BV1vugA6FERZ = https://www.bilibili.com/video/BV1vugA6FERZ/',
77
+ 'zh:bilibili-BV1VkgK6NEZS = https://www.bilibili.com/video/BV1VkgK6NEZS/',
78
+ 'zh:bilibili-BV1eDgW6QEFx = https://www.bilibili.com/video/BV1eDgW6QEFx/',
79
+ 'zh:bilibili-BV17ygc6tEE1 = https://www.bilibili.com/video/BV17ygc6tEE1/',
80
+ 'zh:21jingji-jiazi = https://www.21jingji.com/article/20260521/herald/d706e7b6130739114b8761d933f7e546.html',
81
+ 'zh:21jingji-wechat = https://m.21jingji.com/article/20260813/b78d3f9cd177ec3974c227ca1e9f7672.html',
82
+ 'zh:ithome-beta-plugins = https://www.ithome.com/0/989/446.htm',
83
+ 'zh:ai-indeed-timeline = https://www.ai-indeed.com/encyclopedia/29653.html',
84
+ 'zh:yijunzhao-guide = https://yijunzhao.cn/archives/deepseek-harness-getting-started-guide-first-agent-framework',
85
+ 'zh:gm7-install = https://www.gm7.org/archives/141339',
86
+ 'zh:zol-v01 = https://ai.zol.com.cn/1231/12318730.html',
87
+ 'zh:thepaper-three = https://www.thepaper.cn/newsDetail_forward_33785032',
88
+ 'zh:donews = https://www.donews.com/news/detail/1/6670751.html',
89
+ 'zh:chinaz-plugin = https://www.chinaz.com/ainews/30334.shtml',
90
+ 'zh:wsisp-80k = https://www.wsisp.com/helps/94702.html',
91
+ 'zh:eastmoney-black-whale = https://finance.eastmoney.com/a/202608123839370860.html',
92
+ 'zh:sina-whale = https://www.sina.cn/news/detail/5331578031178880.html',
93
+ 'zh:sina-wechat-account = https://www.sina.cn/news/detail/5331415036067930.html',
94
+ 'zh:tmtpost-beta = https://www.tmtpost.com/8083615.html',
95
+ 'zh:aihot-community = https://aihot.virxact.com/items/cmst6pn4b06aqro06xbl1wusy',
96
+ 'zh:aihot-openrouter-ori = https://aihot.virxact.com/items/cmstacm1202dzro0xv735yk7c',
97
+ 'zh:chaincatcher-beta = https://www.chaincatcher.com/article/2278625',
98
+ 'zh:baijing-harness = https://jishuzhan.baijing.cn/article/3251',
99
+ 'zh:sohu-28k = https://www.sohu.com/a/1062527577_115128',
100
+ 'zh:locdd-80821-qqbot = https://locdd.com/t/topic/80821',
101
+ # ---------- en ----------
102
+ 'en:rits-cordis = http://rits.shanghai.nyu.edu/ai/deepseek-harness-cordis-everything-is-a-plugin/',
103
+ 'en:devto-onsen-guide = https://dev.to/onsen/deepseek-harness-developer-preview-full-guide-ocm',
104
+ 'en:devto-reidmarlow-price = https://dev.to/reidmarlow/deepseeks-harness-is-the-price-signal-17bl',
105
+ 'en:agentpedia-v01 = https://agentpedia.codes/blog/deepseek-harness-v0-1-plugin-agent-guide',
106
+ 'en:explainx = https://explainx.ai/blog/deepseek-harness-v0-1-plugin-first-agent-stack-august-2026',
107
+ 'en:agentbreaking = https://agentbreaking.com/blog/deepseek-harness-open-source-agent-framework/',
108
+ 'en:xcmd-install = https://www.x-cmd.com/install/deepseek-harness/',
109
+ 'en:dsh-index = https://dsh-index.xlings.org',
110
+ 'en:xlings-dsh = https://openxlings.github.io/xim-pkgindex/en/packages/dsh/',
111
+ 'en:36kr-en-minecraft = https://eu.36kr.com/en/p/3938774780263814',
112
+ 'en:36kr-en-blackwhale = https://eu.36kr.com/en/p/3938566998834308',
113
+ 'en:36kr-en-selfevolution = https://eu.36kr.com/en/p/3938795963137411',
114
+ 'en:ollama-integration = https://docs.ollama.com/integrations/deepseek-harness',
115
+ 'en:aiengineerguide = https://aiengineerguide.com/til/deepseek-harness/',
116
+ 'en:julian-goldie = https://aisuccesslabjuliangoldie.com/blog/deepseek-harness/',
117
+ 'en:gigazine-en = https://gigazine.net/gsc_news/en/20260814-deepseek-harness-v0-1',
118
+ 'en:aibase-en = https://www.aibase.com/news/30334',
119
+ 'en:pandaily-preview = https://pandaily.com/deepseek-harness-developer-preview-everything-is-a-plugin-black-whale-aug2026',
120
+ 'en:edgen-300plugins = https://www.edgen.tech/en/news/post/deepseek-harness-enters-agent-market-with-300-plugins-challenging-codex',
121
+ 'en:tmtpost-en = https://en.tmtpost.com/news/7995741',
122
+ 'en:pandaily-funding = https://pandaily.com/deepseek-funding-expansion-hiring-harness',
123
+ 'en:essamamdani = https://essamamdani.com/blog/deepseek-harness-plugin-first-agent-stack-2026',
124
+ 'en:openrouter-ori = https://openrouter.ai/docs/guides/ori/harness',
125
+ 'en:digg-webui-x = https://digg.com/tech/7fx4ofvh',
126
+ 'en:digg-devs-beta = https://digg.com/tech/silt5bft',
127
+ 'en:news-eink = https://news.e-ink.me/en/archive/2026-08-13/article/deepseek-harness-developer-preview',
128
+ 'en:tipranks-openrouter = https://fastly.tipranks.com/news/private-companies/openrouter-expands-ai-model-orchestration-with-ori-deepseek-harness-integration',
129
+ 'en:webgate-mit = https://web.gate.it/zh/news/detail/deepseek-open-sources-harness-v01-under-the-mit-license-rivaling-claude-23440280',
130
+ 'en:blockbeats-v4pro = https://en.theblockbeats.news/flash/361500',
131
+ 'en:runtimewire-harness = https://runtimewire.com/article/deepseek-open-sources-agent-harness-v4-pro-api-price-hike',
132
+ 'en:digitalapplied-harness = https://www.digitalapplied.com/blog/deepseek-harness-open-source-agent-framework-2026',
133
+ 'en:digitalapplied-v4pro-ga = https://www.digitalapplied.com/blog/deepseek-v4-pro-ga-official-release-2026',
134
+ 'en:afbytes-venturebeat-mirror = https://afbytes.com/news/article/rss:f2c63a396b39d3537b5fd16ac4f5ca04f9574ad53febab5a97db5852c6/deepseek-harness-launches-as-open-source-rival-to-claude-code-alongside-v4-pro-on-api-with-higher-prices',
135
+ # ---------- hn ----------
136
+ 'hn:49286003-cordis = https://hn.edgecompute.app/item/49286003',
137
+ 'hn:49287821-xcmd = https://hn.edgecompute.app/item/49287821',
138
+ 'hn:49294357-dshindex = https://hn.edgecompute.app/item/49294357',
139
+ 'hn:49291049-xlings = https://hn.edgecompute.app/item/49291049',
140
+ 'hn:49291893-jellyball = https://hn.edgecompute.app/item/49291893',
141
+ 'hn:49285244-main = https://hn.edgecompute.app/item/49285244',
142
+ 'hn:49285620-twitter-post = https://hn.edgecompute.app/item/49285620'
143
+ )
144
+
145
+ $log = New-Object System.Collections.Generic.List[string]
146
+ $counts = @{}
147
+ foreach ($entry in $list) {
148
+ $lang, $rest = $entry -split ':', 2
149
+ $slug, $url = $rest -split '=', 2
150
+ $slug = $slug.Trim(); $url = $url.Trim()
151
+ if ($Lang -and $lang -ne $Lang) { continue }
152
+ $dir = Join-Path $out $lang
153
+ New-Item -ItemType Directory -Force -Path $dir | Out-Null
154
+ $file = Join-Path $dir ($slug + '.html')
155
+ if (-not $Force -and (Test-Path $file) -and (Get-Item $file).Length -gt 500) {
156
+ $log.Add("SKIP`t$lang/$slug"); continue
157
+ }
158
+ $cmd = "& '$curl' -sSL --connect-timeout 10 --max-time 30 -A `"$ua`" -o `"$file`" `"$url`""
159
+ try { Invoke-Expression $cmd | Out-Null } catch { $log.Add("FAIL`t$lang/$slug`tinvoke-error"); continue }
160
+ if (Test-Path $file) {
161
+ $len = (Get-Item $file).Length
162
+ if ($len -gt 500) { $log.Add("OK`t$lang/$slug`t$len bytes") }
163
+ else { Remove-Item $file -Force; $log.Add("FAIL`t$lang/$slug`ttoo-small($len)") }
164
+ } else { $log.Add("FAIL`t$lang/$slug`tno-file") }
165
+ }
166
+ foreach ($l in @('zh','en','hn')) {
167
+ $d = Join-Path $out $l
168
+ if (Test-Path $d) { $counts[$l] = (Get-ChildItem $d -Filter *.html -File).Count }
169
+ }
170
+ $log | Set-Content (Join-Path $out '_download.log') -Encoding UTF8
171
+
172
+ $utc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mmZ')
173
+ $L = @()
174
+ $L += '# 社区文章归档(HTML 快照)'
175
+ $L += ''
176
+ $L += "> 抓取: $utc (UTC) via scripts/download-community-articles.ps1(幂等,-Force 全量重下)。"
177
+ $L += '> 反爬/需浏览器站点(知乎/InfoQ/venturebeat/TNW/Twitter/YouTube/Reddit 等)不在清单,线索见 downloads/_research/*-community-scan.md。'
178
+ $L += ''
179
+ $L += '| 语言段 | 篇数 |'
180
+ $L += '|---|---|'
181
+ foreach ($l in @('zh','en','hn')) { $L += "| $l/ | $($counts[$l]) |" }
182
+ $L += ''
183
+ $L += '## 归档明细'
184
+ $L += ''
185
+ $L += '见 _download.log(OK/SKIP/FAIL + 字节数)。'
186
+ Set-Content -Path (Join-Path $out 'README.md') -Value ($L -join "`r`n") -Encoding UTF8
187
+ Write-Output ("DONE: zh={0} en={1} hn={2} -> {3}" -f $counts['zh'], $counts['en'], $counts['hn'], $out)
188
+ $log | Write-Output
@@ -0,0 +1,232 @@
1
+ # 社区插件开发相关仓库全量下载(tarball)脚本
2
+ # 输出: dsh-plugin-guide/downloads/community-repos/<repo>/
3
+ # 刷新策略: codeload HEAD 请求的 ETag 对比(内容变更即重新下载);记录在 downloads/community-repos/_heads.tsv。
4
+ # 传输: 纯 curl + codeload(main -> master -> HEAD 分支回退),不消耗 GitHub API 配额,也不依赖 git 进程。
5
+ # 参数: -Force 忽略 ETag 对比,强制全部重下; -Slice <n> -Slices <m> 只处理第 n/m 段(1-based),
6
+ # 此时日志与 heads 写入 _download.s<n>.log / _heads.s<n>.tsv,由调用方自行合并。
7
+ param([switch]$Force, [int]$Slice = 0, [int]$Slices = 1, [switch]$OnlyMissing)
8
+ $ErrorActionPreference = 'Continue'
9
+ $ProgressPreference = 'SilentlyContinue'
10
+
11
+ $kb = Split-Path $PSScriptRoot -Parent
12
+ $dl = Join-Path $kb 'downloads\community-repos'
13
+ New-Item -ItemType Directory -Force -Path $dl | Out-Null
14
+
15
+ # 后台/受限环境 PATH 可能缺失 curl/tar:逐一下落
16
+ $curl = Get-Command curl.exe -ErrorAction SilentlyContinue
17
+ if (-not $curl) { if (Test-Path "$env:SystemRoot\System32\curl.exe") { $curl = "$env:SystemRoot\System32\curl.exe" } else { $curl = 'curl.exe' } }
18
+ $tar = Get-Command tar.exe -ErrorAction SilentlyContinue
19
+ if (-not $tar) { if (Test-Path "$env:SystemRoot\System32\tar.exe") { $tar = "$env:SystemRoot\System32\tar.exe" } else { $tar = 'tar.exe' } }
20
+
21
+ $repos = @(
22
+ # 第一批:08-13/14 首批深读的 15 个插件开发仓库
23
+ 'omdsh-dev/plugin-template',
24
+ 'omdsh-dev/dsh-plugin-skills',
25
+ 'omdsh-dev/dsh-plugin-dev',
26
+ 'vlln/plugin-registry',
27
+ 'omdsh-dev/fabric',
28
+ 'whyihaveyou/dsh-suite',
29
+ 'omdsh-dev/dsh-plugin-check',
30
+ 'Opr4Mp3r/deepseek-harness-plugin-from-scratch',
31
+ 'randerous/dsh-turn-meta',
32
+ 'bobleer/deepseek-harness-plugin-mcp',
33
+ 'Nagi-ovo/dsh-find-plugins',
34
+ 'omdsh-dev/dsh-hub-workshop',
35
+ 'AdamPlatin123/awesome-dsh-plugins',
36
+ 'bruc3van/awesome-dsh-plugin',
37
+ 'Alex-Yanggg/awesome-DSH-plugin',
38
+ # 第二批:08-14 上午清单(awesome/市场/候选,此前未归档)
39
+ 'walkinglabs/awesome-deepseek-harness-plugins',
40
+ 'vvlife/awesome-deepseek-harness-plugins',
41
+ 'cccakeee/awesome-dsh-plugins',
42
+ 'bradeGithub/DSH-Plugins-Marketplace',
43
+ 'Toukaiteio/dsh-plugin-installer',
44
+ 'Scorp1o117/dsh-plugin-marketplace',
45
+ 'NanmiCoder/dsh-agent-teams',
46
+ 'vibeinging/dsh-tool-search',
47
+ 'zhu1090093659/dsh-web-ui',
48
+ 'ccch1mneyyy/dsh-cc-tui',
49
+ 'dataelement/dsh-desktop',
50
+ 'hust-open-atom-club/oh-dsh-desktop',
51
+ 'lhh010/dsh-bash-encoding',
52
+ 'Nagi-ovo/dsh-visualize',
53
+ # 第三批:08-14 晚间 GitHub 生态扫描(高优先级 26 个文档型仓库)
54
+ 'flaqai/deepeseek-harness-guide',
55
+ 'Electricitysheep/dsh-handbook',
56
+ 'JingHao-Leon/deepseek-harness-guide',
57
+ 'flysheep-ai/learn_deepseek_harness',
58
+ 'pingfanfan/hello-dsh',
59
+ 'LaplaceYoung/dsh-book-deepseek-harness',
60
+ 'yanhua1010/dsh-harness-tutorial',
61
+ 'hoco-scy/deepseek-harness-deep-dive',
62
+ 'libukai/awesome-deepseek-harness',
63
+ 'sandbaseai/deepseek-harness-handbook',
64
+ 'openma-ai/deepseek-harness-typescript-sdk',
65
+ 'h565656445/dsh-llm-agent-harness-guide',
66
+ 'h565656445/dsh-agent-os-worker-protocol',
67
+ 'cyanseek/dsh-native-playbook',
68
+ 'whyihaveyou/dsh-plugin-tutorial',
69
+ 'DumplingHuman/dsh-plugin-tutorial',
70
+ 'anweat/dsh-plugin-dev-guide',
71
+ 'Hubert-hwk/dsh-for-humans',
72
+ 'yangl326-Dylan/learning-dsh',
73
+ 'curtiseng/cordis-course',
74
+ 'THU-MAIC/dsh-openmaic',
75
+ 'qomob/DSHwiki',
76
+ 'calderbuild/awesome-deepseek-harness',
77
+ 'njdldkl666699/dsh-learning',
78
+ 'Loner1024/deepseek-harness-sdk-rs',
79
+ 'dshworks/howto-dsh',
80
+ # 第四批:skill 集合/契约规范/含实质开发知识(中优先级 19 个)
81
+ 'dhicoc/dsh-reverse-skill',
82
+ 'phoenixlucky/zerotoken-skill',
83
+ 'unknowbug/anchorlaw',
84
+ 'w2112515/dsh-plugin-development',
85
+ 'OneZero-Y/dsh-plugin-kit',
86
+ 'akira399/dsh-plugin-publisher',
87
+ 'LeslieWylie/dsh-plugin-release',
88
+ 'LeslieWylie/dsh-benchmark-evidence',
89
+ 'LeslieWylie/dsh-agent-orchestration',
90
+ 'dongsheng123132/task-passport',
91
+ 'Tostoevsky/TsienHsueShen',
92
+ 'Whning0513/awesome-deepseek-skills',
93
+ 'Jesse-njx/dsh-skillport',
94
+ 'green-dalii/dsh-plugin-dev-skill',
95
+ 'RayYeung1989/dsh-plugin-development',
96
+ 'SmileTao/dsh-plugin-dev-skill',
97
+ 'Leeaoyin/dr-agent-skills',
98
+ 'KhalilYamber/hana-dsh-bridge',
99
+ 'ieookm/agent-to-dsh-migration',
100
+ # 第五批:目录/市场/awesome 索引(低优先级 20 个,README 即文档)
101
+ 'kejixiaoliang/awesome-dsh-plugins',
102
+ 'like-study1/Oh-My-DSH',
103
+ 'zp-home/dsh-recommend',
104
+ 'white0dew/awesome-dsh-plugins',
105
+ 'wangshunnn/oh-my-dsh',
106
+ 'billLiao/awesome-dsh-plugin',
107
+ 'YYTbit/awesome-dsh-bridges',
108
+ 'HackSing/dsh-plugins',
109
+ 'xiaohai-78/Top',
110
+ '2BingLing/dsh-market',
111
+ 'lwmxiaobei/dsh-plugins',
112
+ 'dshworks/awesome-dsh-themes',
113
+ 'dshworks/awesome-dsh-plugins',
114
+ 'dsh-pub/dsh-pub',
115
+ 'cooljser/dsh-plugin-portal',
116
+ 'WatchaAI/awesome-deepseek-harness-plugins',
117
+ 'imsai-sh/awesome-deepseek-harness-plugins',
118
+ 'xianyu110/awesome-deepseek-harness',
119
+ 'openguardrails/openguardrails',
120
+ 'Bandersnatch0x/amber-protocol',
121
+ # 第六批:中英文社区扫描补充(教程仓库/Tauri 壳)
122
+ 'onychen/learn-dsh',
123
+ 'alchaincyf/deepseek-harness-orange-book',
124
+ 'bobleer/deepseek-harness-gui',
125
+ # 第七批:08-15 上午增量扫描(web_search 新线索:桌面端/QAT 桥接/安全 PoC/awesome/Python 移植/Termux)
126
+ 'anywhere-labs/deepseek-harness-desktop',
127
+ 'cc1252/deepseek-harness-desktop',
128
+ 'LisiChen0/DeepSeek-Harness-Desktop',
129
+ 'Skyearn/deepseek-harness-app',
130
+ 'salathleizhang/deepseek-harness-desktop',
131
+ 'ChisaAlter/Deepseek-Harness-Desktop',
132
+ 'hairyf/deepseek-harness-desktop',
133
+ 'banana770/dsh-qq-bridge',
134
+ 'mishibeikejie/zat-dsh-engine',
135
+ 'beancookie/awesome-dsh-plugin',
136
+ 'Vengisk/deepseek-harness-termux',
137
+ 'zzszmyf/dsh-security-pocs',
138
+ 'HenryZ838978/deepseek-harness',
139
+ 'Lyowisee/deepseek-harness',
140
+ # 第八批:08-15 午间补充(主题注册表/WhaleHub 市场/dsh-market 组织)
141
+ 'orxz/deepseek-harness-themes',
142
+ 'vvlife/whalehub-dsh',
143
+ 'dsh-market/dsh-market'
144
+ )
145
+
146
+ $headsFile = Join-Path $dl '_heads.tsv'
147
+ $logFile = Join-Path $dl '_download.log'
148
+
149
+ # 同名仓库消歧: 清单中多个 owner 有同名仓库(如 4 个 awesome-dsh-plugins、7 个 deepseek-harness-desktop),
150
+ # 且 Windows 文件系统大小写不敏感——裸 repo 名互相覆盖会丢数据。规则: 首个出现者保留裸名
151
+ # (兼容既有文档引用), 后续同名者用 "<owner>-<repo>" 目录名。
152
+ # 必须在切片之前对全量清单计算: 切片后每片只见子集, 跨片的同名会误判(08-15 真实踩坑)。
153
+ $seenNames = @{}
154
+ $dirNames = @{}
155
+ foreach ($r in $repos) {
156
+ $owner, $repoName = $r -split '/'
157
+ $repoKey = $repoName.ToLowerInvariant()
158
+ if ($seenNames.ContainsKey($repoKey)) { $dirNames[$r] = "$owner-$repoName" } else { $seenNames[$repoKey] = $true; $dirNames[$r] = $repoName }
159
+ }
160
+
161
+ if ($Slice -gt 0 -and $Slices -gt 1) {
162
+ $headsFile = Join-Path $dl ("_heads.s{0}.tsv" -f $Slice)
163
+ $logFile = Join-Path $dl ("_download.s{0}.log" -f $Slice)
164
+ # 注意: 切片数学必须先算进变量再传给 Select-Object——PS 5.1 会把裸的 [Math]::Ceiling(...)
165
+ # 当成字符串参数导致绑定失败(切片失效, 多进程重跑全量互相踩踏, 08-15 真实踩坑)。
166
+ $sliceSize = [Math]::Ceiling($repos.Count / $Slices)
167
+ $sliceStart = ($Slice - 1) * $sliceSize
168
+ $repos = @($repos | Select-Object -Skip $sliceStart -First $sliceSize)
169
+ }
170
+ $heads = @{}
171
+ if ((Test-Path $headsFile) -and -not $Force) {
172
+ Get-Content $headsFile -Encoding UTF8 | ForEach-Object {
173
+ if ($_ -match '^(.+)\t(.+)$') { $heads[$matches[1]] = $matches[2] }
174
+ }
175
+ }
176
+
177
+ $log = New-Object System.Collections.Generic.List[string]
178
+ foreach ($r in $repos) {
179
+ $owner, $repo = $r -split '/'
180
+ $repoDir = Join-Path $dl $dirNames[$r]
181
+ # -OnlyMissing: 只补清单中本地缺失的仓库(已有目录跳过下载;仍会探测 ETag 写入 heads,便于后续增量刷新)。
182
+ $exists = (Test-Path $repoDir) -and (Get-ChildItem $repoDir -File -ErrorAction SilentlyContinue)
183
+ if ($OnlyMissing -and $exists -and -not $Force) {
184
+ $hdr2 = & $curl -sI --connect-timeout 10 --max-time 30 "https://codeload.github.com/$r/tar.gz/HEAD" 2>&1 | Out-String
185
+ if ($hdr2 -match '(?i)etag:\s*"?((?:W/)?[0-9a-fA-F]+)"?') { $heads[$r] = $matches[1]; $log.Add("KEEP`t$r`tlocal-exists") }
186
+ else { $log.Add("KEEP`t$r`tlocal-exists(etag-probe-miss)") }
187
+ continue
188
+ }
189
+ # 全部走 curl + codeload(后台沙箱对 git 进程的对外连接不稳定,curl 带 connect/max 超时最可靠)。
190
+ # 刷新标记用 codeload 的 ETag(内容变更即变化):分支探测 main -> master -> HEAD 三级回退。
191
+ $branch = ''
192
+ $etag = ''
193
+ foreach ($cand in @('refs/heads/main','refs/heads/master','HEAD')) {
194
+ $hdr = & $curl -sI --connect-timeout 10 --max-time 40 "https://codeload.github.com/$r/tar.gz/$cand" 2>&1 | Out-String
195
+ if ($hdr -match 'HTTP/\S+\s+200') {
196
+ $branch = $cand
197
+ # ETag 形如 ETag: "abc..."(弱 ETag 为 W/"abc..."):正则可选跳过 W/ 前缀,完整捕获引号内十六进制值。
198
+ # 修复历史: 旧正则带 ^ 锚点(-match 非多行,永远匹配不到中间行的 etag)且 W/ 前缀为必选,导致 etag 恒为空、Substring(0,12) 越界、heads 记录损坏——08-15 修复。
199
+ if ($hdr -match '(?i)etag:\s*"?((?:W/)?[0-9a-fA-F]+)"?') { $etag = $matches[1] }
200
+ break
201
+ }
202
+ }
203
+ if (-not $branch) { $log.Add("FAIL`t$r`thead-request-failed(404?)"); continue }
204
+ $etagShort = $etag
205
+ if ($etagShort.Length -gt 12) { $etagShort = $etagShort.Substring(0, 12) }
206
+ $downloaded = (Test-Path $repoDir) -and (Get-ChildItem $repoDir -File -ErrorAction SilentlyContinue)
207
+ if (-not $Force -and $downloaded -and $heads.ContainsKey($r) -and $etag -and $heads[$r] -eq $etag) {
208
+ $log.Add("SKIP`t$r`tup-to-date@$etagShort"); continue
209
+ }
210
+ $tgz = Join-Path $dl ($dirNames[$r] + '.tar.gz')
211
+ $code = & $curl -sS -L --retry 1 --retry-delay 2 --connect-timeout 10 --max-time 120 -o $tgz -w '%{http_code}' "https://codeload.github.com/$r/tar.gz/$branch" 2>&1
212
+ if ($code -match '^2' -and (Test-Path $tgz) -and (Get-Item $tgz).Length -gt 1024) {
213
+ $tmp = Join-Path $dl ("_" + $dirNames[$r])
214
+ if (Test-Path $tmp) { Remove-Item $tmp -Recurse -Force }
215
+ New-Item -ItemType Directory -Force -Path $tmp | Out-Null
216
+ & $tar -xzf $tgz -C $tmp 2>&1 | Out-Null
217
+ $extracted = Get-ChildItem $tmp -Directory | Select-Object -First 1
218
+ if ($extracted) {
219
+ if (Test-Path $repoDir) { Remove-Item $repoDir -Recurse -Force }
220
+ Move-Item $extracted.FullName $repoDir
221
+ Remove-Item $tmp -Recurse -Force -ErrorAction SilentlyContinue
222
+ $n = (Get-ChildItem $repoDir -Recurse -File | Measure-Object).Count
223
+ $heads[$r] = $etag
224
+ $log.Add("OK`t$r`tbranch=$branch`tfiles=$n`tetag=$etagShort")
225
+ } else { $log.Add("FAIL`t$r`textract-empty") }
226
+ } else { $log.Add("FAIL`t$r`thttp=$code") }
227
+ if (Test-Path $tgz) { Remove-Item $tgz -Force }
228
+ }
229
+ $heads.GetEnumerator() | Sort-Object Key | ForEach-Object { "{0}`t{1}" -f $_.Key, $_.Value } | Set-Content $headsFile -Encoding UTF8
230
+ $log | Set-Content $logFile -Encoding UTF8
231
+ Write-Output ('DONE: ' + $log.Count + ' repos -> ' + $logFile)
232
+ $log | Write-Output