@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.
- package/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +62 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +196 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +65 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +122 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.d.ts +42 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +243 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js +82 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/brandish.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.d.ts +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +101 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +219 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +58 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +397 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.d.ts +11 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js +8 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/command-registry.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js +72 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drop.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js +31 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/edge.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js +27 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/end-call.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +59 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js +50 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +147 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +199 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +75 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jack.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jack.js +64 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/jack.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.d.ts +10 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js +11 -33
- package/bundle/typescript/src/commands/game/sideQuest/commands/kill.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +47 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +46 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js +55 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pan.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.d.ts +18 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +100 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +33 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.d.ts +19 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.js +54 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js +6 -5
- package/bundle/typescript/src/commands/game/sideQuest/commands/read.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js +52 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reboot.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js +40 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/reload.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +59 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +31 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +71 -7
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +58 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js +50 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +35 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +32 -11
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +86 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js +41 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/stance.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/subdue.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.d.ts +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js +45 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +138 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js +6 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/unequip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.d.ts +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js +102 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/use.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js +7 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/npc-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +175 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +673 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.d.ts +8 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +139 -21
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +174 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +647 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +138 -9
- package/bundle/typescript/src/commands/game/sideQuest/game.js +757 -197
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.js +101 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/hack-minigame.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.js +95 -0
- package/bundle/typescript/src/commands/game/sideQuest/minigames/lockpick-minigame.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js +15 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/door.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js +54 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/inventory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +41 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +106 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +27 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +312 -50
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +278 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +661 -9
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +75 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +199 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +53 -18
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +73 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +208 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +319 -70
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +661 -227
- package/bundle/typescript/src/commands/game/sideQuest/types/player-equipment.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/npc-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +42 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +15 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +8 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.d.ts +15 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/win-condition-seed.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/abstracts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/shared/item-enum.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +95 -6
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.d.ts +60 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +138 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +145 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +354 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/comm-style.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/dice.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.d.ts +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js +92 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/fuzzy-match.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +77 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +265 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.d.ts +16 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.js +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/pursuit.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +78 -7
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/commands/set/global.sub.cmd.js +59 -5
- package/bundle/typescript/src/commands/set/global.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/tools/ai/ai.class.d.ts +42 -0
- package/bundle/typescript/src/tools/ai/ai.class.js +117 -0
- package/bundle/typescript/src/tools/ai/ai.class.js.map +1 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.d.ts +1 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.class.d.ts +3 -2
- package/bundle/typescript/src/tools/https/https.class.js +51 -2
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.interface.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sideQuest.sub.cmd.js","sourceRoot":"","sources":["../../../../../src/commands/game/sideQuest.sub.cmd.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"sideQuest.sub.cmd.js","sourceRoot":"","sources":["../../../../../src/commands/game/sideQuest.sub.cmd.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;A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CAAC;oBACf,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBACpC,CAAC;qBAAM,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;oBACtB,GAAG,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;gBAC9C,CAAC;qBAAM,CAAC;oBACN,GAAG,CAAC,KAAK,CAAC,+BAA+B,IAAI,cAAc,MAAM,EAAE,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC,CAAC,CAAC;QAEL,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AAEH,CAAC,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -1,7 +1,39 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
+
import { exec } from 'child_process';
|
|
2
3
|
import SetCommand from './set.command.js';
|
|
3
4
|
import { Command } from '../../command.js';
|
|
4
5
|
import { Log } from '../../tools/log/log.class.js';
|
|
6
|
+
import { Actions } from '../../tools/actions/actions.class.js';
|
|
7
|
+
const API_KEY_URLS = {
|
|
8
|
+
openai: 'https://platform.openai.com/api-keys',
|
|
9
|
+
anthropic: 'https://console.anthropic.com/settings/keys',
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Best-effort browser launch (no third-party dependency -- shells out to
|
|
13
|
+
* each OS's own "open a URL" command). Purely a convenience so the player
|
|
14
|
+
* doesn't have to go hunting for the API-key dashboard URL themselves;
|
|
15
|
+
* failure here is never fatal; the URL is still shown, so the prompt
|
|
16
|
+
* itself still works.
|
|
17
|
+
*/
|
|
18
|
+
function openBrowser(url) {
|
|
19
|
+
const command = process.platform === 'win32'
|
|
20
|
+
? `start "" "${url}"`
|
|
21
|
+
: process.platform === 'darwin'
|
|
22
|
+
? `open "${url}"`
|
|
23
|
+
: `xdg-open "${url}"`;
|
|
24
|
+
exec(command, (err) => {
|
|
25
|
+
if (err) {
|
|
26
|
+
Log.notice(`Could not open a browser automatically. Please visit: ${url}`);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async function promptForKey(provider) {
|
|
31
|
+
const label = provider === 'openai' ? 'OpenAI' : 'Anthropic';
|
|
32
|
+
const url = API_KEY_URLS[provider];
|
|
33
|
+
Log.notice(`Opening ${url} so you can create/copy your ${label} API key...`);
|
|
34
|
+
openBrowser(url);
|
|
35
|
+
return Actions.ask(`${label} API Key:`, true);
|
|
36
|
+
}
|
|
5
37
|
Command.create({
|
|
6
38
|
name: 'global-config',
|
|
7
39
|
usage: 'maka set:global-config',
|
|
@@ -26,7 +58,13 @@ Command.create({
|
|
|
26
58
|
},
|
|
27
59
|
{
|
|
28
60
|
name: 'openai',
|
|
29
|
-
boolFlag: false
|
|
61
|
+
boolFlag: false,
|
|
62
|
+
description: 'Set your OpenAI API key. Omit the value to open the API-key dashboard in your browser and be prompted for it (input hidden).'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'anthropic',
|
|
66
|
+
boolFlag: false,
|
|
67
|
+
description: 'Set your Anthropic (Claude) API key. Omit the value to open the API-key dashboard in your browser and be prompted for it (input hidden).'
|
|
30
68
|
},
|
|
31
69
|
{
|
|
32
70
|
name: 'help',
|
|
@@ -57,7 +95,11 @@ Command.create({
|
|
|
57
95
|
'maka set:gc --insecure <path>',
|
|
58
96
|
'maka set:gc --workspace <path>',
|
|
59
97
|
'maka set:gc --guided=false',
|
|
60
|
-
'maka set:gc --guided=true'
|
|
98
|
+
'maka set:gc --guided=true',
|
|
99
|
+
'maka set:gc --openai <key>',
|
|
100
|
+
'maka set:gc --openai # prompts for the key, input hidden',
|
|
101
|
+
'maka set:gc --anthropic <key>',
|
|
102
|
+
'maka set:gc --anthropic # prompts for the key, input hidden'
|
|
61
103
|
]
|
|
62
104
|
}, async function (args, opts) {
|
|
63
105
|
try {
|
|
@@ -86,11 +128,23 @@ Command.create({
|
|
|
86
128
|
throw new Error('Could not find directory');
|
|
87
129
|
}
|
|
88
130
|
}
|
|
89
|
-
if (opts.openai) {
|
|
131
|
+
if (opts.openai !== undefined) {
|
|
132
|
+
const key = typeof opts.openai === 'string' && opts.openai.length > 0
|
|
133
|
+
? opts.openai
|
|
134
|
+
: await promptForKey('openai');
|
|
135
|
+
await this.cfg.setGlobalConfig({
|
|
136
|
+
openai: key
|
|
137
|
+
});
|
|
138
|
+
Log.success(`Set OpenAI API key.`);
|
|
139
|
+
}
|
|
140
|
+
if (opts.anthropic !== undefined) {
|
|
141
|
+
const key = typeof opts.anthropic === 'string' && opts.anthropic.length > 0
|
|
142
|
+
? opts.anthropic
|
|
143
|
+
: await promptForKey('anthropic');
|
|
90
144
|
await this.cfg.setGlobalConfig({
|
|
91
|
-
|
|
145
|
+
anthropic: key
|
|
92
146
|
});
|
|
93
|
-
Log.success(`Set
|
|
147
|
+
Log.success(`Set Anthropic API key.`);
|
|
94
148
|
}
|
|
95
149
|
if (opts.pallet) {
|
|
96
150
|
await this.cfg.setGlobalConfig({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.sub.cmd.js","sourceRoot":"","sources":["../../../../../src/commands/set/global.sub.cmd.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"global.sub.cmd.js","sourceRoot":"","sources":["../../../../../src/commands/set/global.sub.cmd.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAE/D,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,sCAAsC;IAC9C,SAAS,EAA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;aACd,CAAC,CAAC;YACH,GAAG,CAAC,OAAO,CAAC,sBAAsB,aAAa,EAAE,CAAC,CAAC;QACrD,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAM,CAAC,EAAE,CAAC;QAEV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type AIProviderName = 'openai' | 'anthropic';
|
|
2
|
+
export interface IAIConfig {
|
|
3
|
+
provider: AIProviderName;
|
|
4
|
+
apiKey: string;
|
|
5
|
+
model: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Single entry point for every AI-backed feature in the app (currently the
|
|
9
|
+
* sideQuest game's dynamic scene/dialogue generation). Picks a provider
|
|
10
|
+
* from environment configuration and normalizes away each provider's own
|
|
11
|
+
* request/response shape, so callers just send a prompt and get text back
|
|
12
|
+
* without needing to know which backend is active.
|
|
13
|
+
*/
|
|
14
|
+
export declare class AI {
|
|
15
|
+
/**
|
|
16
|
+
* MAKA_AI_PROVIDER ('openai' | 'anthropic' | 'claude') picks a provider
|
|
17
|
+
* explicitly. Otherwise, whichever API key is set wins -- OPENAI_API_KEY
|
|
18
|
+
* is preferred if both are set, matching this app's existing convention
|
|
19
|
+
* of AI features turning on automatically whenever a key is configured,
|
|
20
|
+
* with no separate flag to remember. MAKA_AI_MODEL overrides the
|
|
21
|
+
* provider's default model. Environment variables take precedence over a
|
|
22
|
+
* key persisted via `maka set:global-config --openai`/`--anthropic`, so a
|
|
23
|
+
* one-off env var can still override a saved default for a single session.
|
|
24
|
+
*/
|
|
25
|
+
static resolveConfig(): IAIConfig | null;
|
|
26
|
+
static isConfigured(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Sends `prompt` to whichever provider is configured and returns the
|
|
29
|
+
* completion text. Throws if no provider is configured, the request
|
|
30
|
+
* fails, or the response has no usable content -- callers that already
|
|
31
|
+
* wrap generation in a try/catch (every AI-flavor call site in the game)
|
|
32
|
+
* get their existing fallback behavior for free.
|
|
33
|
+
*
|
|
34
|
+
* `maxTokens` raises the response budget for callers that genuinely
|
|
35
|
+
* need a long completion (scene generation, above all: whole-scene JSON
|
|
36
|
+
* runs 3-5x a dialogue reply, and the old fixed caps truncated it
|
|
37
|
+
* mid-string). Leave unset for ordinary dialogue-sized replies.
|
|
38
|
+
*/
|
|
39
|
+
static ask(prompt: string, opts?: {
|
|
40
|
+
maxTokens?: number;
|
|
41
|
+
}): Promise<string>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { HTTPS } from '../https/https.class.js';
|
|
5
|
+
const GLOBAL_CONFIG_PATH = path.join(os.homedir(), '.meteor', '.maka', 'global-config.json');
|
|
6
|
+
/**
|
|
7
|
+
* Reads API keys persisted via `maka set:global-config --openai`/`--anthropic`
|
|
8
|
+
* (see src/commands/set/global.sub.cmd.ts). Reads the file directly rather
|
|
9
|
+
* than going through the CFG singleton, since CFG requires an FSI instance
|
|
10
|
+
* via DI and this needs to work from plain model classes deep in the game
|
|
11
|
+
* (npc.ts, room.ts, puzzle.ts) that have no Tool/Command context.
|
|
12
|
+
*/
|
|
13
|
+
function readPersistedKeys() {
|
|
14
|
+
try {
|
|
15
|
+
if (!fs.existsSync(GLOBAL_CONFIG_PATH))
|
|
16
|
+
return {};
|
|
17
|
+
const config = JSON.parse(fs.readFileSync(GLOBAL_CONFIG_PATH, 'utf8'));
|
|
18
|
+
return { openai: config.openai, anthropic: config.anthropic };
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const DEFAULT_MODELS = {
|
|
25
|
+
openai: 'gpt-4.1',
|
|
26
|
+
anthropic: 'claude-sonnet-5',
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Single entry point for every AI-backed feature in the app (currently the
|
|
30
|
+
* sideQuest game's dynamic scene/dialogue generation). Picks a provider
|
|
31
|
+
* from environment configuration and normalizes away each provider's own
|
|
32
|
+
* request/response shape, so callers just send a prompt and get text back
|
|
33
|
+
* without needing to know which backend is active.
|
|
34
|
+
*/
|
|
35
|
+
export class AI {
|
|
36
|
+
/**
|
|
37
|
+
* MAKA_AI_PROVIDER ('openai' | 'anthropic' | 'claude') picks a provider
|
|
38
|
+
* explicitly. Otherwise, whichever API key is set wins -- OPENAI_API_KEY
|
|
39
|
+
* is preferred if both are set, matching this app's existing convention
|
|
40
|
+
* of AI features turning on automatically whenever a key is configured,
|
|
41
|
+
* with no separate flag to remember. MAKA_AI_MODEL overrides the
|
|
42
|
+
* provider's default model. Environment variables take precedence over a
|
|
43
|
+
* key persisted via `maka set:global-config --openai`/`--anthropic`, so a
|
|
44
|
+
* one-off env var can still override a saved default for a single session.
|
|
45
|
+
*/
|
|
46
|
+
static resolveConfig() {
|
|
47
|
+
const persisted = readPersistedKeys();
|
|
48
|
+
const explicit = process.env.MAKA_AI_PROVIDER?.toLowerCase();
|
|
49
|
+
const openaiKey = process.env.OPENAI_API_KEY || persisted.openai;
|
|
50
|
+
const anthropicKey = process.env.ANTHROPIC_API_KEY || persisted.anthropic;
|
|
51
|
+
let provider;
|
|
52
|
+
if (explicit === 'anthropic' || explicit === 'claude') {
|
|
53
|
+
provider = 'anthropic';
|
|
54
|
+
}
|
|
55
|
+
else if (explicit === 'openai') {
|
|
56
|
+
provider = 'openai';
|
|
57
|
+
}
|
|
58
|
+
else if (openaiKey) {
|
|
59
|
+
provider = 'openai';
|
|
60
|
+
}
|
|
61
|
+
else if (anthropicKey) {
|
|
62
|
+
provider = 'anthropic';
|
|
63
|
+
}
|
|
64
|
+
if (!provider)
|
|
65
|
+
return null;
|
|
66
|
+
const apiKey = provider === 'openai' ? openaiKey : anthropicKey;
|
|
67
|
+
if (!apiKey)
|
|
68
|
+
return null;
|
|
69
|
+
return {
|
|
70
|
+
provider,
|
|
71
|
+
apiKey,
|
|
72
|
+
model: process.env.MAKA_AI_MODEL || DEFAULT_MODELS[provider],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
static isConfigured() {
|
|
76
|
+
return this.resolveConfig() !== null;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Sends `prompt` to whichever provider is configured and returns the
|
|
80
|
+
* completion text. Throws if no provider is configured, the request
|
|
81
|
+
* fails, or the response has no usable content -- callers that already
|
|
82
|
+
* wrap generation in a try/catch (every AI-flavor call site in the game)
|
|
83
|
+
* get their existing fallback behavior for free.
|
|
84
|
+
*
|
|
85
|
+
* `maxTokens` raises the response budget for callers that genuinely
|
|
86
|
+
* need a long completion (scene generation, above all: whole-scene JSON
|
|
87
|
+
* runs 3-5x a dialogue reply, and the old fixed caps truncated it
|
|
88
|
+
* mid-string). Leave unset for ordinary dialogue-sized replies.
|
|
89
|
+
*/
|
|
90
|
+
static async ask(prompt, opts) {
|
|
91
|
+
const config = this.resolveConfig();
|
|
92
|
+
if (!config) {
|
|
93
|
+
throw new Error('No AI provider is configured. Set OPENAI_API_KEY or ANTHROPIC_API_KEY ' +
|
|
94
|
+
'(optionally MAKA_AI_PROVIDER to choose between them if both are set).');
|
|
95
|
+
}
|
|
96
|
+
const result = config.provider === 'openai'
|
|
97
|
+
? await HTTPS.askGPT({ prompt, openApiKey: config.apiKey, model: config.model, maxTokens: opts?.maxTokens })
|
|
98
|
+
: await HTTPS.askClaude({ prompt, apiKey: config.apiKey, model: config.model, maxTokens: opts?.maxTokens });
|
|
99
|
+
const parsed = JSON.parse(result.data);
|
|
100
|
+
if (parsed?.error) {
|
|
101
|
+
throw new Error(parsed.error.message ?? JSON.stringify(parsed.error));
|
|
102
|
+
}
|
|
103
|
+
// Anthropic's "content" is an array of typed blocks, not always just a
|
|
104
|
+
// single text block at index 0 -- a model that does extended thinking
|
|
105
|
+
// can put a "thinking" block first, pushing the actual reply to a later
|
|
106
|
+
// index. Blindly indexing [0] found nothing and threw "No content
|
|
107
|
+
// returned" even though a real reply was right there in the array.
|
|
108
|
+
const content = config.provider === 'openai'
|
|
109
|
+
? parsed?.choices?.[0]?.message?.content
|
|
110
|
+
: parsed?.content?.find((block) => block?.type === 'text')?.text;
|
|
111
|
+
if (!content || typeof content !== 'string') {
|
|
112
|
+
throw new Error(`No content returned from ${config.provider}. Raw response: ${JSON.stringify(parsed).slice(0, 500)}`);
|
|
113
|
+
}
|
|
114
|
+
return content.trim();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=ai.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.class.js","sourceRoot":"","sources":["../../../../../src/tools/ai/ai.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIhD,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC;AAE7F;;;;;;GAMG;AACH,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC;YAAE,OAAO,EAAE,CAAC;QAClD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC;QACvE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;IACh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AC,EAAE,OAAO,EAAE,OAAO;YACxC,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,KAAuC,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,MAAM,CAAC,EAAE,IAAI,CAAC;QAErG,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,4BAA4B,MAAM,CAAC,QAAQ,mBAAmB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACxH,CAAC;QAED,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsi.interfaces.js","sourceRoot":"","sources":["../../../../../src/tools/fsi/fsi.interfaces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fsi.interfaces.js","sourceRoot":"","sources":["../../../../../src/tools/fsi/fsi.interfaces.ts"],"names":[],"mappings":"AAsIA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;IAC9B,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IACpC,GAAG,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5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IACrB,6BAAa,CAAA;AACf,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHTTPSPost, IHTTPSGet, IHTTPSResponse, IHTPSAskGPT, IHTTPSDownload } from './https.interface';
|
|
1
|
+
import { IHTTPSPost, IHTTPSGet, IHTTPSResponse, IHTPSAskGPT, IHTPSAskClaude, IHTTPSDownload } from './https.interface';
|
|
2
2
|
export declare class HTTPS {
|
|
3
3
|
static post({ hostname, path, data, headers, cert, timeout }: IHTTPSPost): Promise<IHTTPSResponse>;
|
|
4
4
|
static get({ url, headers, cert, timeout }: IHTTPSGet): Promise<IHTTPSResponse>;
|
|
@@ -6,8 +6,9 @@ export declare class HTTPS {
|
|
|
6
6
|
static checkAvailability({ url, headers, cert, maxRedirects, timeout }: IHTTPSGet & {
|
|
7
7
|
maxRedirects?: number;
|
|
8
8
|
}): Promise<boolean>;
|
|
9
|
-
static askGPT({ prompt, openApiKey, certPath, model }: IHTPSAskGPT & {
|
|
9
|
+
static askGPT({ prompt, openApiKey, certPath, model, maxTokens }: IHTPSAskGPT & {
|
|
10
10
|
model?: string;
|
|
11
11
|
}): Promise<IHTTPSResponse>;
|
|
12
|
+
static askClaude({ prompt, apiKey, certPath, model, maxTokens }: IHTPSAskClaude): Promise<IHTTPSResponse>;
|
|
12
13
|
static askGPTStreaming(prompt: string, model?: string): Promise<string>;
|
|
13
14
|
}
|
|
@@ -227,7 +227,7 @@ export class HTTPS {
|
|
|
227
227
|
req.end();
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
static async askGPT({ prompt, openApiKey, certPath, model = 'gpt-4.1' }) {
|
|
230
|
+
static async askGPT({ prompt, openApiKey, certPath, model = 'gpt-4.1', maxTokens = 3000 }) {
|
|
231
231
|
const headers = {
|
|
232
232
|
'Authorization': `Bearer ${openApiKey}`,
|
|
233
233
|
'Content-Type': 'application/json',
|
|
@@ -241,7 +241,11 @@ export class HTTPS {
|
|
|
241
241
|
}
|
|
242
242
|
],
|
|
243
243
|
temperature: 0.8,
|
|
244
|
-
|
|
244
|
+
// Caller-tunable: the default suits dialogue-sized replies, but a
|
|
245
|
+
// full generated SCENE is ~3-5x that -- a fixed 3000 silently
|
|
246
|
+
// truncated tier-2 scene JSON mid-string (real session: four of six
|
|
247
|
+
// generation attempts died on "Unterminated string in JSON").
|
|
248
|
+
max_tokens: maxTokens
|
|
245
249
|
};
|
|
246
250
|
return await this.post({
|
|
247
251
|
hostname: 'api.openai.com',
|
|
@@ -251,6 +255,51 @@ export class HTTPS {
|
|
|
251
255
|
cert: certPath
|
|
252
256
|
});
|
|
253
257
|
}
|
|
258
|
+
static async askClaude({ prompt, apiKey, certPath, model = 'claude-sonnet-5', maxTokens = 4096 }) {
|
|
259
|
+
const headers = {
|
|
260
|
+
'x-api-key': apiKey,
|
|
261
|
+
'anthropic-version': '2023-06-01',
|
|
262
|
+
'Content-Type': 'application/json',
|
|
263
|
+
};
|
|
264
|
+
const data = {
|
|
265
|
+
model: model,
|
|
266
|
+
// Caller-tunable, same rationale as askGPT: scene generation needs
|
|
267
|
+
// several times the dialogue-sized default.
|
|
268
|
+
max_tokens: maxTokens,
|
|
269
|
+
// No "temperature" here (unlike askGPT) -- some Claude models reject
|
|
270
|
+
// a custom value outright ("`temperature` is deprecated for this
|
|
271
|
+
// model"), found via a real session where every single AI call
|
|
272
|
+
// failed with that error. Omitting it lets the API use its own
|
|
273
|
+
// default rather than hard-failing on models that don't support
|
|
274
|
+
// overriding it.
|
|
275
|
+
//
|
|
276
|
+
// Claude Sonnet 5 (the default model here) does "adaptive thinking"
|
|
277
|
+
// on by default when "thinking" is omitted -- found via the SAME
|
|
278
|
+
// session, immediately after fixing the error above: every response
|
|
279
|
+
// came back with only an empty "thinking" block and no text at all,
|
|
280
|
+
// because thinking silently ate the entire max_tokens budget before
|
|
281
|
+
// ever reaching an actual answer. This app only ever needs a plain
|
|
282
|
+
// JSON/text reply, never deep reasoning, so thinking is switched off
|
|
283
|
+
// outright rather than just given a bigger budget to share. Some
|
|
284
|
+
// other models (Claude Fable/Mythos) reject disabling thinking at
|
|
285
|
+
// all -- not a concern for the default model here, but worth knowing
|
|
286
|
+
// if MAKA_AI_MODEL is ever pointed at one of those.
|
|
287
|
+
thinking: { type: 'disabled' },
|
|
288
|
+
messages: [
|
|
289
|
+
{
|
|
290
|
+
role: 'user',
|
|
291
|
+
content: prompt
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
};
|
|
295
|
+
return await this.post({
|
|
296
|
+
hostname: 'api.anthropic.com',
|
|
297
|
+
path: '/v1/messages',
|
|
298
|
+
data,
|
|
299
|
+
headers,
|
|
300
|
+
cert: certPath
|
|
301
|
+
});
|
|
302
|
+
}
|
|
254
303
|
static async askGPTStreaming(prompt, model = 'gpt-4.1') {
|
|
255
304
|
const apiKey = process.env.OPENAI_API_KEY;
|
|
256
305
|
if (!apiKey)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"https.class.js","sourceRoot":"","sources":["../../../../../src/tools/https/https.class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;AAUpB,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,MAAM,OAAO,GAAG,MAAM,CAAC;AAEvB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AAC5F,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AAEhF,MAAM,OAAO,KAAK;IACT,MAAM,CAAC,KAAK,CAAC,IAAI,CAA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AM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBACzC,IAAI,IAAI,KAAK,QAAQ;oBAAE,SAAS;gBAEhC,IAAI,CAAC;oBACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBAChC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC;oBACpD,IAAI,OAAO;wBAAE,MAAM,IAAI,OAAO,CAAC;gBACjC,CAAC;gBAAC,MAAM,CAAC;oBACP,OAAO;gBACT,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CAEF"}
|
|
@@ -19,6 +19,8 @@ export interface IHTTPSHeaders {
|
|
|
19
19
|
'Content-Length'?: string;
|
|
20
20
|
'x-auth-token'?: string;
|
|
21
21
|
'Authorization'?: string;
|
|
22
|
+
'x-api-key'?: string;
|
|
23
|
+
'anthropic-version'?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface IHTTPSResponse {
|
|
24
26
|
statusCode: number;
|
|
@@ -30,6 +32,14 @@ export interface IHTPSAskGPT {
|
|
|
30
32
|
openApiKey: string;
|
|
31
33
|
certPath?: string;
|
|
32
34
|
model?: string;
|
|
35
|
+
maxTokens?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface IHTPSAskClaude {
|
|
38
|
+
prompt: string;
|
|
39
|
+
apiKey: string;
|
|
40
|
+
certPath?: string;
|
|
41
|
+
model?: string;
|
|
42
|
+
maxTokens?: number;
|
|
33
43
|
}
|
|
34
44
|
export interface IHTTPSDownload {
|
|
35
45
|
url: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 2.x applications using React.",
|