openalgo-script 0.1.0-alpha.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1210) hide show
  1. package/CHANGELOG.md +1469 -0
  2. package/README.md +85 -30
  3. package/dist/adapters/charts/alerts.d.ts +70 -0
  4. package/dist/adapters/charts/alerts.d.ts.map +1 -0
  5. package/dist/adapters/charts/alerts.js +52 -0
  6. package/dist/adapters/charts/alerts.js.map +1 -0
  7. package/dist/adapters/charts/bars.d.ts +39 -0
  8. package/dist/adapters/charts/bars.d.ts.map +1 -0
  9. package/dist/adapters/charts/bars.js +32 -0
  10. package/dist/adapters/charts/bars.js.map +1 -0
  11. package/dist/adapters/charts/candles.d.ts +40 -0
  12. package/dist/adapters/charts/candles.d.ts.map +1 -0
  13. package/dist/adapters/charts/candles.js +85 -0
  14. package/dist/adapters/charts/candles.js.map +1 -0
  15. package/dist/adapters/charts/colours.d.ts +47 -0
  16. package/dist/adapters/charts/colours.d.ts.map +1 -0
  17. package/dist/adapters/charts/colours.js +80 -0
  18. package/dist/adapters/charts/colours.js.map +1 -0
  19. package/dist/adapters/charts/columns.d.ts +37 -0
  20. package/dist/adapters/charts/columns.d.ts.map +1 -0
  21. package/dist/adapters/charts/columns.js +56 -0
  22. package/dist/adapters/charts/columns.js.map +1 -0
  23. package/dist/adapters/charts/contract.d.ts +278 -0
  24. package/dist/adapters/charts/contract.d.ts.map +1 -0
  25. package/dist/adapters/charts/contract.js +2 -0
  26. package/dist/adapters/charts/contract.js.map +1 -0
  27. package/dist/adapters/charts/descriptor.d.ts +48 -0
  28. package/dist/adapters/charts/descriptor.d.ts.map +1 -0
  29. package/dist/adapters/charts/descriptor.js +111 -0
  30. package/dist/adapters/charts/descriptor.js.map +1 -0
  31. package/dist/adapters/charts/drawings.d.ts +43 -0
  32. package/dist/adapters/charts/drawings.d.ts.map +1 -0
  33. package/dist/adapters/charts/drawings.js +172 -0
  34. package/dist/adapters/charts/drawings.js.map +1 -0
  35. package/dist/adapters/charts/errors.d.ts +28 -0
  36. package/dist/adapters/charts/errors.d.ts.map +1 -0
  37. package/dist/adapters/charts/errors.js +21 -0
  38. package/dist/adapters/charts/errors.js.map +1 -0
  39. package/dist/adapters/charts/fields.d.ts +33 -0
  40. package/dist/adapters/charts/fields.d.ts.map +1 -0
  41. package/dist/adapters/charts/fields.js +51 -0
  42. package/dist/adapters/charts/fields.js.map +1 -0
  43. package/dist/adapters/charts/fills.d.ts +23 -0
  44. package/dist/adapters/charts/fills.d.ts.map +1 -0
  45. package/dist/adapters/charts/fills.js +48 -0
  46. package/dist/adapters/charts/fills.js.map +1 -0
  47. package/dist/adapters/charts/index.d.ts +37 -0
  48. package/dist/adapters/charts/index.d.ts.map +1 -0
  49. package/dist/adapters/charts/index.js +33 -0
  50. package/dist/adapters/charts/index.js.map +1 -0
  51. package/dist/adapters/charts/levels.d.ts +39 -0
  52. package/dist/adapters/charts/levels.d.ts.map +1 -0
  53. package/dist/adapters/charts/levels.js +61 -0
  54. package/dist/adapters/charts/levels.js.map +1 -0
  55. package/dist/adapters/charts/markers.d.ts +41 -0
  56. package/dist/adapters/charts/markers.d.ts.map +1 -0
  57. package/dist/adapters/charts/markers.js +75 -0
  58. package/dist/adapters/charts/markers.js.map +1 -0
  59. package/dist/adapters/charts/paint.d.ts +61 -0
  60. package/dist/adapters/charts/paint.d.ts.map +1 -0
  61. package/dist/adapters/charts/paint.js +47 -0
  62. package/dist/adapters/charts/paint.js.map +1 -0
  63. package/dist/adapters/charts/plots.d.ts +39 -0
  64. package/dist/adapters/charts/plots.d.ts.map +1 -0
  65. package/dist/adapters/charts/plots.js +117 -0
  66. package/dist/adapters/charts/plots.js.map +1 -0
  67. package/dist/adapters/charts/produced.d.ts +57 -0
  68. package/dist/adapters/charts/produced.d.ts.map +1 -0
  69. package/dist/adapters/charts/produced.js +11 -0
  70. package/dist/adapters/charts/produced.js.map +1 -0
  71. package/dist/adapters/charts/requests.d.ts +114 -0
  72. package/dist/adapters/charts/requests.d.ts.map +1 -0
  73. package/dist/adapters/charts/requests.js +277 -0
  74. package/dist/adapters/charts/requests.js.map +1 -0
  75. package/dist/adapters/charts/run.d.ts +147 -0
  76. package/dist/adapters/charts/run.d.ts.map +1 -0
  77. package/dist/adapters/charts/run.js +148 -0
  78. package/dist/adapters/charts/run.js.map +1 -0
  79. package/dist/adapters/charts/settings.d.ts +78 -0
  80. package/dist/adapters/charts/settings.d.ts.map +1 -0
  81. package/dist/adapters/charts/settings.js +225 -0
  82. package/dist/adapters/charts/settings.js.map +1 -0
  83. package/dist/adapters/charts/surfaces.d.ts +221 -0
  84. package/dist/adapters/charts/surfaces.d.ts.map +1 -0
  85. package/dist/adapters/charts/surfaces.js +2 -0
  86. package/dist/adapters/charts/surfaces.js.map +1 -0
  87. package/dist/adapters/charts/tables.d.ts +65 -0
  88. package/dist/adapters/charts/tables.d.ts.map +1 -0
  89. package/dist/adapters/charts/tables.js +166 -0
  90. package/dist/adapters/charts/tables.js.map +1 -0
  91. package/dist/adapters/codemirror/commands.d.ts +14 -0
  92. package/dist/adapters/codemirror/commands.d.ts.map +1 -0
  93. package/dist/adapters/codemirror/commands.js +52 -0
  94. package/dist/adapters/codemirror/commands.js.map +1 -0
  95. package/dist/adapters/codemirror/completion.d.ts +15 -0
  96. package/dist/adapters/codemirror/completion.d.ts.map +1 -0
  97. package/dist/adapters/codemirror/completion.js +64 -0
  98. package/dist/adapters/codemirror/completion.js.map +1 -0
  99. package/dist/adapters/codemirror/contract.d.ts +156 -0
  100. package/dist/adapters/codemirror/contract.d.ts.map +1 -0
  101. package/dist/adapters/codemirror/contract.js +42 -0
  102. package/dist/adapters/codemirror/contract.js.map +1 -0
  103. package/dist/adapters/codemirror/index.d.ts +43 -0
  104. package/dist/adapters/codemirror/index.d.ts.map +1 -0
  105. package/dist/adapters/codemirror/index.js +8 -0
  106. package/dist/adapters/codemirror/index.js.map +1 -0
  107. package/dist/adapters/codemirror/lint.d.ts +17 -0
  108. package/dist/adapters/codemirror/lint.d.ts.map +1 -0
  109. package/dist/adapters/codemirror/lint.js +62 -0
  110. package/dist/adapters/codemirror/lint.js.map +1 -0
  111. package/dist/adapters/codemirror/positions.d.ts +16 -0
  112. package/dist/adapters/codemirror/positions.d.ts.map +1 -0
  113. package/dist/adapters/codemirror/positions.js +65 -0
  114. package/dist/adapters/codemirror/positions.js.map +1 -0
  115. package/dist/adapters/codemirror/stream.d.ts +23 -0
  116. package/dist/adapters/codemirror/stream.d.ts.map +1 -0
  117. package/dist/adapters/codemirror/stream.js +70 -0
  118. package/dist/adapters/codemirror/stream.js.map +1 -0
  119. package/dist/adapters/codemirror/tokens.d.ts +44 -0
  120. package/dist/adapters/codemirror/tokens.d.ts.map +1 -0
  121. package/dist/adapters/codemirror/tokens.js +34 -0
  122. package/dist/adapters/codemirror/tokens.js.map +1 -0
  123. package/dist/adapters/codemirror/tooltips.d.ts +35 -0
  124. package/dist/adapters/codemirror/tooltips.d.ts.map +1 -0
  125. package/dist/adapters/codemirror/tooltips.js +108 -0
  126. package/dist/adapters/codemirror/tooltips.js.map +1 -0
  127. package/dist/core/accounting/charges.d.ts +136 -0
  128. package/dist/core/accounting/charges.d.ts.map +1 -0
  129. package/dist/core/accounting/charges.js +362 -0
  130. package/dist/core/accounting/charges.js.map +1 -0
  131. package/dist/core/accounting/equity.d.ts +158 -0
  132. package/dist/core/accounting/equity.d.ts.map +1 -0
  133. package/dist/core/accounting/equity.js +155 -0
  134. package/dist/core/accounting/equity.js.map +1 -0
  135. package/dist/core/accounting/index.d.ts +44 -0
  136. package/dist/core/accounting/index.d.ts.map +1 -0
  137. package/dist/core/accounting/index.js +36 -0
  138. package/dist/core/accounting/index.js.map +1 -0
  139. package/dist/core/accounting/markers.d.ts +43 -0
  140. package/dist/core/accounting/markers.d.ts.map +1 -0
  141. package/dist/core/accounting/markers.js +64 -0
  142. package/dist/core/accounting/markers.js.map +1 -0
  143. package/dist/core/accounting/monthly.d.ts +52 -0
  144. package/dist/core/accounting/monthly.d.ts.map +1 -0
  145. package/dist/core/accounting/monthly.js +99 -0
  146. package/dist/core/accounting/monthly.js.map +1 -0
  147. package/dist/core/accounting/report.d.ts +38 -0
  148. package/dist/core/accounting/report.d.ts.map +1 -0
  149. package/dist/core/accounting/report.js +63 -0
  150. package/dist/core/accounting/report.js.map +1 -0
  151. package/dist/core/accounting/shapes.d.ts +70 -0
  152. package/dist/core/accounting/shapes.d.ts.map +1 -0
  153. package/dist/core/accounting/shapes.js +21 -0
  154. package/dist/core/accounting/shapes.js.map +1 -0
  155. package/dist/core/accounting/statistics.d.ts +75 -0
  156. package/dist/core/accounting/statistics.d.ts.map +1 -0
  157. package/dist/core/accounting/statistics.js +246 -0
  158. package/dist/core/accounting/statistics.js.map +1 -0
  159. package/dist/core/accounting/trades.d.ts +118 -0
  160. package/dist/core/accounting/trades.d.ts.map +1 -0
  161. package/dist/core/accounting/trades.js +186 -0
  162. package/dist/core/accounting/trades.js.map +1 -0
  163. package/dist/core/backtest/compare.d.ts +38 -0
  164. package/dist/core/backtest/compare.d.ts.map +1 -0
  165. package/dist/core/backtest/compare.js +189 -0
  166. package/dist/core/backtest/compare.js.map +1 -0
  167. package/dist/core/backtest/declaration.d.ts +52 -0
  168. package/dist/core/backtest/declaration.d.ts.map +1 -0
  169. package/dist/core/backtest/declaration.js +48 -0
  170. package/dist/core/backtest/declaration.js.map +1 -0
  171. package/dist/core/backtest/drive.d.ts +29 -0
  172. package/dist/core/backtest/drive.d.ts.map +1 -0
  173. package/dist/core/backtest/drive.js +262 -0
  174. package/dist/core/backtest/drive.js.map +1 -0
  175. package/dist/core/backtest/index.d.ts +46 -0
  176. package/dist/core/backtest/index.d.ts.map +1 -0
  177. package/dist/core/backtest/index.js +36 -0
  178. package/dist/core/backtest/index.js.map +1 -0
  179. package/dist/core/backtest/range.d.ts +84 -0
  180. package/dist/core/backtest/range.d.ts.map +1 -0
  181. package/dist/core/backtest/range.js +90 -0
  182. package/dist/core/backtest/range.js.map +1 -0
  183. package/dist/core/backtest/record.d.ts +238 -0
  184. package/dist/core/backtest/record.d.ts.map +1 -0
  185. package/dist/core/backtest/record.js +176 -0
  186. package/dist/core/backtest/record.js.map +1 -0
  187. package/dist/core/backtest/replay.d.ts +48 -0
  188. package/dist/core/backtest/replay.d.ts.map +1 -0
  189. package/dist/core/backtest/replay.js +127 -0
  190. package/dist/core/backtest/replay.js.map +1 -0
  191. package/dist/core/backtest/resting.d.ts +62 -0
  192. package/dist/core/backtest/resting.d.ts.map +1 -0
  193. package/dist/core/backtest/resting.js +59 -0
  194. package/dist/core/backtest/resting.js.map +1 -0
  195. package/dist/core/backtest/settings.d.ts +117 -0
  196. package/dist/core/backtest/settings.d.ts.map +1 -0
  197. package/dist/core/backtest/settings.js +207 -0
  198. package/dist/core/backtest/settings.js.map +1 -0
  199. package/dist/core/backtest/simulate.d.ts +146 -0
  200. package/dist/core/backtest/simulate.d.ts.map +1 -0
  201. package/dist/core/backtest/simulate.js +217 -0
  202. package/dist/core/backtest/simulate.js.map +1 -0
  203. package/dist/core/catalogue/catalogue.generated.d.ts +164 -10
  204. package/dist/core/catalogue/catalogue.generated.d.ts.map +1 -1
  205. package/dist/core/catalogue/catalogue.generated.js +23 -9
  206. package/dist/core/catalogue/catalogue.generated.js.map +1 -1
  207. package/dist/core/catalogue/values.generated.d.ts +49 -0
  208. package/dist/core/catalogue/values.generated.d.ts.map +1 -1
  209. package/dist/core/check/arguments.d.ts +41 -0
  210. package/dist/core/check/arguments.d.ts.map +1 -0
  211. package/dist/core/check/arguments.js +84 -0
  212. package/dist/core/check/arguments.js.map +1 -0
  213. package/dist/core/check/call-sites.d.ts +22 -0
  214. package/dist/core/check/call-sites.d.ts.map +1 -0
  215. package/dist/core/check/call-sites.js +329 -0
  216. package/dist/core/check/call-sites.js.map +1 -0
  217. package/dist/core/check/call-warmup.d.ts +37 -0
  218. package/dist/core/check/call-warmup.d.ts.map +1 -0
  219. package/dist/core/check/call-warmup.js +97 -0
  220. package/dist/core/check/call-warmup.js.map +1 -0
  221. package/dist/core/check/calls.d.ts +33 -0
  222. package/dist/core/check/calls.d.ts.map +1 -0
  223. package/dist/core/check/calls.js +348 -0
  224. package/dist/core/check/calls.js.map +1 -0
  225. package/dist/core/check/check.d.ts +23 -0
  226. package/dist/core/check/check.d.ts.map +1 -0
  227. package/dist/core/check/check.js +163 -0
  228. package/dist/core/check/check.js.map +1 -0
  229. package/dist/core/check/checked.d.ts +198 -0
  230. package/dist/core/check/checked.d.ts.map +1 -0
  231. package/dist/core/check/checked.js +19 -0
  232. package/dist/core/check/checked.js.map +1 -0
  233. package/dist/core/check/checker.d.ts +182 -0
  234. package/dist/core/check/checker.d.ts.map +1 -0
  235. package/dist/core/check/checker.js +280 -0
  236. package/dist/core/check/checker.js.map +1 -0
  237. package/dist/core/check/conditional.d.ts +35 -0
  238. package/dist/core/check/conditional.d.ts.map +1 -0
  239. package/dist/core/check/conditional.js +100 -0
  240. package/dist/core/check/conditional.js.map +1 -0
  241. package/dist/core/check/constant.d.ts +47 -0
  242. package/dist/core/check/constant.d.ts.map +1 -0
  243. package/dist/core/check/constant.js +101 -0
  244. package/dist/core/check/constant.js.map +1 -0
  245. package/dist/core/check/declaration.d.ts +33 -0
  246. package/dist/core/check/declaration.d.ts.map +1 -0
  247. package/dist/core/check/declaration.js +181 -0
  248. package/dist/core/check/declaration.js.map +1 -0
  249. package/dist/core/check/expressions.d.ts +36 -0
  250. package/dist/core/check/expressions.d.ts.map +1 -0
  251. package/dist/core/check/expressions.js +398 -0
  252. package/dist/core/check/expressions.js.map +1 -0
  253. package/dist/core/check/functions.d.ts +31 -0
  254. package/dist/core/check/functions.d.ts.map +1 -0
  255. package/dist/core/check/functions.js +238 -0
  256. package/dist/core/check/functions.js.map +1 -0
  257. package/dist/core/check/handles.d.ts +48 -0
  258. package/dist/core/check/handles.d.ts.map +1 -0
  259. package/dist/core/check/handles.js +43 -0
  260. package/dist/core/check/handles.js.map +1 -0
  261. package/dist/core/check/index.d.ts +31 -0
  262. package/dist/core/check/index.d.ts.map +1 -0
  263. package/dist/core/check/index.js +26 -0
  264. package/dist/core/check/index.js.map +1 -0
  265. package/dist/core/check/library-bars.d.ts +7 -0
  266. package/dist/core/check/library-bars.d.ts.map +1 -0
  267. package/dist/core/check/library-bars.js +181 -0
  268. package/dist/core/check/library-bars.js.map +1 -0
  269. package/dist/core/check/library-orders.d.ts +5 -0
  270. package/dist/core/check/library-orders.d.ts.map +1 -0
  271. package/dist/core/check/library-orders.js +250 -0
  272. package/dist/core/check/library-orders.js.map +1 -0
  273. package/dist/core/check/library-output.d.ts +7 -0
  274. package/dist/core/check/library-output.d.ts.map +1 -0
  275. package/dist/core/check/library-output.js +195 -0
  276. package/dist/core/check/library-output.js.map +1 -0
  277. package/dist/core/check/library-prose.generated.d.ts +16 -0
  278. package/dist/core/check/library-prose.generated.d.ts.map +1 -0
  279. package/dist/core/check/library-prose.generated.js +353 -0
  280. package/dist/core/check/library-prose.generated.js.map +1 -0
  281. package/dist/core/check/library-series.d.ts +3 -0
  282. package/dist/core/check/library-series.d.ts.map +1 -0
  283. package/dist/core/check/library-series.js +415 -0
  284. package/dist/core/check/library-series.js.map +1 -0
  285. package/dist/core/check/library.d.ts +204 -0
  286. package/dist/core/check/library.d.ts.map +1 -0
  287. package/dist/core/check/library.js +198 -0
  288. package/dist/core/check/library.js.map +1 -0
  289. package/dist/core/check/literals.d.ts +19 -0
  290. package/dist/core/check/literals.d.ts.map +1 -0
  291. package/dist/core/check/literals.js +22 -0
  292. package/dist/core/check/literals.js.map +1 -0
  293. package/dist/core/check/outputs.d.ts +31 -0
  294. package/dist/core/check/outputs.d.ts.map +1 -0
  295. package/dist/core/check/outputs.js +113 -0
  296. package/dist/core/check/outputs.js.map +1 -0
  297. package/dist/core/check/statements.d.ts +25 -0
  298. package/dist/core/check/statements.d.ts.map +1 -0
  299. package/dist/core/check/statements.js +377 -0
  300. package/dist/core/check/statements.js.map +1 -0
  301. package/dist/core/check/suggest.d.ts +25 -0
  302. package/dist/core/check/suggest.d.ts.map +1 -0
  303. package/dist/core/check/suggest.js +61 -0
  304. package/dist/core/check/suggest.js.map +1 -0
  305. package/dist/core/check/surface.d.ts +62 -0
  306. package/dist/core/check/surface.d.ts.map +1 -0
  307. package/dist/core/check/surface.js +129 -0
  308. package/dist/core/check/surface.js.map +1 -0
  309. package/dist/core/check/tags.d.ts +4 -0
  310. package/dist/core/check/tags.d.ts.map +1 -0
  311. package/dist/core/check/tags.js +54 -0
  312. package/dist/core/check/tags.js.map +1 -0
  313. package/dist/core/check/types.d.ts +153 -0
  314. package/dist/core/check/types.d.ts.map +1 -0
  315. package/dist/core/check/types.js +221 -0
  316. package/dist/core/check/types.js.map +1 -0
  317. package/dist/core/check/warmup.d.ts +73 -0
  318. package/dist/core/check/warmup.d.ts.map +1 -0
  319. package/dist/core/check/warmup.js +62 -0
  320. package/dist/core/check/warmup.js.map +1 -0
  321. package/dist/core/diagnostics/collector.d.ts +12 -0
  322. package/dist/core/diagnostics/collector.d.ts.map +1 -1
  323. package/dist/core/diagnostics/collector.js +27 -1
  324. package/dist/core/diagnostics/collector.js.map +1 -1
  325. package/dist/core/emit/calls.d.ts +38 -0
  326. package/dist/core/emit/calls.d.ts.map +1 -0
  327. package/dist/core/emit/calls.js +347 -0
  328. package/dist/core/emit/calls.js.map +1 -0
  329. package/dist/core/emit/canonical.d.ts +39 -0
  330. package/dist/core/emit/canonical.d.ts.map +1 -0
  331. package/dist/core/emit/canonical.js +71 -0
  332. package/dist/core/emit/canonical.js.map +1 -0
  333. package/dist/core/emit/channels.d.ts +28 -0
  334. package/dist/core/emit/channels.d.ts.map +1 -0
  335. package/dist/core/emit/channels.js +110 -0
  336. package/dist/core/emit/channels.js.map +1 -0
  337. package/dist/core/emit/code.d.ts +75 -0
  338. package/dist/core/emit/code.d.ts.map +1 -0
  339. package/dist/core/emit/code.js +104 -0
  340. package/dist/core/emit/code.js.map +1 -0
  341. package/dist/core/emit/colours.d.ts +35 -0
  342. package/dist/core/emit/colours.d.ts.map +1 -0
  343. package/dist/core/emit/colours.js +50 -0
  344. package/dist/core/emit/colours.js.map +1 -0
  345. package/dist/core/emit/context.d.ts +271 -0
  346. package/dist/core/emit/context.d.ts.map +1 -0
  347. package/dist/core/emit/context.js +358 -0
  348. package/dist/core/emit/context.js.map +1 -0
  349. package/dist/core/emit/defaults.d.ts +64 -0
  350. package/dist/core/emit/defaults.d.ts.map +1 -0
  351. package/dist/core/emit/defaults.js +182 -0
  352. package/dist/core/emit/defaults.js.map +1 -0
  353. package/dist/core/emit/emit.d.ts +13 -0
  354. package/dist/core/emit/emit.d.ts.map +1 -0
  355. package/dist/core/emit/emit.js +281 -0
  356. package/dist/core/emit/emit.js.map +1 -0
  357. package/dist/core/emit/events.d.ts +21 -0
  358. package/dist/core/emit/events.d.ts.map +1 -0
  359. package/dist/core/emit/events.js +112 -0
  360. package/dist/core/emit/events.js.map +1 -0
  361. package/dist/core/emit/expressions.d.ts +23 -0
  362. package/dist/core/emit/expressions.d.ts.map +1 -0
  363. package/dist/core/emit/expressions.js +253 -0
  364. package/dist/core/emit/expressions.js.map +1 -0
  365. package/dist/core/emit/functions.d.ts +30 -0
  366. package/dist/core/emit/functions.d.ts.map +1 -0
  367. package/dist/core/emit/functions.js +171 -0
  368. package/dist/core/emit/functions.js.map +1 -0
  369. package/dist/core/emit/gaps.d.ts +34 -0
  370. package/dist/core/emit/gaps.d.ts.map +1 -0
  371. package/dist/core/emit/gaps.js +16 -0
  372. package/dist/core/emit/gaps.js.map +1 -0
  373. package/dist/core/emit/index.d.ts +31 -0
  374. package/dist/core/emit/index.d.ts.map +1 -0
  375. package/dist/core/emit/index.js +25 -0
  376. package/dist/core/emit/index.js.map +1 -0
  377. package/dist/core/emit/inputs.d.ts +47 -0
  378. package/dist/core/emit/inputs.d.ts.map +1 -0
  379. package/dist/core/emit/inputs.js +150 -0
  380. package/dist/core/emit/inputs.js.map +1 -0
  381. package/dist/core/emit/layout.d.ts +73 -0
  382. package/dist/core/emit/layout.d.ts.map +1 -0
  383. package/dist/core/emit/layout.js +126 -0
  384. package/dist/core/emit/layout.js.map +1 -0
  385. package/dist/core/emit/meta.d.ts +14 -0
  386. package/dist/core/emit/meta.d.ts.map +1 -0
  387. package/dist/core/emit/meta.js +68 -0
  388. package/dist/core/emit/meta.js.map +1 -0
  389. package/dist/core/emit/opcodes.d.ts +28 -0
  390. package/dist/core/emit/opcodes.d.ts.map +1 -0
  391. package/dist/core/emit/opcodes.js +137 -0
  392. package/dist/core/emit/opcodes.js.map +1 -0
  393. package/dist/core/emit/outputs.d.ts +67 -0
  394. package/dist/core/emit/outputs.d.ts.map +1 -0
  395. package/dist/core/emit/outputs.js +293 -0
  396. package/dist/core/emit/outputs.js.map +1 -0
  397. package/dist/core/emit/pool.d.ts +33 -0
  398. package/dist/core/emit/pool.d.ts.map +1 -0
  399. package/dist/core/emit/pool.js +79 -0
  400. package/dist/core/emit/pool.js.map +1 -0
  401. package/dist/core/emit/program.d.ts +333 -0
  402. package/dist/core/emit/program.d.ts.map +1 -0
  403. package/dist/core/emit/program.js +15 -0
  404. package/dist/core/emit/program.js.map +1 -0
  405. package/dist/core/emit/registers.d.ts +35 -0
  406. package/dist/core/emit/registers.d.ts.map +1 -0
  407. package/dist/core/emit/registers.js +170 -0
  408. package/dist/core/emit/registers.js.map +1 -0
  409. package/dist/core/emit/request-scope.d.ts +36 -0
  410. package/dist/core/emit/request-scope.d.ts.map +1 -0
  411. package/dist/core/emit/request-scope.js +41 -0
  412. package/dist/core/emit/request-scope.js.map +1 -0
  413. package/dist/core/emit/requests.d.ts +69 -0
  414. package/dist/core/emit/requests.d.ts.map +1 -0
  415. package/dist/core/emit/requests.js +230 -0
  416. package/dist/core/emit/requests.js.map +1 -0
  417. package/dist/core/emit/requires.d.ts +4 -0
  418. package/dist/core/emit/requires.d.ts.map +1 -0
  419. package/dist/core/emit/requires.js +71 -0
  420. package/dist/core/emit/requires.js.map +1 -0
  421. package/dist/core/emit/sha256.d.ts +24 -0
  422. package/dist/core/emit/sha256.d.ts.map +1 -0
  423. package/dist/core/emit/sha256.js +109 -0
  424. package/dist/core/emit/sha256.js.map +1 -0
  425. package/dist/core/emit/statements.d.ts +20 -0
  426. package/dist/core/emit/statements.d.ts.map +1 -0
  427. package/dist/core/emit/statements.js +393 -0
  428. package/dist/core/emit/statements.js.map +1 -0
  429. package/dist/core/emit/values.d.ts +80 -0
  430. package/dist/core/emit/values.d.ts.map +1 -0
  431. package/dist/core/emit/values.js +242 -0
  432. package/dist/core/emit/values.js.map +1 -0
  433. package/dist/core/engine/alerts.d.ts +66 -0
  434. package/dist/core/engine/alerts.d.ts.map +1 -0
  435. package/dist/core/engine/alerts.js +119 -0
  436. package/dist/core/engine/alerts.js.map +1 -0
  437. package/dist/core/engine/arithmetic.d.ts +82 -0
  438. package/dist/core/engine/arithmetic.d.ts.map +1 -0
  439. package/dist/core/engine/arithmetic.js +141 -0
  440. package/dist/core/engine/arithmetic.js.map +1 -0
  441. package/dist/core/engine/bars.d.ts +95 -0
  442. package/dist/core/engine/bars.d.ts.map +1 -0
  443. package/dist/core/engine/bars.js +133 -0
  444. package/dist/core/engine/bars.js.map +1 -0
  445. package/dist/core/engine/budget.d.ts +162 -0
  446. package/dist/core/engine/budget.d.ts.map +1 -0
  447. package/dist/core/engine/budget.js +188 -0
  448. package/dist/core/engine/budget.js.map +1 -0
  449. package/dist/core/engine/channels.d.ts +106 -0
  450. package/dist/core/engine/channels.d.ts.map +1 -0
  451. package/dist/core/engine/channels.js +99 -0
  452. package/dist/core/engine/channels.js.map +1 -0
  453. package/dist/core/engine/drawings.d.ts +64 -0
  454. package/dist/core/engine/drawings.d.ts.map +1 -0
  455. package/dist/core/engine/drawings.js +67 -0
  456. package/dist/core/engine/drawings.js.map +1 -0
  457. package/dist/core/engine/engine.d.ts +140 -0
  458. package/dist/core/engine/engine.d.ts.map +1 -0
  459. package/dist/core/engine/engine.js +405 -0
  460. package/dist/core/engine/engine.js.map +1 -0
  461. package/dist/core/engine/errors.d.ts +64 -0
  462. package/dist/core/engine/errors.d.ts.map +1 -0
  463. package/dist/core/engine/errors.js +63 -0
  464. package/dist/core/engine/errors.js.map +1 -0
  465. package/dist/core/engine/frames.d.ts +48 -0
  466. package/dist/core/engine/frames.d.ts.map +1 -0
  467. package/dist/core/engine/frames.js +41 -0
  468. package/dist/core/engine/frames.js.map +1 -0
  469. package/dist/core/engine/grids.d.ts +25 -0
  470. package/dist/core/engine/grids.d.ts.map +1 -0
  471. package/dist/core/engine/grids.js +77 -0
  472. package/dist/core/engine/grids.js.map +1 -0
  473. package/dist/core/engine/guard.d.ts +4 -0
  474. package/dist/core/engine/guard.d.ts.map +1 -0
  475. package/dist/core/engine/guard.js +46 -0
  476. package/dist/core/engine/guard.js.map +1 -0
  477. package/dist/core/engine/host.d.ts +219 -0
  478. package/dist/core/engine/host.d.ts.map +1 -0
  479. package/dist/core/engine/host.js +38 -0
  480. package/dist/core/engine/host.js.map +1 -0
  481. package/dist/core/engine/index.d.ts +49 -0
  482. package/dist/core/engine/index.d.ts.map +1 -0
  483. package/dist/core/engine/index.js +33 -0
  484. package/dist/core/engine/index.js.map +1 -0
  485. package/dist/core/engine/inputs.d.ts +77 -0
  486. package/dist/core/engine/inputs.d.ts.map +1 -0
  487. package/dist/core/engine/inputs.js +205 -0
  488. package/dist/core/engine/inputs.js.map +1 -0
  489. package/dist/core/engine/ledger/call.d.ts +63 -0
  490. package/dist/core/engine/ledger/call.d.ts.map +1 -0
  491. package/dist/core/engine/ledger/call.js +136 -0
  492. package/dist/core/engine/ledger/call.js.map +1 -0
  493. package/dist/core/engine/ledger/closable.d.ts +155 -0
  494. package/dist/core/engine/ledger/closable.d.ts.map +1 -0
  495. package/dist/core/engine/ledger/closable.js +173 -0
  496. package/dist/core/engine/ledger/closable.js.map +1 -0
  497. package/dist/core/engine/ledger/holdings.d.ts +194 -0
  498. package/dist/core/engine/ledger/holdings.d.ts.map +1 -0
  499. package/dist/core/engine/ledger/holdings.js +237 -0
  500. package/dist/core/engine/ledger/holdings.js.map +1 -0
  501. package/dist/core/engine/ledger/index.d.ts +19 -0
  502. package/dist/core/engine/ledger/index.d.ts.map +1 -0
  503. package/dist/core/engine/ledger/index.js +2 -0
  504. package/dist/core/engine/ledger/index.js.map +1 -0
  505. package/dist/core/engine/ledger/intent.d.ts +106 -0
  506. package/dist/core/engine/ledger/intent.d.ts.map +1 -0
  507. package/dist/core/engine/ledger/intent.js +21 -0
  508. package/dist/core/engine/ledger/intent.js.map +1 -0
  509. package/dist/core/engine/ledger/ledger.d.ts +143 -0
  510. package/dist/core/engine/ledger/ledger.d.ts.map +1 -0
  511. package/dist/core/engine/ledger/ledger.js +237 -0
  512. package/dist/core/engine/ledger/ledger.js.map +1 -0
  513. package/dist/core/engine/ledger/place.d.ts +75 -0
  514. package/dist/core/engine/ledger/place.d.ts.map +1 -0
  515. package/dist/core/engine/ledger/place.js +174 -0
  516. package/dist/core/engine/ledger/place.js.map +1 -0
  517. package/dist/core/engine/ledger/positions.d.ts +68 -0
  518. package/dist/core/engine/ledger/positions.d.ts.map +1 -0
  519. package/dist/core/engine/ledger/positions.js +114 -0
  520. package/dist/core/engine/ledger/positions.js.map +1 -0
  521. package/dist/core/engine/ledger/refuse.d.ts +43 -0
  522. package/dist/core/engine/ledger/refuse.d.ts.map +1 -0
  523. package/dist/core/engine/ledger/refuse.js +329 -0
  524. package/dist/core/engine/ledger/refuse.js.map +1 -0
  525. package/dist/core/engine/ledger/row.d.ts +176 -0
  526. package/dist/core/engine/ledger/row.d.ts.map +1 -0
  527. package/dist/core/engine/ledger/row.js +169 -0
  528. package/dist/core/engine/ledger/row.js.map +1 -0
  529. package/dist/core/engine/ledger/sizing.d.ts +142 -0
  530. package/dist/core/engine/ledger/sizing.d.ts.map +1 -0
  531. package/dist/core/engine/ledger/sizing.js +223 -0
  532. package/dist/core/engine/ledger/sizing.js.map +1 -0
  533. package/dist/core/engine/library/arrays.d.ts +14 -0
  534. package/dist/core/engine/library/arrays.d.ts.map +1 -0
  535. package/dist/core/engine/library/arrays.js +285 -0
  536. package/dist/core/engine/library/arrays.js.map +1 -0
  537. package/dist/core/engine/library/averages.d.ts +9 -0
  538. package/dist/core/engine/library/averages.d.ts.map +1 -0
  539. package/dist/core/engine/library/averages.js +41 -0
  540. package/dist/core/engine/library/averages.js.map +1 -0
  541. package/dist/core/engine/library/binding.d.ts +230 -0
  542. package/dist/core/engine/library/binding.d.ts.map +1 -0
  543. package/dist/core/engine/library/binding.js +109 -0
  544. package/dist/core/engine/library/binding.js.map +1 -0
  545. package/dist/core/engine/library/chart.d.ts +3 -0
  546. package/dist/core/engine/library/chart.d.ts.map +1 -0
  547. package/dist/core/engine/library/chart.js +83 -0
  548. package/dist/core/engine/library/chart.js.map +1 -0
  549. package/dist/core/engine/library/colours.d.ts +26 -0
  550. package/dist/core/engine/library/colours.d.ts.map +1 -0
  551. package/dist/core/engine/library/colours.js +81 -0
  552. package/dist/core/engine/library/colours.js.map +1 -0
  553. package/dist/core/engine/library/dates.d.ts +3 -0
  554. package/dist/core/engine/library/dates.d.ts.map +1 -0
  555. package/dist/core/engine/library/dates.js +75 -0
  556. package/dist/core/engine/library/dates.js.map +1 -0
  557. package/dist/core/engine/library/index.d.ts +13 -0
  558. package/dist/core/engine/library/index.d.ts.map +1 -0
  559. package/dist/core/engine/library/index.js +86 -0
  560. package/dist/core/engine/library/index.js.map +1 -0
  561. package/dist/core/engine/library/maths.d.ts +3 -0
  562. package/dist/core/engine/library/maths.d.ts.map +1 -0
  563. package/dist/core/engine/library/maths.js +89 -0
  564. package/dist/core/engine/library/maths.js.map +1 -0
  565. package/dist/core/engine/library/objects.d.ts +3 -0
  566. package/dist/core/engine/library/objects.d.ts.map +1 -0
  567. package/dist/core/engine/library/objects.js +199 -0
  568. package/dist/core/engine/library/objects.js.map +1 -0
  569. package/dist/core/engine/library/oscillators.d.ts +3 -0
  570. package/dist/core/engine/library/oscillators.d.ts.map +1 -0
  571. package/dist/core/engine/library/oscillators.js +29 -0
  572. package/dist/core/engine/library/oscillators.js.map +1 -0
  573. package/dist/core/engine/library/ranges.d.ts +3 -0
  574. package/dist/core/engine/library/ranges.d.ts.map +1 -0
  575. package/dist/core/engine/library/ranges.js +23 -0
  576. package/dist/core/engine/library/ranges.js.map +1 -0
  577. package/dist/core/engine/library/series.d.ts +3 -0
  578. package/dist/core/engine/library/series.d.ts.map +1 -0
  579. package/dist/core/engine/library/series.js +46 -0
  580. package/dist/core/engine/library/series.js.map +1 -0
  581. package/dist/core/engine/library/state.d.ts +35 -0
  582. package/dist/core/engine/library/state.d.ts.map +1 -0
  583. package/dist/core/engine/library/state.js +19 -0
  584. package/dist/core/engine/library/state.js.map +1 -0
  585. package/dist/core/engine/library/studies.d.ts +3 -0
  586. package/dist/core/engine/library/studies.d.ts.map +1 -0
  587. package/dist/core/engine/library/studies.js +35 -0
  588. package/dist/core/engine/library/studies.js.map +1 -0
  589. package/dist/core/engine/library/text.d.ts +6 -0
  590. package/dist/core/engine/library/text.d.ts.map +1 -0
  591. package/dist/core/engine/library/text.js +280 -0
  592. package/dist/core/engine/library/text.js.map +1 -0
  593. package/dist/core/engine/library/trend.d.ts +3 -0
  594. package/dist/core/engine/library/trend.d.ts.map +1 -0
  595. package/dist/core/engine/library/trend.js +29 -0
  596. package/dist/core/engine/library/trend.js.map +1 -0
  597. package/dist/core/engine/library/volume.d.ts +3 -0
  598. package/dist/core/engine/library/volume.d.ts.map +1 -0
  599. package/dist/core/engine/library/volume.js +51 -0
  600. package/dist/core/engine/library/volume.js.map +1 -0
  601. package/dist/core/engine/load.d.ts +59 -0
  602. package/dist/core/engine/load.d.ts.map +1 -0
  603. package/dist/core/engine/load.js +61 -0
  604. package/dist/core/engine/load.js.map +1 -0
  605. package/dist/core/engine/machine.d.ts +107 -0
  606. package/dist/core/engine/machine.d.ts.map +1 -0
  607. package/dist/core/engine/machine.js +337 -0
  608. package/dist/core/engine/machine.js.map +1 -0
  609. package/dist/core/engine/memory.d.ts +60 -0
  610. package/dist/core/engine/memory.d.ts.map +1 -0
  611. package/dist/core/engine/memory.js +92 -0
  612. package/dist/core/engine/memory.js.map +1 -0
  613. package/dist/core/engine/operations.d.ts +62 -0
  614. package/dist/core/engine/operations.d.ts.map +1 -0
  615. package/dist/core/engine/operations.js +149 -0
  616. package/dist/core/engine/operations.js.map +1 -0
  617. package/dist/core/engine/orders.d.ts +56 -0
  618. package/dist/core/engine/orders.d.ts.map +1 -0
  619. package/dist/core/engine/orders.js +83 -0
  620. package/dist/core/engine/orders.js.map +1 -0
  621. package/dist/core/engine/registers.d.ts +50 -0
  622. package/dist/core/engine/registers.d.ts.map +1 -0
  623. package/dist/core/engine/registers.js +85 -0
  624. package/dist/core/engine/registers.js.map +1 -0
  625. package/dist/core/engine/request-body.d.ts +138 -0
  626. package/dist/core/engine/request-body.d.ts.map +1 -0
  627. package/dist/core/engine/request-body.js +227 -0
  628. package/dist/core/engine/request-body.js.map +1 -0
  629. package/dist/core/engine/request-plan.d.ts +79 -0
  630. package/dist/core/engine/request-plan.d.ts.map +1 -0
  631. package/dist/core/engine/request-plan.js +228 -0
  632. package/dist/core/engine/request-plan.js.map +1 -0
  633. package/dist/core/engine/requests.d.ts +105 -0
  634. package/dist/core/engine/requests.d.ts.map +1 -0
  635. package/dist/core/engine/requests.js +260 -0
  636. package/dist/core/engine/requests.js.map +1 -0
  637. package/dist/core/engine/results.d.ts +40 -0
  638. package/dist/core/engine/results.d.ts.map +1 -0
  639. package/dist/core/engine/results.js +2 -0
  640. package/dist/core/engine/results.js.map +1 -0
  641. package/dist/core/engine/series.d.ts +61 -0
  642. package/dist/core/engine/series.d.ts.map +1 -0
  643. package/dist/core/engine/series.js +41 -0
  644. package/dist/core/engine/series.js.map +1 -0
  645. package/dist/core/engine/session/hours.d.ts +49 -0
  646. package/dist/core/engine/session/hours.d.ts.map +1 -0
  647. package/dist/core/engine/session/hours.js +31 -0
  648. package/dist/core/engine/session/hours.js.map +1 -0
  649. package/dist/core/engine/session/index.d.ts +17 -0
  650. package/dist/core/engine/session/index.d.ts.map +1 -0
  651. package/dist/core/engine/session/index.js +3 -0
  652. package/dist/core/engine/session/index.js.map +1 -0
  653. package/dist/core/engine/session/record.d.ts +56 -0
  654. package/dist/core/engine/session/record.d.ts.map +1 -0
  655. package/dist/core/engine/session/record.js +165 -0
  656. package/dist/core/engine/session/record.js.map +1 -0
  657. package/dist/core/engine/session/spec.d.ts +19 -0
  658. package/dist/core/engine/session/spec.d.ts.map +1 -0
  659. package/dist/core/engine/session/spec.js +31 -0
  660. package/dist/core/engine/session/spec.js.map +1 -0
  661. package/dist/core/engine/timeframe.d.ts +59 -0
  662. package/dist/core/engine/timeframe.d.ts.map +1 -0
  663. package/dist/core/engine/timeframe.js +140 -0
  664. package/dist/core/engine/timeframe.js.map +1 -0
  665. package/dist/core/engine/types.d.ts +15 -0
  666. package/dist/core/engine/types.d.ts.map +1 -0
  667. package/dist/core/engine/types.js +2 -0
  668. package/dist/core/engine/types.js.map +1 -0
  669. package/dist/core/engine/values/heap.d.ts +134 -0
  670. package/dist/core/engine/values/heap.d.ts.map +1 -0
  671. package/dist/core/engine/values/heap.js +230 -0
  672. package/dist/core/engine/values/heap.js.map +1 -0
  673. package/dist/core/engine/values/index.d.ts +13 -0
  674. package/dist/core/engine/values/index.d.ts.map +1 -0
  675. package/dist/core/engine/values/index.js +3 -0
  676. package/dist/core/engine/values/index.js.map +1 -0
  677. package/dist/core/engine/values/value.d.ts +82 -0
  678. package/dist/core/engine/values/value.d.ts.map +1 -0
  679. package/dist/core/engine/values/value.js +134 -0
  680. package/dist/core/engine/values/value.js.map +1 -0
  681. package/dist/core/engine/verify-budgets.d.ts +35 -0
  682. package/dist/core/engine/verify-budgets.d.ts.map +1 -0
  683. package/dist/core/engine/verify-budgets.js +172 -0
  684. package/dist/core/engine/verify-budgets.js.map +1 -0
  685. package/dist/core/engine/verify-code.d.ts +32 -0
  686. package/dist/core/engine/verify-code.d.ts.map +1 -0
  687. package/dist/core/engine/verify-code.js +278 -0
  688. package/dist/core/engine/verify-code.js.map +1 -0
  689. package/dist/core/engine/verify-requests.d.ts +44 -0
  690. package/dist/core/engine/verify-requests.d.ts.map +1 -0
  691. package/dist/core/engine/verify-requests.js +220 -0
  692. package/dist/core/engine/verify-requests.js.map +1 -0
  693. package/dist/core/engine/verify-shape.d.ts +46 -0
  694. package/dist/core/engine/verify-shape.d.ts.map +1 -0
  695. package/dist/core/engine/verify-shape.js +147 -0
  696. package/dist/core/engine/verify-shape.js.map +1 -0
  697. package/dist/core/engine/verify-tables.d.ts +19 -0
  698. package/dist/core/engine/verify-tables.d.ts.map +1 -0
  699. package/dist/core/engine/verify-tables.js +171 -0
  700. package/dist/core/engine/verify-tables.js.map +1 -0
  701. package/dist/core/engine/verify.d.ts +19 -0
  702. package/dist/core/engine/verify.d.ts.map +1 -0
  703. package/dist/core/engine/verify.js +309 -0
  704. package/dist/core/engine/verify.js.map +1 -0
  705. package/dist/core/index.d.ts +95 -6
  706. package/dist/core/index.d.ts.map +1 -1
  707. package/dist/core/index.js +64 -6
  708. package/dist/core/index.js.map +1 -1
  709. package/dist/core/parse/expressions.js +1 -1
  710. package/dist/core/parse/expressions.js.map +1 -1
  711. package/dist/core/parse/names.d.ts +7 -1
  712. package/dist/core/parse/names.d.ts.map +1 -1
  713. package/dist/core/parse/names.js +28 -2
  714. package/dist/core/parse/names.js.map +1 -1
  715. package/dist/core/stdlib/averages/exponential.d.ts +51 -0
  716. package/dist/core/stdlib/averages/exponential.d.ts.map +1 -0
  717. package/dist/core/stdlib/averages/exponential.js +72 -0
  718. package/dist/core/stdlib/averages/exponential.js.map +1 -0
  719. package/dist/core/stdlib/averages/index.d.ts +7 -0
  720. package/dist/core/stdlib/averages/index.d.ts.map +1 -0
  721. package/dist/core/stdlib/averages/index.js +5 -0
  722. package/dist/core/stdlib/averages/index.js.map +1 -0
  723. package/dist/core/stdlib/averages/select.d.ts +35 -0
  724. package/dist/core/stdlib/averages/select.d.ts.map +1 -0
  725. package/dist/core/stdlib/averages/select.js +43 -0
  726. package/dist/core/stdlib/averages/select.js.map +1 -0
  727. package/dist/core/stdlib/averages/shaped.d.ts +61 -0
  728. package/dist/core/stdlib/averages/shaped.d.ts.map +1 -0
  729. package/dist/core/stdlib/averages/shaped.js +126 -0
  730. package/dist/core/stdlib/averages/shaped.js.map +1 -0
  731. package/dist/core/stdlib/averages/simple.d.ts +58 -0
  732. package/dist/core/stdlib/averages/simple.d.ts.map +1 -0
  733. package/dist/core/stdlib/averages/simple.js +92 -0
  734. package/dist/core/stdlib/averages/simple.js.map +1 -0
  735. package/dist/core/stdlib/calendar/civil.d.ts +56 -0
  736. package/dist/core/stdlib/calendar/civil.d.ts.map +1 -0
  737. package/dist/core/stdlib/calendar/civil.js +70 -0
  738. package/dist/core/stdlib/calendar/civil.js.map +1 -0
  739. package/dist/core/stdlib/calendar/fields.d.ts +36 -0
  740. package/dist/core/stdlib/calendar/fields.d.ts.map +1 -0
  741. package/dist/core/stdlib/calendar/fields.js +93 -0
  742. package/dist/core/stdlib/calendar/fields.js.map +1 -0
  743. package/dist/core/stdlib/calendar/format.d.ts +19 -0
  744. package/dist/core/stdlib/calendar/format.d.ts.map +1 -0
  745. package/dist/core/stdlib/calendar/format.js +51 -0
  746. package/dist/core/stdlib/calendar/format.js.map +1 -0
  747. package/dist/core/stdlib/calendar/index.d.ts +7 -0
  748. package/dist/core/stdlib/calendar/index.d.ts.map +1 -0
  749. package/dist/core/stdlib/calendar/index.js +5 -0
  750. package/dist/core/stdlib/calendar/index.js.map +1 -0
  751. package/dist/core/stdlib/calendar/zone.d.ts +53 -0
  752. package/dist/core/stdlib/calendar/zone.d.ts.map +1 -0
  753. package/dist/core/stdlib/calendar/zone.js +138 -0
  754. package/dist/core/stdlib/calendar/zone.js.map +1 -0
  755. package/dist/core/stdlib/index.d.ts +57 -0
  756. package/dist/core/stdlib/index.d.ts.map +1 -0
  757. package/dist/core/stdlib/index.js +51 -0
  758. package/dist/core/stdlib/index.js.map +1 -0
  759. package/dist/core/stdlib/maths/arithmetic.d.ts +38 -0
  760. package/dist/core/stdlib/maths/arithmetic.d.ts.map +1 -0
  761. package/dist/core/stdlib/maths/arithmetic.js +66 -0
  762. package/dist/core/stdlib/maths/arithmetic.js.map +1 -0
  763. package/dist/core/stdlib/maths/elementary.d.ts +65 -0
  764. package/dist/core/stdlib/maths/elementary.d.ts.map +1 -0
  765. package/dist/core/stdlib/maths/elementary.js +93 -0
  766. package/dist/core/stdlib/maths/elementary.js.map +1 -0
  767. package/dist/core/stdlib/maths/index.d.ts +4 -0
  768. package/dist/core/stdlib/maths/index.d.ts.map +1 -0
  769. package/dist/core/stdlib/maths/index.js +4 -0
  770. package/dist/core/stdlib/maths/index.js.map +1 -0
  771. package/dist/core/stdlib/maths/rounding.d.ts +43 -0
  772. package/dist/core/stdlib/maths/rounding.d.ts.map +1 -0
  773. package/dist/core/stdlib/maths/rounding.js +62 -0
  774. package/dist/core/stdlib/maths/rounding.js.map +1 -0
  775. package/dist/core/stdlib/momentum/convergence.d.ts +36 -0
  776. package/dist/core/stdlib/momentum/convergence.d.ts.map +1 -0
  777. package/dist/core/stdlib/momentum/convergence.js +48 -0
  778. package/dist/core/stdlib/momentum/convergence.js.map +1 -0
  779. package/dist/core/stdlib/momentum/index.d.ts +6 -0
  780. package/dist/core/stdlib/momentum/index.d.ts.map +1 -0
  781. package/dist/core/stdlib/momentum/index.js +6 -0
  782. package/dist/core/stdlib/momentum/index.js.map +1 -0
  783. package/dist/core/stdlib/momentum/pressure.d.ts +43 -0
  784. package/dist/core/stdlib/momentum/pressure.d.ts.map +1 -0
  785. package/dist/core/stdlib/momentum/pressure.js +103 -0
  786. package/dist/core/stdlib/momentum/pressure.js.map +1 -0
  787. package/dist/core/stdlib/momentum/rates.d.ts +74 -0
  788. package/dist/core/stdlib/momentum/rates.d.ts.map +1 -0
  789. package/dist/core/stdlib/momentum/rates.js +134 -0
  790. package/dist/core/stdlib/momentum/rates.js.map +1 -0
  791. package/dist/core/stdlib/momentum/rsi.d.ts +21 -0
  792. package/dist/core/stdlib/momentum/rsi.d.ts.map +1 -0
  793. package/dist/core/stdlib/momentum/rsi.js +30 -0
  794. package/dist/core/stdlib/momentum/rsi.js.map +1 -0
  795. package/dist/core/stdlib/momentum/stochastic.d.ts +44 -0
  796. package/dist/core/stdlib/momentum/stochastic.d.ts.map +1 -0
  797. package/dist/core/stdlib/momentum/stochastic.js +97 -0
  798. package/dist/core/stdlib/momentum/stochastic.js.map +1 -0
  799. package/dist/core/stdlib/series/changes.d.ts +59 -0
  800. package/dist/core/stdlib/series/changes.d.ts.map +1 -0
  801. package/dist/core/stdlib/series/changes.js +129 -0
  802. package/dist/core/stdlib/series/changes.js.map +1 -0
  803. package/dist/core/stdlib/series/conditions.d.ts +34 -0
  804. package/dist/core/stdlib/series/conditions.d.ts.map +1 -0
  805. package/dist/core/stdlib/series/conditions.js +52 -0
  806. package/dist/core/stdlib/series/conditions.js.map +1 -0
  807. package/dist/core/stdlib/series/extremes.d.ts +29 -0
  808. package/dist/core/stdlib/series/extremes.d.ts.map +1 -0
  809. package/dist/core/stdlib/series/extremes.js +62 -0
  810. package/dist/core/stdlib/series/extremes.js.map +1 -0
  811. package/dist/core/stdlib/series/index.d.ts +9 -0
  812. package/dist/core/stdlib/series/index.d.ts.map +1 -0
  813. package/dist/core/stdlib/series/index.js +7 -0
  814. package/dist/core/stdlib/series/index.js.map +1 -0
  815. package/dist/core/stdlib/series/pivots.d.ts +25 -0
  816. package/dist/core/stdlib/series/pivots.d.ts.map +1 -0
  817. package/dist/core/stdlib/series/pivots.js +42 -0
  818. package/dist/core/stdlib/series/pivots.js.map +1 -0
  819. package/dist/core/stdlib/series/statistics.d.ts +64 -0
  820. package/dist/core/stdlib/series/statistics.d.ts.map +1 -0
  821. package/dist/core/stdlib/series/statistics.js +148 -0
  822. package/dist/core/stdlib/series/statistics.js.map +1 -0
  823. package/dist/core/stdlib/series/totals.d.ts +68 -0
  824. package/dist/core/stdlib/series/totals.d.ts.map +1 -0
  825. package/dist/core/stdlib/series/totals.js +115 -0
  826. package/dist/core/stdlib/series/totals.js.map +1 -0
  827. package/dist/core/stdlib/trend/directional.d.ts +69 -0
  828. package/dist/core/stdlib/trend/directional.d.ts.map +1 -0
  829. package/dist/core/stdlib/trend/directional.js +151 -0
  830. package/dist/core/stdlib/trend/directional.js.map +1 -0
  831. package/dist/core/stdlib/trend/index.d.ts +4 -0
  832. package/dist/core/stdlib/trend/index.d.ts.map +1 -0
  833. package/dist/core/stdlib/trend/index.js +4 -0
  834. package/dist/core/stdlib/trend/index.js.map +1 -0
  835. package/dist/core/stdlib/trend/psar.d.ts +33 -0
  836. package/dist/core/stdlib/trend/psar.d.ts.map +1 -0
  837. package/dist/core/stdlib/trend/psar.js +86 -0
  838. package/dist/core/stdlib/trend/psar.js.map +1 -0
  839. package/dist/core/stdlib/trend/supertrend.d.ts +30 -0
  840. package/dist/core/stdlib/trend/supertrend.d.ts.map +1 -0
  841. package/dist/core/stdlib/trend/supertrend.js +65 -0
  842. package/dist/core/stdlib/trend/supertrend.js.map +1 -0
  843. package/dist/core/stdlib/values/bar.d.ts +39 -0
  844. package/dist/core/stdlib/values/bar.d.ts.map +1 -0
  845. package/dist/core/stdlib/values/bar.js +33 -0
  846. package/dist/core/stdlib/values/bar.js.map +1 -0
  847. package/dist/core/stdlib/values/index.d.ts +11 -0
  848. package/dist/core/stdlib/values/index.d.ts.map +1 -0
  849. package/dist/core/stdlib/values/index.js +6 -0
  850. package/dist/core/stdlib/values/index.js.map +1 -0
  851. package/dist/core/stdlib/values/lookback.d.ts +83 -0
  852. package/dist/core/stdlib/values/lookback.d.ts.map +1 -0
  853. package/dist/core/stdlib/values/lookback.js +134 -0
  854. package/dist/core/stdlib/values/lookback.js.map +1 -0
  855. package/dist/core/stdlib/values/region.d.ts +55 -0
  856. package/dist/core/stdlib/values/region.d.ts.map +1 -0
  857. package/dist/core/stdlib/values/region.js +73 -0
  858. package/dist/core/stdlib/values/region.js.map +1 -0
  859. package/dist/core/stdlib/values/tail.d.ts +44 -0
  860. package/dist/core/stdlib/values/tail.d.ts.map +1 -0
  861. package/dist/core/stdlib/values/tail.js +23 -0
  862. package/dist/core/stdlib/values/tail.js.map +1 -0
  863. package/dist/core/stdlib/values/value.d.ts +64 -0
  864. package/dist/core/stdlib/values/value.d.ts.map +1 -0
  865. package/dist/core/stdlib/values/value.js +61 -0
  866. package/dist/core/stdlib/values/value.js.map +1 -0
  867. package/dist/core/stdlib/volatility/bands.d.ts +50 -0
  868. package/dist/core/stdlib/volatility/bands.d.ts.map +1 -0
  869. package/dist/core/stdlib/volatility/bands.js +101 -0
  870. package/dist/core/stdlib/volatility/bands.js.map +1 -0
  871. package/dist/core/stdlib/volatility/deviation.d.ts +43 -0
  872. package/dist/core/stdlib/volatility/deviation.d.ts.map +1 -0
  873. package/dist/core/stdlib/volatility/deviation.js +75 -0
  874. package/dist/core/stdlib/volatility/deviation.js.map +1 -0
  875. package/dist/core/stdlib/volatility/index.d.ts +6 -0
  876. package/dist/core/stdlib/volatility/index.d.ts.map +1 -0
  877. package/dist/core/stdlib/volatility/index.js +5 -0
  878. package/dist/core/stdlib/volatility/index.js.map +1 -0
  879. package/dist/core/stdlib/volatility/measures.d.ts +48 -0
  880. package/dist/core/stdlib/volatility/measures.d.ts.map +1 -0
  881. package/dist/core/stdlib/volatility/measures.js +73 -0
  882. package/dist/core/stdlib/volatility/measures.js.map +1 -0
  883. package/dist/core/stdlib/volatility/range.d.ts +69 -0
  884. package/dist/core/stdlib/volatility/range.d.ts.map +1 -0
  885. package/dist/core/stdlib/volatility/range.js +86 -0
  886. package/dist/core/stdlib/volatility/range.js.map +1 -0
  887. package/dist/core/stdlib/volume/accumulation.d.ts +61 -0
  888. package/dist/core/stdlib/volume/accumulation.d.ts.map +1 -0
  889. package/dist/core/stdlib/volume/accumulation.js +127 -0
  890. package/dist/core/stdlib/volume/accumulation.js.map +1 -0
  891. package/dist/core/stdlib/volume/flow.d.ts +60 -0
  892. package/dist/core/stdlib/volume/flow.d.ts.map +1 -0
  893. package/dist/core/stdlib/volume/flow.js +125 -0
  894. package/dist/core/stdlib/volume/flow.js.map +1 -0
  895. package/dist/core/stdlib/volume/index.d.ts +5 -0
  896. package/dist/core/stdlib/volume/index.d.ts.map +1 -0
  897. package/dist/core/stdlib/volume/index.js +4 -0
  898. package/dist/core/stdlib/volume/index.js.map +1 -0
  899. package/dist/core/stdlib/volume/weighted.d.ts +52 -0
  900. package/dist/core/stdlib/volume/weighted.d.ts.map +1 -0
  901. package/dist/core/stdlib/volume/weighted.js +64 -0
  902. package/dist/core/stdlib/volume/weighted.js.map +1 -0
  903. package/dist/core/version/version.generated.d.ts +2 -2
  904. package/dist/core/version/version.generated.d.ts.map +1 -1
  905. package/dist/core/version/version.generated.js +2 -2
  906. package/dist/core/version/version.generated.js.map +1 -1
  907. package/dist/editor/complete.d.ts +40 -0
  908. package/dist/editor/complete.d.ts.map +1 -0
  909. package/dist/editor/complete.js +206 -0
  910. package/dist/editor/complete.js.map +1 -0
  911. package/dist/editor/diagnose.d.ts +18 -0
  912. package/dist/editor/diagnose.d.ts.map +1 -0
  913. package/dist/editor/diagnose.js +70 -0
  914. package/dist/editor/diagnose.js.map +1 -0
  915. package/dist/editor/format.d.ts +11 -0
  916. package/dist/editor/format.d.ts.map +1 -0
  917. package/dist/editor/format.js +50 -0
  918. package/dist/editor/format.js.map +1 -0
  919. package/dist/editor/highlight.d.ts +28 -0
  920. package/dist/editor/highlight.d.ts.map +1 -0
  921. package/dist/editor/highlight.js +65 -0
  922. package/dist/editor/highlight.js.map +1 -0
  923. package/dist/editor/hover.d.ts +40 -0
  924. package/dist/editor/hover.d.ts.map +1 -0
  925. package/dist/editor/hover.js +147 -0
  926. package/dist/editor/hover.js.map +1 -0
  927. package/dist/editor/index.d.ts +60 -0
  928. package/dist/editor/index.d.ts.map +1 -0
  929. package/dist/editor/index.js +7 -0
  930. package/dist/editor/index.js.map +1 -0
  931. package/dist/editor/kinds.d.ts +27 -0
  932. package/dist/editor/kinds.d.ts.map +1 -0
  933. package/dist/editor/kinds.js +118 -0
  934. package/dist/editor/kinds.js.map +1 -0
  935. package/dist/editor/layout.d.ts +47 -0
  936. package/dist/editor/layout.d.ts.map +1 -0
  937. package/dist/editor/layout.js +135 -0
  938. package/dist/editor/layout.js.map +1 -0
  939. package/dist/editor/manifest.d.ts +47 -0
  940. package/dist/editor/manifest.d.ts.map +1 -0
  941. package/dist/editor/manifest.js +93 -0
  942. package/dist/editor/manifest.js.map +1 -0
  943. package/dist/editor/reading.d.ts +41 -0
  944. package/dist/editor/reading.d.ts.map +1 -0
  945. package/dist/editor/reading.js +51 -0
  946. package/dist/editor/reading.js.map +1 -0
  947. package/dist/editor/scan.d.ts +26 -0
  948. package/dist/editor/scan.d.ts.map +1 -0
  949. package/dist/editor/scan.js +139 -0
  950. package/dist/editor/scan.js.map +1 -0
  951. package/dist/editor/scope.d.ts +19 -0
  952. package/dist/editor/scope.d.ts.map +1 -0
  953. package/dist/editor/scope.js +99 -0
  954. package/dist/editor/scope.js.map +1 -0
  955. package/dist/editor/signature.d.ts +38 -0
  956. package/dist/editor/signature.d.ts.map +1 -0
  957. package/dist/editor/signature.js +112 -0
  958. package/dist/editor/signature.js.map +1 -0
  959. package/dist/editor/site.d.ts +46 -0
  960. package/dist/editor/site.d.ts.map +1 -0
  961. package/dist/editor/site.js +184 -0
  962. package/dist/editor/site.js.map +1 -0
  963. package/dist/editor/spacing.d.ts +29 -0
  964. package/dist/editor/spacing.d.ts.map +1 -0
  965. package/dist/editor/spacing.js +116 -0
  966. package/dist/editor/spacing.js.map +1 -0
  967. package/package.json +66 -15
  968. package/spec/errors.json +522 -183
  969. package/src/adapters/charts/alerts.ts +116 -0
  970. package/src/adapters/charts/bars.ts +63 -0
  971. package/src/adapters/charts/candles.ts +137 -0
  972. package/src/adapters/charts/colours.ts +113 -0
  973. package/src/adapters/charts/columns.ts +99 -0
  974. package/src/adapters/charts/contract.ts +320 -0
  975. package/src/adapters/charts/descriptor.ts +199 -0
  976. package/src/adapters/charts/drawings.ts +213 -0
  977. package/src/adapters/charts/errors.ts +45 -0
  978. package/src/adapters/charts/fields.ts +74 -0
  979. package/src/adapters/charts/fills.ts +71 -0
  980. package/src/adapters/charts/index.ts +78 -0
  981. package/src/adapters/charts/levels.ts +92 -0
  982. package/src/adapters/charts/markers.ts +119 -0
  983. package/src/adapters/charts/paint.ts +101 -0
  984. package/src/adapters/charts/plots.ts +185 -0
  985. package/src/adapters/charts/produced.ts +68 -0
  986. package/src/adapters/charts/requests.ts +357 -0
  987. package/src/adapters/charts/run.ts +327 -0
  988. package/src/adapters/charts/settings.ts +273 -0
  989. package/src/adapters/charts/surfaces.ts +255 -0
  990. package/src/adapters/charts/tables.ts +243 -0
  991. package/src/adapters/codemirror/commands.ts +53 -0
  992. package/src/adapters/codemirror/completion.ts +74 -0
  993. package/src/adapters/codemirror/contract.ts +156 -0
  994. package/src/adapters/codemirror/index.ts +66 -0
  995. package/src/adapters/codemirror/lint.ts +66 -0
  996. package/src/adapters/codemirror/positions.ts +79 -0
  997. package/src/adapters/codemirror/stream.ts +87 -0
  998. package/src/adapters/codemirror/tokens.ts +64 -0
  999. package/src/adapters/codemirror/tooltips.ts +113 -0
  1000. package/src/core/accounting/charges.ts +452 -0
  1001. package/src/core/accounting/equity.ts +276 -0
  1002. package/src/core/accounting/index.ts +49 -0
  1003. package/src/core/accounting/markers.ts +95 -0
  1004. package/src/core/accounting/monthly.ts +137 -0
  1005. package/src/core/accounting/report.ts +89 -0
  1006. package/src/core/accounting/shapes.ts +73 -0
  1007. package/src/core/accounting/statistics.ts +350 -0
  1008. package/src/core/accounting/trades.ts +313 -0
  1009. package/src/core/backtest/compare.ts +244 -0
  1010. package/src/core/backtest/declaration.ts +97 -0
  1011. package/src/core/backtest/drive.ts +364 -0
  1012. package/src/core/backtest/index.ts +52 -0
  1013. package/src/core/backtest/range.ts +137 -0
  1014. package/src/core/backtest/record.ts +341 -0
  1015. package/src/core/backtest/replay.ts +158 -0
  1016. package/src/core/backtest/resting.ts +125 -0
  1017. package/src/core/backtest/settings.ts +280 -0
  1018. package/src/core/backtest/simulate.ts +304 -0
  1019. package/src/core/catalogue/catalogue.generated.ts +23 -9
  1020. package/src/core/catalogue/values.generated.ts +14 -0
  1021. package/src/core/check/arguments.ts +126 -0
  1022. package/src/core/check/call-sites.ts +385 -0
  1023. package/src/core/check/call-warmup.ts +121 -0
  1024. package/src/core/check/calls.ts +412 -0
  1025. package/src/core/check/check.ts +183 -0
  1026. package/src/core/check/checked.ts +228 -0
  1027. package/src/core/check/checker.ts +393 -0
  1028. package/src/core/check/conditional.ts +143 -0
  1029. package/src/core/check/constant.ts +127 -0
  1030. package/src/core/check/declaration.ts +230 -0
  1031. package/src/core/check/expressions.ts +471 -0
  1032. package/src/core/check/functions.ts +283 -0
  1033. package/src/core/check/handles.ts +75 -0
  1034. package/src/core/check/index.ts +70 -0
  1035. package/src/core/check/library-bars.ts +194 -0
  1036. package/src/core/check/library-orders.ts +290 -0
  1037. package/src/core/check/library-output.ts +241 -0
  1038. package/src/core/check/library-prose.generated.ts +367 -0
  1039. package/src/core/check/library-series.ts +457 -0
  1040. package/src/core/check/library.ts +374 -0
  1041. package/src/core/check/literals.ts +35 -0
  1042. package/src/core/check/outputs.ts +152 -0
  1043. package/src/core/check/statements.ts +465 -0
  1044. package/src/core/check/suggest.ts +63 -0
  1045. package/src/core/check/surface.ts +149 -0
  1046. package/src/core/check/tags.ts +94 -0
  1047. package/src/core/check/types.ts +260 -0
  1048. package/src/core/check/warmup.ts +100 -0
  1049. package/src/core/diagnostics/collector.ts +27 -1
  1050. package/src/core/emit/calls.ts +415 -0
  1051. package/src/core/emit/canonical.ts +81 -0
  1052. package/src/core/emit/channels.ts +144 -0
  1053. package/src/core/emit/code.ts +155 -0
  1054. package/src/core/emit/colours.ts +75 -0
  1055. package/src/core/emit/context.ts +461 -0
  1056. package/src/core/emit/defaults.ts +220 -0
  1057. package/src/core/emit/emit.ts +313 -0
  1058. package/src/core/emit/events.ts +141 -0
  1059. package/src/core/emit/expressions.ts +292 -0
  1060. package/src/core/emit/functions.ts +195 -0
  1061. package/src/core/emit/gaps.ts +44 -0
  1062. package/src/core/emit/index.ts +76 -0
  1063. package/src/core/emit/inputs.ts +179 -0
  1064. package/src/core/emit/layout.ts +165 -0
  1065. package/src/core/emit/meta.ts +104 -0
  1066. package/src/core/emit/opcodes.ts +160 -0
  1067. package/src/core/emit/outputs.ts +357 -0
  1068. package/src/core/emit/pool.ts +102 -0
  1069. package/src/core/emit/program.ts +385 -0
  1070. package/src/core/emit/registers.ts +179 -0
  1071. package/src/core/emit/request-scope.ts +52 -0
  1072. package/src/core/emit/requests.ts +258 -0
  1073. package/src/core/emit/requires.ts +91 -0
  1074. package/src/core/emit/sha256.ts +119 -0
  1075. package/src/core/emit/statements.ts +438 -0
  1076. package/src/core/emit/values.ts +284 -0
  1077. package/src/core/engine/alerts.ts +152 -0
  1078. package/src/core/engine/arithmetic.ts +165 -0
  1079. package/src/core/engine/bars.ts +224 -0
  1080. package/src/core/engine/budget.ts +284 -0
  1081. package/src/core/engine/channels.ts +171 -0
  1082. package/src/core/engine/drawings.ts +127 -0
  1083. package/src/core/engine/engine.ts +498 -0
  1084. package/src/core/engine/errors.ts +100 -0
  1085. package/src/core/engine/frames.ts +85 -0
  1086. package/src/core/engine/grids.ts +98 -0
  1087. package/src/core/engine/guard.ts +71 -0
  1088. package/src/core/engine/host.ts +251 -0
  1089. package/src/core/engine/index.ts +93 -0
  1090. package/src/core/engine/inputs.ts +263 -0
  1091. package/src/core/engine/ledger/call.ts +218 -0
  1092. package/src/core/engine/ledger/closable.ts +269 -0
  1093. package/src/core/engine/ledger/holdings.ts +354 -0
  1094. package/src/core/engine/ledger/index.ts +28 -0
  1095. package/src/core/engine/ledger/intent.ts +112 -0
  1096. package/src/core/engine/ledger/ledger.ts +314 -0
  1097. package/src/core/engine/ledger/place.ts +277 -0
  1098. package/src/core/engine/ledger/positions.ts +123 -0
  1099. package/src/core/engine/ledger/refuse.ts +378 -0
  1100. package/src/core/engine/ledger/row.ts +318 -0
  1101. package/src/core/engine/ledger/sizing.ts +292 -0
  1102. package/src/core/engine/library/arrays.ts +316 -0
  1103. package/src/core/engine/library/averages.ts +97 -0
  1104. package/src/core/engine/library/binding.ts +325 -0
  1105. package/src/core/engine/library/chart.ts +115 -0
  1106. package/src/core/engine/library/colours.ts +111 -0
  1107. package/src/core/engine/library/dates.ts +109 -0
  1108. package/src/core/engine/library/index.ts +103 -0
  1109. package/src/core/engine/library/maths.ts +134 -0
  1110. package/src/core/engine/library/objects.ts +265 -0
  1111. package/src/core/engine/library/oscillators.ts +124 -0
  1112. package/src/core/engine/library/ranges.ts +51 -0
  1113. package/src/core/engine/library/series.ts +236 -0
  1114. package/src/core/engine/library/state.ts +47 -0
  1115. package/src/core/engine/library/studies.ts +150 -0
  1116. package/src/core/engine/library/text.ts +303 -0
  1117. package/src/core/engine/library/trend.ts +79 -0
  1118. package/src/core/engine/library/volume.ts +101 -0
  1119. package/src/core/engine/load.ts +118 -0
  1120. package/src/core/engine/machine.ts +446 -0
  1121. package/src/core/engine/memory.ts +129 -0
  1122. package/src/core/engine/operations.ts +171 -0
  1123. package/src/core/engine/orders.ts +121 -0
  1124. package/src/core/engine/registers.ts +104 -0
  1125. package/src/core/engine/request-body.ts +328 -0
  1126. package/src/core/engine/request-plan.ts +270 -0
  1127. package/src/core/engine/requests.ts +382 -0
  1128. package/src/core/engine/results.ts +41 -0
  1129. package/src/core/engine/series.ts +82 -0
  1130. package/src/core/engine/session/hours.ts +86 -0
  1131. package/src/core/engine/session/index.ts +17 -0
  1132. package/src/core/engine/session/record.ts +191 -0
  1133. package/src/core/engine/session/spec.ts +45 -0
  1134. package/src/core/engine/timeframe.ts +161 -0
  1135. package/src/core/engine/types.ts +47 -0
  1136. package/src/core/engine/values/heap.ts +295 -0
  1137. package/src/core/engine/values/index.ts +34 -0
  1138. package/src/core/engine/values/value.ts +158 -0
  1139. package/src/core/engine/verify-budgets.ts +202 -0
  1140. package/src/core/engine/verify-code.ts +332 -0
  1141. package/src/core/engine/verify-requests.ts +255 -0
  1142. package/src/core/engine/verify-shape.ts +164 -0
  1143. package/src/core/engine/verify-tables.ts +176 -0
  1144. package/src/core/engine/verify.ts +341 -0
  1145. package/src/core/index.ts +212 -6
  1146. package/src/core/parse/expressions.ts +1 -1
  1147. package/src/core/parse/names.ts +29 -2
  1148. package/src/core/stdlib/averages/exponential.ts +119 -0
  1149. package/src/core/stdlib/averages/index.ts +45 -0
  1150. package/src/core/stdlib/averages/select.ts +71 -0
  1151. package/src/core/stdlib/averages/shaped.ts +161 -0
  1152. package/src/core/stdlib/averages/simple.ts +139 -0
  1153. package/src/core/stdlib/calendar/civil.ts +89 -0
  1154. package/src/core/stdlib/calendar/fields.ts +124 -0
  1155. package/src/core/stdlib/calendar/format.ts +71 -0
  1156. package/src/core/stdlib/calendar/index.ts +15 -0
  1157. package/src/core/stdlib/calendar/zone.ts +161 -0
  1158. package/src/core/stdlib/index.ts +400 -0
  1159. package/src/core/stdlib/maths/arithmetic.ts +74 -0
  1160. package/src/core/stdlib/maths/elementary.ts +124 -0
  1161. package/src/core/stdlib/maths/index.ts +43 -0
  1162. package/src/core/stdlib/maths/rounding.ts +78 -0
  1163. package/src/core/stdlib/momentum/convergence.ts +82 -0
  1164. package/src/core/stdlib/momentum/index.ts +47 -0
  1165. package/src/core/stdlib/momentum/pressure.ts +141 -0
  1166. package/src/core/stdlib/momentum/rates.ts +188 -0
  1167. package/src/core/stdlib/momentum/rsi.ts +49 -0
  1168. package/src/core/stdlib/momentum/stochastic.ts +147 -0
  1169. package/src/core/stdlib/series/changes.ts +177 -0
  1170. package/src/core/stdlib/series/conditions.ts +74 -0
  1171. package/src/core/stdlib/series/extremes.ts +92 -0
  1172. package/src/core/stdlib/series/index.ts +83 -0
  1173. package/src/core/stdlib/series/pivots.ts +63 -0
  1174. package/src/core/stdlib/series/statistics.ts +207 -0
  1175. package/src/core/stdlib/series/totals.ts +164 -0
  1176. package/src/core/stdlib/trend/directional.ts +196 -0
  1177. package/src/core/stdlib/trend/index.ts +13 -0
  1178. package/src/core/stdlib/trend/psar.ts +131 -0
  1179. package/src/core/stdlib/trend/supertrend.ts +100 -0
  1180. package/src/core/stdlib/values/bar.ts +54 -0
  1181. package/src/core/stdlib/values/index.ts +14 -0
  1182. package/src/core/stdlib/values/lookback.ts +198 -0
  1183. package/src/core/stdlib/values/region.ts +86 -0
  1184. package/src/core/stdlib/values/tail.ts +58 -0
  1185. package/src/core/stdlib/values/value.ts +82 -0
  1186. package/src/core/stdlib/volatility/bands.ts +178 -0
  1187. package/src/core/stdlib/volatility/deviation.ts +111 -0
  1188. package/src/core/stdlib/volatility/index.ts +48 -0
  1189. package/src/core/stdlib/volatility/measures.ts +96 -0
  1190. package/src/core/stdlib/volatility/range.ts +143 -0
  1191. package/src/core/stdlib/volume/accumulation.ts +152 -0
  1192. package/src/core/stdlib/volume/flow.ts +173 -0
  1193. package/src/core/stdlib/volume/index.ts +43 -0
  1194. package/src/core/stdlib/volume/weighted.ts +101 -0
  1195. package/src/core/version/version.generated.ts +2 -2
  1196. package/src/editor/complete.ts +266 -0
  1197. package/src/editor/diagnose.ts +71 -0
  1198. package/src/editor/format.ts +85 -0
  1199. package/src/editor/highlight.ts +110 -0
  1200. package/src/editor/hover.ts +199 -0
  1201. package/src/editor/index.ts +65 -0
  1202. package/src/editor/kinds.ts +157 -0
  1203. package/src/editor/layout.ts +189 -0
  1204. package/src/editor/manifest.ts +119 -0
  1205. package/src/editor/reading.ts +69 -0
  1206. package/src/editor/scan.ts +162 -0
  1207. package/src/editor/scope.ts +122 -0
  1208. package/src/editor/signature.ts +150 -0
  1209. package/src/editor/site.ts +233 -0
  1210. package/src/editor/spacing.ts +132 -0
