@maka/maka-cli 5.3.17 → 5.5.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 (245) hide show
  1. package/bundle/typescript/package.json +1 -1
  2. package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +62 -0
  3. package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +196 -0
  4. package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -0
  5. package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +16 -0
  6. package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +65 -0
  7. package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -0
  8. package/bundle/typescript/src/commands/game/sideQuest/commands/assense.d.ts +16 -0
  9. package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +122 -0
  10. package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -0
  11. package/bundle/typescript/src/commands/game/sideQuest/commands/attack.d.ts +42 -0
  12. package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +243 -0
  13. package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -0
  14. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +16 -0
  15. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +39 -0
  16. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -0
  17. package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.d.ts +21 -0
  18. package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +82 -0
  19. package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js.map +1 -0
  20. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +28 -0
  21. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +101 -0
  22. package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -0
  23. package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +19 -0
  24. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +219 -0
  25. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -0
  26. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +58 -0
  27. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +397 -0
  28. package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -0
  29. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +11 -1
  30. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +8 -3
  31. package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +1 -1
  32. package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +6 -0
  33. package/bundle/typescript/src/commands/game/sideQuest/commands/command.js +4 -0
  34. package/bundle/typescript/src/commands/game/sideQuest/commands/command.js.map +1 -1
  35. package/bundle/typescript/src/commands/game/sideQuest/commands/drone.d.ts +15 -0
  36. package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +72 -0
  37. package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -0
  38. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +3 -0
  39. package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
  40. package/bundle/typescript/src/commands/game/sideQuest/commands/edge.d.ts +13 -0
  41. package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js +31 -0
  42. package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js.map +1 -0
  43. package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.d.ts +6 -0
  44. package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js +27 -0
  45. package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js.map +1 -0
  46. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +4 -0
  47. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +59 -2
  48. package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
  49. package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.d.ts +13 -0
  50. package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js +50 -0
  51. package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js.map +1 -0
  52. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +7 -1
  53. package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
  54. package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +13 -0
  55. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +147 -4
  56. package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
  57. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.d.ts +25 -0
  58. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +199 -0
  59. package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -0
  60. package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.d.ts +15 -0
  61. package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +75 -0
  62. package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -0
  63. package/bundle/typescript/src/commands/game/sideQuest/commands/inv.d.ts +12 -0
  64. package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js +43 -0
  65. package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js.map +1 -0
  66. package/bundle/typescript/src/commands/game/sideQuest/commands/jack.d.ts +17 -0
  67. package/bundle/typescript/src/commands/game/sideQuest/commands/jack.js +64 -0
  68. package/bundle/typescript/src/commands/game/sideQuest/commands/jack.js.map +1 -0
  69. package/bundle/typescript/src/commands/game/sideQuest/commands/kill.d.ts +10 -3
  70. package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js +11 -33
  71. package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js.map +1 -1
  72. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +47 -4
  73. package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
  74. package/bundle/typescript/src/commands/game/sideQuest/commands/map.d.ts +12 -0
  75. package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +46 -0
  76. package/bundle/typescript/src/commands/game/sideQuest/commands/map.js.map +1 -0
  77. package/bundle/typescript/src/commands/game/sideQuest/commands/pan.d.ts +12 -0
  78. package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js +55 -0
  79. package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js.map +1 -0
  80. package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.d.ts +18 -0
  81. package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +100 -0
  82. package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -0
  83. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.d.ts +10 -0
  84. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +33 -0
  85. package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -0
  86. package/bundle/typescript/src/commands/game/sideQuest/commands/project.d.ts +19 -0
  87. package/bundle/typescript/src/commands/game/sideQuest/commands/project.js +54 -0
  88. package/bundle/typescript/src/commands/game/sideQuest/commands/project.js.map +1 -0
  89. package/bundle/typescript/src/commands/game/sideQuest/commands/read.js +6 -5
  90. package/bundle/typescript/src/commands/game/sideQuest/commands/read.js.map +1 -1
  91. package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.d.ts +12 -0
  92. package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js +52 -0
  93. package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js.map +1 -0
  94. package/bundle/typescript/src/commands/game/sideQuest/commands/reload.d.ts +14 -0
  95. package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js +40 -0
  96. package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js.map +1 -0
  97. package/bundle/typescript/src/commands/game/sideQuest/commands/rest.d.ts +15 -0
  98. package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +59 -0
  99. package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -0
  100. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +31 -2
  101. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
  102. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +71 -7
  103. package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
  104. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.d.ts +12 -0
  105. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +58 -0
  106. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -0
  107. package/bundle/typescript/src/commands/game/sideQuest/commands/silent.d.ts +13 -0
  108. package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js +50 -0
  109. package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js.map +1 -0
  110. package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.d.ts +15 -0
  111. package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +35 -0
  112. package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -0
  113. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +32 -11
  114. package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
  115. package/bundle/typescript/src/commands/game/sideQuest/commands/spells.d.ts +14 -0
  116. package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +86 -0
  117. package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -0
  118. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.d.ts +12 -0
  119. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +41 -0
  120. package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -0
  121. package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.d.ts +21 -0
  122. package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js +43 -0
  123. package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js.map +1 -0
  124. package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.d.ts +20 -0
  125. package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js +45 -0
  126. package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js.map +1 -0
  127. package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +8 -0
  128. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +138 -2
  129. package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
  130. package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +8 -0
  131. package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
  132. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +6 -3
  133. package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
  134. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +1 -0
  135. package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
  136. package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +24 -0
  137. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +102 -1
  138. package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
  139. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
  140. package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
  141. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js +7 -2
  142. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js.map +1 -1
  143. package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +2 -1
  144. package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +1 -1
  145. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +3 -0
  146. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
  147. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +175 -0
  148. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +673 -0
  149. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -0
  150. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.d.ts +8 -1
  151. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +139 -21
  152. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
  153. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +174 -0
  154. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +647 -0
  155. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -0
  156. package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +138 -9
  157. package/bundle/typescript/src/commands/game/sideQuest/game.js +757 -197
  158. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  159. package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.d.ts +16 -0
  160. package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.js +101 -0
  161. package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.js.map +1 -0
  162. package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.d.ts +15 -0
  163. package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.js +95 -0
  164. package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.js.map +1 -0
  165. package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +10 -0
  166. package/bundle/typescript/src/commands/game/sideQuest/models/door.js +15 -2
  167. package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +1 -1
  168. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +10 -0
  169. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +54 -4
  170. package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -1
  171. package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +41 -0
  172. package/bundle/typescript/src/commands/game/sideQuest/models/item.js +106 -3
  173. package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
  174. package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +27 -0
  175. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +312 -50
  176. package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
  177. package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +278 -0
  178. package/bundle/typescript/src/commands/game/sideQuest/models/player.js +661 -9
  179. package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
  180. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +75 -1
  181. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +199 -6
  182. package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
  183. package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +24 -0
  184. package/bundle/typescript/src/commands/game/sideQuest/models/room.js +53 -18
  185. package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
  186. package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +73 -0
  187. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +208 -3
  188. package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
  189. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +319 -70
  190. package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +661 -227
  191. package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.d.ts +1 -0
  192. package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +1 -0
  193. package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
  194. package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.d.ts +1 -0
  195. package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +42 -0
  196. package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +15 -1
  197. package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +4 -0
  198. package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +8 -0
  199. package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.d.ts +15 -0
  200. package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.js +2 -0
  201. package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.js.map +1 -0
  202. package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.d.ts +1 -0
  203. package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js +5 -0
  204. package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +1 -1
  205. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +1 -0
  206. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +1 -0
  207. package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
  208. package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +3 -0
  209. package/bundle/typescript/src/commands/game/sideQuest/ui.js +95 -6
  210. package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
  211. package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +60 -0
  212. package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +138 -0
  213. package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -0
  214. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +145 -0
  215. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +354 -0
  216. package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -0
  217. package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.d.ts +2 -0
  218. package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js +12 -0
  219. package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js.map +1 -0
  220. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.d.ts +22 -0
  221. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js +34 -0
  222. package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js.map +1 -0
  223. package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.d.ts +36 -0
  224. package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js +92 -0
  225. package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js.map +1 -0
  226. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +77 -0
  227. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +265 -0
  228. package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -0
  229. package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.d.ts +16 -0
  230. package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.js +36 -0
  231. package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.js.map +1 -0
  232. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +78 -7
  233. package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
  234. package/bundle/typescript/src/commands/set/global.sub.cmd.js +59 -5
  235. package/bundle/typescript/src/commands/set/global.sub.cmd.js.map +1 -1
  236. package/bundle/typescript/src/tools/ai/ai.class.d.ts +42 -0
  237. package/bundle/typescript/src/tools/ai/ai.class.js +117 -0
  238. package/bundle/typescript/src/tools/ai/ai.class.js.map +1 -0
  239. package/bundle/typescript/src/tools/fsi/fsi.interfaces.d.ts +1 -0
  240. package/bundle/typescript/src/tools/fsi/fsi.interfaces.js.map +1 -1
  241. package/bundle/typescript/src/tools/https/https.class.d.ts +3 -2
  242. package/bundle/typescript/src/tools/https/https.class.js +51 -2
  243. package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
  244. package/bundle/typescript/src/tools/https/https.interface.d.ts +10 -0
  245. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-chunks.js","sourceRoot":"","sources":["../../../../../../../src/commands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I,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC1D,IAAI,wDAAwD,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3F,IAAI,sCAAsC,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3E,IAAI,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAC;IACpD,IAAI,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,UAAU,CAAC;IAC7D,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -2,5 +2,12 @@ import { Scene } from '../models/scene.js';
