overmind-mcp 2.3.4 → 2.4.1
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 +80 -107
- package/assets/overmind_mcp_pro_banner_v3.png +0 -0
- package/dist/bin/cli.js +7 -438
- package/dist/bin/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +1 -31
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +27 -19
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/sessions.d.ts +2 -3
- package/dist/lib/sessions.d.ts.map +1 -1
- package/dist/lib/sessions.js +25 -94
- package/dist/lib/sessions.js.map +1 -1
- package/dist/memory/MemoryFactory.d.ts +1 -15
- package/dist/memory/MemoryFactory.d.ts.map +1 -1
- package/dist/memory/MemoryFactory.js +3 -53
- package/dist/memory/MemoryFactory.js.map +1 -1
- package/dist/memory/PostgresMemoryProvider.d.ts +0 -7
- package/dist/memory/PostgresMemoryProvider.d.ts.map +1 -1
- package/dist/memory/PostgresMemoryProvider.js +105 -180
- package/dist/memory/PostgresMemoryProvider.js.map +1 -1
- package/dist/server.d.ts +0 -41
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +26 -152
- package/dist/server.js.map +1 -1
- package/dist/services/AgentManager.d.ts.map +1 -1
- package/dist/services/AgentManager.js +11 -67
- package/dist/services/AgentManager.js.map +1 -1
- package/dist/services/ClaudeRunner.d.ts +0 -8
- package/dist/services/ClaudeRunner.d.ts.map +1 -1
- package/dist/services/ClaudeRunner.js +213 -514
- package/dist/services/ClaudeRunner.js.map +1 -1
- package/dist/services/ClineRunner.d.ts +0 -7
- package/dist/services/ClineRunner.d.ts.map +1 -1
- package/dist/services/ClineRunner.js +11 -80
- package/dist/services/ClineRunner.js.map +1 -1
- package/dist/services/GeminiRunner.d.ts +0 -6
- package/dist/services/GeminiRunner.d.ts.map +1 -1
- package/dist/services/GeminiRunner.js +58 -285
- package/dist/services/GeminiRunner.js.map +1 -1
- package/dist/services/KiloRunner.d.ts +0 -12
- package/dist/services/KiloRunner.d.ts.map +1 -1
- package/dist/services/KiloRunner.js +57 -441
- package/dist/services/KiloRunner.js.map +1 -1
- package/dist/services/OpenClawRunner.d.ts +0 -7
- package/dist/services/OpenClawRunner.d.ts.map +1 -1
- package/dist/services/OpenClawRunner.js +11 -79
- package/dist/services/OpenClawRunner.js.map +1 -1
- package/dist/services/OpenCodeRunner.d.ts +0 -7
- package/dist/services/OpenCodeRunner.d.ts.map +1 -1
- package/dist/services/OpenCodeRunner.js +11 -79
- package/dist/services/OpenCodeRunner.js.map +1 -1
- package/dist/services/QwenRunner.d.ts +19 -0
- package/dist/services/QwenRunner.d.ts.map +1 -0
- package/dist/services/QwenRunner.js +87 -0
- package/dist/services/QwenRunner.js.map +1 -0
- package/dist/services/TraeRunner.d.ts +19 -0
- package/dist/services/TraeRunner.d.ts.map +1 -0
- package/dist/services/TraeRunner.js +88 -0
- package/dist/services/TraeRunner.js.map +1 -0
- package/dist/tools/config_example.d.ts +4 -7
- package/dist/tools/config_example.d.ts.map +1 -1
- package/dist/tools/config_example.js +86 -191
- package/dist/tools/config_example.js.map +1 -1
- package/dist/tools/create_agent.d.ts +9 -15
- package/dist/tools/create_agent.d.ts.map +1 -1
- package/dist/tools/create_agent.js +9 -8
- package/dist/tools/create_agent.js.map +1 -1
- package/dist/tools/get_agent_configs.d.ts +4 -10
- package/dist/tools/get_agent_configs.d.ts.map +1 -1
- package/dist/tools/get_agent_configs.js.map +1 -1
- package/dist/tools/manage_agents.d.ts +18 -36
- package/dist/tools/manage_agents.d.ts.map +1 -1
- package/dist/tools/manage_agents.js +2 -2
- package/dist/tools/manage_agents.js.map +1 -1
- package/dist/tools/manage_prompts.d.ts +8 -13
- package/dist/tools/manage_prompts.d.ts.map +1 -1
- package/dist/tools/manage_prompts.js.map +1 -1
- package/dist/tools/memory_runs.d.ts +4 -3
- package/dist/tools/memory_runs.d.ts.map +1 -1
- package/dist/tools/memory_runs.js.map +1 -1
- package/dist/tools/memory_search.d.ts +4 -3
- package/dist/tools/memory_search.d.ts.map +1 -1
- package/dist/tools/memory_search.js.map +1 -1
- package/dist/tools/memory_store.d.ts +5 -11
- package/dist/tools/memory_store.d.ts.map +1 -1
- package/dist/tools/memory_store.js.map +1 -1
- package/dist/tools/run_agent.d.ts +16 -15
- package/dist/tools/run_agent.d.ts.map +1 -1
- package/dist/tools/run_agent.js +160 -128
- package/dist/tools/run_agent.js.map +1 -1
- package/dist/tools/run_claude.d.ts +3 -8
- package/dist/tools/run_claude.d.ts.map +1 -1
- package/dist/tools/run_claude.js +41 -59
- package/dist/tools/run_claude.js.map +1 -1
- package/dist/tools/run_cline.d.ts +4 -13
- package/dist/tools/run_cline.d.ts.map +1 -1
- package/dist/tools/run_cline.js +43 -55
- package/dist/tools/run_cline.js.map +1 -1
- package/dist/tools/run_gemini.d.ts +4 -13
- package/dist/tools/run_gemini.d.ts.map +1 -1
- package/dist/tools/run_gemini.js +33 -53
- package/dist/tools/run_gemini.js.map +1 -1
- package/dist/tools/run_kilo.d.ts +7 -17
- package/dist/tools/run_kilo.d.ts.map +1 -1
- package/dist/tools/run_kilo.js +41 -68
- package/dist/tools/run_kilo.js.map +1 -1
- package/dist/tools/run_openclaw.d.ts +4 -13
- package/dist/tools/run_openclaw.d.ts.map +1 -1
- package/dist/tools/run_openclaw.js +44 -52
- package/dist/tools/run_openclaw.js.map +1 -1
- package/dist/tools/run_opencode.d.ts +4 -13
- package/dist/tools/run_opencode.d.ts.map +1 -1
- package/dist/tools/run_opencode.js +39 -52
- package/dist/tools/run_opencode.js.map +1 -1
- package/dist/tools/run_qwen.d.ts +15 -0
- package/dist/tools/run_qwen.d.ts.map +1 -0
- package/dist/tools/run_qwen.js +61 -0
- package/dist/tools/run_qwen.js.map +1 -0
- package/dist/tools/run_trae.d.ts +15 -0
- package/dist/tools/run_trae.d.ts.map +1 -0
- package/dist/tools/run_trae.js +66 -0
- package/dist/tools/run_trae.js.map +1 -0
- package/dist/tools/shell_execute.d.ts +10 -0
- package/dist/tools/shell_execute.d.ts.map +1 -0
- package/dist/tools/shell_execute.js +24 -0
- package/dist/tools/shell_execute.js.map +1 -0
- package/package.json +25 -55
- package/.mcp.json.example +0 -21
- package/assets/overmind.png +0 -0
- package/bin/.gitkeep +0 -0
- package/bin/README.md +0 -34
- package/bin/install-overmind-unix.sh +0 -412
- package/bin/install-overmind-windows.bat +0 -407
- package/docs/README.md +0 -128
- package/docs/agent_control.md +0 -656
- package/docs/index.html +0 -493
- package/docs/library.html +0 -239
- package/docs/prompt.html +0 -1212
- package/docs/script.js +0 -428
- package/docs/styles.css +0 -2816
- package/scripts/auto-changelog.mjs +0 -132
- package/scripts/auto-install.mjs +0 -322
- package/scripts/install-dependencies.mjs +0 -462
- package/scripts/postgres-manager.mjs +0 -219
- package/scripts/postinstall.mjs +0 -538
- package/scripts/setup-overmind-db.mjs +0 -199
- package/scripts/setup-windows.js +0 -266
- package/scripts/setup.mjs +0 -397
- package/scripts/test-installation.mjs +0 -158
- package/scripts/uninstall.mjs +0 -238
package/dist/tools/run_kilo.js
CHANGED
|
@@ -1,91 +1,64 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { KiloRunner } from '../services/KiloRunner.js';
|
|
3
3
|
import { storeRun } from '../memory/MemoryFactory.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
export const runKiloSchema = z.object({
|
|
5
|
+
prompt: z.string().describe("Le prompt à envoyer à l'agent Kilocode"),
|
|
6
|
+
mode: z
|
|
7
|
+
.enum(['code', 'architect', 'ask', 'debug', 'orchestrator'])
|
|
8
|
+
.optional()
|
|
9
|
+
.describe('Mode de Kilocode : code (défaut), architect, ask, debug, orchestrator'),
|
|
10
|
+
sessionId: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe('ID de session pour continuer une conversation (manuel)'),
|
|
14
|
+
agentName: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Nom de l'agent (pour logging/monitoring et persistance)"),
|
|
18
|
+
autoResume: z
|
|
19
|
+
.boolean()
|
|
20
|
+
.optional()
|
|
21
|
+
.default(false)
|
|
22
|
+
.describe('Si true (et agentName fourni), reprend automatiquement la dernière conversation de cet agent'),
|
|
23
|
+
});
|
|
19
24
|
export async function runKiloAgent(args) {
|
|
20
25
|
const runner = new KiloRunner();
|
|
21
|
-
const { prompt, agentName, autoResume, sessionId, mode
|
|
22
|
-
const finalPath = argPath || getWorkspaceDir();
|
|
23
|
-
const finalConfig = argConfig || getWorkspaceDir();
|
|
26
|
+
const { prompt, agentName, autoResume, sessionId, mode } = args;
|
|
24
27
|
const start = Date.now();
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
const result = await runner.runAgent({ prompt, agentName, autoResume, sessionId, mode });
|
|
29
|
+
const durationMs = Date.now() - start;
|
|
30
|
+
// Auto-instrumentation
|
|
31
|
+
storeRun({
|
|
32
|
+
runner: 'kilo',
|
|
27
33
|
agentName,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
silent,
|
|
34
|
+
prompt,
|
|
35
|
+
result: result.result,
|
|
36
|
+
error: result.error,
|
|
37
|
+
durationMs,
|
|
38
|
+
success: !result.error,
|
|
39
|
+
sessionId: result.sessionId,
|
|
35
40
|
});
|
|
36
|
-
if (result.error
|
|
37
|
-
result.error?.includes('EXIT_CODE_1') ||
|
|
38
|
-
result.error === 'JSON_PARSE_ERROR') {
|
|
39
|
-
if (agentName)
|
|
40
|
-
await deleteSessionId(agentName, finalConfig, 'kilo');
|
|
41
|
-
result = await runner.runAgent({
|
|
42
|
-
prompt,
|
|
43
|
-
agentName,
|
|
44
|
-
autoResume: false,
|
|
45
|
-
sessionId: undefined,
|
|
46
|
-
mode,
|
|
47
|
-
model,
|
|
48
|
-
cwd: finalPath,
|
|
49
|
-
configPath: finalConfig,
|
|
50
|
-
silent,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const durationMs = Date.now() - start;
|
|
54
|
-
try {
|
|
55
|
-
await storeRun({
|
|
56
|
-
runner: 'kilo',
|
|
57
|
-
agentName,
|
|
58
|
-
prompt,
|
|
59
|
-
result: result.result,
|
|
60
|
-
error: result.error,
|
|
61
|
-
durationMs,
|
|
62
|
-
success: !result.error,
|
|
63
|
-
sessionId: result.sessionId,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
catch (e) {
|
|
67
|
-
console.error(`[run_kilo] ⚠️ Memory store failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
68
|
-
}
|
|
69
|
-
if (result.error?.startsWith('INVALID_AGENT')) {
|
|
41
|
+
if (result.error === 'INVALID_AGENT') {
|
|
70
42
|
return {
|
|
71
|
-
content: [
|
|
43
|
+
content: [
|
|
44
|
+
{
|
|
45
|
+
type: 'text',
|
|
46
|
+
text: `❌ **Erreur Configuration Agent**\n\nL'agent '${agentName}' est introuvable ou mal configuré.\n\n💡 **Solution:**\nUtilisez l'outil \`create_agent\` pour créer cet agent avant de l'exécuter.`,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
72
49
|
isError: true,
|
|
73
50
|
};
|
|
74
51
|
}
|
|
75
52
|
if (result.error) {
|
|
76
53
|
return {
|
|
77
|
-
content: [{ type: 'text', text: `❌ Erreur
|
|
54
|
+
content: [{ type: 'text', text: `❌ Erreur lors de l'exécution Kilocode: ${result.error}` }],
|
|
78
55
|
isError: true,
|
|
79
56
|
};
|
|
80
57
|
}
|
|
81
58
|
return {
|
|
82
59
|
content: [
|
|
83
60
|
{ type: 'text', text: result.result },
|
|
84
|
-
|
|
85
|
-
? [{ type: 'text', text: `SESSION_ID: ${result.sessionId}` }]
|
|
86
|
-
: []),
|
|
87
|
-
// ...(result.model ? [{ type: 'text' as const, text: `MODEL: ${result.model}` }] : []),
|
|
88
|
-
// ...(result.nickname ? [{ type: 'text' as const, text: `USING: ${result.nickname}` }] : []),
|
|
61
|
+
{ type: 'text', text: `RAW: ${result.rawOutput}` },
|
|
89
62
|
],
|
|
90
63
|
};
|
|
91
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_kilo.js","sourceRoot":"","sources":["../../src/tools/run_kilo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"run_kilo.js","sourceRoot":"","sources":["../../src/tools/run_kilo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IACrE,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;SAC3D,QAAQ,EAAE;SACV,QAAQ,CAAC,uEAAuE,CAAC;IACpF,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,wDAAwD,CAAC;IACrE,SAAS,EAAE,CAAC;SACT,MAA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AAE,0CAA0C,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;YAC3F,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;YACrC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,MAAM,CAAC,SAAS,EAAE,EAAE;SACnD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -4,21 +4,12 @@ export declare const runOpenClawSchema: z.ZodObject<{
|
|
|
4
4
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
5
5
|
agentName: z.ZodOptional<z.ZodString>;
|
|
6
6
|
autoResume: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
-
path: z.ZodOptional<z.ZodString>;
|
|
8
|
-
config: z.ZodOptional<z.ZodString>;
|
|
9
|
-
silent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
10
7
|
}, z.core.$strip>;
|
|
11
8
|
export declare function runOpenClawAgent(args: z.infer<typeof runOpenClawSchema>): Promise<{
|
|
12
|
-
content: {
|
|
13
|
-
type:
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: 'text';
|
|
14
11
|
text: string;
|
|
15
|
-
}
|
|
16
|
-
isError
|
|
17
|
-
} | {
|
|
18
|
-
content: {
|
|
19
|
-
type: "text";
|
|
20
|
-
text: string;
|
|
21
|
-
}[];
|
|
22
|
-
isError?: undefined;
|
|
12
|
+
}>;
|
|
13
|
+
isError?: boolean;
|
|
23
14
|
}>;
|
|
24
15
|
//# sourceMappingURL=run_openclaw.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_openclaw.d.ts","sourceRoot":"","sources":["../../src/tools/run_openclaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"run_openclaw.d.ts","sourceRoot":"","sources":["../../src/tools/run_openclaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;iBAiB5B,CAAC;AAEH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GAAG,OAAO,CAAC;IACvF,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CAkDD"}
|
|
@@ -1,73 +1,65 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OpenClawRunner } from '../services/OpenClawRunner.js';
|
|
3
3
|
import { storeRun } from '../memory/MemoryFactory.js';
|
|
4
|
-
import { getWorkspaceDir } from '../lib/config.js';
|
|
5
|
-
import { deleteSessionId } from '../lib/sessions.js';
|
|
6
4
|
export const runOpenClawSchema = z.object({
|
|
7
5
|
prompt: z.string().describe("Le prompt à envoyer à l'agent OpenClaw"),
|
|
8
|
-
sessionId: z
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
sessionId: z
|
|
7
|
+
.string()
|
|
8
|
+
.optional()
|
|
9
|
+
.describe('ID de session pour continuer une conversation (manuel)'),
|
|
10
|
+
agentName: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Nom de l'agent (pour logging/monitoring et persistance)"),
|
|
14
|
+
autoResume: z
|
|
15
|
+
.boolean()
|
|
16
|
+
.optional()
|
|
17
|
+
.default(false)
|
|
18
|
+
.describe('Si true (et agentName fourni), reprend automatiquement la dernière conversation de cet agent'),
|
|
14
19
|
});
|
|
15
20
|
export async function runOpenClawAgent(args) {
|
|
16
21
|
const runner = new OpenClawRunner();
|
|
17
|
-
const { prompt, agentName, autoResume, sessionId
|
|
18
|
-
const finalPath = argPath || getWorkspaceDir();
|
|
19
|
-
const finalConfig = argConfig || getWorkspaceDir();
|
|
22
|
+
const { prompt, agentName, autoResume, sessionId } = args;
|
|
20
23
|
const start = Date.now();
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
const result = await runner.runAgent({ prompt, agentName, autoResume, sessionId });
|
|
25
|
+
const durationMs = Date.now() - start;
|
|
26
|
+
// Auto-instrumentation
|
|
27
|
+
storeRun({
|
|
28
|
+
runner: 'openclaw',
|
|
23
29
|
agentName,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
prompt,
|
|
31
|
+
result: result.result,
|
|
32
|
+
error: result.error,
|
|
33
|
+
durationMs,
|
|
34
|
+
success: !result.error,
|
|
35
|
+
sessionId: result.sessionId,
|
|
29
36
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
configPath: finalConfig,
|
|
41
|
-
silent,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
const durationMs = Date.now() - start;
|
|
45
|
-
try {
|
|
46
|
-
await storeRun({
|
|
47
|
-
runner: 'openclaw',
|
|
48
|
-
agentName,
|
|
49
|
-
prompt,
|
|
50
|
-
result: result.result,
|
|
51
|
-
error: result.error,
|
|
52
|
-
durationMs,
|
|
53
|
-
success: !result.error,
|
|
54
|
-
sessionId: result.sessionId,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
catch (e) {
|
|
58
|
-
console.error(`[run_openclaw] ⚠️ Memory store failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
37
|
+
if (result.error === 'INVALID_AGENT') {
|
|
38
|
+
return {
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'text',
|
|
42
|
+
text: `❌ **Erreur Configuration Agent**\n\nL'agent '${agentName}' est introuvable ou mal configuré.\n\n💡 **Solution:**\nUtilisez l'outil \`create_agent\` pour créer cet agent avant de l'exécuter.`,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
isError: true,
|
|
46
|
+
};
|
|
59
47
|
}
|
|
60
|
-
if (result.error)
|
|
48
|
+
if (result.error) {
|
|
61
49
|
return {
|
|
62
|
-
content: [
|
|
50
|
+
content: [
|
|
51
|
+
{
|
|
52
|
+
type: 'text',
|
|
53
|
+
text: `❌ Erreur lors de l'exécution OpenClaw: ${result.error}\n\n⚡ _L'OverMind surveille les OpenClaw qui n'obéissent pas._`,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
63
56
|
isError: true,
|
|
64
57
|
};
|
|
58
|
+
}
|
|
65
59
|
return {
|
|
66
60
|
content: [
|
|
67
61
|
{ type: 'text', text: result.result },
|
|
68
|
-
|
|
69
|
-
? [{ type: 'text', text: `SESSION_ID: ${result.sessionId}` }]
|
|
70
|
-
: []),
|
|
62
|
+
{ type: 'text', text: `RAW: ${result.rawOutput}` },
|
|
71
63
|
],
|
|
72
64
|
};
|
|
73
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_openclaw.js","sourceRoot":"","sources":["../../src/tools/run_openclaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"run_openclaw.js","sourceRoot":"","sources":["../../src/tools/run_openclaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD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oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,gDAAgD,SAAS,sIAAsI;iBACtM;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,0CAA0C,MAAM,CAAC,KAAK,gEAAgE;iBAC7H;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;YACrC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,MAAM,CAAC,SAAS,EAAE,EAAE;SACnD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -4,21 +4,12 @@ export declare const runOpenCodeSchema: z.ZodObject<{
|
|
|
4
4
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
5
5
|
agentName: z.ZodOptional<z.ZodString>;
|
|
6
6
|
autoResume: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
-
path: z.ZodOptional<z.ZodString>;
|
|
8
|
-
config: z.ZodOptional<z.ZodString>;
|
|
9
|
-
silent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
10
7
|
}, z.core.$strip>;
|
|
11
8
|
export declare function runOpenCodeAgent(args: z.infer<typeof runOpenCodeSchema>): Promise<{
|
|
12
|
-
content: {
|
|
13
|
-
type:
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: 'text';
|
|
14
11
|
text: string;
|
|
15
|
-
}
|
|
16
|
-
isError
|
|
17
|
-
} | {
|
|
18
|
-
content: {
|
|
19
|
-
type: "text";
|
|
20
|
-
text: string;
|
|
21
|
-
}[];
|
|
22
|
-
isError?: undefined;
|
|
12
|
+
}>;
|
|
13
|
+
isError?: boolean;
|
|
23
14
|
}>;
|
|
24
15
|
//# sourceMappingURL=run_opencode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_opencode.d.ts","sourceRoot":"","sources":["../../src/tools/run_opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"run_opencode.d.ts","sourceRoot":"","sources":["../../src/tools/run_opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;iBAiB5B,CAAC;AAEH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GAAG,OAAO,CAAC;IACvF,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CA6CD"}
|
|
@@ -1,73 +1,60 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OpenCodeRunner } from '../services/OpenCodeRunner.js';
|
|
3
3
|
import { storeRun } from '../memory/MemoryFactory.js';
|
|
4
|
-
import { getWorkspaceDir } from '../lib/config.js';
|
|
5
|
-
import { deleteSessionId } from '../lib/sessions.js';
|
|
6
4
|
export const runOpenCodeSchema = z.object({
|
|
7
5
|
prompt: z.string().describe("Le prompt à envoyer à l'agent OpenCode"),
|
|
8
|
-
sessionId: z
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
sessionId: z
|
|
7
|
+
.string()
|
|
8
|
+
.optional()
|
|
9
|
+
.describe('ID de session pour continuer une conversation (manuel)'),
|
|
10
|
+
agentName: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Nom de l'agent (pour logging/monitoring et persistance)"),
|
|
14
|
+
autoResume: z
|
|
15
|
+
.boolean()
|
|
16
|
+
.optional()
|
|
17
|
+
.default(false)
|
|
18
|
+
.describe('Si true (et agentName fourni), reprend automatiquement la dernière conversation de cet agent'),
|
|
14
19
|
});
|
|
15
20
|
export async function runOpenCodeAgent(args) {
|
|
16
21
|
const runner = new OpenCodeRunner();
|
|
17
|
-
const { prompt, agentName, autoResume, sessionId
|
|
18
|
-
const finalPath = argPath || getWorkspaceDir();
|
|
19
|
-
const finalConfig = argConfig || getWorkspaceDir();
|
|
22
|
+
const { prompt, agentName, autoResume, sessionId } = args;
|
|
20
23
|
const start = Date.now();
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
const result = await runner.runAgent({ prompt, agentName, autoResume, sessionId });
|
|
25
|
+
const durationMs = Date.now() - start;
|
|
26
|
+
// Auto-instrumentation
|
|
27
|
+
storeRun({
|
|
28
|
+
runner: 'opencode',
|
|
23
29
|
agentName,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
prompt,
|
|
31
|
+
result: result.result,
|
|
32
|
+
error: result.error,
|
|
33
|
+
durationMs,
|
|
34
|
+
success: !result.error,
|
|
35
|
+
sessionId: result.sessionId,
|
|
29
36
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
configPath: finalConfig,
|
|
41
|
-
silent,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
const durationMs = Date.now() - start;
|
|
45
|
-
try {
|
|
46
|
-
await storeRun({
|
|
47
|
-
runner: 'opencode',
|
|
48
|
-
agentName,
|
|
49
|
-
prompt,
|
|
50
|
-
result: result.result,
|
|
51
|
-
error: result.error,
|
|
52
|
-
durationMs,
|
|
53
|
-
success: !result.error,
|
|
54
|
-
sessionId: result.sessionId,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
catch (e) {
|
|
58
|
-
console.error(`[run_opencode] ⚠️ Memory store failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
37
|
+
if (result.error === 'INVALID_AGENT') {
|
|
38
|
+
return {
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'text',
|
|
42
|
+
text: `❌ **Erreur Configuration Agent**\n\nL'agent '${agentName}' est introuvable ou mal configuré.\n\n💡 **Solution:**\nUtilisez l'outil \`create_agent\` pour créer cet agent avant de l'exécuter.`,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
isError: true,
|
|
46
|
+
};
|
|
59
47
|
}
|
|
60
|
-
if (result.error)
|
|
48
|
+
if (result.error) {
|
|
61
49
|
return {
|
|
62
|
-
content: [{ type: 'text', text: `❌ Erreur OpenCode: ${result.error}` }],
|
|
50
|
+
content: [{ type: 'text', text: `❌ Erreur lors de l'exécution OpenCode: ${result.error}` }],
|
|
63
51
|
isError: true,
|
|
64
52
|
};
|
|
53
|
+
}
|
|
65
54
|
return {
|
|
66
55
|
content: [
|
|
67
56
|
{ type: 'text', text: result.result },
|
|
68
|
-
|
|
69
|
-
? [{ type: 'text', text: `SESSION_ID: ${result.sessionId}` }]
|
|
70
|
-
: []),
|
|
57
|
+
{ type: 'text', text: `RAW: ${result.rawOutput}` },
|
|
71
58
|
],
|
|
72
59
|
};
|
|
73
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_opencode.js","sourceRoot":"","sources":["../../src/tools/run_opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"run_opencode.js","sourceRoot":"","sources":["../../src/tools/run_opencode.ts"],"names":[],"m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MAAM,CAAC,KAAK;QACtB,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,KAAK,KAAK,eAAe,EAAE,CAAC;QACrC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,gDAAgD,SAAS,sIAAsI;iBACtM;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0CAA0C,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;YAC3F,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;YACrC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,MAAM,CAAC,SAAS,EAAE,EAAE;SACnD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const runQwenSchema: z.ZodObject<{
|
|
3
|
+
prompt: z.ZodString;
|
|
4
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
5
|
+
agentName: z.ZodOptional<z.ZodString>;
|
|
6
|
+
autoResume: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare function runQwenAgent(args: z.infer<typeof runQwenSchema>): Promise<{
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: 'text';
|
|
11
|
+
text: string;
|
|
12
|
+
}>;
|
|
13
|
+
isError?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=run_qwen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run_qwen.d.ts","sourceRoot":"","sources":["../../src/tools/run_qwen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;;iBAiBxB,CAAC;AAEH,wBAAsB,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG,OAAO,CAAC;IAC/E,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CA6CD"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { QwenRunner } from '../services/QwenRunner.js';
|
|
3
|
+
import { storeRun } from '../memory/MemoryFactory.js';
|
|
4
|
+
export const runQwenSchema = z.object({
|
|
5
|
+
prompt: z.string().describe("Le prompt à envoyer à l'agent Qwen Code"),
|
|
6
|
+
sessionId: z
|
|
7
|
+
.string()
|
|
8
|
+
.optional()
|
|
9
|
+
.describe('ID de session pour continuer une conversation (manuel)'),
|
|
10
|
+
agentName: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Nom de l'agent (pour logging/monitoring et persistance)"),
|
|
14
|
+
autoResume: z
|
|
15
|
+
.boolean()
|
|
16
|
+
.optional()
|
|
17
|
+
.default(false)
|
|
18
|
+
.describe('Si true (et agentName fourni), reprend automatiquement la dernière conversation de cet agent'),
|
|
19
|
+
});
|
|
20
|
+
export async function runQwenAgent(args) {
|
|
21
|
+
const runner = new QwenRunner();
|
|
22
|
+
const { prompt, agentName, autoResume, sessionId } = args;
|
|
23
|
+
const start = Date.now();
|
|
24
|
+
const result = await runner.runAgent({ prompt, agentName, autoResume, sessionId });
|
|
25
|
+
const durationMs = Date.now() - start;
|
|
26
|
+
// Auto-instrumentation
|
|
27
|
+
storeRun({
|
|
28
|
+
runner: 'qwen',
|
|
29
|
+
agentName,
|
|
30
|
+
prompt,
|
|
31
|
+
result: result.result,
|
|
32
|
+
error: result.error,
|
|
33
|
+
durationMs,
|
|
34
|
+
success: !result.error,
|
|
35
|
+
sessionId: result.sessionId,
|
|
36
|
+
});
|
|
37
|
+
if (result.error === 'INVALID_AGENT') {
|
|
38
|
+
return {
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'text',
|
|
42
|
+
text: `❌ **Erreur Configuration Agent**\n\nL'agent '${agentName}' est introuvable ou mal configuré.\n\n💡 **Solution:**\nUtilisez l'outil \`create_agent\` pour créer cet agent avant de l'exécuter.`,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
isError: true,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (result.error) {
|
|
49
|
+
return {
|
|
50
|
+
content: [{ type: 'text', text: `❌ Erreur lors de l'exécution Qwen Code: ${result.error}` }],
|
|
51
|
+
isError: true,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
content: [
|
|
56
|
+
{ type: 'text', text: result.result },
|
|
57
|
+
{ type: 'text', text: `RAW: ${result.rawOutput}` },
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=run_qwen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run_qwen.js","sourceRoot":"","sources":["../../src/tools/run_qwen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QA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IACJ,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,2CAA2C,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;YAC5F,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;YACrC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,MAAM,CAAC,SAAS,EAAE,EAAE;SACnD;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const runTraeSchema: z.ZodObject<{
|
|
3
|
+
prompt: z.ZodString;
|
|
4
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
5
|
+
agentName: z.ZodOptional<z.ZodString>;
|
|
6
|
+
autoResume: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare function runTraeAgent(args: z.infer<typeof runTraeSchema>): Promise<{
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: 'text';
|
|
11
|
+
text: string;
|
|
12
|
+
}>;
|
|
13
|
+
isError?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=run_trae.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run_trae.d.ts","sourceRoot":"","sources":["../../src/tools/run_trae.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;;iBAiBxB,CAAC;AAEH,wBAAsB,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG,OAAO,CAAC;IAC/E,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CAkDD"}
|