@moxxy/cli 0.0.6 → 0.0.7
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/dist/chunk-23LZYKQ6.mjs +1131 -0
- package/dist/chunk-CPL5V56X.mjs +1131 -0
- package/dist/cli-2QKJ5UUL.mjs +8 -0
- package/dist/cli-CVP26EL2.mjs +8 -0
- package/dist/dist-ZYHCBILM.mjs +6993 -0
- package/dist/index.js +50 -21
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -24280,9 +24280,42 @@ Handle any errors by adapting. Report the results of each step.`,
|
|
|
24280
24280
|
const result = await supervisor.sendInstruction(agentId, instruction);
|
|
24281
24281
|
return { response: result.response, sessionKey: result.sessionKey };
|
|
24282
24282
|
}
|
|
24283
|
+
function extractJSON(response, stageName) {
|
|
24284
|
+
const fenceMatch = response.match(/```(?:json)?\s*\n?([\s\S]*?)\n?```/);
|
|
24285
|
+
if (fenceMatch) {
|
|
24286
|
+
try {
|
|
24287
|
+
return JSON.parse(fenceMatch[1].trim());
|
|
24288
|
+
} catch {
|
|
24289
|
+
}
|
|
24290
|
+
}
|
|
24291
|
+
const braceMatch = response.match(/\{[\s\S]*\}/);
|
|
24292
|
+
if (braceMatch) {
|
|
24293
|
+
try {
|
|
24294
|
+
return JSON.parse(braceMatch[0]);
|
|
24295
|
+
} catch {
|
|
24296
|
+
}
|
|
24297
|
+
}
|
|
24298
|
+
const firstBrace = response.indexOf("{");
|
|
24299
|
+
if (firstBrace !== -1) {
|
|
24300
|
+
let depth = 0;
|
|
24301
|
+
for (let i = firstBrace; i < response.length; i++) {
|
|
24302
|
+
if (response[i] === "{") depth++;
|
|
24303
|
+
else if (response[i] === "}") depth--;
|
|
24304
|
+
if (depth === 0) {
|
|
24305
|
+
try {
|
|
24306
|
+
return JSON.parse(response.slice(firstBrace, i + 1));
|
|
24307
|
+
} catch {
|
|
24308
|
+
break;
|
|
24309
|
+
}
|
|
24310
|
+
}
|
|
24311
|
+
}
|
|
24312
|
+
}
|
|
24313
|
+
const snippet = response.length > 200 ? `${response.slice(0, 200)}...` : response;
|
|
24314
|
+
throw new Error(`No valid JSON found in ${stageName} response. Response was: ${snippet}`);
|
|
24315
|
+
}
|
|
24283
24316
|
async function inspectIssue(supervisor, agentId, payload, research) {
|
|
24284
24317
|
const instruction = {
|
|
24285
|
-
prompt: `Deeply inspect the following files for issue #${payload.issueNumber}: ${payload.title}
|
|
24318
|
+
prompt: `Deeply inspect the following files for issue #${payload.issueNumber}: ${payload.title}. You MUST respond with ONLY a raw JSON object \u2014 no markdown, no explanation, no code fences.
|
|
24286
24319
|
|
|
24287
24320
|
Files to inspect:
|
|
24288
24321
|
${research.relevantFiles.map((f) => `- ${f}`).join("\n")}
|
|
@@ -24292,17 +24325,16 @@ Provide detailed analysis:
|
|
|
24292
24325
|
2. Root cause or implementation location
|
|
24293
24326
|
3. Required changes
|
|
24294
24327
|
|
|
24295
|
-
|
|
24328
|
+
Respond with exactly this JSON structure (no other text):
|
|
24329
|
+
{"findings": [...], "rootCause": "...", "suggestedApproach": "...", "estimatedChanges": [{"file": "...", "description": "..."}]}`,
|
|
24296
24330
|
metadata: { stage: "inspect", issueNumber: payload.issueNumber }
|
|
24297
24331
|
};
|
|
24298
24332
|
const result = await supervisor.sendInstruction(agentId, instruction);
|
|
24299
|
-
|
|
24300
|
-
if (!jsonMatch) throw new Error("No JSON found in inspect response");
|
|
24301
|
-
return JSON.parse(jsonMatch[0]);
|
|
24333
|
+
return extractJSON(result.response, "inspect");
|
|
24302
24334
|
}
|
|
24303
24335
|
async function planIssue(supervisor, agentId, payload, inspection) {
|
|
24304
24336
|
const instruction = {
|
|
24305
|
-
prompt: `Create a detailed implementation plan for issue #${payload.issueNumber}: ${payload.title}
|
|
24337
|
+
prompt: `Create a detailed implementation plan for issue #${payload.issueNumber}: ${payload.title}. You MUST respond with ONLY a raw JSON object \u2014 no markdown, no explanation, no code fences.
|
|
24306
24338
|
|
|
24307
24339
|
Inspection findings:
|
|
24308
24340
|
${JSON.stringify(inspection, null, 2)}
|
|
@@ -24312,17 +24344,16 @@ Create a step-by-step plan listing:
|
|
|
24312
24344
|
2. Specific changes for each file
|
|
24313
24345
|
3. Testing approach
|
|
24314
24346
|
|
|
24315
|
-
|
|
24347
|
+
Respond with exactly this JSON structure (no other text):
|
|
24348
|
+
{"steps": [{"action": "create|modify|delete", "path": "...", "description": "...", "content": "..."}], "testPlan": "...", "commitMessage": "..."}`,
|
|
24316
24349
|
metadata: { stage: "plan", issueNumber: payload.issueNumber }
|
|
24317
24350
|
};
|
|
24318
24351
|
const result = await supervisor.sendInstruction(agentId, instruction);
|
|
24319
|
-
|
|
24320
|
-
if (!jsonMatch) throw new Error("No JSON found in plan response");
|
|
24321
|
-
return JSON.parse(jsonMatch[0]);
|
|
24352
|
+
return extractJSON(result.response, "plan");
|
|
24322
24353
|
}
|
|
24323
24354
|
async function researchIssue(supervisor, agentId, payload, classification) {
|
|
24324
24355
|
const instruction = {
|
|
24325
|
-
prompt: `Research this ${classification.type} issue in the codebase.
|
|
24356
|
+
prompt: `Research this ${classification.type} issue in the codebase. You MUST respond with ONLY a raw JSON object \u2014 no markdown, no explanation, no code fences.
|
|
24326
24357
|
|
|
24327
24358
|
Issue #${payload.issueNumber}: ${payload.title}
|
|
24328
24359
|
${payload.body || ""}
|
|
@@ -24334,29 +24365,27 @@ Analyze the codebase and identify:
|
|
|
24334
24365
|
2. Dependencies and related modules
|
|
24335
24366
|
3. Potential impact areas
|
|
24336
24367
|
|
|
24337
|
-
|
|
24368
|
+
Respond with exactly this JSON structure (no other text):
|
|
24369
|
+
{"relevantFiles": [...], "relatedModules": [...], "potentialImpact": "...", "techStack": [...]}`,
|
|
24338
24370
|
metadata: { stage: "research", issueNumber: payload.issueNumber }
|
|
24339
24371
|
};
|
|
24340
24372
|
const result = await supervisor.sendInstruction(agentId, instruction);
|
|
24341
|
-
|
|
24342
|
-
if (!jsonMatch) throw new Error("No JSON found in research response");
|
|
24343
|
-
return JSON.parse(jsonMatch[0]);
|
|
24373
|
+
return extractJSON(result.response, "research");
|
|
24344
24374
|
}
|
|
24345
24375
|
async function triageIssue(supervisor, agentId, payload) {
|
|
24346
24376
|
const instruction = {
|
|
24347
|
-
prompt: `Classify this GitHub issue.
|
|
24377
|
+
prompt: `Classify this GitHub issue. You MUST respond with ONLY a raw JSON object \u2014 no markdown, no explanation, no code fences.
|
|
24348
24378
|
|
|
24349
24379
|
Issue #${payload.issueNumber}: ${payload.title}
|
|
24350
24380
|
${payload.body || "No description provided."}
|
|
24351
24381
|
Labels: ${payload.labels.join(", ") || "none"}
|
|
24352
24382
|
|
|
24353
|
-
|
|
24383
|
+
Respond with exactly this JSON structure (no other text):
|
|
24384
|
+
{"type": "feature|bug|refactor|docs|test|chore", "priority": "low|medium|high|urgent", "complexity": "trivial|small|medium|large|epic", "confidence": 0.0-1.0, "reasoning": "..."}`,
|
|
24354
24385
|
metadata: { stage: "triage", issueNumber: payload.issueNumber }
|
|
24355
24386
|
};
|
|
24356
24387
|
const result = await supervisor.sendInstruction(agentId, instruction);
|
|
24357
|
-
|
|
24358
|
-
if (!jsonMatch) throw new Error("No JSON found in triage response");
|
|
24359
|
-
return JSON.parse(jsonMatch[0]);
|
|
24388
|
+
return extractJSON(result.response, "triage");
|
|
24360
24389
|
}
|
|
24361
24390
|
function buildWorkflow(payload, plan, branchName) {
|
|
24362
24391
|
const steps = [];
|
|
@@ -25116,7 +25145,7 @@ __export(cli_exports, {
|
|
|
25116
25145
|
});
|
|
25117
25146
|
function createProgram() {
|
|
25118
25147
|
const program = new import_commander.Command();
|
|
25119
|
-
program.name("moxxy").description("Moxxy - Agent orchestration platform").version("0.0.
|
|
25148
|
+
program.name("moxxy").description("Moxxy - Agent orchestration platform").version("0.0.7");
|
|
25120
25149
|
registerStartCommand(program);
|
|
25121
25150
|
registerRepoCommand(program);
|
|
25122
25151
|
registerConfigCommand(program);
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConfigManager,
|
|
3
3
|
createProgram
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CPL5V56X.mjs";
|
|
5
5
|
import "./chunk-GSNMMI3H.mjs";
|
|
6
6
|
import "./chunk-6DZX6EAA.mjs";
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
async function run() {
|
|
10
|
-
const { createProgram: createProgram2 } = await import("./cli-
|
|
10
|
+
const { createProgram: createProgram2 } = await import("./cli-2QKJ5UUL.mjs");
|
|
11
11
|
const program = createProgram2();
|
|
12
12
|
await program.parseAsync(process.argv);
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "User-facing CLI for Moxxy agent orchestration",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"typescript": "^5.7.0",
|
|
53
53
|
"vitest": "^2.1.0",
|
|
54
54
|
"@moxxy/types": "1.0.0",
|
|
55
|
-
"@moxxy/claude": "0.1.0",
|
|
56
|
-
"@moxxy/agents": "1.0.0",
|
|
57
55
|
"@moxxy/molt": "1.0.0",
|
|
56
|
+
"@moxxy/integration-base": "1.0.0",
|
|
57
|
+
"@moxxy/agents": "1.0.0",
|
|
58
58
|
"@moxxy/integration-github": "1.0.0",
|
|
59
|
-
"@moxxy/
|
|
59
|
+
"@moxxy/claude": "0.1.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "tsup",
|