@lemoncat7/dsh-partner 2.4.2 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (671) hide show
  1. package/README.md +8 -0
  2. package/docs/THIRD_PARTY_LICENSES.md +13 -0
  3. package/docs/attachment-storage.md +18 -0
  4. package/docs/director-skills.md +24 -0
  5. package/docs/long-task-continuation.md +51 -0
  6. package/docs/releases/2.5.0.md +13 -0
  7. package/docs/releases/2.6.0.md +11 -0
  8. package/docs/releases/2.7.0.md +21 -0
  9. package/lib/agent-runtime.d.ts +9 -1
  10. package/lib/agent-runtime.d.ts.map +1 -1
  11. package/lib/agent-runtime.js +117 -17
  12. package/lib/agent-runtime.js.map +1 -1
  13. package/lib/api/features/attachments-api.d.ts.map +1 -1
  14. package/lib/api/features/attachments-api.js +31 -1
  15. package/lib/api/features/attachments-api.js.map +1 -1
  16. package/lib/api.d.ts +1 -1
  17. package/lib/api.d.ts.map +1 -1
  18. package/lib/api.js +1 -1
  19. package/lib/api.js.map +1 -1
  20. package/lib/attachments/grouped-storage.d.ts +5 -0
  21. package/lib/attachments/grouped-storage.d.ts.map +1 -0
  22. package/lib/attachments/grouped-storage.js +47 -0
  23. package/lib/attachments/grouped-storage.js.map +1 -0
  24. package/lib/attachments/service.d.ts +17 -0
  25. package/lib/attachments/service.d.ts.map +1 -1
  26. package/lib/attachments/service.js +100 -8
  27. package/lib/attachments/service.js.map +1 -1
  28. package/lib/attachments/shared-storage.d.ts +7 -0
  29. package/lib/attachments/shared-storage.d.ts.map +1 -0
  30. package/lib/attachments/shared-storage.js +44 -0
  31. package/lib/attachments/shared-storage.js.map +1 -0
  32. package/lib/attachments/storage-admin.d.ts +6 -0
  33. package/lib/attachments/storage-admin.d.ts.map +1 -0
  34. package/lib/attachments/storage-admin.js +43 -0
  35. package/lib/attachments/storage-admin.js.map +1 -0
  36. package/lib/attachments/storage-types.d.ts +33 -0
  37. package/lib/attachments/storage-types.d.ts.map +1 -0
  38. package/lib/attachments/storage-types.js +2 -0
  39. package/lib/attachments/storage-types.js.map +1 -0
  40. package/lib/attachments/tool.d.ts.map +1 -1
  41. package/lib/attachments/tool.js +16 -5
  42. package/lib/attachments/tool.js.map +1 -1
  43. package/lib/channels/delivery-policy.d.ts.map +1 -1
  44. package/lib/channels/delivery-policy.js +7 -4
  45. package/lib/channels/delivery-policy.js.map +1 -1
  46. package/lib/channels/direct/message-format.js +418 -281
  47. package/lib/channels/direct/message-format.js.map +4 -4
  48. package/lib/channels/manager.d.ts +7 -3
  49. package/lib/channels/manager.d.ts.map +1 -1
  50. package/lib/channels/manager.js +73 -38
  51. package/lib/channels/manager.js.map +1 -1
  52. package/lib/channels/weixin/api.d.ts.map +1 -1
  53. package/lib/channels/weixin/api.js +7 -2
  54. package/lib/channels/weixin/api.js.map +1 -1
  55. package/lib/channels/weixin/errors.d.ts +14 -0
  56. package/lib/channels/weixin/errors.d.ts.map +1 -0
  57. package/lib/channels/weixin/errors.js +29 -0
  58. package/lib/channels/weixin/errors.js.map +1 -0
  59. package/lib/channels/weixin/poll.d.ts +14 -0
  60. package/lib/channels/weixin/poll.d.ts.map +1 -0
  61. package/lib/channels/weixin/poll.js +50 -0
  62. package/lib/channels/weixin/poll.js.map +1 -0
  63. package/lib/client-api.d.ts +1 -23
  64. package/lib/client-api.d.ts.map +1 -1
  65. package/lib/client-api.js.map +1 -1
  66. package/lib/client-controller.d.ts.map +1 -1
  67. package/lib/client-controller.js +3 -3
  68. package/lib/client-controller.js.map +1 -1
  69. package/lib/client.d.ts.map +1 -1
  70. package/lib/client.js +1078 -679
  71. package/lib/client.js.map +4 -4
  72. package/lib/collaboration/composition.d.ts.map +1 -1
  73. package/lib/collaboration/composition.js +32 -8
  74. package/lib/collaboration/composition.js.map +1 -1
  75. package/lib/collaboration/domain.d.ts +8 -0
  76. package/lib/collaboration/domain.d.ts.map +1 -1
  77. package/lib/collaboration/domain.js.map +1 -1
  78. package/lib/collaboration/service.d.ts.map +1 -1
  79. package/lib/collaboration/service.js +38 -5
  80. package/lib/collaboration/service.js.map +1 -1
  81. package/lib/concern-notification.d.ts.map +1 -1
  82. package/lib/concern-notification.js +2 -1
  83. package/lib/concern-notification.js.map +1 -1
  84. package/lib/concern-tool.js +1 -1
  85. package/lib/concern-tool.js.map +1 -1
  86. package/lib/execution/reply-progress.d.ts.map +1 -1
  87. package/lib/execution/reply-progress.js +4 -2
  88. package/lib/execution/reply-progress.js.map +1 -1
  89. package/lib/execution/service.d.ts +1 -1
  90. package/lib/execution/service.d.ts.map +1 -1
  91. package/lib/execution/service.js +4 -7
  92. package/lib/execution/service.js.map +1 -1
  93. package/lib/index.d.ts.map +1 -1
  94. package/lib/index.js +7 -1
  95. package/lib/index.js.map +1 -1
  96. package/lib/memory-reflection.js +2 -2
  97. package/lib/memory-reflection.js.map +1 -1
  98. package/lib/message-source.d.ts +25 -0
  99. package/lib/message-source.d.ts.map +1 -0
  100. package/lib/message-source.js +8 -0
  101. package/lib/message-source.js.map +1 -0
  102. package/lib/observation-loop.js +4 -4
  103. package/lib/observation-loop.js.map +1 -1
  104. package/lib/pendant/reader.js +1 -1
  105. package/lib/pendant/reader.js.map +1 -1
  106. package/lib/pendant/settings-panel.js +1 -1
  107. package/lib/pendant/settings-panel.js.map +1 -1
  108. package/lib/persona/service.js +1 -1
  109. package/lib/persona/service.js.map +1 -1
  110. package/lib/requirements/attachments.d.ts +7 -0
  111. package/lib/requirements/attachments.d.ts.map +1 -0
  112. package/lib/requirements/attachments.js +26 -0
  113. package/lib/requirements/attachments.js.map +1 -0
  114. package/lib/requirements/domain.d.ts +1 -1
  115. package/lib/requirements/domain.d.ts.map +1 -1
  116. package/lib/requirements/service.d.ts.map +1 -1
  117. package/lib/requirements/service.js +4 -1
  118. package/lib/requirements/service.js.map +1 -1
  119. package/lib/scheduler/channel-origin.d.ts +7 -0
  120. package/lib/scheduler/channel-origin.d.ts.map +1 -0
  121. package/lib/scheduler/channel-origin.js +27 -0
  122. package/lib/scheduler/channel-origin.js.map +1 -0
  123. package/lib/scheduler/continuations.d.ts +29 -0
  124. package/lib/scheduler/continuations.d.ts.map +1 -0
  125. package/lib/scheduler/continuations.js +286 -0
  126. package/lib/scheduler/continuations.js.map +1 -0
  127. package/lib/scheduler/domain.d.ts +40 -0
  128. package/lib/scheduler/domain.d.ts.map +1 -1
  129. package/lib/scheduler/final-reply.d.ts +13 -0
  130. package/lib/scheduler/final-reply.d.ts.map +1 -0
  131. package/lib/scheduler/final-reply.js +21 -0
  132. package/lib/scheduler/final-reply.js.map +1 -0
  133. package/lib/scheduler/service.d.ts +2 -0
  134. package/lib/scheduler/service.d.ts.map +1 -1
  135. package/lib/scheduler/service.js +30 -1
  136. package/lib/scheduler/service.js.map +1 -1
  137. package/lib/scheduler/wakeup-context.d.ts +7 -0
  138. package/lib/scheduler/wakeup-context.d.ts.map +1 -0
  139. package/lib/scheduler/wakeup-context.js +14 -0
  140. package/lib/scheduler/wakeup-context.js.map +1 -0
  141. package/lib/scheduler/wakeup.d.ts +11 -0
  142. package/lib/scheduler/wakeup.d.ts.map +1 -0
  143. package/lib/scheduler/wakeup.js +52 -0
  144. package/lib/scheduler/wakeup.js.map +1 -0
  145. package/lib/skills/builtin-resources.d.ts +6 -0
  146. package/lib/skills/builtin-resources.d.ts.map +1 -0
  147. package/lib/skills/builtin-resources.js +47 -0
  148. package/lib/skills/builtin-resources.js.map +1 -0
  149. package/lib/skills/builtin.d.ts +2 -5
  150. package/lib/skills/builtin.d.ts.map +1 -1
  151. package/lib/skills/builtin.js +11 -0
  152. package/lib/skills/builtin.js.map +1 -1
  153. package/lib/skills/director-builtins.d.ts +8 -0
  154. package/lib/skills/director-builtins.d.ts.map +1 -0
  155. package/lib/skills/director-builtins.js +65 -0
  156. package/lib/skills/director-builtins.js.map +1 -0
  157. package/lib/skills/drama-builtin.d.ts +3 -0
  158. package/lib/skills/drama-builtin.d.ts.map +1 -0
  159. package/lib/skills/drama-builtin.js +49 -0
  160. package/lib/skills/drama-builtin.js.map +1 -0
  161. package/lib/skills/long-task-continuation.d.ts +4 -0
  162. package/lib/skills/long-task-continuation.d.ts.map +1 -0
  163. package/lib/skills/long-task-continuation.js +43 -0
  164. package/lib/skills/long-task-continuation.js.map +1 -0
  165. package/lib/skills/service.d.ts.map +1 -1
  166. package/lib/skills/service.js +8 -3
  167. package/lib/skills/service.js.map +1 -1
  168. package/lib/skills/viora-canvas-builtin.d.ts +3 -0
  169. package/lib/skills/viora-canvas-builtin.d.ts.map +1 -0
  170. package/lib/skills/viora-canvas-builtin.js +19 -0
  171. package/lib/skills/viora-canvas-builtin.js.map +1 -0
  172. package/lib/storage/migrate-layout.d.ts.map +1 -1
  173. package/lib/storage/migrate-layout.js +13 -4
  174. package/lib/storage/migrate-layout.js.map +1 -1
  175. package/lib/store.d.ts.map +1 -1
  176. package/lib/store.js +2 -0
  177. package/lib/store.js.map +1 -1
  178. package/lib/tasks/context.js +1 -0
  179. package/lib/tasks/context.js.map +1 -1
  180. package/lib/tasks/continuation-yield.d.ts +4 -0
  181. package/lib/tasks/continuation-yield.d.ts.map +1 -0
  182. package/lib/tasks/continuation-yield.js +27 -0
  183. package/lib/tasks/continuation-yield.js.map +1 -0
  184. package/lib/tasks/continuation.d.ts +13 -0
  185. package/lib/tasks/continuation.d.ts.map +1 -0
  186. package/lib/tasks/continuation.js +106 -0
  187. package/lib/tasks/continuation.js.map +1 -0
  188. package/lib/tasks/domain.d.ts +2 -0
  189. package/lib/tasks/domain.d.ts.map +1 -1
  190. package/lib/tasks/scheduling.d.ts.map +1 -1
  191. package/lib/tasks/scheduling.js +7 -0
  192. package/lib/tasks/scheduling.js.map +1 -1
  193. package/lib/tasks/service.d.ts +2 -1
  194. package/lib/tasks/service.d.ts.map +1 -1
  195. package/lib/tasks/service.js +19 -1
  196. package/lib/tasks/service.js.map +1 -1
  197. package/lib/ui/attachment-storage.d.ts +2 -0
  198. package/lib/ui/attachment-storage.d.ts.map +1 -0
  199. package/lib/ui/attachment-storage.js +59 -0
  200. package/lib/ui/attachment-storage.js.map +1 -0
  201. package/lib/ui/capability-editor.js +1 -1
  202. package/lib/ui/capability-editor.js.map +1 -1
  203. package/lib/ui/companion-access-panel.js +1 -1
  204. package/lib/ui/companion-access-panel.js.map +1 -1
  205. package/lib/ui/companion-create.js +1 -1
  206. package/lib/ui/companion-create.js.map +1 -1
  207. package/lib/ui/companion-picker.js +1 -1
  208. package/lib/ui/companion-picker.js.map +1 -1
  209. package/lib/ui/identity-editor.js +1 -1
  210. package/lib/ui/identity-editor.js.map +1 -1
  211. package/lib/ui/mcp-capabilities.js +1 -1
  212. package/lib/ui/mcp-capabilities.js.map +1 -1
  213. package/lib/ui/mcp-panel.js +1 -1
  214. package/lib/ui/mcp-panel.js.map +1 -1
  215. package/lib/ui/memory/concern-board.js +2 -2
  216. package/lib/ui/memory/concern-board.js.map +1 -1
  217. package/lib/ui/memory/concern-deletion.d.ts +1 -1
  218. package/lib/ui/memory/concern-deletion.d.ts.map +1 -1
  219. package/lib/ui/memory/concern-deletion.js +9 -4
  220. package/lib/ui/memory/concern-deletion.js.map +1 -1
  221. package/lib/ui/memory/concern-panel.js +1 -1
  222. package/lib/ui/memory/concern-panel.js.map +1 -1
  223. package/lib/ui/memory/memory-library.js +1 -1
  224. package/lib/ui/memory/memory-library.js.map +1 -1
  225. package/lib/ui/memory/memory-panel.js +1 -1
  226. package/lib/ui/memory/memory-panel.js.map +1 -1
  227. package/lib/ui/partner-components.js +1 -1
  228. package/lib/ui/partner-components.js.map +1 -1
  229. package/lib/ui/requirement-board.js +1 -1
  230. package/lib/ui/requirement-board.js.map +1 -1
  231. package/lib/ui/requirement-dialog.js +1 -1
  232. package/lib/ui/requirement-dialog.js.map +1 -1
  233. package/lib/ui/requirement-tasks-panel.js +1 -1
  234. package/lib/ui/requirement-tasks-panel.js.map +1 -1
  235. package/lib/ui/schedule-panel.d.ts.map +1 -1
  236. package/lib/ui/schedule-panel.js +20 -4
  237. package/lib/ui/schedule-panel.js.map +1 -1
  238. package/lib/ui/skills-panel.js +1 -1
  239. package/lib/ui/skills-panel.js.map +1 -1
  240. package/lib/ui/storage-settings.d.ts.map +1 -1
  241. package/lib/ui/storage-settings.js +2 -1
  242. package/lib/ui/storage-settings.js.map +1 -1
  243. package/lib/ui/task-board-stage.js +1 -1
  244. package/lib/ui/task-board-stage.js.map +1 -1
  245. package/lib/ui/workspace-components.js +1 -1
  246. package/lib/ui/workspace-components.js.map +1 -1
  247. package/lib/ui/workspace-navigation.d.ts +16 -16
  248. package/lib/ui/workspace-navigation.js +1 -1
  249. package/lib/ui/workspace-navigation.js.map +1 -1
  250. package/package.json +55 -41
  251. package/resources/skills/cinematic-director/manifest.json +205 -0
  252. package/resources/skills/cinematic-director/upstream/CHANGELOG.md +213 -0
  253. package/resources/skills/cinematic-director/upstream/CONTRIBUTING.md +316 -0
  254. package/resources/skills/cinematic-director/upstream/LICENSE +21 -0
  255. package/resources/skills/cinematic-director/upstream/README.md +507 -0
  256. package/resources/skills/cinematic-director/upstream/SKILL.md +420 -0
  257. package/resources/skills/cinematic-director/upstream/assets/beat-sheet-template.md +97 -0
  258. package/resources/skills/cinematic-director/upstream/assets/director-book-template.md +254 -0
  259. package/resources/skills/cinematic-director/upstream/assets/edit-timeline-template.md +147 -0
  260. package/resources/skills/cinematic-director/upstream/assets/keyframe-prompt-template.md +334 -0
  261. package/resources/skills/cinematic-director/upstream/assets/qc-checklist.md +153 -0
  262. package/resources/skills/cinematic-director/upstream/assets/shot-plan-template.md +95 -0
  263. package/resources/skills/cinematic-director/upstream/assets/sound-plan-template.md +181 -0
  264. package/resources/skills/cinematic-director/upstream/assets/video-prompt-template.md +305 -0
  265. package/resources/skills/cinematic-director/upstream/evals/run.md +69 -0
  266. package/resources/skills/cinematic-director/upstream/references/ai-video-tool-adapters.md +527 -0
  267. package/resources/skills/cinematic-director/upstream/references/blocking-and-staging.md +424 -0
  268. package/resources/skills/cinematic-director/upstream/references/cinematic-language.md +595 -0
  269. package/resources/skills/cinematic-director/upstream/references/continuity-bible.md +410 -0
  270. package/resources/skills/cinematic-director/upstream/references/director_styles/01_spielberg.md +192 -0
  271. package/resources/skills/cinematic-director/upstream/references/director_styles/02_hitchcock.md +193 -0
  272. package/resources/skills/cinematic-director/upstream/references/director_styles/03_kubrick.md +196 -0
  273. package/resources/skills/cinematic-director/upstream/references/director_styles/04_kurosawa.md +196 -0
  274. package/resources/skills/cinematic-director/upstream/references/director_styles/05_scorsese.md +195 -0
  275. package/resources/skills/cinematic-director/upstream/references/director_styles/06_fellini.md +197 -0
  276. package/resources/skills/cinematic-director/upstream/references/director_styles/07_bergman.md +197 -0
  277. package/resources/skills/cinematic-director/upstream/references/director_styles/08_tarkovsky.md +184 -0
  278. package/resources/skills/cinematic-director/upstream/references/director_styles/09_wong_kar_wai.md +189 -0
  279. package/resources/skills/cinematic-director/upstream/references/director_styles/10_nolan.md +185 -0
  280. package/resources/skills/cinematic-director/upstream/references/director_styles/11_villeneuve.md +188 -0
  281. package/resources/skills/cinematic-director/upstream/references/director_styles/12_fincher.md +185 -0
  282. package/resources/skills/cinematic-director/upstream/references/director_styles/13_refn.md +186 -0
  283. package/resources/skills/cinematic-director/upstream/references/director_styles/14_bi_gan.md +188 -0
  284. package/resources/skills/cinematic-director/upstream/references/director_styles/15_zhang_yimou.md +192 -0
  285. package/resources/skills/cinematic-director/upstream/references/director_styles/16_hou_hsiao_hsien.md +192 -0
  286. package/resources/skills/cinematic-director/upstream/references/director_styles/17_park_chan_wook.md +192 -0
  287. package/resources/skills/cinematic-director/upstream/references/director_styles/18_malick.md +191 -0
  288. package/resources/skills/cinematic-director/upstream/references/director_styles/19_michael_mann.md +192 -0
  289. package/resources/skills/cinematic-director/upstream/references/director_styles/20_coen_brothers.md +194 -0
  290. package/resources/skills/cinematic-director/upstream/references/director_styles/README.md +89 -0
  291. package/resources/skills/cinematic-director/upstream/references/director_styles/example_comparisons.md +140 -0
  292. package/resources/skills/cinematic-director/upstream/references/editing-and-assembly.md +263 -0
  293. package/resources/skills/cinematic-director/upstream/references/failure-modes.md +594 -0
  294. package/resources/skills/cinematic-director/upstream/references/genre-playbooks.md +407 -0
  295. package/resources/skills/cinematic-director/upstream/references/image-model-adapters.md +290 -0
  296. package/resources/skills/cinematic-director/upstream/references/lighting-and-color.md +349 -0
  297. package/resources/skills/cinematic-director/upstream/references/product-and-macro.md +207 -0
  298. package/resources/skills/cinematic-director/upstream/references/production-workflow.md +238 -0
  299. package/resources/skills/cinematic-director/upstream/references/prompt-lexicon.md +602 -0
  300. package/resources/skills/cinematic-director/upstream/references/sound-and-dialogue.md +364 -0
  301. package/resources/skills/director-skills/manifest.json +541 -0
  302. package/resources/skills/director-skills/upstream/CHANGELOG.md +32 -0
  303. package/resources/skills/director-skills/upstream/LICENSE +21 -0
  304. package/resources/skills/director-skills/upstream/MANIFEST.md +366 -0
  305. package/resources/skills/director-skills/upstream/README.md +251 -0
  306. package/resources/skills/director-skills/upstream/RESEARCH_PROVENANCE.md +37 -0
  307. package/resources/skills/director-skills/upstream/SKILL.md +114 -0
  308. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/SKILL.md +81 -0
  309. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/checklists/continuity_checklist.md +8 -0
  310. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/examples/character_continuity_update.md +9 -0
  311. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/examples/location_continuity_update.md +9 -0
  312. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/references/continuity_system.md +21 -0
  313. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/references/golden_image_workflow.md +29 -0
  314. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/references/identity_anchors.md +14 -0
  315. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/references/visual_bible_system.md +15 -0
  316. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/templates/character_profile.md +15 -0
  317. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/templates/continuity_checklist.md +11 -0
  318. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/templates/costume_profile.md +12 -0
  319. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/templates/location_profile.md +14 -0
  320. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/templates/prop_profile.md +13 -0
  321. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/templates/visual_style_bible.md +15 -0
  322. package/resources/skills/director-skills/upstream/skills/character-location-prop-bible/tests/continuity_tests.md +6 -0
  323. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/SKILL.md +80 -0
  324. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/checklists/image_prompt_quality_checklist.md +10 -0
  325. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/examples/shot_list_to_image_prompts.md +4 -0
  326. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/references/image_prompt_components.md +22 -0
  327. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/references/lighting_and_photorealism.md +19 -0
  328. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/references/negative_prompt_patterns.md +18 -0
  329. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/references/prompt_anatomy.md +18 -0
  330. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/templates/character_reference_sheet_prompt.md +5 -0
  331. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/templates/cinematic_still_prompt.md +3 -0
  332. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/templates/keyframe_prompt.md +6 -0
  333. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/templates/location_reference_prompt.md +3 -0
  334. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/templates/prop_prompt.md +3 -0
  335. package/resources/skills/director-skills/upstream/skills/cinematic-image-prompting/tests/image_prompt_completeness_tests.md +5 -0
  336. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/SKILL.md +84 -0
  337. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/checklists/video_prompt_quality_checklist.md +9 -0
  338. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/examples/image_prompt_to_video_prompt.md +3 -0
  339. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/references/ai_film_production_pipeline.md +21 -0
  340. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/references/audio_motion_timing.md +16 -0
  341. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/references/camera_lens_movement.md +26 -0
  342. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/references/negative_prompt_patterns.md +18 -0
  343. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/references/prompt_anatomy.md +18 -0
  344. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/references/video_prompt_components.md +25 -0
  345. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/templates/image_to_video_prompt.md +5 -0
  346. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/templates/text_to_video_prompt.md +5 -0
  347. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/templates/video_beat_prompt.md +9 -0
  348. package/resources/skills/director-skills/upstream/skills/cinematic-video-prompting/tests/video_prompt_completeness_tests.md +5 -0
  349. package/resources/skills/director-skills/upstream/skills/model-adaptation/SKILL.md +82 -0
  350. package/resources/skills/director-skills/upstream/skills/model-adaptation/checklists/model_export_checklist.md +9 -0
  351. package/resources/skills/director-skills/upstream/skills/model-adaptation/examples/failed_model_transfer_diagnosis.md +5 -0
  352. package/resources/skills/director-skills/upstream/skills/model-adaptation/examples/image_prompt_translation.md +10 -0
  353. package/resources/skills/director-skills/upstream/skills/model-adaptation/examples/same_scene_across_models.md +9 -0
  354. package/resources/skills/director-skills/upstream/skills/model-adaptation/examples/universal_prompt_to_model_specific_exports.md +14 -0
  355. package/resources/skills/director-skills/upstream/skills/model-adaptation/examples/video_prompt_translation.md +9 -0
  356. package/resources/skills/director-skills/upstream/skills/model-adaptation/references/failure_modes_by_model.md +13 -0
  357. package/resources/skills/director-skills/upstream/skills/model-adaptation/references/image_model_profiles.md +226 -0
  358. package/resources/skills/director-skills/upstream/skills/model-adaptation/references/model_capability_matrix.md +24 -0
  359. package/resources/skills/director-skills/upstream/skills/model-adaptation/references/model_update_protocol.md +10 -0
  360. package/resources/skills/director-skills/upstream/skills/model-adaptation/references/parameter_compatibility.md +20 -0
  361. package/resources/skills/director-skills/upstream/skills/model-adaptation/references/prompt_translation_rules.md +18 -0
  362. package/resources/skills/director-skills/upstream/skills/model-adaptation/references/video_model_profiles.md +251 -0
  363. package/resources/skills/director-skills/upstream/skills/model-adaptation/templates/model_comparison_table.md +4 -0
  364. package/resources/skills/director-skills/upstream/skills/model-adaptation/templates/model_specific_prompt_export.md +21 -0
  365. package/resources/skills/director-skills/upstream/skills/model-adaptation/templates/multi_model_export_package.md +18 -0
  366. package/resources/skills/director-skills/upstream/skills/model-adaptation/templates/prompt_translation_report.md +13 -0
  367. package/resources/skills/director-skills/upstream/skills/model-adaptation/templates/universal_prompt_brief.md +25 -0
  368. package/resources/skills/director-skills/upstream/skills/model-adaptation/tests/model_routing_tests.md +8 -0
  369. package/resources/skills/director-skills/upstream/skills/model-adaptation/tests/prompt_translation_tests.md +7 -0
  370. package/resources/skills/director-skills/upstream/skills/model-adaptation/tests/research_provenance_tests.md +6 -0
  371. package/resources/skills/director-skills/upstream/skills/model-adaptation/tests/unknown_capability_tests.md +7 -0
  372. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/SKILL.md +82 -0
  373. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/checklists/diagnostic_checklist.md +8 -0
  374. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/checklists/release_quality_checklist.md +9 -0
  375. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/examples/failed_output_to_revised_prompt.md +10 -0
  376. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/examples/final_prompt_package_export.md +10 -0
  377. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/references/failure_modes.md +13 -0
  378. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/references/iteration_diagnostics.md +17 -0
  379. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/references/revision_loops.md +17 -0
  380. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/references/story_voice_release_qc.md +30 -0
  381. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/templates/failed_output_intake.md +13 -0
  382. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/templates/final_production_package.md +11 -0
  383. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/templates/prompt_revision_report.md +17 -0
  384. package/resources/skills/director-skills/upstream/skills/prompt-iteration-and-diagnostics/tests/prompt_quality_checklist_tests.md +6 -0
  385. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/SKILL.md +81 -0
  386. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/checklists/scene_quality_checklist.md +8 -0
  387. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/examples/scene_to_screenplay_excerpt.md +18 -0
  388. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/references/dialogue_and_subtext.md +15 -0
  389. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/references/fountain_workflow.md +29 -0
  390. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/references/scene_construction.md +20 -0
  391. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/references/screenplay_format.md +18 -0
  392. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/templates/beat_sheet.md +6 -0
  393. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/templates/dialogue_pass.md +9 -0
  394. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/templates/fountain_scene.md +25 -0
  395. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/templates/screenplay_scene.md +19 -0
  396. package/resources/skills/director-skills/upstream/skills/screenplay-and-scene-writing/tests/screenplay_scene_tests.md +6 -0
  397. package/resources/skills/director-skills/upstream/skills/short-film-development/SKILL.md +83 -0
  398. package/resources/skills/director-skills/upstream/skills/short-film-development/checklists/concept_quality_checklist.md +8 -0
  399. package/resources/skills/director-skills/upstream/skills/short-film-development/examples/idea_to_logline.md +13 -0
  400. package/resources/skills/director-skills/upstream/skills/short-film-development/examples/logline_to_outline.md +10 -0
  401. package/resources/skills/director-skills/upstream/skills/short-film-development/references/ai_storytelling_workflow.md +46 -0
  402. package/resources/skills/director-skills/upstream/skills/short-film-development/references/continuity_handoff.md +8 -0
  403. package/resources/skills/director-skills/upstream/skills/short-film-development/references/screenplay_structure.md +19 -0
  404. package/resources/skills/director-skills/upstream/skills/short-film-development/references/story_development_workflow.md +23 -0
  405. package/resources/skills/director-skills/upstream/skills/short-film-development/templates/beat_sheet.md +7 -0
  406. package/resources/skills/director-skills/upstream/skills/short-film-development/templates/idea_intake.md +16 -0
  407. package/resources/skills/director-skills/upstream/skills/short-film-development/templates/logline.md +10 -0
  408. package/resources/skills/director-skills/upstream/skills/short-film-development/templates/short_film_treatment.md +23 -0
  409. package/resources/skills/director-skills/upstream/skills/short-film-development/templates/short_story_plan.md +22 -0
  410. package/resources/skills/director-skills/upstream/skills/short-film-development/templates/story_premise.md +19 -0
  411. package/resources/skills/director-skills/upstream/skills/short-film-development/templates/story_revision_audit.md +22 -0
  412. package/resources/skills/director-skills/upstream/skills/short-film-development/tests/output_format_tests.md +3 -0
  413. package/resources/skills/director-skills/upstream/skills/short-film-development/tests/routing_tests.md +7 -0
  414. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/SKILL.md +77 -0
  415. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/checklists/shotlist_quality_checklist.md +8 -0
  416. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/examples/screenplay_scene_to_shot_list.md +8 -0
  417. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/references/camera_plan.md +11 -0
  418. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/references/production_breakdown.md +11 -0
  419. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/references/shotlist_schema.md +21 -0
  420. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/templates/asset_list.md +7 -0
  421. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/templates/camera_plan.md +10 -0
  422. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/templates/scene_breakdown.md +16 -0
  423. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/templates/shot_list.md +5 -0
  424. package/resources/skills/director-skills/upstream/skills/shotlist-and-visual-breakdown/tests/screenplay_to_shotlist_tests.md +5 -0
  425. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/SKILL.md +77 -0
  426. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/checklists/style_quality_checklist.md +8 -0
  427. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/examples/genre_to_visual_direction.md +15 -0
  428. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/references/camera_lens_movement.md +26 -0
  429. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/references/cinematic_language.md +32 -0
  430. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/references/genre_style_tone.md +17 -0
  431. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/references/lighting_and_photorealism.md +19 -0
  432. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/templates/visual_style_bible.md +33 -0
  433. package/resources/skills/director-skills/upstream/skills/style-cinematography-director/tests/style_translation_tests.md +5 -0
  434. package/resources/skills/director-skills/upstream/tests/master_router_tests.md +80 -0
  435. package/resources/skills/drama-production/manifest.json +933 -0
  436. package/resources/skills/drama-production/upstream/LICENSE +21 -0
  437. package/resources/skills/drama-production/upstream/skills/short-drama/SKILL.md +153 -0
  438. package/resources/skills/drama-production/upstream/skills/short-drama/agents/openai.yaml +4 -0
  439. package/resources/skills/drama-production/upstream/skills/short-drama/assets/creator-decision.example.jsonl +4 -0
  440. package/resources/skills/drama-production/upstream/skills/short-drama/assets/dashboard/app.js +1263 -0
  441. package/resources/skills/drama-production/upstream/skills/short-drama/assets/dashboard/index.html +114 -0
  442. package/resources/skills/drama-production/upstream/skills/short-drama/assets/dashboard/styles.css +297 -0
  443. package/resources/skills/drama-production/upstream/skills/short-drama/assets/production-observation.example.jsonl +2 -0
  444. package/resources/skills/drama-production/upstream/skills/short-drama/assets/project-template/short-drama.json +36 -0
  445. package/resources/skills/drama-production/upstream/skills/short-drama/assets/reference-observation.example.jsonl +2 -0
  446. package/resources/skills/drama-production/upstream/skills/short-drama/references/audience-reveal.md +21 -0
  447. package/resources/skills/drama-production/upstream/skills/short-drama/references/contract-and-ownership.md +45 -0
  448. package/resources/skills/drama-production/upstream/skills/short-drama/references/creator-documents.md +230 -0
  449. package/resources/skills/drama-production/upstream/skills/short-drama/references/creator-workflow.md +98 -0
  450. package/resources/skills/drama-production/upstream/skills/short-drama/references/form-cards/Q/347/211/210/350/241/250/350/276/276.md +73 -0
  451. package/resources/skills/drama-production/upstream/skills/short-drama/references/form-cards//344/272/214/347/273/264/345/212/250/346/200/201/346/274/253.md +74 -0
  452. package/resources/skills/drama-production/upstream/skills/short-drama/references/form-cards//345/233/275/346/274/253/344/272/214/346/254/241/345/205/203.md +79 -0
  453. package/resources/skills/drama-production/upstream/skills/short-drama/references/form-cards//345/256/236/346/213/215.md +75 -0
  454. package/resources/skills/drama-production/upstream/skills/short-drama/references/form-cards//346/260/264/345/242/250/347/254/224/350/247/246.md +85 -0
  455. package/resources/skills/drama-production/upstream/skills/short-drama/references/form-cards//351/243/216/346/240/274/345/214/226/344/270/211/347/273/264.md +72 -0
  456. package/resources/skills/drama-production/upstream/skills/short-drama/references/knowhow-index.md +85 -0
  457. package/resources/skills/drama-production/upstream/skills/short-drama/references/look-development.md +51 -0
  458. package/resources/skills/drama-production/upstream/skills/short-drama/references/pickup-and-alternate.md +24 -0
  459. package/resources/skills/drama-production/upstream/skills/short-drama/references/production-form-profiles.md +126 -0
  460. package/resources/skills/drama-production/upstream/skills/short-drama/references/reference-roles.md +53 -0
  461. package/resources/skills/drama-production/upstream/skills/short-drama/references/runtime-preflight.md +24 -0
  462. package/resources/skills/drama-production/upstream/skills/short-drama/scripts/creator_markdown_check.py +1413 -0
  463. package/resources/skills/drama-production/upstream/skills/short-drama/scripts/dashboard_server.py +1798 -0
  464. package/resources/skills/drama-production/upstream/skills/short-drama/scripts/project_tool.py +2454 -0
  465. package/resources/skills/drama-production/upstream/skills/short-drama/scripts/selftest.py +287 -0
  466. package/resources/skills/drama-production/upstream/skills/short-drama-assets/SKILL.md +76 -0
  467. package/resources/skills/drama-production/upstream/skills/short-drama-assets/agents/openai.yaml +4 -0
  468. package/resources/skills/drama-production/upstream/skills/short-drama-assets/assets/character-look.example.jsonl +3 -0
  469. package/resources/skills/drama-production/upstream/skills/short-drama-assets/assets/continuity.example.jsonl +4 -0
  470. package/resources/skills/drama-production/upstream/skills/short-drama-assets/assets/decisions.example.jsonl +5 -0
  471. package/resources/skills/drama-production/upstream/skills/short-drama-assets/assets/location-view.example.jsonl +3 -0
  472. package/resources/skills/drama-production/upstream/skills/short-drama-assets/assets/occurrences.example.jsonl +5 -0
  473. package/resources/skills/drama-production/upstream/skills/short-drama-assets/assets/prop-state.example.jsonl +3 -0
  474. package/resources/skills/drama-production/upstream/skills/short-drama-assets/examples/minimal/characters.jsonl +2 -0
  475. package/resources/skills/drama-production/upstream/skills/short-drama-assets/examples/minimal/looks.jsonl +2 -0
  476. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/asset-review-checklist.md +82 -0
  477. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/character-and-look.md +190 -0
  478. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/continuity-delta.md +120 -0
  479. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/continuity-lock.md +122 -0
  480. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/identity-vs-variant.md +140 -0
  481. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/location-and-view.md +84 -0
  482. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/occurrence-extraction.md +108 -0
  483. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/prop-and-state.md +126 -0
  484. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/stage-contract.md +43 -0
  485. package/resources/skills/drama-production/upstream/skills/short-drama-assets/references/voice-direction.md +179 -0
  486. package/resources/skills/drama-production/upstream/skills/short-drama-assets/scripts/asset_check.py +267 -0
  487. package/resources/skills/drama-production/upstream/skills/short-drama-assets/scripts/selftest.py +89 -0
  488. package/resources/skills/drama-production/upstream/skills/short-drama-develop/SKILL.md +157 -0
  489. package/resources/skills/drama-production/upstream/skills/short-drama-develop/agents/openai.yaml +4 -0
  490. package/resources/skills/drama-production/upstream/skills/short-drama-develop/assets/adaptation-map.example.jsonl +1 -0
  491. package/resources/skills/drama-production/upstream/skills/short-drama-develop/assets/creative-brief.md +120 -0
  492. package/resources/skills/drama-production/upstream/skills/short-drama-develop/assets/episode-map.jsonl +1 -0
  493. package/resources/skills/drama-production/upstream/skills/short-drama-develop/assets/story-engine.md +181 -0
  494. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/adaptation-craft.md +219 -0
  495. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/creative-reference-intake.md +57 -0
  496. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/director-brief-craft.md +113 -0
  497. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/episode-design.md +509 -0
  498. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-and-hook-playbook.md +240 -0
  499. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//344/272/262/345/255/220/351/232/220/347/247/230.md +112 -0
  500. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//344/273/231/344/276/240/344/277/256/347/234/237.md +51 -0
  501. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//345/212/250/344/275/234/344/273/273/345/212/241.md +51 -0
  502. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//345/217/244/350/243/205/346/235/203/350/260/213.md +51 -0
  503. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//345/244/215/344/273/207/346/211/223/350/204/270.md +51 -0
  504. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//345/256/266/345/272/255/345/205/263/347/263/273.md +51 -0
  505. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//346/202/254/347/226/221/350/247/204/345/210/231.md +51 -0
  506. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//347/224/237/346/264/273/346/265/201.md +51 -0
  507. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//347/240/264/351/225/234/351/207/215/345/234/206.md +109 -0
  508. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//350/201/214/345/234/272/345/226/234/345/211/247.md +51 -0
  509. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//350/261/252/351/227/250/345/251/232/346/201/213.md +51 -0
  510. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards//350/272/253/344/273/275/351/224/231/344/275/215.md +51 -0
  511. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/genre-cards.md +92 -0
  512. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/mechanism-loop.md +282 -0
  513. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/multi-episode-intake.md +128 -0
  514. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/premise-devices.md +211 -0
  515. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/reveal-reversal-payoff.md +99 -0
  516. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/serial-character-and-memory.md +293 -0
  517. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/stage-contract.md +88 -0
  518. package/resources/skills/drama-production/upstream/skills/short-drama-develop/references/story-craft.md +359 -0
  519. package/resources/skills/drama-production/upstream/skills/short-drama-develop/scripts/episode_intake.py +699 -0
  520. package/resources/skills/drama-production/upstream/skills/short-drama-develop/scripts/selftest.py +47 -0
  521. package/resources/skills/drama-production/upstream/skills/short-drama-edit/SKILL.md +146 -0
  522. package/resources/skills/drama-production/upstream/skills/short-drama-edit/agents/openai.yaml +4 -0
  523. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/README.md +60 -0
  524. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/package.json +15 -0
  525. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/remotion.config.ts +6 -0
  526. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/src/Root.tsx +26 -0
  527. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/src/Subtitles.tsx +88 -0
  528. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/src/font.ts +46 -0
  529. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/src/index.ts +4 -0
  530. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/src/schema.ts +32 -0
  531. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets/remotion/tsconfig.json +13 -0
  532. package/resources/skills/drama-production/upstream/skills/short-drama-edit/assets//345/211/252/350/276/221/345/215/225.md +43 -0
  533. package/resources/skills/drama-production/upstream/skills/short-drama-edit/references/cut-craft.md +38 -0
  534. package/resources/skills/drama-production/upstream/skills/short-drama-edit/references/delivery-verify.md +29 -0
  535. package/resources/skills/drama-production/upstream/skills/short-drama-edit/references/generated-footage.md +54 -0
  536. package/resources/skills/drama-production/upstream/skills/short-drama-edit/references/sound-and-subtitles.md +60 -0
  537. package/resources/skills/drama-production/upstream/skills/short-drama-edit/references/stage-contract.md +51 -0
  538. package/resources/skills/drama-production/upstream/skills/short-drama-edit/scripts/edit_tool.py +1156 -0
  539. package/resources/skills/drama-production/upstream/skills/short-drama-edit/scripts/selftest.py +520 -0
  540. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/SKILL.md +73 -0
  541. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/agents/openai.yaml +4 -0
  542. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/assets/image-prompt-spec.jsonl.md +187 -0
  543. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/assets/image-prompts.md +42 -0
  544. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/assets/lookdev-frame-spec.jsonl.md +128 -0
  545. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/assets/lookdev-prompts.md +34 -0
  546. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/examples/minimal-image-prompt-specs.jsonl +2 -0
  547. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/character-and-look.md +153 -0
  548. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/common-recipe.md +241 -0
  549. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/edit-and-revision.md +110 -0
  550. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/location-plate.md +151 -0
  551. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/look-and-state-variant.md +97 -0
  552. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/lookdev-frame.md +34 -0
  553. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/production-sheet-recipes.md +177 -0
  554. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/prop-plate.md +137 -0
  555. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/review-and-fixtures.md +92 -0
  556. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/references/stage-contract.md +32 -0
  557. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/scripts/image_prompt_check.py +443 -0
  558. package/resources/skills/drama-production/upstream/skills/short-drama-image-prompts/scripts/selftest.py +95 -0
  559. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/SKILL.md +245 -0
  560. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/agents/openai.yaml +4 -0
  561. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/assets/episode-candidate.example.jsonl +3 -0
  562. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/references/adaptation-triage.md +116 -0
  563. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/references/adaptation-value.md +124 -0
  564. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/references/aggregation-and-entities.md +155 -0
  565. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/references/chapter-extraction.md +144 -0
  566. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/references/stage-contract.md +67 -0
  567. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/scripts/novel_index.py +651 -0
  568. package/resources/skills/drama-production/upstream/skills/short-drama-novel-analyze/scripts/selftest.py +51 -0
  569. package/resources/skills/drama-production/upstream/skills/short-drama-produce/SKILL.md +183 -0
  570. package/resources/skills/drama-production/upstream/skills/short-drama-produce/agents/openai.yaml +4 -0
  571. package/resources/skills/drama-production/upstream/skills/short-drama-produce/references/adapter-contract.md +219 -0
  572. package/resources/skills/drama-production/upstream/skills/short-drama-produce/references/providers/gpt-image-2.md +24 -0
  573. package/resources/skills/drama-production/upstream/skills/short-drama-produce/references/providers/minimax-h3-video.md +86 -0
  574. package/resources/skills/drama-production/upstream/skills/short-drama-produce/references/providers/minimax-music.md +25 -0
  575. package/resources/skills/drama-production/upstream/skills/short-drama-produce/references/providers/minimax-speech.md +41 -0
  576. package/resources/skills/drama-production/upstream/skills/short-drama-produce/references/providers/seedance.md +64 -0
  577. package/resources/skills/drama-production/upstream/skills/short-drama-produce/scripts/fixture_adapter.py +77 -0
  578. package/resources/skills/drama-production/upstream/skills/short-drama-produce/scripts/production_tool.py +2205 -0
  579. package/resources/skills/drama-production/upstream/skills/short-drama-produce/scripts/provider_adapters.py +1747 -0
  580. package/resources/skills/drama-production/upstream/skills/short-drama-produce/scripts/selftest.py +135 -0
  581. package/resources/skills/drama-production/upstream/skills/short-drama-review/SKILL.md +118 -0
  582. package/resources/skills/drama-production/upstream/skills/short-drama-review/agents/openai.yaml +4 -0
  583. package/resources/skills/drama-production/upstream/skills/short-drama-review/assets/finding-template.jsonl +2 -0
  584. package/resources/skills/drama-production/upstream/skills/short-drama-review/assets/supersession-decision.example.json +42 -0
  585. package/resources/skills/drama-production/upstream/skills/short-drama-review/assets/verdict-template.json +32 -0
  586. package/resources/skills/drama-production/upstream/skills/short-drama-review/examples/minimal-findings.jsonl +2 -0
  587. package/resources/skills/drama-production/upstream/skills/short-drama-review/examples/minimal-verdict.json +34 -0
  588. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/anti-template-repair.md +109 -0
  589. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/production-quality-gates.md +276 -0
  590. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/project-calibration.md +83 -0
  591. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/review-method.md +81 -0
  592. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/rubric-assets-prompts.md +111 -0
  593. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/rubric-source-analysis.md +108 -0
  594. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/rubric-story-script.md +264 -0
  595. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/rubric-visual-motion.md +184 -0
  596. package/resources/skills/drama-production/upstream/skills/short-drama-review/references/stage-contract.md +28 -0
  597. package/resources/skills/drama-production/upstream/skills/short-drama-review/scripts/review_check.py +325 -0
  598. package/resources/skills/drama-production/upstream/skills/short-drama-review/scripts/selftest.py +87 -0
  599. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/SKILL.md +175 -0
  600. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/agents/openai.yaml +4 -0
  601. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/assets/coverage-audition.example.jsonl +2 -0
  602. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/assets/coverage-template.json +49 -0
  603. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/assets/keyframe-prompts.md +36 -0
  604. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/assets/keyframe-template.jsonl +2 -0
  605. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/assets/revision-lineage.fragment.json +12 -0
  606. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/assets/scene-visual-plan.example.jsonl +2 -0
  607. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/assets/shot-template.jsonl +2 -0
  608. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/blocking-playbooks.md +216 -0
  609. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/comic-keyframe-lexicon.md +156 -0
  610. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/coverage-audition.md +34 -0
  611. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/keyframe-craft.md +174 -0
  612. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/lighting-craft.md +39 -0
  613. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/production-shot-grammar.md +279 -0
  614. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/review-and-fixtures.md +36 -0
  615. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/scene-visual-plan.md +30 -0
  616. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/screenplay-to-keyframe-example.md +155 -0
  617. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/shot-craft.md +266 -0
  618. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/shot-revision-identity.md +25 -0
  619. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/references/stage-contract.md +57 -0
  620. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/scripts/selftest.py +191 -0
  621. package/resources/skills/drama-production/upstream/skills/short-drama-storyboard/scripts/storyboard_check.py +824 -0
  622. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/SKILL.md +154 -0
  623. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/agents/openai.yaml +4 -0
  624. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/assets/coverage-scope.fragment.json +21 -0
  625. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/assets/delivery-container.jsonl.md +101 -0
  626. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/assets/motion-spec.jsonl.md +217 -0
  627. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/assets/motion-terminal.example.jsonl +2 -0
  628. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/assets/music-spec.jsonl.md +31 -0
  629. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/assets/performance.fragment.json +38 -0
  630. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/assets/video-prompts.md +67 -0
  631. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/examples/minimal-music-specs.jsonl +2 -0
  632. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/camera-audio-continuity.md +259 -0
  633. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/delivery-profile.md +273 -0
  634. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/generability.md +93 -0
  635. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/minimax-h3.md +253 -0
  636. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/motion-recipe.md +315 -0
  637. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/performance-action-timing.md +209 -0
  638. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/production-prompt-grammar.md +304 -0
  639. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/review-and-fixtures.md +139 -0
  640. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/seedance-2.0.md +50 -0
  641. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/seedance-2.5.md +122 -0
  642. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/stage-contract.md +60 -0
  643. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/references/target-model-profile.md +116 -0
  644. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/scripts/container_check.py +329 -0
  645. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/scripts/motion_timing_check.py +450 -0
  646. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/scripts/music_spec_check.py +327 -0
  647. package/resources/skills/drama-production/upstream/skills/short-drama-video-prompts/scripts/selftest.py +82 -0
  648. package/resources/skills/drama-production/upstream/skills/short-drama-write/SKILL.md +99 -0
  649. package/resources/skills/drama-production/upstream/skills/short-drama-write/agents/openai.yaml +4 -0
  650. package/resources/skills/drama-production/upstream/skills/short-drama-write/assets/beats.jsonl +2 -0
  651. package/resources/skills/drama-production/upstream/skills/short-drama-write/assets/episode-card-standalone.json +120 -0
  652. package/resources/skills/drama-production/upstream/skills/short-drama-write/assets/episode-card.json +55 -0
  653. package/resources/skills/drama-production/upstream/skills/short-drama-write/assets/screenplay.md +36 -0
  654. package/resources/skills/drama-production/upstream/skills/short-drama-write/assets/voice-record-sheet.jsonl.md +89 -0
  655. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/dialogue-craft.md +526 -0
  656. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/production-format-dialect.md +273 -0
  657. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/scene-handoff-capsule.md +25 -0
  658. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/scene-sound-dramaturgy.md +43 -0
  659. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/screenplay-format.md +266 -0
  660. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/script-craft.md +745 -0
  661. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/stage-contract.md +36 -0
  662. package/resources/skills/drama-production/upstream/skills/short-drama-write/references/substitutable-realization.md +107 -0
  663. package/resources/skills/drama-production/upstream/skills/short-drama-write/scripts/duration_estimate.py +309 -0
  664. package/resources/skills/drama-production/upstream/skills/short-drama-write/scripts/screenplay_index.py +1091 -0
  665. package/resources/skills/drama-production/upstream/skills/short-drama-write/scripts/selftest.py +229 -0
  666. package/resources/skills/drama-production/upstream/skills/short-drama-write/scripts/voice_sheet_check.py +416 -0
  667. package/resources/skills/viora-canvas-production/manifest.json +23 -0
  668. package/resources/skills/viora-canvas-production/references/canvas-contract.md +50 -0
  669. package/resources/skills/viora-canvas-production/references/creative-production.md +50 -0
  670. package/resources/skills/viora-canvas-production/references/generation-delivery.md +36 -0
  671. package/resources/skills/viora-canvas-production/references/production-ledger.md +25 -0