package/spec/errors.json CHANGED
@@ -92,7 +92,7 @@
92
92
  },
93
93
  "spec": "language.md 3.1, 3.3, 3.12",
94
94
  "refines": null,
95
- "test": "tests/errors/OS1001"
95
+ "test": "tests/examples/rejected/OS1001.oscript"
96
96
  },
97
97
  {
98
98
  "code": "OS1002",
@@ -111,7 +111,7 @@
111
111
  },
112
112
  "spec": "language.md 3.10",
113
113
  "refines": null,
114
- "test": "tests/errors/OS1002"
114
+ "test": "tests/examples/rejected/OS1002.oscript"
115
115
  },
116
116
  {
117
117
  "code": "OS1003",
@@ -129,12 +129,12 @@
129
129
  "fix": "Indent this line to {expected} spaces to keep it in the block, or to {line}'s own indentation to end the block here.",
130
130
  "autofix": true,
131
131
  "example": {
132
- "before": "if trending\n fast = ema(close, 9)\n slow = ema(close, 21)",
133
- "after": "if trending\n fast = ema(close, 9)\n slow = ema(close, 21)"
132
+ "before": "if trending\n body = close - open\n wick = high - low",
133
+ "after": "if trending\n body = close - open\n wick = high - low"
134
134
  },
135
135
  "spec": "language.md 3.10",
136
136
  "refines": null,
137
- "test": "tests/errors/OS1003"
137
+ "test": "tests/examples/rejected/OS1003.oscript"
138
138
  },