2
2
  import { Player } from '../models/player.js';
3
3
  import { ISceneSeedJson } from '../types/seed/scene-seed.js';
4
4
  export declare class SceneSynthesizer {
5
- static synthesizeFromJson(json: ISceneSeedJson, player: Player, _useAi: boolean): Promise<Scene>;
5
+ /**
6
+ * `grantStartingItems` defaults to true (a fresh game). Pass false when
7
+ * synthesizing a "continue"d job onto a long-lived Player who already has
8
+ * gear from prior jobs -- otherwise a whole new starter kit (commlink,
9
+ * armor, etc.) gets dumped into their inventory on top of what they
10
+ * already earned, unexplained.
11
+ */
12
+ static synthesizeFromJson(json: ISceneSeedJson, player: Player, useAi: boolean, grantStartingItems?: boolean): Promise<Scene>;
6
13
  }
@@ -1,11 +1,20 @@
1
1
  import { Scene } from '../models/scene.js';
2
+ import { Door } from '../models/door.js';
2
3
  import { RoomFactory } from './room-factory.js';
3
4
  import { NPCFactory } from './npc-factory.js';
4
5
  import { ItemFactory } from './item-factory.js';
5
6
  import { PuzzleFactory } from './puzzle-factory.js';
7
+ import { Category } from '../types/shared/item-enum.js';
6
8
  import { Logger } from '../utilities/logger.js';
