@overcrow/mcp 0.0.0 → 0.1.1

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 (489) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +91 -1
  3. package/dist/audit/index.js +103 -0
  4. package/dist/audit/lexer.js +417 -0
  5. package/dist/audit/project.js +200 -0
  6. package/dist/audit/rules.js +661 -0
  7. package/dist/bootstrap/download.js +229 -0
  8. package/dist/bootstrap/install.js +280 -0
  9. package/dist/bootstrap/pin.js +85 -0
  10. package/dist/bootstrap/pin.json +119 -0
  11. package/dist/bootstrap/zip.js +258 -0
  12. package/dist/cli.js +200 -0
  13. package/dist/confine.js +244 -0
  14. package/dist/content/docs/en/cli.md +768 -0
  15. package/dist/content/docs/en/creator-space.md +78 -0
  16. package/dist/content/docs/en/dev-channel.md +130 -0
  17. package/dist/content/docs/en/elements.md +469 -0
  18. package/dist/content/docs/en/forms.md +328 -0
  19. package/dist/content/docs/en/guide.md +252 -0
  20. package/dist/content/docs/en/index.md +85 -0
  21. package/dist/content/docs/en/limits.md +241 -0
  22. package/dist/content/docs/en/logic.md +446 -0
  23. package/dist/content/docs/en/manifest.md +388 -0
  24. package/dist/content/docs/en/mcp.md +165 -0
  25. package/dist/content/docs/en/package.md +131 -0
  26. package/dist/content/docs/en/publish-a-widget.md +94 -0
  27. package/dist/content/docs/en/publish-keys.md +95 -0
  28. package/dist/content/docs/en/publishing.md +167 -0
  29. package/dist/content/docs/en/reference.md +55 -0
  30. package/dist/content/docs/en/result-shapes.md +332 -0
  31. package/dist/content/docs/en/sdk.md +295 -0
  32. package/dist/content/docs/en/security.md +115 -0
  33. package/dist/content/docs/en/service-reference.md +344 -0
  34. package/dist/content/docs/en/services.md +517 -0
  35. package/dist/content/docs/en/style-properties.md +270 -0
  36. package/dist/content/docs/en/style.md +266 -0
  37. package/dist/content/docs/en/testing.md +400 -0
  38. package/dist/content/docs/en/verified-domain.md +46 -0
  39. package/dist/content/docs/en/view.md +338 -0
  40. package/dist/content/docs/en/widget-listing.md +65 -0
  41. package/dist/content/docs/en/widget-review.md +57 -0
  42. package/dist/content/docs/en/widget-statistics.md +134 -0
  43. package/dist/content/docs/en/widgets.md +76 -0
  44. package/dist/content/docs/fr/cli.md +802 -0
  45. package/dist/content/docs/fr/creator-space.md +83 -0
  46. package/dist/content/docs/fr/dev-channel.md +140 -0
  47. package/dist/content/docs/fr/elements.md +475 -0
  48. package/dist/content/docs/fr/forms.md +341 -0
  49. package/dist/content/docs/fr/guide.md +263 -0
  50. package/dist/content/docs/fr/index.md +90 -0
  51. package/dist/content/docs/fr/limits.md +244 -0
  52. package/dist/content/docs/fr/logic.md +461 -0
  53. package/dist/content/docs/fr/manifest.md +401 -0
  54. package/dist/content/docs/fr/mcp.md +173 -0
  55. package/dist/content/docs/fr/package.md +139 -0
  56. package/dist/content/docs/fr/publish-a-widget.md +101 -0
  57. package/dist/content/docs/fr/publish-keys.md +97 -0
  58. package/dist/content/docs/fr/publishing.md +177 -0
  59. package/dist/content/docs/fr/reference.md +59 -0
  60. package/dist/content/docs/fr/result-shapes.md +333 -0
  61. package/dist/content/docs/fr/sdk.md +301 -0
  62. package/dist/content/docs/fr/security.md +129 -0
  63. package/dist/content/docs/fr/service-reference.md +346 -0
  64. package/dist/content/docs/fr/services.md +540 -0
  65. package/dist/content/docs/fr/style-properties.md +272 -0
  66. package/dist/content/docs/fr/style.md +281 -0
  67. package/dist/content/docs/fr/testing.md +417 -0
  68. package/dist/content/docs/fr/verified-domain.md +49 -0
  69. package/dist/content/docs/fr/view.md +352 -0
  70. package/dist/content/docs/fr/widget-listing.md +69 -0
  71. package/dist/content/docs/fr/widget-review.md +59 -0
  72. package/dist/content/docs/fr/widget-statistics.md +141 -0
  73. package/dist/content/docs/fr/widgets.md +81 -0
  74. package/dist/content/examples/clock/LICENSE +21 -0
  75. package/dist/content/examples/clock/README.md +75 -0
  76. package/dist/content/examples/clock/listing.json +19 -0
  77. package/dist/content/examples/clock/locales/en.json +4 -0
  78. package/dist/content/examples/clock/locales/fr.json +4 -0
  79. package/dist/content/examples/clock/logic.ts +85 -0
  80. package/dist/content/examples/clock/manifest.json +44 -0
  81. package/dist/content/examples/clock/package.json +16 -0
  82. package/dist/content/examples/clock/style.ocss +26 -0
  83. package/dist/content/examples/clock/tests/hidden.scenario.json +68 -0
  84. package/dist/content/examples/clock/tests/load-logic.mjs +22 -0
  85. package/dist/content/examples/clock/tests/logic.test.mjs +89 -0
  86. package/dist/content/examples/clock/tests/options.scenario.json +108 -0
  87. package/dist/content/examples/clock/tests/preview.scenario.json +25 -0
  88. package/dist/content/examples/clock/tests/render.scenario.json +94 -0
  89. package/dist/content/examples/clock/tests/summer-time.scenario.json +74 -0
  90. package/dist/content/examples/clock/tests/ticks.scenario.json +120 -0
  91. package/dist/content/examples/clock/tsconfig.json +16 -0
  92. package/dist/content/examples/clock/view.ocml +8 -0
  93. package/dist/content/examples/countdown/LICENSE +20 -0
  94. package/dist/content/examples/countdown/listing.json +10 -0
  95. package/dist/content/examples/countdown/locales/en.json +15 -0
  96. package/dist/content/examples/countdown/locales/fr.json +15 -0
  97. package/dist/content/examples/countdown/logic.ts +179 -0
  98. package/dist/content/examples/countdown/manifest.json +34 -0
  99. package/dist/content/examples/countdown/package.json +15 -0
  100. package/dist/content/examples/countdown/style.ocss +94 -0
  101. package/dist/content/examples/countdown/tsconfig.json +16 -0
  102. package/dist/content/examples/countdown/view.ocml +42 -0
  103. package/dist/content/examples/fps/LICENSE +21 -0
  104. package/dist/content/examples/fps/README.md +64 -0
  105. package/dist/content/examples/fps/listing.json +19 -0
  106. package/dist/content/examples/fps/locales/en.json +11 -0
  107. package/dist/content/examples/fps/locales/fr.json +11 -0
  108. package/dist/content/examples/fps/logic.ts +64 -0
  109. package/dist/content/examples/fps/manifest.json +30 -0
  110. package/dist/content/examples/fps/package.json +16 -0
  111. package/dist/content/examples/fps/style.ocss +31 -0
  112. package/dist/content/examples/fps/submission.json +8 -0
  113. package/dist/content/examples/fps/tests/label.scenario.json +63 -0
  114. package/dist/content/examples/fps/tests/load-logic.mjs +22 -0
  115. package/dist/content/examples/fps/tests/logic.test.mjs +60 -0
  116. package/dist/content/examples/fps/tests/preview.scenario.json +29 -0
  117. package/dist/content/examples/fps/tests/refused.scenario.json +20 -0
  118. package/dist/content/examples/fps/tests/render.scenario.json +96 -0
  119. package/dist/content/examples/fps/tests/stale.scenario.json +91 -0
  120. package/dist/content/examples/fps/tests/unavailable.scenario.json +111 -0
  121. package/dist/content/examples/fps/tsconfig.json +16 -0
  122. package/dist/content/examples/fps/view.ocml +11 -0
  123. package/dist/content/examples/media/LICENSE +21 -0
  124. package/dist/content/examples/media/README.md +147 -0
  125. package/dist/content/examples/media/listing.json +19 -0
  126. package/dist/content/examples/media/locales/en.json +11 -0
  127. package/dist/content/examples/media/locales/fr.json +11 -0
  128. package/dist/content/examples/media/logic.ts +191 -0
  129. package/dist/content/examples/media/manifest.json +35 -0
  130. package/dist/content/examples/media/package.json +16 -0
  131. package/dist/content/examples/media/style.ocss +148 -0
  132. package/dist/content/examples/media/submission.json +12 -0
  133. package/dist/content/examples/media/tests/covers.scenario.json +144 -0
  134. package/dist/content/examples/media/tests/gesture.scenario.json +173 -0
  135. package/dist/content/examples/media/tests/load-logic.mjs +22 -0
  136. package/dist/content/examples/media/tests/logic.test.mjs +176 -0
  137. package/dist/content/examples/media/tests/marquee.scenario.json +127 -0
  138. package/dist/content/examples/media/tests/preview.scenario.json +52 -0
  139. package/dist/content/examples/media/tests/read-only.scenario.json +53 -0
  140. package/dist/content/examples/media/tests/refused.scenario.json +22 -0
  141. package/dist/content/examples/media/tests/refused.test.mjs +31 -0
  142. package/dist/content/examples/media/tests/render.scenario.json +136 -0
  143. package/dist/content/examples/media/tests/states.scenario.json +257 -0
  144. package/dist/content/examples/media/tests/unavailable.scenario.json +120 -0
  145. package/dist/content/examples/media/tsconfig.json +16 -0
  146. package/dist/content/examples/media/view.ocml +41 -0
  147. package/dist/content/examples/notes/LICENSE +21 -0
  148. package/dist/content/examples/notes/README.md +219 -0
  149. package/dist/content/examples/notes/listing.json +19 -0
  150. package/dist/content/examples/notes/locales/en.json +25 -0
  151. package/dist/content/examples/notes/locales/fr.json +25 -0
  152. package/dist/content/examples/notes/logic.ts +799 -0
  153. package/dist/content/examples/notes/manifest.json +40 -0
  154. package/dist/content/examples/notes/package.json +16 -0
  155. package/dist/content/examples/notes/style.ocss +469 -0
  156. package/dist/content/examples/notes/submission.json +12 -0
  157. package/dist/content/examples/notes/tests/checks.scenario.json +237 -0
  158. package/dist/content/examples/notes/tests/create.scenario.json +260 -0
  159. package/dist/content/examples/notes/tests/delete.scenario.json +342 -0
  160. package/dist/content/examples/notes/tests/drafts.scenario.json +714 -0
  161. package/dist/content/examples/notes/tests/editor.scenario.json +232 -0
  162. package/dist/content/examples/notes/tests/frame.scenario.json +93 -0
  163. package/dist/content/examples/notes/tests/interactive.scenario.json +344 -0
  164. package/dist/content/examples/notes/tests/limits.scenario.json +1351 -0
  165. package/dist/content/examples/notes/tests/load-logic.mjs +22 -0
  166. package/dist/content/examples/notes/tests/logic.test.mjs +514 -0
  167. package/dist/content/examples/notes/tests/preview.scenario.json +99 -0
  168. package/dist/content/examples/notes/tests/read-only.scenario.json +105 -0
  169. package/dist/content/examples/notes/tests/refused.scenario.json +33 -0
  170. package/dist/content/examples/notes/tests/save.scenario.json +378 -0
  171. package/dist/content/examples/notes/tests/states.scenario.json +640 -0
  172. package/dist/content/examples/notes/tests/typing.scenario.json +562 -0
  173. package/dist/content/examples/notes/tests/unavailable.scenario.json +246 -0
  174. package/dist/content/examples/notes/tsconfig.json +16 -0
  175. package/dist/content/examples/notes/view.ocml +154 -0
  176. package/dist/content/examples/performance/LICENSE +21 -0
  177. package/dist/content/examples/performance/README.md +134 -0
  178. package/dist/content/examples/performance/listing.json +19 -0
  179. package/dist/content/examples/performance/locales/en.json +20 -0
  180. package/dist/content/examples/performance/locales/fr.json +20 -0
  181. package/dist/content/examples/performance/logic.ts +210 -0
  182. package/dist/content/examples/performance/manifest.json +83 -0
  183. package/dist/content/examples/performance/package.json +16 -0
  184. package/dist/content/examples/performance/style.ocss +75 -0
  185. package/dist/content/examples/performance/submission.json +12 -0
  186. package/dist/content/examples/performance/tests/fahrenheit.scenario.json +110 -0
  187. package/dist/content/examples/performance/tests/horizontal.scenario.json +96 -0
  188. package/dist/content/examples/performance/tests/load-logic.mjs +22 -0
  189. package/dist/content/examples/performance/tests/logic.test.mjs +226 -0
  190. package/dist/content/examples/performance/tests/menu.scenario.json +170 -0
  191. package/dist/content/examples/performance/tests/no-fps-source.scenario.json +47 -0
  192. package/dist/content/examples/performance/tests/preview.scenario.json +45 -0
  193. package/dist/content/examples/performance/tests/refused.scenario.json +20 -0
  194. package/dist/content/examples/performance/tests/refused.test.mjs +19 -0
  195. package/dist/content/examples/performance/tests/region.scenario.json +89 -0
  196. package/dist/content/examples/performance/tests/render.scenario.json +112 -0
  197. package/dist/content/examples/performance/tests/sources.scenario.json +151 -0
  198. package/dist/content/examples/performance/tests/stale.scenario.json +111 -0
  199. package/dist/content/examples/performance/tests/telemetry-only.scenario.json +44 -0
  200. package/dist/content/examples/performance/tests/thresholds.scenario.json +147 -0
  201. package/dist/content/examples/performance/tests/waiting.scenario.json +105 -0
  202. package/dist/content/examples/performance/tsconfig.json +16 -0
  203. package/dist/content/examples/performance/view.ocml +18 -0
  204. package/dist/content/examples/playervox-journal/LICENSE +21 -0
  205. package/dist/content/examples/playervox-journal/README.md +150 -0
  206. package/dist/content/examples/playervox-journal/listing.json +19 -0
  207. package/dist/content/examples/playervox-journal/locales/en.json +25 -0
  208. package/dist/content/examples/playervox-journal/locales/fr.json +25 -0
  209. package/dist/content/examples/playervox-journal/logic.ts +556 -0
  210. package/dist/content/examples/playervox-journal/manifest.json +19 -0
  211. package/dist/content/examples/playervox-journal/package.json +16 -0
  212. package/dist/content/examples/playervox-journal/style.ocss +142 -0
  213. package/dist/content/examples/playervox-journal/submission.json +12 -0
  214. package/dist/content/examples/playervox-journal/tests/changes.scenario.json +482 -0
  215. package/dist/content/examples/playervox-journal/tests/delete.scenario.json +432 -0
  216. package/dist/content/examples/playervox-journal/tests/frame.scenario.json +169 -0
  217. package/dist/content/examples/playervox-journal/tests/load-logic.mjs +22 -0
  218. package/dist/content/examples/playervox-journal/tests/logic.test.mjs +349 -0
  219. package/dist/content/examples/playervox-journal/tests/paging.scenario.json +428 -0
  220. package/dist/content/examples/playervox-journal/tests/preview.scenario.json +184 -0
  221. package/dist/content/examples/playervox-journal/tests/read-only.scenario.json +157 -0
  222. package/dist/content/examples/playervox-journal/tests/refused.scenario.json +39 -0
  223. package/dist/content/examples/playervox-journal/tests/scale.scenario.json +286 -0
  224. package/dist/content/examples/playervox-journal/tests/signed-out.scenario.json +134 -0
  225. package/dist/content/examples/playervox-journal/tests/states.scenario.json +741 -0
  226. package/dist/content/examples/playervox-journal/tests/unavailable.scenario.json +183 -0
  227. package/dist/content/examples/playervox-journal/tsconfig.json +16 -0
  228. package/dist/content/examples/playervox-journal/view.ocml +52 -0
  229. package/dist/content/examples/playervox-rating/LICENSE +21 -0
  230. package/dist/content/examples/playervox-rating/README.md +166 -0
  231. package/dist/content/examples/playervox-rating/listing.json +19 -0
  232. package/dist/content/examples/playervox-rating/locales/en.json +35 -0
  233. package/dist/content/examples/playervox-rating/locales/fr.json +35 -0
  234. package/dist/content/examples/playervox-rating/logic.ts +581 -0
  235. package/dist/content/examples/playervox-rating/manifest.json +19 -0
  236. package/dist/content/examples/playervox-rating/package.json +16 -0
  237. package/dist/content/examples/playervox-rating/style.ocss +333 -0
  238. package/dist/content/examples/playervox-rating/submission.json +12 -0
  239. package/dist/content/examples/playervox-rating/tests/account.scenario.json +125 -0
  240. package/dist/content/examples/playervox-rating/tests/bounds.scenario.json +73 -0
  241. package/dist/content/examples/playervox-rating/tests/draft.scenario.json +199 -0
  242. package/dist/content/examples/playervox-rating/tests/form.scenario.json +142 -0
  243. package/dist/content/examples/playervox-rating/tests/load-logic.mjs +22 -0
  244. package/dist/content/examples/playervox-rating/tests/logic.test.mjs +346 -0
  245. package/dist/content/examples/playervox-rating/tests/offline.scenario.json +142 -0
  246. package/dist/content/examples/playervox-rating/tests/preview.scenario.json +44 -0
  247. package/dist/content/examples/playervox-rating/tests/publish-keyboard.scenario.json +221 -0
  248. package/dist/content/examples/playervox-rating/tests/publish-pointer.scenario.json +314 -0
  249. package/dist/content/examples/playervox-rating/tests/read-only.scenario.json +70 -0
  250. package/dist/content/examples/playervox-rating/tests/refused.scenario.json +45 -0
  251. package/dist/content/examples/playervox-rating/tests/states.scenario.json +362 -0
  252. package/dist/content/examples/playervox-rating/tsconfig.json +16 -0
  253. package/dist/content/examples/playervox-rating/view.ocml +62 -0
  254. package/dist/content/examples/playervox-reviews/LICENSE +21 -0
  255. package/dist/content/examples/playervox-reviews/README.md +194 -0
  256. package/dist/content/examples/playervox-reviews/listing.json +19 -0
  257. package/dist/content/examples/playervox-reviews/locales/en.json +32 -0
  258. package/dist/content/examples/playervox-reviews/locales/fr.json +32 -0
  259. package/dist/content/examples/playervox-reviews/logic.ts +822 -0
  260. package/dist/content/examples/playervox-reviews/manifest.json +30 -0
  261. package/dist/content/examples/playervox-reviews/package.json +16 -0
  262. package/dist/content/examples/playervox-reviews/style.ocss +260 -0
  263. package/dist/content/examples/playervox-reviews/submission.json +8 -0
  264. package/dist/content/examples/playervox-reviews/tests/account.scenario.json +249 -0
  265. package/dist/content/examples/playervox-reviews/tests/bounds.scenario.json +336 -0
  266. package/dist/content/examples/playervox-reviews/tests/changes.scenario.json +515 -0
  267. package/dist/content/examples/playervox-reviews/tests/filter.scenario.json +400 -0
  268. package/dist/content/examples/playervox-reviews/tests/frame.scenario.json +185 -0
  269. package/dist/content/examples/playervox-reviews/tests/keyboard.scenario.json +188 -0
  270. package/dist/content/examples/playervox-reviews/tests/load-logic.mjs +22 -0
  271. package/dist/content/examples/playervox-reviews/tests/logic.test.mjs +559 -0
  272. package/dist/content/examples/playervox-reviews/tests/offline-start.scenario.json +152 -0
  273. package/dist/content/examples/playervox-reviews/tests/offline.scenario.json +311 -0
  274. package/dist/content/examples/playervox-reviews/tests/paging.scenario.json +497 -0
  275. package/dist/content/examples/playervox-reviews/tests/preview.scenario.json +286 -0
  276. package/dist/content/examples/playervox-reviews/tests/reading.scenario.json +591 -0
  277. package/dist/content/examples/playervox-reviews/tests/refused.scenario.json +54 -0
  278. package/dist/content/examples/playervox-reviews/tests/scale.scenario.json +303 -0
  279. package/dist/content/examples/playervox-reviews/tests/states.scenario.json +700 -0
  280. package/dist/content/examples/playervox-reviews/tests/unavailable.scenario.json +192 -0
  281. package/dist/content/examples/playervox-reviews/tsconfig.json +16 -0
  282. package/dist/content/examples/playervox-reviews/view.ocml +110 -0
  283. package/dist/content/examples/playervox-score/LICENSE +21 -0
  284. package/dist/content/examples/playervox-score/README.md +131 -0
  285. package/dist/content/examples/playervox-score/listing.json +19 -0
  286. package/dist/content/examples/playervox-score/locales/en.json +23 -0
  287. package/dist/content/examples/playervox-score/locales/fr.json +23 -0
  288. package/dist/content/examples/playervox-score/logic.ts +430 -0
  289. package/dist/content/examples/playervox-score/manifest.json +47 -0
  290. package/dist/content/examples/playervox-score/package.json +16 -0
  291. package/dist/content/examples/playervox-score/style.ocss +247 -0
  292. package/dist/content/examples/playervox-score/submission.json +8 -0
  293. package/dist/content/examples/playervox-score/tests/grades.scenario.json +279 -0
  294. package/dist/content/examples/playervox-score/tests/load-logic.mjs +22 -0
  295. package/dist/content/examples/playervox-score/tests/logic.test.mjs +229 -0
  296. package/dist/content/examples/playervox-score/tests/options.scenario.json +302 -0
  297. package/dist/content/examples/playervox-score/tests/preview.scenario.json +68 -0
  298. package/dist/content/examples/playervox-score/tests/pulse.scenario.json +157 -0
  299. package/dist/content/examples/playervox-score/tests/refused.scenario.json +21 -0
  300. package/dist/content/examples/playervox-score/tests/signed-out.scenario.json +46 -0
  301. package/dist/content/examples/playervox-score/tests/states.scenario.json +450 -0
  302. package/dist/content/examples/playervox-score/tests/unavailable.scenario.json +84 -0
  303. package/dist/content/examples/playervox-score/tsconfig.json +16 -0
  304. package/dist/content/examples/playervox-score/view.ocml +51 -0
  305. package/dist/content/examples/session/LICENSE +21 -0
  306. package/dist/content/examples/session/README.md +57 -0
  307. package/dist/content/examples/session/listing.json +19 -0
  308. package/dist/content/examples/session/locales/en.json +3 -0
  309. package/dist/content/examples/session/locales/fr.json +3 -0
  310. package/dist/content/examples/session/logic.ts +26 -0
  311. package/dist/content/examples/session/manifest.json +19 -0
  312. package/dist/content/examples/session/package.json +16 -0
  313. package/dist/content/examples/session/style.ocss +16 -0
  314. package/dist/content/examples/session/submission.json +8 -0
  315. package/dist/content/examples/session/tests/hidden.scenario.json +45 -0
  316. package/dist/content/examples/session/tests/load-logic.mjs +22 -0
  317. package/dist/content/examples/session/tests/logic.test.mjs +37 -0
  318. package/dist/content/examples/session/tests/preview.scenario.json +28 -0
  319. package/dist/content/examples/session/tests/refused.scenario.json +20 -0
  320. package/dist/content/examples/session/tests/refused.test.mjs +16 -0
  321. package/dist/content/examples/session/tests/render.scenario.json +95 -0
  322. package/dist/content/examples/session/tests/ticks.scenario.json +139 -0
  323. package/dist/content/examples/session/tests/unknown.scenario.json +37 -0
  324. package/dist/content/examples/session/tsconfig.json +16 -0
  325. package/dist/content/examples/session/view.ocml +11 -0
  326. package/dist/content/examples/stopwatch/LICENSE +21 -0
  327. package/dist/content/examples/stopwatch/README.md +99 -0
  328. package/dist/content/examples/stopwatch/listing.json +19 -0
  329. package/dist/content/examples/stopwatch/locales/en.json +8 -0
  330. package/dist/content/examples/stopwatch/locales/fr.json +8 -0
  331. package/dist/content/examples/stopwatch/logic.ts +93 -0
  332. package/dist/content/examples/stopwatch/manifest.json +19 -0
  333. package/dist/content/examples/stopwatch/package.json +16 -0
  334. package/dist/content/examples/stopwatch/style.ocss +54 -0
  335. package/dist/content/examples/stopwatch/submission.json +12 -0
  336. package/dist/content/examples/stopwatch/tests/errors.scenario.json +121 -0
  337. package/dist/content/examples/stopwatch/tests/gesture.scenario.json +154 -0
  338. package/dist/content/examples/stopwatch/tests/hidden.scenario.json +57 -0
  339. package/dist/content/examples/stopwatch/tests/hundredths.scenario.json +173 -0
  340. package/dist/content/examples/stopwatch/tests/load-logic.mjs +22 -0
  341. package/dist/content/examples/stopwatch/tests/logic.test.mjs +99 -0
  342. package/dist/content/examples/stopwatch/tests/preview.scenario.json +36 -0
  343. package/dist/content/examples/stopwatch/tests/read-only.scenario.json +42 -0
  344. package/dist/content/examples/stopwatch/tests/read-only.test.mjs +18 -0
  345. package/dist/content/examples/stopwatch/tests/refused.scenario.json +22 -0
  346. package/dist/content/examples/stopwatch/tests/refused.test.mjs +18 -0
  347. package/dist/content/examples/stopwatch/tests/render.scenario.json +105 -0
  348. package/dist/content/examples/stopwatch/tests/states.scenario.json +246 -0
  349. package/dist/content/examples/stopwatch/tests/unknown.scenario.json +40 -0
  350. package/dist/content/examples/stopwatch/tsconfig.json +16 -0
  351. package/dist/content/examples/stopwatch/view.ocml +29 -0
  352. package/dist/content/examples/twitch-chat/LICENSE +21 -0
  353. package/dist/content/examples/twitch-chat/README.md +283 -0
  354. package/dist/content/examples/twitch-chat/listing.json +19 -0
  355. package/dist/content/examples/twitch-chat/locales/en.json +52 -0
  356. package/dist/content/examples/twitch-chat/locales/fr.json +52 -0
  357. package/dist/content/examples/twitch-chat/logic.ts +887 -0
  358. package/dist/content/examples/twitch-chat/manifest.json +33 -0
  359. package/dist/content/examples/twitch-chat/package.json +16 -0
  360. package/dist/content/examples/twitch-chat/style.ocss +544 -0
  361. package/dist/content/examples/twitch-chat/submission.json +12 -0
  362. package/dist/content/examples/twitch-chat/tests/account.scenario.json +325 -0
  363. package/dist/content/examples/twitch-chat/tests/burst.scenario.json +1866 -0
  364. package/dist/content/examples/twitch-chat/tests/channel-refused.scenario.json +372 -0
  365. package/dist/content/examples/twitch-chat/tests/channel.scenario.json +480 -0
  366. package/dist/content/examples/twitch-chat/tests/draft.scenario.json +279 -0
  367. package/dist/content/examples/twitch-chat/tests/fade.scenario.json +269 -0
  368. package/dist/content/examples/twitch-chat/tests/failures.scenario.json +420 -0
  369. package/dist/content/examples/twitch-chat/tests/favorites.scenario.json +376 -0
  370. package/dist/content/examples/twitch-chat/tests/frame.scenario.json +152 -0
  371. package/dist/content/examples/twitch-chat/tests/lifetime.scenario.json +186 -0
  372. package/dist/content/examples/twitch-chat/tests/load-logic.mjs +22 -0
  373. package/dist/content/examples/twitch-chat/tests/logic.test.mjs +1053 -0
  374. package/dist/content/examples/twitch-chat/tests/passive.scenario.json +536 -0
  375. package/dist/content/examples/twitch-chat/tests/preview.scenario.json +147 -0
  376. package/dist/content/examples/twitch-chat/tests/read-only.scenario.json +202 -0
  377. package/dist/content/examples/twitch-chat/tests/read-only.test.mjs +63 -0
  378. package/dist/content/examples/twitch-chat/tests/refused.scenario.json +65 -0
  379. package/dist/content/examples/twitch-chat/tests/refused.test.mjs +43 -0
  380. package/dist/content/examples/twitch-chat/tests/render.scenario.json +347 -0
  381. package/dist/content/examples/twitch-chat/tests/reply.scenario.json +384 -0
  382. package/dist/content/examples/twitch-chat/tests/send-refused.scenario.json +383 -0
  383. package/dist/content/examples/twitch-chat/tests/send.scenario.json +300 -0
  384. package/dist/content/examples/twitch-chat/tests/states.scenario.json +455 -0
  385. package/dist/content/examples/twitch-chat/tests/unavailable.scenario.json +256 -0
  386. package/dist/content/examples/twitch-chat/tests/unread.scenario.json +997 -0
  387. package/dist/content/examples/twitch-chat/tsconfig.json +16 -0
  388. package/dist/content/examples/twitch-chat/view.ocml +141 -0
  389. package/dist/content/examples/warframe-market/LICENSE +21 -0
  390. package/dist/content/examples/warframe-market/README.md +176 -0
  391. package/dist/content/examples/warframe-market/listing.json +19 -0
  392. package/dist/content/examples/warframe-market/locales/en.json +44 -0
  393. package/dist/content/examples/warframe-market/locales/fr.json +44 -0
  394. package/dist/content/examples/warframe-market/logic.ts +1265 -0
  395. package/dist/content/examples/warframe-market/manifest.json +92 -0
  396. package/dist/content/examples/warframe-market/package.json +16 -0
  397. package/dist/content/examples/warframe-market/style.ocss +422 -0
  398. package/dist/content/examples/warframe-market/submission.json +24 -0
  399. package/dist/content/examples/warframe-market/tests/bounds.scenario.json +60 -0
  400. package/dist/content/examples/warframe-market/tests/cached.scenario.json +70 -0
  401. package/dist/content/examples/warframe-market/tests/detail.scenario.json +251 -0
  402. package/dist/content/examples/warframe-market/tests/errors.scenario.json +105 -0
  403. package/dist/content/examples/warframe-market/tests/fixtures.json +295 -0
  404. package/dist/content/examples/warframe-market/tests/load-logic.mjs +22 -0
  405. package/dist/content/examples/warframe-market/tests/logic.test.mjs +505 -0
  406. package/dist/content/examples/warframe-market/tests/no-clipboard.scenario.json +104 -0
  407. package/dist/content/examples/warframe-market/tests/passive.scenario.json +87 -0
  408. package/dist/content/examples/warframe-market/tests/preview.scenario.json +146 -0
  409. package/dist/content/examples/warframe-market/tests/refresh.scenario.json +56 -0
  410. package/dist/content/examples/warframe-market/tests/refused.scenario.json +74 -0
  411. package/dist/content/examples/warframe-market/tests/render.scenario.json +210 -0
  412. package/dist/content/examples/warframe-market/tests/search.scenario.json +189 -0
  413. package/dist/content/examples/warframe-market/tests/unavailable.scenario.json +54 -0
  414. package/dist/content/examples/warframe-market/tsconfig.json +16 -0
  415. package/dist/content/examples/warframe-market/view.ocml +116 -0
  416. package/dist/content/examples/weather/LICENSE +20 -0
  417. package/dist/content/examples/weather/listing.json +10 -0
  418. package/dist/content/examples/weather/locales/en.json +9 -0
  419. package/dist/content/examples/weather/locales/fr.json +9 -0
  420. package/dist/content/examples/weather/logic.ts +62 -0
  421. package/dist/content/examples/weather/manifest.json +51 -0
  422. package/dist/content/examples/weather/package.json +15 -0
  423. package/dist/content/examples/weather/style.ocss +29 -0
  424. package/dist/content/examples/weather/submission.json +17 -0
  425. package/dist/content/examples/weather/tsconfig.json +16 -0
  426. package/dist/content/examples/weather/view.ocml +12 -0
  427. package/dist/content/index.json +3705 -0
  428. package/dist/content/reference/errors.json +1924 -0
  429. package/dist/content/reference/limits.json +1154 -0
  430. package/dist/content/reference/manifest.md +223 -0
  431. package/dist/content/reference/permissions.json +413 -0
  432. package/dist/content/templates/blank/locales/en.json +3 -0
  433. package/dist/content/templates/blank/locales/fr.json +3 -0
  434. package/dist/content/templates/blank/logic.ts +7 -0
  435. package/dist/content/templates/blank/manifest.json +16 -0
  436. package/dist/content/templates/blank/style.ocss +10 -0
  437. package/dist/content/templates/blank/tests/example.scenario.json +10 -0
  438. package/dist/content/templates/blank/view.ocml +6 -0
  439. package/dist/content/templates/chart/locales/en.json +3 -0
  440. package/dist/content/templates/chart/locales/fr.json +3 -0
  441. package/dist/content/templates/chart/logic.ts +27 -0
  442. package/dist/content/templates/chart/manifest.json +16 -0
  443. package/dist/content/templates/chart/style.ocss +27 -0
  444. package/dist/content/templates/chart/tests/example.scenario.json +10 -0
  445. package/dist/content/templates/chart/view.ocml +10 -0
  446. package/dist/content/templates/counter/locales/en.json +4 -0
  447. package/dist/content/templates/counter/locales/fr.json +4 -0
  448. package/dist/content/templates/counter/logic.ts +20 -0
  449. package/dist/content/templates/counter/manifest.json +16 -0
  450. package/dist/content/templates/counter/style.ocss +26 -0
  451. package/dist/content/templates/counter/tests/example.scenario.json +11 -0
  452. package/dist/content/templates/counter/view.ocml +13 -0
  453. package/dist/content/templates/list/locales/en.json +8 -0
  454. package/dist/content/templates/list/locales/fr.json +8 -0
  455. package/dist/content/templates/list/logic.ts +35 -0
  456. package/dist/content/templates/list/manifest.json +16 -0
  457. package/dist/content/templates/list/style.ocss +42 -0
  458. package/dist/content/templates/list/tests/example.scenario.json +10 -0
  459. package/dist/content/templates/list/view.ocml +17 -0
  460. package/dist/content/templates/shared/LICENSE +20 -0
  461. package/dist/content/templates/shared/package.json +14 -0
  462. package/dist/content/templates/shared/tsconfig.json +16 -0
  463. package/dist/content.js +68 -0
  464. package/dist/env.js +156 -0
  465. package/dist/fingerprint.js +32 -0
  466. package/dist/hidden.js +47 -0
  467. package/dist/ids.js +27 -0
  468. package/dist/index.js +82 -0
  469. package/dist/knowledge.js +222 -0
  470. package/dist/npm.js +149 -0
  471. package/dist/prompts.js +47 -0
  472. package/dist/resources.js +82 -0
  473. package/dist/run.js +120 -0
  474. package/dist/server.js +43 -0
  475. package/dist/session.js +205 -0
  476. package/dist/sources.js +218 -0
  477. package/dist/text.js +80 -0
  478. package/dist/texts.js +44 -0
  479. package/dist/tools/audit.js +105 -0
  480. package/dist/tools/build.js +453 -0
  481. package/dist/tools/common.js +122 -0
  482. package/dist/tools/docs.js +196 -0
  483. package/dist/tools/preview.js +87 -0
  484. package/dist/tools/project.js +183 -0
  485. package/dist/tools/setup.js +146 -0
  486. package/dist/tools/submission.js +369 -0
  487. package/dist/version.js +3 -0
  488. package/npm-shrinkwrap.json +402 -0
  489. package/package.json +50 -4