@@ -0,0 +1,286 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { record, requiredText } from '../core/validation.js';
3
+ import { appendBounded } from '../core/collections.js';
4
+ import { completionCondition, WakeToolsUnavailable } from './wakeup-context.js';
5
+ import { bindBoardContinuation } from '../tasks/continuation.js';
6
+ /** Durable wake-ups share schedule storage, but never inherit recurring execution semantics. */
7
+ export class ScheduleContinuations {
8
+ store;
9
+ runner;
10
+ active = new Map();
11
+ notifying = new Set();
12
+ unsubscribe;
13
+ closed = false;
14
+ constructor(store) {
15
+ this.store = store;
16
+ }
17
+ configure(runner) { this.runner = runner; }
18
+ start() {
19
+ this.unsubscribe ??= this.store.subscribe(state => {
20
+ for (const [id, controller] of this.active) {
21
+ const entry = state.schedules.find(item => item.id === id);
22
+ if (!entry || !state.companions.find(c => c.id === entry.companionId)?.capabilities.includes('schedules')
23
+ || entry.continuation?.state === 'cancelled' || (!entry.enabled && entry.continuation?.state === 'running'))
24
+ controller.abort();
25
+ }
26
+ }, () => { });
27
+ }
28
+ close() { this.closed = true; this.unsubscribe?.(); this.unsubscribe = undefined; for (const c of this.active.values())
29
+ c.abort(); }
30
+ async defer(owner, sessionId, value, origin) {
31
+ const input = record(value, 'continuation');
32
+ const now = Date.now(), delay = minutes(input.delayMinutes, 2, 1, 1440);
33
+ const taskKey = requiredText(input.taskKey, 'taskKey', 200);
34
+ const externalTaskId = requiredText(input.externalTaskId, 'externalTaskId', 300);
35
+ const title = requiredText(input.title, 'title', 160);
36
+ const check = requiredText(input.check, 'check', 6000), nextStep = requiredText(input.nextStep, 'nextStep', 6000);
37
+ const completion = input.completion === undefined ? undefined : requiredText(input.completion, 'completion', 3000);
38
+ const timeoutMinutes = minutes(input.timeoutMinutes, 10, 1, 120);
39
+ const maxAttempts = minutes(input.maxAttempts, 12, 1, 100);
40
+ const deadlineAt = now + minutes(input.deadlineMinutes, 1440, delay, 43_200) * 60_000;
41
+ let result;
42
+ await this.store.update(state => {
43
+ if (!state.companions.find(c => c.id === owner)?.capabilities.includes('schedules'))
44
+ throw new Error('请先勾选伙伴的定时任务能力');
45
+ if (!state.sessions.some(s => s.companionId === owner && s.sessionId === sessionId))
46
+ throw new Error('只能从当前伙伴的正式会话预约续接');
47
+ if (origin && !state.sessions.some(s => s.id === origin.id && s.kind === 'channel' && s.companionId === owner && s.sessionId === sessionId && s.channelId === origin.channelId && s.userId === origin.userId))
48
+ throw new Error('预约来源渠道已变更');
49
+ const existing = state.schedules.find(s => s.companionId === owner && s.continuation?.taskKey === taskKey);
50
+ if (existing) {
51
+ if (existing.continuation.externalTaskId !== externalTaskId || existing.continuation.originSessionId !== sessionId)
52
+ throw new Error('taskKey 已用于另一个任务或会话,请核实任务身份');
53
+ // Adopt an old timer only from its exact originating, currently executing board context.
54
+ if (!existing.continuation.board && existing.continuation.state === 'waiting')
55
+ bindBoardContinuation(state, existing, input.boardTaskId === undefined ? undefined : requiredText(input.boardTaskId, 'boardTaskId', 160));
56
+ if (input.boardTaskId !== undefined && existing.continuation?.board?.taskId !== input.boardTaskId)
57
+ throw new Error('此预约未绑定当前看板任务,请先核实原预约,不可复用到其他任务');
58
+ result = structuredClone(existing);
59
+ return;
60
+ }
61
+ if (state.schedules.length >= 100)
62
+ throw new Error('定时任务已达到 100 项,请先清理旧计划');
63
+ result = { id: `schedule-${randomUUID()}`, companionId: owner, title, prompt: check,
64
+ schedule: { kind: 'once', at: now + delay * 60_000 }, enabled: true, destroySessionAfterRun: false,
65
+ overlapPolicy: 'queue', timeoutMinutes, nextRunAt: now + delay * 60_000, createdAt: now, updatedAt: now,
66
+ continuation: { taskKey, externalTaskId, originSessionId: sessionId, check, ...(completion === undefined ? {} : { completion }), nextStep, state: 'waiting', attempts: 0, checks: 0, maxAttempts, deadlineAt } };
67
+ bindBoardContinuation(state, result, input.boardTaskId === undefined ? undefined : requiredText(input.boardTaskId, 'boardTaskId', 160));
68
+ if (origin && !result.continuation.board)
69
+ result.continuation.originChannel = { routeId: origin.id, channelId: origin.channelId, userId: origin.userId };
70
+ state.schedules.push(result);
71
+ });
72
+ return structuredClone(result);
73
+ }
74
+ async resolve(owner, sessionId, value) {
75
+ const input = record(value, 'continuation result'), id = requiredText(input.scheduleId, 'scheduleId', 160);
76
+ const token = input.runToken === undefined ? undefined : requiredText(input.runToken, 'runToken', 160);
77
+ const summary = requiredText(input.summary, 'summary', 12_000);
78
+ if (!['pending', 'completed', 'blocked'].includes(String(input.outcome)))
79
+ throw new Error('outcome 必须为 pending、completed 或 blocked');
80
+ let result;
81
+ await this.store.update(state => {
82
+ if (!state.companions.find(c => c.id === owner)?.capabilities.includes('schedules'))
83
+ throw new Error('定时任务能力已撤回');
84
+ const entry = state.schedules.find(s => s.id === id && s.companionId === owner), wake = entry?.continuation;
85
+ const running = wake?.state === 'running' && token !== undefined && wake.runToken === token;
86
+ // The originating conversation may verify an external result before its timer fires.
87
+ // It can settle only a waiting task with an exact external identity, never a stale run token.
88
+ const early = wake?.state === 'waiting' && token === undefined && input.externalTaskId === wake.externalTaskId && input.outcome !== 'pending';
89
+ const recovered = wake?.state === 'blocked' && !wake.board && token === undefined && input.externalTaskId === wake.externalTaskId && input.outcome === 'completed';
90
+ if (!entry || !wake || (!recovered && (!entry.enabled || (!running && !early))) || wake.originSessionId !== sessionId)
91
+ throw new Error('续接轮次已结束、已取消或不属于当前会话,请重新读取计划');
92
+ if (recovered) {
93
+ delete wake.notifiedAt;
94
+ delete wake.nextNotifyAt;
95
+ delete wake.finalReply;
96
+ }
97
+ const now = Date.now();
98
+ wake.summary = summary;
99
+ wake.checks = (wake.checks ?? 0) + 1;
100
+ delete wake.runToken;
101
+ if (input.outcome === 'pending') {
102
+ const delay = minutes(input.delayMinutes, Math.min(60, 2 ** Math.min(wake.attempts, 6)), 1, 1440);
103
+ if (wake.attempts >= wake.maxAttempts || now + delay * 60_000 > wake.deadlineAt) {
104
+ wake.state = 'blocked';
105
+ wake.summary = `等待已达到次数或截止时间上限。${summary}`;
106
+ entry.enabled = false;
107
+ }
108
+ else {
109
+ wake.state = 'waiting';
110
+ entry.nextRunAt = now + delay * 60_000;
111
+ entry.schedule = { kind: 'once', at: entry.nextRunAt };
112
+ }
113
+ }
114
+ else {
115
+ wake.state = input.outcome;
116
+ entry.enabled = false;
117
+ }
118
+ entry.lastRunAt = now;
119
+ entry.lastRunStatus = wake.state === 'blocked' ? 'failed' : 'completed';
120
+ entry.updatedAt = now;
121
+ result = structuredClone(entry);
122
+ });
123
+ return result;
124
+ }
125
+ async cancel(owner, id) {
126
+ await this.store.update(state => {
127
+ const entry = state.schedules.find(s => s.id === id && s.companionId === owner);
128
+ if (!entry?.continuation)
129
+ throw new Error('续接计划不存在');
130
+ entry.continuation.state = 'cancelled';
131
+ delete entry.continuation.runToken;
132
+ entry.enabled = false;
133
+ entry.updatedAt = Date.now();
134
+ });
135
+ }
136
+ async tick() {
137
+ if (this.closed)
138
+ return;
139
+ for (const entry of this.store.snapshot().schedules.filter(s => s.continuation)) {
140
+ if (!this.store.hasCapability(entry.companionId, 'schedules'))
141
+ continue;
142
+ if (entry.enabled && entry.nextRunAt <= Date.now())
143
+ void this.run(entry.id).catch(() => { });
144
+ else if (!this.active.has(entry.id))
145
+ void this.notify(entry.id).catch(() => { });
146
+ }
147
+ }
148
+ async run(id) {
149
+ if (this.closed || !this.runner || this.active.has(id))
150
+ return;
151
+ const initial = this.store.snapshot().schedules.find(s => s.id === id);
152
+ if (!initial?.enabled || !initial.continuation || !this.store.hasCapability(initial.companionId, 'schedules'))
153
+ return;
154
+ if ([...this.active.keys()].some(key => this.store.snapshot().schedules.find(s => s.id === key)?.companionId === initial.companionId))
155
+ return;
156
+ const controller = new AbortController();
157
+ this.active.set(id, controller);
158
+ let claimed;
159
+ try {
160
+ await this.store.update(state => {
161
+ const entry = state.schedules.find(s => s.id === id), wake = entry?.continuation;
162
+ if (!entry?.enabled || !wake || !['waiting', 'running'].includes(wake.state) || !state.companions.find(c => c.id === entry.companionId)?.capabilities.includes('schedules'))
163
+ return;
164
+ // A persisted running state after restart must re-check external facts, not replay submission.
165
+ if (wake.attempts >= wake.maxAttempts || Date.now() >= wake.deadlineAt) {
166
+ wake.state = 'blocked';
167
+ wake.summary = '等待已达到检查次数或截止时间上限,请人工核实外部任务';
168
+ entry.enabled = false;
169
+ return;
170
+ }
171
+ wake.state = 'running';
172
+ wake.attempts++;
173
+ wake.runToken = randomUUID();
174
+ wake.dispatchedAt = Date.now();
175
+ entry.updatedAt = Date.now();
176
+ appendBounded(state.executionRuns, { id: `wake-${wake.runToken}`, kind: 'schedule', ownerCompanionId: entry.companionId,
177
+ sessionId: wake.originSessionId, sourceId: entry.id, status: 'running', destroyAfterRun: false, startedAt: Date.now(), toolNames: [] }, 500);
178
+ claimed = structuredClone(entry);
179
+ });
180
+ if (!claimed)
181
+ return;
182
+ controller.signal.throwIfAborted();
183
+ const companion = this.store.snapshot().companions.find(c => c.id === claimed.companionId);
184
+ await this.runner.execute(claimed, companion, controller.signal);
185
+ // A natural-language promise is not a durable outcome. Never silently mark it completed.
186
+ await this.blockUnresolved(id, claimed.continuation.runToken, '本轮未提交续接结果,已暂停;请核实执行记录后处理');
187
+ }
188
+ catch (error) {
189
+ const message = error instanceof WakeToolsUnavailable || (error instanceof Error && error.message.startsWith('本次定时检查超过')) ? error.message : '本轮续接执行失败,已暂停以避免重复执行后续动作';
190
+ if (claimed && !this.closed)
191
+ await this.blockUnresolved(id, claimed.continuation.runToken, controller.signal.aborted ? '执行被取消或能力已关闭;请核实执行记录后处理' : message);
192
+ }
193
+ finally {
194
+ this.active.delete(id);
195
+ if (claimed && !this.closed)
196
+ await this.store.update(state => {
197
+ const run = state.executionRuns.find(r => r.id === `wake-${claimed.continuation.runToken}`);
198
+ const wake = state.schedules.find(s => s.id === id)?.continuation;
199
+ if (run) {
200
+ run.status = !wake || wake.state === 'cancelled' ? 'canceled' : wake.state === 'blocked' ? 'failed' : 'completed';
201
+ run.completedAt = Date.now();
202
+ if (wake?.summary)
203
+ run.outputSummary = wake.summary.slice(0, 2000);
204
+ if (run.status === 'failed')
205
+ run.error = wake?.summary ?? '续接失败';
206
+ }
207
+ });
208
+ if (!this.closed)
209
+ await this.notify(id).catch(() => { });
210
+ }
211
+ }
212
+ async blockUnresolved(id, token, summary) {
213
+ await this.store.update(state => {
214
+ const entry = state.schedules.find(s => s.id === id), wake = entry?.continuation;
215
+ if (!entry || !wake || wake.state !== 'running' || wake.runToken !== token)
216
+ return;
217
+ wake.state = 'blocked';
218
+ wake.summary = summary;
219
+ delete wake.runToken;
220
+ entry.enabled = false;
221
+ entry.lastRunStatus = 'failed';
222
+ entry.lastRunAt = Date.now();
223
+ entry.updatedAt = Date.now();
224
+ });
225
+ }
226
+ async notify(id) {
227
+ const entry = this.store.snapshot().schedules.find(s => s.id === id), wake = entry?.continuation;
228
+ // Linked task delivery belongs to the requirement, never to each timer.
229
+ if (wake?.board)
230
+ return;
231
+ const delivery = wake?.finalReply;
232
+ if (!this.runner || this.notifying.has(id) || !entry || !wake || !['completed', 'blocked'].includes(wake.state)
233
+ || !delivery || delivery.notifiedAt || (delivery.nextNotifyAt ?? 0) > Date.now() || !this.store.hasCapability(entry.companionId, 'schedules'))
234
+ return;
235
+ this.notifying.add(id);
236
+ try {
237
+ await this.runner.notify(entry);
238
+ await this.store.update(state => {
239
+ const current = state.schedules.find(s => s.id === id)?.continuation;
240
+ if (current?.state !== wake.state)
241
+ return;
242
+ if (current.finalReply?.key === delivery.key)
243
+ current.finalReply.notifiedAt = Date.now();
244
+ });
245
+ }
246
+ catch {
247
+ await this.store.update(state => {
248
+ const current = state.schedules.find(s => s.id === id)?.continuation;
249
+ if (current?.finalReply?.key === delivery.key)
250
+ current.finalReply.nextNotifyAt = Date.now() + 300_000;
251
+ });
252
+ }
253
+ finally {
254
+ this.notifying.delete(id);
255
+ }
256
+ }
257
+ }
258
+ function minutes(value, fallback, min, max) {
259
+ const result = value === undefined ? fallback : value;
260
+ if (!Number.isInteger(result) || result < min || result > max)
261
+ throw new Error(`参数须为 ${min}–${max} 范围的整数`);
262
+ return result;
263
+ }
264
+ export function continuationPrompt(entry) {
265
+ const wake = entry.continuation;
266
+ if (wake.board)
267
+ return `这是看板任务的外部结果核验,不是新任务,也不是执行整个后续流程。
268
+ 看板任务 ID:${wake.board.taskId};计划 ID:${entry.id};runToken:${wake.runToken};外部任务 ID:${wake.externalTaskId}
269
+ 先调用 partner_schedule list 确认本计划仍启用且 token 一致;过期请求直接结束。
270
+ 完成条件:${completionCondition(entry)}
271
+ 只读检查方法:${wake.check}
272
+ 上次结果:${wake.summary ?? '首次检查'}
273
+ 只核实已有外部任务,禁止重新提交、创建新预约或执行 nextStep。仍未完成调用 resolve outcome=pending 保存延期;已完成调用 resolve outcome=completed 并在 summary 写结果路径、外部 ID 和核实证据;失败调用 resolve outcome=blocked。每次 resolve 携带 scheduleId 和当前 runToken。
274
+ 提交回执后立即结束本轮。看板会恢复原任务执行后续步骤;等待不送验收,不向渠道发送中间通知,不使用 sleep 或 Goal 持续轮询。`;
275
+ return `这是一次长任务续接,不是新任务。只处理已授权范围,仍遵守当前权限及审批。先检查原任务是否已被用户取消或完成;已取消时调用 partner_schedule cancel。不可重复提交外部任务,重启后先核实已有产出。
276
+ 计划 ID:${entry.id}\n本轮 runToken:${wake.runToken}\n外部任务 ID:${wake.externalTaskId}
277
+ 检查次数:${wake.attempts}/${wake.maxAttempts};截止:${new Date(wake.deadlineAt).toISOString()}
278
+ 本预约自己的完成条件:\n${completionCondition(entry)}
279
+ 历史检查说明(仅提取查询方法;其中的后续动作不能扩大上面的完成条件):\n${wake.check}\n预约关闭后的后续流程(历史 Goal 引用仅作背景,不是关闭预约的前提,不为续接创建或修改 Goal):\n${wake.nextStep}\n上次结果:${wake.summary ?? '首次检查'}
280
+ 仍在运行:调用 partner_schedule resolve,outcome=pending,summary 写真实检查结果,可指定 delayMinutes;工具保存延期成功后结束本轮,不睡眠轮询,不通知用户。
281
+ 已完成:只核实本预约自己的完成条件,立即调用 resolve,outcome=completed 关闭本预约,summary 写核实证据;然后才继续上述后续流程。不得等待整个对话或 Goal 完成,也不得把后续流程的新任务当成原任务延期。若后续步骤产生新的长任务,为新任务单独 defer。
282
+ 失败、无法核实或需新增授权:调用 resolve,outcome=blocked,summary 写原因。resolve 必须携带上述 scheduleId 和 runToken。不要仅口头声称已预约或完成。
283
+ 只有形成面向用户的最终结论或最终需要用户处理的问题时,才写最终回答及产物路径;单个外部任务完成、受阻、检查失败都只记录在工具回执中,不为此单独写渠道通知。还有后续步骤或新预约时不要把阶段进展写成最终交付。系统仅投递最终回答及附件,不投递预约状态或原始错误,不要另调渠道发送工具。原会话后来核实独立预约的外部任务已完成,可对 blocked 状态使用 scheduleId、精确 externalTaskId、outcome=completed、summary(不传旧 runToken)补交证据;不重新提交生成任务,不以此恢复看板任务。
284
+ 本次请求可能插入正在执行的会话;先用 partner_schedule list 核对本预约仍启用且 runToken 相同,过期或取消的请求直接跳过。这是已有预约的续接,不是新增关注,不调用 partner_concern_suggest,不编造 evidence 或占位参数。工具缺失时明确记录受阻,不使用无关工具代替。已有结果只核验,不重复生成后续已有产物。不得使用 sleep 等待;未完成即 pending 并释放检查。预约状态只留在内部记录,渠道只接收最终面向用户的回答。不要创建周期任务或新的同任务续接来绕过次数和期限。`;
285
+ }
286
+ //# sourceMappingURL=continuations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continuations.js","sourceRoot":"","sources":["../../src/scheduler/continuations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAItD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAOhE,gGAAgG;AAChG,MAAM,OAAO,qBAAqB;IAMH;IALrB,MAAM,CAAqB;IAClB,MAAM,GAAG,IAAI,GAAG,EAA2B,CAAA;IAC3C,SAAS,GAAG,IAAI,GAAG,EAAU,CAAA;IACtC,WAAW,CAA0B;IACrC,MAAM,GAAG,KAAK,CAAA;IACtB,YAA6B,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;IAAG,CAAC;IAEpD,SAAS,CAAC,MAA0B,IAAU,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA,CAAC,CAAC;IACpE,KAAK;QACH,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAChD,KAAK,MAAM,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;gBAC1D,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC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14
17
  };