7
9
  export class SceneSynthesizer {
8
- static async synthesizeFromJson(json, player, _useAi) {
10
+ /**
11
+ * `grantStartingItems` defaults to true (a fresh game). Pass false when
12
+ * synthesizing a "continue"d job onto a long-lived Player who already has
13
+ * gear from prior jobs -- otherwise a whole new starter kit (commlink,
14
+ * armor, etc.) gets dumped into their inventory on top of what they
15
+ * already earned, unexplained.
16
+ */
17
+ static async synthesizeFromJson(json, player, useAi, grantStartingItems = true) {
9
18
  const logger = Logger.getInstance();
10
19
  // Step 1: Create the Scene using the JSON’s room configuration
11
20
  logger.write(`Initilizing Scene`);
@@ -17,13 +26,27 @@ export class SceneSynthesizer {
17
26
  },
18
27
  residenceTiers: json.residenceTiers,
19
28
  story: json.story,
29
+ hub: json.hub,
20
30
  });
31
+ // Shared context handed to every ensureAI*() call below, so room
32
+ // descriptions, NPC appearances, and puzzle riddles all stay
33
+ // consistent with the same scene tone.
34
+ const sceneContext = `
35
+ Scene: ${json.name}
36
+ Story: ${json.story}
37
+ Currency: ${json.currency.type}
38
+ Residence Tiers: ${json.residenceTiers.join(', ')}
39
+ Key Locations: ${json.rooms.map(r => r.name).join(', ')}
40
+ `.trim();
21
41
  // Step 2: Create and Register Rooms using RoomFactory
22
42
  logger.write(`Creating Rooms`);
23
43
  const roomFactory = new RoomFactory();
24
44
  for (const roomJson of json.rooms) {
25
45
  const room = await roomFactory.createRoomFromJson(roomJson);
26
46
  scene.addRoom(room); // Assumes you have a method like this on Scene
47
+ if (useAi) {
48
+ await room.ensureAIDescription(sceneContext);
49
+ }
27
50
  }
28
51
  // Step 2.5: Wire exits between rooms
29
52
  logger.write(`Adding Exits`);
@@ -50,6 +73,9 @@ export class SceneSynthesizer {
50
73
  scene.addActor(npc);
51
74
  scene.setCharacterLocation(npc, npcJson.player.startLocation);
52
75
  npc.scene = scene;
76
+ if (useAi) {
77
+ await npc.ensureAIAppearance(sceneContext);
78
+ }
53
79
  }
54
80
  // Step 4: Add Items
55
81
  const itemFactory = new ItemFactory();
@@ -71,32 +97,124 @@ export class SceneSynthesizer {
71
97
  // throw new Error(`Item "${itemJson.name}" must have either 'room' or 'heldBy'.`);
72
98
  }
73
99
  }
