dknowc-dsh 2.3.0 → 2.4.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 (270) hide show
  1. package/README.md +14 -50
  2. package/package.json +2 -2
  3. package/skills/dk-trace-report/SKILL.md +288 -0
  4. package/skills/dk-trace-report/config/examples/doc.json +56 -0
  5. package/skills/dk-trace-report/config/examples/legal.json +51 -0
  6. package/skills/dk-trace-report/config/examples/ppt.json +47 -0
  7. package/skills/dk-trace-report/config/examples/tax.json +46 -0
  8. package/skills/dk-trace-report/config/examples/trusted.json +122 -0
  9. package/skills/dk-trace-report/reference/sample_input.json +60 -0
  10. package/skills/dk-trace-report/resources/ECHARTS-NOTICE.txt +10 -0
  11. package/skills/dk-trace-report/resources/echarts.custom.min.js +48 -0
  12. package/skills/dk-trace-report/scripts/build_report_input.py +333 -0
  13. package/skills/{dknowc-trusted-search → dk-trace-report}/scripts/chart_embed.py +4 -1
  14. package/skills/{dknowc-trusted-search → dk-trace-report}/scripts/render_trace_html.py +1072 -537
  15. package/skills/dk-trace-report/scripts/run_paths.py +95 -0
  16. package/skills/dk-trace-report/scripts/trust_digest.py +77 -0
  17. package/skills/dknowc-legal-assistant/README.md +95 -0
  18. package/skills/dknowc-legal-assistant/SKILL.md +122 -0
  19. package/skills/dknowc-legal-assistant/attribution.json +5 -0
  20. package/skills/dknowc-legal-assistant/reference/answer-and-report.md +221 -0
  21. package/skills/dknowc-legal-assistant/reference/capability-layer.md +143 -0
  22. package/skills/dknowc-legal-assistant/reference/legal_claims.example.json +96 -0
  23. package/skills/dknowc-legal-assistant/reference/onboarding_scripts.md +198 -0
  24. package/skills/dknowc-legal-assistant/reference/policy_tags.json +2002 -0
  25. package/skills/dknowc-legal-assistant/reference/retrieval-statute.md +81 -0
  26. package/skills/dknowc-legal-assistant/reference/retrieval-v2.md +133 -0
  27. package/skills/dknowc-legal-assistant/reference/sample_search_result.md +33 -0
  28. package/skills/dknowc-legal-assistant/reference/sample_trace_report.html +940 -0
  29. package/skills/dknowc-legal-assistant/reference/tags.md +53 -0
  30. package/skills/dknowc-legal-assistant/reference/troubleshooting.md +50 -0
  31. package/skills/dknowc-legal-assistant/reference/verification-pass.md +59 -0
  32. package/skills/dknowc-legal-assistant/resources/echarts.custom.min.js +48 -0
  33. package/skills/dknowc-legal-assistant/scripts/api_key.py +68 -0
  34. package/skills/dknowc-legal-assistant/scripts/attribution.py +61 -0
  35. package/skills/dknowc-legal-assistant/scripts/calc_legal.py +375 -0
  36. package/skills/dknowc-legal-assistant/scripts/calc_period.py +155 -0
  37. package/skills/dknowc-legal-assistant/scripts/check_answer.py +664 -0
  38. package/skills/dknowc-legal-assistant/scripts/initialize.py +188 -0
  39. package/skills/dknowc-legal-assistant/scripts/legal_client.py +208 -0
  40. package/skills/dknowc-legal-assistant/scripts/legal_search.py +1059 -0
  41. package/skills/dknowc-legal-assistant/scripts/merge_search_results.py +630 -0
  42. package/skills/dknowc-legal-assistant/scripts/path_guard.py +92 -0
  43. package/skills/dknowc-legal-assistant/scripts/question_profile.py +215 -0
  44. package/skills/dknowc-legal-assistant/scripts/register_key.mjs +1152 -0
  45. package/skills/dknowc-legal-assistant/scripts/run_eval.py +109 -0
  46. package/skills/dknowc-legal-assistant/scripts/source_cards.py +321 -0
  47. package/skills/dknowc-legal-assistant/scripts/tag_catalog.py +162 -0
  48. package/skills/dknowc-legal-assistant/scripts/trace_report.config.json +66 -0
  49. package/skills/dknowc-legal-assistant/scripts/verify_claims.py +448 -0
  50. package/skills/dknowc-legal-assistant/scripts/websearch_convert.py +396 -0
  51. package/skills/dknowc-official-doc-writer/README.md +45 -25
  52. package/skills/dknowc-official-doc-writer/SKILL.md +28 -14
  53. package/skills/dknowc-official-doc-writer/config/trace_report.config.json +56 -0
  54. package/skills/dknowc-official-doc-writer/official-docs/input//345/274/225/347/224/250/345/257/271/347/205/247_/351/252/214/346/224/266_materials.json +628 -0
  55. package/skills/dknowc-official-doc-writer/official-docs/search-results/baseline_1555.json +345 -0
  56. package/skills/dknowc-official-doc-writer/official-docs/search-results/baseline_my.json +728 -0
  57. package/skills/dknowc-official-doc-writer/official-docs/search-results/baseline_wp.json +159 -0
  58. package/skills/dknowc-official-doc-writer/official-docs/search-results/baseline_wp2.json +1006 -0
  59. package/skills/dknowc-official-doc-writer/official-docs/search-results/test_tz.json +28 -0
  60. package/skills/dknowc-official-doc-writer/official-docs/search-results/tmp_q.json +1419 -0
  61. package/skills/dknowc-official-doc-writer/reference/anti_ai_patterns.md +13 -1
  62. package/skills/dknowc-official-doc-writer/reference/fact_discipline.md +4 -0
  63. package/skills/dknowc-official-doc-writer/reference/genre_writing_notes.md +4 -0
  64. package/skills/dknowc-official-doc-writer/reference/initialization.md +28 -20
  65. package/skills/dknowc-official-doc-writer/reference/material_usage_guidance.md +21 -0
  66. package/skills/dknowc-official-doc-writer/reference/materials_pipeline.md +64 -7
  67. package/skills/dknowc-official-doc-writer/reference/onboarding_scripts.md +43 -32
  68. package/skills/dknowc-official-doc-writer/reference/outline_rules.md +1 -1
  69. package/skills/dknowc-official-doc-writer/reference/output_guide.md +19 -20
  70. package/skills/dknowc-official-doc-writer/reference/research_notes.md +5 -3
  71. package/skills/dknowc-official-doc-writer/reference/review_checklist.md +6 -2
  72. package/skills/dknowc-official-doc-writer/reference/revision_workflow.md +2 -2
  73. package/skills/dknowc-official-doc-writer/reference/search_guide.md +45 -33
  74. package/skills/dknowc-official-doc-writer/reference/search_intro.md +4 -4
  75. package/skills/dknowc-official-doc-writer/reference/search_policy.md +63 -36
  76. package/skills/dknowc-official-doc-writer/reference/standards/00_index.md +63 -77
  77. package/skills/dknowc-official-doc-writer/reference/standards/01_report.md +3 -3
  78. package/skills/dknowc-official-doc-writer/reference/standards/02_qingshi.md +6 -3
  79. package/skills/dknowc-official-doc-writer/reference/standards/03_pifu.md +2 -2
  80. package/skills/dknowc-official-doc-writer/reference/standards/04_tongzhi.md +12 -3
  81. package/skills/dknowc-official-doc-writer/reference/standards/05_yijian.md +8 -2
  82. package/skills/dknowc-official-doc-writer/reference/standards/06_han.md +2 -2
  83. package/skills/dknowc-official-doc-writer/reference/standards/08_tongbao.md +2 -2
  84. package/skills/dknowc-official-doc-writer/reference/standards/09_tonggao.md +2 -2
  85. package/skills/dknowc-official-doc-writer/reference/standards/10_gonggao.md +2 -2
  86. package/skills/dknowc-official-doc-writer/reference/standards/11_fuhan_approve.md +2 -2
  87. package/skills/dknowc-official-doc-writer/reference/standards/12_fuhan_objection.md +2 -2
  88. package/skills/dknowc-official-doc-writer/reference/standards/13_reminder.md +3 -3
  89. package/skills/dknowc-official-doc-writer/reference/standards/14_generic.md +1 -1
  90. package/skills/dknowc-official-doc-writer/reference/standards/16_decision.md +2 -2
  91. package/skills/dknowc-official-doc-writer/reference/standards/18_order.md +1 -1
  92. package/skills/dknowc-official-doc-writer/reference/standards/19_gazette.md +1 -1
  93. package/skills/dknowc-official-doc-writer/reference/standards/20_motion.md +2 -2
  94. package/skills/dknowc-official-doc-writer/reference/standards/22_application.md +2 -2
  95. package/skills/dknowc-official-doc-writer/reference/standards/23_publicity.md +1 -1
  96. package/skills/dknowc-official-doc-writer/reference/standards/25_plan.md +2 -1
  97. package/skills/dknowc-official-doc-writer/reference/standards/26_summary.md +7 -1
  98. package/skills/dknowc-official-doc-writer/reference/standards/27_speech.md +4 -1
  99. package/skills/dknowc-official-doc-writer/reference/standards/99_expressions.md +1 -2
  100. package/skills/dknowc-official-doc-writer/reference/task_router.md +5 -5
  101. package/skills/dknowc-official-doc-writer/reference/working_principles.md +4 -4
  102. package/skills/dknowc-official-doc-writer/reference/writing_method.md +166 -0
  103. package/skills/dknowc-official-doc-writer/reference/writing_rules.md +11 -5
  104. package/skills/dknowc-official-doc-writer/scripts/api_key.py +30 -3
  105. package/skills/dknowc-official-doc-writer/scripts/attribution.py +1 -1
  106. package/skills/dknowc-official-doc-writer/scripts/build_trace_json.py +216 -22
  107. package/skills/dknowc-official-doc-writer/scripts/check_materials.py +375 -27
  108. package/skills/dknowc-official-doc-writer/scripts/deep_convert.py +9 -4
  109. package/skills/dknowc-official-doc-writer/scripts/deep_query.py +3 -2
  110. package/skills/dknowc-official-doc-writer/scripts/dkag_search.py +23 -9
  111. package/skills/dknowc-official-doc-writer/scripts/extract_reference.py +2 -1
  112. package/skills/dknowc-official-doc-writer/scripts/format_document.py +116 -41
  113. package/skills/dknowc-official-doc-writer/scripts/initialize.py +246 -12
  114. package/skills/dknowc-official-doc-writer/scripts/local_memory.py +2 -6
  115. package/skills/dknowc-official-doc-writer/scripts/mcp_direct.py +2 -3
  116. package/skills/dknowc-official-doc-writer/scripts/merge_search_results.py +113 -13
  117. package/skills/dknowc-official-doc-writer/scripts/outline_reference.py +3 -2
  118. package/skills/dknowc-official-doc-writer/scripts/prose_lint.py +7 -2
  119. package/skills/dknowc-official-doc-writer/scripts/register.mjs +782 -216
  120. package/skills/dknowc-official-doc-writer/scripts/review_document.py +2 -1
  121. package/skills/dknowc-official-doc-writer/scripts/source_note_html.py +120 -13
  122. package/skills/dknowc-official-doc-writer/scripts/template_generator.py +2 -1
  123. package/skills/dknowc-official-doc-writer/scripts/update_skill.py +339 -0
  124. package/skills/dknowc-official-doc-writer/scripts/websearch_convert.py +326 -0
  125. package/skills/dknowc-ppt-assistant/README.md +21 -9
  126. package/skills/dknowc-ppt-assistant/SKILL.md +29 -20
  127. package/skills/dknowc-ppt-assistant/THIRD_PARTY_NOTICES.md +3 -2
  128. package/skills/dknowc-ppt-assistant/config/trace_report.config.json +65 -0
  129. package/skills/dknowc-ppt-assistant/references/initialization.md +58 -7
  130. package/skills/dknowc-ppt-assistant/references/material_usage.md +51 -14
  131. package/skills/dknowc-ppt-assistant/references/onboarding_scripts.md +51 -18
  132. package/skills/dknowc-ppt-assistant/references/sample_trace_report.html +372 -920
  133. package/skills/dknowc-ppt-assistant/references/search_intro.md +2 -2
  134. package/skills/dknowc-ppt-assistant/references/svg-authoring.md +3 -3
  135. package/skills/dknowc-ppt-assistant/references/upstream-example/README.md +2 -0
  136. package/skills/dknowc-ppt-assistant/scripts/api_key.py +11 -27
  137. package/skills/dknowc-ppt-assistant/scripts/attribution.py +2 -2
  138. package/skills/dknowc-ppt-assistant/scripts/build_trace_input.py +188 -0
  139. package/skills/dknowc-ppt-assistant/scripts/compact_svg_coordinates.py +1 -1
  140. package/skills/dknowc-ppt-assistant/scripts/config.py +9 -9
  141. package/skills/dknowc-ppt-assistant/scripts/console_encoding.py +1 -2
  142. package/skills/dknowc-ppt-assistant/scripts/error_helper.py +3 -3
  143. package/skills/dknowc-ppt-assistant/scripts/hyperlink_contract.py +1 -1
  144. package/skills/dknowc-ppt-assistant/scripts/initialize.py +248 -15
  145. package/skills/dknowc-ppt-assistant/scripts/language_tags.py +1 -1
  146. package/skills/dknowc-ppt-assistant/scripts/mcp_convert.py +7 -14
  147. package/skills/dknowc-ppt-assistant/scripts/mcp_direct.py +3 -2
  148. package/skills/dknowc-ppt-assistant/scripts/merge_search_results.py +604 -0
  149. package/skills/dknowc-ppt-assistant/scripts/native_payloads.py +1 -1
  150. package/skills/dknowc-ppt-assistant/scripts/pptx_animations.py +1 -1
  151. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/__init__.py +1 -1
  152. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/errors.py +1 -1
  153. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/formula.py +1 -1
  154. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/loader.py +1 -1
  155. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/models.py +1 -1
  156. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/registry.py +2 -2
  157. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/semantic_hash.py +1 -1
  158. package/skills/dknowc-ppt-assistant/scripts/pptx_shapes/semantics.py +3 -3
  159. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/animation_import.py +1 -1
  160. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/formula_import.py +1 -1
  161. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/hyperlinks.py +2 -2
  162. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/preset_authoring.py +2 -2
  163. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/preset_registry_to_svg.py +2 -2
  164. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/preset_svg_markup.py +2 -2
  165. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/slide_to_svg.py +1 -1
  166. package/skills/dknowc-ppt-assistant/scripts/pptx_to_svg/transition_import.py +1 -1
  167. package/skills/dknowc-ppt-assistant/scripts/pptx_transitions.py +2 -2
  168. package/skills/dknowc-ppt-assistant/scripts/preset_shape_svg.py +2 -2
  169. package/skills/dknowc-ppt-assistant/scripts/preview_slide_html.py +4 -11
  170. package/skills/dknowc-ppt-assistant/scripts/project_utils.py +2 -2
  171. package/skills/dknowc-ppt-assistant/scripts/register_key.mjs +890 -341
  172. package/skills/dknowc-ppt-assistant/scripts/resource_paths.py +1 -1
  173. package/skills/dknowc-ppt-assistant/scripts/shape_boolean_svg.py +2 -2
  174. package/skills/dknowc-ppt-assistant/scripts/slide_roster.py +1 -1
  175. package/skills/dknowc-ppt-assistant/scripts/svg_finalize/__init__.py +2 -9
  176. package/skills/dknowc-ppt-assistant/scripts/svg_finalize/align_embed_images.py +1 -1
  177. package/skills/dknowc-ppt-assistant/scripts/svg_finalize/crop_images.py +3 -3
  178. package/skills/dknowc-ppt-assistant/scripts/svg_quality/__init__.py +2 -2
  179. package/skills/dknowc-ppt-assistant/scripts/svg_quality/checker.py +9 -10
  180. package/skills/dknowc-ppt-assistant/scripts/svg_quality/cli.py +4 -4
  181. package/skills/dknowc-ppt-assistant/scripts/svg_quality/svg_contracts.py +2 -2
  182. package/skills/dknowc-ppt-assistant/scripts/svg_quality/xml_support.py +1 -1
  183. package/skills/dknowc-ppt-assistant/scripts/svg_quality_checker.py +1 -1
  184. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/drawingml/hyperlinks.py +2 -2
  185. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/drawingml/theme_colors.py +1 -1
  186. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/drawingml/theme_fonts.py +1 -1
  187. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/geometry_properties.py +1 -1
  188. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/formula.py +2 -2
  189. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/formula_ast.py +1 -1
  190. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/formula_compiler.py +2 -2
  191. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/formula_omml.py +2 -2
  192. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/formula_parser.py +2 -2
  193. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/formula_profile.py +1 -1
  194. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/formula_run_properties.py +1 -1
  195. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/native_objects/inline_formula.py +2 -2
  196. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/pptx_package/builder.py +9 -11
  197. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/pptx_package/cli.py +7 -5
  198. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/pptx_package/template_structure.py +1 -1
  199. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/pptx_package/template_validation.py +1 -1
  200. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/semantic_markers.py +1 -1
  201. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/shape_boolean.py +2 -2
  202. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx/text_outline.py +2 -2
  203. package/skills/dknowc-ppt-assistant/scripts/svg_to_pptx.py +1 -1
  204. package/skills/dknowc-ppt-assistant/scripts/trusted_search.py +51 -17
  205. package/skills/dknowc-ppt-assistant/scripts/update_skill.py +314 -0
  206. package/skills/dknowc-ppt-assistant/scripts/update_spec.py +25 -1
  207. package/skills/dknowc-ppt-assistant/scripts/websearch_convert.py +326 -0
  208. package/skills/dknowc-ppt-assistant/workflows/generate-pptx.md +99 -34
  209. package/skills/dknowc-tax-assistant/README.md +54 -0
  210. package/skills/dknowc-tax-assistant/SKILL.md +99 -0
  211. package/skills/dknowc-tax-assistant/attribution.json +5 -0
  212. package/skills/dknowc-tax-assistant/reference/answer-and-report.md +100 -0
  213. package/skills/dknowc-tax-assistant/reference/capability-layer.md +205 -0
  214. package/skills/dknowc-tax-assistant/reference/onboarding_scripts.md +68 -0
  215. package/skills/dknowc-tax-assistant/reference/policy_tags.json +2002 -0
  216. package/skills/dknowc-tax-assistant/reference/retrieval-policy.md +43 -0
  217. package/skills/dknowc-tax-assistant/reference/retrieval-v2.md +58 -0
  218. package/skills/dknowc-tax-assistant/reference/tags.md +53 -0
  219. package/skills/dknowc-tax-assistant/reference/tax_claims.example.json +76 -0
  220. package/skills/dknowc-tax-assistant/reference/trace_report.config.json +46 -0
  221. package/skills/dknowc-tax-assistant/reference/troubleshooting.md +70 -0
  222. package/skills/dknowc-tax-assistant/reference/websearch-fallback.md +59 -0
  223. package/skills/dknowc-tax-assistant/resources/THIRD_PARTY_NOTICES.md +9 -0
  224. package/skills/dknowc-tax-assistant/resources/echarts.custom.min.js +48 -0
  225. package/skills/dknowc-tax-assistant/scripts/api_key.py +60 -0
  226. package/skills/dknowc-tax-assistant/scripts/attribution.py +61 -0
  227. package/skills/dknowc-tax-assistant/scripts/calc_period.py +156 -0
  228. package/skills/dknowc-tax-assistant/scripts/calc_tax.py +179 -0
  229. package/skills/dknowc-tax-assistant/scripts/check_answer.py +210 -0
  230. package/skills/dknowc-tax-assistant/scripts/initialize.py +208 -0
  231. package/skills/dknowc-tax-assistant/scripts/merge_search_results.py +631 -0
  232. package/skills/dknowc-tax-assistant/scripts/path_guard.py +23 -0
  233. package/skills/dknowc-tax-assistant/scripts/question_profile.py +444 -0
  234. package/skills/dknowc-tax-assistant/scripts/register_key.mjs +1173 -0
  235. package/skills/dknowc-tax-assistant/scripts/run_dir.py +149 -0
  236. package/skills/dknowc-tax-assistant/scripts/source_cards.py +372 -0
  237. package/skills/dknowc-tax-assistant/scripts/tag_catalog.py +164 -0
  238. package/skills/dknowc-tax-assistant/scripts/tax_client.py +218 -0
  239. package/skills/dknowc-tax-assistant/scripts/tax_search.py +403 -0
  240. package/skills/dknowc-tax-assistant/scripts/verify_claims.py +587 -0
  241. package/skills/dknowc-tax-assistant/scripts/websearch_convert.py +352 -0
  242. package/skills/dknowc-trusted-search/README.md +29 -23
  243. package/skills/dknowc-trusted-search/SKILL.md +257 -107
  244. package/skills/dknowc-trusted-search/config/trace_report.config.json +119 -0
  245. package/skills/dknowc-trusted-search/reference/onboarding_scripts.md +40 -15
  246. package/skills/dknowc-trusted-search/reference/sample_trace_report.html +286 -191
  247. package/skills/dknowc-trusted-search/resources/ECHARTS-NOTICE.txt +10 -0
  248. package/skills/dknowc-trusted-search/scripts/api_key.py +10 -26
  249. package/skills/dknowc-trusted-search/scripts/attribution.py +1 -1
  250. package/skills/dknowc-trusted-search/scripts/build_trace_input.py +173 -0
  251. package/skills/dknowc-trusted-search/scripts/deep_convert.py +79 -30
  252. package/skills/dknowc-trusted-search/scripts/deep_query.py +23 -34
  253. package/skills/dknowc-trusted-search/scripts/initialize.py +353 -12
  254. package/skills/dknowc-trusted-search/scripts/mcp_direct.py +3 -2
  255. package/skills/dknowc-trusted-search/scripts/merge_search_results.py +222 -35
  256. package/skills/dknowc-trusted-search/scripts/register_key.mjs +845 -291
  257. package/skills/dknowc-trusted-search/scripts/source_display.py +59 -0
  258. package/skills/dknowc-trusted-search/scripts/trusted_search.py +69 -36
  259. package/skills/dknowc-trusted-search/scripts/update_skill.py +300 -0
  260. package/skills/dknowc-trusted-search/scripts/websearch_convert.py +328 -0
  261. package/src/index.js +15 -0
  262. package/skills/dknowc-official-doc-writer/scripts/mcp_convert.py +0 -287
  263. package/skills/dknowc-official-doc-writer/scripts/render_trace_html.py +0 -2574
  264. package/skills/dknowc-ppt-assistant/references/upstream-docs/svg-pipeline.md +0 -842
  265. package/skills/dknowc-ppt-assistant/scripts/finalize_svg.py +0 -507
  266. package/skills/dknowc-ppt-assistant/scripts/render_trace_html.py +0 -2642
  267. package/skills/dknowc-ppt-assistant/scripts/svg_finalize/svg_rect_to_path.py +0 -346
  268. package/skills/dknowc-trusted-search/official-docs/output/.gitkeep +0 -0
  269. package/skills/dknowc-trusted-search/official-docs/search-results/.gitkeep +0 -0
  270. package/skills/dknowc-trusted-search/scripts/mcp_convert.py +0 -198
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 检索能力与数据(价值素材)
6
6
 
