@lingjingai/scriptctl 0.49.16 → 0.51.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 (525) hide show
  1. package/README.md +8 -2
  2. package/changes/0.50.0.md +63 -0
  3. package/changes/0.51.0.md +24 -0
  4. package/dist/cli/register-batch.d.ts +3 -0
  5. package/dist/cli/register-batch.js +28 -0
  6. package/dist/cli/register-batch.js.map +1 -0
  7. package/dist/cli/register-edits.d.ts +4 -0
  8. package/dist/cli/register-edits.js +226 -0
  9. package/dist/cli/register-edits.js.map +1 -0
  10. package/dist/cli/register-query.d.ts +4 -0
  11. package/dist/cli/register-query.js +93 -0
  12. package/dist/cli/register-query.js.map +1 -0
  13. package/dist/cli/register-tools.d.ts +3 -0
  14. package/dist/cli/register-tools.js +23 -0
  15. package/dist/cli/register-tools.js.map +1 -0
  16. package/dist/cli/register-workflows.d.ts +4 -0
  17. package/dist/cli/register-workflows.js +71 -0
  18. package/dist/cli/register-workflows.js.map +1 -0
  19. package/dist/cli/registry.d.ts +14 -0
  20. package/dist/cli/registry.js +65 -0
  21. package/dist/cli/registry.js.map +1 -0
  22. package/dist/cli.d.ts +3 -0
  23. package/dist/cli.js +146 -575
  24. package/dist/cli.js.map +1 -1
  25. package/dist/common.d.ts +12 -38
  26. package/dist/common.js +5 -11
  27. package/dist/common.js.map +1 -1
  28. package/dist/domain/authoring/apply.d.ts +1 -33
  29. package/dist/domain/authoring/apply.js +1 -783
  30. package/dist/domain/authoring/apply.js.map +1 -1
  31. package/dist/domain/authoring/export.d.ts +1 -7
  32. package/dist/domain/authoring/export.js +1 -84
  33. package/dist/domain/authoring/export.js.map +1 -1
  34. package/dist/domain/authoring/parser.d.ts +2 -3
  35. package/dist/domain/authoring/parser.js +2 -914
  36. package/dist/domain/authoring/parser.js.map +1 -1
  37. package/dist/domain/authoring/serializer.d.ts +1 -2
  38. package/dist/domain/authoring/serializer.js +1 -243
  39. package/dist/domain/authoring/serializer.js.map +1 -1
  40. package/dist/domain/authoring/shared/bracket.d.ts +4 -0
  41. package/dist/domain/authoring/shared/bracket.js +95 -0
  42. package/dist/domain/authoring/shared/bracket.js.map +1 -0
  43. package/dist/domain/authoring/shared/types.d.ts +12 -0
  44. package/dist/domain/authoring/shared/types.js +2 -0
  45. package/dist/domain/authoring/shared/types.js.map +1 -0
  46. package/dist/domain/authoring/types.d.ts +2 -87
  47. package/dist/domain/authoring/types.js +2 -1
  48. package/dist/domain/authoring/types.js.map +1 -1
  49. package/dist/domain/authoring/v3/apply.d.ts +33 -0
  50. package/dist/domain/authoring/v3/apply.js +784 -0
  51. package/dist/domain/authoring/v3/apply.js.map +1 -0
  52. package/dist/domain/authoring/v3/export.d.ts +7 -0
  53. package/dist/domain/authoring/v3/export.js +85 -0
  54. package/dist/domain/authoring/v3/export.js.map +1 -0
  55. package/dist/domain/authoring/v3/parser.d.ts +3 -0
  56. package/dist/domain/authoring/v3/parser.js +823 -0
  57. package/dist/domain/authoring/v3/parser.js.map +1 -0
  58. package/dist/domain/authoring/v3/serializer.d.ts +2 -0
  59. package/dist/domain/authoring/v3/serializer.js +244 -0
  60. package/dist/domain/authoring/v3/serializer.js.map +1 -0
  61. package/dist/domain/authoring/v3/types.d.ts +76 -0
  62. package/dist/domain/authoring/v3/types.js +2 -0
  63. package/dist/domain/authoring/v3/types.js.map +1 -0
  64. package/dist/domain/authoring/v4/apply.d.ts +40 -0
  65. package/dist/domain/authoring/v4/apply.js +451 -0
  66. package/dist/domain/authoring/v4/apply.js.map +1 -0
  67. package/dist/domain/authoring/v4/parser.d.ts +2 -0
  68. package/dist/domain/authoring/v4/parser.js +729 -0
  69. package/dist/domain/authoring/v4/parser.js.map +1 -0
  70. package/dist/domain/authoring/v4/serializer.d.ts +6 -0
  71. package/dist/domain/authoring/v4/serializer.js +280 -0
  72. package/dist/domain/authoring/v4/serializer.js.map +1 -0
  73. package/dist/domain/authoring/v4/types.d.ts +50 -0
  74. package/dist/domain/authoring/v4/types.js +2 -0
  75. package/dist/domain/authoring/v4/types.js.map +1 -0
  76. package/dist/domain/ingest/apply-plan.d.ts +1 -1
  77. package/dist/domain/ingest/assembler.d.ts +9 -0
  78. package/dist/domain/ingest/assembler.js +98 -36
  79. package/dist/domain/ingest/assembler.js.map +1 -1
  80. package/dist/domain/ingest/asset-audit.d.ts +50 -0
  81. package/dist/domain/ingest/asset-audit.js +196 -0
  82. package/dist/domain/ingest/asset-audit.js.map +1 -0
  83. package/dist/domain/ingest/production-validation.d.ts +5 -4
  84. package/dist/domain/ingest/production-validation.js +10 -25
  85. package/dist/domain/ingest/production-validation.js.map +1 -1
  86. package/dist/domain/ingest/records.d.ts +1 -1
  87. package/dist/domain/ingest/records.js +1 -1
  88. package/dist/domain/ingest/records.js.map +1 -1
  89. package/dist/domain/ingest/serial-context.d.ts +1 -1
  90. package/dist/domain/ingest/validation.d.ts +1 -11
  91. package/dist/domain/ingest/validation.js +1 -199
  92. package/dist/domain/ingest/validation.js.map +1 -1
  93. package/dist/domain/ingest/video-apply.js +68 -45
  94. package/dist/domain/ingest/video-apply.js.map +1 -1
  95. package/dist/domain/script/address.d.ts +1 -32
  96. package/dist/domain/script/address.js +1 -144
  97. package/dist/domain/script/address.js.map +1 -1
  98. package/dist/domain/script/dispatch.d.ts +14 -0
  99. package/dist/domain/script/dispatch.js +45 -0
  100. package/dist/domain/script/dispatch.js.map +1 -0
  101. package/dist/domain/script/lookups.d.ts +1 -33
  102. package/dist/domain/script/lookups.js +1 -316
  103. package/dist/domain/script/lookups.js.map +1 -1
  104. package/dist/domain/script/parse.d.ts +1 -3
  105. package/dist/domain/script/parse.js +1 -164
  106. package/dist/domain/script/parse.js.map +1 -1
  107. package/dist/domain/script/patch/apply.d.ts +1 -2
  108. package/dist/domain/script/patch/apply.js +1 -30
  109. package/dist/domain/script/patch/apply.js.map +1 -1
  110. package/dist/domain/script/patch/helpers.d.ts +1 -17
  111. package/dist/domain/script/patch/helpers.js +1 -210
  112. package/dist/domain/script/patch/helpers.js.map +1 -1
  113. package/dist/domain/script/patch/inline-speaker.d.ts +1 -2
  114. package/dist/domain/script/patch/inline-speaker.js +1 -49
  115. package/dist/domain/script/patch/inline-speaker.js.map +1 -1
  116. package/dist/domain/script/patch/ops-action.d.ts +1 -12
  117. package/dist/domain/script/patch/ops-action.js +1 -366
  118. package/dist/domain/script/patch/ops-action.js.map +1 -1
  119. package/dist/domain/script/patch/ops-asset.d.ts +1 -14
  120. package/dist/domain/script/patch/ops-asset.js +1 -364
  121. package/dist/domain/script/patch/ops-asset.js.map +1 -1
  122. package/dist/domain/script/patch/ops-dialogue.d.ts +1 -2
  123. package/dist/domain/script/patch/ops-dialogue.js +1 -25
  124. package/dist/domain/script/patch/ops-dialogue.js.map +1 -1
  125. package/dist/domain/script/patch/ops-extend.d.ts +1 -8
  126. package/dist/domain/script/patch/ops-extend.js +1 -110
  127. package/dist/domain/script/patch/ops-extend.js.map +1 -1
  128. package/dist/domain/script/patch/ops-meta.d.ts +1 -5
  129. package/dist/domain/script/patch/ops-meta.js +1 -81
  130. package/dist/domain/script/patch/ops-meta.js.map +1 -1
  131. package/dist/domain/script/patch/ops-scene.d.ts +1 -6
  132. package/dist/domain/script/patch/ops-scene.js +1 -350
  133. package/dist/domain/script/patch/ops-scene.js.map +1 -1
  134. package/dist/domain/script/patch/ops-state.d.ts +1 -8
  135. package/dist/domain/script/patch/ops-state.js +1 -164
  136. package/dist/domain/script/patch/ops-state.js.map +1 -1
  137. package/dist/domain/script/patch/registry.d.ts +1 -2
  138. package/dist/domain/script/patch/registry.js +1 -52
  139. package/dist/domain/script/patch/registry.js.map +1 -1
  140. package/dist/domain/script/patch/types.d.ts +1 -10
  141. package/dist/domain/script/patch/types.js +1 -1
  142. package/dist/domain/script/patch/types.js.map +1 -1
  143. package/dist/domain/script/refs.d.ts +1 -4
  144. package/dist/domain/script/refs.js +1 -63
  145. package/dist/domain/script/refs.js.map +1 -1
  146. package/dist/domain/script/scene-refs.d.ts +1 -3
  147. package/dist/domain/script/scene-refs.js +1 -34
  148. package/dist/domain/script/scene-refs.js.map +1 -1
  149. package/dist/domain/script/schema.d.ts +1 -6
  150. package/dist/domain/script/schema.js +1 -55
  151. package/dist/domain/script/schema.js.map +1 -1
  152. package/dist/domain/script/selector.d.ts +1 -45
  153. package/dist/domain/script/selector.js +1 -184
  154. package/dist/domain/script/selector.js.map +1 -1
  155. package/dist/domain/script/shared/regex.d.ts +2 -0
  156. package/dist/domain/script/shared/regex.js +7 -0
  157. package/dist/domain/script/shared/regex.js.map +1 -0
  158. package/dist/domain/script/shared/types.d.ts +18 -0
  159. package/dist/domain/script/shared/types.js +9 -0
  160. package/dist/domain/script/shared/types.js.map +1 -0
  161. package/dist/domain/script/shared/validation.d.ts +10 -0
  162. package/dist/domain/script/shared/validation.js +2 -0
  163. package/dist/domain/script/shared/validation.js.map +1 -0
  164. package/dist/domain/script/shared.js +4 -6
  165. package/dist/domain/script/shared.js.map +1 -1
  166. package/dist/domain/script/types.d.ts +1 -123
  167. package/dist/domain/script/types.js +1 -8
  168. package/dist/domain/script/types.js.map +1 -1
  169. package/dist/domain/script/v3/address.d.ts +32 -0
  170. package/dist/domain/script/v3/address.js +136 -0
  171. package/dist/domain/script/v3/address.js.map +1 -0
  172. package/dist/domain/script/v3/lookups.d.ts +33 -0
  173. package/dist/domain/script/v3/lookups.js +316 -0
  174. package/dist/domain/script/v3/lookups.js.map +1 -0
  175. package/dist/domain/script/v3/ordinal.d.ts +8 -0
  176. package/dist/domain/script/v3/ordinal.js +91 -0
  177. package/dist/domain/script/v3/ordinal.js.map +1 -0
  178. package/dist/domain/script/v3/parse.d.ts +3 -0
  179. package/dist/domain/script/v3/parse.js +164 -0
  180. package/dist/domain/script/v3/parse.js.map +1 -0
  181. package/dist/domain/script/v3/patch/apply.d.ts +2 -0
  182. package/dist/domain/script/v3/patch/apply.js +31 -0
  183. package/dist/domain/script/v3/patch/apply.js.map +1 -0
  184. package/dist/domain/script/v3/patch/helpers.d.ts +17 -0
  185. package/dist/domain/script/v3/patch/helpers.js +209 -0
  186. package/dist/domain/script/v3/patch/helpers.js.map +1 -0
  187. package/dist/domain/script/v3/patch/inline-speaker.d.ts +2 -0
  188. package/dist/domain/script/v3/patch/inline-speaker.js +50 -0
  189. package/dist/domain/script/v3/patch/inline-speaker.js.map +1 -0
  190. package/dist/domain/script/v3/patch/ops-action.d.ts +12 -0
  191. package/dist/domain/script/v3/patch/ops-action.js +367 -0
  192. package/dist/domain/script/v3/patch/ops-action.js.map +1 -0
  193. package/dist/domain/script/v3/patch/ops-asset.d.ts +14 -0
  194. package/dist/domain/script/v3/patch/ops-asset.js +365 -0
  195. package/dist/domain/script/v3/patch/ops-asset.js.map +1 -0
  196. package/dist/domain/script/v3/patch/ops-dialogue.d.ts +2 -0
  197. package/dist/domain/script/v3/patch/ops-dialogue.js +26 -0
  198. package/dist/domain/script/v3/patch/ops-dialogue.js.map +1 -0
  199. package/dist/domain/script/v3/patch/ops-extend.d.ts +8 -0
  200. package/dist/domain/script/v3/patch/ops-extend.js +111 -0
  201. package/dist/domain/script/v3/patch/ops-extend.js.map +1 -0
  202. package/dist/domain/script/v3/patch/ops-meta.d.ts +5 -0
  203. package/dist/domain/script/v3/patch/ops-meta.js +82 -0
  204. package/dist/domain/script/v3/patch/ops-meta.js.map +1 -0
  205. package/dist/domain/script/v3/patch/ops-scene.d.ts +6 -0
  206. package/dist/domain/script/v3/patch/ops-scene.js +351 -0
  207. package/dist/domain/script/v3/patch/ops-scene.js.map +1 -0
  208. package/dist/domain/script/v3/patch/ops-state.d.ts +8 -0
  209. package/dist/domain/script/v3/patch/ops-state.js +165 -0
  210. package/dist/domain/script/v3/patch/ops-state.js.map +1 -0
  211. package/dist/domain/script/v3/patch/registry.d.ts +2 -0
  212. package/dist/domain/script/v3/patch/registry.js +53 -0
  213. package/dist/domain/script/v3/patch/registry.js.map +1 -0
  214. package/dist/domain/script/v3/patch/types.d.ts +10 -0
  215. package/dist/domain/script/v3/patch/types.js +2 -0
  216. package/dist/domain/script/v3/patch/types.js.map +1 -0
  217. package/dist/domain/script/v3/refs.d.ts +4 -0
  218. package/dist/domain/script/v3/refs.js +64 -0
  219. package/dist/domain/script/v3/refs.js.map +1 -0
  220. package/dist/domain/script/v3/scene-refs.d.ts +3 -0
  221. package/dist/domain/script/v3/scene-refs.js +35 -0
  222. package/dist/domain/script/v3/scene-refs.js.map +1 -0
  223. package/dist/domain/script/v3/schema.d.ts +6 -0
  224. package/dist/domain/script/v3/schema.js +56 -0
  225. package/dist/domain/script/v3/schema.js.map +1 -0
  226. package/dist/domain/script/v3/selector.d.ts +44 -0
  227. package/dist/domain/script/v3/selector.js +178 -0
  228. package/dist/domain/script/v3/selector.js.map +1 -0
  229. package/dist/domain/script/v3/types.d.ts +106 -0
  230. package/dist/domain/script/v3/types.js +2 -0
  231. package/dist/domain/script/v3/types.js.map +1 -0
  232. package/dist/domain/script/v3/validation.d.ts +3 -0
  233. package/dist/domain/script/v3/validation.js +200 -0
  234. package/dist/domain/script/v3/validation.js.map +1 -0
  235. package/dist/domain/script/v4/address.d.ts +61 -0
  236. package/dist/domain/script/v4/address.js +99 -0
  237. package/dist/domain/script/v4/address.js.map +1 -0
  238. package/dist/domain/script/v4/factory.d.ts +2 -0
  239. package/dist/domain/script/v4/factory.js +13 -0
  240. package/dist/domain/script/v4/factory.js.map +1 -0
  241. package/dist/domain/script/v4/from-v3.d.ts +29 -0
  242. package/dist/domain/script/v4/from-v3.js +307 -0
  243. package/dist/domain/script/v4/from-v3.js.map +1 -0
  244. package/dist/domain/script/v4/ids.d.ts +27 -0
  245. package/dist/domain/script/v4/ids.js +62 -0
  246. package/dist/domain/script/v4/ids.js.map +1 -0
  247. package/dist/domain/script/v4/ordinal.d.ts +3 -0
  248. package/dist/domain/script/v4/ordinal.js +66 -0
  249. package/dist/domain/script/v4/ordinal.js.map +1 -0
  250. package/dist/domain/script/v4/parse.d.ts +3 -0
  251. package/dist/domain/script/v4/parse.js +17 -0
  252. package/dist/domain/script/v4/parse.js.map +1 -0
  253. package/dist/domain/script/v4/patch/apply.d.ts +3 -0
  254. package/dist/domain/script/v4/patch/apply.js +24 -0
  255. package/dist/domain/script/v4/patch/apply.js.map +1 -0
  256. package/dist/domain/script/v4/patch/helpers.d.ts +32 -0
  257. package/dist/domain/script/v4/patch/helpers.js +138 -0
  258. package/dist/domain/script/v4/patch/helpers.js.map +1 -0
  259. package/dist/domain/script/v4/patch/ops-action.d.ts +13 -0
  260. package/dist/domain/script/v4/patch/ops-action.js +376 -0
  261. package/dist/domain/script/v4/patch/ops-action.js.map +1 -0
  262. package/dist/domain/script/v4/patch/ops-asset.d.ts +17 -0
  263. package/dist/domain/script/v4/patch/ops-asset.js +617 -0
  264. package/dist/domain/script/v4/patch/ops-asset.js.map +1 -0
  265. package/dist/domain/script/v4/patch/ops-extend.d.ts +11 -0
  266. package/dist/domain/script/v4/patch/ops-extend.js +86 -0
  267. package/dist/domain/script/v4/patch/ops-extend.js.map +1 -0
  268. package/dist/domain/script/v4/patch/ops-meta.d.ts +5 -0
  269. package/dist/domain/script/v4/patch/ops-meta.js +49 -0
  270. package/dist/domain/script/v4/patch/ops-meta.js.map +1 -0
  271. package/dist/domain/script/v4/patch/ops-scene-ref.d.ts +3 -0
  272. package/dist/domain/script/v4/patch/ops-scene-ref.js +98 -0
  273. package/dist/domain/script/v4/patch/ops-scene-ref.js.map +1 -0
  274. package/dist/domain/script/v4/patch/ops-structure.d.ts +6 -0
  275. package/dist/domain/script/v4/patch/ops-structure.js +236 -0
  276. package/dist/domain/script/v4/patch/ops-structure.js.map +1 -0
  277. package/dist/domain/script/v4/patch/registry.d.ts +2 -0
  278. package/dist/domain/script/v4/patch/registry.js +50 -0
  279. package/dist/domain/script/v4/patch/registry.js.map +1 -0
  280. package/dist/domain/script/v4/patch/schema.d.ts +7 -0
  281. package/dist/domain/script/v4/patch/schema.js +75 -0
  282. package/dist/domain/script/v4/patch/schema.js.map +1 -0
  283. package/dist/domain/script/v4/patch/types.d.ts +10 -0
  284. package/dist/domain/script/v4/patch/types.js +2 -0
  285. package/dist/domain/script/v4/patch/types.js.map +1 -0
  286. package/dist/domain/script/v4/selector.d.ts +11 -0
  287. package/dist/domain/script/v4/selector.js +124 -0
  288. package/dist/domain/script/v4/selector.js.map +1 -0
  289. package/dist/domain/script/v4/types.d.ts +120 -0
  290. package/dist/domain/script/v4/types.js +2 -0
  291. package/dist/domain/script/v4/types.js.map +1 -0
  292. package/dist/domain/script/v4/validation.d.ts +2 -0
  293. package/dist/domain/script/v4/validation.js +378 -0
  294. package/dist/domain/script/v4/validation.js.map +1 -0
  295. package/dist/infra/ingest/video-discovery.js +7 -4
  296. package/dist/infra/ingest/video-discovery.js.map +1 -1
  297. package/dist/infra/script-output-store.js +6 -11
  298. package/dist/infra/script-output-store.js.map +1 -1
  299. package/dist/infra/script-working-copy.js +15 -16
  300. package/dist/infra/script-working-copy.js.map +1 -1
  301. package/dist/llm/config.js +5 -4
  302. package/dist/llm/config.js.map +1 -1
  303. package/dist/llm/registry.d.ts +1 -0
  304. package/dist/llm/registry.js +3 -0
  305. package/dist/llm/registry.js.map +1 -1
  306. package/dist/llm/router.js +6 -8
  307. package/dist/llm/router.js.map +1 -1
  308. package/dist/llm/tasks/ingest/asset-audit.d.ts +6 -0
  309. package/dist/llm/tasks/ingest/asset-audit.js +164 -0
  310. package/dist/llm/tasks/ingest/asset-audit.js.map +1 -0
  311. package/dist/llm/tasks/ingest/asset-curate.d.ts +1 -1
  312. package/dist/llm/tasks/ingest/text-normalize.js +3 -3
  313. package/dist/llm/tasks/ingest/text-normalize.js.map +1 -1
  314. package/dist/llm/tasks/ingest/video-serial.js +3 -3
  315. package/dist/llm/tasks/ingest/video-serial.js.map +1 -1
  316. package/dist/llm/types.d.ts +1 -1
  317. package/dist/llm/types.js.map +1 -1
  318. package/dist/output.d.ts +2 -3
  319. package/dist/output.js +72 -109
  320. package/dist/output.js.map +1 -1
  321. package/dist/usecases/changelog.d.ts +2 -2
  322. package/dist/usecases/changelog.js +28 -36
  323. package/dist/usecases/changelog.js.map +1 -1
  324. package/dist/usecases/doctor.d.ts +2 -2
  325. package/dist/usecases/doctor.js +3 -5
  326. package/dist/usecases/doctor.js.map +1 -1
  327. package/dist/usecases/ingest/command.d.ts +2 -2
  328. package/dist/usecases/ingest/command.js +23 -6
  329. package/dist/usecases/ingest/command.js.map +1 -1
  330. package/dist/usecases/ingest/final-asset-audit.d.ts +39 -0
  331. package/dist/usecases/ingest/final-asset-audit.js +88 -0
  332. package/dist/usecases/ingest/final-asset-audit.js.map +1 -0
  333. package/dist/usecases/ingest/pass5-extract.js +5 -4
  334. package/dist/usecases/ingest/pass5-extract.js.map +1 -1
  335. package/dist/usecases/ingest/pass5-govern.js +13 -11
  336. package/dist/usecases/ingest/pass5-govern.js.map +1 -1
  337. package/dist/usecases/ingest/pipeline.js +77 -23
  338. package/dist/usecases/ingest/pipeline.js.map +1 -1
  339. package/dist/usecases/ingest/serial-govern.d.ts +2 -1
  340. package/dist/usecases/ingest/serial-govern.js +16 -8
  341. package/dist/usecases/ingest/serial-govern.js.map +1 -1
  342. package/dist/usecases/ingest/status.d.ts +2 -2
  343. package/dist/usecases/ingest/status.js +1 -1
  344. package/dist/usecases/ingest/status.js.map +1 -1
  345. package/dist/usecases/ingest/video-pipeline.js +121 -29
  346. package/dist/usecases/ingest/video-pipeline.js.map +1 -1
  347. package/dist/usecases/ingest/view-command.d.ts +2 -2
  348. package/dist/usecases/ingest/view-command.js +7 -6
  349. package/dist/usecases/ingest/view-command.js.map +1 -1
  350. package/dist/usecases/ingest/view-server.d.ts +2 -2
  351. package/dist/usecases/ingest/view-server.js +9 -7
  352. package/dist/usecases/ingest/view-server.js.map +1 -1
  353. package/dist/usecases/script/actions.d.ts +2 -2
  354. package/dist/usecases/script/actions.js +106 -11
  355. package/dist/usecases/script/actions.js.map +1 -1
  356. package/dist/usecases/script/actor.d.ts +2 -2
  357. package/dist/usecases/script/actor.js +3 -4
  358. package/dist/usecases/script/actor.js.map +1 -1
  359. package/dist/usecases/script/actors.d.ts +2 -2
  360. package/dist/usecases/script/actors.js +18 -9
  361. package/dist/usecases/script/actors.js.map +1 -1
  362. package/dist/usecases/script/add-actor.d.ts +2 -2
  363. package/dist/usecases/script/add-episode.d.ts +2 -2
  364. package/dist/usecases/script/add-location.d.ts +2 -2
  365. package/dist/usecases/script/add-prop.d.ts +2 -2
  366. package/dist/usecases/script/alias.d.ts +2 -2
  367. package/dist/usecases/script/alias.js +13 -14
  368. package/dist/usecases/script/alias.js.map +1 -1
  369. package/dist/usecases/script/assets.d.ts +2 -2
  370. package/dist/usecases/script/assets.js +29 -5
  371. package/dist/usecases/script/assets.js.map +1 -1
  372. package/dist/usecases/script/audit-assets.d.ts +4 -0
  373. package/dist/usecases/script/audit-assets.js +37 -0
  374. package/dist/usecases/script/audit-assets.js.map +1 -0
  375. package/dist/usecases/script/command-constraints.d.ts +36 -0
  376. package/dist/usecases/script/command-constraints.js +114 -0
  377. package/dist/usecases/script/command-constraints.js.map +1 -0
  378. package/dist/usecases/script/context.d.ts +2 -2
  379. package/dist/usecases/script/context.js +34 -8
  380. package/dist/usecases/script/context.js.map +1 -1
  381. package/dist/usecases/script/create.d.ts +2 -2
  382. package/dist/usecases/script/create.js +5 -6
  383. package/dist/usecases/script/create.js.map +1 -1
  384. package/dist/usecases/script/delete.d.ts +2 -2
  385. package/dist/usecases/script/delete.js +15 -15
  386. package/dist/usecases/script/delete.js.map +1 -1
  387. package/dist/usecases/script/describe.d.ts +2 -2
  388. package/dist/usecases/script/describe.js +13 -12
  389. package/dist/usecases/script/describe.js.map +1 -1
  390. package/dist/usecases/script/dialogue.d.ts +2 -2
  391. package/dist/usecases/script/dialogue.js +18 -9
  392. package/dist/usecases/script/dialogue.js.map +1 -1
  393. package/dist/usecases/script/dispatch.d.ts +3 -0
  394. package/dist/usecases/script/dispatch.js +10 -0
  395. package/dist/usecases/script/dispatch.js.map +1 -0
  396. package/dist/usecases/script/do.d.ts +2 -2
  397. package/dist/usecases/script/do.js +105 -45
  398. package/dist/usecases/script/do.js.map +1 -1
  399. package/dist/usecases/script/emotion.d.ts +2 -2
  400. package/dist/usecases/script/emotion.js +14 -3
  401. package/dist/usecases/script/emotion.js.map +1 -1
  402. package/dist/usecases/script/episodes.d.ts +2 -2
  403. package/dist/usecases/script/episodes.js +19 -8
  404. package/dist/usecases/script/episodes.js.map +1 -1
  405. package/dist/usecases/script/export-authoring.d.ts +2 -2
  406. package/dist/usecases/script/export-authoring.js +47 -26
  407. package/dist/usecases/script/export-authoring.js.map +1 -1
  408. package/dist/usecases/script/extend.d.ts +2 -2
  409. package/dist/usecases/script/extend.js +43 -31
  410. package/dist/usecases/script/extend.js.map +1 -1
  411. package/dist/usecases/script/ids.d.ts +2 -2
  412. package/dist/usecases/script/ids.js +68 -21
  413. package/dist/usecases/script/ids.js.map +1 -1
  414. package/dist/usecases/script/importance.d.ts +2 -2
  415. package/dist/usecases/script/importance.js +3 -4
  416. package/dist/usecases/script/importance.js.map +1 -1
  417. package/dist/usecases/script/insert.d.ts +2 -2
  418. package/dist/usecases/script/insert.js +80 -46
  419. package/dist/usecases/script/insert.js.map +1 -1
  420. package/dist/usecases/script/issues.d.ts +2 -2
  421. package/dist/usecases/script/issues.js +10 -2
  422. package/dist/usecases/script/issues.js.map +1 -1
  423. package/dist/usecases/script/lib.d.ts +62 -7
  424. package/dist/usecases/script/lib.js +782 -184
  425. package/dist/usecases/script/lib.js.map +1 -1
  426. package/dist/usecases/script/locations.d.ts +2 -2
  427. package/dist/usecases/script/locations.js +18 -9
  428. package/dist/usecases/script/locations.js.map +1 -1
  429. package/dist/usecases/script/merge.d.ts +2 -2
  430. package/dist/usecases/script/merge.js +17 -17
  431. package/dist/usecases/script/merge.js.map +1 -1
  432. package/dist/usecases/script/move.d.ts +2 -2
  433. package/dist/usecases/script/move.js +30 -13
  434. package/dist/usecases/script/move.js.map +1 -1
  435. package/dist/usecases/script/parenthetical.d.ts +3 -0
  436. package/dist/usecases/script/parenthetical.js +52 -0
  437. package/dist/usecases/script/parenthetical.js.map +1 -0
  438. package/dist/usecases/script/props.d.ts +2 -2
  439. package/dist/usecases/script/props.js +18 -9
  440. package/dist/usecases/script/props.js.map +1 -1
  441. package/dist/usecases/script/refs.d.ts +2 -2
  442. package/dist/usecases/script/refs.js +61 -11
  443. package/dist/usecases/script/refs.js.map +1 -1
  444. package/dist/usecases/script/rename.d.ts +2 -2
  445. package/dist/usecases/script/rename.js +13 -12
  446. package/dist/usecases/script/rename.js.map +1 -1
  447. package/dist/usecases/script/replace.d.ts +2 -2
  448. package/dist/usecases/script/replace.js +6 -8
  449. package/dist/usecases/script/replace.js.map +1 -1
  450. package/dist/usecases/script/role.d.ts +2 -2
  451. package/dist/usecases/script/role.js +3 -4
  452. package/dist/usecases/script/role.js.map +1 -1
  453. package/dist/usecases/script/scenes.d.ts +2 -2
  454. package/dist/usecases/script/scenes.js +35 -7
  455. package/dist/usecases/script/scenes.js.map +1 -1
  456. package/dist/usecases/script/script-patch.d.ts +2 -2
  457. package/dist/usecases/script/script-patch.js +219 -72
  458. package/dist/usecases/script/script-patch.js.map +1 -1
  459. package/dist/usecases/script/script-validate.d.ts +2 -2
  460. package/dist/usecases/script/script-validate.js +11 -7
  461. package/dist/usecases/script/script-validate.js.map +1 -1
  462. package/dist/usecases/script/session.d.ts +3 -0
  463. package/dist/usecases/script/session.js +74 -65
  464. package/dist/usecases/script/session.js.map +1 -1
  465. package/dist/usecases/script/split.d.ts +2 -2
  466. package/dist/usecases/script/split.js +18 -14
  467. package/dist/usecases/script/split.js.map +1 -1
  468. package/dist/usecases/script/state-add.d.ts +2 -2
  469. package/dist/usecases/script/state-add.js +3 -4
  470. package/dist/usecases/script/state-add.js.map +1 -1
  471. package/dist/usecases/script/state-delete.d.ts +2 -2
  472. package/dist/usecases/script/state-delete.js +3 -4
  473. package/dist/usecases/script/state-delete.js.map +1 -1
  474. package/dist/usecases/script/state-rename.d.ts +2 -2
  475. package/dist/usecases/script/state-rename.js +3 -4
  476. package/dist/usecases/script/state-rename.js.map +1 -1
  477. package/dist/usecases/script/states.d.ts +2 -2
  478. package/dist/usecases/script/states.js +91 -20
  479. package/dist/usecases/script/states.js.map +1 -1
  480. package/dist/usecases/script/summary.d.ts +2 -2
  481. package/dist/usecases/script/summary.js +21 -2
  482. package/dist/usecases/script/summary.js.map +1 -1
  483. package/dist/usecases/script/synopsis-generate.d.ts +2 -2
  484. package/dist/usecases/script/synopsis-generate.js +38 -39
  485. package/dist/usecases/script/synopsis-generate.js.map +1 -1
  486. package/dist/usecases/script/synopsis.d.ts +2 -2
  487. package/dist/usecases/script/synopsis.js +20 -16
  488. package/dist/usecases/script/synopsis.js.map +1 -1
  489. package/dist/usecases/script/transition.d.ts +2 -2
  490. package/dist/usecases/script/transition.js +3 -4
  491. package/dist/usecases/script/transition.js.map +1 -1
  492. package/dist/usecases/script/type.d.ts +2 -2
  493. package/dist/usecases/script/type.js +3 -4
  494. package/dist/usecases/script/type.js.map +1 -1
  495. package/dist/usecases/script/v3/mutations.d.ts +2 -0
  496. package/dist/usecases/script/v3/mutations.js +5 -0
  497. package/dist/usecases/script/v3/mutations.js.map +1 -0
  498. package/dist/usecases/script/v4/mutations.d.ts +2 -0
  499. package/dist/usecases/script/v4/mutations.js +6 -0
  500. package/dist/usecases/script/v4/mutations.js.map +1 -0
  501. package/dist/usecases/script/v4/queries.d.ts +15 -0
  502. package/dist/usecases/script/v4/queries.js +191 -0
  503. package/dist/usecases/script/v4/queries.js.map +1 -0
  504. package/dist/usecases/script/working-copy.d.ts +4 -4
  505. package/dist/usecases/script/working-copy.js +98 -94
  506. package/dist/usecases/script/working-copy.js.map +1 -1
  507. package/dist/usecases/script/worldview.d.ts +2 -2
  508. package/dist/usecases/script/worldview.js +3 -4
  509. package/dist/usecases/script/worldview.js.map +1 -1
  510. package/dist/usecases/script/write-authoring.d.ts +2 -2
  511. package/dist/usecases/script/write-authoring.js +125 -50
  512. package/dist/usecases/script/write-authoring.js.map +1 -1
  513. package/dist/usecases/update.d.ts +2 -2
  514. package/dist/usecases/update.js +32 -47
  515. package/dist/usecases/update.js.map +1 -1
  516. package/package.json +3 -2
  517. package/skills/scriptctl/SKILL.md +128 -282
  518. package/skills/scriptctl/references/atomic-edit-workflow.md +23 -38
  519. package/skills/scriptctl/references/bulk-authoring.md +35 -154
  520. package/skills/scriptctl/references/ingest-workflow.md +12 -11
  521. package/skills/scriptctl/references/production-writing-standard.md +38 -67
  522. package/skills/scriptctl/references/state-reference-repair.md +19 -42
  523. package/dist/help-text.d.ts +0 -2
  524. package/dist/help-text.js +0 -1112
  525. package/dist/help-text.js.map +0 -1
