@osanoai/multicli 1.5.0 → 1.5.3
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 +20 -12
- package/package.json +2 -2
- package/dist/tools/brainstorm-claude.tool.d.ts +0 -3
- package/dist/tools/brainstorm-claude.tool.d.ts.map +0 -1
- package/dist/tools/brainstorm-claude.tool.js +0 -42
- package/dist/tools/brainstorm-claude.tool.js.map +0 -1
- package/dist/tools/brainstorm-codex.tool.d.ts +0 -3
- package/dist/tools/brainstorm-codex.tool.d.ts.map +0 -1
- package/dist/tools/brainstorm-codex.tool.js +0 -42
- package/dist/tools/brainstorm-codex.tool.js.map +0 -1
- package/dist/tools/brainstorm.tool.d.ts +0 -3
- package/dist/tools/brainstorm.tool.d.ts.map +0 -1
- package/dist/tools/brainstorm.tool.js +0 -42
- package/dist/tools/brainstorm.tool.js.map +0 -1
- package/dist/tools/timeout-test.tool.d.ts +0 -3
- package/dist/tools/timeout-test.tool.d.ts.map +0 -1
- package/dist/tools/timeout-test.tool.js +0 -32
- package/dist/tools/timeout-test.tool.js.map +0 -1
- package/dist/utils/brainstormPromptBuilder.d.ts +0 -11
- package/dist/utils/brainstormPromptBuilder.d.ts.map +0 -1
- package/dist/utils/brainstormPromptBuilder.js +0 -93
- package/dist/utils/brainstormPromptBuilder.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -14
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -56
- package/dist/utils/logger.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Osano AI - Multi CLI MCP
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@osanoai/multicli)
|
|
4
|
+
[](https://github.com/osanoai/multicli/actions/workflows/tests.yml)
|
|
5
|
+
[](https://github.com/osanoai/multicli/actions/workflows/scan.yml)
|
|
6
|
+
[](https://github.com/osanoai/multicli/releases/latest)
|
|
7
|
+
[](https://scorecard.dev/viewer/?uri=github.com/osanoai/multicli)
|
|
8
|
+
[](https://www.npmjs.com/package/@osanoai/multicli)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
|
|
3
11
|
**The AI collab no one asked for, but everyone needed.**
|
|
4
12
|
|
|
5
13
|
An MCP server that lets Claude, Gemini, and Codex call each other as tools. Because why argue about which AI is best when you can make them work together?
|
|
@@ -22,7 +30,7 @@ Multi-CLI sits between your AI clients and bridges them via the [Model Context P
|
|
|
22
30
|
|
|
23
31
|
## Prerequisites
|
|
24
32
|
|
|
25
|
-
You need **Node.js >=
|
|
33
|
+
You need **Node.js >= 20** and at least **two** of these CLIs installed:
|
|
26
34
|
|
|
27
35
|
| CLI | Install |
|
|
28
36
|
|-----|---------|
|
|
@@ -39,7 +47,7 @@ You need **Node.js >= 18** and at least **two** of these CLIs installed:
|
|
|
39
47
|
### Claude Code
|
|
40
48
|
|
|
41
49
|
```bash
|
|
42
|
-
claude mcp add
|
|
50
|
+
claude mcp add Multi-CLI -- npx -y @osanoai/multicli
|
|
43
51
|
```
|
|
44
52
|
|
|
45
53
|
That's it. Restart Claude Code and Gemini + Codex tools appear automatically.
|
|
@@ -52,9 +60,9 @@ Add to your config file (`~/Library/Application Support/Claude/claude_desktop_co
|
|
|
52
60
|
```json
|
|
53
61
|
{
|
|
54
62
|
"mcpServers": {
|
|
55
|
-
"
|
|
63
|
+
"Multi-CLI": {
|
|
56
64
|
"command": "npx",
|
|
57
|
-
"args": ["-y", "multicli
|
|
65
|
+
"args": ["-y", "@osanoai/multicli"]
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
}
|
|
@@ -68,7 +76,7 @@ Restart Claude Desktop completely after saving.
|
|
|
68
76
|
### Gemini CLI
|
|
69
77
|
|
|
70
78
|
```bash
|
|
71
|
-
gemini mcp add --scope user
|
|
79
|
+
gemini mcp add --scope user Multi-CLI npx -y @osanoai/multicli
|
|
72
80
|
```
|
|
73
81
|
|
|
74
82
|
Restart the Gemini CLI and Claude + Codex tools will be available.
|
|
@@ -79,9 +87,9 @@ Restart the Gemini CLI and Claude + Codex tools will be available.
|
|
|
79
87
|
```json
|
|
80
88
|
{
|
|
81
89
|
"mcpServers": {
|
|
82
|
-
"
|
|
90
|
+
"Multi-CLI": {
|
|
83
91
|
"command": "npx",
|
|
84
|
-
"args": ["-y", "multicli
|
|
92
|
+
"args": ["-y", "@osanoai/multicli"]
|
|
85
93
|
}
|
|
86
94
|
}
|
|
87
95
|
}
|
|
@@ -93,7 +101,7 @@ Restart the Gemini CLI and Claude + Codex tools will be available.
|
|
|
93
101
|
### Codex CLI
|
|
94
102
|
|
|
95
103
|
```bash
|
|
96
|
-
codex mcp add
|
|
104
|
+
codex mcp add Multi-CLI -- npx -y @osanoai/multicli
|
|
97
105
|
```
|
|
98
106
|
|
|
99
107
|
Restart Codex and Claude + Gemini tools will be available.
|
|
@@ -112,7 +120,7 @@ Where `mcp.json` contains:
|
|
|
112
120
|
"mcpServers": {
|
|
113
121
|
"Multi-CLI": {
|
|
114
122
|
"command": "npx",
|
|
115
|
-
"args": ["-y", "multicli"]
|
|
123
|
+
"args": ["-y", "@osanoai/multicli"]
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
}
|
|
@@ -126,7 +134,7 @@ Where `mcp.json` contains:
|
|
|
126
134
|
Multi-CLI uses standard stdio transport. If your client supports MCP, point it at:
|
|
127
135
|
|
|
128
136
|
```
|
|
129
|
-
npx -y multicli
|
|
137
|
+
npx -y @osanoai/multicli
|
|
130
138
|
```
|
|
131
139
|
|
|
132
140
|
---
|
|
@@ -193,8 +201,8 @@ which gemini && which codex && which claude
|
|
|
193
201
|
If only your own CLI is installed, Multi-CLI hides it (no self-calls). Install a *different* CLI to enable cross-model collaboration.
|
|
194
202
|
|
|
195
203
|
**MCP server not responding?**
|
|
196
|
-
1. Check that Node.js >=
|
|
197
|
-
2. Run `npx multicli` directly to see if it starts
|
|
204
|
+
1. Check that Node.js >= 20 is installed
|
|
205
|
+
2. Run `npx @osanoai/multicli` directly to see if it starts
|
|
198
206
|
3. Restart your AI client completely
|
|
199
207
|
|
|
200
208
|
## Development
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osanoai/multicli",
|
|
3
|
-
"version": "1.5.
|
|
4
|
-
"description": "MCP server for
|
|
3
|
+
"version": "1.5.3",
|
|
4
|
+
"description": "MCP server for Multiple CLI coding agent integration (Claude + Gemini + Codex)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
//# source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 -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
}
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=brainstorm-codex.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brainstorm-codex.tool.js","sourceRoot":"","sources":["../../src/tools/brainstorm-codex.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM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N,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,0CAA0C,WAAW,iBAAiB,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC;QAE3G,UAAU,EAAE,CAAC,cAAc,SAAS,cAAc,WAAW,iBAAiB,CAAC,CAAC;QAEhF,OAAO,MAAM,eAAe,CAAC,cAAc,EAAE,KAAe,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAClG,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,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,2GAA2G,CAAC;IAC9I,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,+NAA+N,CAAC;IAC3V,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAA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AmB;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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeout-test.tool.d.ts","sourceRoot":"","sources":["../../src/tools/timeout-test.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C,eAAO,MAAM,eAAe,EAAE,WA8B7B,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
const timeoutTestArgsSchema = z.object({
|
|
3
|
-
duration: z.number().min(10).describe("Duration in milliseconds (minimum 10ms)"),
|
|
4
|
-
});
|
|
5
|
-
export const timeoutTestTool = {
|
|
6
|
-
name: "timeout-test",
|
|
7
|
-
description: "Test timeout prevention by running for a specified duration",
|
|
8
|
-
zodSchema: timeoutTestArgsSchema,
|
|
9
|
-
prompt: {
|
|
10
|
-
description: "Test the timeout prevention system by running a long operation",
|
|
11
|
-
},
|
|
12
|
-
category: 'simple',
|
|
13
|
-
execute: async (args, onProgress) => {
|
|
14
|
-
const duration = args.duration;
|
|
15
|
-
const steps = Math.ceil(duration / 5000); // Progress every 5 seconds
|
|
16
|
-
const stepDuration = duration / steps;
|
|
17
|
-
const startTime = Date.now();
|
|
18
|
-
const results = [];
|
|
19
|
-
results.push(`Starting timeout test for ${duration}ms (${duration / 1000}s)`);
|
|
20
|
-
for (let i = 1; i <= steps; i++) {
|
|
21
|
-
await new Promise(resolve => setTimeout(resolve, stepDuration));
|
|
22
|
-
const elapsed = Date.now() - startTime;
|
|
23
|
-
results.push(`Step ${i}/${steps} completed - Elapsed: ${Math.round(elapsed / 1000)}s`);
|
|
24
|
-
}
|
|
25
|
-
const totalElapsed = Date.now() - startTime;
|
|
26
|
-
results.push(`\nTimeout test completed successfully!`);
|
|
27
|
-
results.push(`Target duration: ${duration}ms`);
|
|
28
|
-
results.push(`Actual duration: ${totalElapsed}ms`);
|
|
29
|
-
return results.join('\n');
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=timeout-test.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeout-test.tool.js","sourceRoot":"","sources":["../../src/tools/timeout-test.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,yCAAyC,CAAC;CACjF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,6DAA6D;IAC1E,SAAS,EAAE,qBAAqB;IAChC,MAAM,EAAE;QACN,WAAW,EAAE,gEAAgE;KAC9E;IACD,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAkB,CAAC;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,2BAA2B;QACrE,MAAM,YAAY,GAAG,QAAQ,GAAG,KAAK,CAAC;QACtC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,6BAA6B,QAAQ,OAAO,QAAQ,GAAC,IAAI,IAAI,CAAC,CAAC;QAE5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAChC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;YAChE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,yBAAyB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvF,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,oBAAoB,QAAQ,IAAI,CAAC,CAAC;QAC/C,OAAO,CAAC,IAAI,CAAC,oBAAoB,YAAY,IAAI,CAAC,CAAC;QAEnD,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface BrainstormArgs {
|
|
2
|
-
prompt: string;
|
|
3
|
-
methodology: string;
|
|
4
|
-
domain?: string;
|
|
5
|
-
constraints?: string;
|
|
6
|
-
existingContext?: string;
|
|
7
|
-
ideaCount: number;
|
|
8
|
-
includeAnalysis: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function buildBrainstormPrompt(args: BrainstormArgs): string;
|
|
11
|
-
//# sourceMappingURL=brainstormPromptBuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brainstormPromptBuilder.d.ts","sourceRoot":"","sources":["../../src/utils/brainstormPromptBuilder.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAsDD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAiDlE"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns methodology-specific instructions for structured brainstorming
|
|
3
|
-
*/
|
|
4
|
-
function getMethodologyInstructions(methodology, domain) {
|
|
5
|
-
const methodologies = {
|
|
6
|
-
'divergent': `**Divergent Thinking Approach:**
|
|
7
|
-
- Generate maximum quantity of ideas without self-censoring
|
|
8
|
-
- Build on wild or seemingly impractical ideas
|
|
9
|
-
- Combine unrelated concepts for unexpected solutions
|
|
10
|
-
- Use "Yes, and..." thinking to expand each concept
|
|
11
|
-
- Postpone evaluation until all ideas are generated`,
|
|
12
|
-
'convergent': `**Convergent Thinking Approach:**
|
|
13
|
-
- Focus on refining and improving existing concepts
|
|
14
|
-
- Synthesize related ideas into stronger solutions
|
|
15
|
-
- Apply critical evaluation criteria
|
|
16
|
-
- Prioritize based on feasibility and impact
|
|
17
|
-
- Develop implementation pathways for top ideas`,
|
|
18
|
-
'scamper': `**SCAMPER Creative Triggers:**
|
|
19
|
-
- **Substitute:** What can be substituted or replaced?
|
|
20
|
-
- **Combine:** What can be combined or merged?
|
|
21
|
-
- **Adapt:** What can be adapted from other domains?
|
|
22
|
-
- **Modify:** What can be magnified, minimized, or altered?
|
|
23
|
-
- **Put to other use:** How else can this be used?
|
|
24
|
-
- **Eliminate:** What can be removed or simplified?
|
|
25
|
-
- **Reverse:** What can be rearranged or reversed?`,
|
|
26
|
-
'design-thinking': `**Human-Centered Design Thinking:**
|
|
27
|
-
- **Empathize:** Consider user needs, pain points, and contexts
|
|
28
|
-
- **Define:** Frame problems from user perspective
|
|
29
|
-
- **Ideate:** Generate user-focused solutions
|
|
30
|
-
- **Consider Journey:** Think through complete user experience
|
|
31
|
-
- **Prototype Mindset:** Focus on testable, iterative concepts`,
|
|
32
|
-
'lateral': `**Lateral Thinking Approach:**
|
|
33
|
-
- Make unexpected connections between unrelated fields
|
|
34
|
-
- Challenge fundamental assumptions
|
|
35
|
-
- Use random word association to trigger new directions
|
|
36
|
-
- Apply metaphors and analogies from other domains
|
|
37
|
-
- Reverse conventional thinking patterns`,
|
|
38
|
-
'auto': `**AI-Optimized Approach:**
|
|
39
|
-
${domain ? `Given the ${domain} domain, I'll apply the most effective combination of:` : 'I\'ll intelligently combine multiple methodologies:'}
|
|
40
|
-
- Divergent exploration with domain-specific knowledge
|
|
41
|
-
- SCAMPER triggers and lateral thinking
|
|
42
|
-
- Human-centered perspective for practical value`
|
|
43
|
-
};
|
|
44
|
-
return methodologies[methodology] || methodologies['auto'];
|
|
45
|
-
}
|
|
46
|
-
export function buildBrainstormPrompt(args) {
|
|
47
|
-
const { prompt, methodology, domain, constraints, existingContext, ideaCount, includeAnalysis } = args;
|
|
48
|
-
const frameworkInstructions = getMethodologyInstructions(methodology, domain);
|
|
49
|
-
const enhancedPrompt = `# BRAINSTORMING SESSION
|
|
50
|
-
|
|
51
|
-
## Core Challenge
|
|
52
|
-
${prompt}
|
|
53
|
-
|
|
54
|
-
## Methodology Framework
|
|
55
|
-
${frameworkInstructions}
|
|
56
|
-
|
|
57
|
-
## Context Engineering
|
|
58
|
-
*Use the following context to inform your reasoning:*
|
|
59
|
-
${domain ? `**Domain Focus:** ${domain} - Apply domain-specific knowledge, terminology, and best practices.` : ''}
|
|
60
|
-
${constraints ? `**Constraints & Boundaries:** ${constraints}` : ''}
|
|
61
|
-
${existingContext ? `**Background Context:** ${existingContext}` : ''}
|
|
62
|
-
|
|
63
|
-
## Output Requirements
|
|
64
|
-
- Generate ${ideaCount} distinct, creative ideas
|
|
65
|
-
- Each idea should be unique and non-obvious
|
|
66
|
-
- Focus on actionable, implementable concepts
|
|
67
|
-
- Use clear, descriptive naming
|
|
68
|
-
- Provide brief explanations for each idea
|
|
69
|
-
|
|
70
|
-
${includeAnalysis ? `
|
|
71
|
-
## Analysis Framework
|
|
72
|
-
For each idea, provide:
|
|
73
|
-
- **Feasibility:** Implementation difficulty (1-5 scale)
|
|
74
|
-
- **Impact:** Potential value/benefit (1-5 scale)
|
|
75
|
-
- **Innovation:** Uniqueness/creativity (1-5 scale)
|
|
76
|
-
- **Quick Assessment:** One-sentence evaluation
|
|
77
|
-
` : ''}
|
|
78
|
-
|
|
79
|
-
## Format
|
|
80
|
-
Present ideas in a structured format:
|
|
81
|
-
|
|
82
|
-
### Idea [N]: [Creative Name]
|
|
83
|
-
**Description:** [2-3 sentence explanation]
|
|
84
|
-
${includeAnalysis ? '**Feasibility:** [1-5] | **Impact:** [1-5] | **Innovation:** [1-5]\n**Assessment:** [Brief evaluation]' : ''}
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
**Before finalizing, review the list: remove near-duplicates and ensure each idea satisfies the constraints.**
|
|
89
|
-
|
|
90
|
-
Begin brainstorming session:`;
|
|
91
|
-
return enhancedPrompt;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=brainstormPromptBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brainstormPromptBuilder.js","sourceRoot":"","sources":["../../src/utils/brainstormPromptBuilder.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,SAAS,0BAA0B,CAAC,WAAmB,EAAE,MAAe;IACtE,MAAM,aAAa,GAA2B;QAC5C,WAAW,EAAE;;;;;oDAKmC;QAEhD,YAAY,EAAE;;;;;gDAK8B;QAE5C,SAAS,EAAE;;;;;;;mDAOoC;QAE/C,iBAAiB,EAAE;;;;;+DAKwC;QAE3D,SAAS,EAAE;;;;;yCAK0B;QAErC,MAAM,EAAE;EACV,MAAM,CAAC,CAAC,CAAC,aAAa,MAAM,wDAAwD,CAAC,CAAC,CAAC,qDAAqD;;;iDAG7F;KAC9C,CAAC;IAEF,OAAO,aAAa,CAAC,WAAW,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAoB;IACxD,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAEvG,MAAM,qBAAqB,GAAG,0BAA0B,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAE9E,MAAM,cAAc,GAAG;;;EAGvB,MAAM;;;EAGN,qBAAqB;;;;EAIrB,MAAM,CAAC,CAAC,CAAC,qBAAqB,MAAM,sEAAsE,CAAC,CAAC,CAAC,EAAE;EAC/G,WAAW,CAAC,CAAC,CAAC,iCAAiC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;EACjE,eAAe,CAAC,CAAC,CAAC,2BAA2B,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE;;;aAGxD,SAAS;;;;;;EAMpB,eAAe,CAAC,CAAC,CAAC;;;;;;;CAOnB,CAAC,CAAC,CAAC,EAAE;;;;;;;EAOJ,eAAe,CAAC,CAAC,CAAC,wGAAwG,CAAC,CAAC,CAAC,EAAE;;;;;;6BAMpG,CAAC;IAE5B,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare class Logger {
|
|
2
|
-
private static formatMessage;
|
|
3
|
-
private static writeToFile;
|
|
4
|
-
static log(message: string, ...args: any[]): void;
|
|
5
|
-
static warn(message: string, ...args: any[]): void;
|
|
6
|
-
static error(message: string, ...args: any[]): void;
|
|
7
|
-
static debug(message: string, ...args: any[]): void;
|
|
8
|
-
static toolInvocation(toolName: string, args: any): void;
|
|
9
|
-
static toolParsedArgs(prompt: string, model?: string, sandbox?: boolean, changeMode?: boolean): void;
|
|
10
|
-
static commandExecution(command: string, args: string[], startTime: number): void;
|
|
11
|
-
private static _commandStartTimes;
|
|
12
|
-
static commandComplete(startTime: number, exitCode: number | null, outputLength?: number): void;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAKA,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B,OAAO,CAAC,MAAM,CAAC,WAAW;IAY1B,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAKjD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAKlD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAKnD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAKnD,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAIxD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI;IAIpG,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAKjF,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAA6E;IAE9G,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI;CAQhG"}
|
package/dist/utils/logger.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { appendFileSync } from "fs";
|
|
2
|
-
import { LOG_PREFIX } from "../constants.js";
|
|
3
|
-
const LOG_FILE = "/tmp/multicli-mcp.log";
|
|
4
|
-
export class Logger {
|
|
5
|
-
static formatMessage(message) {
|
|
6
|
-
return `${LOG_PREFIX} ${message}`;
|
|
7
|
-
}
|
|
8
|
-
static writeToFile(level, message, args) {
|
|
9
|
-
const timestamp = new Date().toISOString();
|
|
10
|
-
const extra = args.length > 0
|
|
11
|
-
? ' ' + args.map(a => typeof a === 'string' ? a : JSON.stringify(a)).join(' ')
|
|
12
|
-
: '';
|
|
13
|
-
try {
|
|
14
|
-
appendFileSync(LOG_FILE, `${timestamp} [${level}] ${message}${extra}\n`);
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
// If file write fails, don't crash the server
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
static log(message, ...args) {
|
|
21
|
-
const formatted = this.formatMessage(message);
|
|
22
|
-
this.writeToFile("LOG", formatted, args);
|
|
23
|
-
}
|
|
24
|
-
static warn(message, ...args) {
|
|
25
|
-
const formatted = this.formatMessage(message);
|
|
26
|
-
this.writeToFile("WARN", formatted, args);
|
|
27
|
-
}
|
|
28
|
-
static error(message, ...args) {
|
|
29
|
-
const formatted = this.formatMessage(message);
|
|
30
|
-
this.writeToFile("ERROR", formatted, args);
|
|
31
|
-
}
|
|
32
|
-
static debug(message, ...args) {
|
|
33
|
-
const formatted = this.formatMessage(message);
|
|
34
|
-
this.writeToFile("DEBUG", formatted, args);
|
|
35
|
-
}
|
|
36
|
-
static toolInvocation(toolName, args) {
|
|
37
|
-
this.warn("Raw: " + JSON.stringify(args, null, 2));
|
|
38
|
-
}
|
|
39
|
-
static toolParsedArgs(prompt, model, sandbox, changeMode) {
|
|
40
|
-
this.warn(`Parsed prompt: "${prompt}"\nchangeMode: ${changeMode || false}`);
|
|
41
|
-
}
|
|
42
|
-
static commandExecution(command, args, startTime) {
|
|
43
|
-
this.warn(`[${startTime}] Starting: ${command} ${args.map((arg) => `"${arg}"`).join(" ")}`);
|
|
44
|
-
this._commandStartTimes.set(startTime, { command, args, startTime });
|
|
45
|
-
}
|
|
46
|
-
static _commandStartTimes = new Map();
|
|
47
|
-
static commandComplete(startTime, exitCode, outputLength) {
|
|
48
|
-
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
49
|
-
this.warn(`[${elapsed}s] Process finished with exit code: ${exitCode}`);
|
|
50
|
-
if (outputLength !== undefined) {
|
|
51
|
-
this.warn(`Response: ${outputLength} chars`);
|
|
52
|
-
}
|
|
53
|
-
this._commandStartTimes.delete(startTime);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=logger.js.map
|
package/dist/utils/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,QAAQ,GAAG,uBAAuB,CAAC;AAEzC,MAAM,OAAO,MAAM;IACT,MAAM,CAAC,aAAa,CAAC,OAAe;QAC1C,OAAO,GAAG,UAAU,IAAI,OAAO,EAAE,CAAC;IACpC,CAAC;IAEO,MAAM,CAAC,WAAW,CAAC,KAAa,EAAE,OAAe,EAAE,IAAW;QACpE,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,IA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