18
+ continuation?: ScheduleContinuation;
15
19
  enabled: boolean;
16
20
  destroySessionAfterRun: boolean;
17
21
  overlapPolicy: ScheduleOverlapPolicy;
@@ -22,4 +26,40 @@ export interface ScheduledPartnerTask {
22
26
  createdAt: number;
23
27
  updatedAt: number;
24
28
  }
29
+ export interface ScheduleContinuation {
30
+ board?: {
31
+ taskId: string;
32
+ delegationId: string;
33
+ workRevision: number;
34
+ };
35
+ taskKey: string;
36
+ externalTaskId: string;
37
+ originSessionId: string;
38
+ originChannel?: {
39
+ routeId: string;
40
+ channelId: string;
41
+ userId: string;
42
+ };
43
+ check: string;
44
+ nextStep: string;
45
+ completion?: string;
46
+ state: 'waiting' | 'running' | 'completed' | 'blocked' | 'cancelled';
47
+ attempts: number;
48
+ checks?: number;
49
+ dispatchedAt?: number;
50
+ maxAttempts: number;
51
+ deadlineAt: number;
52
+ runToken?: string;
53
+ summary?: string;
54
+ notifiedAt?: number;
55
+ nextNotifyAt?: number;
56
+ messageId?: string;
57
+ finalReply?: {
58
+ key: string;
59
+ text: string;
60
+ referenceTexts: string[];
61
+ notifiedAt?: number;
62
+ nextNotifyAt?: number;
63
+ };
64
+ }
25
65
  //# sourceMappingURL=domain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../src/scheduler/domain.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;K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;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAA;IACtE,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,CAAA;IACpE,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACjH"}
