@uniswap/ai-toolkit-nx-claude 0.5.23 → 0.5.24-next.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/dist/content/commands/agnostic/CLAUDE.md +2 -1
- package/dist/content/commands/agnostic/git-worktree-orchestrator.md +248 -11
- package/dist/generators/addons/CLAUDE.md +35 -14
- package/dist/generators/addons/generator.cjs +46 -53
- package/dist/generators/addons/schema.json +19 -1
- package/dist/generators/init/CLAUDE.md +1 -1
- package/dist/generators/init/generator.cjs +77 -167
- package/dist/index.cjs +46 -53
- package/dist/packages/ai-toolkit-nx-claude/src/generators/addons/addon-registry.d.ts.map +1 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/addons/claude-mcp-installer.d.ts +2 -0
- package/dist/packages/ai-toolkit-nx-claude/src/generators/addons/claude-mcp-installer.d.ts.map +1 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/addons/generator.d.ts.map +1 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/init/generator.d.ts.map +1 -1
- package/dist/packages/ai-toolkit-nx-claude/src/utils/auto-update-utils.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -93,7 +93,25 @@
|
|
|
93
93
|
"type": "string",
|
|
94
94
|
"description": "Installation mode from parent generator (default or custom)",
|
|
95
95
|
"enum": ["default", "custom"],
|
|
96
|
-
"hidden": true
|
|
96
|
+
"hidden": true,
|
|
97
|
+
"x-skip-prompt": true
|
|
98
|
+
},
|
|
99
|
+
"installationType": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "Installation location for MCP servers",
|
|
102
|
+
"enum": ["global", "local"],
|
|
103
|
+
"prompt-message": "📍 Where should MCP servers be installed?",
|
|
104
|
+
"prompt-type": "list",
|
|
105
|
+
"prompt-items": [
|
|
106
|
+
{
|
|
107
|
+
"value": "global",
|
|
108
|
+
"label": "Global (~/.claude) - Available in all projects"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"value": "local",
|
|
112
|
+
"label": "Local (./.claude) - Project-specific configuration"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
97
115
|
}
|
|
98
116
|
},
|
|
99
117
|
"required": []
|
|
@@ -162,7 +162,7 @@ echo "export AI_TOOLKIT_SKIP_UPDATE_CHECK=1" >> ~/.zshrc
|
|
|
162
162
|
|
|
163
163
|
- If update checker installation fails, a warning is shown but installation continues
|
|
164
164
|
- Failure is treated as non-critical (user can still use installed commands/agents)
|
|
165
|
-
- Users are advised to report issues
|
|
165
|
+
- Users are advised to report issues at <https://github.com/Uniswap/ai-toolkit/issues>
|
|
166
166
|
|
|
167
167
|
### Installation Modes
|
|
168
168
|
|
|
@@ -127,9 +127,7 @@ async function validateAddonRequirements(addonId) {
|
|
|
127
127
|
if (addon.requirements?.node) {
|
|
128
128
|
const nodeVersion = process.version;
|
|
129
129
|
if (!nodeVersion.match(/v1[89]\.\d+\.\d+/) && !nodeVersion.match(/v2\d+\.\d+\.\d+/)) {
|
|
130
|
-
errors.push(
|
|
131
|
-
`Node.js ${addon.requirements.node} required, found ${nodeVersion}`
|
|
132
|
-
);
|
|
130
|
+
errors.push(`Node.js ${addon.requirements.node} required, found ${nodeVersion}`);
|
|
133
131
|
}
|
|
134
132
|
}
|
|
135
133
|
if (addon.requirements?.commands) {
|
|
@@ -211,7 +209,7 @@ var init_addon_registry = __esm({
|
|
|
211
209
|
mcp: {
|
|
212
210
|
serverName: "slack",
|
|
213
211
|
command: "npx",
|
|
214
|
-
args: ["-y", "@zencoderai/slack-mcp-server", "
|
|
212
|
+
args: ["-y", "-p", "@zencoderai/slack-mcp-server", "slack-mcp"],
|
|
215
213
|
env: {
|
|
216
214
|
SLACK_BOT_TOKEN: "PROMPT_TO_INSERT_SLACK_BOT_TOKEN",
|
|
217
215
|
SLACK_TEAM_ID: "TKZBCKUJJ"
|
|
@@ -233,13 +231,13 @@ var init_addon_registry = __esm({
|
|
|
233
231
|
{
|
|
234
232
|
id: "linear-mcp",
|
|
235
233
|
name: "Linear MCP",
|
|
236
|
-
description: "MCP server for Linear issue tracking (
|
|
234
|
+
description: "MCP server for Linear issue tracking (HTTP)",
|
|
237
235
|
type: "mcp-server",
|
|
238
236
|
packageName: "linear",
|
|
239
237
|
mcp: {
|
|
240
238
|
serverName: "linear",
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
transport: "http",
|
|
240
|
+
url: "https://mcp.linear.app/mcp"
|
|
243
241
|
}
|
|
244
242
|
},
|
|
245
243
|
{
|
|
@@ -429,7 +427,25 @@ var require_schema = __commonJS({
|
|
|
429
427
|
type: "string",
|
|
430
428
|
description: "Installation mode from parent generator (default or custom)",
|
|
431
429
|
enum: ["default", "custom"],
|
|
432
|
-
hidden: true
|
|
430
|
+
hidden: true,
|
|
431
|
+
"x-skip-prompt": true
|
|
432
|
+
},
|
|
433
|
+
installationType: {
|
|
434
|
+
type: "string",
|
|
435
|
+
description: "Installation location for MCP servers",
|
|
436
|
+
enum: ["global", "local"],
|
|
437
|
+
"prompt-message": "\u{1F4CD} Where should MCP servers be installed?",
|
|
438
|
+
"prompt-type": "list",
|
|
439
|
+
"prompt-items": [
|
|
440
|
+
{
|
|
441
|
+
value: "global",
|
|
442
|
+
label: "Global (~/.claude) - Available in all projects"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
value: "local",
|
|
446
|
+
label: "Local (./.claude) - Project-specific configuration"
|
|
447
|
+
}
|
|
448
|
+
]
|
|
433
449
|
}
|
|
434
450
|
},
|
|
435
451
|
required: []
|
|
@@ -922,13 +938,7 @@ function getCurrentToolkitVersion() {
|
|
|
922
938
|
return packageJson.version;
|
|
923
939
|
} catch (error) {
|
|
924
940
|
import_devkit.logger.info("checking parent directory for package.json");
|
|
925
|
-
const packageJsonPath = path.join(
|
|
926
|
-
__dirname,
|
|
927
|
-
"..",
|
|
928
|
-
"..",
|
|
929
|
-
"..",
|
|
930
|
-
"package.json"
|
|
931
|
-
);
|
|
941
|
+
const packageJsonPath = path.join(__dirname, "..", "..", "..", "package.json");
|
|
932
942
|
const packageJson = JSON.parse(fs2.readFileSync(packageJsonPath, "utf-8"));
|
|
933
943
|
return packageJson.version;
|
|
934
944
|
}
|
|
@@ -977,7 +987,7 @@ _ai_toolkit_check_updates() {
|
|
|
977
987
|
if command -v npm >/dev/null 2>&1; then
|
|
978
988
|
if ! npm view @uniswap/ai-toolkit-nx-claude@latest version >/dev/null 2>&1; then
|
|
979
989
|
echo "\u26A0\uFE0F Failed to check for AI Toolkit updates (npm registry unavailable)"
|
|
980
|
-
echo "\u{1F41E} Please report this bug
|
|
990
|
+
echo "\u{1F41E} Please report this bug at https://github.com/Uniswap/ai-toolkit/issues"
|
|
981
991
|
return
|
|
982
992
|
fi
|
|
983
993
|
|
|
@@ -1031,7 +1041,7 @@ function _ai_toolkit_check_updates
|
|
|
1031
1041
|
if command -v npm >/dev/null 2>&1
|
|
1032
1042
|
if not npm view @uniswap/ai-toolkit-nx-claude@latest version >/dev/null 2>&1
|
|
1033
1043
|
echo "\u26A0\uFE0F Failed to check for AI Toolkit updates (npm registry unavailable)"
|
|
1034
|
-
echo "\u{1F41E} Please report this bug
|
|
1044
|
+
echo "\u{1F41E} Please report this bug at https://github.com/Uniswap/ai-toolkit/issues"
|
|
1035
1045
|
return
|
|
1036
1046
|
end
|
|
1037
1047
|
|
|
@@ -1063,19 +1073,14 @@ function installUpdateChecker(shell, version) {
|
|
|
1063
1073
|
let configContent = fs2.readFileSync(configPath, "utf-8");
|
|
1064
1074
|
const startMarker = "# AUTOMATED BY AI_TOOLKIT_UPDATE_CHECK";
|
|
1065
1075
|
const endMarker = "# END AI_TOOLKIT_UPDATE_CHECK";
|
|
1066
|
-
const blockRegex = new RegExp(
|
|
1067
|
-
`${startMarker}[\\s\\S]*?${endMarker}\\n?`,
|
|
1068
|
-
"g"
|
|
1069
|
-
);
|
|
1076
|
+
const blockRegex = new RegExp(`${startMarker}[\\s\\S]*?${endMarker}\\n?`, "g");
|
|
1070
1077
|
configContent = configContent.replace(blockRegex, "");
|
|
1071
1078
|
const snippet = shell === "fish" ? generateFishAutoUpdateSnippet(version) : generateAutoUpdateSnippet(version);
|
|
1072
1079
|
const prefix = configContent.trim() ? "\n\n" : "";
|
|
1073
1080
|
const updatedContent = configContent + prefix + snippet + "\n";
|
|
1074
1081
|
fs2.writeFileSync(configPath, updatedContent);
|
|
1075
1082
|
import_devkit.logger.info(`\u2705 Update checker installed to ${configPath}`);
|
|
1076
|
-
import_devkit.logger.info(
|
|
1077
|
-
` Checks once per week, disable with: export AI_TOOLKIT_SKIP_UPDATE_CHECK=1`
|
|
1078
|
-
);
|
|
1083
|
+
import_devkit.logger.info(` Checks once per week, disable with: export AI_TOOLKIT_SKIP_UPDATE_CHECK=1`);
|
|
1079
1084
|
}
|
|
1080
1085
|
|
|
1081
1086
|
// packages/commands/agnostic/dist/src/index.js
|
|
@@ -1133,7 +1138,7 @@ var commands = {
|
|
|
1133
1138
|
filePath: "./generate-commit-message.md"
|
|
1134
1139
|
},
|
|
1135
1140
|
"git-worktree-orchestrator": {
|
|
1136
|
-
description: "Create and manage a git worktree based on the current directory and a branch name, with optional spec-workflow setup and Linear task automation.",
|
|
1141
|
+
description: "Create and manage a git worktree based on the current directory and a branch name, with optional spec-workflow setup, Graphite integration, and Linear task automation.",
|
|
1137
1142
|
filePath: "./git-worktree-orchestrator.md"
|
|
1138
1143
|
},
|
|
1139
1144
|
"implement-spec": {
|
|
@@ -2083,7 +2088,7 @@ init_addon_registry();
|
|
|
2083
2088
|
var import_child_process4 = require("child_process");
|
|
2084
2089
|
init_addon_registry();
|
|
2085
2090
|
async function installMcpServer(options) {
|
|
2086
|
-
const { addon, additionalArgs = [], dryRun = false } = options;
|
|
2091
|
+
const { addon, additionalArgs = [], dryRun = false, installationType = "global" } = options;
|
|
2087
2092
|
try {
|
|
2088
2093
|
(0, import_child_process4.execSync)("claude --version", { stdio: "ignore" });
|
|
2089
2094
|
} catch {
|
|
@@ -2094,7 +2099,8 @@ async function installMcpServer(options) {
|
|
|
2094
2099
|
};
|
|
2095
2100
|
}
|
|
2096
2101
|
const serverName = addon.mcp?.serverName;
|
|
2097
|
-
|
|
2102
|
+
const scope = installationType === "local" ? "project" : "user";
|
|
2103
|
+
let command = `claude mcp add ${serverName} --scope ${scope}`;
|
|
2098
2104
|
if (addon.mcp?.env && Object.keys(addon.mcp.env).length > 0) {
|
|
2099
2105
|
for (const [key, value] of Object.entries(addon.mcp.env)) {
|
|
2100
2106
|
command += ` --env ${key}=${value}`;
|
|
@@ -2137,10 +2143,8 @@ async function installMcpServer(options) {
|
|
|
2137
2143
|
while (attempts < maxAttempts) {
|
|
2138
2144
|
attempts++;
|
|
2139
2145
|
try {
|
|
2140
|
-
console.log(
|
|
2141
|
-
|
|
2142
|
-
\u{1F527} Installing MCP server (attempt ${attempts}/${maxAttempts})...`
|
|
2143
|
-
);
|
|
2146
|
+
console.log(`
|
|
2147
|
+
\u{1F527} Installing MCP server (attempt ${attempts}/${maxAttempts})...`);
|
|
2144
2148
|
const output = (0, import_child_process4.execSync)(command, {
|
|
2145
2149
|
encoding: "utf-8",
|
|
2146
2150
|
stdio: "pipe"
|
|
@@ -2505,6 +2509,7 @@ async function generator(tree, schema) {
|
|
|
2505
2509
|
port: schema.port || 0,
|
|
2506
2510
|
dry: schema.dry || false,
|
|
2507
2511
|
installMode: "default",
|
|
2512
|
+
installationType: schema.installationType || "global",
|
|
2508
2513
|
dryRun: isDryRun
|
|
2509
2514
|
};
|
|
2510
2515
|
} else {
|
|
@@ -2542,10 +2547,8 @@ async function installSelectedAddons(tree, options) {
|
|
|
2542
2547
|
const results = [];
|
|
2543
2548
|
for (let i = 0; i < selectedAddons.length; i++) {
|
|
2544
2549
|
const addon = selectedAddons[i];
|
|
2545
|
-
console.log(
|
|
2546
|
-
|
|
2547
|
-
[${i + 1}/${selectedAddons.length}] Installing: ${addon.name}`
|
|
2548
|
-
);
|
|
2550
|
+
console.log(`
|
|
2551
|
+
[${i + 1}/${selectedAddons.length}] Installing: ${addon.name}`);
|
|
2549
2552
|
console.log(` ${addon.description}`);
|
|
2550
2553
|
try {
|
|
2551
2554
|
if (!options.force && !options.dryRun) {
|
|
@@ -2586,23 +2589,17 @@ async function installSelectedAddons(tree, options) {
|
|
|
2586
2589
|
});
|
|
2587
2590
|
options.projectPath = projectPath;
|
|
2588
2591
|
if (options.dryRun) {
|
|
2589
|
-
console.log(
|
|
2590
|
-
|
|
2591
|
-
\u{1F4C1} [DRY-RUN] Would set up project configuration at: ${projectPath}`
|
|
2592
|
-
);
|
|
2592
|
+
console.log(`
|
|
2593
|
+
\u{1F4C1} [DRY-RUN] Would set up project configuration at: ${projectPath}`);
|
|
2593
2594
|
}
|
|
2594
2595
|
await installProjectSetup(addon, options);
|
|
2595
2596
|
} else if (options.dryRun) {
|
|
2596
|
-
console.log(
|
|
2597
|
-
"\n\u{1F4C1} [DRY-RUN] Skipping project configuration (user chose not to set up)"
|
|
2598
|
-
);
|
|
2597
|
+
console.log("\n\u{1F4C1} [DRY-RUN] Skipping project configuration (user chose not to set up)");
|
|
2599
2598
|
}
|
|
2600
2599
|
}
|
|
2601
2600
|
results.push({ addon, success: true });
|
|
2602
2601
|
} catch (error) {
|
|
2603
|
-
console.error(
|
|
2604
|
-
` \u274C Failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2605
|
-
);
|
|
2602
|
+
console.error(` \u274C Failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
2606
2603
|
results.push({
|
|
2607
2604
|
addon,
|
|
2608
2605
|
success: false,
|
|
@@ -2619,9 +2616,7 @@ async function installSelectedAddons(tree, options) {
|
|
|
2619
2616
|
if (failed.length > 0) {
|
|
2620
2617
|
console.log(`
|
|
2621
2618
|
\u274C Failed to install: ${failed.length}`);
|
|
2622
|
-
failed.forEach(
|
|
2623
|
-
(r) => console.log(` \u2022 ${r.addon.name} - ${r.error || "Unknown error"}`)
|
|
2624
|
-
);
|
|
2619
|
+
failed.forEach((r) => console.log(` \u2022 ${r.addon.name} - ${r.error || "Unknown error"}`));
|
|
2625
2620
|
}
|
|
2626
2621
|
if (options.dryRun) {
|
|
2627
2622
|
console.log("\n\u2728 Dry-run complete! No changes were made.\n");
|
|
@@ -2667,9 +2662,7 @@ async function installAllAddons(tree, options) {
|
|
|
2667
2662
|
await installMcpAddon(addon, options);
|
|
2668
2663
|
results.push({ addon, success: true });
|
|
2669
2664
|
} catch (error) {
|
|
2670
|
-
console.error(
|
|
2671
|
-
` \u274C Failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2672
|
-
);
|
|
2665
|
+
console.error(` \u274C Failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
2673
2666
|
results.push({
|
|
2674
2667
|
addon,
|
|
2675
2668
|
success: false,
|
|
@@ -2686,9 +2679,7 @@ async function installAllAddons(tree, options) {
|
|
|
2686
2679
|
if (failed.length > 0) {
|
|
2687
2680
|
console.log(`
|
|
2688
2681
|
\u274C Failed to install: ${failed.length}`);
|
|
2689
|
-
failed.forEach(
|
|
2690
|
-
(r) => console.log(` \u2022 ${r.addon.name} - ${r.error || "Unknown error"}`)
|
|
2691
|
-
);
|
|
2682
|
+
failed.forEach((r) => console.log(` \u2022 ${r.addon.name} - ${r.error || "Unknown error"}`));
|
|
2692
2683
|
}
|
|
2693
2684
|
if (options.dryRun) {
|
|
2694
2685
|
console.log("\n\u2728 Dry-run complete! No changes were made.\n");
|
|
@@ -2727,7 +2718,8 @@ async function installMcpAddon(addon, options) {
|
|
|
2727
2718
|
const installResult = await installMcpServer({
|
|
2728
2719
|
addon,
|
|
2729
2720
|
additionalArgs,
|
|
2730
|
-
dryRun: options.dryRun
|
|
2721
|
+
dryRun: options.dryRun,
|
|
2722
|
+
installationType: options.installationType || "global"
|
|
2731
2723
|
});
|
|
2732
2724
|
if (!installResult.success) {
|
|
2733
2725
|
throw new Error(installResult.error || installResult.message);
|
|
@@ -2769,9 +2761,7 @@ function showGeneralMcpInstructions(installedAddons) {
|
|
|
2769
2761
|
const hasSlack = installedAddons.some((addon) => addon.id === "slack-mcp");
|
|
2770
2762
|
const hasGithub = installedAddons.some((addon) => addon.id === "github-mcp");
|
|
2771
2763
|
const hasPulumi = installedAddons.some((addon) => addon.id === "pulumi-mcp");
|
|
2772
|
-
const hasAws = installedAddons.some(
|
|
2773
|
-
(addon) => addon.id === "aws-log-analyzer-mcp"
|
|
2774
|
-
);
|
|
2764
|
+
const hasAws = installedAddons.some((addon) => addon.id === "aws-log-analyzer-mcp");
|
|
2775
2765
|
if (hasSlack || hasGithub || hasAws || hasPulumi) {
|
|
2776
2766
|
console.log("\u{1F4CB} Specific Authentication Instructions:\n");
|
|
2777
2767
|
if (hasSlack) {
|
|
@@ -2787,18 +2777,12 @@ function showGeneralMcpInstructions(installedAddons) {
|
|
|
2787
2777
|
console.log("\u{1F510} GitHub MCP:");
|
|
2788
2778
|
console.log(" You can obtain your GitHub Personal Access Token using:");
|
|
2789
2779
|
console.log(" $ gh auth token");
|
|
2790
|
-
console.log(
|
|
2791
|
-
" (Requires GitHub CLI to be installed and authenticated)\n"
|
|
2792
|
-
);
|
|
2780
|
+
console.log(" (Requires GitHub CLI to be installed and authenticated)\n");
|
|
2793
2781
|
}
|
|
2794
2782
|
if (hasAws) {
|
|
2795
2783
|
console.log("\u{1F510} AWS Log Analyzer MCP:");
|
|
2796
|
-
console.log(
|
|
2797
|
-
|
|
2798
|
-
);
|
|
2799
|
-
console.log(
|
|
2800
|
-
" \u{1F4D6} Documentation: https://github.com/awslabs/Log-Analyzer-with-MCP\n"
|
|
2801
|
-
);
|
|
2784
|
+
console.log(" Requires AWS credentials with CloudWatchLogsReadOnlyAccess");
|
|
2785
|
+
console.log(" \u{1F4D6} Documentation: https://github.com/awslabs/Log-Analyzer-with-MCP\n");
|
|
2802
2786
|
}
|
|
2803
2787
|
if (hasPulumi) {
|
|
2804
2788
|
console.log("\u{1F510} Pulumi MCP:");
|
|
@@ -2808,21 +2792,13 @@ function showGeneralMcpInstructions(installedAddons) {
|
|
|
2808
2792
|
console.log(
|
|
2809
2793
|
" \u{1F4D6} Documentation: https://www.pulumi.com/docs/iac/guides/ai-integration/mcp-server/"
|
|
2810
2794
|
);
|
|
2811
|
-
console.log(
|
|
2812
|
-
" Create your PAT at: https://app.pulumi.com/account/tokens\n"
|
|
2813
|
-
);
|
|
2795
|
+
console.log(" Create your PAT at: https://app.pulumi.com/account/tokens\n");
|
|
2814
2796
|
}
|
|
2815
2797
|
}
|
|
2816
2798
|
}
|
|
2817
2799
|
|
|
2818
2800
|
// packages/ai-toolkit-nx-claude/src/generators/init/generator.ts
|
|
2819
|
-
var DEFAULT_COMMANDS = [
|
|
2820
|
-
"explore",
|
|
2821
|
-
"plan",
|
|
2822
|
-
"review-plan",
|
|
2823
|
-
"execute-plan",
|
|
2824
|
-
"address-pr-issues"
|
|
2825
|
-
];
|
|
2801
|
+
var DEFAULT_COMMANDS = ["explore", "plan", "review-plan", "execute-plan", "address-pr-issues"];
|
|
2826
2802
|
var DEFAULT_AGENTS = [
|
|
2827
2803
|
"context-loader",
|
|
2828
2804
|
"planner",
|
|
@@ -2866,17 +2842,13 @@ async function initGenerator(tree, options) {
|
|
|
2866
2842
|
import_devkit7.logger.info("\u{1F50D} DRY RUN: Claude CLI is not installed");
|
|
2867
2843
|
import_devkit7.logger.info("Would attempt installation in this order:");
|
|
2868
2844
|
import_devkit7.logger.info(" 1. curl -fsSL https://claude.ai/install.sh | bash");
|
|
2869
|
-
import_devkit7.logger.info(
|
|
2870
|
-
" 2. npm install -g @anthropic-ai/claude-code (if curl fails)"
|
|
2871
|
-
);
|
|
2845
|
+
import_devkit7.logger.info(" 2. npm install -g @anthropic-ai/claude-code (if curl fails)");
|
|
2872
2846
|
import_devkit7.logger.info(" 3. Manual instructions (if both fail)");
|
|
2873
2847
|
}
|
|
2874
2848
|
const installMode = options.installMode;
|
|
2875
2849
|
if (installMode === "default") {
|
|
2876
2850
|
import_devkit7.logger.info("\u{1F4E6} Default Installation Mode");
|
|
2877
|
-
import_devkit7.logger.info(
|
|
2878
|
-
" Installing recommended setup with pre-selected components\n"
|
|
2879
|
-
);
|
|
2851
|
+
import_devkit7.logger.info(" Installing recommended setup with pre-selected components\n");
|
|
2880
2852
|
options.installMode = "default";
|
|
2881
2853
|
options.installationType = "global";
|
|
2882
2854
|
options.commands = DEFAULT_COMMANDS;
|
|
@@ -2905,16 +2877,10 @@ async function initGenerator(tree, options) {
|
|
|
2905
2877
|
}
|
|
2906
2878
|
const schemaPath = path5.join(__dirname, "schema.json");
|
|
2907
2879
|
const commandDescriptions = Object.fromEntries(
|
|
2908
|
-
Object.entries(commands).map(([key, value]) => [
|
|
2909
|
-
key,
|
|
2910
|
-
value.description
|
|
2911
|
-
])
|
|
2880
|
+
Object.entries(commands).map(([key, value]) => [key, value.description])
|
|
2912
2881
|
);
|
|
2913
2882
|
const agentDescriptions = Object.fromEntries(
|
|
2914
|
-
Object.entries(agents).map(([key, value]) => [
|
|
2915
|
-
key,
|
|
2916
|
-
value.description
|
|
2917
|
-
])
|
|
2883
|
+
Object.entries(agents).map(([key, value]) => [key, value.description])
|
|
2918
2884
|
);
|
|
2919
2885
|
const homeDir = os4.homedir();
|
|
2920
2886
|
const globalDir = path5.join(homeDir, ".claude");
|
|
@@ -2924,21 +2890,13 @@ async function initGenerator(tree, options) {
|
|
|
2924
2890
|
"commands",
|
|
2925
2891
|
Object.keys(commands)
|
|
2926
2892
|
);
|
|
2927
|
-
const globalExistingAgents = checkExistingFiles(
|
|
2928
|
-
globalDir,
|
|
2929
|
-
"agents",
|
|
2930
|
-
Object.keys(agents)
|
|
2931
|
-
);
|
|
2893
|
+
const globalExistingAgents = checkExistingFiles(globalDir, "agents", Object.keys(agents));
|
|
2932
2894
|
const localExistingCommands = checkExistingFiles(
|
|
2933
2895
|
localDir,
|
|
2934
2896
|
"commands",
|
|
2935
2897
|
Object.keys(commands)
|
|
2936
2898
|
);
|
|
2937
|
-
const localExistingAgents = checkExistingFiles(
|
|
2938
|
-
localDir,
|
|
2939
|
-
"agents",
|
|
2940
|
-
Object.keys(agents)
|
|
2941
|
-
);
|
|
2899
|
+
const localExistingAgents = checkExistingFiles(localDir, "agents", Object.keys(agents));
|
|
2942
2900
|
const optionsWithNoInteractive = {
|
|
2943
2901
|
...options,
|
|
2944
2902
|
"no-interactive": nxNoInteractiveProvided || options.nonInteractive
|
|
@@ -2975,15 +2933,11 @@ async function initGenerator(tree, options) {
|
|
|
2975
2933
|
}
|
|
2976
2934
|
if (normalizedOptions.commandSelectionMode === "all") {
|
|
2977
2935
|
normalizedOptions.commands = Object.keys(commands);
|
|
2978
|
-
import_devkit7.logger.info(
|
|
2979
|
-
`\u{1F4DD} All commands selected (${normalizedOptions.commands.length} total)`
|
|
2980
|
-
);
|
|
2936
|
+
import_devkit7.logger.info(`\u{1F4DD} All commands selected (${normalizedOptions.commands.length} total)`);
|
|
2981
2937
|
}
|
|
2982
2938
|
if (normalizedOptions.agentSelectionMode === "all") {
|
|
2983
2939
|
normalizedOptions.agents = Object.keys(agents);
|
|
2984
|
-
import_devkit7.logger.info(
|
|
2985
|
-
`\u{1F916} All agents selected (${normalizedOptions.agents.length} total)`
|
|
2986
|
-
);
|
|
2940
|
+
import_devkit7.logger.info(`\u{1F916} All agents selected (${normalizedOptions.agents.length} total)`);
|
|
2987
2941
|
}
|
|
2988
2942
|
if (normalizedOptions.installCommands === false) {
|
|
2989
2943
|
normalizedOptions.commands = [];
|
|
@@ -3018,24 +2972,14 @@ async function initGenerator(tree, options) {
|
|
|
3018
2972
|
const commandsToInstall = normalizedOptions.commands || [];
|
|
3019
2973
|
for (const commandName of commandsToInstall) {
|
|
3020
2974
|
let sourcePath = null;
|
|
3021
|
-
const bundledContentDir = path5.join(
|
|
3022
|
-
__dirname,
|
|
3023
|
-
"..",
|
|
3024
|
-
"..",
|
|
3025
|
-
"content",
|
|
3026
|
-
"commands"
|
|
3027
|
-
);
|
|
2975
|
+
const bundledContentDir = path5.join(__dirname, "..", "..", "content", "commands");
|
|
3028
2976
|
if (fs5.existsSync(bundledContentDir)) {
|
|
3029
2977
|
const contentSubDirs = fs5.readdirSync(bundledContentDir).filter((item) => {
|
|
3030
2978
|
const itemPath = path5.join(bundledContentDir, item);
|
|
3031
2979
|
return fs5.statSync(itemPath).isDirectory();
|
|
3032
2980
|
});
|
|
3033
2981
|
for (const subDir of contentSubDirs) {
|
|
3034
|
-
const potentialPath = path5.join(
|
|
3035
|
-
bundledContentDir,
|
|
3036
|
-
subDir,
|
|
3037
|
-
`${commandName}.md`
|
|
3038
|
-
);
|
|
2982
|
+
const potentialPath = path5.join(bundledContentDir, subDir, `${commandName}.md`);
|
|
3039
2983
|
if (fs5.existsSync(potentialPath)) {
|
|
3040
2984
|
sourcePath = potentialPath;
|
|
3041
2985
|
break;
|
|
@@ -3050,12 +2994,7 @@ async function initGenerator(tree, options) {
|
|
|
3050
2994
|
return fs5.statSync(itemPath).isDirectory();
|
|
3051
2995
|
});
|
|
3052
2996
|
for (const subDir of commandSubDirs) {
|
|
3053
|
-
const potentialPath = path5.join(
|
|
3054
|
-
commandsBaseDir,
|
|
3055
|
-
subDir,
|
|
3056
|
-
"src",
|
|
3057
|
-
`${commandName}.md`
|
|
3058
|
-
);
|
|
2997
|
+
const potentialPath = path5.join(commandsBaseDir, subDir, "src", `${commandName}.md`);
|
|
3059
2998
|
if (fs5.existsSync(potentialPath)) {
|
|
3060
2999
|
sourcePath = potentialPath;
|
|
3061
3000
|
break;
|
|
@@ -3064,10 +3003,7 @@ async function initGenerator(tree, options) {
|
|
|
3064
3003
|
}
|
|
3065
3004
|
}
|
|
3066
3005
|
const destPath = path5.join(commandsDir, `${commandName}.md`);
|
|
3067
|
-
const relativeDestPath = path5.join(
|
|
3068
|
-
relativeCommandsDir,
|
|
3069
|
-
`${commandName}.md`
|
|
3070
|
-
);
|
|
3006
|
+
const relativeDestPath = path5.join(relativeCommandsDir, `${commandName}.md`);
|
|
3071
3007
|
try {
|
|
3072
3008
|
if (sourcePath && fs5.existsSync(sourcePath)) {
|
|
3073
3009
|
const content = fs5.readFileSync(sourcePath, "utf-8");
|
|
@@ -3086,24 +3022,14 @@ async function initGenerator(tree, options) {
|
|
|
3086
3022
|
const agentsToInstall = normalizedOptions.agents || [];
|
|
3087
3023
|
for (const agentName of agentsToInstall) {
|
|
3088
3024
|
let sourcePath = null;
|
|
3089
|
-
const bundledContentDir = path5.join(
|
|
3090
|
-
__dirname,
|
|
3091
|
-
"..",
|
|
3092
|
-
"..",
|
|
3093
|
-
"content",
|
|
3094
|
-
"agents"
|
|
3095
|
-
);
|
|
3025
|
+
const bundledContentDir = path5.join(__dirname, "..", "..", "content", "agents");
|
|
3096
3026
|
if (fs5.existsSync(bundledContentDir)) {
|
|
3097
3027
|
const contentSubDirs = fs5.readdirSync(bundledContentDir).filter((item) => {
|
|
3098
3028
|
const itemPath = path5.join(bundledContentDir, item);
|
|
3099
3029
|
return fs5.statSync(itemPath).isDirectory();
|
|
3100
3030
|
});
|
|
3101
3031
|
for (const subDir of contentSubDirs) {
|
|
3102
|
-
const potentialPath = path5.join(
|
|
3103
|
-
bundledContentDir,
|
|
3104
|
-
subDir,
|
|
3105
|
-
`${agentName}.md`
|
|
3106
|
-
);
|
|
3032
|
+
const potentialPath = path5.join(bundledContentDir, subDir, `${agentName}.md`);
|
|
3107
3033
|
if (fs5.existsSync(potentialPath)) {
|
|
3108
3034
|
sourcePath = potentialPath;
|
|
3109
3035
|
break;
|
|
@@ -3118,12 +3044,7 @@ async function initGenerator(tree, options) {
|
|
|
3118
3044
|
return fs5.statSync(itemPath).isDirectory();
|
|
3119
3045
|
});
|
|
3120
3046
|
for (const subDir of agentSubDirs) {
|
|
3121
|
-
const potentialPath = path5.join(
|
|
3122
|
-
agentsBaseDir,
|
|
3123
|
-
subDir,
|
|
3124
|
-
"src",
|
|
3125
|
-
`${agentName}.md`
|
|
3126
|
-
);
|
|
3047
|
+
const potentialPath = path5.join(agentsBaseDir, subDir, "src", `${agentName}.md`);
|
|
3127
3048
|
if (fs5.existsSync(potentialPath)) {
|
|
3128
3049
|
sourcePath = potentialPath;
|
|
3129
3050
|
break;
|
|
@@ -3164,9 +3085,7 @@ async function initGenerator(tree, options) {
|
|
|
3164
3085
|
import_devkit7.logger.info(" - Add update check script to your shell configuration");
|
|
3165
3086
|
import_devkit7.logger.info(" - Checks once per week for new versions");
|
|
3166
3087
|
import_devkit7.logger.info(" - Runs in background (non-blocking)");
|
|
3167
|
-
import_devkit7.logger.info(
|
|
3168
|
-
" - Can be disabled with: export AI_TOOLKIT_SKIP_UPDATE_CHECK=1"
|
|
3169
|
-
);
|
|
3088
|
+
import_devkit7.logger.info(" - Can be disabled with: export AI_TOOLKIT_SKIP_UPDATE_CHECK=1");
|
|
3170
3089
|
return;
|
|
3171
3090
|
}
|
|
3172
3091
|
if (!isDryRun) {
|
|
@@ -3192,7 +3111,7 @@ async function initGenerator(tree, options) {
|
|
|
3192
3111
|
} catch (error) {
|
|
3193
3112
|
import_devkit7.logger.warn(`\u26A0\uFE0F Failed to install update checker: ${error}`);
|
|
3194
3113
|
import_devkit7.logger.info(
|
|
3195
|
-
"This is a bug in ai-toolkit, please report it
|
|
3114
|
+
"This is a bug in ai-toolkit, please report it at https://github.com/Uniswap/ai-toolkit/issues"
|
|
3196
3115
|
);
|
|
3197
3116
|
}
|
|
3198
3117
|
if (normalizedOptions.installHooks) {
|
|
@@ -3232,7 +3151,8 @@ async function initGenerator(tree, options) {
|
|
|
3232
3151
|
skipVerification: false,
|
|
3233
3152
|
dashboardMode: "always",
|
|
3234
3153
|
port: 0,
|
|
3235
|
-
installMode: normalizedOptions.addonSelectionMode === "specific" ? "custom" : "default"
|
|
3154
|
+
installMode: normalizedOptions.addonSelectionMode === "specific" ? "custom" : "default",
|
|
3155
|
+
installationType: normalizedOptions.installationType || "global"
|
|
3236
3156
|
});
|
|
3237
3157
|
import_devkit7.logger.info("\u2705 Addons installed successfully");
|
|
3238
3158
|
addonsInstalled = true;
|
|
@@ -3257,15 +3177,11 @@ async function initGenerator(tree, options) {
|
|
|
3257
3177
|
}
|
|
3258
3178
|
} else {
|
|
3259
3179
|
if (normalizedOptions.installHooks) {
|
|
3260
|
-
import_devkit7.logger.info(
|
|
3261
|
-
"\n\u{1F50D} DRY RUN: Would install notification hooks (sound mode)"
|
|
3262
|
-
);
|
|
3180
|
+
import_devkit7.logger.info("\n\u{1F50D} DRY RUN: Would install notification hooks (sound mode)");
|
|
3263
3181
|
}
|
|
3264
3182
|
const installAddonsExplicit = explicitlyProvided.has("installAddons") || explicitlyProvided.has("install-addons");
|
|
3265
3183
|
if (normalizedOptions.installMode === "custom" && !installAddonsExplicit && !normalizedOptions.nonInteractive) {
|
|
3266
|
-
import_devkit7.logger.info(
|
|
3267
|
-
"\n\u{1F50D} DRY RUN: Would prompt to install spec-mcp-workflow addon after hooks"
|
|
3268
|
-
);
|
|
3184
|
+
import_devkit7.logger.info("\n\u{1F50D} DRY RUN: Would prompt to install spec-mcp-workflow addon after hooks");
|
|
3269
3185
|
} else if (normalizedOptions.installAddons) {
|
|
3270
3186
|
import_devkit7.logger.info("\n\u{1F50D} DRY RUN: Would install spec-mcp-workflow addon");
|
|
3271
3187
|
}
|
|
@@ -3359,9 +3275,7 @@ async function verifyInstallation2(method) {
|
|
|
3359
3275
|
import_devkit7.logger.info('You can also run "claude --version" to verify');
|
|
3360
3276
|
} catch {
|
|
3361
3277
|
import_devkit7.logger.warn("\u26A0\uFE0F Claude CLI not found in PATH");
|
|
3362
|
-
import_devkit7.logger.info(
|
|
3363
|
-
"You may need to restart your terminal or add Claude to your PATH"
|
|
3364
|
-
);
|
|
3278
|
+
import_devkit7.logger.info("You may need to restart your terminal or add Claude to your PATH");
|
|
3365
3279
|
}
|
|
3366
3280
|
}
|
|
3367
3281
|
function provideManualInstructions() {
|
|
@@ -3369,12 +3283,8 @@ function provideManualInstructions() {
|
|
|
3369
3283
|
import_devkit7.logger.info("\n\u{1F4DA} Manual Installation Instructions:");
|
|
3370
3284
|
import_devkit7.logger.info("1. Via curl: curl -fsSL https://claude.ai/install.sh | bash");
|
|
3371
3285
|
import_devkit7.logger.info("2. Via npm: npm install -g @anthropic-ai/claude-code");
|
|
3372
|
-
import_devkit7.logger.info(
|
|
3373
|
-
|
|
3374
|
-
);
|
|
3375
|
-
import_devkit7.logger.info(
|
|
3376
|
-
'\nFor troubleshooting, run "claude doctor" after manual installation'
|
|
3377
|
-
);
|
|
3286
|
+
import_devkit7.logger.info("3. Visit: https://claude.ai/download for platform-specific instructions");
|
|
3287
|
+
import_devkit7.logger.info('\nFor troubleshooting, run "claude doctor" after manual installation');
|
|
3378
3288
|
}
|
|
3379
3289
|
var generator_default2 = initGenerator;
|
|
3380
3290
|
// Annotate the CommonJS export names for ESM import in node:
|