7
- - 深知可信PPT的素材检索面向权威文件库:检索政府官网、部委和地方发布的规范性文件原文,以及权威公开资料,不是普通网页搜索。
7
+ - 深知可信PPT的素材检索面向权威文件库:检索政府官网、部委和地方发布的规范性文件原文,以及权威公开资料,以权威文件库为主(非以普通网页搜索为主);权威库无支撑时可补充公开网络材料并标注非官方来源。
8
8
  - 知识库覆盖 600 万篇公开规范性文件,接入 7000 万篇可溯源、可核验的权威公开资料,每日更新。
9
9
  - 覆盖范围包括 54 个行业、300 多个地市、2800 多个县,国家和地方政策均可在对应层级检索。
10
10
  - 检索结果按演示需要分为政策依据、数据支撑、典型案例三类素材,每条素材带原文出处(发文机关、文号、发布日期、原文链接),可点开核验。
@@ -44,7 +44,7 @@
44
44
  ```text
45
45
  这份汇报 PPT 需要引用政策原文和权威数据。凭印象写政策名和数字,汇报场合被当场指出来最影响效果。
46
46
 
47
- 开通检索后,我可以直接检索权威文件库——覆盖 600 万篇公开规范性文件、7000 万篇可溯源的权威公开资料,每日更新;检索到的每条政策、数据都带原文出处,可点开核验,权威数据还能直接做成可编辑的原生图表,这是普通联网搜索做不到的。
47
+ 开通检索后,我可以直接检索权威文件库——覆盖 600 万篇公开规范性文件、7000 万篇可溯源的权威公开资料,每日更新;检索到的每条政策、数据都带原文出处,可点开核验,权威数据还能直接做成可编辑的原生图表,这是普通联网搜索做不到的;权威库暂无覆盖时,还会按需补充公开网络材料并逐条标注「非官方来源」,与普通网页搜索的结果明确区分。
48
48
 
49
49
  开通只需手机号收一次验证码:两步、10 秒左右,不用去网站、不用填表单,剩下的我来办。手机号仅用于本次验证,不会有营销骚扰。
50
50
 
@@ -14,7 +14,7 @@
14
14
  | 格式 | viewBox | 适用 |
15
15
  | --- | --- | --- |
16
16
  | `ppt169`(默认) | `0 0 1280 720` | 标准汇报演示 |
17
- | `ppt43` | `0 0 960 720` | 传统投影 |
17
+ | `ppt43` | `0 0 1024 768` | 传统投影 |
18
18
  | `xiaohongshu` | 小红书 3:4 | 图文帖 |
19
19
  | `moments` | 1:1 | 方形海报 |
20
20
  | `story` | 9:16 | 竖版故事/短视频封面 |
@@ -72,10 +72,10 @@
72
72
 
73
73
  ```bash
