@osanoai/multicli 1.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/README.md +209 -0
- package/dist/clientFilter.d.ts +5 -0
- package/dist/clientFilter.d.ts.map +1 -0
- package/dist/clientFilter.js +27 -0
- package/dist/clientFilter.js.map +1 -0
- package/dist/constants.d.ts +88 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +90 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +205 -0
- package/dist/index.js.map +1 -0
- package/dist/modelCatalog.d.ts +14 -0
- package/dist/modelCatalog.d.ts.map +1 -0
- package/dist/modelCatalog.js +99 -0
- package/dist/modelCatalog.js.map +1 -0
- package/dist/tools/ask-claude.tool.d.ts +3 -0
- package/dist/tools/ask-claude.tool.d.ts.map +1 -0
- package/dist/tools/ask-claude.tool.js +28 -0
- package/dist/tools/ask-claude.tool.js.map +1 -0
- package/dist/tools/ask-codex.tool.d.ts +3 -0
- package/dist/tools/ask-codex.tool.d.ts.map +1 -0
- package/dist/tools/ask-codex.tool.js +27 -0
- package/dist/tools/ask-codex.tool.js.map +1 -0
- package/dist/tools/ask-gemini.tool.d.ts +3 -0
- package/dist/tools/ask-gemini.tool.d.ts.map +1 -0
- package/dist/tools/ask-gemini.tool.js +36 -0
- package/dist/tools/ask-gemini.tool.js.map +1 -0
- package/dist/tools/brainstorm-claude.tool.d.ts +3 -0
- package/dist/tools/brainstorm-claude.tool.d.ts.map +1 -0
- package/dist/tools/brainstorm-claude.tool.js +42 -0
- package/dist/tools/brainstorm-claude.tool.js.map +1 -0
- package/dist/tools/brainstorm-codex.tool.d.ts +3 -0
- package/dist/tools/brainstorm-codex.tool.d.ts.map +1 -0
- package/dist/tools/brainstorm-codex.tool.js +42 -0
- package/dist/tools/brainstorm-codex.tool.js.map +1 -0
- package/dist/tools/brainstorm.tool.d.ts +3 -0
- package/dist/tools/brainstorm.tool.d.ts.map +1 -0
- package/dist/tools/brainstorm.tool.js +42 -0
- package/dist/tools/brainstorm.tool.js.map +1 -0
- package/dist/tools/fetch-chunk.tool.d.ts +3 -0
- package/dist/tools/fetch-chunk.tool.d.ts.map +1 -0
- package/dist/tools/fetch-chunk.tool.js +58 -0
- package/dist/tools/fetch-chunk.tool.js.map +1 -0
- package/dist/tools/important-read-now.tool.d.ts +3 -0
- package/dist/tools/important-read-now.tool.d.ts.map +1 -0
- package/dist/tools/important-read-now.tool.js +31 -0
- package/dist/tools/important-read-now.tool.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +34 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/registry.d.ts +25 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +78 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/simple-tools.d.ts +8 -0
- package/dist/tools/simple-tools.d.ts.map +1 -0
- package/dist/tools/simple-tools.js +78 -0
- package/dist/tools/simple-tools.js.map +1 -0
- package/dist/tools/test-tool.example.d.ts +13 -0
- package/dist/tools/test-tool.example.d.ts.map +1 -0
- package/dist/tools/test-tool.example.js +32 -0
- package/dist/tools/test-tool.example.js.map +1 -0
- package/dist/tools/timeout-test.tool.d.ts +3 -0
- package/dist/tools/timeout-test.tool.d.ts.map +1 -0
- package/dist/tools/timeout-test.tool.js +32 -0
- package/dist/tools/timeout-test.tool.js.map +1 -0
- package/dist/utils/brainstormPromptBuilder.d.ts +11 -0
- package/dist/utils/brainstormPromptBuilder.d.ts.map +1 -0
- package/dist/utils/brainstormPromptBuilder.js +93 -0
- package/dist/utils/brainstormPromptBuilder.js.map +1 -0
- package/dist/utils/changeModeChunker.d.ts +11 -0
- package/dist/utils/changeModeChunker.d.ts.map +1 -0
- package/dist/utils/changeModeChunker.js +89 -0
- package/dist/utils/changeModeChunker.js.map +1 -0
- package/dist/utils/changeModeParser.d.ts +15 -0
- package/dist/utils/changeModeParser.d.ts.map +1 -0
- package/dist/utils/changeModeParser.js +67 -0
- package/dist/utils/changeModeParser.js.map +1 -0
- package/dist/utils/changeModeTranslator.d.ts +8 -0
- package/dist/utils/changeModeTranslator.d.ts.map +1 -0
- package/dist/utils/changeModeTranslator.js +70 -0
- package/dist/utils/changeModeTranslator.js.map +1 -0
- package/dist/utils/chunkCache.d.ts +22 -0
- package/dist/utils/chunkCache.d.ts.map +1 -0
- package/dist/utils/chunkCache.js +147 -0
- package/dist/utils/chunkCache.js.map +1 -0
- package/dist/utils/claudeExecutor.d.ts +2 -0
- package/dist/utils/claudeExecutor.d.ts.map +1 -0
- package/dist/utils/claudeExecutor.js +21 -0
- package/dist/utils/claudeExecutor.js.map +1 -0
- package/dist/utils/cliDetector.d.ts +17 -0
- package/dist/utils/cliDetector.d.ts.map +1 -0
- package/dist/utils/cliDetector.js +45 -0
- package/dist/utils/cliDetector.js.map +1 -0
- package/dist/utils/codexExecutor.d.ts +2 -0
- package/dist/utils/codexExecutor.d.ts.map +1 -0
- package/dist/utils/codexExecutor.js +19 -0
- package/dist/utils/codexExecutor.js.map +1 -0
- package/dist/utils/commandExecutor.d.ts +2 -0
- package/dist/utils/commandExecutor.d.ts.map +1 -0
- package/dist/utils/commandExecutor.js +53 -0
- package/dist/utils/commandExecutor.js.map +1 -0
- package/dist/utils/geminiExecutor.d.ts +3 -0
- package/dist/utils/geminiExecutor.d.ts.map +1 -0
- package/dist/utils/geminiExecutor.js +126 -0
- package/dist/utils/geminiExecutor.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/timeoutManager.d.ts +2 -0
- package/dist/utils/timeoutManager.d.ts.map +1 -0
- package/dist/utils/timeoutManager.js +2 -0
- package/dist/utils/timeoutManager.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelCatalog.d.ts","sourceRoot":"","sources":["../src/modelCatalog.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAmFD,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAEzE;AAOD,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAgBxE"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
const GEMINI_CATALOG = {
|
|
2
|
+
cli: 'gemini',
|
|
3
|
+
tiers: [
|
|
4
|
+
{
|
|
5
|
+
tier: 'fast',
|
|
6
|
+
label: 'Flash (DEFAULT)',
|
|
7
|
+
models: ['gemini-2.5-flash', 'gemini-2.5-flash-lite'],
|
|
8
|
+
useWhen: 'Simple questions, math, lookups, summaries, short code, trivial tasks. USE THIS BY DEFAULT.',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
tier: 'balanced',
|
|
12
|
+
label: 'Flash Preview',
|
|
13
|
+
models: ['gemini-3-flash-preview'],
|
|
14
|
+
useWhen: 'Moderate tasks needing newer capabilities but still fast. Multi-step but not deeply complex.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
tier: 'powerful',
|
|
18
|
+
label: 'Pro',
|
|
19
|
+
models: ['gemini-3.1-pro-preview', 'gemini-2.5-pro'],
|
|
20
|
+
useWhen: 'ONLY for: complex analysis, deep reasoning, large codebase understanding, nuanced opinions, architectural decisions.',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
note: 'Run Gemini Help for the latest CLI options. Model IDs may change as Google releases new versions.',
|
|
24
|
+
};
|
|
25
|
+
const CODEX_CATALOG = {
|
|
26
|
+
cli: 'codex',
|
|
27
|
+
tiers: [
|
|
28
|
+
{
|
|
29
|
+
tier: 'fast',
|
|
30
|
+
label: 'Codex Mini (DEFAULT)',
|
|
31
|
+
models: ['gpt-5.1-codex-mini'],
|
|
32
|
+
useWhen: 'Simple questions, math, lookups, short code snippets, trivial tasks. USE THIS BY DEFAULT.',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
tier: 'balanced',
|
|
36
|
+
label: 'Codex',
|
|
37
|
+
models: ['gpt-5.2-codex'],
|
|
38
|
+
useWhen: 'Moderate coding tasks, multi-file changes, debugging, code review.',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
tier: 'powerful',
|
|
42
|
+
label: 'Codex Max / GPT',
|
|
43
|
+
models: ['gpt-5.3-codex', 'gpt-5.1-codex-max', 'gpt-5.2'],
|
|
44
|
+
useWhen: 'ONLY for: complex architecture, large refactors, deep reasoning, nuanced analysis, multi-step planning.',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
note: 'Run Codex Help for the latest CLI options. Model IDs may change as OpenAI releases new versions.',
|
|
48
|
+
};
|
|
49
|
+
const CLAUDE_CATALOG = {
|
|
50
|
+
cli: 'claude',
|
|
51
|
+
tiers: [
|
|
52
|
+
{
|
|
53
|
+
tier: 'fast',
|
|
54
|
+
label: 'Haiku (DEFAULT)',
|
|
55
|
+
models: ['claude-haiku-4-5-20251001'],
|
|
56
|
+
useWhen: 'Simple questions, math, lookups, summaries, short code, trivial tasks. USE THIS BY DEFAULT.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
tier: 'balanced',
|
|
60
|
+
label: 'Sonnet',
|
|
61
|
+
models: ['claude-sonnet-4-6'],
|
|
62
|
+
useWhen: 'Moderate coding, analysis, multi-step tasks, following detailed instructions.',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
tier: 'powerful',
|
|
66
|
+
label: 'Opus',
|
|
67
|
+
models: ['claude-opus-4-6'],
|
|
68
|
+
useWhen: 'ONLY for: complex reasoning, nuanced analysis, difficult multi-step tasks, architectural decisions.',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
note: 'Run Claude Help for the latest CLI options.',
|
|
72
|
+
};
|
|
73
|
+
const CATALOGS = {
|
|
74
|
+
gemini: GEMINI_CATALOG,
|
|
75
|
+
codex: CODEX_CATALOG,
|
|
76
|
+
claude: CLAUDE_CATALOG,
|
|
77
|
+
};
|
|
78
|
+
export function getCatalog(cli) {
|
|
79
|
+
return CATALOGS[cli];
|
|
80
|
+
}
|
|
81
|
+
const SELECTION_RULE = `MODEL SELECTION RULE: Always use the fastest (smallest) model that can handle the task. ` +
|
|
82
|
+
`Default to the "fast" tier. Only escalate when the task clearly requires more capability. ` +
|
|
83
|
+
`Simple questions, math, lookups, and trivial code do NOT need powerful models.\n`;
|
|
84
|
+
export function formatCatalog(cli) {
|
|
85
|
+
const catalog = CATALOGS[cli];
|
|
86
|
+
const lines = [
|
|
87
|
+
`${catalog.cli.toUpperCase()} — Available Models\n`,
|
|
88
|
+
SELECTION_RULE,
|
|
89
|
+
];
|
|
90
|
+
for (const tier of catalog.tiers) {
|
|
91
|
+
lines.push(`[${tier.tier.toUpperCase()}] ${tier.label}`);
|
|
92
|
+
lines.push(` Use when: ${tier.useWhen}`);
|
|
93
|
+
lines.push(` Model IDs: ${tier.models.join(', ')}`);
|
|
94
|
+
lines.push('');
|
|
95
|
+
}
|
|
96
|
+
lines.push(`> ${catalog.note}`);
|
|
97
|
+
return lines.join('\n');
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=modelCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelC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AAK,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAChC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-claude.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ask-claude.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,eAAO,MAAM,aAAa,EAAE,WA0B3B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { executeClaudeCLI } from '../utils/claudeExecutor.js';
|
|
3
|
+
import { ERROR_MESSAGES, STATUS_MESSAGES } from '../constants.js';
|
|
4
|
+
const askClaudeArgsSchema = z.object({
|
|
5
|
+
prompt: z.string().min(1).describe("The question or task for Claude Code. REQUIRED — MUST be a non-empty string. Claude Code has FULL access to the filesystem and can read files itself. Do NOT pre-read or inline file contents — just describe the task and let Claude explore the codebase."),
|
|
6
|
+
model: z.string().min(1).describe("REQUIRED — you MUST first call List Claude Models, review the available model families and their strengths, then select the best model for your task's scope and complexity. It's the law. Empty strings will be rejected."),
|
|
7
|
+
permissionMode: z.enum(['default', 'acceptEdits', 'bypassPermissions', 'dontAsk', 'plan']).optional().describe("Optional. Do NOT set unless explicitly needed. Permission mode: 'default' (requires approval), 'acceptEdits' (auto-accepts file edits), 'bypassPermissions' (skips all checks — use with care), 'dontAsk', or 'plan'."),
|
|
8
|
+
maxBudgetUsd: z.number().positive().optional().describe("Optional. Do NOT set unless explicitly needed. Maximum dollar amount to spend on API calls for this request."),
|
|
9
|
+
systemPrompt: z.string().optional().describe("Optional. Do NOT set unless explicitly needed. Override or append a system prompt for this request."),
|
|
10
|
+
});
|
|
11
|
+
export const askClaudeTool = {
|
|
12
|
+
name: "Ask Claude",
|
|
13
|
+
description: "Ask Claude Code a question or give it a task. Claude Code has full filesystem access and will read files itself — do NOT pre-gather context or inline file contents into the prompt. Just describe what you need. You MUST call List Claude Models first to select an appropriate model. Do NOT set optional parameters unless you have a specific reason.",
|
|
14
|
+
zodSchema: askClaudeArgsSchema,
|
|
15
|
+
prompt: {
|
|
16
|
+
description: "Execute 'claude --print <prompt>' to get Claude Code's response.",
|
|
17
|
+
},
|
|
18
|
+
category: 'claude',
|
|
19
|
+
execute: async (args, onProgress) => {
|
|
20
|
+
const { prompt, model, permissionMode, maxBudgetUsd, systemPrompt } = args;
|
|
21
|
+
if (!prompt?.trim()) {
|
|
22
|
+
throw new Error(ERROR_MESSAGES.NO_PROMPT_PROVIDED);
|
|
23
|
+
}
|
|
24
|
+
const result = await executeClaudeCLI(prompt, model, permissionMode, maxBudgetUsd, systemPrompt, onProgress);
|
|
25
|
+
return `${STATUS_MESSAGES.CLAUDE_RESPONSE}\n${result}`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ask-claude.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-claude.tool.js","sourceRoot":"","sources":["../../src/tools/ask-claude.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6PAA6P,CAAC;IACjS,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,4NAA4N,CAAC;IAC/P,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,mBAAmB,EAAE,SAA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
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { executeCodexCLI } from '../utils/codexExecutor.js';
|
|
3
|
+
import { ERROR_MESSAGES, STATUS_MESSAGES } from '../constants.js';
|
|
4
|
+
const askCodexArgsSchema = z.object({
|
|
5
|
+
prompt: z.string().min(1).describe("The question or task for Codex. REQUIRED — MUST be a non-empty string. Codex has FULL access to the filesystem and can read files itself. Do NOT pre-read or inline file contents — just describe the task and let Codex explore the codebase."),
|
|
6
|
+
model: z.string().min(1).describe("REQUIRED — you MUST first call List Codex Models, review the available model families and their strengths, then select the best model for your task's scope and complexity. It's the law. Empty strings will be rejected."),
|
|
7
|
+
sandbox: z.enum(['read-only', 'workspace-write', 'danger-full-access']).optional().describe("Optional. Do NOT set unless explicitly needed. Sandbox mode: 'read-only' (safe), 'workspace-write' (default), or 'danger-full-access' (unrestricted)."),
|
|
8
|
+
approvalPolicy: z.enum(['never', 'on-request', 'on-failure', 'untrusted']).optional().describe("Optional. Do NOT set unless explicitly needed. Approval policy: 'never', 'on-request' (default), 'on-failure', or 'untrusted'."),
|
|
9
|
+
});
|
|
10
|
+
export const askCodexTool = {
|
|
11
|
+
name: "Ask Codex",
|
|
12
|
+
description: "Ask OpenAI Codex a question or give it a task. Codex has full filesystem access and will read files itself — do NOT pre-gather context or inline file contents into the prompt. Just describe what you need. You MUST call List Codex Models first to select an appropriate model. Do NOT set optional parameters unless you have a specific reason.",
|
|
13
|
+
zodSchema: askCodexArgsSchema,
|
|
14
|
+
prompt: {
|
|
15
|
+
description: "Execute 'codex exec <prompt> --full-auto' to get Codex's response.",
|
|
16
|
+
},
|
|
17
|
+
category: 'codex',
|
|
18
|
+
execute: async (args, onProgress) => {
|
|
19
|
+
const { prompt, model, sandbox, approvalPolicy } = args;
|
|
20
|
+
if (!prompt?.trim()) {
|
|
21
|
+
throw new Error(ERROR_MESSAGES.NO_PROMPT_PROVIDED);
|
|
22
|
+
}
|
|
23
|
+
const result = await executeCodexCLI(prompt, model, sandbox, approvalPolicy, onProgress);
|
|
24
|
+
return `${STATUS_MESSAGES.CODEX_RESPONSE}\n${result}`;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=ask-codex.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-codex.tool.js","sourceRoot":"","sources":["../../src/tools/ask-codex.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gPAAgP,CAAC;IACpR,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,2NAA2N,CAAC;IAC9P,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uJAAuJ,CAAC;IACpP,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gIAAgI,CAAC;CACjO,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,sVAAsV;IACnW,SAAS,EAAE,kBAAkB;IAC7B,MAAM,EAAE;QACN,WAAW,EAAE,oEAAoE;KAClF;IACD,QAAQ,EAAE,OAAO;IACjB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;QAClC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;QAExD,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,eAAe,CAClC,MAAgB,EAChB,KAAe,EACf,OAA6B,EAC7B,cAAoC,EACpC,UAAU,CACX,CAAC;QAEF,OAAO,GAAG,eAAe,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;IACxD,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-gemini.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ask-gemini.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgB5C,eAAO,MAAM,aAAa,EAAE,WAsC3B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { executeGeminiCLI, processChangeModeOutput } from '../utils/geminiExecutor.js';
|
|
3
|
+
import { ERROR_MESSAGES, STATUS_MESSAGES } from '../constants.js';
|
|
4
|
+
const askGeminiArgsSchema = z.object({
|
|
5
|
+
prompt: z.string().min(1).describe("The question or task for Gemini. REQUIRED — MUST be a non-empty string. Gemini has filesystem access — use @ syntax to reference files (e.g., '@src/index.ts review this'). Do NOT pre-read or inline file contents — just describe the task and reference files with @."),
|
|
6
|
+
model: z.string().min(1).describe("REQUIRED — you MUST first call List Gemini Models, review the available model families and their strengths, then select the best model for your task's scope and complexity. It's the law. Empty strings will be rejected."),
|
|
7
|
+
sandbox: z.boolean().default(false).describe("Optional. Do NOT set unless explicitly needed. Run in sandbox mode (-s flag) for safely testing code changes in an isolated environment. Defaults to false."),
|
|
8
|
+
changeMode: z.boolean().default(false).describe("Optional. Do NOT set unless explicitly needed. Return structured edit suggestions instead of plain text. Defaults to false."),
|
|
9
|
+
chunkIndex: z.union([z.number(), z.string()]).optional().describe("Internal — do NOT set unless you received a chunked changeMode response. Which chunk to return (1-based)."),
|
|
10
|
+
chunkCacheKey: z.string().optional().describe("Internal — do NOT set unless you received a chunked changeMode response. Cache key from a prior response for fetching subsequent chunks."),
|
|
11
|
+
});
|
|
12
|
+
export const askGeminiTool = {
|
|
13
|
+
name: "Ask Gemini",
|
|
14
|
+
description: "Ask Google Gemini a question or give it a task. Gemini has filesystem access via @ syntax — do NOT pre-gather context or inline file contents into the prompt. Just describe what you need and use @file references. You MUST call List Gemini Models first to select an appropriate model. Do NOT set optional parameters unless you have a specific reason.",
|
|
15
|
+
zodSchema: askGeminiArgsSchema,
|
|
16
|
+
prompt: {
|
|
17
|
+
description: "Execute 'gemini <prompt>' to get Gemini AI's response. Supports enhanced change mode for structured edit suggestions.",
|
|
18
|
+
},
|
|
19
|
+
category: 'gemini',
|
|
20
|
+
execute: async (args, onProgress) => {
|
|
21
|
+
const { prompt, model, sandbox, changeMode, chunkIndex, chunkCacheKey } = args;
|
|
22
|
+
if (!prompt?.trim()) {
|
|
23
|
+
throw new Error(ERROR_MESSAGES.NO_PROMPT_PROVIDED);
|
|
24
|
+
}
|
|
25
|
+
if (changeMode && chunkIndex && chunkCacheKey) {
|
|
26
|
+
return processChangeModeOutput('', // empty for cache...
|
|
27
|
+
chunkIndex, chunkCacheKey, prompt);
|
|
28
|
+
}
|
|
29
|
+
const result = await executeGeminiCLI(prompt, model, !!sandbox, !!changeMode, onProgress);
|
|
30
|
+
if (changeMode) {
|
|
31
|
+
return processChangeModeOutput(result, args.chunkIndex, undefined, prompt);
|
|
32
|
+
}
|
|
33
|
+
return `${STATUS_MESSAGES.GEMINI_RESPONSE}\n${result}`; // changeMode false
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=ask-gemini.tool.js.map
|
|
@@ -0,0 +1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AClB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;QAClC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;QAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QAE5J,IAAI,UAAU,IAAI,UAAU,IAAI,aAAa,EAAE,CAAC;YAC9C,OAAO,uBAAuB,CAC5B,EAAE,EAAE,qBAAqB;YACzB,UAAoB,EACpB,aAAuB,EACvB,MAAgB,CACjB,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,gBAAgB,CACnC,MAAgB,EAChB,KAAe,EACf,CAAC,CAAC,OAAO,EACT,CAAC,CAAC,UAAU,EACZ,UAAU,CACX,CAAC;QAEF,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,uBAAuB,CAC5B,MAAM,EACN,IAAI,CAAC,UAAgC,EACrC,SAAS,EACT,MAAgB,CACjB,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,eAAe,CAAC,eAAe,KAAK,MAAM,EAAE,CAAC,CAAC,mBAAmB;IAC7E,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brainstorm-claude.tool.d.ts","sourceRoot":"","sources":["../../src/tools/brainstorm-claude.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgB5C,eAAO,MAAM,oBAAoB,EAAE,WAwClC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Logger } from '../utils/logger.js';
|
|
3
|
+
import { executeClaudeCLI } from '../utils/claudeExecutor.js';
|
|
4
|
+
import { buildBrainstormPrompt } from '../utils/brainstormPromptBuilder.js';
|
|
5
|
+
const brainstormClaudeArgsSchema = z.object({
|
|
6
|
+
prompt: z.string().min(1).describe("Primary brainstorming challenge or question to explore"),
|
|
7
|
+
model: z.string().min(1).describe("Required. Call claude-list-models to see available models and families. Accepts aliases ('sonnet', 'opus', 'haiku') or full model IDs."),
|
|
8
|
+
methodology: z.enum(['divergent', 'convergent', 'scamper', 'design-thinking', 'lateral', 'auto']).default('auto').describe("Brainstorming framework: 'divergent' (generate many ideas), 'convergent' (refine existing), 'scamper' (systematic triggers), 'design-thinking' (human-centered), 'lateral' (unexpected connections), 'auto' (AI selects best)"),
|
|
9
|
+
domain: z.string().optional().describe("Domain context for specialized brainstorming (e.g., 'software', 'business', 'creative', 'research', 'product', 'marketing')"),
|
|
10
|
+
constraints: z.string().optional().describe("Known limitations, requirements, or boundaries (budget, time, technical, legal, etc.)"),
|
|
11
|
+
existingContext: z.string().optional().describe("Background information, previous attempts, or current state to build upon"),
|
|
12
|
+
ideaCount: z.number().int().positive().default(12).describe("Target number of ideas to generate (default: 10-15)"),
|
|
13
|
+
includeAnalysis: z.boolean().default(true).describe("Include feasibility, impact, and implementation analysis for generated ideas"),
|
|
14
|
+
});
|
|
15
|
+
export const brainstormClaudeTool = {
|
|
16
|
+
name: "claude-brainstorm",
|
|
17
|
+
description: "Generate novel ideas using Claude Code. Model is required — call claude-list-models first. Supports SCAMPER, Design Thinking, etc.",
|
|
18
|
+
zodSchema: brainstormClaudeArgsSchema,
|
|
19
|
+
prompt: {
|
|
20
|
+
description: "Generate structured brainstorming prompt with methodology-driven ideation, domain context integration, and analytical evaluation framework",
|
|
21
|
+
},
|
|
22
|
+
category: 'claude',
|
|
23
|
+
execute: async (args, onProgress) => {
|
|
24
|
+
const { prompt, model, methodology = 'auto', domain, constraints, existingContext, ideaCount = 12, includeAnalysis = true } = args;
|
|
25
|
+
if (!prompt?.trim()) {
|
|
26
|
+
throw new Error("You must provide a valid brainstorming challenge or question to explore");
|
|
27
|
+
}
|
|
28
|
+
const enhancedPrompt = buildBrainstormPrompt({
|
|
29
|
+
prompt: prompt.trim(),
|
|
30
|
+
methodology: methodology,
|
|
31
|
+
domain: domain,
|
|
32
|
+
constraints: constraints,
|
|
33
|
+
existingContext: existingContext,
|
|
34
|
+
ideaCount: ideaCount,
|
|
35
|
+
includeAnalysis: includeAnalysis
|
|
36
|
+
});
|
|
37
|
+
Logger.debug(`Brainstorm (Claude): Using methodology '${methodology}' for domain '${domain || 'general'}'`);
|
|
38
|
+
onProgress?.(`Generating ${ideaCount} ideas via ${methodology} methodology...`);
|
|
39
|
+
return await executeClaudeCLI(enhancedPrompt, model, undefined, undefined, undefined, onProgress);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=brainstorm-claude.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brainstorm-claude.tool.js","sourceRoot":"","sources":["../../src/tools/brainstorm-claude.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IAC5F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,wIAAwI,CAAC;IAC3K,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAA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;YAClC,MAAM,EAAE,MAA4B;YACpC,WAAW,EAAE,WAAiC;YAC9C,eAAe,EAAE,eAAqC;YACtD,SAAS,EAAE,SAAmB;YAC9B,eAAe,EAAE,eAA0B;SAC5C,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,2CAA2C,WAAW,iBAAiB,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC;QAE5G,UAAU,EAAE,CAAC,cAAc,SAAS,cAAc,WAAW,iBAAiB,CAAC,CAAC;QAEhF,OAAO,MAAM,gBAAgB,CAAC,cAAc,EAAE,KAAe,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAC9G,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brainstorm-codex.tool.d.ts","sourceRoot":"","sources":["../../src/tools/brainstorm-codex.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgB5C,eAAO,MAAM,mBAAmB,EAAE,WAwCjC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Logger } from '../utils/logger.js';
|
|
3
|
+
import { executeCodexCLI } from '../utils/codexExecutor.js';
|
|
4
|
+
import { buildBrainstormPrompt } from '../utils/brainstormPromptBuilder.js';
|
|
5
|
+
const brainstormCodexArgsSchema = z.object({
|
|
6
|
+
prompt: z.string().min(1).describe("Primary brainstorming challenge or question to explore"),
|
|
7
|
+
model: z.string().min(1).describe("Required. Call codex-list-models to see available models and families. Example: 'gpt-5.3-codex'"),
|
|
8
|
+
methodology: z.enum(['divergent', 'convergent', 'scamper', 'design-thinking', 'lateral', 'auto']).default('auto').describe("Brainstorming framework: 'divergent' (generate many ideas), 'convergent' (refine existing), 'scamper' (systematic triggers), 'design-thinking' (human-centered), 'lateral' (unexpected connections), 'auto' (AI selects best)"),
|
|
9
|
+
domain: z.string().optional().describe("Domain context for specialized brainstorming (e.g., 'software', 'business', 'creative', 'research', 'product', 'marketing')"),
|
|
10
|
+
constraints: z.string().optional().describe("Known limitations, requirements, or boundaries (budget, time, technical, legal, etc.)"),
|
|
11
|
+
existingContext: z.string().optional().describe("Background information, previous attempts, or current state to build upon"),
|
|
12
|
+
ideaCount: z.number().int().positive().default(12).describe("Target number of ideas to generate (default: 10-15)"),
|
|
13
|
+
includeAnalysis: z.boolean().default(true).describe("Include feasibility, impact, and implementation analysis for generated ideas"),
|
|
14
|
+
});
|
|
15
|
+
export const brainstormCodexTool = {
|
|
16
|
+
name: "codex-brainstorm",
|
|
17
|
+
description: "Generate novel ideas using Codex. Model is required — call codex-list-models first. Supports SCAMPER, Design Thinking, etc.",
|
|
18
|
+
zodSchema: brainstormCodexArgsSchema,
|
|
19
|
+
prompt: {
|
|
20
|
+
description: "Generate structured brainstorming prompt with methodology-driven ideation, domain context integration, and analytical evaluation framework",
|
|
21
|
+
},
|
|
22
|
+
category: 'codex',
|
|
23
|
+
execute: async (args, onProgress) => {
|
|
24
|
+
const { prompt, model, methodology = 'auto', domain, constraints, existingContext, ideaCount = 12, includeAnalysis = true } = args;
|
|
25
|
+
if (!prompt?.trim()) {
|
|
26
|
+
throw new Error("You must provide a valid brainstorming challenge or question to explore");
|
|
27
|
+
}
|
|
28
|
+
const enhancedPrompt = buildBrainstormPrompt({
|
|
29
|
+
prompt: prompt.trim(),
|
|
30
|
+
methodology: methodology,
|
|
31
|
+
domain: domain,
|
|
32
|
+
constraints: constraints,
|
|
33
|
+
existingContext: existingContext,
|
|
34
|
+
ideaCount: ideaCount,
|
|
35
|
+
includeAnalysis: includeAnalysis
|
|
36
|
+
});
|
|
37
|
+
Logger.debug(`Brainstorm (Codex): Using methodology '${methodology}' for domain '${domain || 'general'}'`);
|
|
38
|
+
onProgress?.(`Generating ${ideaCount} ideas via ${methodology} methodology...`);
|
|
39
|
+
return await executeCodexCLI(enhancedPrompt, model, undefined, undefined, onProgress);
|
|
40
|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,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brainstorm.tool.d.ts","sourceRoot":"","sources":["../../src/tools/brainstorm.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgB5C,eAAO,MAAM,cAAc,EAAE,WAwC5B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Logger } from '../utils/logger.js';
|
|
3
|
+
import { executeGeminiCLI } from '../utils/geminiExecutor.js';
|
|
4
|
+
import { buildBrainstormPrompt } from '../utils/brainstormPromptBuilder.js';
|
|
5
|
+
const brainstormArgsSchema = z.object({
|
|
6
|
+
prompt: z.string().min(1).describe("Primary brainstorming challenge or question to explore"),
|
|
7
|
+
model: z.string().min(1).describe("Required. Call gemini-list-models to see available models and families. Example: 'gemini-3.1-pro-preview'"),
|
|
8
|
+
methodology: z.enum(['divergent', 'convergent', 'scamper', 'design-thinking', 'lateral', 'auto']).default('auto').describe("Brainstorming framework: 'divergent' (generate many ideas), 'convergent' (refine existing), 'scamper' (systematic triggers), 'design-thinking' (human-centered), 'lateral' (unexpected connections), 'auto' (AI selects best)"),
|
|
9
|
+
domain: z.string().optional().describe("Domain context for specialized brainstorming (e.g., 'software', 'business', 'creative', 'research', 'product', 'marketing')"),
|
|
10
|
+
constraints: z.string().optional().describe("Known limitations, requirements, or boundaries (budget, time, technical, legal, etc.)"),
|
|
11
|
+
existingContext: z.string().optional().describe("Background information, previous attempts, or current state to build upon"),
|
|
12
|
+
ideaCount: z.number().int().positive().default(12).describe("Target number of ideas to generate (default: 10-15)"),
|
|
13
|
+
includeAnalysis: z.boolean().default(true).describe("Include feasibility, impact, and implementation analysis for generated ideas"),
|
|
14
|
+
});
|
|
15
|
+
export const brainstormTool = {
|
|
16
|
+
name: "gemini-brainstorm",
|
|
17
|
+
description: "Generate novel ideas using Gemini. Model is required — call gemini-list-models first. Supports SCAMPER, Design Thinking, etc.",
|
|
18
|
+
zodSchema: brainstormArgsSchema,
|
|
19
|
+
prompt: {
|
|
20
|
+
description: "Generate structured brainstorming prompt with methodology-driven ideation, domain context integration, and analytical evaluation framework",
|
|
21
|
+
},
|
|
22
|
+
category: 'gemini',
|
|
23
|
+
execute: async (args, onProgress) => {
|
|
24
|
+
const { prompt, model, methodology = 'auto', domain, constraints, existingContext, ideaCount = 12, includeAnalysis = true } = args;
|
|
25
|
+
if (!prompt?.trim()) {
|
|
26
|
+
throw new Error("You must provide a valid brainstorming challenge or question to explore");
|
|
27
|
+
}
|
|
28
|
+
const enhancedPrompt = buildBrainstormPrompt({
|
|
29
|
+
prompt: prompt.trim(),
|
|
30
|
+
methodology: methodology,
|
|
31
|
+
domain: domain,
|
|
32
|
+
constraints: constraints,
|
|
33
|
+
existingContext: existingContext,
|
|
34
|
+
ideaCount: ideaCount,
|
|
35
|
+
includeAnalysis: includeAnalysis
|
|
36
|
+
});
|
|
37
|
+
Logger.debug(`Brainstorm (Gemini): Using methodology '${methodology}' for domain '${domain || 'general'}'`);
|
|
38
|
+
onProgress?.(`Generating ${ideaCount} ideas via ${methodology} methodology...`);
|
|
39
|
+
return await executeGeminiCLI(enhancedPrompt, model, false, false, onProgress);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=brainstorm.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brainstorm.tool.js","sourceRoot":"","sources":["../../src/tools/brainstorm.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,E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KAAK,EACL,WAAW,GAAG,MAAM,EACpB,MAAM,EACN,WAAW,EACX,eAAe,EACf,SAAS,GAAG,EAAE,EACd,eAAe,GAAG,IAAI,EACvB,GAAG,IAAI,CAAC;QAET,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;QAC7F,CAAC;QAED,MAAM,cAAc,GAAG,qBAAqB,CAAC;YAC3C,MAAM,EAAG,MAAiB,CAAC,IAAI,EAAE;YACjC,WAAW,EAAE,WAAqB;YAClC,MAAM,EAAE,MAA4B;YACpC,WAAW,EAAE,WAAiC;YAC9C,eAAe,EAAE,eAAqC;YACtD,SAAS,EAAE,SAAmB;YAC9B,eAAe,EAAE,eAA0B;SAC5C,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,2CAA2C,WAAW,iBAAiB,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC;QAE5G,UAAU,EAAE,CAAC,cAAc,SAAS,cAAc,WAAW,iBAAiB,CAAC,CAAC;QAEhF,OAAO,MAAM,gBAAgB,CAAC,cAAc,EAAE,KAAe,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IAC3F,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-chunk.tool.d.ts","sourceRoot":"","sources":["../../src/tools/fetch-chunk.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C,eAAO,MAAM,cAAc,EAAE,WA+D5B,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getChunks } from '../utils/chunkCache.js';
|
|
3
|
+
import { formatChangeModeResponse, summarizeChangeModeEdits } from '../utils/changeModeTranslator.js';
|
|
4
|
+
const inputSchema = z.object({
|
|
5
|
+
cacheKey: z.string().describe("The cache key provided in the initial changeMode response"),
|
|
6
|
+
chunkIndex: z.number().min(1).describe("Which chunk to retrieve (1-based index)")
|
|
7
|
+
});
|
|
8
|
+
export const fetchChunkTool = {
|
|
9
|
+
name: 'Fetch Chunk',
|
|
10
|
+
description: 'Retrieves cached chunks from a Gemini changeMode response. Use this to get subsequent chunks after receiving a partial changeMode response.',
|
|
11
|
+
zodSchema: inputSchema,
|
|
12
|
+
prompt: {
|
|
13
|
+
description: 'Fetch the next chunk of a response',
|
|
14
|
+
arguments: [
|
|
15
|
+
{
|
|
16
|
+
name: 'prompt',
|
|
17
|
+
description: 'fetch-chunk cacheKey=<key> chunkIndex=<number>',
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
category: 'gemini',
|
|
23
|
+
execute: async (args, onProgress) => {
|
|
24
|
+
const { cacheKey, chunkIndex } = args;
|
|
25
|
+
// Retrieve cached chunks
|
|
26
|
+
const chunks = getChunks(cacheKey);
|
|
27
|
+
if (!chunks) {
|
|
28
|
+
return `❌ Cache miss: No chunks found for cache key "${cacheKey}".
|
|
29
|
+
|
|
30
|
+
Possible reasons:
|
|
31
|
+
1. The cache key is incorrect, Have you ran Ask Gemini with changeMode enabled?
|
|
32
|
+
2. The cache has expired (10 minute TTL)
|
|
33
|
+
3. The MCP server was restarted and the file-based cache was cleared
|
|
34
|
+
|
|
35
|
+
Please re-run the original changeMode request to regenerate the chunks.`;
|
|
36
|
+
}
|
|
37
|
+
// Validate chunk index
|
|
38
|
+
if (chunkIndex < 1 || chunkIndex > chunks.length) {
|
|
39
|
+
return `❌ Invalid chunk index: ${chunkIndex}
|
|
40
|
+
|
|
41
|
+
Available chunks: 1 to ${chunks.length}
|
|
42
|
+
You requested: ${chunkIndex}
|
|
43
|
+
|
|
44
|
+
Please use a valid chunk index.`;
|
|
45
|
+
}
|
|
46
|
+
// Get the requested chunk
|
|
47
|
+
const chunk = chunks[chunkIndex - 1];
|
|
48
|
+
// Format the response
|
|
49
|
+
let result = formatChangeModeResponse(chunk.edits, { current: chunkIndex, total: chunks.length, cacheKey });
|
|
50
|
+
// Add summary for first chunk
|
|
51
|
+
if (chunkIndex === 1 && chunks.length > 1) {
|
|
52
|
+
const allEdits = chunks.flatMap(c => c.edits);
|
|
53
|
+
result = summarizeChangeModeEdits(allEdits, true) + '\n\n' + result;
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=fetch-chunk.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-chunk.tool.js","sourceRoot":"","sources":["../../src/tools/fetch-chunk.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEtG,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;IAC1F,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yCAAyC,CAAC;CAClF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,6IAA6I;IAE1J,SAAS,EAAE,WAAW;IAEtB,MAAM,EAAE;QACN,WAAW,EAAE,oCAAoC;QACjD,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;gBAC7D,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IAED,QAAQ,EAAE,QAAQ;IAElB,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,UAAwC,EAAmB,EAAE;QACtF,MAAM,E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@@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const noArgsSchema = z.object({});
|
|
3
|
+
const NO_CLI_MESSAGE = `IMPORTANT: No usable AI CLIs were detected by Multi-CLI.
|
|
4
|
+
|
|
5
|
+
Multi-CLI requires at least one of the following CLI tools to be installed and available on your system PATH:
|
|
6
|
+
|
|
7
|
+
1. gemini - Google Gemini CLI (https://github.com/google-gemini/gemini-cli)
|
|
8
|
+
2. codex - OpenAI Codex CLI (https://github.com/openai/codex)
|
|
9
|
+
3. claude - Anthropic Claude Code CLI (https://claude.ai/cli)
|
|
10
|
+
|
|
11
|
+
Please inform the user that none of the supported CLIs were detected and at least one must be installed for Multi-CLI to function.
|
|
12
|
+
|
|
13
|
+
Note: If only your own CLI is installed, it is hidden because calling yourself is not supported. Install a different CLI to enable cross-model collaboration.
|
|
14
|
+
|
|
15
|
+
To verify a CLI is available, run one of these commands in a terminal:
|
|
16
|
+
which gemini
|
|
17
|
+
which codex
|
|
18
|
+
which claude
|
|
19
|
+
|
|
20
|
+
After installing a CLI, restart the MCP server to pick up the change.
|
|
21
|
+
`;
|
|
22
|
+
export const importantReadNowTool = {
|
|
23
|
+
name: "Claude Gemini Codex",
|
|
24
|
+
description: "CRITICAL: No usable AI CLIs detected by Multi-CLI. Call this tool immediately for troubleshooting instructions.",
|
|
25
|
+
zodSchema: noArgsSchema,
|
|
26
|
+
category: 'utility',
|
|
27
|
+
execute: async () => {
|
|
28
|
+
return NO_CLI_MESSAGE;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=important-read-now.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"important-read-now.tool.js","sourceRoot":"","sources":["../../src/tools/important-read-now.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAElC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;CAkBtB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACT,iHAAiH;IACnH,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CliAvailability } from '../utils/cliDetector.js';
|
|
2
|
+
/**
|
|
3
|
+
* Initialize the tool registry based on which CLIs are available.
|
|
4
|
+
* Must be called (and awaited) before the server starts accepting requests.
|
|
5
|
+
*/
|
|
6
|
+
export declare function initTools(): Promise<CliAvailability>;
|
|
7
|
+
export * from './registry.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAuB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;GAGG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC,CA6B1D;AAED,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Tool Registry Index - Registers tools based on CLI availability
|
|
2
|
+
import { toolRegistry } from './registry.js';
|
|
3
|
+
import { askGeminiTool } from './ask-gemini.tool.js';
|
|
4
|
+
import { geminiHelpTool, codexHelpTool, claudeHelpTool, geminiListModelsTool, codexListModelsTool, claudeListModelsTool, } from './simple-tools.js';
|
|
5
|
+
import { fetchChunkTool } from './fetch-chunk.tool.js';
|
|
6
|
+
import { askCodexTool } from './ask-codex.tool.js';
|
|
7
|
+
import { askClaudeTool } from './ask-claude.tool.js';
|
|
8
|
+
import { detectAvailableClis } from '../utils/cliDetector.js';
|
|
9
|
+
/**
|
|
10
|
+
* Initialize the tool registry based on which CLIs are available.
|
|
11
|
+
* Must be called (and awaited) before the server starts accepting requests.
|
|
12
|
+
*/
|
|
13
|
+
export async function initTools() {
|
|
14
|
+
const availability = await detectAvailableClis();
|
|
15
|
+
if (availability.gemini) {
|
|
16
|
+
toolRegistry.push(geminiListModelsTool, // List Gemini Models
|
|
17
|
+
askGeminiTool, // Ask Gemini
|
|
18
|
+
fetchChunkTool, // Fetch Chunk
|
|
19
|
+
geminiHelpTool);
|
|
20
|
+
}
|
|
21
|
+
if (availability.codex) {
|
|
22
|
+
toolRegistry.push(codexListModelsTool, // List Codex Models
|
|
23
|
+
askCodexTool, // Ask Codex
|
|
24
|
+
codexHelpTool);
|
|
25
|
+
}
|
|
26
|
+
if (availability.claude) {
|
|
27
|
+
toolRegistry.push(claudeListModelsTool, // List Claude Models
|
|
28
|
+
askClaudeTool, // Ask Claude
|
|
29
|
+
claudeHelpTool);
|
|
30
|
+
}
|
|
31
|
+
return availability;
|
|
32
|
+
}
|
|
33
|
+
export * from './registry.js';
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,cAAc,EAAE,aAAa,EAAE,cAAc,EAC7C,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,GAChE,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAmB,MAAM,yBAAyB,CAAC;AAE/E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,YAAY,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAEjD,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,YAAY,CAAC,IAAI,CACf,oBAAoB,EAAI,qBAAqB;QAC7C,aAAa,EAAW,aAAa;QACrC,cAAc,EAAU,cAAc;QACtC,cAAc,CACf,CAAC;IACJ,CAAC;IAED,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;QACvB,YAAY,CAAC,IAAI,CACf,mBAAmB,EAAK,oBAAoB;QAC5C,YAAY,EAAY,YAAY;QACpC,aAAa,CACd,CAAC;IACJ,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,YAAY,CAAC,IAAI,CACf,oBAAoB,EAAI,qBAAqB;QAC7C,aAAa,EAAW,aAAa;QACrC,cAAc,CACf,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,cAAc,eAAe,CAAC"}
|