package/dist/help-text.js DELETED
@@ -1,1112 +0,0 @@
1
- const HELP_ENTRIES = [
2
- [
3
- [],
4
- `scriptctl — 剧本阶段统一 CLI
5
-
6
- Usage
7
- - scriptctl <query> [flags] # read a script
8
- - scriptctl <verb> <address> [flags] # edit a script
9
- - scriptctl ingest --source-path SRC # txt/md/docx/video → Script v3
10
-
11
- Workflows
12
- - ingest txt/md/docx/video → Script v3 workspace. Run: scriptctl ingest --help
13
- - view Render a workspace script.json to review.html (no model)
14
- - checkout Download one remote snapshot into a managed local working copy
15
- - status Show whether the local working copy is managed and dirty
16
- - publish Validate and CAS-publish the local working copy
17
- - export Produce canonical file-backed authoring blocks from a local script
18
-
19
- Read
20
- - summary | episodes | scenes | actions
21
- - actors | locations | props | assets | states
22
- - issues | refs | validate
23
-
24
- Write
25
- - create | add-actor | add-location | add-prop | add-episode
26
- - replace | type | actor | emotion
27
- - insert | delete | move | split | merge
28
- - rename | describe | alias | role | importance | worldview | synopsis | extend
29
- - state-add | state-rename | state-delete | transition | scene-ref
30
- - dialogue
31
-
32
- Batch
33
- - write <file> plan/apply complete script, episode, scene, or span blocks
34
- - ids inspect the next unreserved canonical IDs
35
- - do [file|-] run one CLI verb per line as one transaction
36
- - patch [file|-] apply JSON ops; use --schema to inspect op shapes
37
-
38
- Tools
39
- - doctor | update | changelog
40
-
41
- Target
42
- - reads and edits use --script-path FILE (default: ./workspace/script.json)
43
- - remote access exists only in checkout/publish; project defaults from the environment
44
- - selection where supported: --in SELECTOR plus filters; see command help
45
-
46
- Output
47
- - default text is agent-facing
48
- - --json structured envelope for jq/scripts
49
- - --format addr address stream for xargs / do generation
50
-
51
- More help
52
- - scriptctl <command> --help
53
- - scriptctl patch --schema
54
-
55
- Exit codes
56
- - 0 success
57
- - 64 usage or arguments error
58
- - 66 input file unavailable
59
- - 70 provider or runtime failure
60
- - 78 validation failed; agent repair needed
61
- `,
62
- ],
63
- [
64
- ["update"],
65
- `Update the globally installed scriptctl package.
66
-
67
- Usage
68
- - scriptctl update [options]
69
-
70
- Options
71
- - --dry-run Show the package-manager command without running it.
72
- - --patch Update only within the current major.minor patch line.
73
- - --json Print machine-readable JSON.
74
- - --help Show this help.
75
- `,
76
- ],
77
- [
78
- ["changelog"],
79
- `Show scriptctl feature changes.
80
-
81
- Usage
82
- - scriptctl changelog
83
- - scriptctl changelog <version>
84
- - scriptctl changelog --from <version> [--to <version>]
85
- - scriptctl changelog --unreleased
86
-
87
- Options
88
- - --from <version> Show released changes after this version.
89
- - --to <version> Upper bound for --from. Default: current package version.
90
- - --unreleased Show development changes not yet assigned to a release.
91
- - --json Print machine-readable JSON.
92
- - --help Show this help.
93
- `,
94
- ],
95
- [
96
- ["doctor"],
97
- `Check the standalone scriptctl CLI environment.
98
-
99
- Usage
100
- - scriptctl doctor [options]
101
-
102
- Options
103
- - --llm-config <path> LLM task/model routing YAML. Otherwise env, fixed global path, then built-in config.
104
- - --json Print machine-readable JSON.
105
- - --help Show this help.
106
-
107
- Checks
108
- - Node version
109
- - optional source-conversion/LLM dependencies
110
- - resolved LLM config, providers, profiles, task routes, and referenced credentials
111
- - local .env discovery
112
- - storage backend
113
- `,
114
- ],
115
- [
116
- ["ingest"],
117
- `Convert a txt/md/docx or video source into a Script v3 workspace.
118
-
119
- Text pipeline: pass1 chunk → pass2 normalize (DeepSeek Flash emits structured JSON,
120
- validated deterministically) → pass3 merge → compile (provisional script.initial.json +
121
- evidence) → pass5 govern (asset recall + refine → merge/canonical/prune) →
122
- script.json (v3-validated). Fully decoupled from direct.
123
-
124
- Video pipeline (file or directory of episodes): serial parse — each episode's
125
- Gemini call watches the video WITH the running cross-episode context (character
126
- registry + plot digest + open threads) and returns the episode content plus a
127
- registry delta. Identity is resolved by plot as it goes (unknown people get an
128
- anchored provisional, resolved once a later episode reveals them), so no roster
129
- merge / correction / speaker passes. Converges onto the SAME deterministic tail as
130
- text → identical Script v3 (timestamps ride extend.timestamp). script.json is
131
- rebuilt after every episode so it streams as it grows. Needs GEMINI_API_KEY.
132
-
133
- Usage
134
- - scriptctl ingest --source-path <file|dir> [options]
135
-
136
- Options
137
- - --source-path <path> txt/md/docx file, or a video file/directory. Required.
138
- - --workspace-path <dir> Workspace root (manifest + pass dirs + products). Default: workspace,
139
- resolved under the current directory (<cwd>/workspace). Pass an
140
- explicit dir to place it elsewhere; the resolved absolute path is
141
- echoed in the result (feed the same path to view / publish / ingest status).
142
- - --llm-config <path> LLM config override.
143
- - --concurrency <n> Text pipeline fanout concurrency. Default: 30. (Video is serial — ignored.)
144
- - --fps <n> Video sampling fps (>1 unlocks sub-second timecodes). Default: 3.
145
- - --force Same-source rerun: clears ingest products and redoes. Cannot switch sources.
146
-
147
- Notes
148
- - Resumes from per-unit checkpoints (text: chunk JSON; video: per-episode
149
- ep/ep_NNN.md (raw transcript) + ep/ep_NNN.json + context.json); a cross-source
150
- workspace fails (choose a fresh --workspace-path). Unsupported inputs
151
- (pdf/json/xlsx) are refused.
152
- - script.json validates without synopsis/metadata; enrich later with those commands.
153
- - Video: run \`scriptctl view\` for the click-to-seek review UI; episode numbering is
154
- by filename number (all-or-none; mixed fails).
155
- `,
156
- ],
157
- [
158
- ["ingest", "status"],
159
- `Report ingest progress from the workspace's REAL file state (no model, no store).
160
- Status is a pure function of the on-disk files — there is no separate state file
161
- to drift out of sync. This is the authoritative status: the runtime watcher and
162
- frontend consume \`--json\` instead of re-deriving it.
163
-
164
- Usage
165
- - scriptctl ingest status [--workspace-path <dir>] [--json]
166
-
167
- Options
168
- - --workspace-path <dir> Ingest workspace to inspect. Default: workspace, resolved
169
- under the current directory (<cwd>/workspace). Pass the
170
- same path you gave \`scriptctl ingest\`.
171
- - --json Machine payload under \`.status\` (see below).
172
-
173
- State (top-level, folded from the files)
174
- - empty No ingest workspace (no manifest.json).
175
- - incomplete Started, not finished, no hard error (rerun \`scriptctl ingest\` to resume).
176
- - failed Leftover unit error sidecars OR final v3 validation failed.
177
- - ready script.json present and v3-validated.
178
-
179
- --json payload (.status)
180
- - { workspace, exists, kind, state, phase, passes[], units, script, validation, errors[], updated }
181
- passes[] = per-pass {name, done, unit?{total,done,failed}}; units = primary bar
182
- (text: chunks; video: episodes). Liveness (is a run active?) is deliberately
183
- NOT here — it can't be read from files; that's the watcher's / agent's concern.
184
-
185
- Examples
186
- - scriptctl ingest status
187
- - scriptctl ingest status --workspace-path 1_script/workspace --json
188
- `,
189
- ],
190
- [
191
- ["view"],
192
- `Render a workspace's script.json into review.html at the workspace root. No model.
193
-
194
- Usage
195
- - scriptctl view [--workspace-path <dir>]
196
- `,
197
- ],
198
- [
199
- ["checkout"],
200
- `Create or refresh a managed local working copy from one atomic remote snapshot.
201
-
202
- Usage
203
- - scriptctl checkout [--script-path <file>] [--project-group-no <no>] [--discard-local]
204
-
205
- Options
206
- - --script-path <file> Local target. Default: ./workspace/script.json
207
- - --project-group-no <no> Remote project. Default: SANDBOX_PROJECT_GROUP_NO
208
- - --discard-local Explicitly discard an existing unmanaged or dirty local file.
209
-
210
- Without --discard-local, checkout refuses to overwrite local work.
211
- `,
212
- ],
213
- [
214
- ["status"],
215
- `Show local working-copy state without contacting the network.
216
-
217
- Usage
218
- - scriptctl status [--script-path <file>]
219
-
220
- Reports whether the file exists, whether it is managed, its base revision, and
221
- whether its semantic JSON content differs from the checked-out/published base.
222
- `,
223
- ],
224
- [
225
- ["publish"],
226
- `Validate and publish a local Script v3 working copy with strict revision CAS.
227
-
228
- Usage
229
- - scriptctl publish [--script-path <file>] [--project-group-no <no>]
230
-
231
- An unmanaged local file may create the first remote revision only. A managed
232
- working copy fetches the latest snapshot and PATCHes its local-wins diff with
233
- strict CAS. Network/CAS failures re-fetch and retry. Clean copies use no network.
234
- `,
235
- ],
236
- [
237
- ["write"],
238
- `Plan or atomically apply one canonical authoring file.
239
-
240
- Usage
241
- - scriptctl write <file> (--create|--replace) [--script-path <file>]
242
- - scriptctl write <file> (--create|--replace) --apply --plan <digest> [--script-path <file>]
243
-
244
- Options
245
- - --create Create script/episode/scene targets. Span targets do not support create.
246
- - --replace Replace existing episode/scene targets or explicit non-empty spans.
247
- - --apply Persist the proposed Script v3 atomically.
248
- - --plan <digest> Exact digest returned by a fresh plan; required with --apply.
249
- - --script-path <file> Local Script v3 target. Default: ./workspace/script.json
250
- - --json Print the complete structured plan.
251
-
252
- The source must be a named file; stdin is not accepted. Default execution is a
253
- no-write plan. The digest binds exact source bytes, mode, resolved targets, and
254
- the current semantic local-script baseline. Every plan and apply invocation
255
- holds the per-script local lock; apply also rechecks the baseline before rename.
256
- `,
257
- ],
258
- [
259
- ["ids"],
260
- `Return unreserved canonical candidate IDs from the current local Script v3.
261
-
262
- Usage
263
- - scriptctl ids --kind <kind> --count <n> [--script-path <file>]
264
-
265
- Kinds
266
- - actor | location | prop | state | episode | scene
267
-
268
- The command is read-only and does not reserve IDs. Concurrent conflicts are
269
- detected later by the write plan's semantic-baseline binding.
270
- `,
271
- ],
272
- [
273
- ["export"],
274
- `Export canonical .scriptctl authoring files from a local Script v3.
275
-
276
- Usage
277
- - scriptctl export script --output <file> [--script-path <file>]
278
- - scriptctl export episodes --in <selector> --output <file> [--script-path <file>]
279
- - scriptctl export episode-spans --in <selector> --output <file> [--script-path <file>]
280
- - scriptctl export scenes --in <selector> --output <file> [--script-path <file>]
281
- - scriptctl export scene-spans --in <selector> --output <file> [--script-path <file>]
282
- - scriptctl export action-spans --in <selector> --output <file> [--script-path <file>]
283
-
284
- Selectors are comma-separated points or inclusive from..through regions in
285
- current document order. Each scene span stays in one episode; each action span
286
- stays in one scene. Export writes one homogeneous authoring file atomically.
287
- `,
288
- ],
289
- [
290
- ["export", "script"],
291
- `Export a complete create-only script authoring file, including all formal
292
- metadata, assets, states, episodes, scenes, actions, and extensions.
293
-
294
- Usage
295
- - scriptctl export script --output <file> [--script-path <file>]
296
- `,
297
- ],
298
- [
299
- ["export", "episodes"],
300
- `Export independent complete episode targets for one-to-one batch replacement.
301
-
302
- Usage
303
- - scriptctl export episodes --in "ep_002..ep_004,ep_010" --output <file> [--script-path <file>]
304
- `,
305
- ],
306
- [
307
- ["export", "episode-spans"],
308
- `Export one complete episode-span target per selector region.
309
-
310
- Usage
311
- - scriptctl export episode-spans --in "ep_002..ep_004,ep_010" --output <file> [--script-path <file>]
312
- `,
313
- ],
314
- [
315
- ["export", "scenes"],
316
- `Export independent complete scene targets for one-to-one batch replacement.
317
-
318
- Usage
319
- - scriptctl export scenes --in "ep_003/scn_010..ep_003/scn_012" --output <file> [--script-path <file>]
320
- `,
321
- ],
322
- [
323
- ["export", "scene-spans"],
324
- `Export one complete same-episode scene-span target per selector region.
325
-
326
- Usage
327
- - scriptctl export scene-spans --in "ep_003/scn_010..ep_003/scn_012" --output <file> [--script-path <file>]
328
- `,
329
- ],
330
- [
331
- ["export", "action-spans"],
332
- `Export one complete same-scene, zero-based action-span target per selector region.
333
-
334
- Usage
335
- - scriptctl export action-spans --in "ep_003/scn_010#12..ep_003/scn_010#18" --output <file> [--script-path <file>]
336
- `,
337
- ],
338
- // =========================================================================
339
- // 0.6.0 flat namespace — plural-noun queries
340
- // =========================================================================
341
- [
342
- ["summary"],
343
- `Show title, counts (episodes / scenes / actions / actors / locations / props)
344
- and the whole-script overview fields when present: worldview (+ worldview_raw),
345
- style, logline, theme, synopsis, main characters.
346
-
347
- Usage
348
- - scriptctl summary [options]
349
-
350
- Target selection (applies to every query / edit verb)
351
- - --script-path A local script JSON file. Default: ./workspace/script.json.
352
- All query and atomic edit commands are local-only.
353
-
354
- Options
355
- - --json Print JSON envelope for deterministic programs. Avoid unless parsing.
356
- - --help Show this help.
357
-
358
- Read-only. Always safe to run.
359
- `,
360
- ],
361
- [
362
- ["episodes"],
363
- `List episodes as TSV rows with per-episode counts, char totals, and synopsis.
364
-
365
- Usage
366
- - scriptctl episodes [options]
367
-
368
- Options
369
- - --id <ep_id> Filter to one episode.
370
- - --in <selector> Multi-region selector, e.g. "ep_003..ep_007,ep_010".
371
- - --min-chars <n> Only episodes with total chars >= N.
372
- - --max-chars <n> Only episodes with total chars <= N.
373
- - --format addr Print only episode ids.
374
- - --script-path / --json / --help
375
-
376
- Default output
377
- - TSV header + one row per episode:
378
- addr episode_id title scenes actions chars_total chars_dialogue chars_action synopsis
379
-
380
- Examples
381
- - scriptctl episodes
382
- - scriptctl episodes --min-chars 1000
383
- - scriptctl episodes --id ep_007
384
- - scriptctl episodes --in "ep_003..ep_007"
385
- `,
386
- ],
387
- [
388
- ["scenes"],
389
- `List scenes with their environment, asset refs, and action counts.
390
-
391
- Usage
392
- - scriptctl scenes [options]
393
-
394
- Options
395
- - --in <addr> Scope to ep_NNN (episode) or ep_NNN/scn_NNN (single scene).
396
- - --has-actor <id> Only scenes whose context references this actor.
397
- - --has-location <id> Only scenes whose context references this location.
398
- - --has-prop <id> Only scenes whose context references this prop.
399
- - --script-path / --json / --help
400
-
401
- Output line
402
- - ep_NNN/scn_NNN [space time] location=loc_NNN(name) actors=... props=... actions=N t=<t_start>..<t_end>
403
- t_start / t_end are the first / last action extend.timestamp in the scene
404
- (omitted when the scene carries no timestamps).
405
-
406
- Examples
407
- - scriptctl scenes --in ep_007
408
- - scriptctl scenes --has-actor act_001
409
- - scriptctl scenes --in ep_001/scn_001
410
- `,
411
- ],
412
- [
413
- ["actions"],
414
- `Search actions across the script (the workhorse for "find where to edit").
415
- Default output is TSV: addr, timestamp, type, speaker, actor, emotion, content.
416
- timestamp is the action's extend.timestamp (episode-local "M:SS"; empty when
417
- absent) — the anchor for event-level alignment (an event spans first→last ts).
418
-
419
- Usage
420
- - scriptctl actions [options]
421
-
422
- Options
423
- - --in <addr> Scope to ep_NNN / ep_NNN/scn_NNN / ep_NNN/scn_NNN#idx.
424
- - --grep <text> Literal substring (default) or /regex/flags. Matches action.content.
425
- - --type <type> dialogue | inner_thought | action | transition.
426
- - --actor <id> Actions whose inline speaker is this actor (action.speaker.actor_id).
427
- - --has <kind> transition | speaker (filter by structural feature).
428
- - --context <n> Include N actions before/after each hit (for context windows).
429
- - --script-path / --json / --help
430
-
431
- Requires at least one of: --in, --grep, --type, --actor, --speaker, --has. Bare \`scriptctl actions\`
432
- errors out — dumping every action across all episodes is too large.
433
-
434
- Default output
435
- - TSV header + one row per action:
436
- addr timestamp type speaker actor emotion content
437
-
438
- Examples
439
- - scriptctl actions --grep "台下掌声雷动"
440
- - scriptctl actions --in ep_001 --type dialogue
441
- - scriptctl actions --grep "金碧辉煌" --context 2
442
- - scriptctl actions --actor act_001 --has speaker
443
- `,
444
- ],
445
- [
446
- ["actors"],
447
- `List actors with role / aliases / state counts.
448
-
449
- Usage
450
- - scriptctl actors [options]
451
-
452
- Options
453
- - --id <actor_id> Filter to one actor.
454
- - --name <substr> Match name substring (case-sensitive).
455
- - --in <addr> Restrict to actors referenced under this address (ep/scn/action).
456
- - --counts Append appearance counts: scenes=N episodes_count=M episodes=<ranges>
457
- (scene-context presence, compacted to episode ranges).
458
- - --script-path / --json / --help
459
-
460
- Examples
461
- - scriptctl actors --name "陈"
462
- - scriptctl actors --counts
463
- - scriptctl actors --in ep_023
464
- - scriptctl actors --in ep_001/scn_001
465
- `,
466
- ],
467
- [
468
- ["locations"],
469
- `List locations with state counts.
470
-
471
- Usage
472
- - scriptctl locations [options]
473
-
474
- Options mirror \`scriptctl actors\`: --id, --name, --in, --counts, --script-path, etc.
475
- --counts appends scenes / episode-count / episode ranges of scene-context presence.
476
-
477
- Examples
478
- - scriptctl locations --name "办公室"
479
- - scriptctl locations --counts
480
- - scriptctl locations --in ep_007
481
- `,
482
- ],
483
- [
484
- ["props"],
485
- `List props with state counts.
486
-
487
- Usage
488
- - scriptctl props [options]
489
-
490
- Options mirror \`scriptctl actors\`: --id, --name, --in, --counts, --script-path, etc.
491
- --counts appends scenes / episode-count / episode ranges of scene-context presence.
492
-
493
- Examples
494
- - scriptctl props --name "公文包"
495
- - scriptctl props --counts
496
- - scriptctl props --in ep_001/scn_001
497
- `,
498
- ],
499
- [
500
- ["assets"],
501
- `Unified search across actor / location / prop. Use when you don't care which kind.
502
-
503
- Usage
504
- - scriptctl assets [options]
505
-
506
- Options
507
- - --kind <actor|location|prop> Narrow to one kind.
508
- - --id <id> Filter by id.
509
- - --name <substr> Match name substring.
510
- - --in <addr> Restrict to assets referenced under this address.
511
- - --counts Append scene / episode appearance counts per asset.
512
- - --script-path / --json / --help
513
-
514
- Examples
515
- - scriptctl assets --name "陈"
516
- - scriptctl assets --kind actor --name "陈"
517
- `,
518
- ],
519
- [
520
- ["states"],
521
- `List every state on one asset: state_id ↔ name ↔ description ↔ episode arc.
522
-
523
- This is the read half of the state address space — run it to learn a state's
524
- id before editing (rename / delete / describe / state-change), instead of
525
- reading the raw script.json. Duplicate ids/names are flagged inline
526
- ([DUP_ID] / [DUP_NAME]).
527
-
528
- The address accepts a bare id (act_001 / loc_001 / prp_001) or the tagged form
529
- (actor:act_001) — the kind is inferred from the id prefix in the bare case.
530
-
531
- Each state line ends with its episode arc — where the state is bound across the
532
- script (scene context + action state_changes), compacted to episode ranges:
533
- actor:act_001/st_002 石膏轮椅装 desc="…" episodes=ep_018..ep_021 (4 eps, 4 scenes)
534
- This is the character's visual arc: which look is active in which episodes.
535
- A state bound nowhere shows episodes=none.
536
-
537
- Usage
538
- - scriptctl states <asset-addr>
539
-
540
- Examples
541
- - scriptctl states act_001
542
- - scriptctl states actor:act_001
543
- - scriptctl states location:loc_003
544
-
545
- Then edit by the printed address:
546
- - scriptctl rename actor:act_001/st_010 "平静(新)"
547
- - scriptctl delete actor:act_001/st_010 --strategy remove
548
- `,
549
- ],
550
- [
551
- ["issues"],
552
- `List current validation issues. Runs validateScript on demand.
553
-
554
- Usage
555
- - scriptctl issues [options]
556
-
557
- Options
558
- - --severity <severity> Filter by severity (error / warning / info / blocking).
559
- - --code <code> Filter by issue code (e.g. STATE_NOT_FOUND).
560
- - --script-path / --json / --help
561
-
562
- Output line
563
- - <severity> <code>: <summary> [<location>]
564
-
565
- Examples
566
- - scriptctl issues --severity error
567
- - scriptctl issues --code STATE_NOT_FOUND
568
- `,
569
- ],
570
- [
571
- ["refs"],
572
- `Reverse lookup: every place an asset / state / speaker is referenced.
573
-
574
- Usage
575
- - scriptctl refs <addr> [options]
576
-
577
- Address forms
578
- - actor:<id> / location:<id> / prop:<id> asset refs
579
- - actor:<id>/<state_id> (and location/prop) state refs
580
- - spk_<id> speaker refs
581
-
582
- Options
583
- - --level <scene|action> Restrict to scene-level or action-level refs only.
584
- - --script-path / --json / --help
585
-
586
- Output line
587
- - <location> [<role>] (e.g. ep_001/scn_001#3.actor_id [action_actor])
588
-
589
- Examples
590
- - scriptctl refs actor:act_001
591
- - scriptctl refs actor:act_001 --level scene
592
- - scriptctl refs actor:act_001/st_calm
593
- - scriptctl refs spk_001
594
- `,
595
- ],
596
- [
597
- ["validate"],
598
- `Validate the current final script. Read-only side; writes a validation report to workspace.
599
-
600
- Usage
601
- - scriptctl validate [options]
602
-
603
- Options
604
- - --script-path / --json / --help
605
-
606
- Exit codes
607
- - 0 passed
608
- - 78 validation needs repair (see scriptctl issues)
609
- `,
610
- ],
611
- // =========================================================================
612
- // Edit verbs — content
613
- // =========================================================================
614
- [
615
- ["replace"],
616
- `Literal substring replace inside action.content.
617
-
618
- Usage
619
- - scriptctl replace <at> --from <text> [--to <text>] [--all] [options]
620
-
621
- Required
622
- - <at> Action address: ep_NNN/scn_NNN#idx
623
- - --from Non-empty substring to replace.
624
-
625
- Options
626
- - --to Replacement text. Default: "" (delete the substring).
627
- - --all Replace every occurrence in the action. Without it, multiple matches reject.
628
- - --script-path / --json / --help
629
-
630
- Example
631
- - scriptctl replace ep_001/scn_001#3 --from ",台下掌声雷动" --to ""
632
- `,
633
- ],
634
- [
635
- ["type"],
636
- `Set the action.type on a specific action.
637
-
638
- Usage
639
- - scriptctl type <at> <dialogue|action|inner_thought>
640
-
641
- Example
642
- - scriptctl type ep_001/scn_001#3 dialogue
643
- `,
644
- ],
645
- [
646
- ["actor"],
647
- `Set or clear action.actor_id (the action's narrative subject).
648
-
649
- Usage
650
- - scriptctl actor <at> <actor_id|none>
651
-
652
- Example
653
- - scriptctl actor ep_001/scn_001#3 act_002
654
- - scriptctl actor ep_001/scn_001#3 none
655
- `,
656
- ],
657
- [
658
- ["emotion"],
659
- `Set or clear action.emotion on an action.
660
-
661
- Usage
662
- - scriptctl emotion <at> <emotion>
663
- - scriptctl emotion <at> --clear
664
-
665
- Selection
666
- - scriptctl emotion --in <selector> [filters] <emotion> [--apply]
667
- - scriptctl emotion --in <selector> [filters] --clear [--apply]
668
-
669
- Examples
670
- - scriptctl emotion ep_001/scn_001#3 愤怒
671
- - scriptctl emotion ep_001/scn_001#3 --clear
672
- - scriptctl emotion --in ep_001 --type dialogue 紧张 --apply
673
- `,
674
- ],
675
- // =========================================================================
676
- // Edit verbs — structure (multipolar by first-arg address format)
677
- // =========================================================================
678
- [
679
- ["insert"],
680
- `Insert an action (into a scene) or a brand-new empty scene (into an episode).
681
-
682
- Usage
683
- - scriptctl insert <ep/scn> --type <type> --content <text> [position-flags] [options] # action insert
684
- - scriptctl insert <ep> --location <loc_id> [position-flags] [options] # scene insert
685
-
686
- Action insert (first arg is ep/scn)
687
- - Prerequisite Scene location, with a materialized state on every referenced scene asset.
688
- - --type dialogue / action / inner_thought / transition.
689
- - --content Action content text.
690
- - --emotion <text> Optional action.emotion.
691
- - --actor <id> Required for an actor dialogue/inner_thought; actor must already be in this scene.
692
- - --kind <kind> Non-actor dialogue/inner_thought speaker: system|broadcast|offscreen|group.
693
- - --label <text> Optional label for a non-actor speaker.
694
-
695
- Scene insert (first arg is ep)
696
- - --location <id> Required: the scene's location.
697
- - --time <time> Default: day.
698
- - --space <space> Default: interior.
699
- - --scene-id <id> Optional explicit scene id (auto-assigned otherwise).
700
-
701
- Position (both forms)
702
- - --at <idx> Numeric index in the parent collection.
703
- - --before <addr> Insert before this sibling.
704
- - --after <addr> Insert after this sibling.
705
- - Default Append at end.
706
-
707
- Examples
708
- - scriptctl insert ep_001/scn_001 --type action --content "..." --emotion "紧张" --after ep_001/scn_001#3
709
- - scriptctl insert ep_001/scn_001 --type dialogue --content "欢迎光临。" --actor act_001
710
- - scriptctl insert ep_001/scn_001 --type dialogue --content "列车即将进站。" --kind broadcast --label 广播
711
- - scriptctl insert ep_001 --after ep_001/scn_005 --location loc_001
712
- `,
713
- ],
714
- [
715
- ["delete"],
716
- `Delete an action, scene, asset, state, or speaker. Multipolar by address format.
717
-
718
- Usage
719
- - scriptctl delete <addr> [--strategy replace|remove] [--replacement <id>] [--force]
720
-
721
- Behavior by address kind
722
- - action (ep/scn#idx) Remove the action; later indices shift.
723
- - scene (ep/scn) Empty scene: removed. Non-empty: refused unless --force.
724
- - asset (kind:id) Refuses by default if refs exist. Pass --strategy:
725
- replace --replacement <addr>: rewrite all refs to the replacement, then delete.
726
- remove: scrub refs and delete (refs become dangling).
727
- - state (kind:id/state_id) --strategy replace --replacement <state_id>: repoint context/state_changes, then drop.
728
- --strategy remove: scrub the state from refs and drop. (Same as state-delete.)
729
- - speaker (spk_id) Same --strategy logic as asset.
730
-
731
- Examples
732
- - scriptctl delete ep_001/scn_001#3
733
- - scriptctl delete ep_001/scn_005 --force
734
- - scriptctl delete actor:act_001 --strategy replace --replacement actor:act_002
735
- - scriptctl delete actor:act_001/st_010 --strategy remove
736
- - scriptctl delete spk_001 --strategy remove
737
- `,
738
- ],
739
- [
740
- ["move"],
741
- `Move an action across actions / scenes, or move a scene across episodes.
742
-
743
- Usage
744
- - scriptctl move <addr> <to> [--at <idx>]
745
-
746
- Behavior by source address kind
747
- - action (ep/scn#idx) <to> is target action address; insertion is "before that index".
748
- - scene (ep/scn) <to> is target episode id (or ep/scn for insert-before-anchor);
749
- --at <idx> overrides position; default: append at end.
750
-
751
- Examples
752
- - scriptctl move ep_001/scn_001#5 ep_001/scn_002#0 # cross-scene
753
- - scriptctl move ep_001/scn_005 ep_002 # cross-episode
754
- - scriptctl move ep_001/scn_005 ep_002 --at 0 # to ep_002 start
755
- `,
756
- ],
757
- [
758
- ["split"],
759
- `Split a scene at an action boundary into two sibling scenes.
760
-
761
- Usage
762
- - scriptctl split <ep/scn> --at <idx> [--new-scene-id <id>]
763
-
764
- Required
765
- - <ep/scn> Scene to split.
766
- - --at Action index (1 <= idx < action count).
767
-
768
- Options
769
- - --new-scene-id Optional explicit id for the new tail scene.
770
-
771
- Example
772
- - scriptctl split ep_001/scn_005 --at 7
773
- `,
774
- ],
775
- [
776
- ["merge"],
777
- `Merge one asset / scene into another. Source disappears; refs are rewritten to the target.
778
-
779
- Usage
780
- - scriptctl merge <src> --into <dst>
781
-
782
- Both addresses must be the same kind (asset/asset same kind, or scene/scene same episode).
783
-
784
- Examples
785
- - scriptctl merge actor:act_001 --into actor:act_002
786
- - scriptctl merge ep_001/scn_005 --into ep_001/scn_006
787
- `,
788
- ],
789
- // =========================================================================
790
- // Edit verbs — state / transition / context on actions+scenes
791
- // =========================================================================
792
- [
793
- ["transition"],
794
- `Set or clear an action.transition_prompt (process + contrast for visual generation).
795
-
796
- Usage
797
- - scriptctl transition <at> <kind:id> --process <text> --contrast <text>
798
- - scriptctl transition <at> <kind:id> --clear
799
-
800
- Examples
801
- - scriptctl transition ep_001/scn_001#3 actor:act_001 --process "深呼吸三秒" --contrast "由静转动"
802
- - scriptctl transition ep_001/scn_001#3 actor:act_001 --clear
803
- `,
804
- ],
805
- [
806
- ["scene-ref"],
807
- `Manage a scene's cast / props / location ref (v3: scene.actors[] / props[] / location).
808
-
809
- Usage
810
- - scriptctl scene-ref <ep/scn> <kind:id> --state <state_id> # upsert ref + set state
811
- - scriptctl scene-ref <ep/scn> actor:<id> --state <state_id> --append # append another ref for the same actor
812
- - scriptctl scene-ref <ep/scn> actor:<id> --state <state_id> --occurrence <n> # update the nth matching ref (1-based)
813
- - scriptctl scene-ref <ep/scn> <kind:id> --state none # repair intermediate: upsert ref, no state
814
- - scriptctl scene-ref <ep/scn> <kind:id> --clear [--occurrence <n>] # keep ref, clear state
815
- - scriptctl scene-ref <ep/scn> <kind:id> --remove [--occurrence <n>] # remove ref
816
-
817
- kind is actor / location / prop. Actor refs may repeat; use --append to add another and --occurrence when a target repeats. Location is single-valued per scene (set replaces).
818
- Exactly one of --state / --clear / --remove must be passed.
819
- New body insertion is blocked while any scene asset ref has no materialized state.
820
-
821
- Examples
822
- - scriptctl scene-ref ep_001/scn_001 actor:act_001 --state st_calm
823
- - scriptctl scene-ref ep_001/scn_001 actor:act_001 --state st_injured --append
824
- - scriptctl scene-ref ep_001/scn_001 actor:act_001 --remove --occurrence 2
825
- - scriptctl scene-ref ep_001/scn_001 location:loc_003 --state default
826
- - scriptctl scene-ref ep_001/scn_001 actor:act_001 --remove
827
- `,
828
- ],
829
- // =========================================================================
830
- // Edit verbs — asset metadata
831
- // =========================================================================
832
- [
833
- ["rename"],
834
- `Rename an asset (actor / location / prop) or a state. Dispatches by address kind.
835
-
836
- Usage
837
- - scriptctl rename <kind:id> <new_name> # asset
838
- - scriptctl rename <kind:id/state_id> <new_name> # state (same as state-rename)
839
-
840
- Examples
841
- - scriptctl rename actor:act_001 "陈墨"
842
- - scriptctl rename actor:act_001/st_010 "平静(新)"
843
- `,
844
- ],
845
- [
846
- ["describe"],
847
- `Set the description on an asset or a state (address with /state_id).
848
-
849
- Usage
850
- - scriptctl describe <kind:id> <text> # asset description
851
- - scriptctl describe <kind:id/state_id> <text> # state description
852
-
853
- Examples
854
- - scriptctl describe actor:act_001 "男主,30 岁,雷厉风行"
855
- - scriptctl describe actor:act_001/st_calm "默认形态:平静"
856
- `,
857
- ],
858
- [
859
- ["alias"],
860
- `Add or remove aliases on an asset.
861
-
862
- Usage
863
- - scriptctl alias <kind:id> [--add <alias>] [--remove <alias>]
864
-
865
- Either --add or --remove (or both, repeatable) must be provided.
866
-
867
- Examples
868
- - scriptctl alias actor:act_001 --add "陈总"
869
- - scriptctl alias actor:act_001 --add "陈总" --add "老板"
870
- - scriptctl alias actor:act_001 --remove "老板"
871
- `,
872
- ],
873
- [
874
- ["role"],
875
- `Set an actor's role_type.
876
-
877
- Usage
878
- - scriptctl role <actor:id> <主角|配角>
879
-
880
- Only valid on actor:* addresses.
881
-
882
- Example
883
- - scriptctl role actor:act_001 主角
884
- `,
885
- ],
886
- [
887
- ["importance"],
888
- `Set an asset's importance tier. featured = 主角/配角 (downstream gets a render
889
- asset + state tracking); background = 龙套/背景 (skipped downstream).
890
-
891
- Usage
892
- - scriptctl importance <kind:id> <featured|background>
893
-
894
- Valid on actor / location / prop addresses.
895
-
896
- Examples
897
- - scriptctl importance actor:act_002 background
898
- - scriptctl importance location:loc_001 featured
899
- `,
900
- ],
901
- [
902
- ["worldview"],
903
- `Set the script-level worldview (story setting / time period).
904
-
905
- Usage
906
- - scriptctl worldview <value>
907
-
908
- Value must match the supported enum (see SCRIPT_SCHEMA worldview values).
909
-
910
- Example
911
- - scriptctl worldview 现代
912
- `,
913
- ],
914
- [
915
- ["synopsis"],
916
- `Set the whole-script synopsis or one episode's synopsis.
917
-
918
- Usage
919
- - scriptctl synopsis <text> # set script.synopsis
920
- - scriptctl synopsis <ep_NNN> <text> # set episode.synopsis
921
- - scriptctl synopsis generate --apply # generate missing synopsis fields
922
-
923
- Patch ops
924
- - meta.synopsis.set
925
- - episode.synopsis.set
926
-
927
- Examples
928
- - scriptctl synopsis "陈墨归国复仇,与苏晴重逢,围绕林氏集团的阴谋逐步展开。"
929
- - scriptctl synopsis ep_001 "陈墨第一时间来到总裁办公室,与苏晴重逢。"
930
- `,
931
- ],
932
- [
933
- ["synopsis", "generate"],
934
- `Generate missing episode and whole-script synopsis fields from script.json.
935
-
936
- Usage
937
- - scriptctl synopsis generate --script-path output/script.json
938
- - scriptctl synopsis generate --script-path output/script.json --apply
939
- - scriptctl synopsis generate --script-path output/script.json --overwrite --apply
940
-
941
- Behavior
942
- - Default is dry-run: runs extraction and validation but does not write.
943
- - Without --overwrite, existing episode synopsis fields are reused and only missing
944
- fields are filled.
945
- - Whole-script fields are generated when any of synopsis/theme/logline/style/main_characters
946
- is missing; --overwrite regenerates them.
947
- - Uses a text-output contract and parser, not tool_use.
948
-
949
- Options
950
- - --llm-config <path> task/model routing YAML; built-in route uses the grok gateway
951
- - --concurrency <n> parallel chunk extraction, default 30
952
- - --checkpoint <dir> checkpoint directory, default workspace direct loom dir
953
- - --overwrite regenerate existing synopsis fields
954
- - --apply write script.json
955
- `,
956
- ],
957
- [
958
- ["extend"],
959
- `Attach a free-form extend{} namespace (arbitrary key→value) to any node.
960
- A dual-mode verb: with a key it writes, without a key it reads.
961
-
962
- The extend{} container is isolated from the known schema fields and survives
963
- validation untouched — use it for production metadata the schema has no slot for
964
- (camera notes, reference URLs, localization flags, runtime, ad-hoc tags).
965
-
966
- Addresses (every dimension)
967
- - global script top level
968
- - ep_001 episode
969
- - ep_001/scn_001 scene
970
- - ep_001/scn_001#3 action (0-based index)
971
- - actor:act_001 asset (also location: / prop:)
972
- - actor:act_001/st_calm asset state
973
- - spk_001 speaker
974
-
975
- Usage
976
- - scriptctl extend <addr> <key> <value> # write a string
977
- - scriptctl extend <addr> <key> <value> --json-value # parse value as JSON (number/bool/object/array)
978
- - scriptctl extend <addr> <key> --clear # delete one key
979
- - scriptctl extend <addr> --clear # wipe the whole container
980
- - scriptctl extend <addr> # read: list the node's extend keys
981
-
982
- Notes
983
- - The value-parsing flag is --json-value (NOT --json: that is the global
984
- output-mode flag and is consumed before this command sees it).
985
- - key is a FLAT name; dots (a.b.c) are literal, NOT a path. For nested structure
986
- pass an object via --json-value.
987
- - Deleting a missing key / clearing an absent container is a no-op (no error).
988
- - An emptied container is removed entirely (no "extend": {} left behind).
989
-
990
- Examples
991
- - scriptctl extend global art_style cyberpunk
992
- - scriptctl extend ep_001/scn_001 mood '{"tone":"tense","lit":"neon"}' --json-value
993
- - scriptctl extend ep_001/scn_001#3 camera "low angle, slow push-in"
994
- - scriptctl extend actor:act_001 reference_url https://example.com/ref.png
995
- - scriptctl extend global art_style --clear
996
- `,
997
- ],
998
- // =========================================================================
999
- // Edit verbs — state management
1000
- // =========================================================================
1001
- [
1002
- ["state-add"],
1003
- `Add a state to an asset's states[].
1004
-
1005
- Usage
1006
- - scriptctl state-add <kind:id> <state_name> [--description <text>] [--state-id <id>]
1007
-
1008
- Required
1009
- - <kind:id> Asset target.
1010
- - <state_name> Human-readable state name (must be unique within the asset).
1011
-
1012
- Options
1013
- - --description Optional description.
1014
- - --state-id Optional explicit id (auto-assigned otherwise).
1015
-
1016
- Examples
1017
- - scriptctl state-add actor:act_001 "震惊"
1018
- - scriptctl state-add actor:act_001 "震惊" --description "瞠目结舌" --state-id st_shock
1019
- `,
1020
- ],
1021
- [
1022
- ["state-rename"],
1023
- `Rename a state on an asset.
1024
-
1025
- Usage
1026
- - scriptctl state-rename <kind:id/state_id> <new_name>
1027
-
1028
- Example
1029
- - scriptctl state-rename actor:act_001/st_calm "平静(新)"
1030
- `,
1031
- ],
1032
- [
1033
- ["state-delete"],
1034
- `Delete a state from an asset's states[]. Refs are handled via --strategy.
1035
-
1036
- Usage
1037
- - scriptctl state-delete <kind:id/state_id> --strategy <replace|remove> [--replacement <state_id>]
1038
-
1039
- Strategy
1040
- - replace --replacement <state_id> Rewrite all refs to the replacement state, then delete.
1041
- - remove Clear refs and delete (scene-initial state becomes null;
1042
- state_changes referencing this state are dropped).
1043
-
1044
- Examples
1045
- - scriptctl state-delete actor:act_001/st_calm --strategy remove
1046
- - scriptctl state-delete actor:act_001/st_calm --strategy replace --replacement actor:act_001/st_default
1047
- `,
1048
- ],
1049
- // =========================================================================
1050
- // Edit verbs — dialogue / speaker
1051
- // =========================================================================
1052
- [
1053
- ["dialogue"],
1054
- `Set a dialogue line's inline speaker (v3: a single speaker per line). Also flips
1055
- the action to type=dialogue.
1056
-
1057
- Usage
1058
- - scriptctl dialogue <at> --actor <actor_id> # an actor speaks
1059
- - scriptctl dialogue <at> --kind <system|broadcast|offscreen|group> [--label <text>]
1060
-
1061
- Pass exactly one of --actor (an actor) or --kind (a non-actor source).
1062
-
1063
- Examples
1064
- - scriptctl dialogue ep_001/scn_001#3 --actor act_001
1065
- - scriptctl dialogue ep_001/scn_001#3 --kind broadcast --label 广播
1066
- `,
1067
- ],
1068
- // =========================================================================
1069
- // Patch (batch transactions)
1070
- // =========================================================================
1071
- [
1072
- ["patch"],
1073
- `Apply a batch JSON patch to the current script. Use ONLY for >=3 ops in one transaction;
1074
- single-op edits should use the corresponding atomic verb (replace / type / delete / rename /
1075
- state-add / etc.).
1076
-
1077
- Usage
1078
- - scriptctl patch <file> [options]
1079
-
1080
- Required
1081
- - <file> JSON patch file. Top-level may be:
1082
- an array of ops, or
1083
- { "ops": [...] }, or
1084
- { "operations": [...] }, or
1085
- a single op object.
1086
-
1087
- Op names use dot-style only (state.add / action.delete / asset.rename / etc.).
1088
- The 0.5.0 snake-style ops (set_worldview, rename_actor, merge_scenes, ...) were removed.
1089
- Use \`scriptctl patch --schema\` to see every supported op + its required fields.
1090
-
1091
- Options
1092
- - --schema [<op>] Dump op schema (JSON) instead of applying. With <op>, dump just that op.
1093
- - --dry-run Apply to an in-memory copy, run validate, do NOT write to gateway.
1094
- - --script-path / --json / --help
1095
-
1096
- Examples
1097
- - scriptctl patch changes.json
1098
- - scriptctl patch changes.json --dry-run
1099
- - scriptctl patch --schema
1100
- - scriptctl patch --schema asset.rename
1101
- `,
1102
- ],
1103
- ];
1104
- function keyOf(command) {
1105
- return command.join("");
1106
- }
1107
- const HELP_MAP = new Map(HELP_ENTRIES.map(([cmd, text]) => [keyOf(cmd), text]));
1108
- export function getHelp(command) {
1109
- return HELP_MAP.get(keyOf(command));
1110
- }
1111
- export const HELP = HELP_MAP;
1112
- //# sourceMappingURL=help-text.js.map