@minhluudev/ai-tools 1.0.3 → 1.0.5
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/src/cli.js +42 -2
- package/dist/src/lib/ai-libs.js +314 -0
- package/dist/src/lib/tui-ai-libs.js +527 -0
- package/dist/src/lib/tui-entry-menu.js +2 -2
- package/package.json +1 -1
- package/selection-catalog.json +7 -0
package/dist/src/cli.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as process from "node:process";
|
|
2
|
+
import { buildLibInstallPlan, executeLibInstallPlan } from "./lib/ai-libs.js";
|
|
2
3
|
import { loadPackageConfig } from "./lib/config.js";
|
|
3
4
|
import { createGitHubClient } from "./lib/github.js";
|
|
4
5
|
import { detectExistingTargets, installPlannedItems, installProjectDocsItems, planInstallations, planProjectDocsInstallations, resolveInstallRoot, resolveProjectDocsRoot } from "./lib/install.js";
|
|
5
6
|
import { loadProjectDocsCatalog } from "./lib/project-docs-catalog.js";
|
|
6
7
|
import { loadSelectionCatalog, resolveSelectionItems } from "./lib/selection-catalog.js";
|
|
7
8
|
import { blessedConfirm } from "./lib/tui-utils.js";
|
|
9
|
+
import { runAiLibsWizard } from "./lib/tui-ai-libs.js";
|
|
8
10
|
import { runEntryMenu } from "./lib/tui-entry-menu.js";
|
|
9
11
|
import { runProjectDocsWizard } from "./lib/tui-project-docs.js";
|
|
10
12
|
import { runTabbedWizard } from "./lib/tui-wizard.js";
|
|
@@ -133,6 +135,16 @@ function printProjectDocsSelectionSummary(input) {
|
|
|
133
135
|
["Install root", resolveProjectDocsRoot(input.cwd)]
|
|
134
136
|
]);
|
|
135
137
|
}
|
|
138
|
+
function printLibInstallSelectionSummary(plan) {
|
|
139
|
+
printLabeledRows("Selected items", [
|
|
140
|
+
["Mode", plan.mode],
|
|
141
|
+
["Libraries", plan.libraries.length ? plan.libraries.join(", ") : "none"],
|
|
142
|
+
["Agents", plan.agents.length ? plan.agents.join(", ") : "none"],
|
|
143
|
+
["OS", plan.os],
|
|
144
|
+
["Scope", plan.scope],
|
|
145
|
+
["Host OS", plan.hostOs ?? "unsupported"]
|
|
146
|
+
]);
|
|
147
|
+
}
|
|
136
148
|
export async function runCli() {
|
|
137
149
|
while (true) {
|
|
138
150
|
const entryAction = await runEntryMenu();
|
|
@@ -140,8 +152,36 @@ export async function runCli() {
|
|
|
140
152
|
return;
|
|
141
153
|
}
|
|
142
154
|
if (entryAction === "install-libs") {
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
const libsResult = await runAiLibsWizard();
|
|
156
|
+
if ("backToMenu" in libsResult) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
const plan = buildLibInstallPlan({
|
|
160
|
+
mode: libsResult.mode,
|
|
161
|
+
os: libsResult.os,
|
|
162
|
+
scope: libsResult.scope,
|
|
163
|
+
agents: libsResult.agents,
|
|
164
|
+
libraries: libsResult.libraries
|
|
165
|
+
});
|
|
166
|
+
printSectionHeader("Install libs for AI", libsResult.mode === "install"
|
|
167
|
+
? "Preparing upstream RTK and ICM installers."
|
|
168
|
+
: "Preparing safe RTK and ICM removal steps.");
|
|
169
|
+
printLibInstallSelectionSummary(plan);
|
|
170
|
+
if (plan.notes.length > 0) {
|
|
171
|
+
printBulletPanel("Notes", plan.notes, "warning");
|
|
172
|
+
}
|
|
173
|
+
printBulletPanel(`Execution plan (${plan.steps.length})`, plan.steps.map((step) => `${step.title}: ${step.command}`), "muted");
|
|
174
|
+
printStatusLine(plan.mode === "install" ? "install" : "uninstall", plan.mode === "install"
|
|
175
|
+
? "Running selected library installers and setup commands..."
|
|
176
|
+
: "Running selected library cleanup and uninstall commands...");
|
|
177
|
+
await executeLibInstallPlan({
|
|
178
|
+
cwd: process.cwd(),
|
|
179
|
+
plan,
|
|
180
|
+
onProgress(step) {
|
|
181
|
+
printStatusLine("run", `${step.title} -> ${step.command}`, "muted");
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
printBulletPanel(`Install complete (${plan.steps.length})`, plan.steps.map((step) => step.title), "success");
|
|
145
185
|
return;
|
|
146
186
|
}
|
|
147
187
|
if (entryAction === "install-project-docs") {
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { rm, stat, writeFile, readFile } from "node:fs/promises";
|
|
2
|
+
import * as os from "node:os";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
5
|
+
const ICM_INSTALL_COMMAND = "curl -fsSL https://raw.githubusercontent.com/rtk-ai/icm/main/install.sh | sh";
|
|
6
|
+
const RTK_INSTALL_COMMAND = "curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh";
|
|
7
|
+
const ICM_MARKER_START = "<!-- icm:start -->";
|
|
8
|
+
const ICM_MARKER_END = "<!-- icm:end -->";
|
|
9
|
+
export function detectSupportedHostOs(platform = process.platform) {
|
|
10
|
+
if (platform === "darwin") {
|
|
11
|
+
return "mac";
|
|
12
|
+
}
|
|
13
|
+
if (platform === "linux") {
|
|
14
|
+
return "linux";
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
function uniq(items) {
|
|
19
|
+
return [...new Set(items)];
|
|
20
|
+
}
|
|
21
|
+
function quickInstallBinaryPath(binaryName) {
|
|
22
|
+
return path.join(os.homedir(), ".local", "bin", binaryName);
|
|
23
|
+
}
|
|
24
|
+
function buildRtkInstallSteps(agents, scope) {
|
|
25
|
+
const steps = [
|
|
26
|
+
{
|
|
27
|
+
id: "rtk-install",
|
|
28
|
+
library: "rtk",
|
|
29
|
+
phase: "install",
|
|
30
|
+
title: "Install RTK binary",
|
|
31
|
+
description: "Install the upstream RTK binary with the verified quick installer.",
|
|
32
|
+
command: RTK_INSTALL_COMMAND,
|
|
33
|
+
runner: "shell"
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
if (agents.includes("claude")) {
|
|
37
|
+
steps.push({
|
|
38
|
+
id: "rtk-configure-claude",
|
|
39
|
+
library: "rtk",
|
|
40
|
+
phase: "configure",
|
|
41
|
+
title: "Configure RTK for Claude",
|
|
42
|
+
description: scope === "global"
|
|
43
|
+
? "Install RTK's Claude-oriented global integration."
|
|
44
|
+
: "Install RTK's Claude-oriented local integration for the current project.",
|
|
45
|
+
command: scope === "global" ? "rtk init -g" : "rtk init",
|
|
46
|
+
runner: "shell"
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (agents.includes("codex")) {
|
|
50
|
+
steps.push({
|
|
51
|
+
id: "rtk-configure-codex",
|
|
52
|
+
library: "rtk",
|
|
53
|
+
phase: "configure",
|
|
54
|
+
title: "Configure RTK for Codex",
|
|
55
|
+
description: scope === "global"
|
|
56
|
+
? "Install RTK's Codex hook configuration."
|
|
57
|
+
: "Install RTK's Codex hook configuration for the current project.",
|
|
58
|
+
command: scope === "global" ? "rtk init -g --codex" : "rtk init --codex",
|
|
59
|
+
runner: "shell"
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return steps;
|
|
63
|
+
}
|
|
64
|
+
function buildRtkUninstallSteps(agents, scope) {
|
|
65
|
+
const steps = [];
|
|
66
|
+
if (agents.includes("claude")) {
|
|
67
|
+
steps.push({
|
|
68
|
+
id: "rtk-uninstall-claude",
|
|
69
|
+
library: "rtk",
|
|
70
|
+
phase: "uninstall",
|
|
71
|
+
title: "Remove RTK Claude integration",
|
|
72
|
+
description: scope === "global"
|
|
73
|
+
? "Remove RTK global artifacts for the default Claude mode."
|
|
74
|
+
: "Remove RTK local artifacts for the default Claude mode in the current project.",
|
|
75
|
+
command: scope === "global" ? "rtk init -g --uninstall" : "rtk init --uninstall",
|
|
76
|
+
runner: "shell"
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (agents.includes("codex")) {
|
|
80
|
+
steps.push({
|
|
81
|
+
id: "rtk-uninstall-codex",
|
|
82
|
+
library: "rtk",
|
|
83
|
+
phase: "uninstall",
|
|
84
|
+
title: "Remove RTK Codex integration",
|
|
85
|
+
description: scope === "global"
|
|
86
|
+
? "Remove RTK global Codex artifacts."
|
|
87
|
+
: "Remove RTK local Codex artifacts in the current project.",
|
|
88
|
+
command: scope === "global" ? "rtk init -g --codex --uninstall" : "rtk init --codex --uninstall",
|
|
89
|
+
runner: "shell"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (scope === "global") {
|
|
93
|
+
steps.push({
|
|
94
|
+
id: "rtk-remove-binary",
|
|
95
|
+
library: "rtk",
|
|
96
|
+
phase: "cleanup",
|
|
97
|
+
title: "Remove RTK quick-install binary",
|
|
98
|
+
description: "Delete the RTK binary only from the standard quick-install path if it exists there.",
|
|
99
|
+
command: `remove ${quickInstallBinaryPath("rtk")}`,
|
|
100
|
+
runner: "remove-binary",
|
|
101
|
+
path: quickInstallBinaryPath("rtk")
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return steps;
|
|
105
|
+
}
|
|
106
|
+
function buildGlobalIcmModes(agents) {
|
|
107
|
+
const modes = ["mcp"];
|
|
108
|
+
if (agents.includes("claude")) {
|
|
109
|
+
modes.push("skill", "hook");
|
|
110
|
+
}
|
|
111
|
+
else if (agents.includes("codex")) {
|
|
112
|
+
modes.push("hook");
|
|
113
|
+
}
|
|
114
|
+
return uniq(modes);
|
|
115
|
+
}
|
|
116
|
+
function buildIcmInstallSteps(agents, scope) {
|
|
117
|
+
const selectedAgents = agents.join(" + ");
|
|
118
|
+
const steps = [
|
|
119
|
+
{
|
|
120
|
+
id: "icm-install",
|
|
121
|
+
library: "icm",
|
|
122
|
+
phase: "install",
|
|
123
|
+
title: "Install ICM binary",
|
|
124
|
+
description: "Install the upstream ICM binary with the verified quick installer.",
|
|
125
|
+
command: ICM_INSTALL_COMMAND,
|
|
126
|
+
runner: "shell"
|
|
127
|
+
}
|
|
128
|
+
];
|
|
129
|
+
if (scope === "local") {
|
|
130
|
+
steps.push({
|
|
131
|
+
id: "icm-init-cli-local",
|
|
132
|
+
library: "icm",
|
|
133
|
+
phase: "configure",
|
|
134
|
+
title: "Configure ICM project instructions",
|
|
135
|
+
description: `Inject ICM instructions for the selected agent set (${selectedAgents}) using upstream per-project mode.`,
|
|
136
|
+
command: "icm init --mode cli --per_project",
|
|
137
|
+
runner: "shell"
|
|
138
|
+
});
|
|
139
|
+
return steps;
|
|
140
|
+
}
|
|
141
|
+
for (const mode of buildGlobalIcmModes(agents)) {
|
|
142
|
+
steps.push({
|
|
143
|
+
id: `icm-init-${mode}`,
|
|
144
|
+
library: "icm",
|
|
145
|
+
phase: "configure",
|
|
146
|
+
title: `Configure ICM (${mode})`,
|
|
147
|
+
description: `Run ICM ${mode} setup for the selected agent set (${selectedAgents}).`,
|
|
148
|
+
command: `icm init --mode ${mode}`,
|
|
149
|
+
runner: "shell"
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return steps;
|
|
153
|
+
}
|
|
154
|
+
function buildIcmUninstallSteps(scope) {
|
|
155
|
+
if (scope === "local") {
|
|
156
|
+
return [{
|
|
157
|
+
id: "icm-local-cleanup",
|
|
158
|
+
library: "icm",
|
|
159
|
+
phase: "cleanup",
|
|
160
|
+
title: "Remove ICM project instructions",
|
|
161
|
+
description: "Remove only ICM-managed instruction blocks from the current project's local files.",
|
|
162
|
+
command: "clean ICM blocks from current project",
|
|
163
|
+
runner: "cleanup-icm-local"
|
|
164
|
+
}];
|
|
165
|
+
}
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
export function buildLibInstallPlan(input) {
|
|
169
|
+
const agents = uniq(input.agents);
|
|
170
|
+
const libraries = uniq(input.libraries);
|
|
171
|
+
const hostOs = detectSupportedHostOs(input.platform);
|
|
172
|
+
const steps = [];
|
|
173
|
+
const notes = [];
|
|
174
|
+
for (const library of libraries) {
|
|
175
|
+
if (library === "rtk") {
|
|
176
|
+
if (input.mode === "install") {
|
|
177
|
+
steps.push(...buildRtkInstallSteps(agents, input.scope));
|
|
178
|
+
notes.push("RTK rewrites Bash commands. Built-in non-shell tools are not auto-rewritten.");
|
|
179
|
+
notes.push("RTK uninstall removes RTK-managed assistant artifacts only; it does not edit unrelated shell or editor settings.");
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
steps.push(...buildRtkUninstallSteps(agents, input.scope));
|
|
183
|
+
if (input.scope === "global") {
|
|
184
|
+
notes.push("RTK binary cleanup only removes the quick-install path ~/.local/bin/rtk. Homebrew or cargo installs still require manual removal.");
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
notes.push("RTK local uninstall leaves the global binary in place to avoid breaking other projects or global hooks.");
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if (library === "icm") {
|
|
193
|
+
if (input.mode === "install") {
|
|
194
|
+
steps.push(...buildIcmInstallSteps(agents, input.scope));
|
|
195
|
+
if (input.scope === "global") {
|
|
196
|
+
notes.push("ICM init auto-detects supported tools on this machine and may update more global configs than the selected agent labels alone imply.");
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
notes.push("ICM local mode uses upstream --per_project CLI injection. Depending on upstream behavior, some global instruction files may still be touched.");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
steps.push(...buildIcmUninstallSteps(input.scope));
|
|
204
|
+
if (input.scope === "global") {
|
|
205
|
+
notes.push("Automatic global ICM uninstall is intentionally disabled in this CLI because upstream uninstall removes all detected ICM integrations, not only the selected agents.");
|
|
206
|
+
notes.push("For safest cleanup, run `icm uninstall --audit` manually, review the plan, then use upstream uninstall yourself if the detected scope is acceptable.");
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
notes.push("ICM local uninstall only strips ICM-managed blocks from project files in the current directory and leaves global ICM config untouched.");
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (input.mode === "install") {
|
|
215
|
+
notes.unshift("Binary install still uses the upstream installer and writes to the user's bin directory even when scope is local.");
|
|
216
|
+
}
|
|
217
|
+
if (hostOs && hostOs !== input.os) {
|
|
218
|
+
notes.unshift(`Selected OS is ${input.os}, but the current host is ${hostOs}. The installer always runs against the current machine.`);
|
|
219
|
+
}
|
|
220
|
+
if (!hostOs) {
|
|
221
|
+
notes.unshift("This host OS is not one of the supported Mac/Linux targets. The upstream installers may fail.");
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
mode: input.mode,
|
|
225
|
+
os: input.os,
|
|
226
|
+
hostOs,
|
|
227
|
+
scope: input.scope,
|
|
228
|
+
agents,
|
|
229
|
+
libraries,
|
|
230
|
+
steps,
|
|
231
|
+
notes
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
export async function executeLibInstallPlan(input) {
|
|
235
|
+
for (const step of input.plan.steps) {
|
|
236
|
+
input.onProgress?.(step);
|
|
237
|
+
if (step.runner === "remove-binary") {
|
|
238
|
+
if (!step.path) {
|
|
239
|
+
throw new Error(`Missing path for step "${step.id}".`);
|
|
240
|
+
}
|
|
241
|
+
await removeBinaryAtPath(step.path);
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
if (step.runner === "cleanup-icm-local") {
|
|
245
|
+
await cleanupIcmLocalBlocks(input.cwd);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
await runShellCommand(step.command, input.cwd);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
async function removeBinaryAtPath(targetPath) {
|
|
252
|
+
try {
|
|
253
|
+
const info = await stat(targetPath);
|
|
254
|
+
if (!info.isFile()) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
await rm(targetPath, { force: true });
|
|
262
|
+
}
|
|
263
|
+
async function cleanupIcmLocalBlocks(cwd) {
|
|
264
|
+
const candidateFiles = [
|
|
265
|
+
"CLAUDE.md",
|
|
266
|
+
"AGENTS.md",
|
|
267
|
+
".github/copilot-instructions.md",
|
|
268
|
+
".windsurfrules",
|
|
269
|
+
".aider.conventions.md"
|
|
270
|
+
];
|
|
271
|
+
for (const relativeFile of candidateFiles) {
|
|
272
|
+
const absoluteFile = path.join(cwd, relativeFile);
|
|
273
|
+
let content;
|
|
274
|
+
try {
|
|
275
|
+
content = await readFile(absoluteFile, "utf8");
|
|
276
|
+
}
|
|
277
|
+
catch {
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
const cleaned = stripIcmBlocks(content);
|
|
281
|
+
if (cleaned === content) {
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
if (cleaned.trim().length === 0) {
|
|
285
|
+
await rm(absoluteFile, { force: true });
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
await writeFile(absoluteFile, cleaned, "utf8");
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function stripIcmBlocks(content) {
|
|
292
|
+
const blockPattern = new RegExp(`\\n?${escapeRegExp(ICM_MARKER_START)}[\\s\\S]*?${escapeRegExp(ICM_MARKER_END)}\\n?`, "g");
|
|
293
|
+
const stripped = content.replace(blockPattern, "\n");
|
|
294
|
+
return stripped.replace(/\n{3,}/g, "\n\n").trimEnd() + (stripped.endsWith("\n") ? "\n" : "");
|
|
295
|
+
}
|
|
296
|
+
function escapeRegExp(value) {
|
|
297
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
298
|
+
}
|
|
299
|
+
function runShellCommand(command, cwd) {
|
|
300
|
+
return new Promise((resolve, reject) => {
|
|
301
|
+
const child = spawn("/bin/sh", ["-lc", command], {
|
|
302
|
+
cwd,
|
|
303
|
+
stdio: "inherit"
|
|
304
|
+
});
|
|
305
|
+
child.on("error", reject);
|
|
306
|
+
child.on("close", (code) => {
|
|
307
|
+
if (code === 0) {
|
|
308
|
+
resolve();
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
reject(new Error(`Command failed with exit code ${code}: ${command}`));
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
}
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { buildLibInstallPlan, detectSupportedHostOs } from "./ai-libs.js";
|
|
2
|
+
import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderStepSummary, renderTabBar, selectionArray } from "./tui-utils.js";
|
|
3
|
+
const TAB_ORDER = ["libraries", "agents", "os", "scope", "mode", "review"];
|
|
4
|
+
function buildInitialState() {
|
|
5
|
+
return {
|
|
6
|
+
activeTab: "libraries",
|
|
7
|
+
selectedLibraries: new Set(),
|
|
8
|
+
selectedAgents: new Set(),
|
|
9
|
+
selectedOs: detectSupportedHostOs(),
|
|
10
|
+
selectedScope: "global",
|
|
11
|
+
selectedMode: "install",
|
|
12
|
+
listCursor: {
|
|
13
|
+
libraries: 0,
|
|
14
|
+
agents: 0,
|
|
15
|
+
os: 0,
|
|
16
|
+
scope: 0,
|
|
17
|
+
mode: 0,
|
|
18
|
+
review: 0
|
|
19
|
+
},
|
|
20
|
+
reviewAction: "confirm",
|
|
21
|
+
notice: ""
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function currentTabItems(state) {
|
|
25
|
+
if (state.activeTab === "libraries") {
|
|
26
|
+
return [
|
|
27
|
+
{
|
|
28
|
+
id: "rtk",
|
|
29
|
+
label: "Install rtk-ai/rtk",
|
|
30
|
+
description: "Token-saving CLI proxy with agent-specific init for Codex and Claude.",
|
|
31
|
+
kind: "library"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "icm",
|
|
35
|
+
label: "Install rtk-ai/icm",
|
|
36
|
+
description: "Persistent agent memory with MCP, CLI instructions, rules, and hooks.",
|
|
37
|
+
kind: "library"
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
if (state.activeTab === "agents") {
|
|
42
|
+
return [
|
|
43
|
+
{
|
|
44
|
+
id: "codex",
|
|
45
|
+
label: "codex",
|
|
46
|
+
description: "Configure the OpenAI Codex integration paths when supported upstream.",
|
|
47
|
+
kind: "agents"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "claude",
|
|
51
|
+
label: "claude",
|
|
52
|
+
description: "Configure the Claude integration paths when supported upstream.",
|
|
53
|
+
kind: "agents"
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
if (state.activeTab === "os") {
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
60
|
+
id: "mac",
|
|
61
|
+
label: "mac",
|
|
62
|
+
description: "Run the install flow for a macOS host.",
|
|
63
|
+
kind: "os"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "linux",
|
|
67
|
+
label: "linux",
|
|
68
|
+
description: "Run the install flow for a Linux host.",
|
|
69
|
+
kind: "os"
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
if (state.activeTab === "scope") {
|
|
74
|
+
return [
|
|
75
|
+
{
|
|
76
|
+
id: "global",
|
|
77
|
+
label: "global",
|
|
78
|
+
description: "Use global agent configuration in home-directory tool config files.",
|
|
79
|
+
kind: "scope"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "local",
|
|
83
|
+
label: "local",
|
|
84
|
+
description: "Use project-scoped setup where the upstream library supports it.",
|
|
85
|
+
kind: "scope"
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
if (state.activeTab === "mode") {
|
|
90
|
+
return [
|
|
91
|
+
{
|
|
92
|
+
id: "install",
|
|
93
|
+
label: "Install",
|
|
94
|
+
description: "Install the selected libraries and configure the chosen integrations.",
|
|
95
|
+
kind: "mode"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "uninstall",
|
|
99
|
+
label: "Uninstall",
|
|
100
|
+
description: "Remove library-managed integrations safely and clean up only library-specific artifacts.",
|
|
101
|
+
kind: "mode"
|
|
102
|
+
}
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
return [
|
|
106
|
+
{
|
|
107
|
+
id: "confirm",
|
|
108
|
+
label: "Confirm install",
|
|
109
|
+
description: "Run the planned install and configuration commands.",
|
|
110
|
+
kind: "review"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "back",
|
|
114
|
+
label: "Back to main menu",
|
|
115
|
+
description: "Leave this installer and return to the main menu.",
|
|
116
|
+
kind: "review"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "cancel",
|
|
120
|
+
label: "Cancel",
|
|
121
|
+
description: "Exit without installing anything.",
|
|
122
|
+
kind: "review"
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
function isItemSelected(item, state) {
|
|
127
|
+
if (item.kind === "library") {
|
|
128
|
+
return state.selectedLibraries.has(item.id);
|
|
129
|
+
}
|
|
130
|
+
if (item.kind === "agents") {
|
|
131
|
+
return state.selectedAgents.has(item.id);
|
|
132
|
+
}
|
|
133
|
+
if (item.kind === "os") {
|
|
134
|
+
return state.selectedOs === item.id;
|
|
135
|
+
}
|
|
136
|
+
if (item.kind === "scope") {
|
|
137
|
+
return state.selectedScope === item.id;
|
|
138
|
+
}
|
|
139
|
+
if (item.kind === "mode") {
|
|
140
|
+
return state.selectedMode === item.id;
|
|
141
|
+
}
|
|
142
|
+
return state.reviewAction === item.id;
|
|
143
|
+
}
|
|
144
|
+
function toggleItem(item, state) {
|
|
145
|
+
if (item.kind === "library") {
|
|
146
|
+
if (state.selectedLibraries.has(item.id)) {
|
|
147
|
+
state.selectedLibraries.delete(item.id);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
state.selectedLibraries.add(item.id);
|
|
151
|
+
}
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (item.kind === "agents") {
|
|
155
|
+
const agent = item.id;
|
|
156
|
+
if (state.selectedAgents.has(agent)) {
|
|
157
|
+
state.selectedAgents.delete(agent);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
state.selectedAgents.add(agent);
|
|
161
|
+
}
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (item.kind === "os") {
|
|
165
|
+
state.selectedOs = item.id;
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (item.kind === "scope") {
|
|
169
|
+
state.selectedScope = item.id;
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (item.kind === "mode") {
|
|
173
|
+
state.selectedMode = item.id;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
state.reviewAction = item.id;
|
|
177
|
+
}
|
|
178
|
+
function renderTabs(state) {
|
|
179
|
+
const counts = {
|
|
180
|
+
libraries: state.selectedLibraries.size,
|
|
181
|
+
agents: state.selectedAgents.size,
|
|
182
|
+
os: state.selectedOs ? 1 : 0,
|
|
183
|
+
scope: 1,
|
|
184
|
+
mode: 1,
|
|
185
|
+
review: state.reviewAction === "confirm" ? 1 : 0
|
|
186
|
+
};
|
|
187
|
+
return renderTabBar(TAB_ORDER.map((tab, index) => ({
|
|
188
|
+
label: `${index + 1}. ${tab === "os" ? "OS" : tab.charAt(0).toUpperCase() + tab.slice(1)}`,
|
|
189
|
+
meta: tab === "review" ? "ready" : `${counts[tab]} selected`,
|
|
190
|
+
active: state.activeTab === tab
|
|
191
|
+
})));
|
|
192
|
+
}
|
|
193
|
+
function formatListItem(item, state, isCursorRow, index) {
|
|
194
|
+
if (item.kind === "review") {
|
|
195
|
+
return renderListRow({
|
|
196
|
+
active: isCursorRow,
|
|
197
|
+
selected: state.reviewAction === item.id,
|
|
198
|
+
label: item.label,
|
|
199
|
+
meta: item.description,
|
|
200
|
+
index
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
return renderListRow({
|
|
204
|
+
active: isCursorRow,
|
|
205
|
+
selected: isItemSelected(item, state),
|
|
206
|
+
label: item.label,
|
|
207
|
+
meta: item.description,
|
|
208
|
+
index
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function renderReviewSummary(state) {
|
|
212
|
+
const selectedLibraries = selectionArray(state.selectedLibraries);
|
|
213
|
+
const selectedAgents = selectionArray(state.selectedAgents);
|
|
214
|
+
const lines = [
|
|
215
|
+
"{bold}Selections{/bold}",
|
|
216
|
+
`Libraries ${selectedLibraries.length ? selectedLibraries.join(", ") : "none"}`,
|
|
217
|
+
`Agents ${selectedAgents.length ? selectedAgents.join(", ") : "none"}`,
|
|
218
|
+
`OS ${state.selectedOs ?? "none"}`,
|
|
219
|
+
`Scope ${state.selectedScope}`,
|
|
220
|
+
`Mode ${state.selectedMode}`
|
|
221
|
+
];
|
|
222
|
+
if (selectedLibraries.length > 0 && selectedAgents.length > 0 && state.selectedOs) {
|
|
223
|
+
const plan = buildLibInstallPlan({
|
|
224
|
+
mode: state.selectedMode,
|
|
225
|
+
os: state.selectedOs,
|
|
226
|
+
scope: state.selectedScope,
|
|
227
|
+
agents: selectedAgents,
|
|
228
|
+
libraries: selectedLibraries
|
|
229
|
+
});
|
|
230
|
+
lines.push("", "{bold}Planned steps{/bold}");
|
|
231
|
+
for (const step of plan.steps) {
|
|
232
|
+
lines.push(`- ${step.title}`);
|
|
233
|
+
}
|
|
234
|
+
if (plan.notes.length > 0) {
|
|
235
|
+
lines.push("", "{bold}Notes{/bold}");
|
|
236
|
+
for (const note of plan.notes) {
|
|
237
|
+
lines.push(`- ${note}`);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
if (state.notice) {
|
|
242
|
+
lines.push("", `{yellow-fg}${state.notice}{/yellow-fg}`);
|
|
243
|
+
}
|
|
244
|
+
return lines.join("\n");
|
|
245
|
+
}
|
|
246
|
+
function renderDetailBody(state) {
|
|
247
|
+
if (state.activeTab === "review") {
|
|
248
|
+
return renderReviewSummary(state);
|
|
249
|
+
}
|
|
250
|
+
const items = currentTabItems(state);
|
|
251
|
+
const current = items[state.listCursor[state.activeTab]];
|
|
252
|
+
const lines = [];
|
|
253
|
+
if (state.notice) {
|
|
254
|
+
lines.push(`{yellow-fg}${state.notice}{/yellow-fg}`, "");
|
|
255
|
+
}
|
|
256
|
+
if (current) {
|
|
257
|
+
const selectedCount = items.filter((item) => isItemSelected(item, state)).length;
|
|
258
|
+
lines.push("{bold}Selected in this step{/bold}", `${selectedCount} of ${items.length}`, "", "{bold}About current item{/bold}", current.description);
|
|
259
|
+
}
|
|
260
|
+
return lines.join("\n");
|
|
261
|
+
}
|
|
262
|
+
function renderFooter(state) {
|
|
263
|
+
if (state.activeTab === "review") {
|
|
264
|
+
return renderKeycaps([
|
|
265
|
+
{ key: "LEFT/RIGHT", label: "switch tab" },
|
|
266
|
+
{ key: "UP/DOWN", label: "move" },
|
|
267
|
+
{ key: "ENTER", label: "confirm action" },
|
|
268
|
+
{ key: "Q", label: "quit" }
|
|
269
|
+
]);
|
|
270
|
+
}
|
|
271
|
+
return renderKeycaps([
|
|
272
|
+
{ key: "LEFT/RIGHT", label: "switch tab" },
|
|
273
|
+
{ key: "UP/DOWN", label: "move" },
|
|
274
|
+
{ key: "SPACE", label: "toggle" },
|
|
275
|
+
{ key: "A", label: "toggle all" },
|
|
276
|
+
{ key: "Q", label: "quit" }
|
|
277
|
+
]);
|
|
278
|
+
}
|
|
279
|
+
function setNotice(state, message) {
|
|
280
|
+
state.notice = message;
|
|
281
|
+
}
|
|
282
|
+
function moveTab(state, delta) {
|
|
283
|
+
const index = TAB_ORDER.indexOf(state.activeTab);
|
|
284
|
+
const nextIndex = (index + delta + TAB_ORDER.length) % TAB_ORDER.length;
|
|
285
|
+
state.activeTab = TAB_ORDER[nextIndex];
|
|
286
|
+
state.notice = "";
|
|
287
|
+
}
|
|
288
|
+
function moveCursor(state, delta) {
|
|
289
|
+
const items = currentTabItems(state);
|
|
290
|
+
if (items.length === 0) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const current = state.listCursor[state.activeTab];
|
|
294
|
+
const next = (current + delta + items.length) % items.length;
|
|
295
|
+
state.listCursor[state.activeTab] = next;
|
|
296
|
+
if (state.activeTab === "review") {
|
|
297
|
+
state.reviewAction = items[next]?.id;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function toggleCurrentItem(state) {
|
|
301
|
+
if (state.activeTab === "review") {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const items = currentTabItems(state);
|
|
305
|
+
const current = items[state.listCursor[state.activeTab]];
|
|
306
|
+
if (!current) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
toggleItem(current, state);
|
|
310
|
+
}
|
|
311
|
+
function validateBeforeConfirm(state) {
|
|
312
|
+
if (state.selectedLibraries.size === 0) {
|
|
313
|
+
return "Select at least one library before confirming.";
|
|
314
|
+
}
|
|
315
|
+
if (state.selectedAgents.size === 0) {
|
|
316
|
+
return "Select at least one agent before confirming.";
|
|
317
|
+
}
|
|
318
|
+
if (!state.selectedOs) {
|
|
319
|
+
return "Select one OS target before confirming.";
|
|
320
|
+
}
|
|
321
|
+
if (!state.selectedScope) {
|
|
322
|
+
return "Select one scope before confirming.";
|
|
323
|
+
}
|
|
324
|
+
if (!state.selectedMode) {
|
|
325
|
+
return "Select one mode before confirming.";
|
|
326
|
+
}
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
function syncListSelection(listBox, state) {
|
|
330
|
+
const items = currentTabItems(state);
|
|
331
|
+
const maxIndex = Math.max(items.length - 1, 0);
|
|
332
|
+
const cursor = Math.min(state.listCursor[state.activeTab], maxIndex);
|
|
333
|
+
state.listCursor[state.activeTab] = cursor;
|
|
334
|
+
listBox.setItems(items.map((item, index) => formatListItem(item, state, index === cursor, index)));
|
|
335
|
+
listBox.select(cursor);
|
|
336
|
+
listBox.scrollTo(cursor);
|
|
337
|
+
}
|
|
338
|
+
export async function runAiLibsWizard() {
|
|
339
|
+
return new Promise((resolve, reject) => {
|
|
340
|
+
const state = buildInitialState();
|
|
341
|
+
let lastTabSwitchAt = 0;
|
|
342
|
+
let lastMoveAt = 0;
|
|
343
|
+
let lastToggleAt = 0;
|
|
344
|
+
const { screen, headerBox, tabsBox, titleBox, listBox, detailBox, footerBox } = createTabbedLayout();
|
|
345
|
+
function cleanup() {
|
|
346
|
+
screen.destroy();
|
|
347
|
+
}
|
|
348
|
+
function finishWithError(message) {
|
|
349
|
+
cleanup();
|
|
350
|
+
reject(new Error(message));
|
|
351
|
+
}
|
|
352
|
+
function finishSuccess() {
|
|
353
|
+
if (!state.selectedOs) {
|
|
354
|
+
finishWithError("Missing OS selection.");
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
cleanup();
|
|
358
|
+
resolve({
|
|
359
|
+
libraries: selectionArray(state.selectedLibraries),
|
|
360
|
+
agents: selectionArray(state.selectedAgents),
|
|
361
|
+
os: state.selectedOs,
|
|
362
|
+
scope: state.selectedScope,
|
|
363
|
+
mode: state.selectedMode
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
function finishBackToMenu() {
|
|
367
|
+
cleanup();
|
|
368
|
+
resolve({
|
|
369
|
+
backToMenu: true
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
function render() {
|
|
373
|
+
const currentStep = TAB_ORDER.indexOf(state.activeTab) + 1;
|
|
374
|
+
const stepTitle = {
|
|
375
|
+
libraries: "Select libraries",
|
|
376
|
+
agents: "Select agents",
|
|
377
|
+
os: "Select OS",
|
|
378
|
+
scope: "Select scope",
|
|
379
|
+
mode: "Select mode",
|
|
380
|
+
review: "Review selections"
|
|
381
|
+
}[state.activeTab];
|
|
382
|
+
const stepDescription = {
|
|
383
|
+
libraries: "Choose one or both upstream AI libraries to install.",
|
|
384
|
+
agents: "Pick which agent integrations should be configured.",
|
|
385
|
+
os: "Choose the current host OS for sanity checking before install.",
|
|
386
|
+
scope: "Choose whether setup should target global config or project-local files.",
|
|
387
|
+
mode: "Choose whether to install or uninstall the selected libraries.",
|
|
388
|
+
review: "Verify selections before shell commands are executed."
|
|
389
|
+
}[state.activeTab];
|
|
390
|
+
const stepStatus = {
|
|
391
|
+
libraries: `${state.selectedLibraries.size} selected`,
|
|
392
|
+
agents: `${state.selectedAgents.size} selected`,
|
|
393
|
+
os: state.selectedOs ?? "none selected",
|
|
394
|
+
scope: state.selectedScope,
|
|
395
|
+
mode: state.selectedMode,
|
|
396
|
+
review: state.notice || "Ready for confirmation"
|
|
397
|
+
}[state.activeTab];
|
|
398
|
+
headerBox.setContent(renderBannerHeader("Install libs for AI", "Run upstream installers and init commands for RTK and ICM.", [
|
|
399
|
+
{ label: `${state.selectedLibraries.size} libraries`, tone: "accent" },
|
|
400
|
+
{ label: `${state.selectedAgents.size} agents`, tone: "success" },
|
|
401
|
+
{ label: state.selectedOs ?? "OS pending", tone: "muted" },
|
|
402
|
+
{ label: state.selectedScope, tone: "muted" },
|
|
403
|
+
{ label: state.selectedMode, tone: "muted" }
|
|
404
|
+
]));
|
|
405
|
+
tabsBox.setContent(renderTabs(state));
|
|
406
|
+
titleBox.setContent(renderStepSummary({
|
|
407
|
+
step: `STEP ${currentStep}/${TAB_ORDER.length}`,
|
|
408
|
+
title: stepTitle,
|
|
409
|
+
description: stepDescription,
|
|
410
|
+
status: stepStatus
|
|
411
|
+
}));
|
|
412
|
+
syncListSelection(listBox, state);
|
|
413
|
+
detailBox.setContent(renderDetailBody(state));
|
|
414
|
+
footerBox.setContent(renderFooter(state));
|
|
415
|
+
screen.render();
|
|
416
|
+
}
|
|
417
|
+
function handleToggleOrConfirm() {
|
|
418
|
+
if (!canRun(lastToggleAt, DEBOUNCE_SELECT_MS)) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
lastToggleAt = Date.now();
|
|
422
|
+
if (state.activeTab === "review") {
|
|
423
|
+
if (state.reviewAction === "back") {
|
|
424
|
+
finishBackToMenu();
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
if (state.reviewAction === "cancel") {
|
|
428
|
+
finishWithError("Installation cancelled.");
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
const validationMessage = validateBeforeConfirm(state);
|
|
432
|
+
if (validationMessage) {
|
|
433
|
+
setNotice(state, validationMessage);
|
|
434
|
+
render();
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
finishSuccess();
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
toggleCurrentItem(state);
|
|
441
|
+
render();
|
|
442
|
+
}
|
|
443
|
+
function toggleAllInCurrentTab() {
|
|
444
|
+
if (state.activeTab === "review") {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
const items = currentTabItems(state);
|
|
448
|
+
if (items.length === 0) {
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
if (state.activeTab === "os" || state.activeTab === "scope" || state.activeTab === "mode") {
|
|
452
|
+
const cursor = state.listCursor[state.activeTab];
|
|
453
|
+
const current = items[cursor];
|
|
454
|
+
if (current && state.activeTab === "os") {
|
|
455
|
+
state.selectedOs = current.id;
|
|
456
|
+
render();
|
|
457
|
+
}
|
|
458
|
+
if (current && state.activeTab === "scope") {
|
|
459
|
+
state.selectedScope = current.id;
|
|
460
|
+
render();
|
|
461
|
+
}
|
|
462
|
+
if (current && state.activeTab === "mode") {
|
|
463
|
+
state.selectedMode = current.id;
|
|
464
|
+
render();
|
|
465
|
+
}
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
const allSelected = items.every((item) => isItemSelected(item, state));
|
|
469
|
+
for (const item of items) {
|
|
470
|
+
const selected = isItemSelected(item, state);
|
|
471
|
+
if (allSelected && selected) {
|
|
472
|
+
toggleItem(item, state);
|
|
473
|
+
}
|
|
474
|
+
else if (!allSelected && !selected) {
|
|
475
|
+
toggleItem(item, state);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
render();
|
|
479
|
+
}
|
|
480
|
+
screen.key(["left"], () => {
|
|
481
|
+
if (!canRun(lastTabSwitchAt, DEBOUNCE_SELECT_MS)) {
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
lastTabSwitchAt = Date.now();
|
|
485
|
+
moveTab(state, -1);
|
|
486
|
+
render();
|
|
487
|
+
});
|
|
488
|
+
screen.key(["right", "tab"], () => {
|
|
489
|
+
if (!canRun(lastTabSwitchAt, DEBOUNCE_SELECT_MS)) {
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
lastTabSwitchAt = Date.now();
|
|
493
|
+
moveTab(state, 1);
|
|
494
|
+
render();
|
|
495
|
+
});
|
|
496
|
+
screen.key(["up"], () => {
|
|
497
|
+
if (!canRun(lastMoveAt, DEBOUNCE_MOVE_MS)) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
lastMoveAt = Date.now();
|
|
501
|
+
moveCursor(state, -1);
|
|
502
|
+
render();
|
|
503
|
+
});
|
|
504
|
+
screen.key(["down"], () => {
|
|
505
|
+
if (!canRun(lastMoveAt, DEBOUNCE_MOVE_MS)) {
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
lastMoveAt = Date.now();
|
|
509
|
+
moveCursor(state, 1);
|
|
510
|
+
render();
|
|
511
|
+
});
|
|
512
|
+
screen.key(["space"], handleToggleOrConfirm);
|
|
513
|
+
screen.key(["enter"], handleToggleOrConfirm);
|
|
514
|
+
screen.key(["a"], () => {
|
|
515
|
+
if (!canRun(lastToggleAt, DEBOUNCE_SELECT_MS)) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
lastToggleAt = Date.now();
|
|
519
|
+
toggleAllInCurrentTab();
|
|
520
|
+
});
|
|
521
|
+
screen.key(["q", "escape", "C-c"], () => {
|
|
522
|
+
cleanup();
|
|
523
|
+
reject(new Error("Installation cancelled."));
|
|
524
|
+
});
|
|
525
|
+
render();
|
|
526
|
+
});
|
|
527
|
+
}
|
|
@@ -16,8 +16,8 @@ const MENU_ITEMS = [
|
|
|
16
16
|
{
|
|
17
17
|
id: "install-libs",
|
|
18
18
|
label: "Install libs for AI",
|
|
19
|
-
description: "Install
|
|
20
|
-
meta: "
|
|
19
|
+
description: "Install RTK and ICM, then run agent-specific setup for Codex and Claude.",
|
|
20
|
+
meta: "Mac + Linux"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
id: "cancel",
|
package/package.json
CHANGED
package/selection-catalog.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"skills": [
|
|
4
|
+
{
|
|
5
|
+
"id": "bugfix",
|
|
6
|
+
"label": "Bugfix",
|
|
7
|
+
"description": "Folder: bugfix",
|
|
8
|
+
"sourceBranch": "agent-skills",
|
|
9
|
+
"sourcePath": "bugfix"
|
|
10
|
+
},
|
|
4
11
|
{
|
|
5
12
|
"id": "git-engineering-workflow",
|
|
6
13
|
"label": "Git engineering workflow",
|