@tdsoft-tech/aikit 0.1.12 → 0.1.13
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/cli.js +1695 -1749
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +77 -1
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -995,7 +995,8 @@ var ConfigSchema = z.object({
|
|
|
995
995
|
context7: z.boolean().default(false),
|
|
996
996
|
githubGrep: z.boolean().default(false),
|
|
997
997
|
gkg: z.boolean().default(false)
|
|
998
|
-
}).optional()
|
|
998
|
+
}).optional(),
|
|
999
|
+
mode: z.string().default("build").optional()
|
|
999
1000
|
});
|
|
1000
1001
|
var Config = class {
|
|
1001
1002
|
config;
|
|
@@ -1029,6 +1030,9 @@ var Config = class {
|
|
|
1029
1030
|
get antiHallucination() {
|
|
1030
1031
|
return this.config.antiHallucination;
|
|
1031
1032
|
}
|
|
1033
|
+
get mode() {
|
|
1034
|
+
return this.config.mode;
|
|
1035
|
+
}
|
|
1032
1036
|
get configPath() {
|
|
1033
1037
|
return this.config.configPath;
|
|
1034
1038
|
}
|
|
@@ -3450,6 +3454,8 @@ var AiKitMcpServer = class {
|
|
|
3450
3454
|
commandRunner;
|
|
3451
3455
|
toolRegistry;
|
|
3452
3456
|
toolConfigManager;
|
|
3457
|
+
currentMode = "build";
|
|
3458
|
+
// Default mode
|
|
3453
3459
|
constructor() {
|
|
3454
3460
|
const capabilities = {
|
|
3455
3461
|
tools: {}
|
|
@@ -3556,6 +3562,38 @@ var AiKitMcpServer = class {
|
|
|
3556
3562
|
}
|
|
3557
3563
|
});
|
|
3558
3564
|
}
|
|
3565
|
+
tools.push({
|
|
3566
|
+
name: "get_current_mode",
|
|
3567
|
+
description: "Get the current AIKit mode (plan, build, one-shot)",
|
|
3568
|
+
inputSchema: {
|
|
3569
|
+
type: "object",
|
|
3570
|
+
properties: {},
|
|
3571
|
+
required: []
|
|
3572
|
+
}
|
|
3573
|
+
});
|
|
3574
|
+
tools.push({
|
|
3575
|
+
name: "set_mode",
|
|
3576
|
+
description: "Set the AIKit mode (plan, build, one-shot)",
|
|
3577
|
+
inputSchema: {
|
|
3578
|
+
type: "object",
|
|
3579
|
+
properties: {
|
|
3580
|
+
mode: {
|
|
3581
|
+
type: "string",
|
|
3582
|
+
description: "Mode to set (plan, build, one-shot)",
|
|
3583
|
+
required: true
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
}
|
|
3587
|
+
});
|
|
3588
|
+
tools.push({
|
|
3589
|
+
name: "list_modes",
|
|
3590
|
+
description: "List available AIKit modes",
|
|
3591
|
+
inputSchema: {
|
|
3592
|
+
type: "object",
|
|
3593
|
+
properties: {},
|
|
3594
|
+
required: []
|
|
3595
|
+
}
|
|
3596
|
+
});
|
|
3559
3597
|
} catch (error) {
|
|
3560
3598
|
logger.error(`Failed to list tools: ${error}`);
|
|
3561
3599
|
}
|
|
@@ -3597,6 +3635,23 @@ Reasoning: ${decision.reason}`;
|
|
|
3597
3635
|
} catch (error) {
|
|
3598
3636
|
result = `Error executing tool ${toolName}: ${error instanceof Error ? error.message : String(error)}`;
|
|
3599
3637
|
}
|
|
3638
|
+
} else if (name === "get_current_mode") {
|
|
3639
|
+
const modeInfo = this.getModeInfo(this.currentMode);
|
|
3640
|
+
result = `Current mode: ${modeInfo}`;
|
|
3641
|
+
} else if (name === "set_mode") {
|
|
3642
|
+
const mode = args?.mode;
|
|
3643
|
+
const validModes = ["plan", "build", "one-shot"];
|
|
3644
|
+
if (!mode || !validModes.includes(mode)) {
|
|
3645
|
+
result = `Invalid mode. Available modes: ${validModes.join(", ")}`;
|
|
3646
|
+
} else {
|
|
3647
|
+
this.currentMode = mode;
|
|
3648
|
+
const modeInfo = this.getModeInfo(mode);
|
|
3649
|
+
result = `Mode set to: ${modeInfo}`;
|
|
3650
|
+
logger.info(`Mode changed to: ${mode}`);
|
|
3651
|
+
}
|
|
3652
|
+
} else if (name === "list_modes") {
|
|
3653
|
+
const modes = this.getAllModesInfo();
|
|
3654
|
+
result = modes;
|
|
3600
3655
|
} else {
|
|
3601
3656
|
result = `Unknown tool: ${name}`;
|
|
3602
3657
|
}
|
|
@@ -3620,6 +3675,25 @@ Reasoning: ${decision.reason}`;
|
|
|
3620
3675
|
};
|
|
3621
3676
|
}
|
|
3622
3677
|
}
|
|
3678
|
+
/**
|
|
3679
|
+
* Get mode information for display
|
|
3680
|
+
*/
|
|
3681
|
+
getModeInfo(mode) {
|
|
3682
|
+
const modeDescriptions = {
|
|
3683
|
+
plan: { icon: "\u{1F4CB}", description: "Create detailed implementation plans" },
|
|
3684
|
+
build: { icon: "\u{1F527}", description: "Direct execution mode" },
|
|
3685
|
+
"one-shot": { icon: "\u{1F680}", description: "End-to-end autonomous execution" }
|
|
3686
|
+
};
|
|
3687
|
+
const info = modeDescriptions[mode] || modeDescriptions.build;
|
|
3688
|
+
return `${info.icon} ${mode.toUpperCase()} - ${info.description}`;
|
|
3689
|
+
}
|
|
3690
|
+
/**
|
|
3691
|
+
* Get all modes information
|
|
3692
|
+
*/
|
|
3693
|
+
getAllModesInfo() {
|
|
3694
|
+
const modes = ["plan", "build", "one-shot"];
|
|
3695
|
+
return modes.map((mode) => this.getModeInfo(mode)).join("\n");
|
|
3696
|
+
}
|
|
3623
3697
|
async initialize() {
|
|
3624
3698
|
try {
|
|
3625
3699
|
const config = await loadConfig();
|
|
@@ -3629,6 +3703,8 @@ Reasoning: ${decision.reason}`;
|
|
|
3629
3703
|
this.toolRegistry = new ToolRegistry(config);
|
|
3630
3704
|
this.toolConfigManager = new ToolConfigManager(config);
|
|
3631
3705
|
this.toolRegistry.setToolConfigManager(this.toolConfigManager);
|
|
3706
|
+
this.currentMode = config.mode || "build";
|
|
3707
|
+
logger.info(`AIKit mode set to: ${this.currentMode}`);
|
|
3632
3708
|
const figmaReady = await this.toolConfigManager.isToolReady("figma-analysis");
|
|
3633
3709
|
if (figmaReady) {
|
|
3634
3710
|
logger.info("Figma tool configured and ready");
|