139
139
  {
140
140
  "code": "OS1004",
@@ -155,7 +155,7 @@
155
155
  },
156
156
  "spec": "language.md 3.6",
157
157
  "refines": null,
158
- "test": "tests/errors/OS1004"
158
+ "test": "tests/examples/rejected/OS1004.oscript"
159
159
  },
160
160
  {
161
161
  "code": "OS1005",
@@ -176,7 +176,7 @@
176
176
  },
177
177
  "spec": "language.md 3.6",
178
178
  "refines": "OS1004",
179
- "test": "tests/errors/OS1005"
179
+ "test": "tests/examples/rejected/OS1005.oscript"
180
180
  },
181
181
  {
182
182
  "code": "OS1006",
@@ -195,7 +195,7 @@
195
195
  },
196
196
  "spec": "language.md 10.1",
197
197
  "refines": null,
198
- "test": "tests/errors/OS1006"
198
+ "test": "tests/examples/rejected/OS1006.oscript"
199
199
  },
200
200
  {
201
201
  "code": "OS1007",
@@ -214,7 +214,7 @@
214
214
  },
215
215
  "spec": "language.md 3.10",
216
216
  "refines": null,
217
- "test": "tests/errors/OS1007"
217
+ "test": "tests/examples/rejected/OS1007.oscript"
218
218
  },
