pikakit 3.9.0 → 3.9.2
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/bin/lib/commands/install.js +13 -10
- package/bin/lib/commands/uninstall.js +45 -33
- package/bin/lib/config.js +3 -3
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import boxen from "boxen";
|
|
|
12
12
|
import { parseSkillSpec, merkleHash } from "../helpers.js";
|
|
13
13
|
import { parseSkillMdFrontmatter } from "../skills.js";
|
|
14
14
|
import { step, activeStep, stepLine, S, c, fatal, spinner, multiselect, select, confirm, isCancel, cancel } from "../ui.js";
|
|
15
|
-
import { WORKSPACE, GLOBAL_DIR, OFFLINE, GLOBAL } from "../config.js";
|
|
15
|
+
import { WORKSPACE, GLOBAL_DIR, OFFLINE, GLOBAL, FORCE } from "../config.js";
|
|
16
16
|
import { installSkill } from "../installer.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -47,7 +47,7 @@ export async function run(spec) {
|
|
|
47
47
|
step("Source: " + c.cyan(url));
|
|
48
48
|
|
|
49
49
|
const s = spinner();
|
|
50
|
-
s.start("Deploying next-generation skills");
|
|
50
|
+
s.start("Deploying next-generation skills...");
|
|
51
51
|
|
|
52
52
|
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "add-skill-"));
|
|
53
53
|
|
|
@@ -99,7 +99,7 @@ export async function run(spec) {
|
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
s.stop("Skills deployed successfully");
|
|
102
|
+
s.stop("Skills deployed successfully.");
|
|
103
103
|
|
|
104
104
|
// Find skills in repo - check multiple possible locations
|
|
105
105
|
const skillsInRepo = [];
|
|
@@ -379,14 +379,17 @@ export async function run(spec) {
|
|
|
379
379
|
|
|
380
380
|
stepLine();
|
|
381
381
|
|
|
382
|
-
// Confirmation
|
|
383
|
-
|
|
384
|
-
|
|
382
|
+
// Confirmation (skip if --force)
|
|
383
|
+
let shouldProceed = FORCE;
|
|
384
|
+
if (!FORCE) {
|
|
385
|
+
activeStep("Proceed with installation?");
|
|
386
|
+
shouldProceed = await confirm({ message: " ", initialValue: true });
|
|
385
387
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
if (isCancel(shouldProceed) || !shouldProceed) {
|
|
389
|
+
cancel("Cancelled.");
|
|
390
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
390
393
|
}
|
|
391
394
|
|
|
392
395
|
// Install skills to multiple agents
|
|
@@ -8,7 +8,7 @@ import os from "os";
|
|
|
8
8
|
import prompts from "prompts";
|
|
9
9
|
import { resolveScope, createBackup } from "../helpers.js";
|
|
10
10
|
import { step, stepLine, success, fatal, c, select, isCancel, cancel } from "../ui.js";
|
|
11
|
-
import { DRY } from "../config.js";
|
|
11
|
+
import { DRY, FORCE } from "../config.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Remove a skill or all skills
|
|
@@ -172,16 +172,18 @@ async function removeAllWithConfirmation(scope, skills) {
|
|
|
172
172
|
skills.forEach(s => step(` • ${s}`, "", "dim"));
|
|
173
173
|
stepLine();
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
175
|
+
if (!FORCE) {
|
|
176
|
+
const confirmSkills = await prompts({
|
|
177
|
+
type: "confirm",
|
|
178
|
+
name: "value",
|
|
179
|
+
message: `Remove all ${skills.length} skill(s)?`,
|
|
180
|
+
initial: false
|
|
181
|
+
});
|
|
181
182
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
if (!confirmSkills.value) {
|
|
184
|
+
step("Cancelled");
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
185
187
|
}
|
|
186
188
|
|
|
187
189
|
// Remove each skill with backup
|
|
@@ -207,14 +209,18 @@ async function removeAllWithConfirmation(scope, skills) {
|
|
|
207
209
|
step(c.dim(" • All configuration files"));
|
|
208
210
|
stepLine();
|
|
209
211
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
let confirmAgentValue = FORCE;
|
|
213
|
+
if (!FORCE) {
|
|
214
|
+
const confirmAgent = await prompts({
|
|
215
|
+
type: "confirm",
|
|
216
|
+
name: "value",
|
|
217
|
+
message: "Remove entire .agent folder?",
|
|
218
|
+
initial: false
|
|
219
|
+
});
|
|
220
|
+
confirmAgentValue = confirmAgent.value;
|
|
221
|
+
}
|
|
216
222
|
|
|
217
|
-
if (
|
|
223
|
+
if (confirmAgentValue) {
|
|
218
224
|
fs.rmSync(agentDir, { recursive: true, force: true });
|
|
219
225
|
success("Complete cleanup done - .agent folder removed");
|
|
220
226
|
|
|
@@ -227,14 +233,18 @@ async function removeAllWithConfirmation(scope, skills) {
|
|
|
227
233
|
step(c.dim(" • package-lock.json"));
|
|
228
234
|
stepLine();
|
|
229
235
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
let confirmNpmValue = FORCE;
|
|
237
|
+
if (!FORCE) {
|
|
238
|
+
const confirmNpm = await prompts({
|
|
239
|
+
type: "confirm",
|
|
240
|
+
name: "value",
|
|
241
|
+
message: "Remove npm dependencies?",
|
|
242
|
+
initial: false
|
|
243
|
+
});
|
|
244
|
+
confirmNpmValue = confirmNpm.value;
|
|
245
|
+
}
|
|
236
246
|
|
|
237
|
-
if (
|
|
247
|
+
if (confirmNpmValue) {
|
|
238
248
|
const cwd = process.cwd();
|
|
239
249
|
const nodeModules = path.join(cwd, "node_modules");
|
|
240
250
|
const packageJson = path.join(cwd, "package.json");
|
|
@@ -281,16 +291,18 @@ async function removeSingleSkill(scope, skillName) {
|
|
|
281
291
|
stepLine();
|
|
282
292
|
step(`Removing skill: ${c.cyan(skillName)}`);
|
|
283
293
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
294
|
+
if (!FORCE) {
|
|
295
|
+
const confirmRemove = await prompts({
|
|
296
|
+
type: "confirm",
|
|
297
|
+
name: "value",
|
|
298
|
+
message: "Confirm removal?",
|
|
299
|
+
initial: false
|
|
300
|
+
});
|
|
290
301
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
302
|
+
if (!confirmRemove.value) {
|
|
303
|
+
step("Cancelled");
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
294
306
|
}
|
|
295
307
|
|
|
296
308
|
if (DRY) {
|
package/bin/lib/config.js
CHANGED
|
@@ -39,11 +39,11 @@ const args = process.argv.slice(2);
|
|
|
39
39
|
/** Command name (first non-flag argument, empty string if none) */
|
|
40
40
|
export const command = args[0] || "";
|
|
41
41
|
|
|
42
|
-
/** All flags (starting with --) */
|
|
43
|
-
export const flags = new Set(args.filter((a) => a.startsWith("
|
|
42
|
+
/** All flags (starting with - or --) */
|
|
43
|
+
export const flags = new Set(args.filter((a) => a.startsWith("-")));
|
|
44
44
|
|
|
45
45
|
/** Command parameters (non-flag arguments after command) */
|
|
46
|
-
export const params = args.filter((a) => !a.startsWith("
|
|
46
|
+
export const params = args.filter((a) => !a.startsWith("-")).slice(1);
|
|
47
47
|
|
|
48
48
|
// --- Flag Shortcuts ---
|
|
49
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pikakit",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "pikakit <pikakit@gmail.com>",
|