@lemoncat7/dsh-partner 2.8.0 → 2.8.2

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 (793) hide show
  1. package/docs/THIRD_PARTY_LICENSES.md +10 -0
  2. package/docs/blocked-delivery-recovery.md +7 -0
  3. package/docs/concern-attention.md +19 -0
  4. package/docs/observation-contract.md +11 -0
  5. package/docs/releases/2.8.1.md +11 -0
  6. package/docs/releases/2.8.2.md +7 -0
  7. package/lib/agent-runtime.d.ts +7 -0
  8. package/lib/agent-runtime.d.ts.map +1 -1
  9. package/lib/agent-runtime.js +110 -32
  10. package/lib/agent-runtime.js.map +1 -1
  11. package/lib/api.js +28 -6
  12. package/lib/api.js.map +1 -1
  13. package/lib/autonomy.d.ts.map +1 -1
  14. package/lib/autonomy.js +5 -0
  15. package/lib/autonomy.js.map +1 -1
  16. package/lib/channel-message.d.ts +2 -0
  17. package/lib/channel-message.d.ts.map +1 -1
  18. package/lib/channel-message.js.map +1 -1
  19. package/lib/channels/manager.d.ts.map +1 -1
  20. package/lib/channels/manager.js +4 -3
  21. package/lib/channels/manager.js.map +1 -1
  22. package/lib/channels/notification-delivery.d.ts.map +1 -1
  23. package/lib/channels/notification-delivery.js +10 -0
  24. package/lib/channels/notification-delivery.js.map +1 -1
  25. package/lib/channels/weixin/connect.d.ts.map +1 -1
  26. package/lib/client-api.d.ts +7 -2
  27. package/lib/client-api.d.ts.map +1 -1
  28. package/lib/client-api.js +8 -1
  29. package/lib/client-api.js.map +1 -1
  30. package/lib/client.d.ts.map +1 -1
  31. package/lib/client.js +2115 -1884
  32. package/lib/client.js.map +4 -4
  33. package/lib/collaboration/composition.js +1 -1
  34. package/lib/collaboration/composition.js.map +1 -1
  35. package/lib/concern-attention.d.ts +19 -0
  36. package/lib/concern-attention.d.ts.map +1 -0
  37. package/lib/concern-attention.js +36 -0
  38. package/lib/concern-attention.js.map +1 -0
  39. package/lib/concern-domain.d.ts +7 -1
  40. package/lib/concern-domain.d.ts.map +1 -1
  41. package/lib/concern-domain.js +4 -0
  42. package/lib/concern-domain.js.map +1 -1
  43. package/lib/concern-execution-notes.d.ts +18 -0
  44. package/lib/concern-execution-notes.d.ts.map +1 -0
  45. package/lib/concern-execution-notes.js +41 -0
  46. package/lib/concern-execution-notes.js.map +1 -0
  47. package/lib/concern-execution-receipt.d.ts +4 -0
  48. package/lib/concern-execution-receipt.d.ts.map +1 -0
  49. package/lib/concern-execution-receipt.js +28 -0
  50. package/lib/concern-execution-receipt.js.map +1 -0
  51. package/lib/concern-execution.d.ts +30 -0
  52. package/lib/concern-execution.d.ts.map +1 -0
  53. package/lib/concern-execution.js +86 -0
  54. package/lib/concern-execution.js.map +1 -0
  55. package/lib/concern-management-tool.d.ts.map +1 -1
  56. package/lib/concern-management-tool.js +21 -19
  57. package/lib/concern-management-tool.js.map +1 -1
  58. package/lib/concern-note-source.d.ts +7 -0
  59. package/lib/concern-note-source.d.ts.map +1 -0
  60. package/lib/concern-note-source.js +25 -0
  61. package/lib/concern-note-source.js.map +1 -0
  62. package/lib/concern-resources.d.ts +27 -0
  63. package/lib/concern-resources.d.ts.map +1 -0
  64. package/lib/concern-resources.js +36 -0
  65. package/lib/concern-resources.js.map +1 -0
  66. package/lib/concern-sources.d.ts +1 -1
  67. package/lib/concern-sources.d.ts.map +1 -1
  68. package/lib/concern-store.d.ts +9 -1
  69. package/lib/concern-store.d.ts.map +1 -1
  70. package/lib/concern-store.js +111 -34
  71. package/lib/concern-store.js.map +1 -1
  72. package/lib/concern-tool.d.ts +1 -0
  73. package/lib/concern-tool.d.ts.map +1 -1
  74. package/lib/concern-tool.js +8 -4
  75. package/lib/concern-tool.js.map +1 -1
  76. package/lib/decision/conversation.d.ts +11 -0
  77. package/lib/decision/conversation.d.ts.map +1 -0
  78. package/lib/decision/conversation.js +52 -0
  79. package/lib/decision/conversation.js.map +1 -0
  80. package/lib/decision/events.d.ts +16 -0
  81. package/lib/decision/events.d.ts.map +1 -0
  82. package/lib/decision/events.js +9 -0
  83. package/lib/decision/events.js.map +1 -0
  84. package/lib/domain.d.ts +2 -0
  85. package/lib/domain.d.ts.map +1 -1
  86. package/lib/domain.js.map +1 -1
  87. package/lib/heartbeat.d.ts +12 -10
  88. package/lib/heartbeat.d.ts.map +1 -1
  89. package/lib/heartbeat.js +54 -26
  90. package/lib/heartbeat.js.map +1 -1
  91. package/lib/index.d.ts.map +1 -1
  92. package/lib/index.js +3 -0
  93. package/lib/index.js.map +1 -1
  94. package/lib/memory-prompt-context.js +1 -0
  95. package/lib/memory-prompt-context.js.map +1 -1
  96. package/lib/memory-reflection.js +1 -1
  97. package/lib/observation-contract.d.ts +9 -0
  98. package/lib/observation-contract.d.ts.map +1 -0
  99. package/lib/observation-contract.js +19 -0
  100. package/lib/observation-contract.js.map +1 -0
  101. package/lib/observation-executor.d.ts +5 -0
  102. package/lib/observation-executor.d.ts.map +1 -1
  103. package/lib/observation-executor.js +17 -1
  104. package/lib/observation-executor.js.map +1 -1
  105. package/lib/observation-loop.d.ts +5 -0
  106. package/lib/observation-loop.d.ts.map +1 -1
  107. package/lib/observation-loop.js +36 -3
  108. package/lib/observation-loop.js.map +1 -1
  109. package/lib/observation-sources.d.ts +14 -0
  110. package/lib/observation-sources.d.ts.map +1 -0
  111. package/lib/observation-sources.js +12 -0
  112. package/lib/observation-sources.js.map +1 -0
  113. package/lib/requirements/service.d.ts.map +1 -1
  114. package/lib/requirements/service.js +2 -0
  115. package/lib/requirements/service.js.map +1 -1
  116. package/lib/requirements/worker.d.ts.map +1 -1
  117. package/lib/requirements/worker.js +1 -0
  118. package/lib/requirements/worker.js.map +1 -1
  119. package/lib/scheduler/continuations.d.ts.map +1 -1
  120. package/lib/scheduler/continuations.js +17 -3
  121. package/lib/scheduler/continuations.js.map +1 -1
  122. package/lib/skills/builtin.d.ts.map +1 -1
  123. package/lib/skills/builtin.js +2 -0
  124. package/lib/skills/builtin.js.map +1 -1
  125. package/lib/skills/drama-builtin.d.ts.map +1 -1
  126. package/lib/skills/drama-builtin.js +13 -1
  127. package/lib/skills/drama-builtin.js.map +1 -1
  128. package/lib/skills/story-builtins.d.ts +3 -0
  129. package/lib/skills/story-builtins.d.ts.map +1 -0
  130. package/lib/skills/story-builtins.js +72 -0
  131. package/lib/skills/story-builtins.js.map +1 -0
  132. package/lib/skills/viora-canvas-builtin.d.ts.map +1 -1
  133. package/lib/skills/viora-canvas-builtin.js +12 -1
  134. package/lib/skills/viora-canvas-builtin.js.map +1 -1
  135. package/lib/snapshot-cache.d.ts +7 -0
  136. package/lib/snapshot-cache.d.ts.map +1 -0
  137. package/lib/snapshot-cache.js +26 -0
  138. package/lib/snapshot-cache.js.map +1 -0
  139. package/lib/tasks/result.js +1 -1
  140. package/lib/tasks/result.js.map +1 -1
  141. package/lib/ui/memory/concern-board.d.ts +1 -1
  142. package/lib/ui/memory/concern-board.d.ts.map +1 -1
  143. package/lib/ui/memory/concern-board.js +12 -6
  144. package/lib/ui/memory/concern-board.js.map +1 -1
  145. package/lib/ui/memory/concern-deletion.d.ts.map +1 -1
  146. package/lib/ui/memory/concern-deletion.js +2 -1
  147. package/lib/ui/memory/concern-deletion.js.map +1 -1
  148. package/lib/ui/memory/concern-editor.d.ts.map +1 -1
  149. package/lib/ui/memory/concern-editor.js +5 -3
  150. package/lib/ui/memory/concern-editor.js.map +1 -1
  151. package/lib/ui/memory/concern-execution-fields.d.ts +7 -0
  152. package/lib/ui/memory/concern-execution-fields.d.ts.map +1 -0
  153. package/lib/ui/memory/concern-execution-fields.js +8 -0
  154. package/lib/ui/memory/concern-execution-fields.js.map +1 -0
  155. package/lib/ui/memory/concern-feedback.d.ts +15 -0
  156. package/lib/ui/memory/concern-feedback.d.ts.map +1 -0
  157. package/lib/ui/memory/concern-feedback.js +13 -0
  158. package/lib/ui/memory/concern-feedback.js.map +1 -0
  159. package/lib/ui/memory/concern-panel.d.ts.map +1 -1
  160. package/lib/ui/memory/concern-panel.js +11 -3
  161. package/lib/ui/memory/concern-panel.js.map +1 -1
  162. package/package.json +6 -1
  163. package/resources/skills/novel-game-creation/manifest.json +393 -0
  164. package/resources/skills/novel-game-creation/upstream/LICENSE +21 -0
  165. package/resources/skills/novel-game-creation/upstream/README.md +420 -0
  166. package/resources/skills/novel-game-creation/upstream/README_ZH.md +421 -0
  167. package/resources/skills/novel-game-creation/upstream/VERSION +1 -0
  168. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/BUILD_BRIEF.md +219 -0
  169. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/.vercelignore +3 -0
  170. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/RUN.md +138 -0
  171. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/bg/compound_new_guofeng.webp +0 -0
  172. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/fate_coda.webp +0 -0
  173. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/meng.webp +0 -0
  174. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/pan.webp +0 -0
  175. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/pinger.webp +0 -0
  176. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/xuee.webp +0 -0
  177. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/yue.webp +0 -0
  178. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_accord_five.webp +0 -0
  179. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_afterglow_five.webp +0 -0
  180. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_alliance.webp +0 -0
  181. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day10.webp +0 -0
  182. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day15.webp +0 -0
  183. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day5.webp +0 -0
  184. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/title_new_guofeng.webp +0 -0
  185. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/pan_pinger.webp +0 -0
  186. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/pan_xuee.webp +0 -0
  187. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_meng.webp +0 -0
  188. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_pan.webp +0 -0
  189. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_pinger.webp +0 -0
  190. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/meng/explicit.webp +0 -0
  191. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/meng/prelude.webp +0 -0
  192. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/meng.webp +0 -0
  193. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/pan.webp +0 -0
  194. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/pinger.webp +0 -0
  195. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/xuee.webp +0 -0
  196. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/yue.webp +0 -0
  197. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pan/explicit.webp +0 -0
  198. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pan/prelude.webp +0 -0
  199. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pinger/explicit.webp +0 -0
  200. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pinger/prelude.webp +0 -0
  201. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/xuee/explicit.webp +0 -0
  202. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/xuee/prelude.webp +0 -0
  203. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/yue/explicit.webp +0 -0
  204. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/yue/prelude.webp +0 -0
  205. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/meng/night.webp +0 -0
  206. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/pan/night.webp +0 -0
  207. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/pinger/night.webp +0 -0
  208. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/xuee/night.webp +0 -0
  209. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/yue/night.webp +0 -0
  210. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/household/li_jiaoer.webp +0 -0
  211. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/scene/gate_collector.webp +0 -0
  212. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/css/new-guofeng.css +1494 -0
  213. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/css/style.css +2508 -0
  214. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/index.html +18 -0
  215. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/assets.js +147 -0
  216. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/audio.js +332 -0
  217. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/data.js +7470 -0
  218. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/engine.js +13066 -0
  219. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/main.js +3051 -0
  220. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/text.js +32 -0
  221. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/package.json +11 -0
  222. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/vercel.json +23 -0
  223. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/art/generated-art.json +161 -0
  224. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/example.json +12 -0
  225. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/README.md +26 -0
  226. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/playable-model.json +99 -0
  227. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/verification.json +41 -0
  228. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/verify_playable_model.mjs +152 -0
  229. package/resources/skills/novel-game-creation/upstream/manifest.json +498 -0
  230. package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/SKILL.md +47 -0
  231. package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/agents/openai.yaml +4 -0
  232. package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/references/art-direction-method.md +40 -0
  233. package/resources/skills/novel-game-creation/upstream/skills/game-build/SKILL.md +66 -0
  234. package/resources/skills/novel-game-creation/upstream/skills/game-build/agents/openai.yaml +4 -0
  235. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/blender-asset-workflow.md +24 -0
  236. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/build-brief-contract.md +72 -0
  237. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/generative-media-pipeline.md +25 -0
  238. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/playable-model-contract.md +46 -0
  239. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/tts-production-contract.md +23 -0
  240. package/resources/skills/novel-game-creation/upstream/skills/game-concept/SKILL.md +54 -0
  241. package/resources/skills/novel-game-creation/upstream/skills/game-concept/agents/openai.yaml +4 -0
  242. package/resources/skills/novel-game-creation/upstream/skills/game-concept/references/concept-method.md +47 -0
  243. package/resources/skills/novel-game-creation/upstream/skills/game-qa/SKILL.md +39 -0
  244. package/resources/skills/novel-game-creation/upstream/skills/game-qa/agents/openai.yaml +4 -0
  245. package/resources/skills/novel-game-creation/upstream/skills/game-qa/references/qa-contract.md +66 -0
  246. package/resources/skills/novel-game-creation/upstream/skills/game-qa/references/test-design-method.md +49 -0
  247. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/SKILL.md +50 -0
  248. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/agents/openai.yaml +4 -0
  249. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/narrative-design-method.md +35 -0
  250. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/numeric-design-method.md +22 -0
  251. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/world-design-method.md +57 -0
  252. package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/SKILL.md +68 -0
  253. package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/agents/openai.yaml +4 -0
  254. package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/references/gameability-protocol.md +65 -0
  255. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/SKILL.md +54 -0
  256. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/agents/openai.yaml +4 -0
  257. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/references/intake-method.md +50 -0
  258. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/references/pipeline-contract.md +60 -0
  259. package/resources/skills/story-creation/manifest.json +1477 -0
  260. package/resources/skills/story-creation/upstream/LICENSE.upstream +21 -0
  261. package/resources/skills/story-creation/upstream/manifest.json +1861 -0
  262. package/resources/skills/story-creation/upstream/roles/chapter-extractor.md +254 -0
  263. package/resources/skills/story-creation/upstream/roles/character-designer.md +168 -0
  264. package/resources/skills/story-creation/upstream/roles/consistency-checker.md +192 -0
  265. package/resources/skills/story-creation/upstream/roles/narrative-writer.md +105 -0
  266. package/resources/skills/story-creation/upstream/roles/story-architect.md +139 -0
  267. package/resources/skills/story-creation/upstream/roles/story-explorer.md +262 -0
  268. package/resources/skills/story-creation/upstream/roles/story-researcher.md +303 -0
  269. package/resources/skills/story-creation/upstream/skills/browser-cdp/SKILL.md +175 -0
  270. package/resources/skills/story-creation/upstream/skills/story/SKILL.md +129 -0
  271. package/resources/skills/story-creation/upstream/skills/story/VERSION +1 -0
  272. package/resources/skills/story-creation/upstream/skills/story/references/author-memory-maintenance.md +75 -0
  273. package/resources/skills/story-creation/upstream/skills/story/references/author-memory.md +117 -0
  274. package/resources/skills/story-creation/upstream/skills/story/scripts/author_memory_commit.py +1635 -0
  275. package/resources/skills/story-creation/upstream/skills/story-cover/SKILL.md +336 -0
  276. package/resources/skills/story-creation/upstream/skills/story-cover/references/cover-styles.md +210 -0
  277. package/resources/skills/story-creation/upstream/skills/story-deslop/SKILL.md +274 -0
  278. package/resources/skills/story-creation/upstream/skills/story-deslop/references/agent-calls.md +5 -0
  279. package/resources/skills/story-creation/upstream/skills/story-deslop/references/anti-ai-writing.md +556 -0
  280. package/resources/skills/story-creation/upstream/skills/story-deslop/references/author-memory-maintenance.md +75 -0
  281. package/resources/skills/story-creation/upstream/skills/story-deslop/references/author-memory.md +117 -0
  282. package/resources/skills/story-creation/upstream/skills/story-deslop/references/banned-words.md +151 -0
  283. package/resources/skills/story-creation/upstream/skills/story-deslop/references/deslop-gates.md +171 -0
  284. package/resources/skills/story-creation/upstream/skills/story-deslop/references/style-resolution.md +27 -0
  285. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/author_memory_commit.py +1635 -0
  286. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/check-ai-patterns.js +1586 -0
  287. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/check-degeneration.js +349 -0
  288. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/normalize-punctuation.js +415 -0
  289. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/style-whitelist.js +39 -0
  290. package/resources/skills/story-creation/upstream/skills/story-import/SKILL.md +127 -0
  291. package/resources/skills/story-creation/upstream/skills/story-import/references/character-state-reverse.md +82 -0
  292. package/resources/skills/story-creation/upstream/skills/story-import/references/deep-analysis.md +47 -0
  293. package/resources/skills/story-creation/upstream/skills/story-import/references/format-and-structure.md +168 -0
  294. package/resources/skills/story-creation/upstream/skills/story-import/references/import-report.md +64 -0
  295. package/resources/skills/story-creation/upstream/skills/story-import/references/import-special-cases.md +34 -0
  296. package/resources/skills/story-creation/upstream/skills/story-import/references/import-tracking.md +95 -0
  297. package/resources/skills/story-creation/upstream/skills/story-import/references/length-routing.md +134 -0
  298. package/resources/skills/story-creation/upstream/skills/story-import/references/outline-reverse-rules.md +79 -0
  299. package/resources/skills/story-creation/upstream/skills/story-import/references/outline-reverse.md +24 -0
  300. package/resources/skills/story-creation/upstream/skills/story-import/references/state-tracking.md +43 -0
  301. package/resources/skills/story-creation/upstream/skills/story-import/references/structure-mapping-long.md +448 -0
  302. package/resources/skills/story-creation/upstream/skills/story-import/references/structure-mapping-short.md +187 -0
  303. package/resources/skills/story-creation/upstream/skills/story-import/references/tracking-initialization.md +31 -0
  304. package/resources/skills/story-creation/upstream/skills/story-import/references/tracking-transaction.md +146 -0
  305. package/resources/skills/story-creation/upstream/skills/story-import/scripts/build_outline_brief.py +332 -0
  306. package/resources/skills/story-creation/upstream/skills/story-import/scripts/check-outline-contract.js +520 -0
  307. package/resources/skills/story-creation/upstream/skills/story-import/scripts/tracking_commit.py +1691 -0
  308. package/resources/skills/story-creation/upstream/skills/story-import/scripts/wordcount_core.py +405 -0
  309. package/resources/skills/story-creation/upstream/skills/story-long-analyze/SKILL.md +140 -0
  310. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/author-facing.md +252 -0
  311. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/deconstruction-notes.md +270 -0
  312. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/final-checks.md +19 -0
  313. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/index-rebuild.md +11 -0
  314. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/inspiration-library.md +105 -0
  315. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/pipeline-ops.md +154 -0
  316. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/semantic-acceptance-fixtures.md +84 -0
  317. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage1-golden-chapters.md +128 -0
  318. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage2-extraction.md +229 -0
  319. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage3-plot-rhythm.md +480 -0
  320. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage4-characters-settings.md +195 -0
  321. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage5-report.md +33 -0
  322. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/style-profile-generator.md +76 -0
  323. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/style-profile-protocol.md +133 -0
  324. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/synthesis-inputs.md +39 -0
  325. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/build_chapter_index.py +466 -0
  326. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/inspect_existing_assets.py +702 -0
  327. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/inspiration_index.py +864 -0
  328. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/manage_analysis_run.py +1145 -0
  329. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/render_relation_chart.py +425 -0
  330. package/resources/skills/story-creation/upstream/skills/story-long-scan/SKILL.md +193 -0
  331. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/genre-trends.md +197 -0
  332. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-ciweimao.md +19 -0
  333. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-fanqie.md +45 -0
  334. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-jjwxc.md +28 -0
  335. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-qidian.md +35 -0
  336. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-qimao.md +27 -0
  337. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/publishing-guide.md +114 -0
  338. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/reader-profiling.md +105 -0
  339. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/topic-decision.md +82 -0
  340. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/aggregate-rank.js +682 -0
  341. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/cdp-utils.js +242 -0
  342. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/ciweimao-rank-scraper.js +240 -0
  343. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/fanqie-rank-scraper.js +658 -0
  344. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/jjwxc-rank-scraper.js +400 -0
  345. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/qidian-rank-scraper.js +592 -0
  346. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/qimao-rank-scraper.js +435 -0
  347. package/resources/skills/story-creation/upstream/skills/story-long-write/SKILL.md +136 -0
  348. package/resources/skills/story-creation/upstream/skills/story-long-write/references/agent-calls.md +47 -0
  349. package/resources/skills/story-creation/upstream/skills/story-long-write/references/anti-ai-writing.md +556 -0
  350. package/resources/skills/story-creation/upstream/skills/story-long-write/references/artifact-protocols.md +183 -0
  351. package/resources/skills/story-creation/upstream/skills/story-long-write/references/author-memory-maintenance.md +75 -0
  352. package/resources/skills/story-creation/upstream/skills/story-long-write/references/author-memory.md +117 -0
  353. package/resources/skills/story-creation/upstream/skills/story-long-write/references/banned-words.md +151 -0
  354. package/resources/skills/story-creation/upstream/skills/story-long-write/references/benchmark-recall.md +16 -0
  355. package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-basics.md +445 -0
  356. package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-design-methods.md +428 -0
  357. package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-relations.md +433 -0
  358. package/resources/skills/story-creation/upstream/skills/story-long-write/references/commercial-core-methods.md +502 -0
  359. package/resources/skills/story-creation/upstream/skills/story-long-write/references/cross-book-recall.md +88 -0
  360. package/resources/skills/story-creation/upstream/skills/story-long-write/references/deslop-gates.md +171 -0
  361. package/resources/skills/story-creation/upstream/skills/story-long-write/references/dialogue-mastery.md +288 -0
  362. package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotion-on-page.md +116 -0
  363. package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotional-arc-design.md +313 -0
  364. package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotional-methods.md +209 -0
  365. package/resources/skills/story-creation/upstream/skills/story-long-write/references/female-audience-writing.md +188 -0
  366. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//344/270/234/346/226/271/344/273/231/344/276/240.md +51 -0
  367. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//344/274/240/347/273/237/347/216/204/345/271/273.md +51 -0
  368. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/345/217/244/344/273/243.md +51 -0
  369. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/350/204/221/346/264/236.md +51 -0
  370. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
  371. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/244/350/250/200/350/204/221/346/264/236.md +51 -0
  372. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/244/351/243/216/344/270/226/346/203/205.md +51 -0
  373. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/346/202/254/347/226/221.md +51 -0
  374. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/347/247/215/347/224/260.md +51 -0
  375. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/256/253/346/226/227/345/256/205/346/226/227.md +51 -0
  376. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
  377. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
  378. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/347/201/265/345/274/202.md +51 -0
  379. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/350/204/221/346/264/236.md +51 -0
  380. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/210/230/347/245/236/350/265/230/345/251/277.md +51 -0
  381. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/212/227/346/210/230/350/260/215/346/210/230.md +51 -0
  382. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/230/237/345/205/211/347/222/200/347/222/250.md +51 -0
  383. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/260/221/345/233/275/350/250/200/346/203/205.md +51 -0
  384. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/270/270/346/210/217/344/275/223/350/202/262.md +51 -0
  385. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/204/221/346/264/236.md +53 -0
  386. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/250/200/346/203/205.md +51 -0
  387. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/260/350/250/200/350/204/221/346/264/236.md +51 -0
  388. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/247/221/345/271/273/346/234/253/344/270/226.md +51 -0
  389. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/201/214/345/234/272/345/251/232/346/201/213.md +51 -0
  390. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/245/277/346/226/271/345/245/207/345/271/273.md +51 -0
  391. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/261/252/351/227/250/346/200/273/350/243/201.md +53 -0
  392. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/344/277/256/347/234/237.md +51 -0
  393. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/346/227/245/345/270/270.md +53 -0
  394. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/347/247/215/347/224/260.md +51 -0
  395. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/350/204/221/346/264/236.md +53 -0
  396. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/351/253/230/346/255/246.md +53 -0
  397. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/235/222/346/230/245/347/224/234/345/256/240.md +51 -0
  398. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards.md +91 -0
  399. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-readers.md +235 -0
  400. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-chapter-hooks.md +225 -0
  401. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-chapter-quality.md +177 -0
  402. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-format.md +36 -0
  403. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-genre-catalog.md +394 -0
  404. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-genre-mechanics.md +415 -0
  405. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-reversal.md +335 -0
  406. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-suspense.md +352 -0
  407. package/resources/skills/story-creation/upstream/skills/story-long-write/references/opening-design.md +349 -0
  408. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-conflict.md +457 -0
  409. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-methods.md +287 -0
  410. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-rhythm.md +389 -0
  411. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-structure-theory.md +273 -0
  412. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-core-methods.md +522 -0
  413. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-emotion-system.md +354 -0
  414. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-frameworks.md +711 -0
  415. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-special-topics.md +622 -0
  416. package/resources/skills/story-creation/upstream/skills/story-long-write/references/project-files.md +114 -0
  417. package/resources/skills/story-creation/upstream/skills/story-long-write/references/reader-contract-and-progression.md +117 -0
  418. package/resources/skills/story-creation/upstream/skills/story-long-write/references/reference-index.md +86 -0
  419. package/resources/skills/story-creation/upstream/skills/story-long-write/references/stop-and-fix.md +9 -0
  420. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-combat-face.md +352 -0
  421. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-craft.md +327 -0
  422. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-genre-modules.md +510 -0
  423. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-resolution.md +27 -0
  424. package/resources/skills/story-creation/upstream/skills/story-long-write/references/tracking-initialization.md +31 -0
  425. package/resources/skills/story-creation/upstream/skills/story-long-write/references/tracking-transaction.md +146 -0
  426. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-chapter.md +104 -0
  427. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-daily.md +75 -0
  428. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-outline.md +157 -0
  429. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-revision.md +89 -0
  430. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-setup.md +170 -0
  431. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-volume.md +142 -0
  432. package/resources/skills/story-creation/upstream/skills/story-long-write/references/writer-prompt-fallback.md +24 -0
  433. package/resources/skills/story-creation/upstream/skills/story-long-write/references/writing-craft.md +442 -0
  434. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/author_memory_commit.py +1635 -0
  435. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/build_architect_brief.py +260 -0
  436. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/build_writer_prompt.py +611 -0
  437. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-ai-patterns.js +1586 -0
  438. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-degeneration.js +349 -0
  439. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-outline-contract.js +520 -0
  440. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-outline-copy.js +313 -0
  441. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/normalize-punctuation.js +415 -0
  442. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/outline_view.py +286 -0
  443. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/storyctl.py +561 -0
  444. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/style-whitelist.js +39 -0
  445. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/tracking_commit.py +1691 -0
  446. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/wordcount_core.py +405 -0
  447. package/resources/skills/story-creation/upstream/skills/story-review/SKILL.md +231 -0
  448. package/resources/skills/story-creation/upstream/skills/story-review/references/agent-prompts.md +184 -0
  449. package/resources/skills/story-creation/upstream/skills/story-review/references/anti-ai-writing.md +556 -0
  450. package/resources/skills/story-creation/upstream/skills/story-review/references/author-memory-maintenance.md +75 -0
  451. package/resources/skills/story-creation/upstream/skills/story-review/references/author-memory.md +117 -0
  452. package/resources/skills/story-creation/upstream/skills/story-review/references/banned-words.md +151 -0
  453. package/resources/skills/story-creation/upstream/skills/story-review/references/batch-review.md +19 -0
  454. package/resources/skills/story-creation/upstream/skills/story-review/references/character-relations.md +433 -0
  455. package/resources/skills/story-creation/upstream/skills/story-review/references/dialogue-mastery.md +288 -0
  456. package/resources/skills/story-creation/upstream/skills/story-review/references/plot-core-methods.md +522 -0
  457. package/resources/skills/story-creation/upstream/skills/story-review/references/quality-rubric.md +55 -0
  458. package/resources/skills/story-creation/upstream/skills/story-review/references/review-quality.md +246 -0
  459. package/resources/skills/story-creation/upstream/skills/story-review/references/review-tracking.md +10 -0
  460. package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/fanqie.md +18 -0
  461. package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/qidian.md +19 -0
  462. package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/zhihu.md +20 -0
  463. package/resources/skills/story-creation/upstream/skills/story-review/references/solo.md +52 -0
  464. package/resources/skills/story-creation/upstream/skills/story-review/references/style-resolution.md +27 -0
  465. package/resources/skills/story-creation/upstream/skills/story-review/references/tracking-initialization.md +31 -0
  466. package/resources/skills/story-creation/upstream/skills/story-review/references/tracking-transaction.md +146 -0
  467. package/resources/skills/story-creation/upstream/skills/story-review/scripts/author_memory_commit.py +1635 -0
  468. package/resources/skills/story-creation/upstream/skills/story-review/scripts/check-ai-patterns.js +1586 -0
  469. package/resources/skills/story-creation/upstream/skills/story-review/scripts/check-degeneration.js +349 -0
  470. package/resources/skills/story-creation/upstream/skills/story-review/scripts/normalize-punctuation.js +415 -0
  471. package/resources/skills/story-creation/upstream/skills/story-review/scripts/style-whitelist.js +39 -0
  472. package/resources/skills/story-creation/upstream/skills/story-review/scripts/tracking_commit.py +1691 -0
  473. package/resources/skills/story-creation/upstream/skills/story-review/scripts/wordcount_core.py +405 -0
  474. package/resources/skills/story-creation/upstream/skills/story-setup/SKILL.md +165 -0
  475. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/agent-quality.md +72 -0
  476. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/agent-reference-profiles.md +55 -0
  477. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/anti-ai-writing.md +556 -0
  478. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/banned-words.md +151 -0
  479. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/benchmark-style-load.md +107 -0
  480. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-basics.md +445 -0
  481. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-design-methods.md +428 -0
  482. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-relations.md +433 -0
  483. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/deslop-gates.md +171 -0
  484. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/dialogue-mastery.md +288 -0
  485. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/emotion-on-page.md +116 -0
  486. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/emotional-arc-design.md +313 -0
  487. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/format-and-structure.md +168 -0
  488. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//344/270/234/346/226/271/344/273/231/344/276/240.md +51 -0
  489. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//344/274/240/347/273/237/347/216/204/345/271/273.md +51 -0
  490. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/216/206/345/217/262/345/217/244/344/273/243.md +51 -0
  491. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/216/206/345/217/262/350/204/221/346/264/236.md +51 -0
  492. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
  493. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/244/350/250/200/350/204/221/346/264/236.md +51 -0
  494. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/244/351/243/216/344/270/226/346/203/205.md +51 -0
  495. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/245/263/351/242/221/346/202/254/347/226/221.md +51 -0
  496. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/245/263/351/242/221/347/247/215/347/224/260.md +51 -0
  497. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/256/253/346/226/227/345/256/205/346/226/227.md +51 -0
  498. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
  499. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
  500. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/202/254/347/226/221/347/201/265/345/274/202.md +51 -0
  501. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/202/254/347/226/221/350/204/221/346/264/236.md +51 -0
  502. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/210/230/347/245/236/350/265/230/345/251/277.md +51 -0
  503. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/212/227/346/210/230/350/260/215/346/210/230.md +51 -0
  504. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/230/237/345/205/211/347/222/200/347/222/250.md +51 -0
  505. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/260/221/345/233/275/350/250/200/346/203/205.md +51 -0
  506. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/270/270/346/210/217/344/275/223/350/202/262.md +51 -0
  507. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/204/345/271/273/350/204/221/346/264/236.md +53 -0
  508. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/204/345/271/273/350/250/200/346/203/205.md +51 -0
  509. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/260/350/250/200/350/204/221/346/264/236.md +51 -0
  510. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/247/221/345/271/273/346/234/253/344/270/226.md +51 -0
  511. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/201/214/345/234/272/345/251/232/346/201/213.md +51 -0
  512. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/245/277/346/226/271/345/245/207/345/271/273.md +51 -0
  513. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/261/252/351/227/250/346/200/273/350/243/201.md +53 -0
  514. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/344/277/256/347/234/237.md +51 -0
  515. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/346/227/245/345/270/270.md +53 -0
  516. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/347/247/215/347/224/260.md +51 -0
  517. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/350/204/221/346/264/236.md +53 -0
  518. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/351/253/230/346/255/246.md +53 -0
  519. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/235/222/346/230/245/347/224/234/345/256/240.md +51 -0
  520. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards.md +91 -0
  521. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-readers.md +235 -0
  522. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-chapter-hooks.md +225 -0
  523. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-emotional-methods.md +209 -0
  524. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-genre-catalog.md +394 -0
  525. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-genre-mechanics.md +415 -0
  526. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-quality.md +42 -0
  527. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-reversal.md +335 -0
  528. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-suspense.md +352 -0
  529. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/opening-design.md +349 -0
  530. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-conflict.md +457 -0
  531. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-methods.md +287 -0
  532. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-rhythm.md +389 -0
  533. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/plot-core-methods.md +522 -0
  534. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-chapter-hooks.md +225 -0
  535. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-emotional-methods.md +179 -0
  536. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-genre-formulas.md +417 -0
  537. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-paragraph-hooks.md +146 -0
  538. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-quality.md +39 -0
  539. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-reversal.md +355 -0
  540. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-suspense.md +352 -0
  541. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-combat-face.md +352 -0
  542. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-genre-modules.md +510 -0
  543. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-resolution.md +27 -0
  544. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/writing-craft.md +442 -0
  545. package/resources/skills/story-creation/upstream/skills/story-setup/references/diagnostics.md +38 -0
  546. package/resources/skills/story-creation/upstream/skills/story-short-analyze/SKILL.md +224 -0
  547. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-basics.md +453 -0
  548. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-design.md +438 -0
  549. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-relations.md +395 -0
  550. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-method.md +42 -0
  551. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-paragraph-hooks.md +146 -0
  552. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-reader-profile.md +245 -0
  553. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-report-style.md +45 -0
  554. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-genres.md +65 -0
  555. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-hooks.md +77 -0
  556. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-mechanics.md +82 -0
  557. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-patterns.md +50 -0
  558. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-suspense.md +98 -0
  559. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-writing-techniques.md +477 -0
  560. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/deconstruction-examples.md +79 -0
  561. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/optional-modules.md +97 -0
  562. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/output-contract.md +127 -0
  563. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/quality-checklist.md +80 -0
  564. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/real-market-data.md +90 -0
  565. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/source-story-quality.md +221 -0
  566. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/stage2-3-structure-emotion.md +308 -0
  567. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/stage4-6-reversal-summary.md +611 -0
  568. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/zhihu-style.md +54 -0
  569. package/resources/skills/story-creation/upstream/skills/story-short-scan/SKILL.md +182 -0
  570. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/manual-rank-input.md +36 -0
  571. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/platform-dianzhong.md +24 -0
  572. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/platform-heiyan.md +21 -0
  573. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/real-market-data.md +90 -0
  574. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/topic-match.md +38 -0
  575. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/aggregate-rank.js +682 -0
  576. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/cdp-utils.js +242 -0
  577. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/dz-browse-scraper.js +232 -0
  578. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/heiyan-booklist-scraper.js +345 -0
  579. package/resources/skills/story-creation/upstream/skills/story-short-write/SKILL.md +136 -0
  580. package/resources/skills/story-creation/upstream/skills/story-short-write/references/agent-calls.md +13 -0
  581. package/resources/skills/story-creation/upstream/skills/story-short-write/references/author-memory-maintenance.md +75 -0
  582. package/resources/skills/story-creation/upstream/skills/story-short-write/references/author-memory.md +117 -0
  583. package/resources/skills/story-creation/upstream/skills/story-short-write/references/banned-words.md +151 -0
  584. package/resources/skills/story-creation/upstream/skills/story-short-write/references/benchmark-recall.md +40 -0
  585. package/resources/skills/story-creation/upstream/skills/story-short-write/references/cross-book-recall.md +62 -0
  586. package/resources/skills/story-creation/upstream/skills/story-short-write/references/dialogue-mastery.md +288 -0
  587. package/resources/skills/story-creation/upstream/skills/story-short-write/references/emotional-methods.md +179 -0
  588. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//344/270/226/346/203/205/346/211/223/350/204/270.md +159 -0
  589. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/217/214/347/224/267/344/270/273.md +156 -0
  590. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/244/215/344/273/207/346/211/223/350/204/270.md +163 -0
  591. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/256/205/346/226/227/345/256/253/346/226/227.md +167 -0
  592. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/200/273/350/243/201/350/261/252/351/227/250.md +178 -0
  593. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/202/254/347/226/221.md +166 -0
  594. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/260/221/344/277/227/346/200/252/350/260/210.md +159 -0
  595. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/262/231/351/233/225/350/204/221/346/264/236.md +151 -0
  596. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//347/224/234/345/256/240.md +153 -0
  597. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//350/277/275/345/246/273/347/201/253/350/221/254/345/234/272.md +210 -0
  598. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-writing-formulas.md +417 -0
  599. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-writing-techniques.md +490 -0
  600. package/resources/skills/story-creation/upstream/skills/story-short-write/references/hooks-chapter.md +225 -0
  601. package/resources/skills/story-creation/upstream/skills/story-short-write/references/hooks-paragraph.md +146 -0
  602. package/resources/skills/story-creation/upstream/skills/story-short-write/references/output-contract.md +127 -0
  603. package/resources/skills/story-creation/upstream/skills/story-short-write/references/reference-index.md +23 -0
  604. package/resources/skills/story-creation/upstream/skills/story-short-write/references/scene-craft.md +40 -0
  605. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-craft.md +147 -0
  606. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-deslop.md +133 -0
  607. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-format.md +199 -0
  608. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-prose-quality.md +224 -0
  609. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-reversal.md +355 -0
  610. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-suspense.md +352 -0
  611. package/resources/skills/story-creation/upstream/skills/story-short-write/references/style-resolution.md +27 -0
  612. package/resources/skills/story-creation/upstream/skills/story-short-write/references/submission-craft.md +35 -0
  613. package/resources/skills/story-creation/upstream/skills/story-short-write/references/villain-and-reveal.md +153 -0
  614. package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-design.md +85 -0
  615. package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-draft.md +116 -0
  616. package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-revision.md +99 -0
  617. package/resources/skills/story-creation/upstream/skills/story-short-write/references/writing-workflow.md +50 -0
  618. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/author_memory_commit.py +1635 -0
  619. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-ai-patterns.js +1586 -0
  620. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-degeneration.js +349 -0
  621. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-delivery-contract.js +241 -0
  622. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-outline-copy.js +313 -0
  623. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-phase2-contract.js +363 -0
  624. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/normalize-punctuation.js +415 -0
  625. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/style-whitelist.js +39 -0
  626. package/resources/skills/video-recap-production/manifest.json +673 -0
  627. package/resources/skills/video-recap-production/upstream/CHANGELOG.md +371 -0
  628. package/resources/skills/video-recap-production/upstream/LICENSE +21 -0
  629. package/resources/skills/video-recap-production/upstream/README.en.md +468 -0
  630. package/resources/skills/video-recap-production/upstream/README.md +459 -0
  631. package/resources/skills/video-recap-production/upstream/manifest.json +839 -0
  632. package/resources/skills/video-recap-production/upstream/skills/video-assemble/SKILL.md +112 -0
  633. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/audio-modes.md +63 -0
  634. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/explicit-audio-mix.md +75 -0
  635. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/foreground-compose.md +118 -0
  636. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/LICENSE.duo-video +21 -0
  637. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/SOURCE.md +15 -0
  638. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_draft_meta_info.json +69 -0
  639. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_combination_segment.json +84 -0
  640. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_combination_video_material.json +98 -0
  641. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_draft.json +204 -0
  642. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_material_video.json +83 -0
  643. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_meta_material_value.json +23 -0
  644. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_project_info.json +133 -0
  645. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_segment.json +70 -0
  646. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_text_styles.json +30 -0
  647. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_yj_material_audio.json +41 -0
  648. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_yj_material_text.json +109 -0
  649. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/narration-adoption.md +103 -0
  650. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/packaging.md +45 -0
  651. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/pair-media.md +74 -0
  652. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/source-score.md +147 -0
  653. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/subtitle-track.md +202 -0
  654. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/__init__.py +1 -0
  655. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/audio_mix_binding.py +279 -0
  656. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/frozen_audio.py +187 -0
  657. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/narration_binding.py +323 -0
  658. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/strict_inputs.py +109 -0
  659. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/strict_publish.py +130 -0
  660. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/artifacts.py +47 -0
  661. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assemble.py +591 -0
  662. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assemble_constants.py +51 -0
  663. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assembly_contract.py +318 -0
  664. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assembly_settings.py +138 -0
  665. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/audio_automation.py +195 -0
  666. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/audio_mix.py +465 -0
  667. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/compose_foreground.py +293 -0
  668. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/export_jianying.py +254 -0
  669. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/__init__.py +1 -0
  670. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/builders.py +718 -0
  671. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/model.py +105 -0
  672. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/optional.py +23 -0
  673. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/schema.py +53 -0
  674. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/templates.py +37 -0
  675. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/timeline_contract.py +223 -0
  676. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/tracks.py +72 -0
  677. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/writer.py +383 -0
  678. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/lib.py +218 -0
  679. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/media.py +190 -0
  680. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/narration_audio.py +413 -0
  681. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/packaging.py +122 -0
  682. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/pair_media.py +216 -0
  683. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/render_preflight.py +33 -0
  684. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/source_score.py +469 -0
  685. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/source_subtitles.py +423 -0
  686. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/__init__.py +1 -0
  687. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/core.py +330 -0
  688. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/render.py +82 -0
  689. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/track.py +324 -0
  690. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/track_binding.py +200 -0
  691. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/timeline.py +217 -0
  692. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/timeline_emit.py +167 -0
  693. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/visual_render.py +448 -0
  694. package/resources/skills/video-recap-production/upstream/skills/video-cut/SKILL.md +108 -0
  695. package/resources/skills/video-recap-production/upstream/skills/video-cut/references/shot-review.md +50 -0
  696. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut.py +41 -0
  697. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_cli.py +308 -0
  698. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_contract.py +424 -0
  699. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_render.py +304 -0
  700. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/lib.py +114 -0
  701. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/media_geometry.py +238 -0
  702. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/narration_mapping.py +71 -0
  703. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/narrative_selection.py +244 -0
  704. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/sentence_boundaries.py +585 -0
  705. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/shot_review.py +357 -0
  706. package/resources/skills/video-recap-production/upstream/skills/video-recap/SKILL.md +260 -0
  707. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/audio-routing.md +126 -0
  708. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/config-playbook.md +65 -0
  709. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/data-schema.md +545 -0
  710. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/resource-library.md +151 -0
  711. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/shift-left-qc-schema.md +23 -0
  712. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/doctor.py +556 -0
  713. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/final_qc.py +527 -0
  714. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/lib.py +220 -0
  715. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/library.py +509 -0
  716. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/materials.py +406 -0
  717. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/mimo_qc.py +33 -0
  718. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/project_binding.py +286 -0
  719. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/__init__.py +1 -0
  720. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_client.py +13 -0
  721. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_contract.py +9 -0
  722. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_evidence.py +287 -0
  723. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_observations.py +175 -0
  724. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_payload.py +206 -0
  725. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_report.py +318 -0
  726. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_runner.py +130 -0
  727. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc_contract.py +320 -0
  728. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap.py +9 -0
  729. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_cli.py +209 -0
  730. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_inspect.py +452 -0
  731. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_review.py +70 -0
  732. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_runner.py +696 -0
  733. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_runtime.py +260 -0
  734. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_source.py +278 -0
  735. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_stage_qc.py +160 -0
  736. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_timeline.py +621 -0
  737. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/resource_lock.py +162 -0
  738. package/resources/skills/video-recap-production/upstream/skills/video-script/SKILL.md +251 -0
  739. package/resources/skills/video-recap-production/upstream/skills/video-script/references/creative-editing-playbook.md +229 -0
  740. package/resources/skills/video-recap-production/upstream/skills/video-script/references/promotional-copy.md +68 -0
  741. package/resources/skills/video-recap-production/upstream/skills/video-script/references/research-guide.md +75 -0
  742. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/agent_text.py +301 -0
  743. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/deslop_qc.py +211 -0
  744. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/evidence_bundle.py +440 -0
  745. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/lib.py +254 -0
  746. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/narration_lint.py +707 -0
  747. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review.py +40 -0
  748. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_grounding.py +238 -0
  749. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_response.py +669 -0
  750. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_runner.py +186 -0
  751. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/speech_ownership.py +143 -0
  752. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/timeline_fusion.py +108 -0
  753. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/validate.py +175 -0
  754. package/resources/skills/video-recap-production/upstream/skills/video-understanding/SKILL.md +77 -0
  755. package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/data-schema.md +193 -0
  756. package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/prompt-templates.md +37 -0
  757. package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/research-guide.md +74 -0
  758. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/agent_text.py +301 -0
  759. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/asr.py +279 -0
  760. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/asr_timing_evidence.py +270 -0
  761. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/brief.py +9 -0
  762. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/__init__.py +1 -0
  763. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/builder.py +402 -0
  764. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/context.py +317 -0
  765. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/inputs.py +268 -0
  766. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/timeline.py +326 -0
  767. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/consolidate.py +596 -0
  768. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/deslop_qc.py +211 -0
  769. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/detect.py +504 -0
  770. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/extract.py +62 -0
  771. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/lib.py +419 -0
  772. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/narration_lint.py +707 -0
  773. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/speech_ownership.py +143 -0
  774. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/storyboard.py +445 -0
  775. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/timeline_fusion.py +108 -0
  776. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understand.py +9 -0
  777. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_brief.py +190 -0
  778. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_cache.py +345 -0
  779. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_runner.py +387 -0
  780. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_storyboard.py +167 -0
  781. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/vlm.py +674 -0
  782. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/SKILL.md +91 -0
  783. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/references/index-tts.md +31 -0
  784. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/approved_text_policy.py +123 -0
  785. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/dub.py +623 -0
  786. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/lib.py +352 -0
  787. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/__init__.py +1 -0
  788. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/fish_audio.py +91 -0
  789. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/index_tts.py +184 -0
  790. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/tts_audio.py +102 -0
  791. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/voiceover.py +771 -0
  792. package/resources/skills/viora-canvas-production/manifest.json +5 -1
  793. package/resources/skills/viora-canvas-production/references/story-handoff.md +49 -0