219
219
  {
220
220
  "code": "OS1008",
@@ -236,7 +236,7 @@
236
236
  },
237
237
  "spec": "language.md 9.3",
238
238
  "refines": null,
239
- "test": "tests/errors/OS1008"
239
+ "test": "tests/examples/rejected/OS1008.oscript"
240
240
  },
241
241
  {
242
242
  "code": "OS1009",
@@ -257,7 +257,7 @@
257
257
  },
258
258
  "spec": "language.md 10.5",
259
259
  "refines": null,
260
- "test": "tests/errors/OS1009"
260
+ "test": "tests/examples/rejected/OS1009.oscript"
261
261
  },
262
262
  {
263
263
  "code": "OS1010",
@@ -278,7 +278,7 @@
278
278
  },
279
279
  "spec": "language.md 3.10",
280
280
  "refines": null,
281
- "test": "tests/errors/OS1010"
281
+ "test": "tests/examples/rejected/OS1010.oscript"
282
282
  },
283
283
  {
284
284
  "code": "OS1011",
@@ -299,7 +299,7 @@
299
299
  },
300
300
  "spec": "language.md 8.2",
301
301
  "refines": null,
302
- "test": "tests/errors/OS1011"
302
+ "test": "tests/examples/rejected/OS1011.oscript"
303
303
  },
304
304
  {
305
305
  "code": "OS1012",
@@ -321,7 +321,7 @@
321
321
  },
322
322
  "spec": "language.md 3.11",
323
323
  "refines": null,
324
- "test": "tests/errors/OS1012"
324
+ "test": "tests/examples/rejected/OS1012.oscript"
325
325
  },
326
326
  {
327
327
  "code": "OS1013",
@@ -345,7 +345,7 @@
345
345
  },
346
346
  "spec": "language.md 19",
347
347
  "refines": null,
348
- "test": "tests/errors/OS1013"
348
+ "test": "tests/examples/rejected/OS1013.oscript"
349
349
  },
350
350
  {
351
351
  "code": "OS1014",
@@ -366,7 +366,7 @@
366
366
  },
367
367
  "spec": "language.md 11.2",
368
368
  "refines": null,
369
- "test": "tests/errors/OS1014"
369
+ "test": "tests/examples/rejected/OS1014.oscript"
370
370
  },
371
371
  {
372
372
  "code": "OS1015",
@@ -385,7 +385,7 @@
385
385
  },
386
386
  "spec": "language.md 9.5",
387
387
  "refines": null,
388
- "test": "tests/errors/OS1015"
388
+ "test": "tests/examples/rejected/OS1015.oscript"
389
389
  },
390
390
  {
391
391
  "code": "OS1016",
@@ -407,7 +407,7 @@
407
407
  },
408
408
  "spec": "language.md 10.2",
409
409
  "refines": null,
410
- "test": "tests/errors/OS1016"
410
+ "test": "tests/examples/rejected/OS1016.oscript"
411
411
  },
412
412
  {
413
413
  "code": "OS1017",
@@ -428,7 +428,7 @@
428
428
  },
429
429
  "spec": "language.md 10.6",
430
430
  "refines": null,
431
- "test": "tests/errors/OS1017"
431
+ "test": "tests/examples/rejected/OS1017.oscript"
432
432
  },
433
433
  {
434
434
  "code": "OS1018",
@@ -449,7 +449,7 @@
449
449
  },
450
450
  "spec": "language.md 3.10",
451
451
  "refines": null,
452
- "test": "tests/errors/OS1018"
452
+ "test": "tests/examples/rejected/OS1018.oscript"
453
453
  },
454
454
  {
455
455
  "code": "OS1019",
@@ -471,7 +471,7 @@
471
471
  },
472
472
  "spec": "language.md 3.4",
473
473
  "refines": null,
474
- "test": "tests/errors/OS1019"
474
+ "test": "tests/examples/rejected/OS1019.oscript"
475
475
  },
476
476
  {
477
477
  "code": "OS1020",
@@ -492,7 +492,7 @@
492
492
  },
493
493
  "spec": "language.md 10.3",
494
494
  "refines": null,
495
- "test": "tests/errors/OS1020"
495
+ "test": "tests/examples/rejected/OS1020.oscript"
496
496
  },
497
497
  {
498
498
  "code": "OS1021",
@@ -513,7 +513,7 @@
513
513
  },
514
514
  "spec": "language.md 4",
515
515
  "refines": null,
516
- "test": "tests/errors/OS1021"
516
+ "test": "tests/examples/rejected/OS1021.oscript"
517
517
  },
518
518
  {
519
519
  "code": "OS1022",
@@ -530,11 +530,11 @@
530
530
  "autofix": false,
531
531
  "example": {
532
532
  "before": "len = input(14, \"Length\") +",
533
- "after": "len = input(14, \"Length\") + 1"
533
+ "after": "len = input(14, \"Length\")"
534
534
  },
535
535
  "spec": "language.md 3.11",
536
536
  "refines": null,
537
- "test": "tests/errors/OS1022"
537
+ "test": "tests/examples/rejected/OS1022.oscript"
538
538
  },
539
539
  {
540
540
  "code": "OS1023",
@@ -551,11 +551,11 @@
551
551
  "autofix": false,
552
552
  "example": {
553
553
  "before": "if trending\n fn smoothed(src) => sma(src, 9)\n plot(smoothed(close), \"Smooth\", aqua)",
554
- "after": "fn smoothed(src) => sma(src, 9)\n\nif trending\n plot(smoothed(close), \"Smooth\", aqua)"
554
+ "after": "fn smoothed(src) => sma(src, 9)\n\nsmooth = smoothed(close)\nplot(trending ? smooth : none, \"Smooth\", aqua)"
555
555
  },
556
556
  "spec": "language.md 11.1",
557
557
  "refines": null,
558
- "test": "tests/errors/OS1023"
558
+ "test": "tests/examples/rejected/OS1023.oscript"
559
559
  },
560
560
  {
561
561
  "code": "OS1024",
@@ -576,7 +576,7 @@
576
576
  },
