@maka/maka-cli 5.3.17 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.d.ts +43 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js +131 -0
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.d.ts +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +79 -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 +224 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.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 +149 -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 +378 -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 +60 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/drone.js.map +1 -0
- 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 +40 -0
- 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 +43 -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 +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +115 -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 +176 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.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 +39 -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 +35 -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/pick.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/pick.js +18 -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 +23 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +20 -3
- 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 +49 -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/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 +65 -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 +80 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.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 +101 -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 +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
- 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 +138 -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 +119 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +816 -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 +70 -9
- package/bundle/typescript/src/commands/game/sideQuest/game.js +403 -164
- 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 +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +220 -47
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +213 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +525 -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 +174 -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 +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +39 -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 +69 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +175 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +80 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +7 -2
- 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 +34 -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 +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/scene-seed.d.ts +5 -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 -5
- 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 +143 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +328 -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 +44 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +193 -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 +54 -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 +35 -0
- package/bundle/typescript/src/tools/ai/ai.class.js +112 -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 +2 -1
- package/bundle/typescript/src/tools/https/https.class.js +43 -0
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.interface.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
static ask(prompt: string): Promise<string>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
static async ask(prompt) {
|
|
86
|
+
const config = this.resolveConfig();
|
|
87
|
+
if (!config) {
|
|
88
|
+
throw new Error('No AI provider is configured. Set OPENAI_API_KEY or ANTHROPIC_API_KEY ' +
|
|
89
|
+
'(optionally MAKA_AI_PROVIDER to choose between them if both are set).');
|
|
90
|
+
}
|
|
91
|
+
const result = config.provider === 'openai'
|
|
92
|
+
? await HTTPS.askGPT({ prompt, openApiKey: config.apiKey, model: config.model })
|
|
93
|
+
: await HTTPS.askClaude({ prompt, apiKey: config.apiKey, model: config.model });
|
|
94
|
+
const parsed = JSON.parse(result.data);
|
|
95
|
+
if (parsed?.error) {
|
|
96
|
+
throw new Error(parsed.error.message ?? JSON.stringify(parsed.error));
|
|
97
|
+
}
|
|
98
|
+
// Anthropic's "content" is an array of typed blocks, not always just a
|
|
99
|
+
// single text block at index 0 -- a model that does extended thinking
|
|
100
|
+
// can put a "thinking" block first, pushing the actual reply to a later
|
|
101
|
+
// index. Blindly indexing [0] found nothing and threw "No content
|
|
102
|
+
// returned" even though a real reply was right there in the array.
|
|
103
|
+
const content = config.provider === 'openai'
|
|
104
|
+
? parsed?.choices?.[0]?.message?.content
|
|
105
|
+
: parsed?.content?.find((block) => block?.type === 'text')?.text;
|
|
106
|
+
if (!content || typeof content !== 'string') {
|
|
107
|
+
throw new Error(`No content returned from ${config.provider}. Raw response: ${JSON.stringify(parsed).slice(0, 500)}`);
|
|
108
|
+
}
|
|
109
|
+
return content.trim();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# 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;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAQD,MAAM,cAAc,GAAmC;IACrD,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,OAAO,EAAE;IACb;;;;;;;;;OASG;IACH,MAAM,CAAC,aAAa;QAClB,MAAM,SAAS,GAAG,iBAAiB,EAAE,CAAC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AAE,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;CAC5B,CAAC;AAEF,6CAA6C;AAC7C,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,4BAAa,CAAA;AACf,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB;AAED,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,sBAAS,CAAA;IACT,wBAAW,CAAA;IACX,sBAAS,CAAA;IACT,wBAAW,CAAA;AACb,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,2BAAa,CAAA;IACb,2BAAa,CAAA;AACf,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,iCAAmB,CAAA;IACnB,2BAAa,CAAA;AACf,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,+BAAiB,CAAA;AACnB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qCAAqB,CAAA;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>;
|
|
@@ -9,5 +9,6 @@ export declare class HTTPS {
|
|
|
9
9
|
static askGPT({ prompt, openApiKey, certPath, model }: IHTPSAskGPT & {
|
|
10
10
|
model?: string;
|
|
11
11
|
}): Promise<IHTTPSResponse>;
|
|
12
|
+
static askClaude({ prompt, apiKey, certPath, model }: IHTPSAskClaude): Promise<IHTTPSResponse>;
|
|
12
13
|
static askGPTStreaming(prompt: string, model?: string): Promise<string>;
|
|
13
14
|
}
|
|
@@ -251,6 +251,49 @@ export class HTTPS {
|
|
|
251
251
|
cert: certPath
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
+
static async askClaude({ prompt, apiKey, certPath, model = 'claude-sonnet-5' }) {
|
|
255
|
+
const headers = {
|
|
256
|
+
'x-api-key': apiKey,
|
|
257
|
+
'anthropic-version': '2023-06-01',
|
|
258
|
+
'Content-Type': 'application/json',
|
|
259
|
+
};
|
|
260
|
+
const data = {
|
|
261
|
+
model: model,
|
|
262
|
+
max_tokens: 4096,
|
|
263
|
+
// No "temperature" here (unlike askGPT) -- some Claude models reject
|
|
264
|
+
// a custom value outright ("`temperature` is deprecated for this
|
|
265
|
+
// model"), found via a real session where every single AI call
|
|
266
|
+
// failed with that error. Omitting it lets the API use its own
|
|
267
|
+
// default rather than hard-failing on models that don't support
|
|
268
|
+
// overriding it.
|
|
269
|
+
//
|
|
270
|
+
// Claude Sonnet 5 (the default model here) does "adaptive thinking"
|
|
271
|
+
// on by default when "thinking" is omitted -- found via the SAME
|
|
272
|
+
// session, immediately after fixing the error above: every response
|
|
273
|
+
// came back with only an empty "thinking" block and no text at all,
|
|
274
|
+
// because thinking silently ate the entire max_tokens budget before
|
|
275
|
+
// ever reaching an actual answer. This app only ever needs a plain
|
|
276
|
+
// JSON/text reply, never deep reasoning, so thinking is switched off
|
|
277
|
+
// outright rather than just given a bigger budget to share. Some
|
|
278
|
+
// other models (Claude Fable/Mythos) reject disabling thinking at
|
|
279
|
+
// all -- not a concern for the default model here, but worth knowing
|
|
280
|
+
// if MAKA_AI_MODEL is ever pointed at one of those.
|
|
281
|
+
thinking: { type: 'disabled' },
|
|
282
|
+
messages: [
|
|
283
|
+
{
|
|
284
|
+
role: 'user',
|
|
285
|
+
content: prompt
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
};
|
|
289
|
+
return await this.post({
|
|
290
|
+
hostname: 'api.anthropic.com',
|
|
291
|
+
path: '/v1/messages',
|
|
292
|
+
data,
|
|
293
|
+
headers,
|
|
294
|
+
cert: certPath
|
|
295
|
+
});
|
|
296
|
+
}
|
|
254
297
|
static async askGPTStreaming(prompt, model = 'gpt-4.1') {
|
|
255
298
|
const apiKey = process.env.OPENAI_API_KEY;
|
|
256
299
|
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,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAc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K,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;
|
|
@@ -31,6 +33,12 @@ export interface IHTPSAskGPT {
|
|
|
31
33
|
certPath?: string;
|
|
32
34
|
model?: string;
|
|
33
35
|
}
|
|
36
|
+
export interface IHTPSAskClaude {
|
|
37
|
+
prompt: string;
|
|
38
|
+
apiKey: string;
|
|
39
|
+
certPath?: string;
|
|
40
|
+
model?: string;
|
|
41
|
+
}
|
|
34
42
|
export interface IHTTPSDownload {
|
|
35
43
|
url: string;
|
|
36
44
|
headers?: Record<string, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.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.",
|