74
- // Step 4.1: Add Starting Items for the Player
75
- logger.write(`Assigning starting items to player: ${json.player.name}`);
76
- for (const startingItemJson of json.player.startingItems ?? []) {
77
- const item = await itemFactory.createItemFromJson(startingItemJson);
78
- player.addInventory(item);
79
- itemMap.set(item.name, item); // So it can still be referenced later if needed
80
- item.owner = player.name;
81
- logger.write(`Gave player starting item: ${item.name}`);
100
+ // Step 4.05: NPCs wear their gear. "heldBy" only puts items in an NPC's
101
+ // inventory, but combat pools (see Player.getWeaponProfile /
102
+ // getArmorValue) read from EQUIPPED slots -- without this, an enforcer
103
+ // "holding" an assault rifle and an armored jacket would fight
104
+ // bare-fisted in street clothes. Only weapon/armor categories are
105
+ // auto-equipped: plot items (datachips, books, keys) stay in inventory
106
+ // where "give"/death-drops expect them. Failures are non-fatal -- a
107
+ // second weapon just stays holstered in inventory.
108
+ const combatCategories = new Set([
109
+ Category.Weapon, Category.MeleeWeapon, Category.RangedWeapon,
110
+ Category.Armor, Category.BodyArmor, Category.ArmorClothing, Category.Shield,
111
+ Category.Helmet, Category.ArmArmor, Category.LegArmor, Category.Boots, Category.Gloves,
112
+ ]);
113
+ for (const npcJson of json.npcs ?? []) {
114
+ const npc = scene.getActor(npcJson.player.name);
115
+ if (!npc)
116
+ continue;
117
+ for (const item of [...npc.inventory.getAllItems()]) {
118
+ if (combatCategories.has(item.category)) {
119
+ npc.equip(item);
120
+ }
121
+ }
122
+ }
123
+ // Step 4.1: Add Starting Items for the Player (skipped when continuing
124
+ // a long-lived player who already has gear from a prior job)
125
+ if (grantStartingItems) {
126
+ logger.write(`Assigning starting items to player: ${json.player.name}`);
127
+ for (const startingItemJson of json.player.startingItems ?? []) {
128
+ const item = await itemFactory.createItemFromJson(startingItemJson);
129
+ player.addInventory(item);
130
+ itemMap.set(item.name, item); // So it can still be referenced later if needed
131
+ item.owner = player.name;
132
+ logger.write(`Gave player starting item: ${item.name}`);
133
+ }
134
+ }
135
+ else {
136
+ logger.write(`Skipping starting items for ${json.player.name} -- continuing with existing gear.`);
137
+ }
138
+ // Step 4.2: Resolve the win condition (if any), now that items/npcs exist
139
+ if (json.winCondition) {
140
+ const wc = json.winCondition;
141
+ if (!itemMap.has(wc.item)) {
142
+ throw new Error(`Win condition references item "${wc.item}", which is not in "items".`);
143
+ }
144
+ if (wc.type === 'give') {
145
+ if (!wc.toNpc) {
146
+ throw new Error(`Win condition type "give" requires "toNpc".`);
147
+ }
148
+ if (!scene.getActor(wc.toNpc)) {
149
+ throw new Error(`Win condition references NPC "${wc.toNpc}", which is not in "npcs".`);
150
+ }
151
+ }
152
+ let rewardItem;
153
+ if (wc.rewardItem) {
154
+ rewardItem = itemMap.get(wc.rewardItem);
155
+ if (!rewardItem) {
156
+ throw new Error(`Win condition reward item "${wc.rewardItem}" is not in "items".`);
157
+ }
158
+ }
159
+ scene.setWinCondition({
160
+ type: wc.type,
161
+ item: wc.item,
162
+ toNpc: wc.toNpc,
163
+ rewardItem,
164
+ completionMessage: wc.completionMessage,
165
+ payout: wc.payout
166
+ });
82
167
  }
83
168
  // Step 5: Add Puzzles
84
169
  const puzzleFactory = new PuzzleFactory();
170
+ const puzzleMap = new Map();
85
171
  for (const puzzleJson of json.puzzles ?? []) {
86
172
  const puzzle = await puzzleFactory.createPuzzleFromJson(puzzleJson, itemMap);
87
- scene.addPuzzleToRoom(puzzle, puzzleJson.room);
173
+ puzzleMap.set(puzzle.name, puzzle);
174
+ // A door-guarding puzzle (see exits[].puzzle below) has no "room" of
175
+ // its own -- it belongs to the connection between two rooms, not
176
+ // either one.
177
+ if (puzzleJson.room) {
178
+ scene.addPuzzleToRoom(puzzle, puzzleJson.room);
179
+ }
180
+ if (useAi) {
181
+ await puzzle.ensureAIRiddle(sceneContext, puzzleJson.room);
182
+ }
183
+ }
184
+ // Step 5.1: Wire puzzle prerequisites, now that every puzzle in the
185
+ // scene exists -- a puzzle's requiresPuzzle may point at one created
186
+ // later in the array above, so this has to be a separate pass.
187
+ for (const puzzleJson of json.puzzles ?? []) {
188
+ if (!puzzleJson.requiresPuzzle)
189
+ continue;
190
+ const puzzle = puzzleMap.get(puzzleJson.name);
191
+ const prerequisite = puzzleMap.get(puzzleJson.requiresPuzzle);
192
+ if (!prerequisite) {
193
+ throw new Error(`Puzzle "${puzzleJson.name}" requires puzzle "${puzzleJson.requiresPuzzle}", which doesn't exist in this scene.`);
194
+ }
195
+ if (puzzle === prerequisite) {
196
+ throw new Error(`Puzzle "${puzzleJson.name}" cannot require itself.`);
197
+ }
198
+ puzzle.setRequiresPuzzle(prerequisite, puzzleJson.lockedMessage);
199
+ }
200
+ // Step 5.2: Wire door-guarding puzzles onto their exits, now that every
201
+ // puzzle exists -- a puzzle referenced by "exits[].puzzle" may be
202
+ // defined anywhere in "puzzles[]", built above in this same pass.
203
+ for (const roomJson of json.rooms) {
204
+ for (const exit of roomJson.exits ?? []) {
205
+ if (!exit.puzzle)
206
+ continue;
207
+ const puzzle = puzzleMap.get(exit.puzzle);
208
+ if (!puzzle) {
209
+ throw new Error(`Exit from "${roomJson.name}" to "${exit.targetRoom}" references puzzle "${exit.puzzle}", which doesn't exist in this scene.`);
210
+ }
211
+ const sourceRoom = scene.getRoom(roomJson.name);
212
+ const doorExit = sourceRoom?.getExit(exit.direction.toLowerCase());
213
+ if (doorExit instanceof Door) {
214
+ doorExit.attachPuzzle(puzzle);
215
+ }
216
+ }
88
217
  }
89
- // // Step 6: Sync AI descriptions for all rooms
90
- // const sceneContext = `
91
- // Scene: ${scene.name}
92
- // Currency: ${json.currency.type}
93
- // Residence Tiers: ${json.residenceTiers.join(', ')}
94
- // Key Locations: ${json.rooms.map(r => r.name).join(', ')}
95
- // `;
96
- //
97
- // for (const room of Object.values(scene.getRooms())) {
98
- // await room.ensureAIDescription(sceneContext);
99
- // }
100
218
  // Step 7: Assign ownership to rooms and items
101
219
  logger.write(`Assigning Ownership`);
102
220
  for (const roomJson of json.rooms) {
@@ -1 +1 @@
1
- {"version":3,"file":"scene-factory.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/factories/scene-fact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AAI,CAAC,CAAC;gBAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,IAAI,6BAA6B,CAAC,CAAC;gBAC1F,CAAC;gBACD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;gBAC5B,MAAM,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,mBAAmB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;QAED,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;YACxC,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;gBACnB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACxC,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,IAAI,6BAA6B,CAAC,CAAC;gBAC1F,CAAC;gBACD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;gBAC5B,MAAM,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,mBAAmB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;QAGD,+BAA+B;QAC/B,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,174 @@
1
+ import { Player } from '../models/player.js';
2
+ import { ISceneSeedJson } from '../types/seed/scene-seed.js';
3
+ export { FIXER_NAME } from './scene-chunks.js';
4
+ export declare class SceneSeedGenerator {
5
+ /** Fresh-skeleton pipeline attempts (structural faults promote to a new one). */
6
+ private static readonly maxPipelineAttempts;
7
+ /** Per-pipeline chunk repairs before demanding a fresh skeleton. */
8
+ private static readonly maxRepairRounds;
9
+ /** Attempts per individual AI call (skeleton or one detail chunk). */
10
+ private static readonly maxCallAttempts;
11
+ private static readonly SKELETON_TOKENS;
12
+ private static readonly ROOMS_TOKENS;
13
+ private static readonly NPCS_TOKENS;
14
+ private static readonly PUZZLES_TOKENS;
15
+ private static readonly ITEMS_TOKENS;
16
+ /**
17
+ * CHUNKED generation (see scene-chunks.ts for the shapes and prompts):
18
+ * one compact SKELETON pass fixes the scene's whole structure -- every
19
+ * cross-reference the validators check -- then small detail passes flesh
20
+ * out rooms, NPCs, puzzles, and items (items last: clue items bake in
21
+ * the puzzle passphrases). The assembled scene runs through the same
22
+ * validators as ever; a failure regenerates only the chunk responsible
23
+ * (classifyRepair) instead of throwing the whole scene away.
24
+ *
25
+ * `tier` scales scope and stakes; `previousFixerName` keeps the same
26
+ * job-giver identity across "continue"; `player` becomes the dossier
27
+ * that tailors the job to the runner's archetype and toolkit.
28
+ */
29
+ static generate(logFilePath: string, tier?: number, previousFixerName?: string, player?: Player): Promise<ISceneSeedJson | null>;
30
+ /** The skeleton pass: structure only, fast-validated before any detail pass builds on it. */
31
+ private static requestSkeleton;
32
+ /** One detail chunk: prompt -> JSON, with one retry feeding the parse error back. */
33
+ private static requestChunk;
34
+ /**
35
+ * Rooms, NPCs, and puzzles are independent given the skeleton -- they
36
+ * run in parallel. Items runs after puzzles: each clue item's "details"
37
+ * must contain its puzzle's exact passphrase.
38
+ */
39
+ private static requestAllDetails;
40
+ /**
41
+ * Saves a validated scene alongside that session's game log (same
42
+ * directory as `logFilePath`) so a run can be inspected or replayed later
43
+ * -- AI-generated scenes previously only existed in memory for the
44
+ * process that generated them.
45
+ */
46
+ private static saveSeedToDisk;
47
+ /**
48
+ * Runs the candidate through the exact same synthesis pipeline a real
49
+ * session would use, purely to surface referential-integrity errors
50
+ * (missing room/item/npc names) before committing to it. Discards the
51
+ * resulting Scene either way -- the real session re-synthesizes fresh
52
+ * (with AI flavor enabled) once this seed is handed off.
53
+ */
54
+ private static dryRunValidate;
55
+ /**
56
+ * The one structural guarantee every other check assumes: every room,
57
+ * NPC, and item actually has a real, non-blank "name". Nothing about the
58
+ * JSON shape stops a model from emitting `"name": ""` or omitting the
59
+ * field outright, and synthesis doesn't validate it either -- it just
60
+ * uses whatever's there as a map key and crashes with an opaque error the
61
+ * moment something tries to look it up.
62
+ */
63
+ private static validateBasicStructure;
64
+ /**
65
+ * A puzzle must belong to exactly one place: a room (via "puzzles[].room")
66
+ * or a door (via some "exits[].puzzle" naming it) -- see DOORS AS PUZZLES.
67
+ * Synthesis itself doesn't catch either failure mode: an orphaned puzzle
68
+ * (neither) silently never appears anywhere in the world, and a
69
+ * double-placed one (both) would exist as two disconnected instances of
70
+ * "the same" barrier -- solvable in the room without ever needing to open
71
+ * the door, or vice versa.
72
+ */
73
+ private static validatePuzzlePlacement;
74
+ /**
75
+ * The schema says a reward item must have neither "room" nor "heldBy" --
76
+ * solving the puzzle (or completing the win condition) is what's supposed
77
+ * to bring it into existence for the player -- but nothing ever actually
78
+ * enforced that. Found via a real session where a puzzle's rewardItem was
79
+ * ALSO "heldBy" the very NPC guarding it: solving the puzzle granted a
80
+ * second, phantom copy of the item while the NPC's own real one stayed
81
+ * put (and later dropped normally when killed) -- so the player ended up
82
+ * with two disconnected copies of "the same" item, and the NPC's own
83
+ * dialogue reflected the same confused premise (accusing the player of
84
+ * theft for solving a puzzle it had just dared them to solve).
85
+ */
86
+ private static validateRewardItemPlacement;
87
+ /**
88
+ * Maps every item that has a concrete location (room, or heldBy an NPC
89
+ * whose startLocation gives it one) to that room's name. Shared by the
90
+ * reachability BFS and the win-condition checks below.
91
+ */
92
+ private static buildItemLocationMap;
93
+ /**
94
+ * Lock-and-key reachability BFS from the start room: a room becomes
95
+ * reachable once some already-reachable room has an unlocked exit to it,
96
+ * or a locked exit whose key has already been found in a reachable
97
+ * location. Rooms marked "reachable: false" are excluded from this
98
+ * traversal on purpose -- see validateDoorKeys.
99
+ */
100
+ private static computeReachableRooms;
101
+ /**
102
+ * Synthesis itself doesn't catch a locked door whose "keyRequired" names
103
+ * an item that doesn't exist, or one that's placed somewhere only
104
+ * reachable by first passing through that same door -- both leave the
105
+ * player permanently stuck with no way to unlock it (the real bug this
106
+ * guards against, found via a real session where a player was stonewalled
107
+ * behind a locked door for an entire play session). Also enforces the
108
+ * "reachable: false" contract (used for a fixer's inaccessible hideout,
109
+ * say): such a room must never connect to a normally-reachable one, in
110
+ * either direction, and nothing the player needs to retrieve may live
111
+ * inside one.
112
+ */
113
+ private static validateDoorKeys;
114
+ /**
115
+ * requiresPuzzle references are structurally valid JSON either way (a
116
+ * bad name or a cycle won't make synthesis itself throw), so this walks
117
+ * each puzzle's prerequisite chain looking for a reference to a puzzle
118
+ * that doesn't exist or a cycle. Chains of any length are fine -- only
119
+ * missing references and cycles are rejected.
120
+ */
121
+ private static validatePuzzleChain;
122
+ /**
123
+ * Every AI-generated scene must have a completable win condition -- this
124
+ * is what the "continue into a new job" loop hooks into. Also guards
125
+ * against a win condition item that's already sitting in the target
126
+ * NPC's own inventory, which would make the "find and deliver it"
127
+ * premise nonsensical.
128
+ */
129
+ private static validateWinCondition;
130
+ /**
131
+ * bypassType is a closed enum the engine indexes into (puzzle.ts
132
+ * BYPASS_FLAVOR) -- an unvalidated value used to reach a live session
133
+ * and crash every "search" in that puzzle's room (the model emitted
134
+ * "con" for a social barrier before that type existed). The lookups are
135
+ * defensive now, but a bad value would still mean a barrier whose
136
+ * bypass route silently doesn't exist -- reject it with the exact
137
+ * allowed list instead.
138
+ */
139
+ private static validateBypassTypes;
140
+ /**
141
+ * Mechanical teeth behind the dossier's "never duplicate their gear"
142
+ * rule: the prompt guidance alone was violated on its very first outing
143
+ * (an Adept's startingItems included "Weapon Focus Katana" verbatim, and
144
+ * the player watched the duplicate bounce off their occupied weapon
145
+ * slot). Rejects any startingItem whose name matches something the
146
+ * dossier player already carries or wears.
147
+ */
148
+ private static validateStartingItems;
149
+ /**
150
+ * A matrix-plane win-condition item must sit in a hasNode room with an
151
+ * ice NPC guarding it -- otherwise the whole run is a free walk: jack
152
+ * in, ride the grid (physical locks don't gate personas), take the
153
+ * file, done. Found via a real session that completed exactly that way
154
+ * with zero resistance. Hand-in-hand with the host-vault mechanic
155
+ * (matrix items stay sealed until the host is cracked -- see hack.ts /
156
+ * take.ts), this guarantees a datarun always has teeth.
157
+ */
158
+ private static validateMatrixDefense;
159
+ /**
160
+ * Enforces the "always some way to find the solution" guarantee: every
161
+ * puzzle must have a discoverable clue, placed in a different room. None
162
+ * of this is caught by synthesis (a puzzle with no clue, or an empty one,
163
+ * is still structurally valid), so it's checked separately and treated
164
+ * the same as any other validation failure -- it triggers a retry.
165
+ *
166
+ * Two patterns both count. Found via a real generation that kept getting
167
+ * rejected despite being genuinely solvable: a riddle whose answer is a
168
+ * real item's own name (e.g. "obsidian keycard", matching an actual item
169
+ * called "Obsidian Keycard" sitting in another room) needs no separate
170
+ * documentation -- finding it and seeing its name on screen already
171
+ * reveals the answer. A Book clue is still required for anything else.
172
+ */
173
+ private static validateClueItems;
174
+ }