577
577
  "spec": "language.md 9.6, 14.1, 19",
578
578
  "refines": null,
579
- "test": "tests/errors/OS1024"
579
+ "test": "tests/examples/rejected/OS1024.oscript"
580
580
  },
581
581
  {
582
582
  "code": "OS1025",
@@ -598,7 +598,7 @@
598
598
  },
599
599
  "spec": "language.md 15.2, 19",
600
600
  "refines": null,
601
- "test": "tests/errors/OS1025"
601
+ "test": "tests/examples/rejected/OS1025.oscript"
602
602
  },
603
603
  {
604
604
  "code": "OS1026",
@@ -619,7 +619,7 @@
619
619
  },
620
620
  "spec": "language.md 3.2",
621
621
  "refines": null,
622
- "test": "tests/errors/OS1026"
622
+ "test": "tests/examples/rejected/OS1026.oscript"
623
623
  },
624
624
  {
625
625
  "code": "OS1027",
@@ -640,7 +640,7 @@
640
640
  },
641
641
  "spec": "language.md 3.8",
642
642
  "refines": "OS1001",
643
- "test": "tests/errors/OS1027"
643
+ "test": "tests/examples/rejected/OS1027.oscript"
644
644
  },
645
645
  {
646
646
  "code": "OS1028",
@@ -663,7 +663,7 @@
663
663
  },
664
664
  "spec": "language.md 3.11",
665
665
  "refines": "OS1003",
666
- "test": "tests/errors/OS1028"
666
+ "test": "tests/examples/rejected/OS1028.oscript"
667
667
  },
668
668
  {
669
669
  "code": "OS1029",
@@ -685,7 +685,7 @@
685
685
  },
686
686
  "spec": "language.md 3.3, 3.5",
687
687
  "refines": "OS1001",
688
- "test": "tests/errors/OS1029"
688
+ "test": "tests/examples/rejected/OS1029.oscript"
689
689
  },
690
690
  {
691
691
  "code": "OS2001",
@@ -707,7 +707,7 @@
707
707
  },
708
708
  "spec": "language.md 12.2, 12.5",
709
709
  "refines": null,
710
- "test": "tests/errors/OS2001"
710
+ "test": "tests/unit/check-names.test.ts"
711
711
  },
712
712
  {
713
713
  "code": "OS2002",
@@ -729,7 +729,7 @@
729
729
  },
730
730
  "spec": "language.md 12.3, 12.4",
731
731
  "refines": null,
732
- "test": "tests/errors/OS2002"
732
+ "test": "tests/unit/check-names.test.ts"
733
733
  },
734
734
  {
735
735
  "code": "OS2003",
@@ -739,11 +739,11 @@
739
739
  "since": 1,
740
740
  "message": "{leftType} and {rightType} do not mix here.",
741
741
  "placeholders": {
742
- "leftType": "the type of the left operand or of the name's first assignment",
742
+ "leftType": "the type of the left operand or of the name's first assignment, or the words a per-bar value where the position takes a value of any type and a declaration handle was written",
743
743
  "rightType": "the type of the right operand or of the value being assigned"
744
744
  },
745
745
  "cause": "There is no implicit conversion anywhere in the language: 0 is not false, an empty string is not false, and a number is not a string. A name's type is fixed by its first assignment, so assigning a different type later arrives here too. A first assignment of none fixes no type, because none is a member of every type; the type comes from the first assignment that gives a definite one, and this code names the second definite type rather than the first. Every silent coercion rule is a source of bugs that survive review, and a trading script that quietly treats a zero as a false is a bug nobody finds until it costs money. A declaration handle arrives here as well: plot(), plotCandles(), fill() and level() return the compile-time half of a declaration (language.md 5.4), so a handle in a position that requires a value has nothing to give, and the message names its type as plot, fill or level.",
746
- "fix": "Convert explicitly: text(x) for a string, number(s) for a number, bool(x) for a bool, or use a separate name for the second value. A plot, fill or level handle converts to nothing: leave it named at the top level, pass it to fill(), and use draw.line() or draw.box() where the script needs something it can keep.",
746
+ "fix": "Convert explicitly: text(x) for a string, or text(x, decimals) to fix the decimals. Where no conversion applies, write the value in the type the line needs, or give the second value a name of its own. A plot, fill or level handle converts to nothing: leave it named at the top level, pass it to fill(), and use draw.line() or draw.box() where the script needs something it can keep.",
747
747
  "autofix": false,
748
748
  "example": {
749
749
  "before": "s = \"count: \" + 5",
@@ -751,7 +751,7 @@
751
751
  },
752
752
  "spec": "language.md 5.3, 5.4, 10.1",
753
753
  "refines": null,
754
- "test": "tests/errors/OS2003"
754
+ "test": "tests/unit/check-handles.test.ts"
755
755
  },
756
756
  {
757
757
  "code": "OS2004",
@@ -764,7 +764,7 @@
764
764
  "expr": "the expression the history operator was applied to"
765
765
  },
766
766
  "cause": "History is retained for four kinds of value: a built-in series, a name assigned at the top level of the file, a call to a function declared to return a series, and a series parameter of a user function. Retaining it for every temporary inside every block would cost memory per bar and would not run fifty thousand bars in a browser tab. A name bound to a declaration handle is none of the four, although it sits at the top level: it is a compile-time binding with no per-bar value at all. A runtime object carries no history either, so [] on a line, a label, a box, a polyline or a table is this error as well (language.md 5.4).",
767
- "fix": "Assign the value to a name at the top level of the file, then read that name's history.",
767
+ "fix": "If the value is a per-bar number computed inside a block or left as a temporary, assign it at the top level of the file and read the history of that top level name. If it is a declaration handle, a runtime object or a library fact that is not a series, no name gives it a history: assign what you want to look back at to a top level name of its own, and read that.",
768
768
  "autofix": false,
769
769
  "example": {
770
770
  "before": "if trending\n body = close - open\n plot(body[1], \"Previous body\", aqua)",
@@ -772,7 +772,7 @@
772
772
  },
773
773
  "spec": "language.md 5.2, 5.4",
774
774
  "refines": null,
775
- "test": "tests/errors/OS2004"
775
+ "test": "tests/unit/check-types.test.ts"
776
776
  },
777
777
  {
778
778
  "code": "OS2005",
@@ -794,7 +794,7 @@
794
794
  },
795
795
  "spec": "language.md 11.4",
796
796
  "refines": null,
797
- "test": "tests/errors/OS2005"
797
+ "test": "tests/unit/check-names.test.ts"
798
798
  },
799
799
  {
800
800
  "code": "OS2006",
@@ -815,7 +815,7 @@
815
815
  },
816
816
  "spec": "language.md 10.3",
817
817
  "refines": null,
818
- "test": "tests/errors/OS2006"
818
+ "test": "tests/unit/check-names.test.ts"
819
819
  },
820
820
  {
821
821
  "code": "OS2007",
@@ -834,7 +834,7 @@
834
834
  },
835
835
  "spec": "language.md 13.1",
836
836
  "refines": null,
837
- "test": "tests/errors/OS2007"
837
+ "test": "tests/unit/check-support.ts"
838
838
  },
839
839
  {
840
840
  "code": "OS2008",
@@ -856,7 +856,7 @@
856
856
  },
857
857
  "spec": "language.md 13.1",
858
858
  "refines": null,
859
- "test": "tests/errors/OS2008"
859
+ "test": "tests/unit/check-calls.test.ts"
860
860
  },
861
861
  {
862
862
  "code": "OS2009",
@@ -879,7 +879,7 @@
879
879
  },
880
880
  "spec": "language.md 15.2",
881
881
  "refines": null,
882
- "test": "tests/errors/OS2009"
882
+ "test": "tests/unit/check-names.test.ts"
883
883
  },
884
884
  {
885
885
  "code": "OS2010",
@@ -902,7 +902,7 @@
902
902
  },
903
903
  "spec": "language.md 15.1",
904
904
  "refines": null,
905
- "test": "tests/errors/OS2010"
905
+ "test": null
906
906
  },
907
907
  {
908
908
  "code": "OS2011",
@@ -924,7 +924,7 @@
924
924
  },
925
925
  "spec": "language.md 5.3, 10.2",
926
926
  "refines": "OS2003",
927
- "test": "tests/errors/OS2011"
927
+ "test": "tests/unit/check-types.test.ts"
928
928
  },
929
929
  {
930
930
  "code": "OS2012",
@@ -938,7 +938,7 @@
938
938
  "rightType": "the type of the arm after the colon"
939
939
  },
940
940
  "cause": "The ternary yields one value, so both arms must agree on its type. The one exception is none, which is a member of every type and is how an arm says there is nothing here.",
941
- "fix": "Make both arms the same type with text() or number(), or use none for the empty arm.",
941
+ "fix": "Make both arms the same type with text() or toNumber(), or use none for the empty arm.",
942
942
  "autofix": false,
943
943
  "example": {
944
944
  "before": "label = up ? 1 : \"down\"",
@@ -946,7 +946,7 @@
946
946
  },
947
947
  "spec": "language.md 9.5",
948
948
  "refines": "OS2003",
949
- "test": "tests/errors/OS2012"
949
+ "test": "tests/unit/check-types.test.ts"
950
950
  },
951
951
  {
952
952
  "code": "OS2013",
@@ -969,7 +969,7 @@
969
969
  },
970
970
  "spec": "language.md 14.1",
971
971
  "refines": "OS2003",
972
- "test": "tests/errors/OS2013"
972
+ "test": "tests/unit/check-types.test.ts"
973
973
  },
974
974
  {
975
975
  "code": "OS2014",
@@ -990,7 +990,7 @@
990
990
  },
991
991
  "spec": "language.md 11.1, 18",
992
992
  "refines": null,
993
- "test": "tests/errors/OS2014"
993
+ "test": "tests/emit/worked-example.test.ts"
994
994
  },
995
995
  {
996
996
  "code": "OS2015",
@@ -1009,7 +1009,7 @@
1009
1009
  },
1010
1010
  "spec": "language.md 14.1",
1011
1011
  "refines": null,
1012
- "test": "tests/errors/OS2015"
1012
+ "test": "tests/unit/check-types.test.ts"
1013
1013
  },
1014
1014
  {
1015
1015
  "code": "OS2016",
@@ -1030,7 +1030,7 @@
1030
1030
  },
1031
1031
  "spec": "language.md 5.1, 5.4, 19",
1032
1032
  "refines": null,
1033
- "test": "tests/errors/OS2016"
1033
+ "test": "tests/unit/check-types.test.ts"
1034
1034
  },
1035
1035
  {
1036
1036
  "code": "OS2017",
@@ -1052,7 +1052,7 @@
1052
1052
  },
1053
1053
  "spec": "language.md 11.1",
1054
1054
  "refines": null,
1055
- "test": "tests/errors/OS2017"
1055
+ "test": "tests/unit/check-names.test.ts"
1056
1056
  },
1057
1057
  {
1058
1058
  "code": "OS2018",
@@ -1073,7 +1073,7 @@
1073
1073
  },
1074
1074
  "spec": "language.md 11.2",
1075
1075
  "refines": null,
1076
- "test": "tests/errors/OS2018"
1076
+ "test": "tests/unit/check-names.test.ts"
1077
1077
  },
1078
1078
  {
1079
1079
  "code": "OS2019",
@@ -1094,7 +1094,28 @@
1094
1094
  },
1095
1095
  "spec": "language.md 5.4, 14.1, 19",
1096
1096
  "refines": "OS2016",
1097
- "test": "tests/errors/OS2019"
1097
+ "test": "tests/unit/check-types.test.ts"
1098
+ },
1099
+ {
1100
+ "code": "OS2020",
1101
+ "title": "Name is planned, not implemented",
1102
+ "severity": "error",
1103
+ "stage": "check",
1104
+ "since": 1,
1105
+ "message": "{name} is planned and is not implemented in this version.",
1106
+ "placeholders": {
1107
+ "name": "the planned name that was called or read"
1108
+ },
1109
+ "cause": "The library names a few calls and facts it does not implement yet, so that the gap is visible rather than left for a reader to guess at (stdlib.md 1). The checker knows this name and knows it carries no behaviour, which is a different fact from a name it has never heard of: nothing about the spelling is wrong, no line above it would help, and the name starts working on a version that implements it.",
1110
+ "fix": "Compute what {name} would give from names the library implements today, or take the line out until a version implements it. Do not reach for the nearest name that compiles: a neighbour computes something else, and a plot that quietly changes meaning is worse than one that refuses to compile.",
1111
+ "autofix": false,
1112
+ "example": {
1113
+ "before": "zScore = (close - sma(close, 20)) / stdev(close, 20)\nplot(math.tanh(zScore), \"Squashed\", aqua)",
1114
+ "after": "zScore = (close - sma(close, 20)) / stdev(close, 20)\ndoubled = exp(2 * zScore)\nplot((doubled - 1) / (doubled + 1), \"Squashed\", aqua)"
1115
+ },
1116
+ "spec": "stdlib.md 1",
1117
+ "refines": "OS2001",
1118
+ "test": "tests/unit/check-names.test.ts"
1098
1119
  },
1099
1120
  {
1100
1121
  "code": "OS3001",
@@ -1113,12 +1134,12 @@
1113
1134
  "fix": "Pass the arguments the signature names: {signature}.",
1114
1135
  "autofix": false,
1115
1136
  "example": {
1116
- "before": "e = ema(close)",
1137
+ "before": "e = ema(close, 9, 2)",
1117
1138
  "after": "e = ema(close, 9)"
1118
1139
  },
1119
1140
  "spec": "language.md 11.2",
1120
1141
  "refines": null,
1121
- "test": "tests/errors/OS3001"
1142
+ "test": "tests/unit/check-calls.test.ts"
1122
1143
  },
1123
1144
  {
1124
1145
  "code": "OS3002",
@@ -1142,7 +1163,7 @@
1142
1163
  },
1143
1164
  "spec": "language.md 11.2",
1144
1165
  "refines": null,
1145
- "test": "tests/errors/OS3002"
1166
+ "test": "tests/unit/check-calls.test.ts"
1146
1167
  },
1147
1168
  {
1148
1169
  "code": "OS3003",
@@ -1159,11 +1180,11 @@
1159
1180
  "autofix": false,
1160
1181
  "example": {
1161
1182
  "before": "study(\"Range\", precision = round(close / 1000))",
1162
- "after": "study(\"Range\", precision = input(2, \"Precision\"))"
1183
+ "after": "study(\"Range\", precision = input(2, \"precision\"))"
1163
1184
  },
1164
1185
  "spec": "language.md 13.2, 15.3",
1165
1186
  "refines": null,
1166
- "test": "tests/errors/OS3003"
1187
+ "test": "tests/unit/check-calls.test.ts"
1167
1188
  },
1168
1189
  {
1169
1190
  "code": "OS3004",
@@ -1182,12 +1203,12 @@
1182
1203
  "fix": "Pass a whole number inside {range}, and wrap a computed value in floor() or round().",
1183
1204
  "autofix": false,
1184
1205
  "example": {
1185
- "before": "s = sma(close, len / 2)",
1186
- "after": "s = sma(close, floor(len / 2))"
1206
+ "before": "t = table(\"Summary\", 2.5, 2)",
1207
+ "after": "t = table(\"Summary\", 3, 2)"
1187
1208
  },
1188
1209
  "spec": "language.md 5.1, 10.3",
1189
1210
  "refines": null,
1190
- "test": "tests/errors/OS3004"
1211
+ "test": "tests/engine/machine.test.ts"
1191
1212
  },
1192
1213
  {
1193
1214
  "code": "OS3005",
@@ -1206,7 +1227,7 @@
1206
1227
  },
1207
1228
  "spec": "language.md 11.2",
1208
1229
  "refines": null,
1209
- "test": "tests/errors/OS3005"
1230
+ "test": "tests/unit/check-calls.test.ts"
1210
1231
  },
1211
1232
  {
1212
1233
  "code": "OS3006",
@@ -1228,7 +1249,7 @@
1228
1249
  },
1229
1250
  "spec": "language.md 7.1, 15.3; stdlib.md 17.6",
1230
1251
  "refines": null,
1231
- "test": "tests/errors/OS3006"
1252
+ "test": "tests/unit/check-calls.test.ts"
1232
1253
  },
1233
1254
  {
1234
1255
  "code": "OS3007",
@@ -1243,11 +1264,11 @@
1243
1264
  "autofix": false,
1244
1265
  "example": {
1245
1266
  "before": "if useBand\n len = input(20, \"Length\")",
1246
- "after": "len = input(20, \"Length\")\nif useBand\n b = sma(close, len)"
1267
+ "after": "len = input(20, \"Length\")\nb = sma(close, len)\nplot(useBand ? b : none, \"Band\", aqua)"
1247
1268
  },
1248
1269
  "spec": "language.md 13.4",
1249
1270
  "refines": null,
1250
- "test": "tests/errors/OS3007"
1271
+ "test": "tests/unit/check-calls.test.ts"
1251
1272
  },
1252
1273
  {
1253
1274
  "code": "OS3008",
@@ -1271,7 +1292,7 @@
1271
1292
  },
1272
1293
  "spec": "language.md 13.3",
1273
1294
  "refines": null,
1274
- "test": "tests/errors/OS3008"
1295
+ "test": "tests/unit/check-calls.test.ts"
1275
1296
  },
1276
1297
  {
1277
1298
  "code": "OS3009",
@@ -1289,12 +1310,12 @@
1289
1310
  "fix": "Set {required} in the declaration, or choose a value of {option} that stands on its own.",
1290
1311
  "autofix": false,
1291
1312
  "example": {
1292
- "before": "study(\"Ticks\")\n\nif close > open\n alert(\"Up\", frequency = \"everyUpdate\")",
1293
- "after": "study(\"Ticks\", onUnconfirmed = true)\n\nif close > open\n alert(\"Up\", frequency = \"everyUpdate\")"
1313
+ "before": "study(\"Ticks\")\n\nif close > open\n alert(\"Up\", id = \"up\", frequency = \"everyUpdate\")",
1314
+ "after": "study(\"Ticks\", onUnconfirmed = true)\n\nif close > open\n alert(\"Up\", id = \"up\", frequency = \"everyUpdate\")"
1294
1315
  },
1295
1316
  "spec": "language.md 7.5, 13.2",
1296
1317
  "refines": null,
1297
- "test": "tests/errors/OS3009"
1318
+ "test": "tests/unit/check-calls.test.ts"
1298
1319
  },
1299
1320
  {
1300
1321
  "code": "OS3010",
@@ -1316,7 +1337,7 @@
1316
1337
  },
1317
1338
  "spec": "language.md 13.3, 15.3",
1318
1339
  "refines": null,
1319
- "test": "tests/errors/OS3010"
1340
+ "test": "tests/unit/check-calls.test.ts"
1320
1341
  },
1321
1342
  {
1322
1343
  "code": "OS3011",
@@ -1332,7 +1353,7 @@
1332
1353
  "found": "the type of the expression at the call site"
1333
1354
  },
1334
1355
  "cause": "Arguments are checked against the declared parameter types, with broadcast as the only widening: a plain value may be passed where a series is expected, and it is read as that same value on every bar. Nothing else converts on its own. A declaration handle passed to an argument that does not take one arrives here too; where that argument wanted a runtime object the case has its own code, OS3019, and fill's two plot arguments have OS3020.",
1335
- "fix": "Convert the value with text(), number() or bool(), or pass an expression of type {expected}.",
1356
+ "fix": "Convert the value with text(), toNumber() or toBool(), or pass an expression of type {expected}.",
1336
1357
  "autofix": false,
1337
1358
  "example": {
1338
1359
  "before": "e = ema(close, \"9\")",
@@ -1340,7 +1361,7 @@
1340
1361
  },
1341
1362
  "spec": "language.md 5.2, 5.3",
1342
1363
  "refines": null,
1343
- "test": "tests/errors/OS3011"
1364
+ "test": "tests/unit/check-calls.test.ts"
1344
1365
  },
1345
1366
  {
1346
1367
  "code": "OS3012",
@@ -1363,7 +1384,7 @@
1363
1384
  },
1364
1385
  "spec": "language.md 11.2, 13.2",
1365
1386
  "refines": null,
1366
- "test": "tests/errors/OS3012"
1387
+ "test": "tests/unit/check-calls.test.ts"
1367
1388
  },
1368
1389
  {
1369
1390
  "code": "OS3013",
@@ -1384,7 +1405,7 @@
1384
1405
  },
1385
1406
  "spec": "language.md 11.2",
1386
1407
  "refines": null,
1387
- "test": "tests/errors/OS3013"
1408
+ "test": "tests/unit/check-calls.test.ts"
1388
1409
  },
1389
1410
  {
1390
1411
  "code": "OS3014",
@@ -1405,7 +1426,7 @@
1405
1426
  },
1406
1427
  "spec": "language.md 10.7",
1407
1428
  "refines": null,
1408
- "test": "tests/errors/OS3014"
1429
+ "test": "tests/unit/check-calls.test.ts"
1409
1430
  },
1410
1431
  {
1411
1432
  "code": "OS3015",
@@ -1426,7 +1447,7 @@
1426
1447
  },
1427
1448
  "spec": "language.md 10.7",
1428
1449
  "refines": null,
1429
- "test": "tests/errors/OS3015"
1450
+ "test": "tests/unit/check-calls.test.ts"
1430
1451
  },
1431
1452
  {
1432
1453
  "code": "OS3016",
@@ -1448,7 +1469,7 @@
1448
1469
  },
1449
1470
  "spec": "language.md 13.2",
1450
1471
  "refines": null,
1451
- "test": "tests/errors/OS3016"
1472
+ "test": "tests/unit/check-calls.test.ts"
1452
1473
  },