74
74
  # 质检(quick 模式:无锁检查;--stage final --json 生成导出所需的正式报告)
75
- python3 {skillDir}/scripts/svg_quality_checker.py projects/<项目名> --quick-generate --stage final --json
75
+ python3 {skillDir}/scripts/svg_quality_checker.py dknowc-projects/<项目名> --quick-generate --stage final --json
76
76
 
77
77
  # 编译导出(quick 模式)
78
- uv run --with python-pptx --with XlsxWriter python3 {skillDir}/scripts/svg_to_pptx.py projects/<项目名> --quick-generate
78
+ uv run --with python-pptx --with XlsxWriter python3 {skillDir}/scripts/svg_to_pptx.py dknowc-projects/<项目名> --quick-generate
79
79
  ```
80
80
 
81
81
  质检 errors(exit 1)必须修复后重新导出;warnings 可评估后放行。导出成功后 `.pptx` 写入项目 `exports/`。
@@ -13,3 +13,5 @@
13
13
  - `sources/`: source materials and normalized markdown
14
14
  - `exports/`: native editable PPTX exports (timestamped)
15
15
  - `backup/<timestamp>/`: svg_output/ archive (always written in default-flow mode; safe to delete old timestamps)
16
+
17
+ > 说明:本目录为**结构与写法参照**,仅含示例 SVG、`design_spec.md` 与 `spec_lock.md`;示例 SVG 中引用的配图(`../images/…`)与模板资源不在包内,直接拿来跑质检会报图片缺失,参照其结构自行编写即可。
@@ -5,15 +5,15 @@
5
5
  key 写入,或宿主安全更新后不再加载 shell 导出变量(WorkBuddy 5.5.3 实测持续
6
6
  读不到)。因此 Key 持久化统一落在本机专用配置文件(XDG 规范路径),脚本直读
7
7
  文件,避免误报缺失、触发不必要的手机号验证码引导,也免去"写完 key 必须重启
8
- 宿主"的限制。读取顺序:进程环境变量 → 专用配置文件 → 历史 ~/.zshrc 块(3.7.5
9
- 迁移期兜底,读到即视为已持久化)。key 仅在本机解析并用于调用深知接口,不写入
10
- 任何其他位置,不随公开包分发。
8
+ 宿主"的限制。读取顺序:进程环境变量 → 专用配置文件。
9
+
10
+ 2026-11-25 审核整改:不读取、不写入、不改写任何 shell 配置文件(如 ~/.zshrc)。
11
+ key 仅在本机解析并用于调用深知接口,不写入任何其他位置,不随公开包分发。
11
12
  """
12
13
 
13
14
  from __future__ import annotations
14
15
 
15
16
  import os
16
- import re
17
17
  import sys
18
18
  from pathlib import Path
19
19
 
@@ -31,38 +31,22 @@ def api_key_file_path() -> Path:
31
31
  return base / "dknowc" / KEY_FILE_NAME
32
32
 
33
33
 
34
- def _read_legacy_zshrc() -> str:
35
- """迁移期:从历史 ~/.zshrc 块读取 Key(3.7.5 之前的写入位置)。"""
36
- zshrc = Path.home() / ".zshrc"
37
- try:
38
- text = zshrc.read_text(encoding="utf-8", errors="ignore")
39
- except OSError:
40
- return ""
41
- pattern = re.compile(
42
- r'^\s*export\s+' + re.escape(API_KEY_ENV) + r'\s*=\s*[\'"]?([^\'"\r\n#]+?)[\'"]?\s*$',
43
- re.M,
44
- )
45
- for value in reversed(pattern.findall(text)):
46
- value = value.strip()
47
- if value:
48
- return value
49
- return ""
50
-
51
-
52
34
  def resolve_api_key() -> tuple[str, str]:
53
- """返回 (key, source)。source ∈ {'environment', 'keyfile', 'zshrc', ''}(空串表示未找到)。"""
35
+ """返回 (key, source)。source ∈ {'environment', 'keyfile', ''}(空串表示未找到)。"""
54
36
  value = os.environ.get(API_KEY_ENV, "").strip()
55
37
  if value:
56
38
  return value, "environment"
57
39
 
40
+ # dsh:插件 shell-env 注入的 DSH_DKNOWC_API_KEY(与 MCP Bearer 同源;dsh 的安全机制
41
+ # 会清理名字含 KEY 的隐式环境变量,该 DSH_ 前缀变量是官方显式注入通道)。
42
+ value = os.environ.get("DSH_DKNOWC_API_KEY", "").strip()
43
+ if value:
44
+ return value, "environment"
45
+
58
46
  try:
59
47
  value = api_key_file_path().read_text(encoding="utf-8", errors="ignore").strip()
60
48
  except OSError:
61
49
  value = ""
62
50
  if value:
63
51
  return value, "keyfile"
64
-
65
- legacy = _read_legacy_zshrc()
66
- if legacy:
67
- return legacy, "zshrc"
68
52
  return "", ""
@@ -3,9 +3,9 @@
3
3
 
4
4
  依据与 MaaS 平台方约定的调用来源统计方案:
5
5
 
6
- - 声明格式(单行纯 ASCII):`kind=skill;agentSource=dknowc-ppt-assistant;version=1.3.6;channel=skillhub`
6
+ - 声明格式(单行纯 ASCII):`kind=skill;agentSource=dknowc-ppt-assistant;version=<SKILL.md 版本>;channel=<渠道>`
7
7
  (头内键名为 agentSource——2026-10-09 平台方改名,区别于注册 body 的 `source="agent"` 合同标记)
8
- - kind/source/channel 读自**包根 `attribution.json`**(渠道差异由打包期改这一个文件表达);
8
+ - kind/source/channel 读自**包根 `attribution.json`**;
9
9
  - **version 运行时从 SKILL.md frontmatter 解析**(单一事实源,不硬编码);
10
10
  - 声明为调用方自报,**仅用于统计、不参与鉴权、不作安全凭证**;
11
11
  读取失败时返回 None,调用方不加该头、**不阻断请求**(服务端归"未声明"桶)。
@@ -0,0 +1,188 @@
1
+ #!/usr/bin/env python3
2
+ """深知可信PPT 的通用输入入口(1.7.0):统一入口 + 本产品字段透传。
3
+
4
+ 在内核 `build_report_input.py`(兄弟 skill dk-trace-report,merged 适配器)之上补充本产品的字段语义:
5
+ - 复用其「检索文章 → materials」映射与 `--policy-files` 文号回填;
6
+ - 透传 merge 产物的 `search_meta`(含 calls 补搜增量)——统一入口只保留
7
+ 材料/答案/自检等核心字段,过程条「该路新增 N 篇 · 补充 K 段」依赖 search_meta.calls;
8
+ - 旧式顶层 `检索记录` 归一到 search_meta.calls(label 取 purpose/query 标签);
9
+ - 顶层 `verification_checks` 透传为渲染器的 `verificationChecks`(需人工复核事项)。
10
+
11
+ 输出仍是标准通用 JSON,渲染器不需要任何本产品定制。用法与内核入口一致:
12
+ python3 build_trace_input.py merged.json --run "$RUN" --output input.json \
13
+ --answer-file answer.txt --question "用户问题" \
14
+ --self-check-file selfcheck.json --stage outline --policy-files
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ import argparse
20
+ import json
21
+ import sys
22
+ from pathlib import Path
23
+ from typing import Any, Dict, List
24
+
25
+ # dsh:内核抽离到插件内兄弟 skill「溯源核验报告生成器」(dk-trace-report),
26
+ # 此处注入其 scripts 目录到 sys.path;母版同目录形态下目录不存在、行为不变。
27
+ import sys as _sys
28
+ from pathlib import Path as _Path
29
+ _KERNEL_DIR = _Path(__file__).resolve().parent.parent.parent / "dk-trace-report" / "scripts"
30
+ if _KERNEL_DIR.is_dir():
31
+ _sys.path.insert(0, str(_KERNEL_DIR))
32
+
33
+ import build_report_input as base
34
+ from run_paths import RunPathError, SKILL_ROOT, is_within, resolve_input_path, resolve_run_dir
35
+
36
+
37
+ def carry_runtime_meta(payload: Dict[str, Any], source: Dict[str, Any]) -> None:
38
+ """把检索/合并产物里的过程元数据透传到通用 JSON(渲染器按 search_meta.calls 展示补搜增量)。"""
39
+ meta = source.get("search_meta") if isinstance(source.get("search_meta"), dict) else None
40
+ legacy = source.get("检索记录") if isinstance(source.get("检索记录"), list) else None
41
+ calls: List[Dict[str, Any]] = []
42
+ if meta and isinstance(meta.get("calls"), list):
43
+ calls = [c for c in meta["calls"] if isinstance(c, dict)]
44
+ elif legacy:
45
+ for entry in legacy:
46
+ if not isinstance(entry, dict):
47
+ continue
48
+ label = base.first_str(entry.get("purpose"), entry.get("query"),
49
+ entry.get("通道"), entry.get("label"))
50
+ calls.append({
51
+ "label": label,
52
+ "new_articles": entry.get("new_articles", entry.get("新增文章")),
53
+ "added_paragraphs": entry.get("added_paragraphs", entry.get("补充段落")),
54
+ })
55
+ merged: Dict[str, Any] = dict(meta or {})
56
+ if calls:
57
+ merged["calls"] = calls
58
+ if merged:
59
+ payload["search_meta"] = merged
60
+ checks = source.get("verification_checks") or source.get("verificationChecks")
61
+ if isinstance(checks, list) and checks:
62
+ payload["verificationChecks"] = [str(x) for x in checks if str(x).strip()]
63
+
64
+
65
+ def main() -> int:
66
+ parser = argparse.ArgumentParser(description="深知可信PPT:检索/merge 产物 → 通用 JSON")
67
+ parser.add_argument("source_json", help="检索/merge 产物(content.data.检索文章 或顶层 检索文章)")
68
+ parser.add_argument("--run", help="本次运行的独立目录(相对路径基准;必须在 Skill 目录之外)")
69
+ parser.add_argument("--output", help="输出通用 JSON 文件名;相对名落 --run 目录(默认 input.json)")
70
+ parser.add_argument("--answer-file", help="最终答案文件(.txt/.md,关键结论带 [n] 角标)")
71
+ parser.add_argument("--answer", help="最终答案文本(文件优先)")
72
+ parser.add_argument("--question", help="用户原始问题")
73
+ parser.add_argument("--question-file", help="用户原始问题全文文件")
74
+ parser.add_argument("--self-check-file", help="答案自检结果 JSON(键集由 config 的 selfcheck.labels 决定)")
75
+ parser.add_argument("--verify-file", help="域内核验记录 JSON(原样嵌入)")
76
+ parser.add_argument("--title", help="报告标题;缺省取输入 JSON 的 title 或问题")
77
+ parser.add_argument("--stage", choices=["outline", "final"], help="双版阶段标识(提纲版/成稿版)")
78
+ parser.add_argument("--policy-files", action="store_true",
79
+ help="用 policyFiles 的 writtenText 回填空缺发文字号")
80
+ args = parser.parse_args()
81
+
82
+ try:
83
+ run_dir = resolve_run_dir(args.run) if args.run else None
84
+ except RunPathError as exc:
85
+ print(f"错误:{exc}", file=sys.stderr)
86
+ return 2
87
+
88
+ try:
89
+ source_path = resolve_input_path(args.source_json, run_dir, {".json"})
90
+ source = base.load_json_file(source_path)
91
+ except (RunPathError, json.JSONDecodeError, OSError) as exc:
92
+ print(f"错误:输入无法读取({exc})", file=sys.stderr)
93
+ return 2
94
+
95
+ articles = base.find_merged_articles(source)
96
+ if not articles:
97
+ print("错误:未在输入中找到「检索文章」(content.data.检索文章 或顶层 检索文章)。", file=sys.stderr)
98
+ return 2
99
+ materials = [base.map_merged_article(a) for a in articles]
100
+ if args.policy_files:
101
+ filled = base.apply_policy_files(materials, source)
102
+ if filled:
103
+ print(f"policyFiles 文号回填:{filled} 条")
104
+ for idx, material in enumerate(materials):
105
+ if not base.first_str(material.get("编号")):
106
+ material["编号"] = str(idx + 1)
107
+
108
+ source_meta = source if isinstance(source, dict) else {}
109
+ answer = ""
110
+ if args.answer_file:
111
+ try:
112
+ answer = resolve_input_path(args.answer_file, run_dir, {".txt", ".md"}).read_text(encoding="utf-8")
113
+ except (RunPathError, OSError) as exc:
114
+ print(f"错误:答案文件无法读取({exc})", file=sys.stderr)
115
+ return 2
116
+ elif args.answer:
117
+ answer = args.answer
118
+ else:
119
+ answer = base.first_str(source_meta.get("answer"), source_meta.get("答案"))
120
+
121
+ question = ""
122
+ if args.question_file:
123
+ try:
124
+ question = resolve_input_path(args.question_file, run_dir, {".txt", ".md"}).read_text(encoding="utf-8").strip()
125
+ except (RunPathError, OSError) as exc:
126
+ print(f"错误:问题文件无法读取({exc})", file=sys.stderr)
127
+ return 2
128
+ else:
129
+ question = base.first_str(args.question, source_meta.get("question"), source_meta.get("问题"))
130
+
131
+ self_check: Any = None
132
+ if args.self_check_file:
133
+ try:
134
+ self_check = base.load_json_file(resolve_input_path(args.self_check_file, run_dir, {".json"}))
135
+ except (RunPathError, json.JSONDecodeError, OSError) as exc:
136
+ print(f"错误:自检文件无法读取({exc})", file=sys.stderr)
137
+ return 2
138
+ else:
139
+ self_check = (source_meta.get("selfCheck") or source_meta.get("self_check")
140
+ or source_meta.get("agentCheck") or source_meta.get("agent_check"))
141
+
142
+ verify_record: Any = None
143
+ if args.verify_file:
144
+ try:
145
+ verify_record = base.load_json_file(resolve_input_path(args.verify_file, run_dir, {".json"}))
146
+ except (RunPathError, json.JSONDecodeError, OSError) as exc:
147
+ print(f"错误:核验记录无法读取({exc})", file=sys.stderr)
148
+ return 2
149
+
150
+ payload: Dict[str, Any] = {
151
+ "title": base.first_str(args.title, source_meta.get("title")) or question,
152
+ "question": question,
153
+ "answer": answer,
154
+ "materials": materials,
155
+ }
156
+ if args.stage:
157
+ payload["stage"] = args.stage
158
+ if isinstance(self_check, dict) and self_check:
159
+ payload["selfCheck"] = self_check
160
+ if isinstance(verify_record, dict) and verify_record:
161
+ payload["verifyRecord"] = verify_record
162
+ carry_runtime_meta(payload, source_meta)
163
+
164
+ raw_output = Path(args.output or "input.json").expanduser()
165
+ if raw_output.is_absolute():
166
+ output = raw_output.resolve()
167
+ elif run_dir is not None:
168
+ output = (run_dir / raw_output).resolve()
169
+ else:
170
+ print("错误:相对 --output 必须同时用 --run 指定运行目录", file=sys.stderr)
171
+ return 2
172
+ if output.suffix.lower() != ".json":
173
+ output = output.with_suffix(".json")
174
+ if output == SKILL_ROOT or is_within(output, SKILL_ROOT):
175
+ print(f"错误:产物不能写入 Skill 安装目录:{output}", file=sys.stderr)
176
+ return 2
177
+
178
+ output.parent.mkdir(parents=True, exist_ok=True)
179
+ output.write_text(json.dumps(payload, ensure_ascii=False, indent=1), encoding="utf-8")
180
+ print(f"已生成通用 JSON:{output}")
181
+ print(f" 材料 {len(materials)} 条 · 答案 {len(answer)} 字"
182
+ f" · 自检 {'有' if payload.get('selfCheck') else '无'}"
183
+ f" · 补搜记录 {len((payload.get('search_meta') or {}).get('calls') or [])} 条")
184
+ return 0
185
+
186
+
187
+ if __name__ == "__main__":
188
+ raise SystemExit(main())
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- PPT Master - SVG Coordinate Compactor
3
+ 深知可信PPT - SVG Coordinate Compactor
4
4
 
5
5
  Compact model-facing page-space SVG coordinates to at most two decimal places
6
6
  without rounding normalized crop ratios or transform linear coefficients.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- PPT Master - Unified Configuration Management Module
3
+ 深知可信PPT - Unified Configuration Management Module
4
4
 
5
5
  Centrally manages all project configuration items to ensure consistency and maintainability.
6
6
 
@@ -51,7 +51,7 @@ CHART_TEMPLATES_DIR = TEMPLATES_DIR / 'charts'
51
51
  # Environment Configuration
52
52
  # ============================================================
53
53
 
54
- USER_CONFIG_DIR = Path.home() / '.ppt-master'
54
+ USER_CONFIG_DIR = Path.home() / '.dknowc-ppt'
55
55
  USER_ENV_FILE = USER_CONFIG_DIR / '.env'
56
56
 
57
57
 
@@ -494,14 +494,14 @@ LAYOUT_MARGINS = {
494
494
  # Keep the exported authority key as the compatibility router for existing
495
495
  # config consumers.
496
496
  SVG_CONSTRAINTS = {
497
- 'authority': 'skills/ppt-master/references/shared-standards.md',
498
- 'core_authority': 'skills/ppt-master/references/shared-standards-core.md',
497
+ 'authority': 'references/svg-authoring.md',
498
+ 'core_authority': 'references/svg-authoring.md',
499
499
  'conditional_authorities': {
500
- 'effects': 'skills/ppt-master/references/svg-effects.md',
501
- 'native_data': 'skills/ppt-master/references/native-data-interface.md',
502
- 'pptx_structure': 'skills/ppt-master/references/pptx-structure-interface.md',
500
+ 'effects': 'references/svg-authoring.md',
501
+ 'native_data': 'references/svg-authoring.md',
502
+ 'pptx_structure': 'references/svg-authoring.md',
503
503
  },
504
- 'validator': 'skills/ppt-master/scripts/svg_quality_checker.py',
504
+ 'validator': 'scripts/svg_quality_checker.py',
505
505
  }
506
506
 
507
507
 
@@ -645,7 +645,7 @@ class Config:
645
645
  def build_parser() -> argparse.ArgumentParser:
646
646
  """Build the command-line parser."""
647
647
  parser = argparse.ArgumentParser(
648
- description="PPT Master configuration management tool.",
648
+ description="深知可信PPT configuration management tool.",
649
649
  )
650
650
  subparsers = parser.add_subparsers(dest="command", required=True)
651
651
  subparsers.add_parser("list-formats", help="List all canvas formats")
@@ -2,8 +2,7 @@
2
2
  """Console encoding helpers for dknowc PPT assistant CLI scripts.
3
3
 
4
4
  Adapted from ppt-master (MIT, Copyright (c) 2025-2026 Hugo He):
5
- UTF-8 stdio configuration only. The upstream official-distribution identity
6
- gates are intentionally removed for this extracted subset; MIT attribution is
5
+ UTF-8 stdio configuration only. This is an extracted subset; MIT attribution is
7
6
  preserved in THIRD_PARTY_NOTICES.md at the skill root.
8
7
  """
9
8
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- PPT Master - Error Message Helper
3
+ 深知可信PPT - Error Message Helper
4
4
 
5
5
  Provides user-friendly error messages and specific fix suggestions.
6
6
  """
@@ -377,7 +377,7 @@ class ErrorHelper:
377
377
  @classmethod
378
378
  def print_help(cls):
379
379
  """Print all error types and solutions."""
380
- print("PPT Master - Error Types and Solutions\n")
380
+ print("深知可信PPT - Error Types and Solutions\n")
381
381
  print("=" * 80)
382
382
 
383
383
  for error_type, info in cls.ERROR_SOLUTIONS.items():
@@ -393,7 +393,7 @@ class ErrorHelper:
393
393
  def build_parser() -> argparse.ArgumentParser:
394
394
  """Build the command-line parser."""
395
395
  parser = argparse.ArgumentParser(
396
- description="Look up PPT Master error messages and suggested fixes.",
396
+ description="Look up 深知可信PPT error messages and suggested fixes.",
397
397
  )
398
398
  parser.add_argument(
399
399
  "error_type",
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- PPT Master - Hyperlink Contract
3
+ 深知可信PPT - Hyperlink Contract
4
4
 
5
5
  Parse and validate the shared SVG hyperlink surface used by quality checks,
6
6
  SVG-to-PPTX export, and PPTX-to-SVG round-trip conversion.