@@ -1,20 +1,25 @@
1
+ import { concernResourcesSchema, validateConcernResources } from './concern-resources.js';
1
2
  import { record, requiredText } from './core/validation.js';
2
3
  /** Management stays scoped to the current companion; ids and revisions come from list. */
3
4
  export function concernManagementTool(store, concerns) {
4
5
  return {
5
6
  name: 'partner_concerns',
6
- description: 'List, update, resolve, stop or delete this companion’s ongoing watches. Use list first for exact concernId and expectedUpdatedAt; never guess a target. User requests to change/stop watching use this tool, not a new suggestion or a schedule. Resolve verified completed matters; delete only when the user requests removal. One-shot work belongs to the task board, not ongoing watches.',
7
+ description: 'Autonomously maintain this companion’s ongoing watches: list, update content/priority, resolve, archive or restore. No explicit user authorization phrase is required. Use list for exact concernId and expectedUpdatedAt. priority is attention (0–1): >=.8 focus, >=.4 follow, below .4 observe; implicit watches below .18 archive. Explain each change with reason based on relevance, impact and progress, not silence alone. Explicit user watches may be archived only when resolved or expired. User-pinned/stopped controls cannot be overridden. Reuse existing watches; one-shot work belongs to the task board. Permanent deletion is UI-only.',
7
8
  parameters: { type: 'object', additionalProperties: false, properties: {
8
- action: { type: 'string', enum: ['list', 'update', 'resolve', 'stop', 'delete'] },
9
+ action: { type: 'string', enum: ['list', 'update', 'resolve', 'archive', 'restore', 'stop'] },
10
+ resources: concernResourcesSchema,
9
11
  concernId: { type: 'string' }, expectedUpdatedAt: { type: 'integer' },
10
12
  subject: { type: 'string' }, reason: { type: 'string' }, watchQuery: { type: 'string' },
13
+ details: { type: 'string', description: 'Optional replacement watch instructions. reason explains this adjustment only; omit details to preserve existing instructions.' },
14
+ priority: { type: 'number', minimum: 0, maximum: 1 },
15
+ conclusion: { type: 'string', enum: ['resolved', 'expired', 'irrelevant'] },
11
16
  }, required: ['action'] },
12
17
  output: { schema: { type: 'string' }, render: (_args, value) => [{ type: 'text', text: String(value) }] },
13
18
  async execute(raw, exec) {
14
19
  const state = store.snapshot();
15
20
  const route = state.sessions.find(s => s.sessionId === exec.agent?.session.id);
16
- if (!route || !state.companions.find(c => c.id === route.companionId)?.automation.memory.enabled)
17
- throw new Error('当前伙伴记忆未启用');
21
+ if (!route || !state.companions.some(c => c.id === route.companionId))
22
+ throw new Error('关注管理仅用于有效的伙伴会话');
18
23
  const input = record(raw, 'arguments');
19
24
  if (input.action === 'list')
20
25
  return JSON.stringify(await concerns.list(route.companionId, undefined, true, 1000));
@@ -24,21 +29,18 @@ export function concernManagementTool(store, concerns) {
24
29
  throw new Error('当前伙伴没有此关注,请重新 list');
25
30
  if (!Number.isSafeInteger(input.expectedUpdatedAt) || input.expectedUpdatedAt !== entry.updatedAt)
26
31
  throw new Error('关注已变化,请 list 后使用最新 expectedUpdatedAt');
27
- if (input.action === 'update')
28
- return JSON.stringify(await concerns.editExplicit(route.companionId, id, {
29
- subject: input.subject === undefined ? entry.subject : requiredText(input.subject, 'subject', 300),
30
- reason: input.reason === undefined ? entry.reason : requiredText(input.reason, 'reason', 800),
31
- sources: entry.resources.map(r => r.kind === 'knowledge' ? `@知识库[${r.locator}]` : `@"${r.locator}"`).join(' '),
32
- expectedUpdatedAt: entry.updatedAt, recordTarget: entry.recordTarget,
33
- watchKind: entry.watchKind, watchQuery: input.watchQuery === undefined ? entry.watchQuery : requiredText(input.watchQuery, 'watchQuery', 300),
34
- }));
35
- if (input.action === 'delete')
36
- await concerns.remove(route.companionId, id, entry.updatedAt);
37
- else if (input.action === 'resolve' || input.action === 'stop')
38
- await concerns.act(route.companionId, id, input.action === 'resolve' ? 'resolve' : 'ignore', Date.now(), entry.updatedAt);
39
- else
40
- throw new Error('关注操作无效');
41
- return JSON.stringify({ concernId: id, action: input.action, ok: true });
32
+ const action = input.action === 'stop' ? 'archive' : input.action;
33
+ if (!['update', 'archive', 'resolve', 'restore'].includes(String(action)))
34
+ throw new Error('关注操作无效;永久删除请在页面操作');
35
+ return JSON.stringify(await concerns.revise(route.companionId, id, entry.updatedAt, {
36
+ action: action, reason: requiredText(input.reason, 'reason', 800),
37
+ ...(input.resources === undefined ? {} : { resources: validateConcernResources(input.resources) }),
38
+ ...(input.priority === undefined ? {} : { priority: input.priority }),
39
+ ...(input.conclusion === undefined ? {} : { conclusion: input.conclusion }),
40
+ ...(input.subject === undefined ? {} : { subject: requiredText(input.subject, 'subject', 300) }),
41
+ ...(input.details === undefined ? {} : { details: requiredText(input.details, 'details', 800) }),
42
+ ...(input.watchQuery === undefined ? {} : { watchQuery: requiredText(input.watchQuery, 'watchQuery', 300) }),
43
+ }));
42
44
  },
43
45
  };
44
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"concern-management-tool.js","sourceRoot":"","sources":["../src/concern-management-tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAE3D,0FAA0F;AAC1F,MAAM,UAAU,qBAAqB,CAAC,KAAmB,EAAE,QAA6B;IACtF,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,gYAAgY;QAC7Y,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,KAAK,EAAE,UAAU,EAAE;gBACrE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE;gBACjF,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gBACrE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACxF,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE;QACzB,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC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@ -0,0 +1,7 @@
1
+ import type { ToolDefinition } from '@deepseek-ai/dsh-tools';
2
+ import type { PartnerConcern } from './concern-domain.js';
3
+ import type { NoteRecordingBridge } from './concern-recording.js';
4
+ export declare const CONCERN_NOTE_READ = "heartbeat_read_note_source";
5
+ /** Read only notes already bound as checking sources; no arbitrary note access. */
6
+ export declare function concernNoteSourceTool(concerns: PartnerConcern[], bridge: () => NoteRecordingBridge | undefined): ToolDefinition;
7
+ //# sourceMappingURL=concern-note-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concern-note-source.d.ts","sourceRoot":"","sources":["../src/concern-note-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAA;AAE/D,eAAO,MAAM,iBAAiB,+BAA+B,CAAA;AAC7D,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,MAAM,mBAAmB,GAAG,SAAS,GAAG,cAAc,CAkB/H"}
@@ -0,0 +1,25 @@
1
+ export const CONCERN_NOTE_READ = 'heartbeat_read_note_source';
2
+ /** Read only notes already bound as checking sources; no arbitrary note access. */
3
+ export function concernNoteSourceTool(concerns, bridge) {
4
+ return {
5
+ name: CONCERN_NOTE_READ,
6
+ description: 'Read a note bound as a concern checking source. Read-only; paginate until nextOffset is null. Never use the recording tool to edit a checking source.',
7
+ parameters: { type: 'object', additionalProperties: false, properties: { concernId: { type: 'string' }, noteId: { type: 'string' }, offset: { type: 'integer', minimum: 0 } }, required: ['concernId', 'noteId'] },
8
+ output: { schema: { type: 'string' }, render: (_args, value) => [{ type: 'text', text: String(value) }] },
9
+ async execute(raw, exec) {
10
+ const args = raw;
11
+ const concern = concerns.find(item => item.id === args.concernId);
12
+ if (!concern?.resources.some(item => item.kind === 'note' && item.locator === args.noteId))
13
+ throw new Error('笔记不是当前关注的检查依据');
14
+ const offset = args.offset ?? 0;
15
+ if (typeof offset !== 'number' || !Number.isSafeInteger(offset) || offset < 0)
16
+ throw new Error('offset 无效');
17
+ const service = bridge();
18
+ if (service?.version !== 1)
19
+ throw new Error('笔记读取接口不可用,请检查知识库插件');
20
+ const note = await service.read(String(args.noteId), exec.signal);
21
+ return JSON.stringify({ ...note, content: note.content.slice(offset, offset + 6000), nextOffset: offset + 6000 < note.content.length ? offset + 6000 : null, totalChars: note.content.length });
22
+ },
23
+ };
24
+ }
25
+ //# sourceMappingURL=concern-note-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concern-note-source.js","sourceRoot":"","sources":["../src/concern-note-source.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAAA;AAC7D,mFAAmF;AACnF,MAAM,UAAU,qBAAqB,CAAC,QAA0B,EAAE,MAA6C;IAC7G,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,uJAAuJ;QACpK,UAAU,EAAE,EAAC,IAAI,EAAC,QAAQ,EAAC,oBAAoB,EAAC,KAAK,EAAC,UAAU,EAAC,EAAC,SAAS,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,EAAC,MAAM,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,EAAC,MAAM,EAAC,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAC,CAAC,EAAC,EAAC,EAAC,QAAQ,EAAC,CAAC,WAAW,EAAC,QAAQ,CAAC,EAAC;QACtL,MAAM,EAAC,EAAC,MAAM,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,EAAC,MAAM,EAAC,CAAC,KAAK,EAAC,KAAK,EAAC,EAAE,CAAA,CAAC,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,CAAC,KAAK,CAAC,EAAC,CAAC,E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C,MAAM,EAAC,CAAC,CAAA;QAC5K,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { ConcernResource } from './concern-domain.js';
2
+ export declare const concernResourcesSchema: {
3
+ type: string;
4
+ maxItems: number;
5
+ description: string;
6
+ items: {
7
+ type: string;
8
+ additionalProperties: boolean;
9
+ properties: {
10
+ kind: {
11
+ type: string;
12
+ enum: string[];
13
+ };
14
+ locator: {
15
+ type: string;
16
+ maxLength: number;
17
+ };
18
+ label: {
19
+ type: string;
20
+ maxLength: number;
21
+ };
22
+ };
23
+ required: string[];
24
+ };
25
+ };
26
+ export declare function validateConcernResources(input: unknown): ConcernResource[];
27
+ //# sourceMappingURL=concern-resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concern-resources.d.ts","sourceRoot":"","sources":["../src/concern-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;CAQlC,CAAA;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,CAiB1E"}
@@ -0,0 +1,36 @@
1
+ export const concernResourcesSchema = {
2
+ type: 'array', maxItems: 8,
3
+ description: 'Read-only checking sources, NOT the recording destination. Omit to preserve existing sources on update; [] clears them. file locator is workspace-relative; knowledge locator is an exact base name or base/document name. note locator is the exact note ID (not title). Use verified references, never invent document names.',
4
+ items: { type: 'object', additionalProperties: false, properties: {
5
+ kind: { type: 'string', enum: ['file', 'knowledge', 'note'] },
6
+ locator: { type: 'string', maxLength: 500 },
7
+ label: { type: 'string', maxLength: 240 },
8
+ }, required: ['kind', 'locator'] },
9
+ };
10
+ export function validateConcernResources(input) {
11
+ if (!Array.isArray(input) || input.length > 8)
12
+ throw new Error('resources 必须为数组,最多 8 个检查依据;清空请传 []');
13
+ const seen = new Set();
14
+ return input.map((entry) => {
15
+ if (!entry || typeof entry !== 'object' || Array.isArray(entry))
16
+ throw new Error('检查依据必须包含 kind 和 locator');
17
+ const { kind, locator, label } = entry;
18
+ if (kind !== 'file' && kind !== 'knowledge' && kind !== 'note')
19
+ throw new Error('检查依据 kind 仅支持 file、knowledge 或 note');
20
+ if (typeof locator !== 'string' || !locator.trim() || locator.length > 500 || /[\x00-\x1f\x7f]/u.test(locator))
21
+ throw new Error('检查依据 locator 无效');
22
+ if (label !== undefined && (typeof label !== 'string' || !label.trim() || label.length > 240))
23
+ throw new Error('检查依据 label 无效');
24
+ const path = locator.trim().replaceAll('\\', '/');
25
+ if (kind === 'file' && (path.startsWith('/') || /^[a-z]:/iu.test(path) || path.split('/').some((part) => part === '..' || /^(memory|concerns|\.partner)$/iu.test(part))))
26
+ throw new Error('文件依据必须是工作区相对路径,不得引用内部记忆目录');
27
+ return { kind, locator: kind === 'file' ? path : locator.trim(), label: label?.trim() ?? locator.trim().slice(0, 240) };
28
+ }).filter(item => {
29
+ const key = `${item.kind}:${item.locator}`;
30
+ if (seen.has(key))
31
+ return false;
32
+ seen.add(key);
33
+ return true;
34
+ });
35
+ }
36
+ //# sourceMappingURL=concern-resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concern-resources.js","sourceRoot":"","sources":["../src/concern-resources.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAC1B,WAAW,EAAE,iUAAiU;IAC9U,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,KAAK,EAAE,UAAU,EAAE;YAChE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE;YAC7D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE;YAC3C,KAAK,EAAE,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AAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACjD,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,IAAI,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;QAC9N,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAC,CAAA;IACvH,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QACf,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,CAAA;QAC1C,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAA;QAC/B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,IAAI,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export interface ConcernSource {
2
- kind: 'file' | 'knowledge';
2
+ kind: 'file' | 'knowledge' | 'note';
3
3
  label: string;
4
4
  detail: string;
5
5
  token: string;
@@ -1 +1 @@
1
- {"version":3,"file":"concern-sources.d.ts","sourceRoot":"","sources":["../src/concern-sources.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AASD,qFAAqF;AACrF,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAK,EAAE,KAAK,SAAK,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA8C3G;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD"}
1
+ {"version":3,"file":"concern-sources.d.ts","sourceRoot":"","sources":["../src/concern-sources.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAA;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AASD,qFAAqF;AACrF,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAK,EAAE,KAAK,SAAK,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA8C3G;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD"}
@@ -1,3 +1,4 @@
1
+ import { type ConcernRevision } from './concern-attention.js';
1
2
  import { type ConcernActivity, type ConcernCandidate, type ConcernObservation, type ConcernObservationCandidate, type AppliedConcernLifecycleDirective, type ConcernOrigin, type PartnerConcern } from './concern-domain.js';
2
3
  export interface LegacyConcernSeed {
3
4
  scopeId: string;
@@ -45,7 +46,7 @@ export declare class PartnerConcernStore {
45
46
  migrateLegacy(companionId: string, seeds: LegacyConcernSeed[]): Promise<boolean>;
46
47
  applyCandidates(companionId: string, scopeId: string, candidates: ConcernCandidate[], origin: ConcernOrigin, at?: number, options?: ConcernApplyOptions): Promise<PartnerConcern[]>;
47
48
  ingestCandidates(companionId: string, scopeId: string, candidates: ConcernCandidate[], origin: ConcernOrigin, at?: number, options?: ConcernApplyOptions): Promise<ConcernApplyResult>;
48
- createExplicit(companionId: string, scopeId: string, subject: string, reason?: string, recordTarget?: PartnerConcern['recordTarget']): Promise<PartnerConcern>;
49
+ createExplicit(companionId: string, scopeId: string, subject: string, reason?: string, recordTarget?: PartnerConcern['recordTarget'], executionInstructions?: string | null): Promise<PartnerConcern>;
49
50
  editExplicit(companionId: string, id: string, input: {
50
51
  subject: string;
51
52
  reason: string;
@@ -54,6 +55,7 @@ export declare class PartnerConcernStore {
54
55
  recordTarget?: PartnerConcern['recordTarget'];
55
56
  watchKind?: PartnerConcern['watchKind'];
56
57
  watchQuery?: string;
58
+ executionInstructions?: string | null;
57
59
  }): Promise<PartnerConcern>;
58
60
  applyUserDirective(companionId: string, scopeId: string, value: string, now?: number): Promise<AppliedConcernLifecycleDirective | undefined>;
59
61
  list(companionId: string, scopeId?: string, includeArchived?: boolean, limit?: number): Promise<PartnerConcern[]>;
@@ -77,6 +79,12 @@ export declare class PartnerConcernStore {
77
79
  markMentioned(companionId: string, observationIds: string[], now?: number): Promise<void>;
78
80
  act(companionId: string, concernId: string, action: 'watch' | 'ignore' | 'prioritize' | 'resolve', now?: number, expectedUpdatedAt?: number): Promise<void>;
79
81
  clear(companionId: string): Promise<void>;
82
+ revise(companionId: string, id: string, expectedUpdatedAt: number, change: ConcernRevision & {
83
+ subject?: string;
84
+ watchQuery?: string;
85
+ details?: string;
86
+ resources?: PartnerConcern['resources'];
87
+ }): Promise<PartnerConcern>;
80
88
  private upsert;
81
89
  private existing;
82
90
  private audit;
@@ -1 +1 @@
1
- {"version":3,"file":"concern-store.d.ts","sourceRoot":"","sources":["../src/concern-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,KAAK,2BAA2B,EACtG,KAAK,gCAAgC,EAAE,KAAK,aAAa,EAA+C,KAAK,cAAc,EAC5H,MAAM,qBAAqB,CAAA;AAG5B,MAAM,WAAW,iBA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MAAM;YACN,WAAW;CAQ1B"}
@@ -1,8 +1,10 @@
1
+ import { validateConcernResources } from './concern-resources.js';
1
2
  import { createHash, randomUUID } from 'node:crypto';
2
3
  import { mkdir, rm } from 'node:fs/promises';
3
4
  import { join } from 'node:path';
4
5
  import { DatabaseSync } from 'node:sqlite';
5
- import { boundedConcernCheckMinutes, clamp, concernDecay, concernInterval, extractConcernResources, focusedConcernQuery, implicitConcernRejection, interruptDecision, MAX_IMPLICIT_CONCERNS_PER_BATCH, normalizeConcernSubject, concernLifecycleRequest, selectConcernLifecycleTarget, } from './concern-domain.js';
6
+ import { reviseConcern } from './concern-attention.js';
7
+ import { boundedConcernCheckMinutes, clamp, concernInterval, extractConcernResources, focusedConcernQuery, implicitConcernRejection, interruptDecision, MAX_IMPLICIT_CONCERNS_PER_BATCH, normalizeConcernSubject, concernLifecycleRequest, selectConcernLifecycleTarget, } from './concern-domain.js';
6
8
  export class PartnerConcernStore {
7
9
  root;
8
10
  privateRoot;
@@ -63,12 +65,18 @@ export class PartnerConcernStore {
63
65
  for (const candidate of candidates.slice(0, 12)) {
64
66
  const normalized = normalizeConcernSubject(compact(candidate.subject, 300));
65
67
  const existing = normalized ? this.existing(database, companionId, scopeId, normalized) : undefined;
68
+ if (existing?.control === 'stopped' || (existing?.control === 'pinned' && candidate.operation !== 'upsert') || (existing?.origin === 'explicit' && candidate.operation === 'dismiss')) {
69
+ const entry = { subject: candidate.subject, decision: 'ignored', reason: '保留用户停止、置顶或明确交代的关注;结束需通过管理工具说明结论', concern: existing };
70
+ entries.push(entry);
71
+ this.audit(database, companionId, scopeId, origin, candidate, entry, at, options);
72
+ continue;
73
+ }
66
74
  if (options.batchId && existing && existing.updatedAt > at) {
67
75
  entries.push({ subject: candidate.subject, decision: 'ignored', reason: '已有更新的关注状态,不重放旧轮次' });
68
76
  continue;
69
77
  }
70
78
  const directEvidence = source === 'tool' || source === 'reflection' ? options.evidence : undefined;
71
- const rejection = origin === 'implicit' ? implicitConcernRejection(candidate, directEvidence) : undefined;
79
+ const rejection = origin === 'implicit' && existing === undefined ? implicitConcernRejection(candidate, directEvidence) : undefined;
72
80
  if (rejection !== undefined || (origin === 'implicit' && candidate.operation === 'upsert' && existing === undefined && created.length >= maxImplicitCreates)) {
73
81
  const reason = rejection ?? `每批最多新增 ${maxImplicitCreates} 条隐式关注`;
74
82
  const entry = { subject: compact(candidate.subject, 300), decision: 'rejected', reason };
@@ -84,9 +92,22 @@ export class PartnerConcernStore {
84
92
  target.recordTarget = candidate.recordTarget;
85
93
  }
86
94
  }
95
+ if (source === 'ui' && candidate.executionInstructions !== undefined) {
96
+ const value = candidate.executionInstructions;
97
+ if (value !== null && (typeof value !== 'string' || !value.trim() || value.length > 4000))
98
+ throw new Error('后续执行要求应为 1–4000 字,停用请传 null');
99
+ const target = concern ?? existing;
100
+ if (target) {
101
+ database.prepare('UPDATE concerns SET execution_instructions=? WHERE id=?').run(value?.trim() ?? null, target.id);
102
+ if (value === null)
103
+ delete target.executionInstructions;
104
+ else
105
+ target.executionInstructions = value.trim();
106
+ }
107
+ }
87
108
  if (concern !== undefined)
88
109
  created.push(concern);
89
- const current = concern ?? existing;
110
+ const current = concern ?? this.existing(database, companionId, scopeId, normalized);
90
111
  const decision = candidate.operation === 'resolve'
91
112
  ? existing === undefined ? 'ignored' : 'resolved'
92
113
  : candidate.operation === 'dismiss'
@@ -117,12 +138,13 @@ export class PartnerConcernStore {
117
138
  return { created, entries };
118
139
  });
119
140
  }
120
- async createExplicit(companionId, scopeId, subject, reason = '', recordTarget) {
141
+ async createExplicit(companionId, scopeId, subject, reason = '', recordTarget, executionInstructions) {
121
142
  const descriptor = explicitConcernDescriptor(subject);
122
143
  await this.applyCandidates(companionId, scopeId, [{
123
144
  subject: descriptor.subject, reason: reason || '用户明确要求伙伴留意', operation: 'upsert', priority: .9,
124
145
  confidence: 1, watchKind: descriptor.watchKind, watchQuery: descriptor.watchQuery, resources: descriptor.resources,
125
146
  ...(recordTarget ? { recordTarget } : {}),
147
+ ...(executionInstructions === undefined ? {} : { executionInstructions }),
126
148
  }], 'explicit', Date.now(), { source: 'ui' });
127
149
  const concern = (await this.list(companionId, scopeId)).find(item => normalizeConcernSubject(item.subject) === normalizeConcernSubject(descriptor.subject));
128
150
  if (!concern)
@@ -153,6 +175,11 @@ export class PartnerConcernStore {
153
175
  // Retain archived identity, title and history; release only its deduplication key.
154
176
  if (duplicate)
155
177
  database.prepare('UPDATE concerns SET normalized_subject = ? WHERE id = ?').run(`archived:${String(duplicate.id)}:${normalized}`, String(duplicate.id));
178
+ if (input.executionInstructions !== undefined) {
179
+ if (input.executionInstructions !== null && (typeof input.executionInstructions !== 'string' || !input.executionInstructions.trim() || input.executionInstructions.length > 4000))
180
+ throw new Error('后续执行要求应为 1–4000 字,停用请传 null');
181
+ database.prepare('UPDATE concerns SET execution_instructions=? WHERE id=?').run(input.executionInstructions?.trim() ?? null, id);
182
+ }
156
183
  const descriptor = explicitConcernDescriptor(input.sources);
157
184
  if (input.sources.trim() && descriptor.resources.length === 0)
158
185
  throw new Error('未识别到检查依据,请使用 @知识库[库名/文档名] 或 @"文件路径"');
@@ -194,7 +221,7 @@ export class PartnerConcernStore {
194
221
  if (target === undefined)
195
222
  return undefined;
196
223
  if (request.action === 'ignore')
197
- database.prepare("UPDATE concerns SET state = 'archived', updated_at = ? WHERE id = ?").run(now, target.id);
224
+ database.prepare("UPDATE concerns SET state = 'archived', control='stopped', updated_at = ? WHERE id = ?").run(now, target.id);
198
225
  else
199
226
  database.prepare("UPDATE concerns SET state = 'resolved', resolved_at = ?, updated_at = ? WHERE id = ?").run(now, now, target.id);
200
227
  return { ...request, concernId: target.id, subject: target.subject };
@@ -243,18 +270,11 @@ export class PartnerConcernStore {
243
270
  AND (? IS NULL OR id = ?)
244
271
  ORDER BY priority DESC, next_check_at ASC LIMIT ?`).all(companionId, scopeId, options.includeFuture ? 1 : 0, now, options.concernId ?? null, options.concernId ?? null, Math.max(limit, 24));
245
272
  const due = [];
246
- const update = database.prepare('UPDATE concerns SET score = ?, state = ? WHERE id = ?');
247
273
  for (const row of rows) {
248
274
  const item = concernFromRow(row);
249
- const score = concernDecay(item.score, item.lastActivityAt, now, item.origin);
250
- if (item.origin === 'implicit' && score < .18) {
251
- update.run(score, 'archived', item.id);
252
- continue;
253
- }
254
- if (score !== item.score)
255
- update.run(score, item.state, item.id);
275
+ // Silence is not evidence of completion. Only reasoned revisions change attention.
256
276
  if (due.length < limit)
257
- due.push({ ...item, score });
277
+ due.push(item);
258
278
  }
259
279
  database.exec('COMMIT');
260
280
  return due;
@@ -278,8 +298,13 @@ export class PartnerConcernStore {
278
298
  try {
279
299
  database.exec('BEGIN IMMEDIATE');
280
300
  const byConcern = new Map(candidates.map(item => [item.concernId, item]));
281
- for (const concern of concerns) {
282
- if (!database.prepare('SELECT id FROM concerns WHERE id = ? AND companion_id = ?').get(concern.id, companionId))
301
+ for (const snapshot of concerns) {
302
+ const row = database.prepare('SELECT * FROM concerns WHERE id = ? AND companion_id = ?').get(snapshot.id, companionId);
303
+ if (!row)
304
+ continue;
305
+ const concern = concernFromRow(row);
306
+ // An in-flight check must never revive a stopped/archived or edited concern.
307
+ if (concern.updatedAt !== snapshot.updatedAt || !['active', 'watching'].includes(concern.state))
283
308
  continue;
284
309
  const candidate = byConcern.get(concern.id);
285
310
  const chosenMinutes = boundedConcernCheckMinutes(candidate?.nextCheckInMinutes);
@@ -447,6 +472,7 @@ export class PartnerConcernStore {
447
472
  const database = await this.open(companionId);
448
473
  try {
449
474
  const rows = database.prepare(`SELECT * FROM concern_observations WHERE companion_id = ? AND scope_id IN (?, '*')
475
+ AND concern_id IN (SELECT id FROM concerns WHERE state IN ('active','watching'))
450
476
  AND decision = 'defer' AND mentioned_at IS NULL ORDER BY interrupt_score DESC, created_at DESC LIMIT 30`).all(companionId, scopeId);
451
477
  const terms = tokens(query);
452
478
  return rows.map(observationFromRow).map(item => ({ item, score: lexicalScore(`${item.event} ${item.evidence}`, terms) + item.interruptScore }))
@@ -460,6 +486,7 @@ export class PartnerConcernStore {
460
486
  const database = await this.open(companionId);
461
487
  try {
462
488
  return database.prepare(`SELECT * FROM concern_observations WHERE companion_id = ? AND scope_id IN (?, '*')
489
+ AND concern_id IN (SELECT id FROM concerns WHERE state IN ('active','watching'))
463
490
  AND decision = 'notify' AND mentioned_at IS NULL ORDER BY interrupt_score DESC, created_at ASC LIMIT ?`).all(companionId, scopeId, limit).map(observationFromRow);
464
491
  }
465
492
  finally {
@@ -505,13 +532,15 @@ export class PartnerConcernStore {
505
532
  if (number(concern.updated_at) > now)
506
533
  return;
507
534
  if (action === 'ignore')
508
- database.prepare("UPDATE concerns SET state = 'archived', updated_at = ? WHERE id = ?").run(now, concernId);
535
+ database.prepare("UPDATE concerns SET state = 'archived', control='stopped', updated_at = ? WHERE id = ?").run(now, concernId);
509
536
  if (action === 'resolve')
510
537
  database.prepare("UPDATE concerns SET state = 'resolved', resolved_at = ?, updated_at = ? WHERE id = ?").run(now, now, concernId);
511
538
  if (action === 'watch')
512
- database.prepare("UPDATE concerns SET state = 'watching', score = MAX(score, .72), last_activity_at = ?, next_check_at = ?, updated_at = ? WHERE id = ?").run(now, now, now, concernId);
539
+ database.prepare("UPDATE concerns SET state = 'watching', control='auto', resolved_at=NULL, score = MAX(score, .72), last_activity_at = ?, next_check_at = ?, updated_at = ? WHERE id = ?").run(now, now, now, concernId);
513
540
  if (action === 'prioritize')
514
- database.prepare("UPDATE concerns SET state = 'active', priority = 1, score = 1, last_activity_at = ?, next_check_at = ?, updated_at = ? WHERE id = ?").run(now, now, now, concernId);
541
+ database.prepare("UPDATE concerns SET state = 'active', control='pinned', priority = 1, score = 1, last_activity_at = ?, next_check_at = ?, updated_at = ? WHERE id = ?").run(now, now, now, concernId);
542
+ const updated = concernFromRow(database.prepare('SELECT * FROM concerns WHERE id=?').get(concernId));
543
+ database.prepare('UPDATE concerns SET adjustments_json=? WHERE id=?').run(JSON.stringify([...(updated.adjustments ?? []), { at: now, actor: 'user', reason: ({ watch: '用户恢复关注/交由伙伴管理', ignore: '用户停止关注', prioritize: '用户置顶关注', resolve: '用户确认已解决' })[action], priority: updated.priority, state: updated.state }].slice(-20)), concernId);
515
544
  }
516
545
  finally {
517
546
  database.close();
@@ -521,6 +550,41 @@ export class PartnerConcernStore {
521
550
  async clear(companionId) {
522
551
  await this.serial(this.path(companionId), () => rm(this.directory(companionId), { recursive: true, force: true }));
523
552
  }
553
+ async revise(companionId, id, expectedUpdatedAt, change) {
554
+ return this.serialValue(this.path(companionId), async () => {
555
+ const db = await this.open(companionId);
556
+ try {
557
+ db.exec('BEGIN IMMEDIATE');
558
+ const row = db.prepare('SELECT * FROM concerns WHERE companion_id=? AND id=?').get(companionId, id);
559
+ if (!row)
560
+ throw new Error('当前伙伴没有此关注');
561
+ const old = concernFromRow(row);
562
+ if (old.updatedAt !== expectedUpdatedAt)
563
+ throw new Error('关注已变化,请 list 后重试');
564
+ const next = reviseConcern(old, change, Date.now());
565
+ const resources = change.resources === undefined ? old.resources : validateConcernResources(change.resources);
566
+ const subject = change.subject?.trim() ?? old.subject;
567
+ if (!normalizeConcernSubject(subject) || subject.length > 300)
568
+ throw new Error('关注主题无效');
569
+ const query = change.watchQuery?.trim() ?? old.watchQuery;
570
+ if (!query || query.length > 500)
571
+ throw new Error('观察目标无效');
572
+ if (change.details !== undefined && (!change.details.trim() || change.details.length > 800))
573
+ throw new Error('关注说明无效');
574
+ db.prepare(`UPDATE concerns SET subject=?, normalized_subject=?, watch_query=?, reason=?, priority=?, state=?, updated_at=?,
575
+ next_check_at=?, resolved_at=?, adjustments_json=?, resources_json=? WHERE id=?`).run(subject, normalizeConcernSubject(subject), query, change.details?.trim() ?? old.reason, next.priority, next.state, next.updatedAt, next.updatedAt + concernInterval(next.priority, next.origin), next.state === 'resolved' ? next.updatedAt : null, JSON.stringify(next.adjustments), resourcesJson(resources), id);
576
+ db.exec('COMMIT');
577
+ return concernFromRow(db.prepare('SELECT * FROM concerns WHERE id=?').get(id));
578
+ }
579
+ catch (error) {
580
+ rollback(db);
581
+ throw error;
582
+ }
583
+ finally {
584
+ db.close();
585
+ }
586
+ });
587
+ }
524
588
  upsert(database, companionId, scopeId, candidate, origin, at) {
525
589
  const subject = compact(candidate.subject, 300);
526
590
  const normalized = normalizeConcernSubject(subject);
@@ -528,25 +592,29 @@ export class PartnerConcernStore {
528
592
  return undefined;
529
593
  const existing = database.prepare(`SELECT * FROM concerns WHERE companion_id = ? AND normalized_subject = ? AND scope_id IN (?, '*')
530
594
  ORDER BY CASE WHEN origin = 'explicit' THEN 0 ELSE 1 END LIMIT 1`).get(companionId, normalized, scopeId);
531
- if (candidate.operation === 'resolve' || candidate.operation === 'dismiss') {
532
- if (!existing)
595
+ if (existing) {
596
+ const old = concernFromRow(existing);
597
+ if (old.control === 'stopped')
533
598
  return undefined;
534
- const state = candidate.operation === 'resolve' ? 'resolved' : 'archived';
535
- database.prepare('UPDATE concerns SET state = ?, resolved_at = ?, updated_at = ? WHERE id = ?').run(state, state === 'resolved' ? at : null, at, string(existing.id));
599
+ const revision = {
600
+ action: candidate.operation === 'resolve' ? 'resolve' : candidate.operation === 'dismiss' ? 'archive' : old.state === 'archived' || old.state === 'resolved' ? 'restore' : 'update',
601
+ reason: compact(candidate.reason || '根据相关对话与进展重新评估', 800),
602
+ priority: old.control === 'pinned' ? old.priority : clamp(candidate.priority),
603
+ };
604
+ const next = reviseConcern(old, revision, at);
605
+ const resources = resourcesJson(candidate.resources);
606
+ database.prepare(`UPDATE concerns SET reason=?, origin=?, priority=?, confidence=?, state=?, watch_kind=?, watch_query=?,
607
+ resources_json=CASE WHEN ?='[]' THEN resources_json ELSE ? END, updated_at=?, last_activity_at=?, next_check_at=?,
608
+ resolved_at=?, adjustments_json=? WHERE id=?`).run(compact(candidate.reason, 800), old.origin === 'explicit' ? 'explicit' : origin, next.priority, clamp(candidate.confidence), next.state, candidate.watchKind, compact(candidate.watchQuery || subject, 500), candidate.replaceResources ? 'replace' : resources, resources, next.updatedAt, at, at + concernInterval(next.priority, old.origin), next.state === 'resolved' ? at : null, JSON.stringify(next.adjustments), old.id);
609
+ return undefined;
610
+ }
611
+ if (candidate.operation === 'resolve' || candidate.operation === 'dismiss') {
536
612
  return undefined;
537
613
  }
538
614
  const priority = clamp(candidate.priority);
539
615
  const confidence = clamp(candidate.confidence);
540
616
  const score = clamp(priority * .55 + confidence * .45);
541
617
  const nextCheckAt = at + concernInterval(priority, origin);
542
- if (existing && string(existing.scope_id) !== scopeId) {
543
- const resources = resourcesJson(candidate.resources);
544
- database.prepare(`UPDATE concerns SET subject = ?, reason = ?, state = 'watching', priority = MAX(priority, ?),
545
- confidence = MAX(confidence, ?), score = MAX(score, ?), watch_kind = ?, watch_query = ?,
546
- resources_json = CASE WHEN ? = '[]' THEN resources_json ELSE ? END, updated_at = ?,
547
- last_activity_at = ?, next_check_at = MIN(next_check_at, ?), resolved_at = NULL WHERE id = ?`).run(subject, compact(candidate.reason, 800), priority, confidence, score, candidate.watchKind, compact(candidate.watchQuery || subject, 500), resources, resources, at, at, nextCheckAt, string(existing.id));
548
- return undefined;
549
- }
550
618
  const id = `concern-${randomUUID()}`;
551
619
  database.prepare(`INSERT INTO concerns
552
620
  (id, companion_id, scope_id, normalized_subject, subject, reason, origin, state, priority, confidence, score,
@@ -672,7 +740,13 @@ export class PartnerConcernStore {
672
740
  CREATE INDEX IF NOT EXISTS concern_audit_session ON concern_audit(companion_id, scope_id, session_id, source, decision, notified_at, created_at);
673
741
  PRAGMA user_version = 4;`);
674
742
  ensureColumn(database, 'concerns', 'resources_json', "TEXT NOT NULL DEFAULT '[]'");
743
+ ensureColumn(database, 'concerns', 'control', "TEXT NOT NULL DEFAULT 'auto'");
744
+ ensureColumn(database, 'concerns', 'adjustments_json', "TEXT NOT NULL DEFAULT '[]'");
745
+ if (!database.prepare("SELECT value FROM concern_meta WHERE key='attention-controls-v1'").get()) {
746
+ database.exec("UPDATE concerns SET control='stopped' WHERE state='archived'; UPDATE concerns SET control='pinned' WHERE state='active' AND priority=1; INSERT INTO concern_meta VALUES ('attention-controls-v1','1')");
747
+ }
675
748
  ensureColumn(database, 'concerns', 'record_target_json', 'TEXT');
749
+ ensureColumn(database, 'concerns', 'execution_instructions', 'TEXT');
676
750
  ensureColumn(database, 'concerns', 'recording_pending', 'INTEGER NOT NULL DEFAULT 0');
677
751
  ensureColumn(database, 'concerns', 'recording_snapshot_json', 'TEXT');
678
752
  ensureColumn(database, 'concerns', 'recording_retry_at', 'INTEGER NOT NULL DEFAULT 0');
@@ -705,8 +779,11 @@ export class PartnerConcernStore {
705
779
  }
706
780
  function concernFromRow(row) {
707
781
  return {
782
+ control: (row.control ?? 'auto'),
783
+ adjustments: JSON.parse(String(row.adjustments_json ?? '[]')),
708
784
  ...(row.record_target_json && number(row.recording_pending) === 1 ? { recordingPending: true } : {}),
709
785
  ...(typeof row.record_target_json === 'string' ? { recordTarget: JSON.parse(row.record_target_json) } : {}),
786
+ ...(typeof row.execution_instructions === 'string' ? { executionInstructions: row.execution_instructions } : {}),
710
787
  id: string(row.id), companionId: string(row.companion_id), scopeId: string(row.scope_id), subject: string(row.subject), reason: string(row.reason),
711
788
  origin: string(row.origin), state: string(row.state),
712
789
  priority: number(row.priority), confidence: number(row.confidence), score: number(row.score),
@@ -748,7 +825,7 @@ function compact(value, max) { const text = value.replace(/\s+/g, ' ').trim(); r
748
825
  function explicitConcernDescriptor(value) {
749
826
  const resources = extractConcernResources(value);
750
827
  const remainder = compact(value
751
- .replace(/@知识库\[[^\]]+\]/gu, ' ')
828
+ .replace(/@(?:知识库|笔记)\[[^\]]+\]/gu, ' ')
752
829
  .replace(/(?:^|\s)@(?:"[^"]+"|[^\s]+)/gu, ' ')
753
830
  .replace(/^(?:(?:请|麻烦|帮我|替我|让(?:伙伴|你)?)[,,::\s]*)?(?:关注|留意|盯着|跟进|惦记|记着)[,,::\s]*/u, '')
754
831
  .replace(/(?:一下|这件事|这个|这些)[。!!??\s]*$/u, ''), 300);
@@ -794,7 +871,7 @@ function migrateReferenceOnlyConcerns(database) {
794
871
  }
795
872
  function resourcesJson(value) {
796
873
  return JSON.stringify((value ?? []).slice(0, 8).map(item => ({ kind: item.kind, locator: compact(item.locator, 500), label: compact(item.label, 240) }))
797
- .filter(item => (item.kind === 'file' || item.kind === 'knowledge') && item.locator));
874
+ .filter(item => (item.kind === 'file' || item.kind === 'knowledge' || item.kind === 'note') && item.locator));
798
875
  }
799
876
  function parseResources(value) {
800
877
  if (typeof value !== 'string')
@@ -807,7 +884,7 @@ function parseResources(value) {
807
884
  if (typeof item !== 'object' || item === null)
808
885
  return [];
809
886
  const resource = item;
810
- if ((resource.kind !== 'file' && resource.kind !== 'knowledge') || typeof resource.locator !== 'string' || typeof resource.label !== 'string')
887
+ if ((resource.kind !== 'file' && resource.kind !== 'knowledge' && resource.kind !== 'note') || typeof resource.locator !== 'string' || typeof resource.label !== 'string')
811
888
  return [];
812
889
  return [{ kind: resource.kind, locator: compact(resource.locator, 500), label: compact(resource.label, 240) }];
813
890
  }).slice(0, 8);