1453
1474
  {
1454
1475
  "code": "OS3017",
@@ -1458,11 +1479,11 @@
1458
1479
  "since": 1,
1459
1480
  "message": "{kind} names must be unique in a file; {name} is also used at line {line}.",
1460
1481
  "placeholders": {
1461
- "kind": "the thing being named: plot, plotCandles, level, input, table or leg",
1482
+ "kind": "the thing being named: plot, plotCandles, level, input, table, alert or leg",
1462
1483
  "name": "the repeated name, quoted",
1463
1484
  "line": "the line of the first use of that name"
1464
1485
  },
1465
- "cause": "The legend row, the settings dialog and the saved layout all key a column by its name, and an alert message names it. Two columns with one name would overwrite each other's saved settings. fill is not on the list: a band has no name of its own and is identified by the two plots it is drawn between. A leg's name is what every later call keys on, so two legs with one name leave every leg call with no answer.",
1486
+ "cause": "The legend row, the settings dialog and the saved layout all key a column by its name, and an alert message names it. Two columns with one name would overwrite each other's saved settings. fill is not on the list: a band has no name of its own and is identified by the two plots it is drawn between. A leg's name is what every later call keys on, so two legs with one name leave every leg call with no answer. An alert is named by its id, written or derived from the line, and a subscription is kept under that name, so two alerts sharing one leave the user subscribed to whichever of the two the host kept.",
1466
1487
  "fix": "Rename one of them so each name appears once.",
1467
1488
  "autofix": false,
1468
1489
  "example": {
@@ -1471,7 +1492,7 @@
1471
1492
  },
1472
1493
  "spec": "language.md 15.3",
1473
1494
  "refines": null,
1474
- "test": "tests/errors/OS3017"
1495
+ "test": "tests/unit/check-calls.test.ts"
1475
1496
  },
1476
1497
  {
1477
1498
  "code": "OS3018",
@@ -1493,7 +1514,7 @@
1493
1514
  },
1494
1515
  "spec": "language.md 13.4",
1495
1516
  "refines": null,
1496
- "test": "tests/errors/OS3018"
1517
+ "test": "tests/unit/check-calls.test.ts"
1497
1518
  },
1498
1519
  {
1499
1520
  "code": "OS3019",
@@ -1517,7 +1538,7 @@
1517
1538
  },
1518
1539
  "spec": "language.md 5.4, 15.3",
1519
1540
  "refines": "OS3011",
1520
- "test": "tests/errors/OS3019"
1541
+ "test": "tests/unit/check-calls.test.ts"
1521
1542
  },
1522
1543
  {
1523
1544
  "code": "OS3020",
@@ -1539,7 +1560,89 @@
1539
1560
  },
1540
1561
  "spec": "language.md 5.4, 15.3",
1541
1562
  "refines": "OS3011",
1542
- "test": "tests/errors/OS3020"
1563
+ "test": "tests/unit/check-calls.test.ts"
1564
+ },
1565
+ {
1566
+ "code": "OS3021",
1567
+ "title": "An input written in place has no title",
1568
+ "severity": "error",
1569
+ "stage": "check",
1570
+ "since": 1,
1571
+ "message": "An input() assigned to no name is named by its title, and this one has no title written as a string literal.",
1572
+ "placeholders": {},
1573
+ "cause": "A host stores one value per input key, and the key is the name the input was assigned to (host-interface.md 8.1). An input written where a value belongs is assigned to no name, so its title is its key as well as its dialog label. The title is read from the line as a string literal rather than folded, because a key and a label are both fixed before anything is computed and because the row a reader sees should be named on the line that declares it. With neither a name nor such a title there is nothing to label the row with and nothing to store a user's value under, and a key made from the input's position instead would move the moment another input was written above it, taking a user's stored value onto a different row.",
1574
+ "fix": "Give it a title written as a string literal: input(2, \"Precision\").",
1575
+ "autofix": false,
1576
+ "example": {
1577
+ "before": "study(\"Range\", precision = input(2))",
1578
+ "after": "study(\"Range\", precision = input(2, \"Precision\"))"
1579
+ },
1580
+ "spec": "language.md 13.4, host-interface.md 8.1",
1581
+ "refines": null,
1582
+ "test": "tests/unit/check-calls.test.ts"
1583
+ },
1584
+ {
1585
+ "code": "OS3022",
1586
+ "title": "Two inputs share a settings key",
1587
+ "severity": "error",
1588
+ "stage": "check",
1589
+ "since": 1,
1590
+ "message": "This input is keyed by its title {name}, which is already the name of the input at line {line}.",
1591
+ "placeholders": {
1592
+ "name": "the title of the input written in place, quoted",
1593
+ "line": "the line of the input that already carries that key"
1594
+ },
1595
+ "cause": "A host stores one value per key (host-interface.md 8.1). An input assigned to a name is keyed by that name, and one written in place is keyed by its title, so a title that spells another input's name puts two rows on one key. One user value would then serve two rows and nothing anywhere decides which of them gets it. Two inputs carrying one title are OS3017 for the same reason.",
1596
+ "fix": "Give this one a title of its own, or rename the input at line {line}.",
1597
+ "autofix": false,
1598
+ "example": {
1599
+ "before": "width = input(2, \"Width\")\nplot(close + width * input(3, \"width\"), \"Band\", aqua)",
1600
+ "after": "width = input(2, \"Width\")\nplot(close + width * input(3, \"Multiplier\"), \"Band\", aqua)"
1601
+ },
1602
+ "spec": "language.md 13.4, host-interface.md 8.1",
1603
+ "refines": "OS3017",
1604
+ "test": "tests/unit/check-calls.test.ts"
1605
+ },
1606
+ {
1607
+ "code": "OS3023",
1608
+ "title": "An order names a leg this file does not declare",
1609
+ "severity": "error",
1610
+ "stage": "check",
1611
+ "since": 1,
1612
+ "message": "{name} was given a {argument}, and this file declares none.",
1613
+ "placeholders": {
1614
+ "name": "the order function that was called",
1615
+ "argument": "the parameter that names the declaration, which is leg"
1616
+ },
1617
+ "cause": "Every order function names the leg it acts on, and a leg is a contract declared before the run (stdlib.md 17.1, 17.6). A file that declares no leg has exactly one, the instrument its chart is showing, and every order acts on it with no leg named. So in a file with no leg declaration there is no name a leg argument could carry, and one written there names nothing. Ignored, it is silent in the most expensive way an order can be: a script that entered under one name and closed another flattened the only leg there is and was told nothing, and a name the script computed was dropped just as quietly. It is refused whatever the argument holds, rather than held against a list of accepted values the way OS3008 holds every other fixed set, because here the list is empty and the value is not what is wrong.",
1618
+ "fix": "Leave {argument} out. A file that declares no leg has exactly one, and every order acts on it.",
1619
+ "autofix": false,
1620
+ "example": {
1621
+ "before": "if pos.isFlat\n buy(qty = 1, leg = \"hedge\")\nelse\n close()",
1622
+ "after": "if pos.isFlat\n buy(qty = 1)\nelse\n close()"
1623
+ },
1624
+ "spec": "stdlib.md 17.1, 17.2",
1625
+ "refines": "OS3008",
1626
+ "test": "tests/unit/check-calls.test.ts"
1627
+ },
1628
+ {
1629
+ "code": "OS3024",
1630
+ "title": "An input written in place has an empty title",
1631
+ "severity": "error",
1632
+ "stage": "check",
1633
+ "since": 1,
1634
+ "message": "An input() assigned to no name is named by its title, and this one's title is empty.",
1635
+ "placeholders": {},
1636
+ "cause": "The title of an input written where a value belongs is its settings key as well as its dialog label (host-interface.md 8.1), and the empty string is neither. There is nothing to store a user's value under and nothing to label the row with, and a second input written the same way would land on the same empty key and take the same stored value. This is the case OS3021 refuses, reached by a different edit, and it carries its own code because OS3021 tells a reader to give the input a title written as a string literal and this reader has written one. A message and a fix that are both already true of the program in front of somebody send them to change nothing. What is wrong here is not that the title was left out: it is that the title says nothing, and the fix is to give it something to say. An input assigned to a name is not this. It has a key already, and an empty title there is read as no title and labelled with the name, which language.md 13.4 states.",
1637
+ "fix": "Give the title something to say: input(2, \"Precision\").",
1638
+ "autofix": false,
1639
+ "example": {
1640
+ "before": "study(\"Range\", precision = input(2, \"\"))",
1641
+ "after": "study(\"Range\", precision = input(2, \"Precision\"))"
1642
+ },
1643
+ "spec": "language.md 13.4, host-interface.md 8.1",
1644
+ "refines": "OS3021",
1645
+ "test": "tests/unit/check-calls.test.ts"
1543
1646
  },
1544
1647
  {
1545
1648
  "code": "OS4001",
@@ -1560,7 +1663,7 @@
1560
1663
  },
1561
1664
  "spec": "language.md 7.4",
1562
1665
  "refines": null,
1563
- "test": "tests/errors/OS4001"
1666
+ "test": "tests/engine/machine.test.ts"
1564
1667
  },
1565
1668
  {
1566
1669
  "code": "OS4002",
@@ -1578,12 +1681,12 @@
1578
1681
  "fix": "Raise the depth in one place: limits(history = {suggested}).",
1579
1682
  "autofix": false,
1580
1683
  "example": {
1581
- "before": "study(\"Long lookback\")\n\nold = close[5000]",
1582
- "after": "study(\"Long lookback\")\nlimits(history = 5001)\n\nold = close[5000]"
1684
+ "before": "study(\"Long lookback\")\nlimits(history = 50)\n\nold = close[120]",
1685
+ "after": "study(\"Long lookback\")\nlimits(history = 120)\n\nold = close[120]"
1583
1686
  },
1584
1687
  "spec": "language.md 7.4, 10.7",
1585
1688
  "refines": null,
1586
- "test": "tests/errors/OS4002"
1689
+ "test": "tests/engine/machine.test.ts"
1587
1690
  },
1588
1691
  {
1589
1692
  "code": "OS4003",
@@ -1601,12 +1704,12 @@
1601
1704
  "fix": "Round the value before passing it: floor() towards zero, round() to nearest.",
1602
1705
  "autofix": false,
1603
1706
  "example": {
1604
- "before": "mid = element(values, size(values) / 2)",
1605
- "after": "mid = element(values, floor(size(values) / 2))"
1707
+ "before": "s = sma(close, len / 2)",
1708
+ "after": "s = sma(close, floor(len / 2))"
1606
1709
  },
1607
1710
  "spec": "language.md 14.1",
1608
1711
  "refines": null,
1609
- "test": "tests/errors/OS4003"
1712
+ "test": null
1610
1713
  },
1611
1714
  {
1612
1715
  "code": "OS4004",
@@ -1629,7 +1732,7 @@
1629
1732
  },
1630
1733
  "spec": "language.md 14.1",
1631
1734
  "refines": null,
1632
- "test": "tests/errors/OS4004"
1735
+ "test": "tests/engine/machine.test.ts"
1633
1736
  },
1634
1737
  {
1635
1738
  "code": "OS4005",
@@ -1651,7 +1754,7 @@
1651
1754
  },
1652
1755
  "spec": "language.md 5.4",
1653
1756
  "refines": null,
1654
- "test": "tests/errors/OS4005"
1757
+ "test": "tests/engine/objects.test.ts"
1655
1758
  },
1656
1759
  {
1657
1760
  "code": "OS4006",
@@ -1672,7 +1775,8 @@
1672
1775
  },
1673
1776
  "spec": "language.md 14.1",
1674
1777
  "refines": null,
1675
- "test": "tests/errors/OS4006"
1778
+ "test": null,
1779
+ "deferred": "Nothing raises this yet. Taking an element from an empty array raises the broader OS4004, and summarising one returns absence, which is the silent drain this entry exists to refuse. Raised when the array library tells the empty case apart from an index outside a filled array, language.md 14.1."
1676
1780
  },
1677
1781
  {
1678
1782
  "code": "OS4007",
@@ -1695,7 +1799,8 @@
1695
1799
  },
1696
1800
  "spec": "language.md 14.1",
1697
1801
  "refines": null,
1698
- "test": "tests/errors/OS4007"
1802
+ "test": null,
1803
+ "deferred": "Nothing raises this yet. slice takes whatever range it is given and returns a shortened or empty array, so a reversed or out of range pair produces a plausible answer instead of a refusal. Raised when the array library checks the range against the array, language.md 14.1."
1699
1804
  },
1700
1805
  {
1701
1806
  "code": "OS4008",
@@ -1719,7 +1824,8 @@
1719
1824
  },
1720
1825
  "spec": "language.md 15.3",
1721
1826
  "refines": null,
1722
- "test": "tests/errors/OS4008"
1827
+ "test": null,
1828
+ "deferred": "Nothing raises this yet. A write outside the declared grid raises the broader OS4004, which names an index rather than the shape the declaration fixed. Raised when the table surface reports the cell against the table it was written to, language.md 15.3."
1723
1829
  },
1724
1830
  {
1725
1831
  "code": "OS4009",
@@ -1742,7 +1848,8 @@
1742
1848
  },
1743
1849
  "spec": "language.md 3.8",
1744
1850
  "refines": null,
1745
- "test": "tests/errors/OS4009"
1851
+ "test": null,
1852
+ "deferred": "Nothing raises this yet. The colour calls build a colour from whatever channels they are given, so a channel outside its range reaches the chart rather than stopping the bar. Raised when the colour library checks each channel, language.md 3.8."
1746
1853
  },
1747
1854
  {
1748
1855
  "code": "OS4010",
@@ -1765,7 +1872,8 @@
1765
1872
  },
1766
1873
  "spec": "language.md 15.2",
1767
1874
  "refines": null,
1768
- "test": "tests/errors/OS4010"
1875
+ "test": null,
1876
+ "deferred": "Nothing raises this yet. Building a date returns absence only when a field is not a whole number, so a month past the end of the year rolls into the next one and becomes a timestamp the script never meant. Raised when the calendar library checks each field against its range, language.md 15.2."
1769
1877
  },
1770
1878
  {
1771
1879
  "code": "OS4011",
@@ -1787,7 +1895,8 @@
1787
1895
  },
1788
1896
  "spec": "language.md 15.2",
1789
1897
  "refines": null,
1790
- "test": "tests/errors/OS4011"
1898
+ "test": null,
1899
+ "deferred": "Nothing raises this yet. Taking part of a string slices the code points it holds, so a position outside the string returns a shorter string or an empty one, which is the plausible empty result this entry refuses. Raised when the string library checks the position against the string, language.md 15.2."
1791
1900
  },
1792
1901
  {
1793
1902
  "code": "OS4012",
@@ -1810,7 +1919,8 @@
1810
1919
  },
1811
1920
  "spec": "language.md 14.1",
1812
1921
  "refines": null,
1813
- "test": "tests/errors/OS4012"
1922
+ "test": null,
1923
+ "deferred": "Nothing raises this yet. A computed name outside the accepted set produces absence on every bar rather than stopping, and only a name written as a literal is refused, at compile time, with OS3008. Raised when the engine checks a computed name on the bar that produced it, language.md 14.1."
1814
1924
  },
1815
1925
  {
1816
1926
  "code": "OS4013",
@@ -1831,7 +1941,7 @@
1831
1941
  },
1832
1942
  "spec": "language.md 10.3",
1833
1943
  "refines": null,
1834
- "test": "tests/errors/OS4013"
1944
+ "test": "tests/engine/machine.test.ts"
1835
1945
  },
1836
1946
  {
1837
1947
  "code": "OS5001",
@@ -1854,7 +1964,7 @@
1854
1964
  },
1855
1965
  "spec": "language.md 10.7",
1856
1966
  "refines": null,
1857
- "test": "tests/errors/OS5001"
1967
+ "test": "tests/engine/budget.test.ts"
1858
1968
  },
1859
1969
  {
1860
1970
  "code": "OS5002",
@@ -1876,8 +1986,9 @@
1876
1986
  "after": "var window = [0.0]\npush(window, close)\nif size(window) > 500\n shift(window)"
1877
1987
  },
1878
1988
  "spec": "language.md 14.1",
1989
+ "unexercised": "The ceiling is the engine's own and it is a large one, so an example that reached it would be a run long enough to fill it rather than a script anybody would read. The before block shows the window that is never trimmed, which is the shape that gets there, and not the bar it stops on.",
1879
1990
  "refines": null,
1880
- "test": "tests/errors/OS5002"
1991
+ "test": "tests/engine/budget.test.ts"
1881
1992
  },
1882
1993
  {
1883
1994
  "code": "OS5003",
@@ -1900,13 +2011,13 @@
1900
2011
  },
1901
2012
  "spec": "language.md 10.7; host-interface.md 10.1",
1902
2013
  "refines": null,
1903
- "test": "tests/errors/OS5003"
2014
+ "test": "tests/engine/verify.test.ts"
1904
2015
  },
1905
2016
  {
1906
2017
  "code": "OS5004",
1907
2018
  "title": "The program needs more state regions than the engine allows",
1908
2019
  "severity": "error",
1909
- "stage": "check",
2020
+ "stage": "host",
1910
2021
  "since": 1,
1911
2022
  "message": "This program needs {found} state regions and the engine allows {max}; {first} calls {second} on several paths.",
1912
2023
  "placeholders": {
@@ -1924,7 +2035,7 @@
1924
2035
  },
1925
2036
  "spec": "compiled-program.md, state regions",
1926
2037
  "refines": null,
1927
- "test": "tests/errors/OS5004"
2038
+ "test": "tests/engine/verify.test.ts"
1928
2039
  },
1929
2040
  {
1930
2041
  "code": "OS5005",
@@ -1946,8 +2057,9 @@
1946
2057
  "after": "inner = c ? (d ? 1 : 2) : 3\nz = a ? (b ? inner : 4) : 5"
1947
2058
  },
1948
2059
  "spec": "language.md 19",
2060
+ "unexercised": "The ceiling is far above anything written by hand, which is the whole point of it: generated source is how a file reaches it. The before block shows the shape at four levels, where a reader can see it, and nothing that short can raise the code.",
1949
2061
  "refines": null,
1950
- "test": "tests/errors/OS5005"
2062
+ "test": "tests/unit/parse-diagnostics.test.ts"
1951
2063
  },
1952
2064
  {
1953
2065
  "code": "OS5006",
@@ -1969,7 +2081,7 @@
1969
2081
  },
1970
2082
  "spec": "language.md 15.2",
1971
2083
  "refines": null,
1972
- "test": "tests/errors/OS5006"
2084
+ "test": "tests/engine/requests-load.test.ts"
1973
2085
  },
1974
2086
  {
1975
2087
  "code": "OS5007",
@@ -1992,7 +2104,7 @@
1992
2104
  },
1993
2105
  "spec": "language.md 7.1",
1994
2106
  "refines": null,
1995
- "test": "tests/errors/OS5007"
2107
+ "test": "tests/engine/budget.test.ts"
1996
2108
  },
1997
2109
  {
1998
2110
  "code": "OS5008",
@@ -2013,14 +2125,15 @@
2013
2125
  "after": "var logLines: array<string> = []\npush(logLines, text(close))\nif size(logLines) > 50\n shift(logLines)"
2014
2126
  },
2015
2127
  "spec": "language.md 5.1",
2128
+ "unexercised": "The ceiling is the engine's own and a bar appends a few characters, so reaching it takes a run of thousands of bars rather than an example. The before block shows the log that is never trimmed, which is the shape that gets there.",
2016
2129
  "refines": null,
2017
- "test": "tests/errors/OS5008"
2130
+ "test": "tests/engine/budget.test.ts"
2018
2131
  },
2019
2132
  {
2020
2133
  "code": "OS5009",
2021
2134
  "title": "The program is too large",
2022
2135
  "severity": "error",
2023
- "stage": "check",
2136
+ "stage": "host",
2024
2137
  "since": 1,
2025
2138
  "message": "This file compiles to {found} instructions and the ceiling is {max}.",
2026
2139
  "placeholders": {
@@ -2036,7 +2149,30 @@
2036
2149
  },
2037
2150
  "spec": "language.md 10.7",
2038
2151
  "refines": null,
2039
- "test": "tests/errors/OS5009"
2152
+ "test": "tests/engine/verify.test.ts"
2153
+ },
2154
+ {
2155
+ "code": "OS5010",
2156
+ "title": "Too many drawing objects",
2157
+ "severity": "error",
2158
+ "stage": "runtime",
2159
+ "since": 1,
2160
+ "message": "A script holds at most {max} drawing objects; this one would be number {found}.",
2161
+ "placeholders": {
2162
+ "max": "the number of drawing objects the host will hold at once",
2163
+ "found": "the count the object being created would have reached"
2164
+ },
2165
+ "cause": "An object lives until the script deletes it, so a script that creates one on every bar and deletes none grows for as long as the chart is open, and nothing can reclaim it: an undeleted object is held by the chart whether or not the script still names it. The ceiling is the host's, and reaching it stops the bar and names the number. The oldest object is never dropped to make room, because a study that is correct on the right of the chart and quietly wrong on the left is worse than one that stops.",
2166
+ "fix": "Delete each object when it stops being wanted, and bound the set: keep the objects in an array, and when it is longer than you want, delete the oldest object and remove the element.",
2167
+ "autofix": false,
2168
+ "example": {
2169
+ "before": "var zones: array<box> = []\npush(zones, draw.box(time, low, time, high))",
2170
+ "after": "var zones: array<box> = []\npush(zones, draw.box(time, low, time, high))\nif size(zones) > 50\n draw.delete(element(zones, 0))\n shift(zones)"
2171
+ },
2172
+ "spec": "stdlib.md 14.4",
2173
+ "unexercised": "The ceiling is the host's and a bar creates one object, so reaching it takes a run of thousands of bars rather than an example. The before block shows the script that creates on every bar and deletes on none, which is the shape that gets there.",
2174
+ "refines": null,
2175
+ "test": "tests/engine/objects.test.ts"
2040
2176
  },
2041
2177
  {
2042
2178
  "code": "OS6001",
@@ -2057,7 +2193,7 @@
2057
2193
  },
2058
2194
  "spec": "language.md 15.2",
2059
2195
  "refines": null,
2060
- "test": "tests/errors/OS6001"
2196
+ "test": "tests/unit/check-repaint.test.ts"
2061
2197
  },
2062
2198
  {
2063
2199
  "code": "OS6002",
@@ -2079,7 +2215,7 @@
2079
2215
  },