@@ -0,0 +1,768 @@
1
+ # The command-line tool
2
+
3
+ `overcrow-widget` creates, checks and packages PlayerVox OverCrow widgets,
4
+ runs them in OverCrow while you write them, and tests them. It is one
5
+ program for Linux and Windows, and it contains the same validators that
6
+ OverCrow runs when it installs and starts a widget: a package it accepts is
7
+ a package OverCrow reads.
8
+
9
+ ```sh
10
+ overcrow-widget init my-widget --template counter --id nova.my-widget
11
+ cd my-widget
12
+ overcrow-widget check
13
+ overcrow-widget package
14
+ overcrow-widget inspect dist/nova.my-widget-0.1.0.ocpkg
15
+ overcrow-widget doctor
16
+ overcrow-widget dev
17
+ overcrow-widget test
18
+ ```
19
+
20
+ | Command | Does |
21
+ | --- | --- |
22
+ | [`init`](#init) | Creates a project from a template. |
23
+ | [`check`](#check) | Validates a project without writing anything. |
24
+ | [`package`](#package) | Checks, then writes the `.ocpkg` package. |
25
+ | [`inspect`](#inspect) | Shows what a package holds and asks for. |
26
+ | [`dev`](#dev) | Runs the widget in OverCrow and reloads it when you save. |
27
+ | [`test`](#test) | Plays the project's test scenarios and compares their images. |
28
+ | [`doctor`](#doctor) | Says what your setup has and lacks. |
29
+ | [`admit`](#admit) | Runs the admission of the creator space on your sources, a folder or a ZIP. |
30
+ | [`diff`](#diff) | Compares two versions of a widget's sources. |
31
+ | [`submit`](#submit) | Sends a version to the creator space with a publish key, and follows its checks. |
32
+ | [`status`](#status) | Shows the versions of a widget, their checks and their review. |
33
+
34
+ Every command takes the project directory as its argument and uses the
35
+ current directory without one. [Machine-readable output](#machine-readable-output)
36
+ and [exit status](#exit-status) are stable for scripts.
37
+
38
+ ## Installing
39
+
40
+ Each [OverCrow release](https://github.com/Valhallab/playervox-overcrow-releases/releases)
41
+ carries the creator tools in one ZIP per platform: the tool with its
42
+ license and third-party notices, OverCrow's headless runtime that
43
+ [`test`](#test) uses, a `README.txt` and a `SHA256SUMS` of every file.
44
+
45
+ | Platform | ZIP | Tool in the ZIP |
46
+ | --- | --- | --- |
47
+ | Linux x86-64 | `overcrow-creator-tools-VERSION-linux-x86_64.zip` | `overcrow-widget-VERSION-linux-x86_64` |
48
+ | Windows x64 | `overcrow-creator-tools-VERSION-windows-x86_64.zip` | `overcrow-widget-VERSION-windows-x86_64.exe` |
49
+
50
+ Unzip it, check the files, rename the tool `overcrow-widget`
51
+ (`overcrow-widget.exe` on Windows), make it executable on Linux
52
+ (`chmod +x`) and put it on your `PATH`. It needs nothing else to check and
53
+ package a widget. `overcrow-widget --version` gives its version and the SDK
54
+ it embeds.
55
+
56
+ ```sh
57
+ unzip overcrow-creator-tools-VERSION-linux-x86_64.zip
58
+ cd overcrow-creator-tools-VERSION-linux-x86_64
59
+ sha256sum --check SHA256SUMS
60
+ install -m 755 overcrow-widget-*-linux-x86_64 ~/.local/bin/overcrow-widget
61
+ ```
62
+
63
+ The tool also builds from the
64
+ [public repository](https://github.com/Valhallab/playervox-overcrow-releases)
65
+ with Rust; the repository pins the toolchain it needs. The program is then
66
+ `target/dist/overcrow-widget`.
67
+
68
+ ```sh
69
+ cargo build -p overcrow-widget-cli --profile dist --locked
70
+ ```
71
+
72
+ ### The SDK types
73
+
74
+ `check` type-checks your logic with the project's own TypeScript, when
75
+ Node.js 22 or later and `node_modules/typescript` are there; otherwise it
76
+ warns that types were not checked (`typecheck.skipped`) and goes on. The
77
+ SDK itself is inside the tool, so packaging never depends on
78
+ `node_modules`.
79
+
80
+ `@overcrow/sdk` is on [npm](https://www.npmjs.com/package/@overcrow/sdk).
81
+ The `package.json` of a project made by `init` names TypeScript and the SDK
82
+ version the tool embeds: run `npm install` in the project. In another
83
+ project, install the SDK with:
84
+
85
+ ```sh
86
+ npm install --save-dev --save-exact @overcrow/sdk@1.0.0
87
+ ```
88
+
89
+ Keep the version the tool embeds (`overcrow-widget --version`).
90
+ `overcrow-widget doctor` reports a missing TypeScript, and an SDK in
91
+ `node_modules` whose version differs from the one the tool embeds.
92
+
93
+ ## Files of a project
94
+
95
+ | File | Role | Packaged |
96
+ | --- | --- | --- |
97
+ | `manifest.json` | [The manifest](manifest.md), packaged as written. | yes |
98
+ | `view.ocml` | [The view](view.md), compiled to `view.json`. | compiled |
99
+ | `style.ocss` | [The style](style.md); optional. | yes |
100
+ | `logic.ts` or `logic.js` | [The logic](logic.md), one module; bundled with the SDK into `logic.js`. | bundled |
101
+ | `locales/en.json`, `locales/fr.json` | [Messages](logic.md#messages); both or neither, with the same keys. | yes |
102
+ | `LICENSE` | The license text of the package. The templates start with MIT; choose your own. | yes |
103
+ | `assets/` | PNG, JPEG or WebP images; optional. Hidden files (`.DS_Store`) and what the creator tools never send (`dist/`…) are skipped, as in [source archives](#source-archives). | yes |
104
+ | `package.json`, `tsconfig.json` | Tooling only: TypeScript and the SDK types. | no |
105
+ | `listing.json` | The marketplace text of a [submission](publishing.md#the-listing); read by `admit`. In the creator space, where the listing is edited, only a proposal to import. | no |
106
+ | `tests/` | [Scenarios](testing.md#scenarios) (`tests/<name>.scenario.json`), their reference images (`tests/reference/`) and your unit tests. `tests/output/` holds the images of failed runs. | no |
107
+
108
+ ## init
109
+
110
+ ```sh
111
+ overcrow-widget init my-widget --template list --id nova.my-widget --name "My widget"
112
+ ```
113
+
114
+ Writes a new project into the directory, which must not exist or must be
115
+ empty: `init` never overwrites a file.
116
+
117
+ | Template | Shows |
118
+ | --- | --- |
119
+ | `blank` (default) | A title from the locales and an empty state. |
120
+ | `counter` | A value and two buttons whose handlers the logic exports. |
121
+ | `list` | A keyed checklist: `for`, handlers with arguments, `t()` with parameters. |
122
+ | `chart` | A live chart updated by a timer. |
123
+
124
+ Pass `--id` with your widget's ID: `<handle>.<name>`, your publisher handle
125
+ in the OverCrow creator space and a name (`nova.lol-timers`), or a reverse
126
+ domain you verified and a name (`gg.nova.lol-timers`); see
127
+ [the manifest](manifest.md#identity-and-version). Without `--id`, the ID is
128
+ `yourhandle.<dir>`: replace `yourhandle` before you submit, as `admit`
129
+ refuses it. `com.playervox.*` is reserved. Every template
130
+ comes with a test scenario, `tests/example.scenario.json`, and `counter`,
131
+ `list` and `chart` with its reference images.
132
+
133
+ ## check
134
+
135
+ ```sh
136
+ overcrow-widget check
137
+ overcrow-widget check --deny-warnings --format json
138
+ ```
139
+
140
+ Runs every check, in this order, and writes nothing:
141
+
142
+ 1. **Project files**: the required files are there and within their size
143
+ bounds, one logic module, both locale files or neither.
144
+ 2. **Manifest**: OverCrow's own manifest validator.
145
+ 3. **View**: `view.ocml` is compiled and the result validated; static
146
+ images must exist in `assets/`.
147
+ 4. **Style**: `style.ocss` is parsed with OverCrow's parser.
148
+ 5. **Locales**: objects of strings with valid keys, the same keys in both
149
+ files. A `t("key")` of the view whose key has no message is a warning.
150
+ 6. **Logic**: the [lint](logic.md#what-the-logic-cannot-use), and the
151
+ exports the view calls.
152
+ 7. **Types**: the project's `tsc --noEmit -p tsconfig.json`.
153
+ 8. **Package**: `logic.js` is built, the package is written in memory and
154
+ read back exactly as OverCrow will read it.
155
+
156
+ Options: `--no-typecheck`, `--deny-warnings` (a warning fails the command),
157
+ `--format json`.
158
+
159
+ ## package
160
+
161
+ ```sh
162
+ overcrow-widget package
163
+ overcrow-widget package --out build/my-widget.ocpkg
164
+ ```
165
+
166
+ Runs `check`, then writes the package to `dist/<id>-<version>.ocpkg`, or to
167
+ `--out`. It prints the path, the size and the SHA-256 of the archive.
168
+
169
+ With `--source-map FILE`, it also writes [the code map](#the-code-map) of
170
+ `logic.js` to that file. The map never goes into the package: the package
171
+ is the same with or without it.
172
+
173
+ Packaging is deterministic: the same sources and the same version of the
174
+ tool give the same bytes on every run and every system. What the package
175
+ holds is described in [the package](package.md).
176
+
177
+ ## inspect
178
+
179
+ ```sh
180
+ overcrow-widget inspect dist/nova.my-widget-0.1.0.ocpkg
181
+ ```
182
+
183
+ Validates a package as OverCrow does, then shows it as a reviewer sees it:
184
+ the ID, version and names; the size and SHA-256 of the archive; the SDK
185
+ version its `logic.js` contains; each permission in words (network routes
186
+ with their parameter constraints and declared response bound, storage,
187
+ clipboard, game events); each capability with its summary and whether it is
188
+ sensitive or needs an account; the number of menu rows; and every file with
189
+ its size and SHA-256. A package that OverCrow would refuse is reported
190
+ instead, with the reason.
191
+
192
+ ## dev
193
+
194
+ ```sh
195
+ overcrow-widget dev
196
+ ```
197
+
198
+ Runs the widget in the OverCrow overlay running on your machine, while you
199
+ edit it:
200
+
201
+ 1. it connects to the overlay, which must have been started with
202
+ development installs allowed;
203
+ 2. it builds the package as `package` does and sends it to the overlay,
204
+ which validates it in full and shows it marked
205
+ **Unverified · development package**, with the permissions of its
206
+ manifest granted for the session only;
207
+ 3. it watches the project's files and, 200 ms after the last change,
208
+ rebuilds and reloads the widget. A build with errors is not sent: the
209
+ widget keeps running its last good build;
210
+ 4. it prints what the overlay reports: the widget's states (`starting`,
211
+ `running`, `restarting` with the failure, `failed`…) and the `log.*`
212
+ output of its logic;
213
+ 5. on **Ctrl+C**, it removes the widget from the overlay.
214
+
215
+ Options: `--no-typecheck`, `--format json` (one JSON object per line).
216
+ Exit status: 0 after Ctrl+C, 1 when the overlay ends the session, 2 when no
217
+ overlay is reachable. [The development channel](dev-channel.md) says how to
218
+ start OverCrow for it, and what each state and refusal means.
219
+
220
+ ## test
221
+
222
+ ```sh
223
+ overcrow-widget test
224
+ overcrow-widget test --scenario example
225
+ overcrow-widget test --update
226
+ ```
227
+
228
+ Plays the scenarios of `tests/` in OverCrow's headless runtime and compares
229
+ the images it renders with the references:
230
+
231
+ 1. it builds the package as `package` does;
232
+ 2. it reads every `tests/<name>.scenario.json` and checks it against the
233
+ manifest before anything runs; a mistake in a scenario is a
234
+ `test.scenario` diagnostic in its file;
235
+ 3. it runs each scenario in the [headless runtime](testing.md#the-headless-runtime)
236
+ this tool pins, or the one given by `--runtime`, and prints the
237
+ runtime's version and SHA-256. The first time, it downloads the pinned
238
+ runtime;
239
+ 4. it compares each captured image with
240
+ `tests/reference/<name>/<image>.png`. A difference, a size change or a
241
+ missing reference fails the scenario and writes
242
+ `tests/output/<name>/<image>.actual.png` and, for a difference,
243
+ `<image>.diff.png`.
244
+
245
+ Options: `--runtime <path>` (another `overcrow-widget-headless` program),
246
+ `--offline` (never download the runtime), `--scenario <name>` (only that one), `--update` (records the captured
247
+ images as the references: review them before you commit them),
248
+ `--format json`, `--no-typecheck`.
249
+
250
+ Exit status: 0 when every scenario passed, 1 when one failed, 2 when no
251
+ runtime can run. Scenarios are described in
252
+ [testing a widget](testing.md).
253
+
254
+ ## doctor
255
+
256
+ ```sh
257
+ overcrow-widget doctor
258
+ ```
259
+
260
+ | Line | Checked |
261
+ | --- | --- |
262
+ | `cli`, `sdk` | The version of the tool, its widget API, and the `@overcrow/sdk` it embeds. |
263
+ | `platform` | Operating system and architecture. |
264
+ | `overcrow` | An installed OverCrow. |
265
+ | `development` | A running overlay that allows development installs, and its version. |
266
+ | `node`, `typescript`, `project sdk` | In a widget project: Node.js on `PATH`, `node_modules/typescript`, and the version of `node_modules/@overcrow/sdk`. |
267
+
268
+ | Code | Severity | Meaning |
269
+ | --- | --- | --- |
270
+ | `doctor.overcrow_missing` | warning | OverCrow is not installed. |
271
+ | `doctor.development_off` | warning | No overlay allows development installs; the help gives the commands to restart OverCrow with them. |
272
+ | `doctor.channel_busy` | warning | The overlay already serves its maximum of `dev` sessions. |
273
+ | `doctor.channel_io` | warning | The connection to the overlay failed. |
274
+ | `doctor.channel_untrusted` | error | What answers is not this user's overlay. |
275
+ | `doctor.protocol_version` | error | The overlay and the tool do not speak the same version of the development channel. |
276
+ | `doctor.node_missing`, `doctor.node_version` | warning | No Node.js, or older than 22: `check` cannot type-check. |
277
+ | `doctor.typescript_missing`, `doctor.sdk_missing` | warning | TypeScript or the SDK types are not installed in the project. |
278
+ | `doctor.sdk_version` | warning | `node_modules/@overcrow/sdk` differs from the SDK in the tool. |
279
+
280
+ Options: `--format json`, `--deny-warnings`.
281
+
282
+ ## admit
283
+
284
+ ```sh
285
+ overcrow-widget admit --publisher nova
286
+ overcrow-widget admit lol-timers.zip --publisher nova --previous lol-timers-1.0.0.ocpkg
287
+ overcrow-widget admit --publisher nova --package dist/nova.my-widget-0.1.0.ocpkg
288
+ ```
289
+
290
+ Runs the static admission that the creator space runs on every version you
291
+ send. The sources are the project folder or a ZIP of it, read as the
292
+ creator space receives them ([source archives](#source-archives)). It
293
+ never runs your code or `tsc`:
294
+
295
+ 1. the sources are built as `package` builds them;
296
+ 2. with `--package`, that archive's compiled view must be byte for byte
297
+ what `view.ocml` compiles to;
298
+ 3. the ID belongs to the publisher given by `--publisher` (its
299
+ `<handle>.<name>` IDs, and with `--domain`, the IDs under a domain it
300
+ verified); without `--publisher`, it is neither reserved, nor an example
301
+ ID (`nova.*`, `yourhandle.*`, `gg.nova.*`, `com.example.*`…), nor under a
302
+ handle nobody can register (`admin.*`, `com.*`). `listing.json` is
303
+ valid, its preview is a packaged PNG of at most 256 KiB;
304
+ 4. the authority the widget asks for is listed for the reviewer:
305
+ capabilities (the sensitive ones marked), network routes with their
306
+ response bound, clipboard writes, storage and game events;
307
+ 5. with `--previous`, the last approved version (its `manifest.json`, its
308
+ package, its folder or its ZIP): the ID must be the same and the version
309
+ higher, and the report lists the
310
+ [permission keys](#permission-keys) added, widened and removed, and the
311
+ review the version needs.
312
+
313
+ | Code | Severity | Meaning |
314
+ | --- | --- | --- |
315
+ | `admission.reserved_id` | error | A `com.playervox.*` ID, reserved for PlayerVox; without `--publisher`, also an ID under a reserved handle (`playervox.*`, `admin.*`…). |
316
+ | `admission.placeholder_id` | error | An example ID, without `--publisher`. |
317
+ | `admission.id_not_owned` | error | The ID does not belong to the publisher, or, without `--publisher`, cannot belong to any. |
318
+ | `admission.listing_missing`, `admission.listing` | error | No `listing.json`, or one that breaks the listing's rules (a warning with `--listing optional`). |
319
+ | `admission.preview` | error | `preview` does not name a packaged PNG within bounds (a warning with `--listing optional`). |
320
+ | `admission.license` | error | A PlayerVox widget whose license is not MIT (a warning with `--listing optional`). |
321
+ | `admission.view_not_reproducible` | error | The submitted compiled view differs from what `view.ocml` compiles to. |
322
+ | `admission.previous` | error | The previous version cannot be read. |
323
+ | `admission.previous_mismatch` | error | The previous version is another widget. |
324
+ | `admission.version_not_newer` | error | The version is not above the previous one. |
325
+ | `admission.package_rebuilt` | warning | The submitted archive differs from the rebuild in other files. |
326
+ | `admission.not_rebuilt` | warning | An archive was admitted without its sources. |
327
+
328
+ Options: `--publisher HANDLE`, `--domain DOMAIN` (repeatable), `--previous
329
+ FILE`, `--package FILE`, `--source-map FILE` ([the code map](#the-code-map),
330
+ written when the sources are admitted), `--out DIR` (writes the admitted
331
+ package, its listing and a report into an empty directory), `--format
332
+ json`, `--deny-warnings`. `admit <file.ocpkg> --listing FILE` checks an
333
+ archive without its sources.
334
+
335
+ `--listing required|optional` is for sources. `required`, the default,
336
+ refuses sources without a valid `listing.json`. `optional` is the creator
337
+ space's way: the listing is edited there, so `listing.json` may be absent,
338
+ and one with a problem is left out (no listing in the report or in
339
+ `--out`) with warnings instead of refusing the sources. Exit status: 0 admitted, 1 refused, 2 on a
340
+ usage or file error. See [publishing and review](publishing.md).
341
+
342
+ ### Permission keys
343
+
344
+ Each permission has a stable key, the same in the creator space:
345
+
346
+ | Key | Permission |
347
+ | --- | --- |
348
+ | `network:GET https://api.nova.gg/v1/timers` | A network route: method, origin and path. |
349
+ | `storage` | Storage. |
350
+ | `clipboardWrite` | Clipboard writes. |
351
+ | `capability:<name>` | A capability. |
352
+ | `gameEvent:<name>` | A game event. |
353
+
354
+ A key is *added* when the previous version did not have it, *widened* when
355
+ its route stays but its rule changes (path or query constraints, response
356
+ bound), and *removed* when it goes. An added or widened key calls for a
357
+ **full** review; otherwise the review is **quick**.
358
+
359
+ ## diff
360
+
361
+ ```sh
362
+ overcrow-widget diff lol-timers-1.0.0.zip .
363
+ overcrow-widget diff old/ new/ --format json
364
+ ```
365
+
366
+ Shows what changed between two versions of a widget's sources, each a
367
+ folder or a ZIP, read as `admit` reads them: the files the creator space
368
+ receives. Files are sorted by path; each added, modified or removed file
369
+ comes with its unified changes (three lines of context) and its added and
370
+ removed line counts. A file that is not UTF-8 text is binary: only its
371
+ SHA-256 is compared. So is a text above 1 MiB or 20,000 lines, or once
372
+ 200,000 lines were compared in one diff (`tooLarge`). When both versions have a valid manifest, the
373
+ [permission keys](#permission-keys) the new version adds, widens and
374
+ removes are listed, with the review it needs.
375
+
376
+ Option: `--format json`. Exit status: 0 when both versions were read,
377
+ whether or not they differ; 1 when one is refused; 2 on a usage or file
378
+ error (a version missing or unreadable).
379
+
380
+ ## submit
381
+
382
+ ```sh
383
+ overcrow-widget submit --dry-run --submission submission.json
384
+ overcrow-widget submit --submission submission.json
385
+ ```
386
+
387
+ Sends a version of your widget to the OverCrow creator space, from a
388
+ terminal, a CI job or the OverCrow MCP server, then follows its checks. It
389
+ never asks a question: what is missing is said, with a stable
390
+ [exit status](#exit-status). It takes the widget folder (the current one
391
+ without argument) or a ZIP of it.
392
+
393
+ ### The publish key
394
+
395
+ - Create it in the creator space (Publisher, Publish keys). A key can only
396
+ submit versions of one widget, for 1 to 365 days (90 by default), and is
397
+ shown once.
398
+ - `submit` and `status` read it from the environment variable
399
+ `OVERCROW_PUBLISH_KEY`, and only there: never from an argument or a file
400
+ of the project. In a CI, keep it as a secret.
401
+ - The tool never shows it: any `ocw_pub_…` text is masked in its output,
402
+ its errors and its logs. Whatever the command, it removes the variable
403
+ from the environment of the programs it starts (TypeScript, the runtime).
404
+ - A key that expires within 14 days gives a warning. An expired or revoked
405
+ key ends with status 2: create a new one and replace the secret.
406
+ - Every request names the widget of the sources' `manifest.json` (header
407
+ `Overcrow-Widget`). A key that covers several widgets of its publisher
408
+ (reserved to PlayerVox for now) submits the one named; `status` then
409
+ takes `--widget`.
410
+
411
+ ### What it does
412
+
413
+ 1. It checks the key, and reads what the creator space needs for this
414
+ widget: the last approved version, the lowest version it takes now, the
415
+ submissions left (20 over 24 hours), whether the listing has a privacy
416
+ policy.
417
+ 2. It checks exactly what it will send. The folder is zipped as the
418
+ creator space reads it ([source archives](#source-archives)), read back
419
+ and admitted as the creator space admits it, `listing.json` being
420
+ optional; a ZIP given instead is sent byte for byte. The manifest ID
421
+ must be the key's widget and the version above the last approved one.
422
+ Each permission the version adds or widens (each permission, for a first
423
+ version) needs a justification, by its [key](#permission-keys). The
424
+ texts must follow the creator space's rules. If anything is wrong,
425
+ nothing is sent (status 1).
426
+ 3. It sends the archive, then follows the six checks of the creator space,
427
+ about a minute: manifest, version number, code analysis, package build,
428
+ permissions, size and resources.
429
+ 4. It ends when the version enters review (status 0), when a check fails
430
+ (status 1: each problem is shown on the line of your file), or when the
431
+ version passed its checks but waits in the creator space for what only
432
+ the creator space takes (status 3): a privacy policy when the widget
433
+ uses the network, a complete listing for a first version, or the review
434
+ slot of a new publisher. The link to finish there is shown.
435
+
436
+ ### A version the creator space already has
437
+
438
+ Before checking anything else, `submit` looks for a version of the same
439
+ number in the creator space. When it has the same sources (byte for byte,
440
+ as `submit` zips them) or, once admitted, the same package, nothing is
441
+ sent: the run ends on that version's state, with `outcome`
442
+ `already_known`.
443
+
444
+ - Status 0: it is published, approved, in review, or waits for your answer
445
+ to requested changes.
446
+ - Status 3: it waits in the creator space (the link to finish is shown).
447
+ - Status 1: it failed its checks, was refused, withdrawn or discarded:
448
+ raise the version in `manifest.json` to send other sources.
449
+ - A version still being checked is followed, as after a submission.
450
+
451
+ The same number with another package is refused before sending
452
+ (`submit.version_known_differs`): raise the version in `manifest.json`.
453
+ A CI job can therefore run `submit` on every push: a version already sent
454
+ changes nothing.
455
+
456
+ Ctrl+C while the checks run stops following them; they go on in the
457
+ creator space, and `overcrow-widget status --version 1.3.1 --wait` follows
458
+ them again (status 4). A run cut short before the end (network, Ctrl+C)
459
+ resumes the same submission when you run the same command again; changed
460
+ sources or texts make a new submission. A submission not finished within
461
+ an hour expires, and every submission counts in the daily limit.
462
+
463
+ | Option | Effect |
464
+ | --- | --- |
465
+ | `--submission FILE` | The texts of the version ([below](#the-texts-file)). |
466
+ | `--release-notes-en TEXT`, `--release-notes-fr TEXT`, `--review-message TEXT` | Replace those of the file. |
467
+ | `--dry-run` | Steps 1 and 2 only, nothing sent: what the creator space will ask for (justifications, privacy policy, review type, lowest version, submissions left) and the archive's SHA-256. For a first version, the creator space also checks the whole listing, which only it knows: a dry run that ends with 0 may still end with 3. |
468
+ | `--expect-sha256 HEX` | Sends only an archive with this SHA-256, the `archive.sha256` of a `--dry-run`: what is sent is what was checked. |
469
+ | `--no-wait` | Ends after the upload (status 4). |
470
+ | `--format json` | One JSON object ([machine-readable output](#machine-readable-output)). |
471
+ | `--verbose` | One line per request on the error output: method, address without its query, status and time; never a header, a key or a body. |
472
+
473
+ ### The texts file
474
+
475
+ <!-- source: docs/content/examples/weather/submission.json -->
476
+ ```json
477
+ {
478
+ "releaseNotes": {
479
+ "en": "First version: the forecast of your city, in metric or imperial units.",
480
+ "fr": "Première version : les prévisions de votre ville, en unités métriques ou impériales."
481
+ },
482
+ "justifications": [
483
+ {
484
+ "permission": "network:GET https://api.example.com/v1/forecast/{city}",
485
+ "text": "Reads the forecast of the city the player chose, every 30 minutes at most."
486
+ },
487
+ {
488
+ "permission": "storage",
489
+ "text": "Keeps the chosen city and units between two games."
490
+ }
491
+ ],
492
+ "reviewMessage": "The forecast API needs no account and receives only the city."
493
+ }
494
+ ```
495
+
496
+ | Key | Value |
497
+ | --- | --- |
498
+ | `releaseNotes` | The public notes of the version, shown to players: `en` (needed as soon as there are notes) and `fr`, 500 characters each, plain text, line breaks allowed. |
499
+ | `justifications` | For the reviewer, one `{permission, text}` per new or widened permission, by its [key](#permission-keys); 500 characters each. |
500
+ | `reviewMessage` | A private message to the reviewer, 2,000 characters. |
501
+
502
+ Every key is optional; any other key is refused. The OverCrow MCP server
503
+ writes this file.
504
+
505
+ ### In a CI job
506
+
507
+ A GitHub Actions workflow that installs the tool ([installing](#installing))
508
+ and submits the example widget `nova.weather` on every version tag, with
509
+ the key in the repository's secrets:
510
+
511
+ <!-- source: docs/content/examples/weather/.github/workflows/submit.yml -->
512
+ ```yaml
513
+ # Sends the widget to the OverCrow creator space when a version tag is
514
+ # pushed. The publish key is a secret of the repository, and the OverCrow
515
+ # release whose creator tools to use is a variable of the repository.
516
+ name: Submit to OverCrow
517
+
518
+ on:
519
+ push:
520
+ tags: ["v*"]
521
+
522
+ permissions:
523
+ contents: read
524
+
525
+ jobs:
526
+ submit:
527
+ runs-on: ubuntu-24.04
528
+ env:
529
+ OVERCROW_VERSION: ${{ vars.OVERCROW_VERSION }}
530
+ steps:
531
+ - uses: actions/checkout@v4
532
+ - name: Install overcrow-widget
533
+ run: |
534
+ tools="overcrow-creator-tools-$OVERCROW_VERSION-linux-x86_64"
535
+ curl --fail --location --silent --show-error --remote-name \
536
+ "https://github.com/Valhallab/playervox-overcrow-releases/releases/download/v$OVERCROW_VERSION/$tools.zip"
537
+ unzip -q "$tools.zip"
538
+ (cd "$tools" && sha256sum --check --quiet SHA256SUMS)
539
+ install -D -m 755 "$tools"/overcrow-widget-*-linux-x86_64 "$HOME/.local/bin/overcrow-widget"
540
+ echo "$HOME/.local/bin" >> "$GITHUB_PATH"
541
+ - name: Submit to OverCrow
542
+ run: overcrow-widget submit --submission submission.json
543
+ env:
544
+ OVERCROW_PUBLISH_KEY: ${{ secrets.OVERCROW_PUBLISH_KEY }}
545
+ ```
546
+
547
+ The job fails on any status but 0. `OVERCROW_API_URL` points `submit`
548
+ and `status` to another API, for tests only: `https://`, or `http://` to
549
+ `127.0.0.1`, `localhost` or `[::1]`, with a warning every time. Never set
550
+ it in a real job; the OverCrow MCP server never sets it.
551
+
552
+ ## status
553
+
554
+ ```sh
555
+ overcrow-widget status
556
+ overcrow-widget status --version 1.3.1 --wait
557
+ ```
558
+
559
+ Shows the versions of the key's widget, with their state and review type.
560
+ With `--version`, one version, by its number (the latest of that number)
561
+ or its ID: its six checks and their problems, what keeps it out of review,
562
+ the reviewer's remarks and the review delay. `--wait` follows a version
563
+ still being checked. `--widget ID` names the widget, for a key that covers
564
+ several (status 2 without it, with the widgets the key covers). Options:
565
+ `--widget ID`, `--version VERSION|ID`, `--wait`, `--format json`,
566
+ `--verbose`. Status: 0 when read, 2 on an error; with `--wait`, the
567
+ statuses of `submit`.
568
+
569
+ | State | Meaning |
570
+ | --- | --- |
571
+ | `checking` | The checks run. |
572
+ | `checks_failed` | A check failed: nothing reached the reviewers. |
573
+ | `ready` | The checks passed; the version waits in the creator space. |
574
+ | `in_review` | A person reviews it. |
575
+ | `changes_requested`, `approved`, `rejected` | The review's decision. |
576
+ | `published` | In the catalog. |
577
+ | `superseded`, `discarded` | Replaced by a newer submission, or abandoned. |
578
+ | `withdrawn`, `suspended` | Out of the catalog. |
579
+
580
+ ## Source archives
581
+
582
+ `admit` and `diff` take the widget folder or a ZIP of it (its name ends in
583
+ `.zip`), as the creator space receives it. The ZIP may hold the files
584
+ directly, or one folder that holds them all, as Windows and macOS make it.
585
+ It may carry a short archive comment (1,024 bytes at most), as GitHub's
586
+ "Download ZIP" and `git archive` write it; the comment is never read.
587
+
588
+ Left out of both, and never sent by the creator tools: hidden files and
589
+ folders (`.env`, `.git/`, `assets/.DS_Store`…), `node_modules/`, `dist/`,
590
+ `tests/output/`, `__MACOSX/`, built packages, key files and system files,
591
+ and, in a folder, links and names that are not portable ASCII. In a ZIP,
592
+ they still count toward the bounds below and are checked like the rest. A
593
+ name that holds a character Windows forbids (`\ : * ? " < > |`) is
594
+ refused, in a folder too.
595
+
596
+ | Bound | Value |
597
+ | --- | --- |
598
+ | Archive | 32 MiB |
599
+ | Uncompressed | 64 MiB |
600
+ | Files | 2,000 |
601
+
602
+ Everything is checked before a byte is written: a refused archive writes
603
+ nothing, and an admitted one is written only into a private work folder,
604
+ removed at the end.
605
+
606
+ | Code | The archive holds |
607
+ | --- | --- |
608
+ | `sources.archive_size` | More than 32 MiB. |
609
+ | `sources.too_large`, `sources.too_many_files` | More than 64 MiB or 2,000 files once uncompressed. |
610
+ | `sources.unsafe_name` | A name that could leave the widget folder (`../`, `/` first), or that some system cannot use: a character Windows forbids (`\`, `:`, `*`, `?`, `"`, `<`, `>`, \|), anything but printable ASCII, a final dot or space, `CON`, `NUL`, `COM1`… The message names the character and the file. |
611
+ | `sources.backslash` | Folders separated by `\`, as Windows PowerShell 5.1 `Compress-Archive` writes them. Send the widget folder itself in the creator space, or use [`submit`](#submit), which makes a correct ZIP. |
612
+ | `sources.duplicate_name` | Two names that differ only by case, or a file that is also a folder. |
613
+ | `sources.link`, `sources.special_file` | A link, or a device, a FIFO or a socket. |
614
+ | `sources.bomb` | An entry that inflates far beyond its compressed size, or beyond its declared size. |
615
+ | `sources.read` | The file cannot be read (exit status 2). |
616
+ | `sources.encrypted` | An encrypted entry. |
617
+ | `sources.zip64` | ZIP64, which sources never need. |
618
+ | `sources.archive` | Anything else a ZIP should not hold: a comment above 1,024 bytes or holding an end record, bytes before, between or after the entries or after an entry's compressed data, another name in an extra field, sizes or checksums that disagree. |
619
+
620
+ ## The code map
621
+
622
+ `--source-map FILE` writes a map from each position of the shipped
623
+ `logic.js`, bundled and minified, back to the file, line and column of
624
+ your sources: a [Source Map v3](https://tc39.es/ecma426/). The creator
625
+ space keeps it private and uses it to show you the errors of your widget
626
+ in your own code.
627
+
628
+ - `sources`: `logic.ts` (or `logic.js`), the files of `@overcrow/sdk`
629
+ (listed in `ignoreList`) and `overcrow:view-table`, the expression table
630
+ generated from `view.ocml`, whose text is in `sourcesContent`.
631
+ - `x_overcrow_functions`: the named functions of the sources,
632
+ `{"source", "name", "start": [line, column], "end": [line, column]}`,
633
+ zero-based, columns in UTF-16 units like `mappings`. The function of a
634
+ position is the innermost one around it. The expressions of the view
635
+ table are named `view expression <n>`, `<n>` being their index in
636
+ `view.json`.
637
+
638
+ The same sources always give the same map. It is never part of the
639
+ package, and `logic.js` does not point to it.
640
+
641
+ ## Diagnostics
642
+
643
+ Every problem is one diagnostic, with a stable code, a position and, when
644
+ there is one, a suggestion:
645
+
646
+ ```text
647
+ error[view.unknown_attribute]: `clas` is not an attribute of <text>
648
+ --> view.ocml:4:9
649
+ |
650
+ 4 | <text clas="value">{state.count}</text>
651
+ | ^
652
+ = help: did you mean `class`?
653
+ check: 1 error(s), 0 warning(s)
654
+ ```
655
+
656
+ The code is `<domain>.<category>`:
657
+
658
+ | Domain | From | Codes |
659
+ | --- | --- | --- |
660
+ | `project` | The files of the project | `missing_file`, `file_size`, `encoding`, `ambiguous_logic`, `asset_path`, `entry_limit`, `read` |
661
+ | `manifest` | `manifest.json` | see [the manifest](manifest.md#how-the-manifest-is-checked) |
662
+ | `view` | `view.ocml` | see [the view](view.md#when-the-view-is-wrong) |
663
+ | `style` | `style.ocss` | see [the style](style.md#when-the-style-is-wrong) |
664
+ | `locales` | `locales/*.json` | `missing_file`, `json`, `shape`, `key`, `value`, `keys`, `entry_limit`, `unknown_key` |
665
+ | `logic` | `logic.ts` | see [the logic](logic.md#what-the-logic-cannot-use) |
666
+ | `typecheck` | TypeScript | `tsc` (TypeScript's own message), `skipped`, `sdk_version`, `timeout` |
667
+ | `package` | The package read back | `archive_size`, `file_size` and the categories of OverCrow's package reader |
668
+ | `test` | Scenarios | `scenario`, `scenario_name`, `too_many_scenarios` |
669
+ | `sources` | A source archive | see [source archives](#source-archives) |
670
+ | `init`, `doctor`, `admission` | Those commands | listed above |
671
+ | `submit` | What `submit` checks before sending | `widget_not_submittable`, `agreement_required`, `limit_reached`, `version_too_low`, `justification_missing`, `archive_too_large`, `archive_mismatch`, `release_notes`, `justification`, `review_message` |
672
+
673
+ - Lines and columns start at 1; a column counts characters, not bytes.
674
+ - An unknown name comes with the closest name that exists.
675
+ - With `--format json`, each diagnostic is one JSON object on a line of the
676
+ standard output:
677
+ `{"severity","code","file","line","column","message","help"}`, with
678
+ `null` for what is unknown. `package --format json` ends with one
679
+ `{"package","bytes","sha256","logicBytes","sourceMap"}` object; `admit`
680
+ and `diff` print one report ([machine-readable output](#machine-readable-output)).
681
+ - Texts that come from a widget (its logs, its names) are shown with
682
+ terminal control characters neutralized.
683
+
684
+ Scripts should match the codes: messages and help texts may be reworded.
685
+
686
+ ## Machine-readable output
687
+
688
+ With `--format json`, `admit`, `diff`, `submit` and `status` print one
689
+ JSON object on one line. Fields are only ever added; a `formatVersion`
690
+ change announces any other change.
691
+
692
+ `admit`:
693
+
694
+ | Field | Value |
695
+ | --- | --- |
696
+ | `formatVersion` | `1`. |
697
+ | `admitted` | Whether the sources are admitted. |
698
+ | `publisher` | The `--publisher` handle, or `third-party`. |
699
+ | `id`, `version`, `reservedId` | The widget; `null` when the sources were refused before the build. |
700
+ | `package` | `bytes`, `sha256` and each file's `bytes` and `sha256`. |
701
+ | `reproducible` | `viewJson` and `archive`, compared with `--package`, else `null`. |
702
+ | `listing` | `bytes`, `sha256`, `spdxLicense` and `preview` of `listing.json`. |
703
+ | `sources` | `kind` (`folder` or `archive`), `files`, `bytes`, `ignored` (`path`, `reason`) and, for a ZIP, `sha256` and `prefix` (the wrapping folder). |
704
+ | `review` | The authority to review, one object per item (`kind`, then its fields). |
705
+ | `permissions` | `keys`; with `--previous`, also `previous` (`id`, `version`), `added`, `changed`, `removed` and `reviewType` (`full` or `quick`), else `null`. |
706
+ | `listingPolicy` | `required` or `optional` (`--listing`). |
707
+ | `diagnostics` | The diagnostics, as above. |
708
+
709
+ `diff`:
710
+
711
+ | Field | Value |
712
+ | --- | --- |
713
+ | `formatVersion` | `1`. |
714
+ | `compared` | `false` when a version is refused; then only `diagnostics` follows. |
715
+ | `old`, `new` | `kind`, `files`, `bytes`, `sha256`, `prefix`, `ignored`, `id` and `version` of each version. |
716
+ | `files` | Changed files by path: `path`, `status` (`added`, `modified`, `removed`), `binary`, `tooLarge`, `oldSha256`, `newSha256`, `additions`, `deletions` and `hunks` (`oldStart`, `oldLines`, `newStart`, `newLines`, `lines`, each line starting with ` `, `-`, `+` or `\`). |
717
+ | `totals` | `added`, `modified`, `removed`, `additions`, `deletions`. |
718
+ | `permissions` | `added`, `changed`, `removed` and `reviewType`, or `null` without two valid manifests. |
719
+ | `diagnostics` | The diagnostics. |
720
+
721
+
722
+ `submit` and `status`:
723
+
724
+ | Field | Value |
725
+ | --- | --- |
726
+ | `formatVersion`, `command` | `1`; `submit` or `status`. |
727
+ | `outcome`, `exitCode` | How the run ended (below) and its [exit status](#exit-status). |
728
+ | `dryRun` | `submit`: whether nothing was to be sent. |
729
+ | `key` | `name`, `hint` (the four characters after `ocw_pub_`), `expiresAt`, `expiresSoon`, `widgets` (the widgets the key covers). |
730
+ | `widget` | `id`; `submit`: `publisher`, `status`; `status`: `name`. |
731
+ | `archive` | `submit`: `kind` (`folder`, zipped by the tool, or `archive`), `bytes`, `sha256`, `files`, `uncompressedBytes`, `ignored`. |
732
+ | `local` | `submit`: `admitted`, `version`, `minimumVersion`, `previousVersion`, `permissions` (`keys`, `added`, `changed`, `removed`, `reviewType`), `diagnostics`. |
733
+ | `requirements` | `submit`: `justifications` (`required`, `given`, `missing`, `unused`), `privacyPolicy` (`required`, `present`), `reviewType`, `submissions` (`limit`, `remaining`, `nextSubmissionAt`), `review` (`available`, `blockedBy`), `agreement` (`version`, `accepted`), `blockers` (`code`). |
734
+ | `known` | `submit`: the version the creator space already has (nothing was sent): `versionId`, `state`, `match` (`sources` or `package`). |
735
+ | `submission` | `submit`: `id`, `state`, `resumed`, `quota`. |
736
+ | `version` | The creator space's version, its fields in camelCase: `id`, `version`, `state`, `reviewType`, `checks` (`key`, `status`, `diagnostics`), `reviewBlockers`, `completeInPortal` (`message`, `url`), `permissions`, `remarks`, `deadline`, `history`… |
737
+ | `versions` | `status` without `--version`: every version. |
738
+ | `error` | `code`, `message` and, when known, `httpStatus`, `retryAfter`, `nextSubmissionAt`, `minimumVersion`, `expiredAt`, `fields`; else `null`. |
739
+
740
+ `outcome` is `ready_to_send` (`--dry-run`), `refused_locally`, `refused`
741
+ (the creator space refused the submission), `complete_in_portal`,
742
+ `already_known` (nothing sent, see `known`), `error`, or the version's
743
+ state; `status` without `--wait` has none. Error codes
744
+ are the creator space's (`version_not_newer`, `submission_limit_reached`,
745
+ `publish_key_expired`, `publish_key_revoked`, `widget_required`,
746
+ `publish_key_widget_not_covered`…) or the tool's:
747
+ `publish_key_missing`, `invalid_publish_key`, `api_url_invalid`,
748
+ `submission_file`, `sources`, `sources.read`, `network`, `timeout`,
749
+ `server`, `response`, `redirect`, `upload_refused`, `build_failed`,
750
+ `submission_state`, `not_found`, `internal`. Problems found before sending
751
+ are diagnostics: `sources.*`, `project.missing_file` (not the widget's
752
+ folder), `admission.*` and `submit.*` (`widget_not_submittable`,
753
+ `agreement_required`, `limit_reached`, `version_too_low`,
754
+ `justification_missing`, `archive_too_large`, `archive_mismatch`,
755
+ `version_known_differs`, `release_notes`, `justification`,
756
+ `review_message`).
757
+
758
+ ## Exit status
759
+
760
+ | Status | Meaning |
761
+ | --- | --- |
762
+ | 0 | Success. Warnings are allowed unless `--deny-warnings`. `diff` read both versions, whether or not they differ. `submit`: the version is in review (with `--dry-run`, it would enter review), or already past it (approved, published, withdrawn), or the creator space already had it in review, with changes requested, approved or published. |
763
+ | 1 | Errors were found; `admit` refused the sources; `diff` refused a version; a scenario of `test` failed; the overlay ended a `dev` session. `submit`: something to fix (a check before sending, a refusal of the creator space, a failed check, a version the creator space already refused, withdrew or discarded). |
764
+ | 2 | A usage or file error; no overlay for `dev`; no runtime for `test`. `submit`, `status`: the key (missing, invalid, expired, revoked), the network or the server. |
765
+ | 3 | `submit`, `status --wait`: the version passed its checks and waits in the creator space. |
766
+ | 4 | `submit`, `status --wait`: the version is still being checked (Ctrl+C, `--no-wait`, or 15 minutes). |
767
+
768
+ These meanings do not change from one version of the tool to the next.