@sharpee/stdlib 3.0.0 → 3.3.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 (765) hide show
  1. package/actions/author/index.d.ts +1 -1
  2. package/actions/author/index.d.ts.map +1 -1
  3. package/actions/author/index.js +2 -2
  4. package/actions/author/index.js.map +1 -1
  5. package/actions/author/trace.d.ts +3 -3
  6. package/actions/author/trace.d.ts.map +1 -1
  7. package/actions/author/trace.js +2 -2
  8. package/actions/author/trace.js.map +1 -1
  9. package/actions/base/index.d.ts +2 -2
  10. package/actions/base/index.d.ts.map +1 -1
  11. package/actions/base/index.js +2 -2
  12. package/actions/base/index.js.map +1 -1
  13. package/actions/base/migration-shim.d.ts +1 -1
  14. package/actions/base/migration-shim.d.ts.map +1 -1
  15. package/actions/base/report-helpers.d.ts +1 -1
  16. package/actions/base/report-helpers.d.ts.map +1 -1
  17. package/actions/base/report-helpers.js +3 -3
  18. package/actions/base/report-helpers.js.map +1 -1
  19. package/actions/base/snapshot-utils.js +2 -2
  20. package/actions/base/snapshot-utils.js.map +1 -1
  21. package/actions/capability-dispatch.d.ts +3 -3
  22. package/actions/capability-dispatch.d.ts.map +1 -1
  23. package/actions/capability-dispatch.js +18 -8
  24. package/actions/capability-dispatch.js.map +1 -1
  25. package/actions/constants.d.ts +2 -0
  26. package/actions/constants.d.ts.map +1 -1
  27. package/actions/constants.js +3 -0
  28. package/actions/constants.js.map +1 -1
  29. package/actions/context-adapter.d.ts +2 -2
  30. package/actions/context-adapter.d.ts.map +1 -1
  31. package/actions/data-builder-types.d.ts +1 -1
  32. package/actions/data-builder-types.d.ts.map +1 -1
  33. package/actions/enhanced-context.d.ts +5 -4
  34. package/actions/enhanced-context.d.ts.map +1 -1
  35. package/actions/enhanced-context.js +85 -67
  36. package/actions/enhanced-context.js.map +1 -1
  37. package/actions/enhanced-types.d.ts +29 -3
  38. package/actions/enhanced-types.d.ts.map +1 -1
  39. package/actions/enhanced-types.js.map +1 -1
  40. package/actions/helpers/emit-illustrations.d.ts +1 -1
  41. package/actions/helpers/emit-illustrations.d.ts.map +1 -1
  42. package/actions/index.d.ts +10 -8
  43. package/actions/index.d.ts.map +1 -1
  44. package/actions/index.js +16 -10
  45. package/actions/index.js.map +1 -1
  46. package/actions/lifecycle/descriptor.d.ts +111 -0
  47. package/actions/lifecycle/descriptor.d.ts.map +1 -0
  48. package/actions/lifecycle/descriptor.js +22 -0
  49. package/actions/lifecycle/descriptor.js.map +1 -0
  50. package/actions/lifecycle/index.d.ts +14 -0
  51. package/actions/lifecycle/index.d.ts.map +1 -0
  52. package/actions/lifecycle/index.js +28 -0
  53. package/actions/lifecycle/index.js.map +1 -0
  54. package/actions/lifecycle/lifecycle-engine.d.ts +189 -0
  55. package/actions/lifecycle/lifecycle-engine.d.ts.map +1 -0
  56. package/actions/lifecycle/lifecycle-engine.js +272 -0
  57. package/actions/lifecycle/lifecycle-engine.js.map +1 -0
  58. package/actions/lifecycle/multi-object-lifecycle.d.ts +113 -0
  59. package/actions/lifecycle/multi-object-lifecycle.d.ts.map +1 -0
  60. package/actions/lifecycle/multi-object-lifecycle.js +138 -0
  61. package/actions/lifecycle/multi-object-lifecycle.js.map +1 -0
  62. package/actions/lifecycle/registry.d.ts +40 -0
  63. package/actions/lifecycle/registry.d.ts.map +1 -0
  64. package/actions/lifecycle/registry.js +131 -0
  65. package/actions/lifecycle/registry.js.map +1 -0
  66. package/actions/meta-action.d.ts +1 -1
  67. package/actions/meta-action.d.ts.map +1 -1
  68. package/actions/meta-action.js +2 -2
  69. package/actions/meta-action.js.map +1 -1
  70. package/actions/registry.d.ts +2 -2
  71. package/actions/registry.d.ts.map +1 -1
  72. package/actions/standard/about/about.d.ts +2 -2
  73. package/actions/standard/about/about.d.ts.map +1 -1
  74. package/actions/standard/about/about.js +4 -3
  75. package/actions/standard/about/about.js.map +1 -1
  76. package/actions/standard/about/index.d.ts +2 -2
  77. package/actions/standard/about/index.d.ts.map +1 -1
  78. package/actions/standard/about/index.js +2 -2
  79. package/actions/standard/about/index.js.map +1 -1
  80. package/actions/standard/again/again.d.ts +2 -2
  81. package/actions/standard/again/again.d.ts.map +1 -1
  82. package/actions/standard/again/again.js +4 -3
  83. package/actions/standard/again/again.js.map +1 -1
  84. package/actions/standard/again/index.d.ts +2 -2
  85. package/actions/standard/again/index.d.ts.map +1 -1
  86. package/actions/standard/again/index.js +2 -2
  87. package/actions/standard/again/index.js.map +1 -1
  88. package/actions/standard/asking/asking.d.ts +25 -0
  89. package/actions/standard/asking/asking.d.ts.map +1 -0
  90. package/actions/standard/asking/asking.js +123 -0
  91. package/actions/standard/asking/asking.js.map +1 -0
  92. package/actions/standard/asking/index.d.ts +5 -0
  93. package/actions/standard/asking/index.d.ts.map +1 -0
  94. package/actions/standard/asking/index.js +10 -0
  95. package/actions/standard/asking/index.js.map +1 -0
  96. package/actions/standard/attacking/attacking-data.d.ts +2 -2
  97. package/actions/standard/attacking/attacking-data.d.ts.map +1 -1
  98. package/actions/standard/attacking/attacking-events.d.ts +1 -1
  99. package/actions/standard/attacking/attacking-events.d.ts.map +1 -1
  100. package/actions/standard/attacking/attacking-types.d.ts +3 -0
  101. package/actions/standard/attacking/attacking-types.d.ts.map +1 -1
  102. package/actions/standard/attacking/attacking-types.js.map +1 -1
  103. package/actions/standard/attacking/attacking.d.ts +16 -2
  104. package/actions/standard/attacking/attacking.d.ts.map +1 -1
  105. package/actions/standard/attacking/attacking.js +194 -127
  106. package/actions/standard/attacking/attacking.js.map +1 -1
  107. package/actions/standard/attacking/index.d.ts +2 -2
  108. package/actions/standard/attacking/index.d.ts.map +1 -1
  109. package/actions/standard/attacking/index.js +5 -4
  110. package/actions/standard/attacking/index.js.map +1 -1
  111. package/actions/standard/climbing/climbing.d.ts +12 -2
  112. package/actions/standard/climbing/climbing.d.ts.map +1 -1
  113. package/actions/standard/climbing/climbing.js +111 -29
  114. package/actions/standard/climbing/climbing.js.map +1 -1
  115. package/actions/standard/climbing/index.d.ts +2 -2
  116. package/actions/standard/climbing/index.d.ts.map +1 -1
  117. package/actions/standard/climbing/index.js +2 -2
  118. package/actions/standard/climbing/index.js.map +1 -1
  119. package/actions/standard/closing/closing-data.d.ts +1 -1
  120. package/actions/standard/closing/closing-data.d.ts.map +1 -1
  121. package/actions/standard/closing/closing-data.js +3 -3
  122. package/actions/standard/closing/closing-data.js.map +1 -1
  123. package/actions/standard/closing/closing-event-data.d.ts +1 -1
  124. package/actions/standard/closing/closing-event-data.d.ts.map +1 -1
  125. package/actions/standard/closing/closing.d.ts +8 -2
  126. package/actions/standard/closing/closing.d.ts.map +1 -1
  127. package/actions/standard/closing/closing.js +61 -78
  128. package/actions/standard/closing/closing.js.map +1 -1
  129. package/actions/standard/closing/index.d.ts +3 -3
  130. package/actions/standard/closing/index.d.ts.map +1 -1
  131. package/actions/standard/closing/index.js +2 -2
  132. package/actions/standard/closing/index.js.map +1 -1
  133. package/actions/standard/cutting/cutting-messages.d.ts +17 -0
  134. package/actions/standard/cutting/cutting-messages.d.ts.map +1 -0
  135. package/actions/standard/cutting/cutting-messages.js +22 -0
  136. package/actions/standard/cutting/cutting-messages.js.map +1 -0
  137. package/actions/standard/cutting/cutting.d.ts +35 -0
  138. package/actions/standard/cutting/cutting.d.ts.map +1 -0
  139. package/actions/standard/cutting/cutting.js +232 -0
  140. package/actions/standard/cutting/cutting.js.map +1 -0
  141. package/actions/standard/cutting/index.d.ts +7 -0
  142. package/actions/standard/cutting/index.d.ts.map +1 -0
  143. package/actions/standard/cutting/index.js +12 -0
  144. package/actions/standard/cutting/index.js.map +1 -0
  145. package/actions/standard/deadly-room-death/deadly-room-death.d.ts +16 -0
  146. package/actions/standard/deadly-room-death/deadly-room-death.d.ts.map +1 -0
  147. package/actions/standard/deadly-room-death/deadly-room-death.js +44 -0
  148. package/actions/standard/deadly-room-death/deadly-room-death.js.map +1 -0
  149. package/actions/standard/deadly-room-death/index.d.ts +2 -0
  150. package/actions/standard/deadly-room-death/index.d.ts.map +1 -0
  151. package/actions/standard/deadly-room-death/index.js +6 -0
  152. package/actions/standard/deadly-room-death/index.js.map +1 -0
  153. package/actions/standard/digging/digging-messages.d.ts +17 -0
  154. package/actions/standard/digging/digging-messages.d.ts.map +1 -0
  155. package/actions/standard/digging/digging-messages.js +22 -0
  156. package/actions/standard/digging/digging-messages.js.map +1 -0
  157. package/actions/standard/digging/digging.d.ts +35 -0
  158. package/actions/standard/digging/digging.d.ts.map +1 -0
  159. package/actions/standard/digging/digging.js +232 -0
  160. package/actions/standard/digging/digging.js.map +1 -0
  161. package/actions/standard/digging/index.d.ts +7 -0
  162. package/actions/standard/digging/index.d.ts.map +1 -0
  163. package/actions/standard/digging/index.js +12 -0
  164. package/actions/standard/digging/index.js.map +1 -0
  165. package/actions/standard/drinking/drinking.d.ts +11 -2
  166. package/actions/standard/drinking/drinking.d.ts.map +1 -1
  167. package/actions/standard/drinking/drinking.js +53 -15
  168. package/actions/standard/drinking/drinking.js.map +1 -1
  169. package/actions/standard/drinking/index.d.ts +2 -2
  170. package/actions/standard/drinking/index.d.ts.map +1 -1
  171. package/actions/standard/drinking/index.js +3 -3
  172. package/actions/standard/drinking/index.js.map +1 -1
  173. package/actions/standard/dropping/dropping-data.d.ts +2 -2
  174. package/actions/standard/dropping/dropping-data.d.ts.map +1 -1
  175. package/actions/standard/dropping/dropping-data.js +9 -9
  176. package/actions/standard/dropping/dropping-data.js.map +1 -1
  177. package/actions/standard/dropping/dropping-events.d.ts +1 -1
  178. package/actions/standard/dropping/dropping-events.d.ts.map +1 -1
  179. package/actions/standard/dropping/dropping-types.d.ts +10 -18
  180. package/actions/standard/dropping/dropping-types.d.ts.map +1 -1
  181. package/actions/standard/dropping/dropping-types.js.map +1 -1
  182. package/actions/standard/dropping/dropping.d.ts +8 -2
  183. package/actions/standard/dropping/dropping.d.ts.map +1 -1
  184. package/actions/standard/dropping/dropping.js +135 -146
  185. package/actions/standard/dropping/dropping.js.map +1 -1
  186. package/actions/standard/dropping/index.d.ts +2 -2
  187. package/actions/standard/dropping/index.d.ts.map +1 -1
  188. package/actions/standard/dropping/index.js +2 -2
  189. package/actions/standard/dropping/index.js.map +1 -1
  190. package/actions/standard/eating/eating.d.ts +11 -2
  191. package/actions/standard/eating/eating.d.ts.map +1 -1
  192. package/actions/standard/eating/eating.js +53 -15
  193. package/actions/standard/eating/eating.js.map +1 -1
  194. package/actions/standard/eating/index.d.ts +2 -2
  195. package/actions/standard/eating/index.d.ts.map +1 -1
  196. package/actions/standard/eating/index.js +3 -3
  197. package/actions/standard/eating/index.js.map +1 -1
  198. package/actions/standard/entering/entering.d.ts +16 -7
  199. package/actions/standard/entering/entering.d.ts.map +1 -1
  200. package/actions/standard/entering/entering.js +65 -87
  201. package/actions/standard/entering/entering.js.map +1 -1
  202. package/actions/standard/entering/index.d.ts +2 -2
  203. package/actions/standard/entering/index.d.ts.map +1 -1
  204. package/actions/standard/entering/index.js +2 -2
  205. package/actions/standard/entering/index.js.map +1 -1
  206. package/actions/standard/examining/examining-data.d.ts +1 -1
  207. package/actions/standard/examining/examining-data.d.ts.map +1 -1
  208. package/actions/standard/examining/examining-data.js +72 -17
  209. package/actions/standard/examining/examining-data.js.map +1 -1
  210. package/actions/standard/examining/examining.d.ts +8 -2
  211. package/actions/standard/examining/examining.d.ts.map +1 -1
  212. package/actions/standard/examining/examining.js +54 -65
  213. package/actions/standard/examining/examining.js.map +1 -1
  214. package/actions/standard/examining/index.d.ts +2 -2
  215. package/actions/standard/examining/index.d.ts.map +1 -1
  216. package/actions/standard/examining/index.js +2 -2
  217. package/actions/standard/examining/index.js.map +1 -1
  218. package/actions/standard/exiting/exiting-messages.d.ts +2 -0
  219. package/actions/standard/exiting/exiting-messages.d.ts.map +1 -1
  220. package/actions/standard/exiting/exiting-messages.js +2 -0
  221. package/actions/standard/exiting/exiting-messages.js.map +1 -1
  222. package/actions/standard/exiting/exiting.d.ts +8 -2
  223. package/actions/standard/exiting/exiting.d.ts.map +1 -1
  224. package/actions/standard/exiting/exiting.js +88 -18
  225. package/actions/standard/exiting/exiting.js.map +1 -1
  226. package/actions/standard/exiting/index.d.ts +2 -2
  227. package/actions/standard/exiting/index.d.ts.map +1 -1
  228. package/actions/standard/exiting/index.js +2 -2
  229. package/actions/standard/exiting/index.js.map +1 -1
  230. package/actions/standard/giving/giving.d.ts +23 -2
  231. package/actions/standard/giving/giving.d.ts.map +1 -1
  232. package/actions/standard/giving/giving.js +100 -23
  233. package/actions/standard/giving/giving.js.map +1 -1
  234. package/actions/standard/giving/index.d.ts +2 -2
  235. package/actions/standard/giving/index.d.ts.map +1 -1
  236. package/actions/standard/giving/index.js +3 -3
  237. package/actions/standard/giving/index.js.map +1 -1
  238. package/actions/standard/going/going-data.d.ts +1 -1
  239. package/actions/standard/going/going-data.d.ts.map +1 -1
  240. package/actions/standard/going/going-data.js +6 -6
  241. package/actions/standard/going/going-data.js.map +1 -1
  242. package/actions/standard/going/going.d.ts +20 -18
  243. package/actions/standard/going/going.d.ts.map +1 -1
  244. package/actions/standard/going/going.js +185 -162
  245. package/actions/standard/going/going.js.map +1 -1
  246. package/actions/standard/going/index.d.ts +2 -2
  247. package/actions/standard/going/index.d.ts.map +1 -1
  248. package/actions/standard/going/index.js +5 -3
  249. package/actions/standard/going/index.js.map +1 -1
  250. package/actions/standard/help/help.d.ts +2 -2
  251. package/actions/standard/help/help.d.ts.map +1 -1
  252. package/actions/standard/help/help.js +4 -3
  253. package/actions/standard/help/help.js.map +1 -1
  254. package/actions/standard/help/index.d.ts +2 -2
  255. package/actions/standard/help/index.d.ts.map +1 -1
  256. package/actions/standard/help/index.js +2 -2
  257. package/actions/standard/help/index.js.map +1 -1
  258. package/actions/standard/hiding/concealment-break.js +19 -19
  259. package/actions/standard/hiding/concealment-break.js.map +1 -1
  260. package/actions/standard/hiding/hiding.d.ts +13 -4
  261. package/actions/standard/hiding/hiding.d.ts.map +1 -1
  262. package/actions/standard/hiding/hiding.js +59 -15
  263. package/actions/standard/hiding/hiding.js.map +1 -1
  264. package/actions/standard/hiding/index.d.ts +4 -4
  265. package/actions/standard/hiding/index.d.ts.map +1 -1
  266. package/actions/standard/hiding/index.js +6 -6
  267. package/actions/standard/hiding/index.js.map +1 -1
  268. package/actions/standard/hiding/revealing.d.ts +2 -2
  269. package/actions/standard/hiding/revealing.d.ts.map +1 -1
  270. package/actions/standard/hiding/revealing.js +4 -3
  271. package/actions/standard/hiding/revealing.js.map +1 -1
  272. package/actions/standard/index.d.ts +61 -56
  273. package/actions/standard/index.d.ts.map +1 -1
  274. package/actions/standard/index.js +181 -166
  275. package/actions/standard/index.js.map +1 -1
  276. package/actions/standard/inserting/index.d.ts +2 -2
  277. package/actions/standard/inserting/index.d.ts.map +1 -1
  278. package/actions/standard/inserting/index.js +3 -3
  279. package/actions/standard/inserting/index.js.map +1 -1
  280. package/actions/standard/inserting/inserting-data.d.ts +1 -1
  281. package/actions/standard/inserting/inserting-data.d.ts.map +1 -1
  282. package/actions/standard/inserting/inserting-data.js +3 -3
  283. package/actions/standard/inserting/inserting-data.js.map +1 -1
  284. package/actions/standard/inserting/inserting-events.d.ts +2 -2
  285. package/actions/standard/inserting/inserting-events.d.ts.map +1 -1
  286. package/actions/standard/inserting/inserting.d.ts +14 -2
  287. package/actions/standard/inserting/inserting.d.ts.map +1 -1
  288. package/actions/standard/inserting/inserting.js +96 -30
  289. package/actions/standard/inserting/inserting.js.map +1 -1
  290. package/actions/standard/inventory/index.d.ts +2 -2
  291. package/actions/standard/inventory/index.d.ts.map +1 -1
  292. package/actions/standard/inventory/index.js +3 -3
  293. package/actions/standard/inventory/index.js.map +1 -1
  294. package/actions/standard/inventory/inventory.d.ts +2 -2
  295. package/actions/standard/inventory/inventory.d.ts.map +1 -1
  296. package/actions/standard/inventory/inventory.js +20 -31
  297. package/actions/standard/inventory/inventory.js.map +1 -1
  298. package/actions/standard/listening/index.d.ts +2 -2
  299. package/actions/standard/listening/index.d.ts.map +1 -1
  300. package/actions/standard/listening/index.js +3 -3
  301. package/actions/standard/listening/index.js.map +1 -1
  302. package/actions/standard/listening/listening.d.ts +14 -3
  303. package/actions/standard/listening/listening.d.ts.map +1 -1
  304. package/actions/standard/listening/listening.js +53 -12
  305. package/actions/standard/listening/listening.js.map +1 -1
  306. package/actions/standard/lock-shared.d.ts +1 -1
  307. package/actions/standard/lock-shared.d.ts.map +1 -1
  308. package/actions/standard/lock-shared.js +10 -10
  309. package/actions/standard/lock-shared.js.map +1 -1
  310. package/actions/standard/locking/index.d.ts +2 -2
  311. package/actions/standard/locking/index.d.ts.map +1 -1
  312. package/actions/standard/locking/index.js +2 -2
  313. package/actions/standard/locking/index.js.map +1 -1
  314. package/actions/standard/locking/locking.d.ts +11 -2
  315. package/actions/standard/locking/locking.d.ts.map +1 -1
  316. package/actions/standard/locking/locking.js +86 -27
  317. package/actions/standard/locking/locking.js.map +1 -1
  318. package/actions/standard/looking/index.d.ts +4 -4
  319. package/actions/standard/looking/index.d.ts.map +1 -1
  320. package/actions/standard/looking/index.js +9 -9
  321. package/actions/standard/looking/index.js.map +1 -1
  322. package/actions/standard/looking/looking-data.d.ts +2 -2
  323. package/actions/standard/looking/looking-data.d.ts.map +1 -1
  324. package/actions/standard/looking/looking-data.js +15 -13
  325. package/actions/standard/looking/looking-data.js.map +1 -1
  326. package/actions/standard/looking/looking.d.ts +2 -2
  327. package/actions/standard/looking/looking.d.ts.map +1 -1
  328. package/actions/standard/looking/looking.js +15 -14
  329. package/actions/standard/looking/looking.js.map +1 -1
  330. package/actions/standard/looking/snippet-resolver.js +2 -2
  331. package/actions/standard/looking/snippet-resolver.js.map +1 -1
  332. package/actions/standard/lowering/index.d.ts +1 -1
  333. package/actions/standard/lowering/index.d.ts.map +1 -1
  334. package/actions/standard/lowering/index.js +2 -2
  335. package/actions/standard/lowering/index.js.map +1 -1
  336. package/actions/standard/lowering/lowering.d.ts +2 -2
  337. package/actions/standard/lowering/lowering.js +4 -4
  338. package/actions/standard/lowering/lowering.js.map +1 -1
  339. package/actions/standard/opening/index.d.ts +2 -2
  340. package/actions/standard/opening/index.d.ts.map +1 -1
  341. package/actions/standard/opening/index.js +2 -2
  342. package/actions/standard/opening/index.js.map +1 -1
  343. package/actions/standard/opening/opening-data.d.ts +2 -2
  344. package/actions/standard/opening/opening-data.d.ts.map +1 -1
  345. package/actions/standard/opening/opening-messages.d.ts +3 -0
  346. package/actions/standard/opening/opening-messages.d.ts.map +1 -1
  347. package/actions/standard/opening/opening-messages.js +4 -0
  348. package/actions/standard/opening/opening-messages.js.map +1 -1
  349. package/actions/standard/opening/opening.d.ts +10 -2
  350. package/actions/standard/opening/opening.d.ts.map +1 -1
  351. package/actions/standard/opening/opening.js +94 -82
  352. package/actions/standard/opening/opening.js.map +1 -1
  353. package/actions/standard/pulling/index.d.ts +2 -2
  354. package/actions/standard/pulling/index.d.ts.map +1 -1
  355. package/actions/standard/pulling/index.js +3 -3
  356. package/actions/standard/pulling/index.js.map +1 -1
  357. package/actions/standard/pulling/pulling.d.ts +11 -2
  358. package/actions/standard/pulling/pulling.d.ts.map +1 -1
  359. package/actions/standard/pulling/pulling.js +53 -15
  360. package/actions/standard/pulling/pulling.js.map +1 -1
  361. package/actions/standard/pushing/index.d.ts +2 -2
  362. package/actions/standard/pushing/index.d.ts.map +1 -1
  363. package/actions/standard/pushing/index.js +3 -3
  364. package/actions/standard/pushing/index.js.map +1 -1
  365. package/actions/standard/pushing/pushing-original.d.ts +2 -2
  366. package/actions/standard/pushing/pushing-original.d.ts.map +1 -1
  367. package/actions/standard/pushing/pushing-original.js +4 -4
  368. package/actions/standard/pushing/pushing-original.js.map +1 -1
  369. package/actions/standard/pushing/pushing-types.d.ts +3 -6
  370. package/actions/standard/pushing/pushing-types.d.ts.map +1 -1
  371. package/actions/standard/pushing/pushing-types.js +3 -1
  372. package/actions/standard/pushing/pushing-types.js.map +1 -1
  373. package/actions/standard/pushing/pushing.d.ts +16 -7
  374. package/actions/standard/pushing/pushing.d.ts.map +1 -1
  375. package/actions/standard/pushing/pushing.js +70 -90
  376. package/actions/standard/pushing/pushing.js.map +1 -1
  377. package/actions/standard/putting/index.d.ts +2 -2
  378. package/actions/standard/putting/index.d.ts.map +1 -1
  379. package/actions/standard/putting/index.js +3 -3
  380. package/actions/standard/putting/index.js.map +1 -1
  381. package/actions/standard/putting/putting-data.d.ts +1 -1
  382. package/actions/standard/putting/putting-data.d.ts.map +1 -1
  383. package/actions/standard/putting/putting-data.js +3 -3
  384. package/actions/standard/putting/putting-data.js.map +1 -1
  385. package/actions/standard/putting/putting-types.d.ts +10 -21
  386. package/actions/standard/putting/putting-types.d.ts.map +1 -1
  387. package/actions/standard/putting/putting-types.js +0 -1
  388. package/actions/standard/putting/putting-types.js.map +1 -1
  389. package/actions/standard/putting/putting.d.ts +12 -2
  390. package/actions/standard/putting/putting.d.ts.map +1 -1
  391. package/actions/standard/putting/putting.js +191 -209
  392. package/actions/standard/putting/putting.js.map +1 -1
  393. package/actions/standard/quitting/index.d.ts +2 -2
  394. package/actions/standard/quitting/index.d.ts.map +1 -1
  395. package/actions/standard/quitting/index.js +3 -3
  396. package/actions/standard/quitting/index.js.map +1 -1
  397. package/actions/standard/quitting/quitting.d.ts +2 -2
  398. package/actions/standard/quitting/quitting.d.ts.map +1 -1
  399. package/actions/standard/quitting/quitting.js +4 -3
  400. package/actions/standard/quitting/quitting.js.map +1 -1
  401. package/actions/standard/raising/index.d.ts +1 -1
  402. package/actions/standard/raising/index.d.ts.map +1 -1
  403. package/actions/standard/raising/index.js +2 -2
  404. package/actions/standard/raising/index.js.map +1 -1
  405. package/actions/standard/raising/raising.d.ts +2 -2
  406. package/actions/standard/raising/raising.js +4 -4
  407. package/actions/standard/raising/raising.js.map +1 -1
  408. package/actions/standard/reading/index.d.ts +2 -2
  409. package/actions/standard/reading/index.d.ts.map +1 -1
  410. package/actions/standard/reading/index.js +2 -2
  411. package/actions/standard/reading/index.js.map +1 -1
  412. package/actions/standard/reading/reading.d.ts +7 -1
  413. package/actions/standard/reading/reading.d.ts.map +1 -1
  414. package/actions/standard/reading/reading.js +47 -63
  415. package/actions/standard/reading/reading.js.map +1 -1
  416. package/actions/standard/removing/index.d.ts +1 -1
  417. package/actions/standard/removing/index.d.ts.map +1 -1
  418. package/actions/standard/removing/index.js +2 -2
  419. package/actions/standard/removing/index.js.map +1 -1
  420. package/actions/standard/removing/removing-data.d.ts +1 -1
  421. package/actions/standard/removing/removing-data.d.ts.map +1 -1
  422. package/actions/standard/removing/removing-data.js +4 -4
  423. package/actions/standard/removing/removing-data.js.map +1 -1
  424. package/actions/standard/removing/removing-events.d.ts +2 -2
  425. package/actions/standard/removing/removing-events.d.ts.map +1 -1
  426. package/actions/standard/removing/removing-types.d.ts +10 -16
  427. package/actions/standard/removing/removing-types.d.ts.map +1 -1
  428. package/actions/standard/removing/removing-types.js.map +1 -1
  429. package/actions/standard/removing/removing.d.ts +15 -2
  430. package/actions/standard/removing/removing.d.ts.map +1 -1
  431. package/actions/standard/removing/removing.js +201 -142
  432. package/actions/standard/removing/removing.js.map +1 -1
  433. package/actions/standard/restarting/index.d.ts +2 -2
  434. package/actions/standard/restarting/index.d.ts.map +1 -1
  435. package/actions/standard/restarting/index.js +3 -3
  436. package/actions/standard/restarting/index.js.map +1 -1
  437. package/actions/standard/restarting/restarting.d.ts +2 -2
  438. package/actions/standard/restarting/restarting.d.ts.map +1 -1
  439. package/actions/standard/restarting/restarting.js +4 -3
  440. package/actions/standard/restarting/restarting.js.map +1 -1
  441. package/actions/standard/restoring/index.d.ts +2 -2
  442. package/actions/standard/restoring/index.d.ts.map +1 -1
  443. package/actions/standard/restoring/index.js +3 -3
  444. package/actions/standard/restoring/index.js.map +1 -1
  445. package/actions/standard/restoring/restoring.d.ts +2 -2
  446. package/actions/standard/restoring/restoring.d.ts.map +1 -1
  447. package/actions/standard/restoring/restoring.js +4 -3
  448. package/actions/standard/restoring/restoring.js.map +1 -1
  449. package/actions/standard/saving/index.d.ts +2 -2
  450. package/actions/standard/saving/index.d.ts.map +1 -1
  451. package/actions/standard/saving/index.js +3 -3
  452. package/actions/standard/saving/index.js.map +1 -1
  453. package/actions/standard/saving/saving.d.ts +2 -2
  454. package/actions/standard/saving/saving.d.ts.map +1 -1
  455. package/actions/standard/saving/saving.js +4 -3
  456. package/actions/standard/saving/saving.js.map +1 -1
  457. package/actions/standard/scoring/index.d.ts +2 -2
  458. package/actions/standard/scoring/index.d.ts.map +1 -1
  459. package/actions/standard/scoring/index.js +2 -2
  460. package/actions/standard/scoring/index.js.map +1 -1
  461. package/actions/standard/scoring/scoring.d.ts +2 -2
  462. package/actions/standard/scoring/scoring.d.ts.map +1 -1
  463. package/actions/standard/scoring/scoring.js +4 -3
  464. package/actions/standard/scoring/scoring.js.map +1 -1
  465. package/actions/standard/searching/index.d.ts +2 -2
  466. package/actions/standard/searching/index.d.ts.map +1 -1
  467. package/actions/standard/searching/index.js +2 -2
  468. package/actions/standard/searching/index.js.map +1 -1
  469. package/actions/standard/searching/searching.d.ts +12 -2
  470. package/actions/standard/searching/searching.d.ts.map +1 -1
  471. package/actions/standard/searching/searching.js +61 -23
  472. package/actions/standard/searching/searching.js.map +1 -1
  473. package/actions/standard/searching-helpers.d.ts +1 -1
  474. package/actions/standard/searching-helpers.d.ts.map +1 -1
  475. package/actions/standard/searching-helpers.js +35 -23
  476. package/actions/standard/searching-helpers.js.map +1 -1
  477. package/actions/standard/showing/index.d.ts +2 -2
  478. package/actions/standard/showing/index.d.ts.map +1 -1
  479. package/actions/standard/showing/index.js +3 -3
  480. package/actions/standard/showing/index.js.map +1 -1
  481. package/actions/standard/showing/showing.d.ts +16 -2
  482. package/actions/standard/showing/showing.d.ts.map +1 -1
  483. package/actions/standard/showing/showing.js +77 -17
  484. package/actions/standard/showing/showing.js.map +1 -1
  485. package/actions/standard/sleeping/index.d.ts +2 -2
  486. package/actions/standard/sleeping/index.d.ts.map +1 -1
  487. package/actions/standard/sleeping/index.js +2 -2
  488. package/actions/standard/sleeping/index.js.map +1 -1
  489. package/actions/standard/sleeping/sleeping.d.ts +2 -2
  490. package/actions/standard/sleeping/sleeping.d.ts.map +1 -1
  491. package/actions/standard/sleeping/sleeping.js +4 -3
  492. package/actions/standard/sleeping/sleeping.js.map +1 -1
  493. package/actions/standard/smelling/index.d.ts +2 -2
  494. package/actions/standard/smelling/index.d.ts.map +1 -1
  495. package/actions/standard/smelling/index.js +3 -3
  496. package/actions/standard/smelling/index.js.map +1 -1
  497. package/actions/standard/smelling/smelling.d.ts +12 -2
  498. package/actions/standard/smelling/smelling.d.ts.map +1 -1
  499. package/actions/standard/smelling/smelling.js +50 -11
  500. package/actions/standard/smelling/smelling.js.map +1 -1
  501. package/actions/standard/switching-shared.d.ts +1 -1
  502. package/actions/standard/switching-shared.d.ts.map +1 -1
  503. package/actions/standard/switching_off/index.d.ts +2 -2
  504. package/actions/standard/switching_off/index.d.ts.map +1 -1
  505. package/actions/standard/switching_off/index.js +2 -2
  506. package/actions/standard/switching_off/index.js.map +1 -1
  507. package/actions/standard/switching_off/switching_off.d.ts +13 -3
  508. package/actions/standard/switching_off/switching_off.d.ts.map +1 -1
  509. package/actions/standard/switching_off/switching_off.js +61 -21
  510. package/actions/standard/switching_off/switching_off.js.map +1 -1
  511. package/actions/standard/switching_on/index.d.ts +2 -2
  512. package/actions/standard/switching_on/index.d.ts.map +1 -1
  513. package/actions/standard/switching_on/index.js +2 -2
  514. package/actions/standard/switching_on/index.js.map +1 -1
  515. package/actions/standard/switching_on/switching_on.d.ts +16 -7
  516. package/actions/standard/switching_on/switching_on.d.ts.map +1 -1
  517. package/actions/standard/switching_on/switching_on.js +67 -79
  518. package/actions/standard/switching_on/switching_on.js.map +1 -1
  519. package/actions/standard/taking/index.d.ts +1 -1
  520. package/actions/standard/taking/index.d.ts.map +1 -1
  521. package/actions/standard/taking/index.js +2 -2
  522. package/actions/standard/taking/index.js.map +1 -1
  523. package/actions/standard/taking/taking-data.d.ts +1 -1
  524. package/actions/standard/taking/taking-data.d.ts.map +1 -1
  525. package/actions/standard/taking/taking-data.js +5 -5
  526. package/actions/standard/taking/taking-data.js.map +1 -1
  527. package/actions/standard/taking/taking-types.d.ts +14 -36
  528. package/actions/standard/taking/taking-types.d.ts.map +1 -1
  529. package/actions/standard/taking/taking-types.js.map +1 -1
  530. package/actions/standard/taking/taking.d.ts +13 -2
  531. package/actions/standard/taking/taking.d.ts.map +1 -1
  532. package/actions/standard/taking/taking.js +145 -197
  533. package/actions/standard/taking/taking.js.map +1 -1
  534. package/actions/standard/taking_off/index.d.ts +1 -1
  535. package/actions/standard/taking_off/index.d.ts.map +1 -1
  536. package/actions/standard/taking_off/index.js +2 -2
  537. package/actions/standard/taking_off/index.js.map +1 -1
  538. package/actions/standard/taking_off/taking-off.d.ts +8 -2
  539. package/actions/standard/taking_off/taking-off.d.ts.map +1 -1
  540. package/actions/standard/taking_off/taking-off.js +74 -38
  541. package/actions/standard/taking_off/taking-off.js.map +1 -1
  542. package/actions/standard/talking/index.d.ts +2 -2
  543. package/actions/standard/talking/index.d.ts.map +1 -1
  544. package/actions/standard/talking/index.js +3 -3
  545. package/actions/standard/talking/index.js.map +1 -1
  546. package/actions/standard/talking/talking.d.ts +17 -2
  547. package/actions/standard/talking/talking.d.ts.map +1 -1
  548. package/actions/standard/talking/talking.js +57 -12
  549. package/actions/standard/talking/talking.js.map +1 -1
  550. package/actions/standard/telling/index.d.ts +5 -0
  551. package/actions/standard/telling/index.d.ts.map +1 -0
  552. package/actions/standard/telling/index.js +10 -0
  553. package/actions/standard/telling/index.js.map +1 -0
  554. package/actions/standard/telling/telling.d.ts +25 -0
  555. package/actions/standard/telling/telling.d.ts.map +1 -0
  556. package/actions/standard/telling/telling.js +123 -0
  557. package/actions/standard/telling/telling.js.map +1 -0
  558. package/actions/standard/throwing/index.d.ts +1 -1
  559. package/actions/standard/throwing/index.d.ts.map +1 -1
  560. package/actions/standard/throwing/index.js +2 -2
  561. package/actions/standard/throwing/index.js.map +1 -1
  562. package/actions/standard/throwing/throwing.d.ts +13 -2
  563. package/actions/standard/throwing/throwing.d.ts.map +1 -1
  564. package/actions/standard/throwing/throwing.js +92 -93
  565. package/actions/standard/throwing/throwing.js.map +1 -1
  566. package/actions/standard/tool-shared.d.ts +38 -0
  567. package/actions/standard/tool-shared.d.ts.map +1 -0
  568. package/actions/standard/tool-shared.js +74 -0
  569. package/actions/standard/tool-shared.js.map +1 -0
  570. package/actions/standard/touching/index.d.ts +2 -2
  571. package/actions/standard/touching/index.d.ts.map +1 -1
  572. package/actions/standard/touching/index.js +3 -3
  573. package/actions/standard/touching/index.js.map +1 -1
  574. package/actions/standard/touching/touching.d.ts +11 -2
  575. package/actions/standard/touching/touching.d.ts.map +1 -1
  576. package/actions/standard/touching/touching.js +50 -14
  577. package/actions/standard/touching/touching.js.map +1 -1
  578. package/actions/standard/turning/index.d.ts +7 -0
  579. package/actions/standard/turning/index.d.ts.map +1 -0
  580. package/actions/standard/turning/index.js +13 -0
  581. package/actions/standard/turning/index.js.map +1 -0
  582. package/actions/standard/turning/turning-messages.d.ts +14 -0
  583. package/actions/standard/turning/turning-messages.d.ts.map +1 -0
  584. package/actions/standard/turning/turning-messages.js +18 -0
  585. package/actions/standard/turning/turning-messages.js.map +1 -0
  586. package/actions/standard/turning/turning.d.ts +40 -0
  587. package/actions/standard/turning/turning.d.ts.map +1 -0
  588. package/actions/standard/turning/turning.js +197 -0
  589. package/actions/standard/turning/turning.js.map +1 -0
  590. package/actions/standard/undoing/index.d.ts +2 -2
  591. package/actions/standard/undoing/index.d.ts.map +1 -1
  592. package/actions/standard/undoing/index.js +3 -3
  593. package/actions/standard/undoing/index.js.map +1 -1
  594. package/actions/standard/undoing/undoing.d.ts +2 -2
  595. package/actions/standard/undoing/undoing.d.ts.map +1 -1
  596. package/actions/standard/undoing/undoing.js +2 -2
  597. package/actions/standard/undoing/undoing.js.map +1 -1
  598. package/actions/standard/unlocking/index.d.ts +2 -2
  599. package/actions/standard/unlocking/index.d.ts.map +1 -1
  600. package/actions/standard/unlocking/index.js +2 -2
  601. package/actions/standard/unlocking/index.js.map +1 -1
  602. package/actions/standard/unlocking/unlocking.d.ts +11 -2
  603. package/actions/standard/unlocking/unlocking.d.ts.map +1 -1
  604. package/actions/standard/unlocking/unlocking.js +84 -25
  605. package/actions/standard/unlocking/unlocking.js.map +1 -1
  606. package/actions/standard/version/engine-version.d.ts +6 -0
  607. package/actions/standard/version/engine-version.d.ts.map +1 -0
  608. package/actions/standard/version/engine-version.js +9 -0
  609. package/actions/standard/version/engine-version.js.map +1 -0
  610. package/actions/standard/version/index.d.ts +2 -2
  611. package/actions/standard/version/index.d.ts.map +1 -1
  612. package/actions/standard/version/index.js +3 -3
  613. package/actions/standard/version/index.js.map +1 -1
  614. package/actions/standard/version/version.d.ts +4 -4
  615. package/actions/standard/version/version.d.ts.map +1 -1
  616. package/actions/standard/version/version.js +10 -6
  617. package/actions/standard/version/version.js.map +1 -1
  618. package/actions/standard/waiting/index.d.ts +2 -2
  619. package/actions/standard/waiting/index.d.ts.map +1 -1
  620. package/actions/standard/waiting/index.js +2 -2
  621. package/actions/standard/waiting/index.js.map +1 -1
  622. package/actions/standard/waiting/waiting.d.ts +2 -2
  623. package/actions/standard/waiting/waiting.d.ts.map +1 -1
  624. package/actions/standard/waiting/waiting.js +4 -3
  625. package/actions/standard/waiting/waiting.js.map +1 -1
  626. package/actions/standard/wearable-shared.d.ts +1 -1
  627. package/actions/standard/wearable-shared.d.ts.map +1 -1
  628. package/actions/standard/wearable-shared.js +2 -2
  629. package/actions/standard/wearable-shared.js.map +1 -1
  630. package/actions/standard/wearing/index.d.ts +1 -1
  631. package/actions/standard/wearing/index.d.ts.map +1 -1
  632. package/actions/standard/wearing/index.js +2 -2
  633. package/actions/standard/wearing/index.js.map +1 -1
  634. package/actions/standard/wearing/wearing.d.ts +13 -3
  635. package/actions/standard/wearing/wearing.d.ts.map +1 -1
  636. package/actions/standard/wearing/wearing.js +73 -28
  637. package/actions/standard/wearing/wearing.js.map +1 -1
  638. package/capabilities/index.d.ts +6 -6
  639. package/capabilities/index.d.ts.map +1 -1
  640. package/capabilities/index.js +21 -21
  641. package/capabilities/index.js.map +1 -1
  642. package/chains/index.d.ts +2 -2
  643. package/chains/index.d.ts.map +1 -1
  644. package/chains/index.js +7 -7
  645. package/chains/index.js.map +1 -1
  646. package/channels/index.d.ts +5 -5
  647. package/channels/index.d.ts.map +1 -1
  648. package/channels/index.js +43 -43
  649. package/channels/index.js.map +1 -1
  650. package/channels/registry.js +6 -6
  651. package/channels/registry.js.map +1 -1
  652. package/channels/standard.d.ts +13 -10
  653. package/channels/standard.d.ts.map +1 -1
  654. package/channels/standard.js +21 -17
  655. package/channels/standard.js.map +1 -1
  656. package/combat/index.d.ts +1 -1
  657. package/combat/index.d.ts.map +1 -1
  658. package/combat/index.js +2 -2
  659. package/combat/index.js.map +1 -1
  660. package/death/deadly-room-transformer.d.ts +37 -0
  661. package/death/deadly-room-transformer.d.ts.map +1 -0
  662. package/death/deadly-room-transformer.js +79 -0
  663. package/death/deadly-room-transformer.js.map +1 -0
  664. package/death/index.d.ts +18 -0
  665. package/death/index.d.ts.map +1 -0
  666. package/death/index.js +28 -0
  667. package/death/index.js.map +1 -0
  668. package/death/kill-player.d.ts +49 -0
  669. package/death/kill-player.d.ts.map +1 -0
  670. package/death/kill-player.js +55 -0
  671. package/death/kill-player.js.map +1 -0
  672. package/death/player-death-events.d.ts +40 -0
  673. package/death/player-death-events.d.ts.map +1 -0
  674. package/death/player-death-events.js +27 -0
  675. package/death/player-death-events.js.map +1 -0
  676. package/death/probabilistic-death.d.ts +23 -0
  677. package/death/probabilistic-death.d.ts.map +1 -0
  678. package/death/probabilistic-death.js +27 -0
  679. package/death/probabilistic-death.js.map +1 -0
  680. package/events/event-registry.d.ts +34 -34
  681. package/events/event-registry.d.ts.map +1 -1
  682. package/events/index.d.ts +4 -4
  683. package/events/index.d.ts.map +1 -1
  684. package/events/index.js +4 -4
  685. package/events/index.js.map +1 -1
  686. package/helpers/index.d.ts +1 -1
  687. package/helpers/index.d.ts.map +1 -1
  688. package/helpers/index.js +1 -1
  689. package/helpers/index.js.map +1 -1
  690. package/helpers/multi-object-handler.d.ts +1 -1
  691. package/helpers/multi-object-handler.d.ts.map +1 -1
  692. package/helpers/multi-object-handler.js +8 -5
  693. package/helpers/multi-object-handler.js.map +1 -1
  694. package/index.d.ts +16 -15
  695. package/index.d.ts.map +1 -1
  696. package/index.js +16 -15
  697. package/index.js.map +1 -1
  698. package/inference/implicit-inference.d.ts +1 -1
  699. package/inference/implicit-inference.d.ts.map +1 -1
  700. package/inference/index.d.ts +1 -1
  701. package/inference/index.d.ts.map +1 -1
  702. package/inference/index.js +4 -4
  703. package/inference/index.js.map +1 -1
  704. package/npc/behaviors.d.ts +1 -1
  705. package/npc/behaviors.d.ts.map +1 -1
  706. package/npc/behaviors.js +20 -19
  707. package/npc/behaviors.js.map +1 -1
  708. package/npc/character-observer.js +6 -6
  709. package/npc/character-observer.js.map +1 -1
  710. package/npc/index.d.ts +7 -7
  711. package/npc/index.d.ts.map +1 -1
  712. package/npc/index.js +23 -23
  713. package/npc/index.js.map +1 -1
  714. package/npc/lucidity-decay.js +2 -2
  715. package/npc/lucidity-decay.js.map +1 -1
  716. package/npc/npc-service.d.ts +9 -1
  717. package/npc/npc-service.d.ts.map +1 -1
  718. package/npc/npc-service.js +33 -32
  719. package/npc/npc-service.js.map +1 -1
  720. package/package.json +7 -7
  721. package/query-handlers/index.d.ts +2 -2
  722. package/query-handlers/index.d.ts.map +1 -1
  723. package/query-handlers/index.js +3 -3
  724. package/query-handlers/index.js.map +1 -1
  725. package/scope/index.d.ts +3 -3
  726. package/scope/index.d.ts.map +1 -1
  727. package/scope/index.js +3 -3
  728. package/scope/index.js.map +1 -1
  729. package/scope/scope-resolver.d.ts +1 -1
  730. package/scope/scope-resolver.d.ts.map +1 -1
  731. package/scope/scope-resolver.js +13 -15
  732. package/scope/scope-resolver.js.map +1 -1
  733. package/scope/witness-system.d.ts +1 -1
  734. package/scope/witness-system.d.ts.map +1 -1
  735. package/scope/witness-system.js +16 -16
  736. package/scope/witness-system.js.map +1 -1
  737. package/services/index.d.ts +1 -1
  738. package/services/index.d.ts.map +1 -1
  739. package/services/index.js +2 -2
  740. package/services/index.js.map +1 -1
  741. package/utils/index.d.ts +1 -1
  742. package/utils/index.d.ts.map +1 -1
  743. package/utils/index.js +2 -2
  744. package/utils/index.js.map +1 -1
  745. package/utils/noun-phrase.d.ts.map +1 -1
  746. package/utils/noun-phrase.js +5 -0
  747. package/utils/noun-phrase.js.map +1 -1
  748. package/validation/command-validator.d.ts +68 -16
  749. package/validation/command-validator.d.ts.map +1 -1
  750. package/validation/command-validator.js +275 -211
  751. package/validation/command-validator.js.map +1 -1
  752. package/validation/index.d.ts +3 -3
  753. package/validation/index.d.ts.map +1 -1
  754. package/validation/index.js +2 -2
  755. package/validation/index.js.map +1 -1
  756. package/validation/types.d.ts +1 -1
  757. package/validation/types.d.ts.map +1 -1
  758. package/vocabulary/index.d.ts +1 -1
  759. package/vocabulary/index.d.ts.map +1 -1
  760. package/vocabulary/index.js +1 -1
  761. package/vocabulary/index.js.map +1 -1
  762. package/vocabulary/standard-english.d.ts +1 -1
  763. package/vocabulary/standard-english.d.ts.map +1 -1
  764. package/vocabulary/standard-english.js +5 -5
  765. package/vocabulary/standard-english.js.map +1 -1
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Interceptor lifecycle descriptors (ADR-228).
3
+ *
4
+ * A descriptor is an action's declarative statement of its interceptor
5
+ * surface: which command entities carry interceptors under which action
6
+ * ids, in what order they are consulted, and which rare special contracts
7
+ * apply. The shared lifecycle engine (`lifecycle-engine.ts`) executes the
8
+ * ADR-228 rulings (D1 veto-only, D2 structured onBlocked, D3 all-entities
9
+ * fixed order, D4 per-item multi-object) against this declaration — the
10
+ * action never hand-rolls hook plumbing.
11
+ *
12
+ * An action is "wired" for interceptors iff it has a descriptor; the
13
+ * stdlib wired-action registry (ADR-228 D5) is derived mechanically from
14
+ * the descriptor table, never hand-maintained.
15
+ *
16
+ * Public interface: `ActionLifecycleDescriptor`, `EntitySlotSpec`,
17
+ * `LifecycleContracts`.
18
+ * Owner: stdlib standard-action infrastructure (ADR-228).
19
+ */
20
+ import { IFEntity } from '@sharpee/world-model';
21
+ import { ActionContext } from '../enhanced-types.js';
22
+ /**
23
+ * One consultable entity slot of a command.
24
+ *
25
+ * Slots are declared in the published consultation order (ADR-228 D3-B):
26
+ * direct object → indirect object / instrument → action-specific implicit
27
+ * entities (e.g. going's door, source room, destination room; exiting's
28
+ * current container). Validate-phase vetoes stop the chain at the first
29
+ * vetoing slot; postExecute/postReport run for every slot that survived.
30
+ *
31
+ * Both-ids rule (ADR-228 D6): a slot may consult more than one action id
32
+ * (specific id first — e.g. removing consults `if.action.removing` then
33
+ * `if.action.taking` on the item). One physical operation can therefore
34
+ * fire hooks under two ids; a trait should register its interceptor under
35
+ * exactly one of them to avoid double-mutation.
36
+ */
37
+ export interface EntitySlotSpec {
38
+ /**
39
+ * Slot identity — stable, human-readable, unique within the descriptor
40
+ * (e.g. 'directObject', 'container', 'item', 'weapon', 'door', 'source',
41
+ * 'destination'). Used in docs, diagnostics, and tests.
42
+ */
43
+ id: string;
44
+ /**
45
+ * Action ids to consult on this slot's entity, in consultation order
46
+ * (specific id before delegated id per D6).
47
+ */
48
+ actionIds: string[];
49
+ /**
50
+ * Resolve this slot's entity from the command. Return `undefined` when
51
+ * the slot is not present in this particular command (e.g. no indirect
52
+ * object) — the slot is then skipped, never an error.
53
+ *
54
+ * Implicit-entity slots resolve here too (going's source/destination
55
+ * rooms, exiting's current container) — resolution is not limited to
56
+ * parsed command objects.
57
+ */
58
+ resolve(context: ActionContext): IFEntity | undefined;
59
+ /**
60
+ * Optional seed for the slot's per-consultation sharedData, applied at
61
+ * resolve time. Used for symmetric cross-entity context (ADR-228 D3
62
+ * sub-ruling: the item-side hook in putting/inserting receives the
63
+ * container id, mirroring how the container's hook receives the item id).
64
+ *
65
+ * @param context - The action context.
66
+ * @param entity - This slot's resolved entity.
67
+ * @param multiObjectItem - In a multi-object per-item resolution (D4),
68
+ * the item currently being processed — so a shared slot (e.g. the
69
+ * container in "put all in case") can seed per-item context like the
70
+ * item id. Undefined for single-object commands and for the item slot
71
+ * itself (where `entity` IS the item).
72
+ */
73
+ seedData?(context: ActionContext, entity: IFEntity, multiObjectItem?: IFEntity): Record<string, unknown>;
74
+ }
75
+ /**
76
+ * Rare, explicit special contracts (ADR-228 D7.3). A contract changes the
77
+ * engine's standard hook semantics for the action and MUST be declared
78
+ * here — never encoded as a comment or an ad-hoc branch in the action.
79
+ */
80
+ export interface LifecycleContracts {
81
+ /**
82
+ * attacking only: when a combatant target's interceptor implements
83
+ * postExecute, that hook REPLACES the action's standard combat
84
+ * resolution instead of running after it. The action reads this flag to
85
+ * decide whether to run its core execute logic; the engine still runs
86
+ * the hook itself normally.
87
+ */
88
+ postExecuteReplacesCore?: boolean;
89
+ }
90
+ /**
91
+ * An action's declarative interceptor surface (ADR-228 D0-B).
92
+ *
93
+ * Supplied by the action to the lifecycle engine at each phase boundary.
94
+ * Descriptors are static per action (module-level constants) — anything
95
+ * command-dependent lives in slot `resolve`/`seedData` functions.
96
+ */
97
+ export interface ActionLifecycleDescriptor {
98
+ /**
99
+ * The action's primary id (e.g. `IFActions.TAKING`). Used for
100
+ * diagnostics and the D5 registry derivation.
101
+ */
102
+ actionId: string;
103
+ /**
104
+ * Entity slots in the published consultation order (D3-B): direct
105
+ * object → indirect/instrument → implicit entities.
106
+ */
107
+ slots: EntitySlotSpec[];
108
+ /** Rare special contracts (D7.3). Omit unless the ADR names one. */
109
+ contracts?: LifecycleContracts;
110
+ }
111
+ //# sourceMappingURL=descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/stdlib/src/actions/lifecycle/descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;;;;;;;OAQG;IACH,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;IAEtD;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,CACP,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,QAAQ,EAChB,eAAe,CAAC,EAAE,QAAQ,GACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IAExB,oEAAoE;IACpE,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Interceptor lifecycle descriptors (ADR-228).
4
+ *
5
+ * A descriptor is an action's declarative statement of its interceptor
6
+ * surface: which command entities carry interceptors under which action
7
+ * ids, in what order they are consulted, and which rare special contracts
8
+ * apply. The shared lifecycle engine (`lifecycle-engine.ts`) executes the
9
+ * ADR-228 rulings (D1 veto-only, D2 structured onBlocked, D3 all-entities
10
+ * fixed order, D4 per-item multi-object) against this declaration — the
11
+ * action never hand-rolls hook plumbing.
12
+ *
13
+ * An action is "wired" for interceptors iff it has a descriptor; the
14
+ * stdlib wired-action registry (ADR-228 D5) is derived mechanically from
15
+ * the descriptor table, never hand-maintained.
16
+ *
17
+ * Public interface: `ActionLifecycleDescriptor`, `EntitySlotSpec`,
18
+ * `LifecycleContracts`.
19
+ * Owner: stdlib standard-action infrastructure (ADR-228).
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ //# sourceMappingURL=descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/stdlib/src/actions/lifecycle/descriptor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Interceptor lifecycle engine barrel (ADR-228).
3
+ *
4
+ * The shared implementation of the ADR-118 interceptor lifecycle:
5
+ * descriptors declare an action's interceptor surface; the engine runs
6
+ * the D1-D4 rulings exactly once. See `lifecycle-engine.ts` for the
7
+ * contract details.
8
+ *
9
+ * Owner: stdlib standard-action infrastructure (ADR-228).
10
+ */
11
+ export { ActionLifecycleDescriptor, EntitySlotSpec, LifecycleContracts } from './descriptor.js';
12
+ export { LifecycleState, ResolvedConsultation, ResolveLifecycleOptions, resolveLifecycle, getLifecycleState, runPreValidate, runPostValidate, runPostExecute, runPostReport, runOnBlocked, blockedMessageId } from './lifecycle-engine.js';
13
+ export { MultiObjectItemState, runMultiObjectValidate, getMultiObjectLifecycle, runMultiObjectExecute, runMultiObjectReport } from './multi-object-lifecycle.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/stdlib/src/actions/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * Interceptor lifecycle engine barrel (ADR-228).
4
+ *
5
+ * The shared implementation of the ADR-118 interceptor lifecycle:
6
+ * descriptors declare an action's interceptor surface; the engine runs
7
+ * the D1-D4 rulings exactly once. See `lifecycle-engine.ts` for the
8
+ * contract details.
9
+ *
10
+ * Owner: stdlib standard-action infrastructure (ADR-228).
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.runMultiObjectReport = exports.runMultiObjectExecute = exports.getMultiObjectLifecycle = exports.runMultiObjectValidate = exports.blockedMessageId = exports.runOnBlocked = exports.runPostReport = exports.runPostExecute = exports.runPostValidate = exports.runPreValidate = exports.getLifecycleState = exports.resolveLifecycle = void 0;
14
+ var lifecycle_engine_js_1 = require("./lifecycle-engine.js");
15
+ Object.defineProperty(exports, "resolveLifecycle", { enumerable: true, get: function () { return lifecycle_engine_js_1.resolveLifecycle; } });
16
+ Object.defineProperty(exports, "getLifecycleState", { enumerable: true, get: function () { return lifecycle_engine_js_1.getLifecycleState; } });
17
+ Object.defineProperty(exports, "runPreValidate", { enumerable: true, get: function () { return lifecycle_engine_js_1.runPreValidate; } });
18
+ Object.defineProperty(exports, "runPostValidate", { enumerable: true, get: function () { return lifecycle_engine_js_1.runPostValidate; } });
19
+ Object.defineProperty(exports, "runPostExecute", { enumerable: true, get: function () { return lifecycle_engine_js_1.runPostExecute; } });
20
+ Object.defineProperty(exports, "runPostReport", { enumerable: true, get: function () { return lifecycle_engine_js_1.runPostReport; } });
21
+ Object.defineProperty(exports, "runOnBlocked", { enumerable: true, get: function () { return lifecycle_engine_js_1.runOnBlocked; } });
22
+ Object.defineProperty(exports, "blockedMessageId", { enumerable: true, get: function () { return lifecycle_engine_js_1.blockedMessageId; } });
23
+ var multi_object_lifecycle_js_1 = require("./multi-object-lifecycle.js");
24
+ Object.defineProperty(exports, "runMultiObjectValidate", { enumerable: true, get: function () { return multi_object_lifecycle_js_1.runMultiObjectValidate; } });
25
+ Object.defineProperty(exports, "getMultiObjectLifecycle", { enumerable: true, get: function () { return multi_object_lifecycle_js_1.getMultiObjectLifecycle; } });
26
+ Object.defineProperty(exports, "runMultiObjectExecute", { enumerable: true, get: function () { return multi_object_lifecycle_js_1.runMultiObjectExecute; } });
27
+ Object.defineProperty(exports, "runMultiObjectReport", { enumerable: true, get: function () { return multi_object_lifecycle_js_1.runMultiObjectReport; } });
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/stdlib/src/actions/lifecycle/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAQH,6DAY+B;AAR7B,uHAAA,gBAAgB,OAAA;AAChB,wHAAA,iBAAiB,OAAA;AACjB,qHAAA,cAAc,OAAA;AACd,sHAAA,eAAe,OAAA;AACf,qHAAA,cAAc,OAAA;AACd,oHAAA,aAAa,OAAA;AACb,mHAAA,YAAY,OAAA;AACZ,uHAAA,gBAAgB,OAAA;AAGlB,yEAMqC;AAJnC,mIAAA,sBAAsB,OAAA;AACtB,oIAAA,uBAAuB,OAAA;AACvB,kIAAA,qBAAqB,OAAA;AACrB,iIAAA,oBAAoB,OAAA"}
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Interceptor lifecycle engine (ADR-228).
3
+ *
4
+ * The single implementation of the ADR-118 interceptor lifecycle. Actions
5
+ * declare their interceptor surface as an `ActionLifecycleDescriptor` and
6
+ * call the engine at their four phase boundaries; the engine owns the
7
+ * rulings exactly once:
8
+ *
9
+ * - D1 — veto-only guards: a validate hook acts only when it returns
10
+ * `{valid: false}`; any other result (including `{valid: true}`) falls
11
+ * through. No hook can skip standard validation or later consultations.
12
+ * (The explicit force-allow marker is a reserved, unimplemented
13
+ * extension — see ADR-228 D1.)
14
+ * - D2 — structured onBlocked: `{ override?, emit? }` applied against the
15
+ * standard blocked event, which always survives.
16
+ * - D3 — all command entities consulted in the descriptor's published
17
+ * slot order, each consultation with its own sharedData; first veto
18
+ * stops the validate chain; postExecute/postReport run for every
19
+ * consultation once the action proceeds.
20
+ * - Override arbitration: at most one consultation may return an
21
+ * `override` per report/blocked application — a second is a hard error,
22
+ * mirroring ADR-106's "multiple game.message reactions" rule.
23
+ *
24
+ * Multi-object commands (D4) run one lifecycle per item via
25
+ * `multi-object-lifecycle.ts`, built on the same primitives.
26
+ *
27
+ * Public interface: `resolveLifecycle`, `getLifecycleState`,
28
+ * `runPreValidate`, `runPostValidate`, `runPostExecute`, `runPostReport`,
29
+ * `runOnBlocked`, `LifecycleState`, `ResolvedConsultation`.
30
+ * Owner: stdlib standard-action infrastructure (ADR-228).
31
+ */
32
+ import { ISemanticEvent } from '@sharpee/core';
33
+ import { IFEntity, InterceptorSharedData } from '@sharpee/world-model';
34
+ import type { ActionInterceptor } from '@sharpee/world-model';
35
+ import { ActionContext, ValidationResult } from '../enhanced-types.js';
36
+ import { ActionLifecycleDescriptor } from './descriptor.js';
37
+ /**
38
+ * One resolved (entity, actionId) interceptor consultation.
39
+ *
40
+ * A slot that consults two action ids (D6 both-ids) yields up to two
41
+ * consultations; each has its own `data` (D3 sharedData isolation).
42
+ */
43
+ export interface ResolvedConsultation {
44
+ /** The descriptor slot this consultation came from. */
45
+ slotId: string;
46
+ /** The action id the interceptor was resolved under. */
47
+ actionId: string;
48
+ /** The entity whose trait declared the interceptor. */
49
+ entity: IFEntity;
50
+ /** The resolved interceptor. */
51
+ interceptor: ActionInterceptor;
52
+ /** Per-consultation shared data, isolated from other consultations. */
53
+ data: InterceptorSharedData;
54
+ }
55
+ /**
56
+ * The command's resolved lifecycle: the descriptor plus every
57
+ * consultation found for the command's entities, in consultation order.
58
+ */
59
+ export interface LifecycleState {
60
+ descriptor: ActionLifecycleDescriptor;
61
+ consultations: ResolvedConsultation[];
62
+ }
63
+ /**
64
+ * Options for `resolveLifecycle`.
65
+ */
66
+ export interface ResolveLifecycleOptions {
67
+ /**
68
+ * Substitute a specific entity for one slot instead of calling its
69
+ * `resolve` — used by the multi-object helper (D4) to bind each
70
+ * expanded item to the item slot. The resulting state is NOT stored in
71
+ * sharedData (per-item states live in the multi-object results).
72
+ */
73
+ slotOverride?: {
74
+ slotId: string;
75
+ entity: IFEntity;
76
+ };
77
+ }
78
+ /**
79
+ * Resolve an action's interceptor consultations for the current command.
80
+ *
81
+ * Iterates the descriptor's slots in published order (D3-B); for each
82
+ * slot that resolves to an entity, consults the world's interceptor
83
+ * registry under each of the slot's action ids (D6 order). Every match
84
+ * becomes a `ResolvedConsultation` with fresh sharedData (seeded via the
85
+ * slot's `seedData`, if any).
86
+ *
87
+ * Stores the state in `context.sharedData` (unless `slotOverride` is
88
+ * used) so later phases can fetch it with `getLifecycleState`.
89
+ *
90
+ * @param context - The action context.
91
+ * @param descriptor - The action's declared interceptor surface.
92
+ * @param options - See `ResolveLifecycleOptions`.
93
+ * @returns The resolved lifecycle state (possibly with zero consultations).
94
+ */
95
+ export declare function resolveLifecycle(context: ActionContext, descriptor: ActionLifecycleDescriptor, options?: ResolveLifecycleOptions): LifecycleState;
96
+ /**
97
+ * Fetch the lifecycle state stored by `resolveLifecycle` for this command.
98
+ *
99
+ * @param context - The action context.
100
+ * @returns The state, or `undefined` if `resolveLifecycle` has not run.
101
+ */
102
+ export declare function getLifecycleState(context: ActionContext): LifecycleState | undefined;
103
+ /**
104
+ * Resolve the message id for a blocked action (ADR-231 D1) — the ONE
105
+ * place the qualification convention lives.
106
+ *
107
+ * Interceptor-originated errors (and helper-produced cross-action keys)
108
+ * carry `errorQualified: true` and pass through untouched; an action's
109
+ * own validation errors are qualified as `<action.id>.<error>` exactly
110
+ * as before. `blocked()` implementations call this instead of building
111
+ * ids by hand; key shape (dots, hyphens) is NOT the discriminator —
112
+ * provenance is.
113
+ *
114
+ * @param context - The action context (supplies the action id).
115
+ * @param result - The failed validation result carrying the error key.
116
+ * @returns The message id to emit from `blocked()`.
117
+ */
118
+ export declare function blockedMessageId(context: ActionContext, result: ValidationResult): string;
119
+ /**
120
+ * Run every consultation's `preValidate` hook in order (D3-B).
121
+ *
122
+ * First veto wins: returns that veto as a `ValidationResult` and stops
123
+ * consulting. Returns `null` when no hook vetoes (the action continues
124
+ * with standard validation — D1: hooks cannot approve, only object).
125
+ *
126
+ * @param context - The action context.
127
+ * @param state - The resolved lifecycle state.
128
+ */
129
+ export declare function runPreValidate(context: ActionContext, state: LifecycleState): ValidationResult | null;
130
+ /**
131
+ * Run every consultation's `postValidate` hook in order (D3-B).
132
+ *
133
+ * Canonical placement (ADR-228): after ALL standard validation has
134
+ * passed. First veto wins; returns `null` when no hook vetoes.
135
+ *
136
+ * @param context - The action context.
137
+ * @param state - The resolved lifecycle state.
138
+ */
139
+ export declare function runPostValidate(context: ActionContext, state: LifecycleState): ValidationResult | null;
140
+ /**
141
+ * Run every consultation's `postExecute` hook in order (D3-B: all
142
+ * consultations survived validation once the action executed).
143
+ *
144
+ * Note the `postExecuteReplacesCore` contract (D7.3) governs whether the
145
+ * ACTION runs its own core logic — the engine always runs the hooks
146
+ * themselves normally.
147
+ *
148
+ * @param context - The action context.
149
+ * @param state - The resolved lifecycle state.
150
+ */
151
+ export declare function runPostExecute(context: ActionContext, state: LifecycleState): void;
152
+ /**
153
+ * Run every consultation's `postReport` hook and apply the results to the
154
+ * action's events.
155
+ *
156
+ * At most ONE consultation may return an `override` — a second is a hard
157
+ * error (throws), mirroring the `InterceptorReportResult` contract's
158
+ * ADR-106 rule. `emit` effects append in consultation order.
159
+ *
160
+ * @param context - The action context.
161
+ * @param state - The resolved lifecycle state.
162
+ * @param events - The action's events array; mutated in place.
163
+ * @param primaryEventType - The event type an `override` targets.
164
+ * @param searchFrom - Index in `events` where this report began — override
165
+ * targeting searches from here so per-item applications (D4) land on
166
+ * the item's own event, not an earlier item's.
167
+ */
168
+ export declare function runPostReport(context: ActionContext, state: LifecycleState, events: ISemanticEvent[], primaryEventType: string, searchFrom?: number): void;
169
+ /**
170
+ * Run every consultation's `onBlocked` hook and apply the results to the
171
+ * action's blocked events (D2: the standard blocked event always
172
+ * survives; `override` swaps its message, `emit` appends).
173
+ *
174
+ * All resolved consultations are notified — including ones the validate
175
+ * chain never reached — matching the D3 author model ("a clause on any
176
+ * entity involved in the command fires"). At most one `override` (hard
177
+ * error otherwise).
178
+ *
179
+ * @param context - The action context.
180
+ * @param state - The resolved lifecycle state.
181
+ * @param events - The blocked events array (standard blocked event
182
+ * already pushed); mutated in place.
183
+ * @param blockedEventType - The standard blocked event's type.
184
+ * @param error - The validation error code the action was blocked with.
185
+ * @param searchFrom - Index in `events` where this item's blocked report
186
+ * began (D4 per-item targeting).
187
+ */
188
+ export declare function runOnBlocked(context: ActionContext, state: LifecycleState, events: ISemanticEvent[], blockedEventType: string, error: string, searchFrom?: number): void;
189
+ //# sourceMappingURL=lifecycle-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle-engine.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/stdlib/src/actions/lifecycle/lifecycle-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,QAAQ,EACR,qBAAqB,EAGtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAS5D;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,MAAM,EAAE,QAAQ,CAAC;IACjB,gCAAgC;IAChC,WAAW,EAAE,iBAAiB,CAAC;IAC/B,uEAAuE;IACvE,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,yBAAyB,CAAC;IACtC,aAAa,EAAE,oBAAoB,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,QAAQ,CAAA;KAAE,CAAC;CACrD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,yBAAyB,EACrC,OAAO,CAAC,EAAE,uBAAuB,GAChC,cAAc,CAoChB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,CAEpF;AAkBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAGzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,cAAc,GACpB,gBAAgB,GAAG,IAAI,CASzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,cAAc,GACpB,gBAAgB,GAAG,IAAI,CASzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAIlF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,EAAE,EACxB,gBAAgB,EAAE,MAAM,EACxB,UAAU,GAAE,MAAU,GACrB,IAAI,CAkBN;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,EAAE,EACxB,gBAAgB,EAAE,MAAM,EACxB,KAAK,EAAE,MAAM,EACb,UAAU,GAAE,MAAU,GACrB,IAAI,CAkBN"}
@@ -0,0 +1,272 @@
1
+ "use strict";
2
+ /**
3
+ * Interceptor lifecycle engine (ADR-228).
4
+ *
5
+ * The single implementation of the ADR-118 interceptor lifecycle. Actions
6
+ * declare their interceptor surface as an `ActionLifecycleDescriptor` and
7
+ * call the engine at their four phase boundaries; the engine owns the
8
+ * rulings exactly once:
9
+ *
10
+ * - D1 — veto-only guards: a validate hook acts only when it returns
11
+ * `{valid: false}`; any other result (including `{valid: true}`) falls
12
+ * through. No hook can skip standard validation or later consultations.
13
+ * (The explicit force-allow marker is a reserved, unimplemented
14
+ * extension — see ADR-228 D1.)
15
+ * - D2 — structured onBlocked: `{ override?, emit? }` applied against the
16
+ * standard blocked event, which always survives.
17
+ * - D3 — all command entities consulted in the descriptor's published
18
+ * slot order, each consultation with its own sharedData; first veto
19
+ * stops the validate chain; postExecute/postReport run for every
20
+ * consultation once the action proceeds.
21
+ * - Override arbitration: at most one consultation may return an
22
+ * `override` per report/blocked application — a second is a hard error,
23
+ * mirroring ADR-106's "multiple game.message reactions" rule.
24
+ *
25
+ * Multi-object commands (D4) run one lifecycle per item via
26
+ * `multi-object-lifecycle.ts`, built on the same primitives.
27
+ *
28
+ * Public interface: `resolveLifecycle`, `getLifecycleState`,
29
+ * `runPreValidate`, `runPostValidate`, `runPostExecute`, `runPostReport`,
30
+ * `runOnBlocked`, `LifecycleState`, `ResolvedConsultation`.
31
+ * Owner: stdlib standard-action infrastructure (ADR-228).
32
+ */
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ exports.resolveLifecycle = resolveLifecycle;
35
+ exports.getLifecycleState = getLifecycleState;
36
+ exports.blockedMessageId = blockedMessageId;
37
+ exports.runPreValidate = runPreValidate;
38
+ exports.runPostValidate = runPostValidate;
39
+ exports.runPostExecute = runPostExecute;
40
+ exports.runPostReport = runPostReport;
41
+ exports.runOnBlocked = runOnBlocked;
42
+ const world_model_1 = require("@sharpee/world-model");
43
+ /**
44
+ * Reserved sharedData key holding the command's resolved lifecycle state.
45
+ * Actions never read or write this key directly — they hold the state
46
+ * returned by `resolveLifecycle` or fetch it via `getLifecycleState`.
47
+ */
48
+ const LIFECYCLE_KEY = '_lifecycle';
49
+ /**
50
+ * Resolve an action's interceptor consultations for the current command.
51
+ *
52
+ * Iterates the descriptor's slots in published order (D3-B); for each
53
+ * slot that resolves to an entity, consults the world's interceptor
54
+ * registry under each of the slot's action ids (D6 order). Every match
55
+ * becomes a `ResolvedConsultation` with fresh sharedData (seeded via the
56
+ * slot's `seedData`, if any).
57
+ *
58
+ * Stores the state in `context.sharedData` (unless `slotOverride` is
59
+ * used) so later phases can fetch it with `getLifecycleState`.
60
+ *
61
+ * @param context - The action context.
62
+ * @param descriptor - The action's declared interceptor surface.
63
+ * @param options - See `ResolveLifecycleOptions`.
64
+ * @returns The resolved lifecycle state (possibly with zero consultations).
65
+ */
66
+ function resolveLifecycle(context, descriptor, options) {
67
+ const consultations = [];
68
+ for (const slot of descriptor.slots) {
69
+ const isOverrideSlot = options?.slotOverride?.slotId === slot.id;
70
+ const entity = isOverrideSlot
71
+ ? options.slotOverride.entity
72
+ : slot.resolve(context);
73
+ if (!entity)
74
+ continue;
75
+ for (const actionId of slot.actionIds) {
76
+ const lookup = context.world.getInterceptorForAction(entity, actionId);
77
+ if (!lookup)
78
+ continue;
79
+ // In a per-item resolution (D4), non-item slots' seedData receives
80
+ // the current item so shared entities (e.g. the container) can seed
81
+ // per-item context like the item id.
82
+ const multiObjectItem = !isOverrideSlot ? options?.slotOverride?.entity : undefined;
83
+ const data = slot.seedData
84
+ ? { ...slot.seedData(context, entity, multiObjectItem) }
85
+ : {};
86
+ consultations.push({
87
+ slotId: slot.id,
88
+ actionId,
89
+ entity,
90
+ interceptor: lookup.interceptor,
91
+ data
92
+ });
93
+ }
94
+ }
95
+ const state = { descriptor, consultations };
96
+ if (!options?.slotOverride) {
97
+ context.sharedData[LIFECYCLE_KEY] = state;
98
+ }
99
+ return state;
100
+ }
101
+ /**
102
+ * Fetch the lifecycle state stored by `resolveLifecycle` for this command.
103
+ *
104
+ * @param context - The action context.
105
+ * @returns The state, or `undefined` if `resolveLifecycle` has not run.
106
+ */
107
+ function getLifecycleState(context) {
108
+ return context.sharedData[LIFECYCLE_KEY];
109
+ }
110
+ /**
111
+ * D1 veto test: a hook result acts iff it is non-null AND `valid === false`.
112
+ * Everything else — null, `{valid: true}`, any truthy shape — falls through.
113
+ *
114
+ * Every veto is marked `errorQualified: true` (ADR-231 D1): an
115
+ * interceptor-originated error key is a fully-qualified message id —
116
+ * story-registered keys resolve as the author wrote them — and
117
+ * `blockedMessageId` must never prefix it with the action id.
118
+ */
119
+ function vetoOf(result) {
120
+ if (result !== null && result.valid === false) {
121
+ return { valid: false, error: result.error, errorQualified: true, params: result.params };
122
+ }
123
+ return null;
124
+ }
125
+ /**
126
+ * Resolve the message id for a blocked action (ADR-231 D1) — the ONE
127
+ * place the qualification convention lives.
128
+ *
129
+ * Interceptor-originated errors (and helper-produced cross-action keys)
130
+ * carry `errorQualified: true` and pass through untouched; an action's
131
+ * own validation errors are qualified as `<action.id>.<error>` exactly
132
+ * as before. `blocked()` implementations call this instead of building
133
+ * ids by hand; key shape (dots, hyphens) is NOT the discriminator —
134
+ * provenance is.
135
+ *
136
+ * @param context - The action context (supplies the action id).
137
+ * @param result - The failed validation result carrying the error key.
138
+ * @returns The message id to emit from `blocked()`.
139
+ */
140
+ function blockedMessageId(context, result) {
141
+ const error = result.error ?? 'action_failed';
142
+ return result.errorQualified === true ? error : `${context.action.id}.${error}`;
143
+ }
144
+ /**
145
+ * Run every consultation's `preValidate` hook in order (D3-B).
146
+ *
147
+ * First veto wins: returns that veto as a `ValidationResult` and stops
148
+ * consulting. Returns `null` when no hook vetoes (the action continues
149
+ * with standard validation — D1: hooks cannot approve, only object).
150
+ *
151
+ * @param context - The action context.
152
+ * @param state - The resolved lifecycle state.
153
+ */
154
+ function runPreValidate(context, state) {
155
+ for (const c of state.consultations) {
156
+ if (!c.interceptor.preValidate)
157
+ continue;
158
+ const veto = vetoOf(c.interceptor.preValidate(c.entity, context.world, context.player.id, c.data));
159
+ if (veto)
160
+ return veto;
161
+ }
162
+ return null;
163
+ }
164
+ /**
165
+ * Run every consultation's `postValidate` hook in order (D3-B).
166
+ *
167
+ * Canonical placement (ADR-228): after ALL standard validation has
168
+ * passed. First veto wins; returns `null` when no hook vetoes.
169
+ *
170
+ * @param context - The action context.
171
+ * @param state - The resolved lifecycle state.
172
+ */
173
+ function runPostValidate(context, state) {
174
+ for (const c of state.consultations) {
175
+ if (!c.interceptor.postValidate)
176
+ continue;
177
+ const veto = vetoOf(c.interceptor.postValidate(c.entity, context.world, context.player.id, c.data));
178
+ if (veto)
179
+ return veto;
180
+ }
181
+ return null;
182
+ }
183
+ /**
184
+ * Run every consultation's `postExecute` hook in order (D3-B: all
185
+ * consultations survived validation once the action executed).
186
+ *
187
+ * Note the `postExecuteReplacesCore` contract (D7.3) governs whether the
188
+ * ACTION runs its own core logic — the engine always runs the hooks
189
+ * themselves normally.
190
+ *
191
+ * @param context - The action context.
192
+ * @param state - The resolved lifecycle state.
193
+ */
194
+ function runPostExecute(context, state) {
195
+ for (const c of state.consultations) {
196
+ c.interceptor.postExecute?.(c.entity, context.world, context.player.id, c.data);
197
+ }
198
+ }
199
+ /**
200
+ * Run every consultation's `postReport` hook and apply the results to the
201
+ * action's events.
202
+ *
203
+ * At most ONE consultation may return an `override` — a second is a hard
204
+ * error (throws), mirroring the `InterceptorReportResult` contract's
205
+ * ADR-106 rule. `emit` effects append in consultation order.
206
+ *
207
+ * @param context - The action context.
208
+ * @param state - The resolved lifecycle state.
209
+ * @param events - The action's events array; mutated in place.
210
+ * @param primaryEventType - The event type an `override` targets.
211
+ * @param searchFrom - Index in `events` where this report began — override
212
+ * targeting searches from here so per-item applications (D4) land on
213
+ * the item's own event, not an earlier item's.
214
+ */
215
+ function runPostReport(context, state, events, primaryEventType, searchFrom = 0) {
216
+ let overrideSeen = false;
217
+ for (const c of state.consultations) {
218
+ if (!c.interceptor.postReport)
219
+ continue;
220
+ const result = c.interceptor.postReport(c.entity, context.world, context.player.id, c.data);
221
+ if (!result)
222
+ continue;
223
+ if (result.override) {
224
+ if (overrideSeen) {
225
+ throw new Error(`Interceptor lifecycle (${state.descriptor.actionId}): multiple consultations ` +
226
+ `returned a postReport override — at most one interceptor may override the ` +
227
+ `primary message (slot '${c.slotId}', action '${c.actionId}').`);
228
+ }
229
+ overrideSeen = true;
230
+ }
231
+ (0, world_model_1.applyInterceptorReportResult)(events, primaryEventType, result, context, { searchFrom });
232
+ }
233
+ }
234
+ /**
235
+ * Run every consultation's `onBlocked` hook and apply the results to the
236
+ * action's blocked events (D2: the standard blocked event always
237
+ * survives; `override` swaps its message, `emit` appends).
238
+ *
239
+ * All resolved consultations are notified — including ones the validate
240
+ * chain never reached — matching the D3 author model ("a clause on any
241
+ * entity involved in the command fires"). At most one `override` (hard
242
+ * error otherwise).
243
+ *
244
+ * @param context - The action context.
245
+ * @param state - The resolved lifecycle state.
246
+ * @param events - The blocked events array (standard blocked event
247
+ * already pushed); mutated in place.
248
+ * @param blockedEventType - The standard blocked event's type.
249
+ * @param error - The validation error code the action was blocked with.
250
+ * @param searchFrom - Index in `events` where this item's blocked report
251
+ * began (D4 per-item targeting).
252
+ */
253
+ function runOnBlocked(context, state, events, blockedEventType, error, searchFrom = 0) {
254
+ let overrideSeen = false;
255
+ for (const c of state.consultations) {
256
+ if (!c.interceptor.onBlocked)
257
+ continue;
258
+ const result = c.interceptor.onBlocked(c.entity, context.world, context.player.id, error, c.data);
259
+ if (!result)
260
+ continue;
261
+ if (result.override) {
262
+ if (overrideSeen) {
263
+ throw new Error(`Interceptor lifecycle (${state.descriptor.actionId}): multiple consultations ` +
264
+ `returned an onBlocked override — at most one interceptor may override the ` +
265
+ `blocked message (slot '${c.slotId}', action '${c.actionId}').`);
266
+ }
267
+ overrideSeen = true;
268
+ }
269
+ (0, world_model_1.applyInterceptorBlockedResult)(events, blockedEventType, result, context, { searchFrom });
270
+ }
271
+ }
272
+ //# sourceMappingURL=lifecycle-engine.js.map