2080
2216
  "spec": "language.md 15.2",
2081
2217
  "refines": null,
2082
- "test": "tests/errors/OS6002"
2218
+ "test": "tests/engine/requests-load.test.ts"
2083
2219
  },
2084
2220
  {
2085
2221
  "code": "OS6003",
@@ -2100,7 +2236,7 @@
2100
2236
  },
2101
2237
  "spec": "language.md 15.2",
2102
2238
  "refines": null,
2103
- "test": "tests/errors/OS6003"
2239
+ "test": "tests/unit/check-repaint.test.ts"
2104
2240
  },
2105
2241
  {
2106
2242
  "code": "OS6004",
@@ -2119,12 +2255,13 @@
2119
2255
  "fix": "Recompile the script against this engine's library, or run the program on an engine with the library version it was compiled against.",
2120
2256
  "autofix": false,
2121
2257
  "example": {
2258
+ "kind": "transcript",
2122
2259
  "before": "program: library 5, entry 12 name \"stdev\" arity 3\nengine: library 4, entry \"stdev\" arity 2",
2123
2260
  "after": "program: library 4, entry 12 name \"stdev\" arity 2\nengine: library 4, entry \"stdev\" arity 2"
2124
2261
  },
2125
2262
  "spec": "compiled-program.md, the function table",
2126
2263
  "refines": null,
2127
- "test": "tests/errors/OS6004"
2264
+ "test": "tests/engine/verify.test.ts"
2128
2265
  },
2129
2266
  {
2130
2267
  "code": "OS6005",
@@ -2145,7 +2282,7 @@
2145
2282
  },
2146
2283
  "spec": "language.md 15.2",
2147
2284
  "refines": null,
2148
- "test": "tests/errors/OS6005"
2285
+ "test": "tests/stdlib/calendar.test.ts"
2149
2286
  },
2150
2287
  {
2151
2288
  "code": "OS6006",
@@ -2161,12 +2298,13 @@
2161
2298
  "fix": "Run the program on an engine that has {tag}, or remove the feature that needs it: the tag names it.",
2162
2299
  "autofix": false,
2163
2300
  "example": {
2301
+ "kind": "transcript",
2164
2302
  "before": "program requires: core.1, arrays, orders\nengine has: core.1, arrays",
2165
2303
  "after": "program requires: core.1, arrays\nengine has: core.1, arrays"
2166
2304
  },
2167
2305
  "spec": "compiled-program.md, capability tags",
2168
2306
  "refines": null,
2169
- "test": "tests/errors/OS6006"
2307
+ "test": "tests/engine/verify.test.ts"
2170
2308
  },
2171
2309
  {
2172
2310
  "code": "OS6007",
@@ -2188,7 +2326,7 @@
2188
2326
  },
2189
2327
  "spec": "language.md 15.2",
2190
2328
  "refines": null,
2191
- "test": "tests/errors/OS6007"
2329
+ "test": "tests/hosts/host.ts"
2192
2330
  },
2193
2331
  {
2194
2332
  "code": "OS6008",
@@ -2210,7 +2348,7 @@
2210
2348
  },
2211
2349
  "spec": "language.md 15.2",
2212
2350
  "refines": null,
2213
- "test": "tests/errors/OS6008"
2351
+ "test": "tests/hosts/host.ts"
2214
2352
  },
2215
2353
  {
2216
2354
  "code": "OS6009",
@@ -2233,7 +2371,7 @@
2233
2371
  },
2234
2372
  "spec": "language.md 15.2",
2235
2373
  "refines": null,
2236
- "test": "tests/errors/OS6009"
2374
+ "test": "tests/engine/requests-host.test.ts"
2237
2375
  },
2238
2376
  {
2239
2377
  "code": "OS6010",
@@ -2250,12 +2388,13 @@
2250
2388
  "fix": "Choose an instrument and interval that have history, or widen the chart's date range until bars exist.",
2251
2389
  "autofix": false,
2252
2390
  "example": {
2391
+ "kind": "transcript",
2253
2392
  "before": "host input: symbol SYMBOL, interval 5, bars 0",
2254
2393
  "after": "host input: symbol SYMBOL, interval 5, bars 1240"
2255
2394
  },
2256
2395
  "spec": "language.md 7.1",
2257
2396
  "refines": null,
2258
- "test": "tests/errors/OS6010"
2397
+ "test": "tests/engine/series.test.ts"
2259
2398
  },
2260
2399
  {
2261
2400
  "code": "OS6011",
@@ -2273,12 +2412,13 @@
2273
2412
  "fix": "Reload the history; if the same bar repeats, the feed is sending duplicates and the host has to sort and deduplicate the bars before the engine runs.",
2274
2413
  "autofix": false,
2275
2414
  "example": {
2415
+ "kind": "transcript",
2276
2416
  "before": "host input:\n bar 41 09:15\n bar 42 09:15\n bar 43 09:10",
2277
2417
  "after": "host input:\n bar 41 09:10\n bar 42 09:15\n bar 43 09:20"
2278
2418
  },
2279
2419
  "spec": "language.md 7.1",
2280
2420
  "refines": null,
2281
- "test": "tests/errors/OS6011"
2421
+ "test": "tests/engine/series.test.ts"
2282
2422
  },
2283
2423
  {
2284
2424
  "code": "OS6012",
@@ -2300,7 +2440,7 @@
2300
2440
  },
2301
2441
  "spec": "language.md 15.2",
2302
2442
  "refines": null,
2303
- "test": "tests/errors/OS6012"
2443
+ "test": "tests/engine/requests-host.test.ts"
2304
2444
  },
2305
2445
  {
2306
2446
  "code": "OS6013",
@@ -2323,7 +2463,8 @@
2323
2463
  },
2324
2464
  "spec": "language.md 15.2",
2325
2465
  "refines": null,
2326
- "test": "tests/errors/OS6013"
2466
+ "test": null,
2467
+ "deferred": "Nothing raises this yet. A read's identity is settled once before bar 0 and nothing asks again, so there is no second identity for the engine to compare the first one against. Raised when the engine resolves a read's identity per bar, language.md 15.2."
2327
2468
  },
2328
2469
  {
2329
2470
  "code": "OS6014",
@@ -2346,7 +2487,7 @@
2346
2487
  },
2347
2488
  "spec": "language.md 15.2",
2348
2489
  "refines": null,
2349
- "test": "tests/errors/OS6014"
2490
+ "test": "tests/hosts/reads.ts"
2350
2491
  },
2351
2492
  {
2352
2493
  "code": "OS6015",
@@ -2369,7 +2510,7 @@
2369
2510
  },
2370
2511
  "spec": "language.md 15.2",
2371
2512
  "refines": null,
2372
- "test": "tests/errors/OS6015"
2513
+ "test": "tests/engine/requests-load.test.ts"
2373
2514
  },
2374
2515
  {
2375
2516
  "code": "OS6016",
@@ -2377,21 +2518,22 @@
2377
2518
  "severity": "error",
2378
2519
  "stage": "host",
2379
2520
  "since": 1,
2380
- "message": "This program is in compiled format {found} and this engine implements up to {max}.",
2521
+ "message": "This program is in compiled format {found} and this engine implements format {max}; a different major number is a different format, whether it is higher or lower.",
2381
2522
  "placeholders": {
2382
2523
  "found": "the format version the program declares",
2383
- "max": "the highest format version the engine implements"
2524
+ "max": "the format version this engine implements"
2384
2525
  },
2385
- "cause": "The compiled program is a versioned data format, and an engine refuses a format it cannot read rather than guessing at instructions it does not know. Refusing at load, with both numbers named, is the whole reason the version is carried.",
2526
+ "cause": "The compiled program is a versioned data format, and an engine refuses a format it cannot read rather than guessing at instructions it does not know. Only the major number decides. A higher minor loads, because a minor addition whose absence would change a number has to announce itself as a tag in the program's requires list, and an older minor loads because it carries a subset of the fields this engine already reads. A major number that is not this engine's is a different format wearing the same name, so it is refused in both directions: a program older than this engine is refused for the same reason as one newer, and neither is run approximately. Refusing at load, with both numbers named, is the whole reason the version is carried.",
2386
2527
  "fix": "Run the program on an engine that implements format {found}, or recompile the source with a compiler that emits format {max}.",
2387
2528
  "autofix": false,
2388
2529
  "example": {
2389
- "before": "program: compiled format 3\nengine: compiled format 2",
2390
- "after": "program: compiled format 2\nengine: compiled format 2"
2530
+ "kind": "transcript",
2531
+ "before": "program: compiled format 0.9\nengine: compiled format 1.0",
2532
+ "after": "program: compiled format 1.0\nengine: compiled format 1.0"
2391
2533
  },
2392
2534
  "spec": "compiled-program.md, loading a program",
2393
2535
  "refines": null,
2394
- "test": "tests/errors/OS6016"
2536
+ "test": "tests/engine/verify.test.ts"
2395
2537
  },
2396
2538
  {
2397
2539
  "code": "OS6017",
@@ -2408,12 +2550,13 @@
2408
2550
  "fix": "Upgrade the engine to one that implements language version {found}, or recompile the source against a version it has.",
2409
2551
  "autofix": false,
2410
2552
  "example": {
2553
+ "kind": "transcript",
2411
2554
  "before": "program: language version 2\nengine: language version 1",
2412
2555
  "after": "program: language version 1\nengine: language version 1"
2413
2556
  },
2414
2557
  "spec": "language.md 4.1",
2415
2558
  "refines": null,
2416
- "test": "tests/errors/OS6017"
2559
+ "test": "tests/engine/verify.test.ts"
2417
2560
  },
2418
2561
  {
2419
2562
  "code": "OS6018",
@@ -2430,12 +2573,13 @@
2430
2573
  "fix": "Recompile the script from its source; a program that fails verification came from a broken compiler or was edited after it was written, and neither is repairable by hand.",
2431
2574
  "autofix": false,
2432
2575
  "example": {
2576
+ "kind": "transcript",
2433
2577
  "before": "instruction 402: JUMP target 9911, program holds 812 instructions",
2434
2578
  "after": "instruction 402: JUMP target 411, program holds 812 instructions"
2435
2579
  },
2436
2580
  "spec": "compiled-program.md 3.5, 9.4",
2437
2581
  "refines": null,
2438
- "test": "tests/errors/OS6018"
2582
+ "test": "tests/engine/verify.test.ts"
2439
2583
  },
2440
2584
  {
2441
2585
  "code": "OS6019",
@@ -2453,12 +2597,106 @@
2453
2597
  "fix": "Correct the value in the settings dialog, or widen the input's own min, max or options so the value is allowed.",
2454
2598
  "autofix": false,
2455
2599
  "example": {
2600
+ "kind": "transcript",
2456
2601
  "before": "input len: min 1, max 500\nhost setting: len = 0",
2457
2602
  "after": "input len: min 1, max 500\nhost setting: len = 14"
2458
2603
  },
2459
2604
  "spec": "language.md 13.4",
2460
2605
  "refines": null,
2461
- "test": "tests/errors/OS6019"
2606
+ "test": "tests/engine/verify.test.ts"
2607
+ },
2608
+ {
2609
+ "code": "OS6020",
2610
+ "title": "The report window holds no bars",
2611
+ "severity": "error",
2612
+ "stage": "host",
2613
+ "since": 1,
2614
+ "message": "The window from {from} to {to} holds none of the {count} bars supplied.",
2615
+ "placeholders": {
2616
+ "from": "the first moment the window covers, or the first bar supplied where the host named none",
2617
+ "to": "the last moment it covers",
2618
+ "count": "how many bars were supplied"
2619
+ },
2620
+ "cause": "A report is about the bars inside the window the host chose, and a window holding none of them has nothing to report: no equity point, no trade and no summary. The bars outside it are warmup, which execute and whose orders are real, so an empty window is not an empty run, and reporting one as a flat curve would tell a reader that nothing happened when something did.",
2621
+ "fix": "Widen the window until it covers bars, or supply the bars it covers. Both bounds are inclusive and are compared against the times of the bars supplied rather than against a calendar, so a window that falls inside a gap in the data is empty however wide it looks.",
2622
+ "autofix": false,
2623
+ "example": {
2624
+ "kind": "transcript",
2625
+ "before": "bars supplied: 1240, first day 1, last day 1240\nreport window: day 1300 to day 1400, bars inside 0",
2626
+ "after": "bars supplied: 1240, first day 1, last day 1240\nreport window: day 1100 to day 1240, bars inside 141"
2627
+ },
2628
+ "spec": "language.md 7.1",
2629
+ "refines": null,
2630
+ "test": "tests/backtest/range.test.ts"
2631
+ },
2632
+ {
2633
+ "code": "OS6021",
2634
+ "title": "A run setting cannot be applied as stated",
2635
+ "severity": "error",
2636
+ "stage": "host",
2637
+ "since": 1,
2638
+ "message": "{setting} cannot be applied: {problem}.",
2639
+ "placeholders": {
2640
+ "setting": "the setting that cannot be applied, such as the charge schedule or the comparison tolerance",
2641
+ "problem": "what makes it unusable, such as a charge line levied on a line declared after it"
2642
+ },
2643
+ "cause": "A run states the settings it is carried out under before its first bar, and a setting that cannot be carried out is refused there rather than quietly producing a figure. A charge line levied on lines not declared before it has no single evaluation order, so two engines would charge two different amounts and both would be defensible. A slippage stated in ticks with no tick size to measure a tick in would charge nothing at all, which is a backtest that lies in the strategy's favour. A comparison tolerance carrying a bound and no reason is a failed comparison somebody switched off.",
2644
+ "fix": "State the setting so it can be carried out: declare a charge line after every line it is levied on, supply the tick size a slippage in ticks is measured in, or write down the reason a tolerance needs a bound. Nothing has been computed at the point this is refused, so correcting the setting and running again costs one run.",
2645
+ "autofix": false,
2646
+ "example": {
2647
+ "kind": "transcript",
2648
+ "before": "charge lines: tax on levy, levy\nslippage: 2 ticks, tick size not supplied",
2649
+ "after": "charge lines: levy, tax on levy\nslippage: 2 ticks, tick size 0.05"
2650
+ },
2651
+ "spec": "stdlib.md 17.1",
2652
+ "refines": null,
2653
+ "test": "tests/accounting/schedules.test.ts"
2654
+ },
2655
+ {
2656
+ "code": "OS6022",
2657
+ "title": "The bars are not the bars the record was made from",
2658
+ "severity": "error",
2659
+ "stage": "host",
2660
+ "since": 1,
2661
+ "message": "The bars supplied hash to {found}, and the record was made from {expected}.",
2662
+ "placeholders": {
2663
+ "found": "the hash of the bars supplied now",
2664
+ "expected": "the hash the record names"
2665
+ },
2666
+ "cause": "A record names the bars it was made from by a hash over their canonical form, so a replay can prove it is replaying the same run rather than producing a different study under the same name. Bars are revised: a feed corrects a print, a session is extended, a split is applied to history. A replay over revised bars that reported the original figures would be the most convincing wrong answer this system can produce.",
2667
+ "fix": "Replay against the bars the record names. Where the revision is the point, make a second record over the revised bars and compare the two runs, rather than overwriting one run with the other under one name.",
2668
+ "autofix": false,
2669
+ "example": {
2670
+ "kind": "transcript",
2671
+ "before": "record: bars 1240, hash 9f2c4e...\nsupplied: bars 1240, hash 4ab70d...",
2672
+ "after": "record: bars 1240, hash 9f2c4e...\nsupplied: bars 1240, hash 9f2c4e..."
2673
+ },
2674
+ "spec": "conformance.md 3",
2675
+ "refines": null,
2676
+ "test": "tests/backtest/record.test.ts"
2677
+ },
2678
+ {
2679
+ "code": "OS6023",
2680
+ "title": "Two cost models are stated at once",
2681
+ "severity": "error",
2682
+ "stage": "host",
2683
+ "since": 1,
2684
+ "message": "A charge schedule was supplied, and the declaration states a commission of {commission} in {commissionType}.",
2685
+ "placeholders": {
2686
+ "commission": "the commission the declaration states",
2687
+ "commissionType": "the unit that commission is stated in"
2688
+ },
2689
+ "cause": "The declaration's commission is the script's own statement of what trading costs and a supplied schedule is the platform's, and the two describe the same money. Applied together they charge it twice; applied one at a time they charge whichever an engine happened to prefer, which is a rule nobody wrote down and a figure nobody can explain afterwards. So exactly one of the two is stated for a run, and stating both is refused before the first bar rather than reconciled behind the reader.",
2690
+ "fix": "Supply the schedule and leave the declaration's commission at its default of zero, or state the commission in the declaration and supply no schedule. A schedule is the one of the two that can carry a floor, a cap, a charge levied on a charge, and a cost that falls on one side of the trade only.",
2691
+ "autofix": false,
2692
+ "example": {
2693
+ "kind": "transcript",
2694
+ "before": "declaration: commission 20, per trade\nhost: charge schedule supplied, 4 lines",
2695
+ "after": "declaration: commission 0, per trade\nhost: charge schedule supplied, 4 lines"
2696
+ },
2697
+ "spec": "language.md 13.3; stdlib.md 17.1",
2698
+ "refines": null,
2699
+ "test": "tests/backtest/settings.test.ts"
2462
2700
  },
2463
2701
  {
2464
2702
  "code": "OS7001",
@@ -2480,7 +2718,7 @@
2480
2718
  },
2481
2719
  "spec": "language.md 13.1, 13.3",
2482
2720
  "refines": null,
2483
- "test": "tests/errors/OS7001"
2721
+ "test": "tests/unit/check-names.test.ts"
2484
2722
  },
2485
2723
  {
2486
2724
  "code": "OS7002",
@@ -2502,7 +2740,7 @@
2502
2740
  },
2503
2741
  "spec": "language.md 6.8",
2504
2742
  "refines": null,
2505
- "test": "tests/errors/OS7002"
2743
+ "test": "tests/engine/refusals.test.ts"
2506
2744
  },
2507
2745
  {
2508
2746
  "code": "OS7003",
@@ -2523,7 +2761,7 @@
2523
2761
  },
2524
2762
  "spec": "language.md 15.2",
2525
2763
  "refines": null,
2526
- "test": "tests/errors/OS7003"
2764
+ "test": "tests/unit/check-repaint.test.ts"
2527
2765
  },
2528
2766
  {
2529
2767
  "code": "OS7004",
@@ -2545,7 +2783,7 @@
2545
2783
  },
2546
2784
  "spec": "language.md 13.3",
2547
2785
  "refines": null,
2548
- "test": "tests/errors/OS7004"
2786
+ "test": "tests/engine/refusals.test.ts"
2549
2787
  },
2550
2788
  {
2551
2789
  "code": "OS7005",
@@ -2568,7 +2806,8 @@
2568
2806
  },
2569
2807
  "spec": "language.md 13.3",
2570
2808
  "refines": null,
2571
- "test": "tests/errors/OS7005"
2809
+ "test": "tests/engine/ending.test.ts",
2810
+ "deferred": "Nothing raises this yet. Nothing compares an order's quantity with the lot size its leg trades in, so a quantity no exchange would accept is sent and a backtest can report a trade that could not have happened. The same missing fact is what leaves two other shapes of stdlib.md 17.1 unheld, and all three are settled together. A quantity stated on a close in a declaration counting in lots, cash or an equity percent cannot be held against a position folded in units, which is the narrowing OS7017 carries. And an order that opposes what the leg holds in such a declaration cannot be divided into the half that closes the outgoing position and the half that opens its replacement, so it is sent whole. What is kept without the lot size, and kept in every unit: it is sent on a position reference of its own, whether or not anything has settled, so that it crosses nothing; and the outgoing position is named again, because a close works its own quantity out in units and is divided across the positions holding the leg's own side, oldest first, so that position returns to zero as soon as the leg's net comes back to its side. What is not kept is the instruction itself closing it. The outgoing position is left holding what it holds, and on a leg whose net never returns to that side it is carried for the life of the run with no order able to name it. Raised when order validation lands, stdlib.md 17.2, which is also when the ledger is given the lot size its leg trades in."
2572
2811
  },
2573
2812
  {
2574
2813
  "code": "OS7006",
@@ -2591,7 +2830,7 @@
2591
2830
  },
2592
2831
  "spec": "language.md 13.3",
2593
2832
  "refines": null,
2594
- "test": "tests/errors/OS7006"
2833
+ "test": "tests/engine/refusals.test.ts"
2595
2834
  },
2596
2835
  {
2597
2836
  "code": "OS7007",
@@ -2613,7 +2852,7 @@
2613
2852
  },
2614
2853
  "spec": "language.md 13.3",
2615
2854
  "refines": null,
2616
- "test": "tests/errors/OS7007"
2855
+ "test": "tests/engine/refusals.test.ts"
2617
2856
  },
2618
2857
  {
2619
2858
  "code": "OS7008",
@@ -2635,7 +2874,7 @@
2635
2874
  },
2636
2875
  "spec": "language.md 13.3",
2637
2876
  "refines": null,
2638
- "test": "tests/errors/OS7008"
2877
+ "test": "tests/engine/refusals.test.ts"
2639
2878
  },
2640
2879
  {
2641
2880
  "code": "OS7009",
@@ -2648,15 +2887,15 @@
2648
2887
  "tag": "the tag that was passed"
2649
2888
  },
2650
2889
  "cause": "A tag names an order from the moment it is placed. Acting on a tag that names nothing is a script that has lost track of its own orders, and ignoring the call would leave it believing an order exists that does not. This code is for a call that acts on an order. The reading calls of stdlib.md section 17.3 read the ledger, which keeps a row after the order finishes, so a tag that names no row reads as the entry's documented empty value rather than raising.",
2651
- "fix": "Use the tag the order was placed with, and test order.working({tag}) before acting on it.",
2890
+ "fix": "Use the tag the order was placed with, or cancelAll() where the script means every order it has working.",
2652
2891
  "autofix": false,