@@ -0,0 +1,13 @@
1
+ import type { SessionEvent } from '@deepseek-ai/dsh-session';
2
+ import type { ScheduledPartnerTask } from './domain.js';
3
+ /** Match the durable wake message, never a nearby user or another task's turn. */
4
+ export declare function continuationFinalReply(entries: ScheduledPartnerTask[], sessionId: string, history: readonly SessionEvent[], turn: readonly SessionEvent[], end: SessionEvent): {
5
+ id: string;
6
+ messageId: string | undefined;
7
+ reply: {
8
+ text: string;
9
+ referenceTexts: string[];
10
+ key: string;
11
+ };
12
+ } | undefined;
13
+ //# sourceMappingURL=final-reply.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"final-reply.d.ts","sourceRoot":"","sources":["../../src/scheduler/final-reply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGvD,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,EAAE,GAAG,EAAE,YAAY;;;;;;;;cAa5K"}
@@ -0,0 +1,21 @@
1
+ import { channelReplyPartsAfter, isInternalTaskNotice } from '../channels/delivery-policy.js';
2
+ /** Match the durable wake message, never a nearby user or another task's turn. */
3
+ export function continuationFinalReply(entries, sessionId, history, turn, end) {
4
+ if (end.type !== 'turn/end' || end.data.reason.kind !== 'completed')
5
+ return;
6
+ const origin = [...history].reverse().find(event => event.type === 'user/message'
7
+ && (event.data.source.kind === 'user' || isInternalTaskNotice(event)));
8
+ if (!origin || origin.type !== 'user/message' || !isInternalTaskNotice(origin))
9
+ return;
10
+ const entry = entries.find(item => item.continuation?.originSessionId === sessionId && item.continuation.messageId === origin.data.id);
11
+ const wake = entry?.continuation;
12
+ if (!entry || !wake || wake.board || !['completed', 'blocked'].includes(wake.state))
13
+ return;
14
+ // Only this identified wake notice is excluded from the ordinary silence filter.
15
+ const parts = channelReplyPartsAfter(turn.filter(event => event !== origin), -1, true);
16
+ // Tool preambles may mention files; references alone are not a final answer.
17
+ if (!parts.text)
18
+ return;
19
+ return { id: entry.id, messageId: wake.messageId, reply: { key: `${sessionId}:${end.data.turn}`, ...parts } };
20
+ }
21
+ //# sourceMappingURL=final-reply.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"final-reply.js","sourceRoot":"","sources":["../../src/scheduler/final-reply.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AAE7F,kFAAkF;AAClF,MAAM,UAAU,sBAAsB,CAAC,OAA+B,EAAE,SAAiB,EAAE,OAAgC,EAAE,IAA6B,EAAE,GAAiB;IAC3K,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,WAAW;QAAE,OAAM;IAC3E,MAAM,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,cAAc;WAC5E,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACxE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,cAAc,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;QAAE,OAAM;IACtF,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACtI,MAAM,IAAI,GAAG,KAAK,EAAE,YAAY,CAAA;IAChC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAM;IAC3F,iFAAiF;IACjF,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;IACtF,6EAA6E;IAC7E,IAAI,CAAC,KAAK,CAAC,IAAI;QAAE,OAAM;IACvB,OAAO,EAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,EAAC,GAAG,EAAE,GAAG,SAAS,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAC,EAAC,CAAA;AAC3G,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { EphemeralExecutionService } from '../execution/service.js';
2
2
  import type { PartnerStore } from '../store.js';