2653
2892
  "example": {
2654
- "before": "buy(qty = 1, tag = \"entry\")\norder.bracket(tag = \"entries\", loss = 10)",
2655
- "after": "buy(qty = 1, tag = \"entry\")\nif order.working(\"entry\")\n order.bracket(tag = \"entry\", loss = 10)"
2893
+ "before": "buy(qty = 1, tag = \"entry\")\ncancel(\"entries\")",
2894
+ "after": "buy(qty = 1, tag = \"entry\")\ncancel(\"entry\")"
2656
2895
  },
2657
2896
  "spec": "language.md 15.2; stdlib.md 17.3",
2658
2897
  "refines": null,
2659
- "test": "tests/errors/OS7009"
2898
+ "test": "tests/engine/tags.test.ts"
2660
2899
  },
2661
2900
  {
2662
2901
  "code": "OS7010",
@@ -2675,12 +2914,12 @@
2675
2914
  "fix": "Put the stop below a long entry and the limit above it, and swap the two for a short.",
2676
2915
  "autofix": false,
2677
2916
  "example": {
2678
- "before": "buy(qty = 1)\nexit(limit = pos.avgPrice - atrValue, stop = pos.avgPrice + atrValue)",
2679
- "after": "buy(qty = 1)\nexit(limit = pos.avgPrice + atrValue, stop = pos.avgPrice - atrValue)"
2917
+ "before": "if pos.isFlat\n buy(qty = 1)\nelse\n exit(limit = pos.avgPrice - atrValue, stop = pos.avgPrice + atrValue)",
2918
+ "after": "if pos.isFlat\n buy(qty = 1)\nelse\n exit(limit = pos.avgPrice + atrValue, stop = pos.avgPrice - atrValue)"
2680
2919
  },
2681
2920
  "spec": "language.md 13.3",
2682
2921
  "refines": null,
2683
- "test": "tests/errors/OS7010"
2922
+ "test": "tests/engine/refusals.test.ts"
2684
2923
  },
2685
2924
  {
2686
2925
  "code": "OS7011",
@@ -2702,7 +2941,8 @@
2702
2941
  },
2703
2942
  "spec": "language.md 13.3",
2704
2943
  "refines": null,
2705
- "test": "tests/errors/OS7011"
2944
+ "test": null,
2945
+ "deferred": "Nothing raises this yet. Nothing compares an order's cost with the capital the strategy has, so a backtest can spend money it never had and report a return nobody could have earned. Raised when the ledger holds a capital figure to check against, language.md 13.3."
2706
2946
  },
2707
2947
  {
2708
2948
  "code": "OS7012",
@@ -2720,11 +2960,12 @@
2720
2960
  "autofix": false,
2721
2961
  "example": {
2722
2962
  "before": "if crossUp(fast, slow)\n buy(qty = 1)",
2723
- "after": "if crossUp(fast, slow) and session.isOpen\n buy(qty = 1)"
2963
+ "after": "if crossUp(fast, slow) and session.isIn(\"0915-1530\")\n buy(qty = 1)"
2724
2964
  },
2725
2965
  "spec": "language.md 15.2",
2726
2966
  "refines": null,
2727
- "test": "tests/errors/OS7012"
2967
+ "test": null,
2968
+ "deferred": "Nothing raises this yet. Nothing compares the bar's time with the instrument's session before an order is sent, so an order outside the session leaves the engine as though the venue were open. Raised when order validation reads the session, language.md 15.2."
2728
2969
  },
2729
2970
  {
2730
2971
  "code": "OS7013",
@@ -2742,12 +2983,12 @@
2742
2983
  "fix": "Make the conditions exclusive with else if, or place the exit on this bar and the entry on the next.",
2743
2984
  "autofix": false,
2744
2985
  "example": {
2745
- "before": "if crossUp(fast, slow)\n buy(qty = 1)\nif rsi(close, 14) > 70\n sell(qty = 1)",
2746
- "after": "if crossUp(fast, slow)\n buy(qty = 1)\nelse if rsi(close, 14) > 70\n sell(qty = 1)"
2986
+ "before": "r = rsi(close, 14)\nif crossUp(fast, slow)\n buy(qty = 1)\nif r > 70\n sell(qty = 1)",
2987
+ "after": "r = rsi(close, 14)\nif crossUp(fast, slow)\n buy(qty = 1)\nelse if r > 70\n sell(qty = 1)"
2747
2988
  },
2748
2989
  "spec": "language.md 13.3",
2749
2990
  "refines": null,
2750
- "test": "tests/errors/OS7013"
2991
+ "test": "tests/engine/refusals.test.ts"
2751
2992
  },
2752
2993
  {
2753
2994
  "code": "OS7014",
@@ -2769,7 +3010,8 @@
2769
3010
  },
2770
3011
  "spec": "language.md 13.3",
2771
3012
  "refines": null,
2772
- "test": "tests/errors/OS7014"
3013
+ "test": null,
3014
+ "deferred": "Nothing raises this yet. A refusal that comes back is folded into the ledger row as a status and its text, and no diagnostic is raised, so nothing reports it against the line that placed the order. Raised when a refused fold reports, stdlib.md 17.8."
2773
3015
  },
2774
3016
  {
2775
3017
  "code": "OS7015",
@@ -2788,7 +3030,99 @@
2788
3030
  },
2789
3031
  "spec": "language.md 13.3",
2790
3032
  "refines": null,
2791
- "test": "tests/errors/OS7015"
3033
+ "test": "tests/hosts/strategy.test.ts",
3034
+ "deferred": "Nothing raises this yet. A strategy with nowhere to send orders is not stopped: it places intents that reach nobody, and nothing says so. Raised when the engine checks for a destination before the first order, host-interface.md 7.4."
3035
+ },
3036
+ {
3037
+ "code": "OS7016",
3038
+ "title": "A close names a tag nothing places",
3039
+ "severity": "error",
3040
+ "stage": "check",
3041
+ "since": 1,
3042
+ "message": "No order in this file is placed with the tag {tag}.",
3043
+ "placeholders": {
3044
+ "tag": "the tag the close was given"
3045
+ },
3046
+ "cause": "A close names the part of a position that one tag entered. A tag no order in the file is placed with can never name a part of one, so the call sends nothing on every bar and says nothing, and the script goes on believing it has flattened. It is read from the file rather than from the run because the run cannot tell this from an ordinary bar: a tag that has never named a ledger row is also what a working script looks like before its entry has happened. A tag the script computes is not read, and neither is any close in a file where an order's tag is computed.",
3047
+ "fix": "Use the tag the entry was placed with, or leave the tag out to flatten the whole leg.",
3048
+ "autofix": false,
3049
+ "example": {
3050
+ "before": "if pos.isFlat\n buy(qty = 1, tag = \"entry\")\nelse\n close(tag = \"entries\")",
3051
+ "after": "if pos.isFlat\n buy(qty = 1, tag = \"entry\")\nelse\n close(tag = \"entry\")"
3052
+ },
3053
+ "spec": "stdlib.md 17.2",
3054
+ "refines": null,
3055
+ "test": "tests/unit/check-tags.test.ts"
3056
+ },
3057
+ {
3058
+ "code": "OS7017",
3059
+ "title": "A close states more than it is closing",
3060
+ "severity": "error",
3061
+ "stage": "runtime",
3062
+ "since": 1,
3063
+ "message": "close was given a quantity of {qty}, and {part} has {held} left to close.",
3064
+ "placeholders": {
3065
+ "qty": "the quantity the call stated",
3066
+ "part": "what the close is closing: the leg, or the tag it named",
3067
+ "held": "what is left for a close to send: what that part holds, less what is already working against it"
3068
+ },
3069
+ "cause": "No order crosses zero, and a reducing order can never send more than is available to reduce. A close larger than what is left to close sends one order that flattens the position and opens the opposite one under the same position reference, so a leg that was long ends short and a call named close has opened a position. The quantity is an argument the script wrote, which makes it a claim about the strategy's own position, and this claim is false. Sending what is there instead would leave the script believing it closed the number it asked for, and reading it as a reversal would make close open a position, which is the most expensive naming mistake available. What is left to close is what the leg holds, or what the tag the close names holds, less everything already working against it. A position is folded from settled fills, so an order the destination has not answered has filled nothing and the leg still reads what it held before that order left: measured against that alone, two closes of two on a leg of three each pass the ceiling and the pair ends the leg one short, and a close on every bar against a destination that never answers ends the run short by the position once per bar. The scope is therefore the run and the position rather than the bar, and what is still working is read from the ledger of stdlib.md 17.7: an order neither terminal nor fully filled, counted by the part of it that has not filled. A rejection, a cancellation and an expiry release what they were holding, because nothing more is coming from an order that has ended. What is counted is every order still going on the side that reduces what the leg holds now, and not only the ones that were reductions when they left: an entry the destination has not answered, on a leg the orders after it took the other way, is a reduction now, and leaving it out offered a close the whole of a position five units of which were already on their way. A close that states no quantity is not this: the engine works out what is left and sends it, which is nothing at all once the whole of it is going, and closing a tag that holds nothing sends nothing and says nothing. The comparison is made in full only where the two numbers count the same thing, which is a declaration whose quantity type is units: elsewhere a position folded from filled quantities and a quantity stated in the declaration's own unit are two different kinds of number, and a refusal with the wrong one in it is worse than none. The half of it that needs no conversion is made whatever the declaration counts in, because nothing left to close is zero in every unit. What that leaves unheld is one shape, a quantity stated against a position that is still there in a declaration counting in lots, cash or an equity percent, and joining those two numbers needs the instrument's lot size, which is the fact OS7005 is deferred on.",
3070
+ "fix": "Leave the quantity out and close() flattens what is left, or size the part from pos.size and keep the quantity at or under {held}.",
3071
+ "autofix": false,
3072
+ "example": {
3073
+ "before": "if pos.isFlat\n buy(qty = 1)\nelse\n close(qty = 5)",
3074
+ "after": "if pos.isFlat\n buy(qty = 1)\nelse\n close()"
3075
+ },
3076
+ "spec": "stdlib.md 17.1, 17.2",
3077
+ "refines": null,
3078
+ "test": "tests/engine/closing.test.ts"
3079
+ },
3080
+ {
3081
+ "code": "OS7018",
3082
+ "title": "A frame names an order this strategy did not place",
3083
+ "severity": "error",
3084
+ "stage": "host",
3085
+ "since": 1,
3086
+ "message": "The frame names intent {intent}, and this strategy holds no such order.",
3087
+ "placeholders": {
3088
+ "intent": "the intent id the frame named"
3089
+ },
3090
+ "cause": "Step 1 of the fold locates the row a frame is about, and a frame naming no row cannot be folded into anything. It is a fact about the host rather than about the strategy: a destination answering for an order another strategy placed, or answering for a run that has already ended. The frame changes nothing and is reported, because a fold that passed over it in silence would leave a host's mistake invisible to the only party who can correct it.",
3091
+ "fix": "Answer with the intent id the engine sent. A destination's own reference is carried in the frame's reference field, where the engine records it and never parses it, and it is not what an answer is addressed by.",
3092
+ "autofix": false,
3093
+ "example": {
3094
+ "kind": "transcript",
3095
+ "before": "engine sent: intent 7, intent 8\nframe: intent 11, status filled, filled qty 1",
3096
+ "after": "engine sent: intent 7, intent 8\nframe: intent 8, status filled, filled qty 1"
3097
+ },
3098
+ "spec": "stdlib.md 17.8, 17.14",
3099
+ "refines": null,
3100
+ "test": null,
3101
+ "deferred": "Nothing raises this yet. The fold refuses the frame and records the refusal as a word on the outcome it hands back, and a word is not a catalogue code, so nothing reports it against the run and a host answering for orders it was never handed stays invisible. Raised when the outcome of a fold carries a code and a bar carries a channel for a diagnostic that does not stop it, stdlib.md 17.8."
3102
+ },
3103
+ {
3104
+ "code": "OS7019",
3105
+ "title": "A fill was reported with no price",
3106
+ "severity": "error",
3107
+ "stage": "host",
3108
+ "since": 1,
3109
+ "message": "The frame reports {qty} filled for intent {intent}, and no average fill price.",
3110
+ "placeholders": {
3111
+ "qty": "the cumulative filled quantity the frame reports",
3112
+ "intent": "the intent id the frame named"
3113
+ },
3114
+ "cause": "Step 3 of the fold takes the destination's own average over the cumulative quantity, because the engine never averages two averages of its own. A frame reporting more filled than the row holds and no price to take is a fill that can be marked against nothing: no position average, no realised profit, no equity point. It is refused whole rather than folded for its quantity alone, because a position holding a size and no price is worse than no position at all.",
3115
+ "fix": "Report the average fill price the destination computed over the cumulative quantity, on every frame that reports a quantity greater than the last one. A frame carrying no new quantity needs no price.",
3116
+ "autofix": false,
3117
+ "example": {
3118
+ "kind": "transcript",
3119
+ "before": "frame: intent 8, status filled, filled qty 3, average fill price absent",
3120
+ "after": "frame: intent 8, status filled, filled qty 3, average fill price 104.25"
3121
+ },
3122
+ "spec": "stdlib.md 17.8, 17.14",
3123
+ "refines": null,
3124
+ "test": null,
3125
+ "deferred": "Nothing raises this yet. The fold refuses the frame and records the refusal as a word on the outcome it hands back, and a word is not a catalogue code, so a destination reporting a fill that can be marked against nothing is refused in silence. Raised when the outcome of a fold carries a code and a bar carries a channel for a diagnostic that does not stop it, stdlib.md 17.8."
2792
3126
  },
2793
3127
  {
2794
3128
  "code": "OS8001",
@@ -2809,7 +3143,7 @@
2809
3143
  },
2810
3144
  "spec": "language.md 11.4",
2811
3145
  "refines": null,
2812
- "test": "tests/errors/OS8001"
3146
+ "test": "tests/unit/check-conditional.test.ts"
2813
3147
  },
2814
3148
  {
2815
3149
  "code": "OS8002",
@@ -2830,7 +3164,7 @@
2830
3164
  },
2831
3165
  "spec": "language.md 7.5",
2832
3166
  "refines": null,
2833
- "test": "tests/errors/OS8002"
3167
+ "test": "tests/unit/check-repaint.test.ts"
2834
3168
  },
2835
3169
  {
2836
3170
  "code": "OS8003",
@@ -2851,7 +3185,7 @@
2851
3185
  },
2852
3186
  "spec": "language.md 4",
2853
3187
  "refines": null,
2854
- "test": "tests/errors/OS8003"
3188
+ "test": "tests/unit/diagnostics.test.ts"
2855
3189
  },
2856
3190
  {
2857
3191
  "code": "OS8004",
@@ -2874,7 +3208,8 @@
2874
3208
  },
2875
3209
  "spec": "language.md 6.6",
2876
3210
  "refines": null,
2877
- "test": "tests/errors/OS8004"
3211
+ "test": null,
3212
+ "deferred": "Nothing raises this yet. The checker does not follow which names a branch on a possibly absent condition assigns, so the warmup shape this warns about compiles silently. Raised when the checker follows assignments out of a conditional block, language.md 6.6."
2878
3213
  },
2879
3214
  {
2880
3215
  "code": "OS8005",
@@ -2895,7 +3230,7 @@
2895
3230
  },
2896
3231
  "spec": "language.md 7.5",
2897
3232
  "refines": null,
2898
- "test": "tests/errors/OS8005"
3233
+ "test": "tests/unit/check-repaint.test.ts"
2899
3234
  },
2900
3235
  {
2901
3236
  "code": "OS8006",
@@ -2916,7 +3251,8 @@
2916
3251
  },
2917
3252
  "spec": "language.md 15.2",
2918
3253
  "refines": null,
2919
- "test": "tests/errors/OS8006"
3254
+ "test": null,
3255
+ "deferred": "Nothing raises this yet. The checker does not compare a session average's call with the chart's interval, so the accumulation this warns about compiles silently. Raised when the checker reads the declared interval at the call site, language.md 15.2."
2920
3256
  },
2921
3257
  {
2922
3258
  "code": "OS8007",
@@ -2938,19 +3274,19 @@
2938
3274
  },
2939
3275
  "spec": "language.md 13.2, 15.3",
2940
3276
  "refines": null,
2941
- "test": "tests/errors/OS8007"
3277
+ "test": null
2942
3278
  },
2943
3279
  {
2944
3280
  "code": "OS8008",
2945
- "title": "An alert with no id",
3281
+ "title": "An alert with no fixed id",
2946
3282
  "severity": "warning",
2947
3283
  "stage": "check",
2948
3284
  "since": 1,
2949
- "message": "This alert has no id, so its identity is derived from its position at line {line}.",
3285
+ "message": "This alert has no fixed id, so its identity is derived from its position at line {line}.",
2950
3286
  "placeholders": {
2951
3287
  "line": "the line the alert is declared on"
2952
3288
  },
2953
- "cause": "A user's alert subscription is keyed by the alert's id, and an id derived from a call's position changes the moment a line is inserted above it. The subscription then belongs to an alert that no longer exists, and it stops firing without telling anybody.",
3289
+ "cause": "A user's alert subscription is keyed by the alert's id, and an id derived from a call's position changes the moment a line is inserted above it. The subscription then belongs to an alert that no longer exists, and it stops firing without telling anybody. An id taken from an input() is not fixed either, and is derived in the same way: the key is written into the program before any setting is read, and a name that moves when somebody opens the settings dialog is not a name a subscription can be kept under.",
2954
3290
  "fix": "Give the alert a stable id of your own: alert(\"text\", id = \"emaCross\").",
2955
3291
  "autofix": false,
2956
3292
  "example": {
@@ -2959,7 +3295,7 @@
2959
3295
  },
2960
3296
  "spec": "language.md 15.3",
2961
3297
  "refines": null,
2962
- "test": "tests/errors/OS8008"
3298
+ "test": "tests/unit/check-repaint.test.ts"
2963
3299
  },
2964
3300
  {
2965
3301
  "code": "OS8009",
@@ -2980,7 +3316,7 @@
2980
3316
  },
2981
3317
  "spec": "language.md 6.7",
2982
3318
  "refines": null,
2983
- "test": "tests/errors/OS8009"
3319
+ "test": "tests/unit/check-warmup.test.ts"
2984
3320
  },
2985
3321
  {
2986
3322
  "code": "OS8010",
@@ -3002,7 +3338,7 @@
3002
3338
  },
3003
3339
  "spec": "language.md 12.2",
3004
3340
  "refines": null,
3005
- "test": "tests/errors/OS8010"
3341
+ "test": "tests/unit/diagnostics.test.ts"
3006
3342
  },
3007
3343
  {
3008
3344
  "code": "OS8011",
@@ -3023,7 +3359,7 @@
3023
3359
  },
3024
3360
  "spec": "language.md 7.5, 8.2",
3025
3361
  "refines": null,
3026
- "test": "tests/errors/OS8011"
3362
+ "test": "tests/unit/check-handles.test.ts"
3027
3363
  },
3028
3364
  {
3029
3365
  "code": "OS8012",
@@ -3044,7 +3380,7 @@
3044
3380
  },
3045
3381
  "spec": "language.md 6.4, 6.5",
3046
3382
  "refines": null,
3047
- "test": "tests/errors/OS8012"
3383
+ "test": null
3048
3384
  },
3049
3385
  {
3050
3386
  "code": "OS8013",
@@ -3067,7 +3403,8 @@
3067
3403
  },
3068
3404
  "spec": "language.md 4.1",
3069
3405
  "refines": null,
3070
- "test": "tests/errors/OS8013"
3406
+ "test": null,
3407
+ "deferred": "Nothing raises this yet. No name in the library is marked deprecated and there is no marker for one to carry, so the checker has nothing to warn about. Raised when the library carries a deprecation marker the checker reads, language.md 4.1."
3071
3408
  },
3072
3409
  {
3073
3410
  "code": "OS8014",
@@ -3088,7 +3425,8 @@
3088
3425
  },
3089
3426
  "spec": "language.md 7.2",
3090
3427
  "refines": null,
3091
- "test": "tests/errors/OS8014"
3428
+ "test": null,
3429
+ "deferred": "Nothing raises this yet. The checker does not follow a bar index into a persistent value, so the stored position this warns about compiles silently. Raised when the checker follows a bar index into persistent state, language.md 7.2."
3092
3430
  },
3093
3431
  {
3094
3432
  "code": "OS8015",
@@ -3111,7 +3449,7 @@
3111
3449
  },
3112
3450
  "spec": "language.md 10.3",
3113
3451
  "refines": null,
3114
- "test": "tests/errors/OS8015"
3452
+ "test": null
3115
3453
  },
3116
3454
  {
3117
3455
  "code": "OS8016",
@@ -3132,7 +3470,7 @@
3132
3470
  },
3133
3471
  "spec": "language.md 11.3",
3134
3472
  "refines": null,
3135
- "test": "tests/errors/OS8016"
3473
+ "test": null
3136
3474
  },
3137
3475
  {
3138
3476
  "code": "OS8017",
@@ -3153,7 +3491,7 @@
3153
3491
  },
3154
3492
  "spec": "language.md 10.2",
3155
3493
  "refines": null,
3156
- "test": "tests/errors/OS8017"
3494
+ "test": null
3157
3495
  },
3158
3496
  {
3159
3497
  "code": "OS8018",
@@ -3175,7 +3513,7 @@
3175
3513
  },
3176
3514
  "spec": "language.md 13.4",
3177
3515
  "refines": null,
3178
- "test": "tests/errors/OS8018"
3516
+ "test": "tests/unit/check-calls.test.ts"
3179
3517
  },
3180
3518
  {
3181
3519
  "code": "OS8019",
@@ -3198,7 +3536,8 @@
3198
3536
  },
3199
3537
  "spec": "language.md 5.4",
3200
3538
  "refines": null,
3201
- "test": "tests/errors/OS8019"
3539
+ "test": null,
3540
+ "deferred": "Nothing raises this yet. The checker does not follow a reference to a deleted object, so the held handle this warns about compiles silently. Raised when the checker follows a deletion to the names and elements still holding the object, language.md 5.4."
3202
3541
  }
3203
3542
  ]
3204
3543
  }