3
3
  import type { ScheduledPartnerTask } from './domain.js';
4
+ import { ScheduleContinuations } from './continuations.js';
4
5
  export declare class PartnerSchedulerService {
5
6
  private readonly store;
6
7
  private readonly executor;
@@ -9,6 +10,7 @@ export declare class PartnerSchedulerService {
9
10
  private readonly running;
10
11
  private readonly queued;
11
12
  private closed;
13
+ readonly continuations: ScheduleContinuations;
12
14
  constructor(store: PartnerStore, executor: EphemeralExecutionService, timeZone: string);
13
15
  start(): void;
14
16
  close(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/scheduler/service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAIvD,qBAAa,uBAAuB;IAMtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAgB,OAAO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CAAA;AAI1D,qBAAa,uBAAuB;IAOtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAgB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAA6B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IANjI,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,MAAM,CAAQ;IAEtB,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAA;gBAChB,KAAK,EAAE,YAAY,EAAmB,QAAQ,EAAE,yBAAyB,EAAmB,QAAQ,EAAE,MAAM;IAEzI,KAAK,IAAI,IAAI;IAQP,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B,IAAI,IAAI,oBAAoB,EAAE;IAExB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAsB3E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA2BjE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAQ1B,IAAI;YAOJ,GAAG;YA2BH,OAAO;IAYrB,OAAO,CAAC,gBAAgB;CAMzB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,oBAAoB,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUhH"}
@@ -1,5 +1,6 @@
1
1
  import { randomUUID } from 'node:crypto';
2
2
  import { oneOf, optionalBoolean, record, requiredText } from '../core/validation.js';
3
+ import { ScheduleContinuations } from './continuations.js';
3
4
  const OVERLAP_POLICIES = ['skip', 'queue'];
4
5
  export class PartnerSchedulerService {
5
6
  store;
@@ -9,20 +10,24 @@ export class PartnerSchedulerService {
9
10
  running = new Set();
10
11
  queued = new Set();
11
12
  closed = false;
13
+ continuations;
12
14
  constructor(store, executor, timeZone) {
13
15
  this.store = store;
14
16
  this.executor = executor;
15
17
  this.timeZone = timeZone;
18
+ this.continuations = new ScheduleContinuations(store);
16
19
  }
17
20
  start() {
18
21
  if (this.timer || this.closed)
19
22
  return;
23
+ this.continuations.start();
20
24
  this.timer = setInterval(() => { void this.tick(); }, 15_000);
21
25
  this.timer.unref?.();
22
26
  void this.tick();
23
27
  }
24
28
  async close() {
25
29
  this.closed = true;
30
+ this.continuations.close();
26
31
  if (this.timer)
27
32
  clearInterval(this.timer);
28
33
  this.timer = undefined;
@@ -43,6 +48,8 @@ export class PartnerSchedulerService {
43
48
  nextRunAt: nextOccurrence(schedule, now, this.timeZone), createdAt: now, updatedAt: now,
44
49
  };
45
50
  await this.store.update(state => {
51
+ if (!state.companions.find(c => c.id === owner)?.capabilities.includes('schedules'))
52
+ throw new Error('请先勾选伙伴的定时任务能力');
46
53
  if (state.schedules.length >= 100)
47
54
  throw new Error('Scheduled task limit reached; remove an obsolete schedule first');
48
55
  state.schedules.push(entry);
@@ -56,6 +63,18 @@ export class PartnerSchedulerService {
56
63
  const entry = state.schedules.find(item => item.id === id);
57
64
  if (!entry)
58
65
  throw new Error('Schedule does not exist');
66
+ if (input.enabled === true && !state.companions.find(c => c.id === entry.companionId)?.capabilities.includes('schedules'))
67
+ throw new Error('请先勾选伙伴的定时任务能力');
68
+ if (entry.continuation) {
69
+ if (Object.keys(input).some(key => !['enabled', 'action', 'scheduleId'].includes(key)))
70
+ throw new Error('续接计划只支持暂停;延期请使用 resolve 更新当前轮次');
71
+ if (input.enabled === true && entry.continuation.state !== 'waiting')
72
+ throw new Error('已结束或受阻的续接不可直接重跑,请先核实原任务');
73
+ entry.enabled = optionalBoolean(input.enabled, entry.enabled);
74
+ entry.updatedAt = Date.now();
75
+ output = structuredClone(entry);
76
+ return;
77
+ }
59
78
  if (input.title !== undefined)
60
79
  entry.title = requiredText(input.title, 'title', 160);
61
80
  if (input.prompt !== undefined)
@@ -83,12 +102,18 @@ export class PartnerSchedulerService {
83
102
  const entry = this.store.snapshot().schedules.find(item => item.id === id);
84
103
  if (!entry)
85
104
  throw new Error('Schedule does not exist');
105
+ this.requireCompanion(entry.companionId);
106
+ if (entry.continuation) {
107
+ void this.continuations.run(id).catch(() => { });
108
+ return;
109
+ }
86
110
  await this.run(entry);
87
111
  }
88
112
  async tick() {
89
113
  if (this.closed)
90
114
  return;
91
- const due = this.store.snapshot().schedules.filter(item => item.enabled && item.nextRunAt <= Date.now());
115
+ await this.continuations.tick();
116
+ const due = this.store.snapshot().schedules.filter(item => !item.continuation && item.enabled && item.nextRunAt <= Date.now() && this.store.hasCapability(item.companionId, 'schedules'));
92
117
  for (const entry of due)
93
118
  void this.run(entry).catch(() => { });
94
119
  }
@@ -139,10 +164,14 @@ export class PartnerSchedulerService {
139
164
  const companion = this.store.snapshot().companions.find(item => item.id === id);
140
165
  if (!companion)
141
166
  throw new Error('Companion does not exist');
167
+ if (!companion.capabilities.includes('schedules'))
168
+ throw new Error('请先勾选伙伴的定时任务能力');
142
169
  return companion;
143
170
  }
144
171
  }
145
172
  export function nextOccurrence(schedule, now, timeZone) {
173
+ if (schedule.kind === 'once')
174
+ return schedule.at;
146
175
  if (schedule.kind === 'interval')
147
176
  return now + schedule.minutes * 60_000;
148
177
  const start = Math.floor(now / 60_000) * 60_000 + 60_000;
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/scheduler/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAKpF,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,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3
+ export declare function assertWakeTools(entry: ScheduledPartnerTask, available: Iterable<string>): void;
4
+ export declare class WakeToolsUnavailable extends Error {
5
+ }
6
+ export declare function completionCondition(entry: ScheduledPartnerTask): string;
7
+ //# sourceMappingURL=wakeup-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wakeup-context.d.ts","sourceRoot":"","sources":["../../src/scheduler/wakeup-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAEvD,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAK9F;AAED,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAElD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAEvE"}
@@ -0,0 +1,14 @@
1
+ /** Only inspect explicitly named MCP tools; never grant tools or infer secrets. */
2
+ export function assertWakeTools(entry, available) {
3
+ const names = new Set(available);
4
+ const required = new Set(['partner_schedule', ...(entry.continuation?.check.match(/\bmcp__[A-Za-z0-9_]+\b/g) ?? [])]);
5
+ const missing = [...required].filter(name => !names.has(name));
6
+ if (missing.length)
7
+ throw new WakeToolsUnavailable(`续接工具未就绪:${missing.join('、')};未发送唤醒,请检查伙伴能力与 MCP 绑定后重试`);
8
+ }
9
+ export class WakeToolsUnavailable extends Error {
10
+ }
11
+ export function completionCondition(entry) {
12
+ return entry.continuation?.completion ?? '仅核实本预约对应的外部任务已经成功完成,且产出可回查。检查说明中混入的后续提交、下载、合并、发送或整个 Goal 均不属于本预约完成条件;失败按 blocked 处理。';
13
+ }
14
+ //# sourceMappingURL=wakeup-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wakeup-context.js","sourceRoot":"","sources":["../../src/scheduler/wakeup-context.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,MAAM,UAAU,eAAe,CAAC,KAA2B,EAAE,SAA2B;IACtF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAA;IAChC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IACrH,MAAM,OAAO,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAA;IAC9D,IAAI,OAAO,CAAC,MAAM;QAAE,MAAM,IAAI,oBAAoB,CAAC,WAAW,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA;AAC7G,CAAC;AAED,MAAM,OAAO,oBAAqB,SAAQ,KAAK;CAAG;AAElD,MAAM,UAAU,mBAAmB,CAAC,KAA2B;IAC7D,OAAO,KAAK,CAAC,YAAY,EAAE,UAAU,IAAI,sFAAsF,CAAA;AACjI,CAAC"}