skilluse 0.2.1 → 0.3.0
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/README.md +16 -3
- package/dist/cli.js +548 -577
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -64739,75 +64739,6 @@ function StatusMessage({ type, children }) {
|
|
|
64739
64739
|
}
|
|
64740
64740
|
// src/components/Table.tsx
|
|
64741
64741
|
var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
|
|
64742
|
-
function Table({
|
|
64743
|
-
data,
|
|
64744
|
-
columns,
|
|
64745
|
-
maxColWidth = 30
|
|
64746
|
-
}) {
|
|
64747
|
-
if (data.length === 0) {
|
|
64748
|
-
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64749
|
-
dimColor: true,
|
|
64750
|
-
children: "No data"
|
|
64751
|
-
}, undefined, false, undefined, this);
|
|
64752
|
-
}
|
|
64753
|
-
const cols = columns || Object.keys(data[0]);
|
|
64754
|
-
const widths = cols.map((col) => {
|
|
64755
|
-
const headerWidth = String(col).length;
|
|
64756
|
-
const maxDataWidth = data.reduce((max, row) => {
|
|
64757
|
-
const value = row[col];
|
|
64758
|
-
const width = value == null ? 0 : String(value).length;
|
|
64759
|
-
return Math.max(max, width);
|
|
64760
|
-
}, 0);
|
|
64761
|
-
return Math.min(Math.max(headerWidth, maxDataWidth), maxColWidth);
|
|
64762
|
-
});
|
|
64763
|
-
const truncate = (str, maxLen) => {
|
|
64764
|
-
if (str.length <= maxLen)
|
|
64765
|
-
return str;
|
|
64766
|
-
return `${str.slice(0, maxLen - 1)}…`;
|
|
64767
|
-
};
|
|
64768
|
-
const renderCell = (value, width, isHeader = false) => {
|
|
64769
|
-
const str = value == null ? "" : String(value);
|
|
64770
|
-
const truncated = truncate(str, width);
|
|
64771
|
-
const padded = truncated.padEnd(width);
|
|
64772
|
-
return isHeader ? /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64773
|
-
bold: true,
|
|
64774
|
-
children: padded
|
|
64775
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64776
|
-
children: padded
|
|
64777
|
-
}, undefined, false, undefined, this);
|
|
64778
|
-
};
|
|
64779
|
-
const separator = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
64780
|
-
children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64781
|
-
children: widths.map((w, i) => "─".repeat(w) + (i < widths.length - 1 ? "─┼─" : "")).join("")
|
|
64782
|
-
}, undefined, false, undefined, this)
|
|
64783
|
-
}, undefined, false, undefined, this);
|
|
64784
|
-
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
64785
|
-
flexDirection: "column",
|
|
64786
|
-
children: [
|
|
64787
|
-
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
64788
|
-
children: cols.map((col, i) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
64789
|
-
children: [
|
|
64790
|
-
renderCell(String(col), widths[i], true),
|
|
64791
|
-
i < cols.length - 1 && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64792
|
-
children: " │ "
|
|
64793
|
-
}, undefined, false, undefined, this)
|
|
64794
|
-
]
|
|
64795
|
-
}, String(col), true, undefined, this))
|
|
64796
|
-
}, undefined, false, undefined, this),
|
|
64797
|
-
separator,
|
|
64798
|
-
data.map((row, rowIndex) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
64799
|
-
children: cols.map((col, i) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
64800
|
-
children: [
|
|
64801
|
-
renderCell(row[col], widths[i]),
|
|
64802
|
-
i < cols.length - 1 && /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
64803
|
-
children: " │ "
|
|
64804
|
-
}, undefined, false, undefined, this)
|
|
64805
|
-
]
|
|
64806
|
-
}, String(col), true, undefined, this))
|
|
64807
|
-
}, rowIndex, false, undefined, this))
|
|
64808
|
-
]
|
|
64809
|
-
}, undefined, true, undefined, this);
|
|
64810
|
-
}
|
|
64811
64742
|
// node_modules/ink-text-input/build/index.js
|
|
64812
64743
|
var import_react30 = __toESM(require_react(), 1);
|
|
64813
64744
|
|
|
@@ -67011,6 +66942,14 @@ var options2 = exports_external.object({
|
|
|
67011
66942
|
global: exports_external.boolean().default(false).describe("Install globally to agent's global skills path"),
|
|
67012
66943
|
agent: exports_external.string().optional().describe("Override current agent (e.g., cursor, claude)")
|
|
67013
66944
|
});
|
|
66945
|
+
var FINAL_PHASES = [
|
|
66946
|
+
"success",
|
|
66947
|
+
"error",
|
|
66948
|
+
"auth_required",
|
|
66949
|
+
"no_repos",
|
|
66950
|
+
"not_found",
|
|
66951
|
+
"conflict"
|
|
66952
|
+
];
|
|
67014
66953
|
function parseFrontmatter2(content) {
|
|
67015
66954
|
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
67016
66955
|
if (!frontmatterMatch) {
|
|
@@ -67239,6 +67178,7 @@ async function installFromLocalPath(sourcePath, targetDir) {
|
|
|
67239
67178
|
function Install({ args: [skillName], options: opts }) {
|
|
67240
67179
|
const { exit } = use_app_default();
|
|
67241
67180
|
const [state, setState] = import_react32.useState({ phase: "checking" });
|
|
67181
|
+
const [outputItems, setOutputItems] = import_react32.useState([]);
|
|
67242
67182
|
import_react32.useEffect(() => {
|
|
67243
67183
|
async function install() {
|
|
67244
67184
|
const agentId = opts.agent || getCurrentAgent();
|
|
@@ -67248,7 +67188,6 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67248
67188
|
phase: "error",
|
|
67249
67189
|
message: `Unknown agent: ${agentId}`
|
|
67250
67190
|
});
|
|
67251
|
-
exit();
|
|
67252
67191
|
return;
|
|
67253
67192
|
}
|
|
67254
67193
|
const scope = opts.global ? "global" : "local";
|
|
@@ -67302,14 +67241,12 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67302
67241
|
skill: skill2,
|
|
67303
67242
|
installedPath: installPath2
|
|
67304
67243
|
});
|
|
67305
|
-
exit();
|
|
67306
67244
|
return;
|
|
67307
67245
|
} catch (err) {
|
|
67308
67246
|
setState({
|
|
67309
67247
|
phase: "error",
|
|
67310
67248
|
message: err instanceof Error ? err.message : "Installation failed"
|
|
67311
67249
|
});
|
|
67312
|
-
exit();
|
|
67313
67250
|
return;
|
|
67314
67251
|
}
|
|
67315
67252
|
}
|
|
@@ -67320,7 +67257,6 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67320
67257
|
const result = await fetchGitHubSkill(token, source.owner, source.repo, source.path);
|
|
67321
67258
|
if (result && "authRequired" in result) {
|
|
67322
67259
|
setState({ phase: "auth_required", message: result.message });
|
|
67323
|
-
exit();
|
|
67324
67260
|
return;
|
|
67325
67261
|
}
|
|
67326
67262
|
if (!result) {
|
|
@@ -67328,7 +67264,6 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67328
67264
|
phase: "not_found",
|
|
67329
67265
|
skillName: `${source.owner}/${source.repo}${source.path ? `/${source.path}` : ""}`
|
|
67330
67266
|
});
|
|
67331
|
-
exit();
|
|
67332
67267
|
return;
|
|
67333
67268
|
}
|
|
67334
67269
|
const { skill: skill2, commitSha: commitSha2 } = result;
|
|
@@ -67362,7 +67297,6 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67362
67297
|
});
|
|
67363
67298
|
if (downloadResult && "authRequired" in downloadResult) {
|
|
67364
67299
|
setState({ phase: "auth_required", message: downloadResult.message });
|
|
67365
|
-
exit();
|
|
67366
67300
|
return;
|
|
67367
67301
|
}
|
|
67368
67302
|
steps2[1].status = "done";
|
|
@@ -67397,12 +67331,10 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67397
67331
|
message: err instanceof Error ? err.message : "Installation failed"
|
|
67398
67332
|
});
|
|
67399
67333
|
}
|
|
67400
|
-
exit();
|
|
67401
67334
|
return;
|
|
67402
67335
|
}
|
|
67403
67336
|
if (config2.repos.length === 0) {
|
|
67404
67337
|
setState({ phase: "no_repos" });
|
|
67405
|
-
exit();
|
|
67406
67338
|
return;
|
|
67407
67339
|
}
|
|
67408
67340
|
const allRepos = config2.repos;
|
|
@@ -67412,13 +67344,11 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67412
67344
|
const findResult = await findSkill(token, allRepos, source.name);
|
|
67413
67345
|
if ("authRequired" in findResult) {
|
|
67414
67346
|
setState({ phase: "auth_required", message: findResult.message });
|
|
67415
|
-
exit();
|
|
67416
67347
|
return;
|
|
67417
67348
|
}
|
|
67418
67349
|
const { results } = findResult;
|
|
67419
67350
|
if (results.length === 0) {
|
|
67420
67351
|
setState({ phase: "not_found", skillName: source.name });
|
|
67421
|
-
exit();
|
|
67422
67352
|
return;
|
|
67423
67353
|
}
|
|
67424
67354
|
if (results.length > 1) {
|
|
@@ -67430,7 +67360,6 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67430
67360
|
path: r.skill.path
|
|
67431
67361
|
}))
|
|
67432
67362
|
});
|
|
67433
|
-
exit();
|
|
67434
67363
|
return;
|
|
67435
67364
|
}
|
|
67436
67365
|
const { skill, commitSha } = results[0];
|
|
@@ -67465,7 +67394,6 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67465
67394
|
});
|
|
67466
67395
|
if (downloadResult && "authRequired" in downloadResult) {
|
|
67467
67396
|
setState({ phase: "auth_required", message: downloadResult.message });
|
|
67468
|
-
exit();
|
|
67469
67397
|
return;
|
|
67470
67398
|
}
|
|
67471
67399
|
steps[1].status = "done";
|
|
@@ -67512,203 +67440,218 @@ function Install({ args: [skillName], options: opts }) {
|
|
|
67512
67440
|
message: err instanceof Error ? err.message : "Installation failed"
|
|
67513
67441
|
});
|
|
67514
67442
|
}
|
|
67515
|
-
exit();
|
|
67516
67443
|
}
|
|
67517
67444
|
install().catch((err) => {
|
|
67518
67445
|
setState({
|
|
67519
67446
|
phase: "error",
|
|
67520
67447
|
message: err instanceof Error ? err.message : "Installation failed"
|
|
67521
67448
|
});
|
|
67522
|
-
exit();
|
|
67523
67449
|
});
|
|
67524
|
-
}, [skillName, opts.global,
|
|
67525
|
-
|
|
67526
|
-
|
|
67527
|
-
|
|
67528
|
-
|
|
67529
|
-
|
|
67530
|
-
|
|
67531
|
-
|
|
67532
|
-
|
|
67533
|
-
|
|
67534
|
-
|
|
67535
|
-
|
|
67536
|
-
|
|
67537
|
-
|
|
67538
|
-
|
|
67539
|
-
|
|
67540
|
-
|
|
67541
|
-
|
|
67542
|
-
|
|
67543
|
-
|
|
67544
|
-
|
|
67545
|
-
|
|
67546
|
-
|
|
67547
|
-
|
|
67548
|
-
|
|
67549
|
-
|
|
67550
|
-
|
|
67551
|
-
|
|
67552
|
-
|
|
67553
|
-
|
|
67554
|
-
|
|
67555
|
-
|
|
67556
|
-
|
|
67557
|
-
|
|
67558
|
-
|
|
67559
|
-
|
|
67560
|
-
|
|
67561
|
-
|
|
67562
|
-
|
|
67563
|
-
'Skill "',
|
|
67564
|
-
state.skillName,
|
|
67565
|
-
'" not found'
|
|
67566
|
-
]
|
|
67567
|
-
}, undefined, true, undefined, this),
|
|
67568
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67569
|
-
marginTop: 1,
|
|
67570
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67450
|
+
}, [skillName, opts.global, opts.agent]);
|
|
67451
|
+
import_react32.useEffect(() => {
|
|
67452
|
+
if (FINAL_PHASES.includes(state.phase) && outputItems.length === 0) {
|
|
67453
|
+
setOutputItems([{ id: "output" }]);
|
|
67454
|
+
}
|
|
67455
|
+
}, [state.phase, outputItems.length]);
|
|
67456
|
+
import_react32.useEffect(() => {
|
|
67457
|
+
if (outputItems.length > 0) {
|
|
67458
|
+
process.nextTick(() => exit());
|
|
67459
|
+
}
|
|
67460
|
+
}, [outputItems.length, exit]);
|
|
67461
|
+
if (state.phase === "checking") {
|
|
67462
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Spinner2, {
|
|
67463
|
+
text: "Initializing..."
|
|
67464
|
+
}, undefined, false, undefined, this);
|
|
67465
|
+
}
|
|
67466
|
+
if (state.phase === "searching") {
|
|
67467
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Spinner2, {
|
|
67468
|
+
text: `Searching ${state.repo}...`
|
|
67469
|
+
}, undefined, false, undefined, this);
|
|
67470
|
+
}
|
|
67471
|
+
if (state.phase === "installing") {
|
|
67472
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67473
|
+
flexDirection: "column",
|
|
67474
|
+
borderStyle: "round",
|
|
67475
|
+
paddingX: 1,
|
|
67476
|
+
children: [
|
|
67477
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67478
|
+
marginBottom: 1,
|
|
67479
|
+
children: [
|
|
67480
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67481
|
+
bold: true,
|
|
67482
|
+
children: "Installing: "
|
|
67483
|
+
}, undefined, false, undefined, this),
|
|
67484
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67485
|
+
color: "cyan",
|
|
67486
|
+
children: state.skill.name
|
|
67487
|
+
}, undefined, false, undefined, this),
|
|
67488
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67571
67489
|
dimColor: true,
|
|
67572
67490
|
children: [
|
|
67573
|
-
"
|
|
67574
|
-
state.
|
|
67575
|
-
"
|
|
67491
|
+
" (",
|
|
67492
|
+
state.scope,
|
|
67493
|
+
")"
|
|
67576
67494
|
]
|
|
67577
67495
|
}, undefined, true, undefined, this)
|
|
67578
|
-
|
|
67579
|
-
|
|
67580
|
-
|
|
67581
|
-
|
|
67582
|
-
|
|
67583
|
-
|
|
67584
|
-
|
|
67585
|
-
|
|
67586
|
-
|
|
67587
|
-
|
|
67588
|
-
|
|
67589
|
-
|
|
67590
|
-
|
|
67591
|
-
|
|
67592
|
-
|
|
67593
|
-
|
|
67594
|
-
|
|
67595
|
-
|
|
67596
|
-
|
|
67597
|
-
|
|
67496
|
+
]
|
|
67497
|
+
}, undefined, true, undefined, this),
|
|
67498
|
+
state.steps.map((step) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67499
|
+
children: [
|
|
67500
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67501
|
+
children: [
|
|
67502
|
+
step.status === "done" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67503
|
+
color: "green",
|
|
67504
|
+
children: "✔"
|
|
67505
|
+
}, undefined, false, undefined, this),
|
|
67506
|
+
step.status === "in_progress" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67507
|
+
color: "yellow",
|
|
67508
|
+
children: "◐"
|
|
67509
|
+
}, undefined, false, undefined, this),
|
|
67510
|
+
step.status === "pending" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67511
|
+
dimColor: true,
|
|
67512
|
+
children: "○"
|
|
67513
|
+
}, undefined, false, undefined, this),
|
|
67514
|
+
step.status === "error" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67515
|
+
color: "red",
|
|
67516
|
+
children: "✖"
|
|
67517
|
+
}, undefined, false, undefined, this)
|
|
67518
|
+
]
|
|
67519
|
+
}, undefined, true, undefined, this),
|
|
67520
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67598
67521
|
children: [
|
|
67599
|
-
|
|
67600
|
-
|
|
67601
|
-
source.path
|
|
67522
|
+
" ",
|
|
67523
|
+
step.label
|
|
67602
67524
|
]
|
|
67603
|
-
},
|
|
67604
|
-
|
|
67605
|
-
|
|
67606
|
-
|
|
67607
|
-
|
|
67525
|
+
}, undefined, true, undefined, this)
|
|
67526
|
+
]
|
|
67527
|
+
}, step.label, true, undefined, this)),
|
|
67528
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67529
|
+
marginTop: 1,
|
|
67530
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ProgressBar, {
|
|
67531
|
+
percent: state.progress,
|
|
67532
|
+
width: 30
|
|
67533
|
+
}, undefined, false, undefined, this)
|
|
67534
|
+
}, undefined, false, undefined, this)
|
|
67535
|
+
]
|
|
67536
|
+
}, undefined, true, undefined, this);
|
|
67537
|
+
}
|
|
67538
|
+
const renderFinalContent = () => {
|
|
67539
|
+
switch (state.phase) {
|
|
67540
|
+
case "auth_required":
|
|
67541
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusMessage, {
|
|
67542
|
+
type: "error",
|
|
67543
|
+
children: state.message
|
|
67544
|
+
}, undefined, false, undefined, this);
|
|
67545
|
+
case "no_repos":
|
|
67546
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
|
|
67547
|
+
children: [
|
|
67548
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusMessage, {
|
|
67549
|
+
type: "warning",
|
|
67550
|
+
children: "No repositories configured"
|
|
67551
|
+
}, undefined, false, undefined, this),
|
|
67552
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67608
67553
|
dimColor: true,
|
|
67609
|
-
children: "
|
|
67554
|
+
children: "Run 'skilluse repo add owner/repo' to add a skill repository."
|
|
67610
67555
|
}, undefined, false, undefined, this)
|
|
67611
|
-
|
|
67612
|
-
|
|
67613
|
-
|
|
67614
|
-
|
|
67615
|
-
|
|
67616
|
-
|
|
67617
|
-
|
|
67618
|
-
|
|
67619
|
-
|
|
67620
|
-
|
|
67621
|
-
|
|
67622
|
-
|
|
67623
|
-
|
|
67624
|
-
|
|
67625
|
-
|
|
67626
|
-
|
|
67627
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67628
|
-
color: "cyan",
|
|
67629
|
-
children: state.skill.name
|
|
67630
|
-
}, undefined, false, undefined, this),
|
|
67631
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67556
|
+
]
|
|
67557
|
+
}, undefined, true, undefined, this);
|
|
67558
|
+
case "not_found":
|
|
67559
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
|
|
67560
|
+
children: [
|
|
67561
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusMessage, {
|
|
67562
|
+
type: "error",
|
|
67563
|
+
children: [
|
|
67564
|
+
'Skill "',
|
|
67565
|
+
state.skillName,
|
|
67566
|
+
'" not found'
|
|
67567
|
+
]
|
|
67568
|
+
}, undefined, true, undefined, this),
|
|
67569
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67570
|
+
marginTop: 1,
|
|
67571
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67632
67572
|
dimColor: true,
|
|
67633
67573
|
children: [
|
|
67634
|
-
"
|
|
67635
|
-
state.
|
|
67636
|
-
"
|
|
67574
|
+
"Try 'skilluse search ",
|
|
67575
|
+
state.skillName,
|
|
67576
|
+
"' to find available skills."
|
|
67637
67577
|
]
|
|
67638
67578
|
}, undefined, true, undefined, this)
|
|
67639
|
-
|
|
67640
|
-
|
|
67641
|
-
|
|
67642
|
-
|
|
67643
|
-
|
|
67579
|
+
}, undefined, false, undefined, this)
|
|
67580
|
+
]
|
|
67581
|
+
}, undefined, true, undefined, this);
|
|
67582
|
+
case "conflict":
|
|
67583
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
|
|
67584
|
+
children: [
|
|
67585
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusMessage, {
|
|
67586
|
+
type: "warning",
|
|
67587
|
+
children: [
|
|
67588
|
+
'Skill "',
|
|
67589
|
+
state.skillName,
|
|
67590
|
+
'" found in multiple repos:'
|
|
67591
|
+
]
|
|
67592
|
+
}, undefined, true, undefined, this),
|
|
67593
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67594
|
+
flexDirection: "column",
|
|
67595
|
+
marginTop: 1,
|
|
67596
|
+
marginLeft: 2,
|
|
67597
|
+
children: state.sources.map((source) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67644
67598
|
children: [
|
|
67645
|
-
|
|
67646
|
-
|
|
67647
|
-
|
|
67648
|
-
}, undefined, false, undefined, this),
|
|
67649
|
-
step.status === "in_progress" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67650
|
-
color: "yellow",
|
|
67651
|
-
children: "◐"
|
|
67652
|
-
}, undefined, false, undefined, this),
|
|
67653
|
-
step.status === "pending" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67654
|
-
dimColor: true,
|
|
67655
|
-
children: "○"
|
|
67656
|
-
}, undefined, false, undefined, this),
|
|
67657
|
-
step.status === "error" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67658
|
-
color: "red",
|
|
67659
|
-
children: "✖"
|
|
67660
|
-
}, undefined, false, undefined, this)
|
|
67599
|
+
source.repo,
|
|
67600
|
+
"/",
|
|
67601
|
+
source.path
|
|
67661
67602
|
]
|
|
67662
|
-
},
|
|
67663
|
-
|
|
67603
|
+
}, `${source.repo}/${source.path}`, true, undefined, this))
|
|
67604
|
+
}, undefined, false, undefined, this),
|
|
67605
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67606
|
+
marginTop: 1,
|
|
67607
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67608
|
+
dimColor: true,
|
|
67609
|
+
children: "Use: skilluse install repo/skill-name to specify"
|
|
67610
|
+
}, undefined, false, undefined, this)
|
|
67611
|
+
}, undefined, false, undefined, this)
|
|
67612
|
+
]
|
|
67613
|
+
}, undefined, true, undefined, this);
|
|
67614
|
+
case "success":
|
|
67615
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
|
|
67616
|
+
children: [
|
|
67617
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusMessage, {
|
|
67618
|
+
type: "success",
|
|
67619
|
+
children: [
|
|
67620
|
+
'Installed "',
|
|
67621
|
+
state.skill.name,
|
|
67622
|
+
'" v',
|
|
67623
|
+
state.skill.version
|
|
67624
|
+
]
|
|
67625
|
+
}, undefined, true, undefined, this),
|
|
67626
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67627
|
+
marginTop: 1,
|
|
67628
|
+
marginLeft: 2,
|
|
67629
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67630
|
+
dimColor: true,
|
|
67664
67631
|
children: [
|
|
67665
|
-
" ",
|
|
67666
|
-
|
|
67632
|
+
"Location: ",
|
|
67633
|
+
state.installedPath
|
|
67667
67634
|
]
|
|
67668
67635
|
}, undefined, true, undefined, this)
|
|
67669
|
-
]
|
|
67670
|
-
}, step.label, true, undefined, this)),
|
|
67671
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67672
|
-
marginTop: 1,
|
|
67673
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ProgressBar, {
|
|
67674
|
-
percent: state.progress,
|
|
67675
|
-
width: 30
|
|
67676
67636
|
}, undefined, false, undefined, this)
|
|
67677
|
-
|
|
67678
|
-
|
|
67679
|
-
|
|
67680
|
-
|
|
67681
|
-
|
|
67682
|
-
|
|
67683
|
-
|
|
67684
|
-
|
|
67685
|
-
|
|
67686
|
-
|
|
67687
|
-
|
|
67688
|
-
|
|
67689
|
-
|
|
67690
|
-
|
|
67691
|
-
|
|
67692
|
-
|
|
67693
|
-
|
|
67694
|
-
|
|
67695
|
-
marginLeft: 2,
|
|
67696
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
67697
|
-
dimColor: true,
|
|
67698
|
-
children: [
|
|
67699
|
-
"Location: ",
|
|
67700
|
-
state.installedPath
|
|
67701
|
-
]
|
|
67702
|
-
}, undefined, true, undefined, this)
|
|
67703
|
-
}, undefined, false, undefined, this)
|
|
67704
|
-
]
|
|
67705
|
-
}, undefined, true, undefined, this);
|
|
67706
|
-
case "error":
|
|
67707
|
-
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusMessage, {
|
|
67708
|
-
type: "error",
|
|
67709
|
-
children: state.message
|
|
67710
|
-
}, undefined, false, undefined, this);
|
|
67711
|
-
}
|
|
67637
|
+
]
|
|
67638
|
+
}, undefined, true, undefined, this);
|
|
67639
|
+
case "error":
|
|
67640
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusMessage, {
|
|
67641
|
+
type: "error",
|
|
67642
|
+
children: state.message
|
|
67643
|
+
}, undefined, false, undefined, this);
|
|
67644
|
+
default:
|
|
67645
|
+
return null;
|
|
67646
|
+
}
|
|
67647
|
+
};
|
|
67648
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Static, {
|
|
67649
|
+
items: outputItems,
|
|
67650
|
+
children: (item) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
67651
|
+
flexDirection: "column",
|
|
67652
|
+
children: renderFinalContent()
|
|
67653
|
+
}, item.id, false, undefined, this)
|
|
67654
|
+
}, undefined, false, undefined, this);
|
|
67712
67655
|
}
|
|
67713
67656
|
|
|
67714
67657
|
// src/commands/list.tsx
|
|
@@ -68347,12 +68290,12 @@ var options5 = exports_external.object({});
|
|
|
68347
68290
|
function Logout(_props) {
|
|
68348
68291
|
const { exit } = use_app_default();
|
|
68349
68292
|
const [state, setState] = import_react35.useState({ phase: "checking" });
|
|
68293
|
+
const [outputItems, setOutputItems] = import_react35.useState([]);
|
|
68350
68294
|
import_react35.useEffect(() => {
|
|
68351
68295
|
async function runLogout() {
|
|
68352
68296
|
const existing = await getCredentials();
|
|
68353
68297
|
if (!existing) {
|
|
68354
68298
|
setState({ phase: "not_logged_in" });
|
|
68355
|
-
exit();
|
|
68356
68299
|
return;
|
|
68357
68300
|
}
|
|
68358
68301
|
try {
|
|
@@ -68365,35 +68308,58 @@ function Logout(_props) {
|
|
|
68365
68308
|
message: err instanceof Error ? err.message : "Failed to clear credentials"
|
|
68366
68309
|
});
|
|
68367
68310
|
}
|
|
68368
|
-
exit();
|
|
68369
68311
|
}
|
|
68370
68312
|
runLogout();
|
|
68371
|
-
}, [
|
|
68372
|
-
|
|
68373
|
-
|
|
68374
|
-
|
|
68375
|
-
|
|
68376
|
-
|
|
68377
|
-
|
|
68378
|
-
|
|
68379
|
-
|
|
68380
|
-
|
|
68381
|
-
|
|
68382
|
-
|
|
68383
|
-
|
|
68384
|
-
|
|
68385
|
-
|
|
68386
|
-
|
|
68387
|
-
|
|
68388
|
-
|
|
68389
|
-
|
|
68390
|
-
|
|
68391
|
-
|
|
68392
|
-
|
|
68393
|
-
}
|
|
68394
|
-
|
|
68395
|
-
|
|
68396
|
-
|
|
68313
|
+
}, []);
|
|
68314
|
+
import_react35.useEffect(() => {
|
|
68315
|
+
if (state.phase !== "checking" && outputItems.length === 0) {
|
|
68316
|
+
setOutputItems([{ id: "output" }]);
|
|
68317
|
+
}
|
|
68318
|
+
}, [state.phase, outputItems.length]);
|
|
68319
|
+
import_react35.useEffect(() => {
|
|
68320
|
+
if (outputItems.length > 0) {
|
|
68321
|
+
process.nextTick(() => exit());
|
|
68322
|
+
}
|
|
68323
|
+
}, [outputItems.length, exit]);
|
|
68324
|
+
const renderContent = () => {
|
|
68325
|
+
switch (state.phase) {
|
|
68326
|
+
case "not_logged_in":
|
|
68327
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(StatusMessage, {
|
|
68328
|
+
type: "warning",
|
|
68329
|
+
children: "Not logged in"
|
|
68330
|
+
}, undefined, false, undefined, this);
|
|
68331
|
+
case "success":
|
|
68332
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(StatusMessage, {
|
|
68333
|
+
type: "success",
|
|
68334
|
+
children: "Logged out successfully"
|
|
68335
|
+
}, undefined, false, undefined, this);
|
|
68336
|
+
case "error":
|
|
68337
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(StatusMessage, {
|
|
68338
|
+
type: "error",
|
|
68339
|
+
children: state.message
|
|
68340
|
+
}, undefined, false, undefined, this);
|
|
68341
|
+
default:
|
|
68342
|
+
return null;
|
|
68343
|
+
}
|
|
68344
|
+
};
|
|
68345
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(jsx_dev_runtime12.Fragment, {
|
|
68346
|
+
children: [
|
|
68347
|
+
state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Spinner2, {
|
|
68348
|
+
text: "Logging out..."
|
|
68349
|
+
}, undefined, false, undefined, this),
|
|
68350
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Static, {
|
|
68351
|
+
items: outputItems,
|
|
68352
|
+
children: (item) => /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
68353
|
+
flexDirection: "column",
|
|
68354
|
+
children: renderContent()
|
|
68355
|
+
}, item.id, false, undefined, this)
|
|
68356
|
+
}, undefined, false, undefined, this)
|
|
68357
|
+
]
|
|
68358
|
+
}, undefined, true, undefined, this);
|
|
68359
|
+
}
|
|
68360
|
+
|
|
68361
|
+
// src/commands/repo/add.tsx
|
|
68362
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
68397
68363
|
var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
68398
68364
|
var args3 = exports_external.tuple([
|
|
68399
68365
|
exports_external.string().describe("Repository in owner/repo format")
|
|
@@ -68952,12 +68918,12 @@ var options8 = exports_external.object({});
|
|
|
68952
68918
|
function Repo(_props) {
|
|
68953
68919
|
const { exit } = use_app_default();
|
|
68954
68920
|
const [state, setState] = import_react38.useState({ phase: "checking" });
|
|
68921
|
+
const [outputItems, setOutputItems] = import_react38.useState([]);
|
|
68955
68922
|
import_react38.useEffect(() => {
|
|
68956
68923
|
async function checkRepo() {
|
|
68957
68924
|
const credentials = await getCredentials();
|
|
68958
68925
|
if (!credentials) {
|
|
68959
68926
|
setState({ phase: "not_logged_in" });
|
|
68960
|
-
exit();
|
|
68961
68927
|
return;
|
|
68962
68928
|
}
|
|
68963
68929
|
const config2 = getConfig();
|
|
@@ -68966,18 +68932,22 @@ function Repo(_props) {
|
|
|
68966
68932
|
defaultRepo: config2.defaultRepo,
|
|
68967
68933
|
repos: config2.repos
|
|
68968
68934
|
});
|
|
68969
|
-
exit();
|
|
68970
68935
|
}
|
|
68971
68936
|
checkRepo();
|
|
68972
|
-
}, [
|
|
68973
|
-
|
|
68974
|
-
|
|
68975
|
-
|
|
68976
|
-
|
|
68977
|
-
|
|
68978
|
-
|
|
68979
|
-
|
|
68980
|
-
|
|
68937
|
+
}, []);
|
|
68938
|
+
import_react38.useEffect(() => {
|
|
68939
|
+
if (state.phase !== "checking" && outputItems.length === 0) {
|
|
68940
|
+
setOutputItems([{ id: "output" }]);
|
|
68941
|
+
}
|
|
68942
|
+
}, [state.phase, outputItems.length]);
|
|
68943
|
+
import_react38.useEffect(() => {
|
|
68944
|
+
if (outputItems.length > 0) {
|
|
68945
|
+
process.nextTick(() => exit());
|
|
68946
|
+
}
|
|
68947
|
+
}, [outputItems.length, exit]);
|
|
68948
|
+
const renderContent = () => {
|
|
68949
|
+
if (state.phase === "not_logged_in") {
|
|
68950
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(jsx_dev_runtime15.Fragment, {
|
|
68981
68951
|
children: [
|
|
68982
68952
|
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(StatusMessage, {
|
|
68983
68953
|
type: "error",
|
|
@@ -68989,10 +68959,16 @@ function Repo(_props) {
|
|
|
68989
68959
|
}, undefined, false, undefined, this)
|
|
68990
68960
|
]
|
|
68991
68961
|
}, undefined, true, undefined, this);
|
|
68992
|
-
|
|
68962
|
+
}
|
|
68963
|
+
if (state.phase === "error") {
|
|
68964
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(StatusMessage, {
|
|
68965
|
+
type: "error",
|
|
68966
|
+
children: state.message
|
|
68967
|
+
}, undefined, false, undefined, this);
|
|
68968
|
+
}
|
|
68969
|
+
if (state.phase === "success") {
|
|
68993
68970
|
if (!state.defaultRepo) {
|
|
68994
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(
|
|
68995
|
-
flexDirection: "column",
|
|
68971
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(jsx_dev_runtime15.Fragment, {
|
|
68996
68972
|
children: [
|
|
68997
68973
|
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
68998
68974
|
bold: true,
|
|
@@ -69042,8 +69018,7 @@ function Repo(_props) {
|
|
|
69042
69018
|
}, undefined, true, undefined, this);
|
|
69043
69019
|
}
|
|
69044
69020
|
const defaultRepoConfig = state.repos.find((r) => r.repo === state.defaultRepo);
|
|
69045
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(
|
|
69046
|
-
flexDirection: "column",
|
|
69021
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(jsx_dev_runtime15.Fragment, {
|
|
69047
69022
|
children: [
|
|
69048
69023
|
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
69049
69024
|
bold: true,
|
|
@@ -69108,12 +69083,22 @@ function Repo(_props) {
|
|
|
69108
69083
|
]
|
|
69109
69084
|
}, undefined, true, undefined, this);
|
|
69110
69085
|
}
|
|
69111
|
-
|
|
69112
|
-
|
|
69113
|
-
|
|
69114
|
-
|
|
69115
|
-
|
|
69116
|
-
|
|
69086
|
+
return null;
|
|
69087
|
+
};
|
|
69088
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(jsx_dev_runtime15.Fragment, {
|
|
69089
|
+
children: [
|
|
69090
|
+
state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Spinner2, {
|
|
69091
|
+
text: "Loading..."
|
|
69092
|
+
}, undefined, false, undefined, this),
|
|
69093
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Static, {
|
|
69094
|
+
items: outputItems,
|
|
69095
|
+
children: (item) => /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
69096
|
+
flexDirection: "column",
|
|
69097
|
+
children: renderContent()
|
|
69098
|
+
}, item.id, false, undefined, this)
|
|
69099
|
+
}, undefined, false, undefined, this)
|
|
69100
|
+
]
|
|
69101
|
+
}, undefined, true, undefined, this);
|
|
69117
69102
|
}
|
|
69118
69103
|
|
|
69119
69104
|
// src/commands/repo/list.tsx
|
|
@@ -69456,86 +69441,19 @@ function RepoUse({ args: [repoArg], options: _opts }) {
|
|
|
69456
69441
|
// src/commands/agent/index.tsx
|
|
69457
69442
|
var import_react42 = __toESM(require_react(), 1);
|
|
69458
69443
|
var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
|
|
69444
|
+
var args7 = exports_external.tuple([
|
|
69445
|
+
exports_external.string().optional().describe("Agent ID to switch to")
|
|
69446
|
+
]);
|
|
69459
69447
|
var options12 = exports_external.object({});
|
|
69460
|
-
function Agent(
|
|
69448
|
+
function Agent({ args: [agentIdArg] }) {
|
|
69461
69449
|
const { exit } = use_app_default();
|
|
69462
69450
|
const [state, setState] = import_react42.useState({ phase: "loading" });
|
|
69451
|
+
const [outputItems, setOutputItems] = import_react42.useState([]);
|
|
69463
69452
|
import_react42.useEffect(() => {
|
|
69464
|
-
|
|
69465
|
-
const currentAgent = getCurrentAgent();
|
|
69466
|
-
const agents = listAgents();
|
|
69467
|
-
setState({ phase: "success", currentAgent, agents });
|
|
69468
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
69469
|
-
exit();
|
|
69470
|
-
}
|
|
69471
|
-
loadAgents();
|
|
69472
|
-
}, [exit]);
|
|
69473
|
-
switch (state.phase) {
|
|
69474
|
-
case "loading":
|
|
69475
|
-
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Spinner2, {
|
|
69476
|
-
text: "Loading agents..."
|
|
69477
|
-
}, undefined, false, undefined, this);
|
|
69478
|
-
case "success": {
|
|
69479
|
-
const tableData = state.agents.map((agent) => ({
|
|
69480
|
-
id: agent.id,
|
|
69481
|
-
name: agent.name,
|
|
69482
|
-
description: agent.description,
|
|
69483
|
-
current: agent.id === state.currentAgent ? "*" : ""
|
|
69484
|
-
}));
|
|
69485
|
-
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69486
|
-
flexDirection: "column",
|
|
69487
|
-
children: [
|
|
69488
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69489
|
-
marginBottom: 1,
|
|
69490
|
-
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69491
|
-
bold: true,
|
|
69492
|
-
children: "Supported Agents"
|
|
69493
|
-
}, undefined, false, undefined, this)
|
|
69494
|
-
}, undefined, false, undefined, this),
|
|
69495
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Table, {
|
|
69496
|
-
data: tableData,
|
|
69497
|
-
columns: ["current", "id", "name", "description"]
|
|
69498
|
-
}, undefined, false, undefined, this),
|
|
69499
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69500
|
-
marginTop: 1,
|
|
69501
|
-
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69502
|
-
dimColor: true,
|
|
69503
|
-
children: [
|
|
69504
|
-
"Current: ",
|
|
69505
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69506
|
-
color: "cyan",
|
|
69507
|
-
children: state.currentAgent
|
|
69508
|
-
}, undefined, false, undefined, this)
|
|
69509
|
-
]
|
|
69510
|
-
}, undefined, true, undefined, this)
|
|
69511
|
-
}, undefined, false, undefined, this),
|
|
69512
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69513
|
-
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69514
|
-
dimColor: true,
|
|
69515
|
-
children: "Run 'skilluse agent use <id>' to switch agents."
|
|
69516
|
-
}, undefined, false, undefined, this)
|
|
69517
|
-
}, undefined, false, undefined, this)
|
|
69518
|
-
]
|
|
69519
|
-
}, undefined, true, undefined, this);
|
|
69520
|
-
}
|
|
69521
|
-
}
|
|
69522
|
-
}
|
|
69523
|
-
|
|
69524
|
-
// src/commands/agent/use.tsx
|
|
69525
|
-
var import_react43 = __toESM(require_react(), 1);
|
|
69526
|
-
var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
|
|
69527
|
-
var args7 = exports_external.tuple([exports_external.string().describe("Agent ID to switch to")]);
|
|
69528
|
-
var options13 = exports_external.object({});
|
|
69529
|
-
function AgentUse({ args: [agentIdArg], options: _opts }) {
|
|
69530
|
-
const { exit } = use_app_default();
|
|
69531
|
-
const [state, setState] = import_react43.useState({ phase: "checking" });
|
|
69532
|
-
import_react43.useEffect(() => {
|
|
69533
|
-
async function switchAgent() {
|
|
69453
|
+
if (agentIdArg) {
|
|
69534
69454
|
const agent = getAgent(agentIdArg);
|
|
69535
69455
|
if (!agent) {
|
|
69536
69456
|
setState({ phase: "not_found", agentId: agentIdArg });
|
|
69537
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
69538
|
-
exit();
|
|
69539
69457
|
return;
|
|
69540
69458
|
}
|
|
69541
69459
|
const currentAgent = getCurrentAgent();
|
|
@@ -69545,88 +69463,147 @@ function AgentUse({ args: [agentIdArg], options: _opts }) {
|
|
|
69545
69463
|
agentId: agentIdArg,
|
|
69546
69464
|
agentName: agent.name
|
|
69547
69465
|
});
|
|
69548
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
69549
|
-
exit();
|
|
69550
69466
|
return;
|
|
69551
69467
|
}
|
|
69552
69468
|
setCurrentAgent(agentIdArg);
|
|
69553
69469
|
setState({
|
|
69554
|
-
phase: "
|
|
69470
|
+
phase: "switched",
|
|
69555
69471
|
agentId: agentIdArg,
|
|
69556
69472
|
agentName: agent.name
|
|
69557
69473
|
});
|
|
69558
|
-
|
|
69559
|
-
|
|
69474
|
+
} else {
|
|
69475
|
+
const currentAgent = getCurrentAgent();
|
|
69476
|
+
const agents = listAgents();
|
|
69477
|
+
setState({ phase: "selecting", currentAgent, agents });
|
|
69560
69478
|
}
|
|
69561
|
-
|
|
69562
|
-
|
|
69563
|
-
|
|
69564
|
-
|
|
69565
|
-
|
|
69566
|
-
|
|
69567
|
-
|
|
69568
|
-
|
|
69569
|
-
|
|
69570
|
-
|
|
69571
|
-
|
|
69572
|
-
|
|
69573
|
-
|
|
69574
|
-
|
|
69575
|
-
|
|
69576
|
-
|
|
69577
|
-
|
|
69578
|
-
|
|
69579
|
-
|
|
69580
|
-
|
|
69581
|
-
|
|
69582
|
-
|
|
69583
|
-
|
|
69584
|
-
|
|
69585
|
-
|
|
69586
|
-
|
|
69587
|
-
|
|
69588
|
-
|
|
69589
|
-
|
|
69590
|
-
|
|
69591
|
-
|
|
69592
|
-
|
|
69593
|
-
|
|
69594
|
-
|
|
69595
|
-
|
|
69596
|
-
|
|
69597
|
-
|
|
69598
|
-
|
|
69599
|
-
|
|
69600
|
-
|
|
69601
|
-
|
|
69602
|
-
|
|
69603
|
-
|
|
69604
|
-
|
|
69605
|
-
|
|
69606
|
-
|
|
69479
|
+
}, [agentIdArg]);
|
|
69480
|
+
import_react42.useEffect(() => {
|
|
69481
|
+
if (state.phase !== "loading" && state.phase !== "selecting" && outputItems.length === 0) {
|
|
69482
|
+
setOutputItems([{ id: "output" }]);
|
|
69483
|
+
}
|
|
69484
|
+
}, [state.phase, outputItems.length]);
|
|
69485
|
+
import_react42.useEffect(() => {
|
|
69486
|
+
if (outputItems.length > 0) {
|
|
69487
|
+
process.nextTick(() => exit());
|
|
69488
|
+
}
|
|
69489
|
+
}, [outputItems.length, exit]);
|
|
69490
|
+
const handleSelect = (item) => {
|
|
69491
|
+
const agent = getAgent(item.value);
|
|
69492
|
+
if (!agent)
|
|
69493
|
+
return;
|
|
69494
|
+
const currentAgent = getCurrentAgent();
|
|
69495
|
+
if (currentAgent === item.value) {
|
|
69496
|
+
setState({
|
|
69497
|
+
phase: "already_current",
|
|
69498
|
+
agentId: item.value,
|
|
69499
|
+
agentName: agent.name
|
|
69500
|
+
});
|
|
69501
|
+
return;
|
|
69502
|
+
}
|
|
69503
|
+
setCurrentAgent(item.value);
|
|
69504
|
+
setState({
|
|
69505
|
+
phase: "switched",
|
|
69506
|
+
agentId: item.value,
|
|
69507
|
+
agentName: agent.name
|
|
69508
|
+
});
|
|
69509
|
+
};
|
|
69510
|
+
const renderContent = () => {
|
|
69511
|
+
switch (state.phase) {
|
|
69512
|
+
case "selecting": {
|
|
69513
|
+
const items = state.agents.map((agent) => ({
|
|
69514
|
+
label: agent.id === state.currentAgent ? `${agent.name} (current)` : agent.name,
|
|
69515
|
+
value: agent.id
|
|
69516
|
+
}));
|
|
69517
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69518
|
+
flexDirection: "column",
|
|
69519
|
+
children: [
|
|
69520
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69521
|
+
marginBottom: 1,
|
|
69522
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69523
|
+
bold: true,
|
|
69524
|
+
children: "Select an agent:"
|
|
69525
|
+
}, undefined, false, undefined, this)
|
|
69526
|
+
}, undefined, false, undefined, this),
|
|
69527
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Select, {
|
|
69528
|
+
items,
|
|
69529
|
+
onSelect: handleSelect
|
|
69530
|
+
}, undefined, false, undefined, this)
|
|
69531
|
+
]
|
|
69532
|
+
}, undefined, true, undefined, this);
|
|
69533
|
+
}
|
|
69534
|
+
case "not_found":
|
|
69535
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
|
|
69536
|
+
children: [
|
|
69537
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
|
|
69538
|
+
type: "error",
|
|
69539
|
+
children: [
|
|
69540
|
+
"Unknown agent: ",
|
|
69541
|
+
state.agentId
|
|
69542
|
+
]
|
|
69543
|
+
}, undefined, true, undefined, this),
|
|
69544
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69607
69545
|
dimColor: true,
|
|
69546
|
+
children: "Run 'skilluse agent' to see available agents."
|
|
69547
|
+
}, undefined, false, undefined, this)
|
|
69548
|
+
]
|
|
69549
|
+
}, undefined, true, undefined, this);
|
|
69550
|
+
case "already_current":
|
|
69551
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
|
|
69552
|
+
type: "success",
|
|
69553
|
+
children: [
|
|
69554
|
+
state.agentName,
|
|
69555
|
+
" is already the current agent"
|
|
69556
|
+
]
|
|
69557
|
+
}, undefined, true, undefined, this);
|
|
69558
|
+
case "switched":
|
|
69559
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
|
|
69560
|
+
children: [
|
|
69561
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
|
|
69562
|
+
type: "success",
|
|
69608
69563
|
children: [
|
|
69609
|
-
"
|
|
69610
|
-
state.
|
|
69611
|
-
"'s paths."
|
|
69564
|
+
"Switched to ",
|
|
69565
|
+
state.agentName
|
|
69612
69566
|
]
|
|
69613
|
-
}, undefined, true, undefined, this)
|
|
69614
|
-
|
|
69615
|
-
|
|
69616
|
-
|
|
69617
|
-
|
|
69618
|
-
|
|
69619
|
-
|
|
69620
|
-
|
|
69621
|
-
|
|
69567
|
+
}, undefined, true, undefined, this),
|
|
69568
|
+
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69569
|
+
marginTop: 1,
|
|
69570
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69571
|
+
dimColor: true,
|
|
69572
|
+
children: [
|
|
69573
|
+
"Skills will now be installed to ",
|
|
69574
|
+
state.agentId,
|
|
69575
|
+
"'s paths."
|
|
69576
|
+
]
|
|
69577
|
+
}, undefined, true, undefined, this)
|
|
69578
|
+
}, undefined, false, undefined, this)
|
|
69579
|
+
]
|
|
69580
|
+
}, undefined, true, undefined, this);
|
|
69581
|
+
default:
|
|
69582
|
+
return null;
|
|
69583
|
+
}
|
|
69584
|
+
};
|
|
69585
|
+
if (state.phase === "loading") {
|
|
69586
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Spinner2, {
|
|
69587
|
+
text: "Loading..."
|
|
69588
|
+
}, undefined, false, undefined, this);
|
|
69589
|
+
}
|
|
69590
|
+
if (state.phase === "selecting") {
|
|
69591
|
+
return renderContent();
|
|
69622
69592
|
}
|
|
69593
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Static, {
|
|
69594
|
+
items: outputItems,
|
|
69595
|
+
children: (item) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69596
|
+
flexDirection: "column",
|
|
69597
|
+
children: renderContent()
|
|
69598
|
+
}, item.id, false, undefined, this)
|
|
69599
|
+
}, undefined, false, undefined, this);
|
|
69623
69600
|
}
|
|
69624
69601
|
|
|
69625
69602
|
// src/commands/search.tsx
|
|
69626
|
-
var
|
|
69627
|
-
var
|
|
69603
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
69604
|
+
var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
|
|
69628
69605
|
var args8 = exports_external.tuple([exports_external.string().describe("Search keyword")]);
|
|
69629
|
-
var
|
|
69606
|
+
var options13 = exports_external.object({
|
|
69630
69607
|
all: exports_external.boolean().default(false).describe("Search in all configured repos (not just default)")
|
|
69631
69608
|
});
|
|
69632
69609
|
function parseFrontmatter4(content) {
|
|
@@ -69716,8 +69693,8 @@ function filterSkills(skills, keyword) {
|
|
|
69716
69693
|
}
|
|
69717
69694
|
function Search({ args: [keyword], options: opts }) {
|
|
69718
69695
|
const { exit } = use_app_default();
|
|
69719
|
-
const [state, setState] =
|
|
69720
|
-
|
|
69696
|
+
const [state, setState] = import_react43.useState({ phase: "checking" });
|
|
69697
|
+
import_react43.useEffect(() => {
|
|
69721
69698
|
async function search() {
|
|
69722
69699
|
const config2 = getConfig();
|
|
69723
69700
|
let reposToSearch = [];
|
|
@@ -69763,62 +69740,62 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69763
69740
|
}, [keyword, opts.all, exit]);
|
|
69764
69741
|
switch (state.phase) {
|
|
69765
69742
|
case "checking":
|
|
69766
|
-
return /* @__PURE__ */
|
|
69743
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Spinner2, {
|
|
69767
69744
|
text: "Initializing..."
|
|
69768
69745
|
}, undefined, false, undefined, this);
|
|
69769
69746
|
case "auth_required":
|
|
69770
|
-
return /* @__PURE__ */
|
|
69747
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69771
69748
|
flexDirection: "column",
|
|
69772
|
-
children: /* @__PURE__ */
|
|
69749
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69773
69750
|
type: "error",
|
|
69774
69751
|
children: state.message
|
|
69775
69752
|
}, undefined, false, undefined, this)
|
|
69776
69753
|
}, undefined, false, undefined, this);
|
|
69777
69754
|
case "no_repos":
|
|
69778
|
-
return /* @__PURE__ */
|
|
69755
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69779
69756
|
flexDirection: "column",
|
|
69780
69757
|
children: [
|
|
69781
|
-
/* @__PURE__ */
|
|
69758
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69782
69759
|
type: "warning",
|
|
69783
69760
|
children: "No repositories configured"
|
|
69784
69761
|
}, undefined, false, undefined, this),
|
|
69785
|
-
/* @__PURE__ */
|
|
69762
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69786
69763
|
dimColor: true,
|
|
69787
69764
|
children: "Run 'skilluse repo add owner/repo' to add a skill repository."
|
|
69788
69765
|
}, undefined, false, undefined, this)
|
|
69789
69766
|
]
|
|
69790
69767
|
}, undefined, true, undefined, this);
|
|
69791
69768
|
case "searching":
|
|
69792
|
-
return /* @__PURE__ */
|
|
69769
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Spinner2, {
|
|
69793
69770
|
text: `Searching ${state.repo}...`
|
|
69794
69771
|
}, undefined, false, undefined, this);
|
|
69795
69772
|
case "success":
|
|
69796
69773
|
if (state.skills.length === 0) {
|
|
69797
|
-
return /* @__PURE__ */
|
|
69774
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69798
69775
|
flexDirection: "column",
|
|
69799
69776
|
children: [
|
|
69800
|
-
/* @__PURE__ */
|
|
69777
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69801
69778
|
marginBottom: 1,
|
|
69802
69779
|
children: [
|
|
69803
|
-
/* @__PURE__ */
|
|
69780
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69804
69781
|
children: 'Search results for "'
|
|
69805
69782
|
}, undefined, false, undefined, this),
|
|
69806
|
-
/* @__PURE__ */
|
|
69783
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69807
69784
|
color: "cyan",
|
|
69808
69785
|
children: state.keyword
|
|
69809
69786
|
}, undefined, false, undefined, this),
|
|
69810
|
-
/* @__PURE__ */
|
|
69787
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69811
69788
|
children: '"'
|
|
69812
69789
|
}, undefined, false, undefined, this)
|
|
69813
69790
|
]
|
|
69814
69791
|
}, undefined, true, undefined, this),
|
|
69815
|
-
/* @__PURE__ */
|
|
69792
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69816
69793
|
type: "warning",
|
|
69817
69794
|
children: "No skills found"
|
|
69818
69795
|
}, undefined, false, undefined, this),
|
|
69819
|
-
/* @__PURE__ */
|
|
69796
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69820
69797
|
marginTop: 1,
|
|
69821
|
-
children: /* @__PURE__ */
|
|
69798
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69822
69799
|
dimColor: true,
|
|
69823
69800
|
children: "Try a different search term or check your configured repos with 'skilluse repo list'."
|
|
69824
69801
|
}, undefined, false, undefined, this)
|
|
@@ -69826,36 +69803,36 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69826
69803
|
]
|
|
69827
69804
|
}, undefined, true, undefined, this);
|
|
69828
69805
|
}
|
|
69829
|
-
return /* @__PURE__ */
|
|
69806
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69830
69807
|
flexDirection: "column",
|
|
69831
69808
|
children: [
|
|
69832
|
-
/* @__PURE__ */
|
|
69809
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69833
69810
|
marginBottom: 1,
|
|
69834
69811
|
children: [
|
|
69835
|
-
/* @__PURE__ */
|
|
69812
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69836
69813
|
children: 'Search results for "'
|
|
69837
69814
|
}, undefined, false, undefined, this),
|
|
69838
|
-
/* @__PURE__ */
|
|
69815
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69839
69816
|
color: "cyan",
|
|
69840
69817
|
children: state.keyword
|
|
69841
69818
|
}, undefined, false, undefined, this),
|
|
69842
|
-
/* @__PURE__ */
|
|
69819
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69843
69820
|
children: '"'
|
|
69844
69821
|
}, undefined, false, undefined, this)
|
|
69845
69822
|
]
|
|
69846
69823
|
}, undefined, true, undefined, this),
|
|
69847
|
-
state.skills.map((skill) => /* @__PURE__ */
|
|
69824
|
+
state.skills.map((skill) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69848
69825
|
flexDirection: "column",
|
|
69849
69826
|
marginBottom: 1,
|
|
69850
69827
|
children: [
|
|
69851
|
-
/* @__PURE__ */
|
|
69828
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69852
69829
|
children: [
|
|
69853
|
-
/* @__PURE__ */
|
|
69830
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69854
69831
|
color: "cyan",
|
|
69855
69832
|
bold: true,
|
|
69856
69833
|
children: skill.name
|
|
69857
69834
|
}, undefined, false, undefined, this),
|
|
69858
|
-
skill.version && /* @__PURE__ */
|
|
69835
|
+
skill.version && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69859
69836
|
dimColor: true,
|
|
69860
69837
|
children: [
|
|
69861
69838
|
" v",
|
|
@@ -69864,15 +69841,15 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69864
69841
|
}, undefined, true, undefined, this)
|
|
69865
69842
|
]
|
|
69866
69843
|
}, undefined, true, undefined, this),
|
|
69867
|
-
/* @__PURE__ */
|
|
69844
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69868
69845
|
marginLeft: 2,
|
|
69869
|
-
children: /* @__PURE__ */
|
|
69846
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69870
69847
|
children: skill.description
|
|
69871
69848
|
}, undefined, false, undefined, this)
|
|
69872
69849
|
}, undefined, false, undefined, this),
|
|
69873
|
-
/* @__PURE__ */
|
|
69850
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69874
69851
|
marginLeft: 2,
|
|
69875
|
-
children: /* @__PURE__ */
|
|
69852
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69876
69853
|
dimColor: true,
|
|
69877
69854
|
children: [
|
|
69878
69855
|
skill.repo,
|
|
@@ -69882,9 +69859,9 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69882
69859
|
}, undefined, false, undefined, this)
|
|
69883
69860
|
]
|
|
69884
69861
|
}, `${skill.repo}/${skill.path}`, true, undefined, this)),
|
|
69885
|
-
/* @__PURE__ */
|
|
69862
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69886
69863
|
marginTop: 1,
|
|
69887
|
-
children: /* @__PURE__ */
|
|
69864
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69888
69865
|
dimColor: true,
|
|
69889
69866
|
children: [
|
|
69890
69867
|
state.skills.length,
|
|
@@ -69898,7 +69875,7 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69898
69875
|
]
|
|
69899
69876
|
}, undefined, true, undefined, this);
|
|
69900
69877
|
case "error":
|
|
69901
|
-
return /* @__PURE__ */
|
|
69878
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69902
69879
|
type: "error",
|
|
69903
69880
|
children: state.message
|
|
69904
69881
|
}, undefined, false, undefined, this);
|
|
@@ -69907,10 +69884,10 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69907
69884
|
|
|
69908
69885
|
// src/commands/uninstall.tsx
|
|
69909
69886
|
import { rm } from "node:fs/promises";
|
|
69910
|
-
var
|
|
69911
|
-
var
|
|
69887
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
69888
|
+
var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
|
|
69912
69889
|
var args9 = exports_external.tuple([exports_external.string().describe("Skill name to uninstall")]);
|
|
69913
|
-
var
|
|
69890
|
+
var options14 = exports_external.object({
|
|
69914
69891
|
force: exports_external.boolean().default(false).describe("Skip confirmation prompt")
|
|
69915
69892
|
});
|
|
69916
69893
|
function ConfirmPrompt({
|
|
@@ -69925,20 +69902,20 @@ function ConfirmPrompt({
|
|
|
69925
69902
|
onCancel();
|
|
69926
69903
|
}
|
|
69927
69904
|
});
|
|
69928
|
-
return /* @__PURE__ */
|
|
69905
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69929
69906
|
flexDirection: "column",
|
|
69930
69907
|
children: [
|
|
69931
|
-
/* @__PURE__ */
|
|
69908
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69932
69909
|
children: [
|
|
69933
|
-
/* @__PURE__ */
|
|
69910
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69934
69911
|
children: "Uninstall "
|
|
69935
69912
|
}, undefined, false, undefined, this),
|
|
69936
|
-
/* @__PURE__ */
|
|
69913
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69937
69914
|
color: "cyan",
|
|
69938
69915
|
bold: true,
|
|
69939
69916
|
children: skill.name
|
|
69940
69917
|
}, undefined, false, undefined, this),
|
|
69941
|
-
/* @__PURE__ */
|
|
69918
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69942
69919
|
children: [
|
|
69943
69920
|
" v",
|
|
69944
69921
|
skill.version,
|
|
@@ -69947,9 +69924,9 @@ function ConfirmPrompt({
|
|
|
69947
69924
|
}, undefined, true, undefined, this)
|
|
69948
69925
|
]
|
|
69949
69926
|
}, undefined, true, undefined, this),
|
|
69950
|
-
/* @__PURE__ */
|
|
69927
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69951
69928
|
marginLeft: 2,
|
|
69952
|
-
children: /* @__PURE__ */
|
|
69929
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69953
69930
|
dimColor: true,
|
|
69954
69931
|
children: [
|
|
69955
69932
|
"Location: ",
|
|
@@ -69957,26 +69934,26 @@ function ConfirmPrompt({
|
|
|
69957
69934
|
]
|
|
69958
69935
|
}, undefined, true, undefined, this)
|
|
69959
69936
|
}, undefined, false, undefined, this),
|
|
69960
|
-
/* @__PURE__ */
|
|
69937
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69961
69938
|
marginTop: 1,
|
|
69962
69939
|
children: [
|
|
69963
|
-
/* @__PURE__ */
|
|
69940
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69964
69941
|
dimColor: true,
|
|
69965
69942
|
children: "Press "
|
|
69966
69943
|
}, undefined, false, undefined, this),
|
|
69967
|
-
/* @__PURE__ */
|
|
69944
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69968
69945
|
color: "green",
|
|
69969
69946
|
children: "Y"
|
|
69970
69947
|
}, undefined, false, undefined, this),
|
|
69971
|
-
/* @__PURE__ */
|
|
69948
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69972
69949
|
dimColor: true,
|
|
69973
69950
|
children: " to confirm, "
|
|
69974
69951
|
}, undefined, false, undefined, this),
|
|
69975
|
-
/* @__PURE__ */
|
|
69952
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69976
69953
|
color: "red",
|
|
69977
69954
|
children: "N"
|
|
69978
69955
|
}, undefined, false, undefined, this),
|
|
69979
|
-
/* @__PURE__ */
|
|
69956
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69980
69957
|
dimColor: true,
|
|
69981
69958
|
children: " to cancel"
|
|
69982
69959
|
}, undefined, false, undefined, this)
|
|
@@ -69987,8 +69964,8 @@ function ConfirmPrompt({
|
|
|
69987
69964
|
}
|
|
69988
69965
|
function Uninstall({ args: [skillName], options: opts }) {
|
|
69989
69966
|
const { exit } = use_app_default();
|
|
69990
|
-
const [state, setState] =
|
|
69991
|
-
const performUninstall =
|
|
69967
|
+
const [state, setState] = import_react44.useState({ phase: "checking" });
|
|
69968
|
+
const performUninstall = import_react44.useCallback(async (skill) => {
|
|
69992
69969
|
setState({ phase: "uninstalling", skill });
|
|
69993
69970
|
try {
|
|
69994
69971
|
await rm(skill.installedPath, { recursive: true, force: true });
|
|
@@ -70002,7 +69979,7 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70002
69979
|
}
|
|
70003
69980
|
exit();
|
|
70004
69981
|
}, [exit]);
|
|
70005
|
-
|
|
69982
|
+
import_react44.useEffect(() => {
|
|
70006
69983
|
const config2 = getConfig();
|
|
70007
69984
|
const currentAgentId = getCurrentAgent();
|
|
70008
69985
|
const agentInfo = getAgent(currentAgentId);
|
|
@@ -70030,14 +70007,14 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70030
70007
|
}
|
|
70031
70008
|
switch (state.phase) {
|
|
70032
70009
|
case "checking":
|
|
70033
|
-
return /* @__PURE__ */
|
|
70010
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Spinner2, {
|
|
70034
70011
|
text: "Loading..."
|
|
70035
70012
|
}, undefined, false, undefined, this);
|
|
70036
70013
|
case "not_found":
|
|
70037
|
-
return /* @__PURE__ */
|
|
70014
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
70038
70015
|
flexDirection: "column",
|
|
70039
70016
|
children: [
|
|
70040
|
-
/* @__PURE__ */
|
|
70017
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70041
70018
|
type: "error",
|
|
70042
70019
|
children: [
|
|
70043
70020
|
'Skill "',
|
|
@@ -70046,15 +70023,15 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70046
70023
|
state.agentName
|
|
70047
70024
|
]
|
|
70048
70025
|
}, undefined, true, undefined, this),
|
|
70049
|
-
/* @__PURE__ */
|
|
70026
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
70050
70027
|
marginTop: 1,
|
|
70051
|
-
children: /* @__PURE__ */
|
|
70028
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
70052
70029
|
dimColor: true,
|
|
70053
70030
|
children: "Run 'skilluse list' to see installed skills."
|
|
70054
70031
|
}, undefined, false, undefined, this)
|
|
70055
70032
|
}, undefined, false, undefined, this),
|
|
70056
|
-
/* @__PURE__ */
|
|
70057
|
-
children: /* @__PURE__ */
|
|
70033
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
70034
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
70058
70035
|
dimColor: true,
|
|
70059
70036
|
children: "Run 'skilluse list --all' to see skills for all agents."
|
|
70060
70037
|
}, undefined, false, undefined, this)
|
|
@@ -70062,17 +70039,17 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70062
70039
|
]
|
|
70063
70040
|
}, undefined, true, undefined, this);
|
|
70064
70041
|
case "confirming":
|
|
70065
|
-
return /* @__PURE__ */
|
|
70042
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ConfirmPrompt, {
|
|
70066
70043
|
skill: state.skill,
|
|
70067
70044
|
onConfirm: handleConfirm,
|
|
70068
70045
|
onCancel: handleCancel
|
|
70069
70046
|
}, undefined, false, undefined, this);
|
|
70070
70047
|
case "uninstalling":
|
|
70071
|
-
return /* @__PURE__ */
|
|
70048
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Spinner2, {
|
|
70072
70049
|
text: `Uninstalling ${state.skill.name}...`
|
|
70073
70050
|
}, undefined, false, undefined, this);
|
|
70074
70051
|
case "success":
|
|
70075
|
-
return /* @__PURE__ */
|
|
70052
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70076
70053
|
type: "success",
|
|
70077
70054
|
children: [
|
|
70078
70055
|
'Uninstalled "',
|
|
@@ -70081,12 +70058,12 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70081
70058
|
]
|
|
70082
70059
|
}, undefined, true, undefined, this);
|
|
70083
70060
|
case "cancelled":
|
|
70084
|
-
return /* @__PURE__ */
|
|
70061
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70085
70062
|
type: "warning",
|
|
70086
70063
|
children: "Uninstall cancelled"
|
|
70087
70064
|
}, undefined, false, undefined, this);
|
|
70088
70065
|
case "error":
|
|
70089
|
-
return /* @__PURE__ */
|
|
70066
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70090
70067
|
type: "error",
|
|
70091
70068
|
children: state.message
|
|
70092
70069
|
}, undefined, false, undefined, this);
|
|
@@ -70096,12 +70073,12 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70096
70073
|
// src/commands/upgrade.tsx
|
|
70097
70074
|
import { mkdir as mkdir2, rm as rm2, writeFile as writeFile2 } from "node:fs/promises";
|
|
70098
70075
|
import { join as join4 } from "node:path";
|
|
70099
|
-
var
|
|
70100
|
-
var
|
|
70076
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
70077
|
+
var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
|
|
70101
70078
|
var args10 = exports_external.tuple([
|
|
70102
70079
|
exports_external.string().optional().describe("Skill name to upgrade (optional, upgrades all if omitted)")
|
|
70103
70080
|
]);
|
|
70104
|
-
var
|
|
70081
|
+
var options15 = exports_external.object({});
|
|
70105
70082
|
function parseFrontmatter5(content) {
|
|
70106
70083
|
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
70107
70084
|
if (!frontmatterMatch)
|
|
@@ -70210,8 +70187,8 @@ async function downloadSkillFiles2(token, repo, skillPath, branch, targetDir) {
|
|
|
70210
70187
|
}
|
|
70211
70188
|
function Upgrade({ args: [skillName] }) {
|
|
70212
70189
|
const { exit } = use_app_default();
|
|
70213
|
-
const [state, setState] =
|
|
70214
|
-
|
|
70190
|
+
const [state, setState] = import_react45.useState({ phase: "checking" });
|
|
70191
|
+
import_react45.useEffect(() => {
|
|
70215
70192
|
async function upgrade() {
|
|
70216
70193
|
const config2 = getConfig();
|
|
70217
70194
|
let skillsToCheck = [];
|
|
@@ -70307,22 +70284,22 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70307
70284
|
}, [skillName, exit]);
|
|
70308
70285
|
switch (state.phase) {
|
|
70309
70286
|
case "checking":
|
|
70310
|
-
return /* @__PURE__ */
|
|
70287
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Spinner2, {
|
|
70311
70288
|
text: "Initializing..."
|
|
70312
70289
|
}, undefined, false, undefined, this);
|
|
70313
70290
|
case "auth_required":
|
|
70314
|
-
return /* @__PURE__ */
|
|
70291
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70315
70292
|
flexDirection: "column",
|
|
70316
|
-
children: /* @__PURE__ */
|
|
70293
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70317
70294
|
type: "error",
|
|
70318
70295
|
children: state.message
|
|
70319
70296
|
}, undefined, false, undefined, this)
|
|
70320
70297
|
}, undefined, false, undefined, this);
|
|
70321
70298
|
case "not_found":
|
|
70322
|
-
return /* @__PURE__ */
|
|
70299
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70323
70300
|
flexDirection: "column",
|
|
70324
70301
|
children: [
|
|
70325
|
-
/* @__PURE__ */
|
|
70302
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70326
70303
|
type: "error",
|
|
70327
70304
|
children: [
|
|
70328
70305
|
'Skill "',
|
|
@@ -70330,9 +70307,9 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70330
70307
|
'" is not installed'
|
|
70331
70308
|
]
|
|
70332
70309
|
}, undefined, true, undefined, this),
|
|
70333
|
-
/* @__PURE__ */
|
|
70310
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70334
70311
|
marginTop: 1,
|
|
70335
|
-
children: /* @__PURE__ */
|
|
70312
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70336
70313
|
dimColor: true,
|
|
70337
70314
|
children: "Run 'skilluse list' to see installed skills."
|
|
70338
70315
|
}, undefined, false, undefined, this)
|
|
@@ -70340,50 +70317,50 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70340
70317
|
]
|
|
70341
70318
|
}, undefined, true, undefined, this);
|
|
70342
70319
|
case "checking_updates":
|
|
70343
|
-
return /* @__PURE__ */
|
|
70320
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Spinner2, {
|
|
70344
70321
|
text: `Checking for updates (${state.current}/${state.total})...`
|
|
70345
70322
|
}, undefined, false, undefined, this);
|
|
70346
70323
|
case "no_updates":
|
|
70347
|
-
return /* @__PURE__ */
|
|
70324
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70348
70325
|
type: "success",
|
|
70349
70326
|
children: "All skills are up to date"
|
|
70350
70327
|
}, undefined, false, undefined, this);
|
|
70351
70328
|
case "upgrading":
|
|
70352
|
-
return /* @__PURE__ */
|
|
70329
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70353
70330
|
flexDirection: "column",
|
|
70354
70331
|
children: [
|
|
70355
|
-
/* @__PURE__ */
|
|
70332
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70356
70333
|
marginBottom: 1,
|
|
70357
|
-
children: /* @__PURE__ */
|
|
70334
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70358
70335
|
bold: true,
|
|
70359
70336
|
children: "Upgrading skills..."
|
|
70360
70337
|
}, undefined, false, undefined, this)
|
|
70361
70338
|
}, undefined, false, undefined, this),
|
|
70362
|
-
state.upgrades.map((upgrade, i) => /* @__PURE__ */
|
|
70339
|
+
state.upgrades.map((upgrade, i) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70363
70340
|
children: [
|
|
70364
|
-
/* @__PURE__ */
|
|
70341
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70365
70342
|
children: [
|
|
70366
|
-
i < state.current && /* @__PURE__ */
|
|
70343
|
+
i < state.current && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70367
70344
|
color: "green",
|
|
70368
70345
|
children: "✔"
|
|
70369
70346
|
}, undefined, false, undefined, this),
|
|
70370
|
-
i === state.current && /* @__PURE__ */
|
|
70347
|
+
i === state.current && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70371
70348
|
color: "yellow",
|
|
70372
70349
|
children: "◐"
|
|
70373
70350
|
}, undefined, false, undefined, this),
|
|
70374
|
-
i > state.current && /* @__PURE__ */
|
|
70351
|
+
i > state.current && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70375
70352
|
dimColor: true,
|
|
70376
70353
|
children: "○"
|
|
70377
70354
|
}, undefined, false, undefined, this)
|
|
70378
70355
|
]
|
|
70379
70356
|
}, undefined, true, undefined, this),
|
|
70380
|
-
/* @__PURE__ */
|
|
70357
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70381
70358
|
children: [
|
|
70382
70359
|
" ",
|
|
70383
70360
|
upgrade.skill.name
|
|
70384
70361
|
]
|
|
70385
70362
|
}, undefined, true, undefined, this),
|
|
70386
|
-
/* @__PURE__ */
|
|
70363
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70387
70364
|
dimColor: true,
|
|
70388
70365
|
children: [
|
|
70389
70366
|
" ",
|
|
@@ -70395,9 +70372,9 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70395
70372
|
}, undefined, true, undefined, this)
|
|
70396
70373
|
]
|
|
70397
70374
|
}, upgrade.skill.name, true, undefined, this)),
|
|
70398
|
-
/* @__PURE__ */
|
|
70375
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70399
70376
|
marginTop: 1,
|
|
70400
|
-
children: /* @__PURE__ */
|
|
70377
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ProgressBar, {
|
|
70401
70378
|
percent: state.progress,
|
|
70402
70379
|
width: 30
|
|
70403
70380
|
}, undefined, false, undefined, this)
|
|
@@ -70405,10 +70382,10 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70405
70382
|
]
|
|
70406
70383
|
}, undefined, true, undefined, this);
|
|
70407
70384
|
case "success":
|
|
70408
|
-
return /* @__PURE__ */
|
|
70385
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70409
70386
|
flexDirection: "column",
|
|
70410
70387
|
children: [
|
|
70411
|
-
/* @__PURE__ */
|
|
70388
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70412
70389
|
type: "success",
|
|
70413
70390
|
children: [
|
|
70414
70391
|
"Upgraded ",
|
|
@@ -70416,10 +70393,10 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70416
70393
|
" skill(s)"
|
|
70417
70394
|
]
|
|
70418
70395
|
}, undefined, true, undefined, this),
|
|
70419
|
-
/* @__PURE__ */
|
|
70396
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70420
70397
|
flexDirection: "column",
|
|
70421
70398
|
marginLeft: 2,
|
|
70422
|
-
children: state.upgraded.map((name) => /* @__PURE__ */
|
|
70399
|
+
children: state.upgraded.map((name) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70423
70400
|
dimColor: true,
|
|
70424
70401
|
children: name
|
|
70425
70402
|
}, name, false, undefined, this))
|
|
@@ -70427,7 +70404,7 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70427
70404
|
]
|
|
70428
70405
|
}, undefined, true, undefined, this);
|
|
70429
70406
|
case "error":
|
|
70430
|
-
return /* @__PURE__ */
|
|
70407
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70431
70408
|
type: "error",
|
|
70432
70409
|
children: state.message
|
|
70433
70410
|
}, undefined, false, undefined, this);
|
|
@@ -70436,7 +70413,7 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70436
70413
|
// package.json
|
|
70437
70414
|
var package_default = {
|
|
70438
70415
|
name: "skilluse",
|
|
70439
|
-
version: "0.
|
|
70416
|
+
version: "0.3.0",
|
|
70440
70417
|
description: "CLI tool for managing and installing AI Coding Agent Skills",
|
|
70441
70418
|
main: "dist/cli.js",
|
|
70442
70419
|
bin: {
|
|
@@ -70506,7 +70483,7 @@ var package_default = {
|
|
|
70506
70483
|
};
|
|
70507
70484
|
|
|
70508
70485
|
// src/cli.tsx
|
|
70509
|
-
var
|
|
70486
|
+
var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
|
|
70510
70487
|
var VERSION = process.env.VERSION || package_default.version;
|
|
70511
70488
|
var BUILD_TIME = process.env.BUILD_TIME || new Date().toISOString();
|
|
70512
70489
|
var program2 = new Command;
|
|
@@ -70516,113 +70493,107 @@ program2.name("skilluse").description("CLI tool for managing and installing AI C
|
|
|
70516
70493
|
process.exit(0);
|
|
70517
70494
|
});
|
|
70518
70495
|
program2.command("login").description("Authenticate with GitHub").option("-f, --force", "Force re-authentication").action((opts) => {
|
|
70519
|
-
const
|
|
70520
|
-
render_default(/* @__PURE__ */
|
|
70521
|
-
options:
|
|
70496
|
+
const options16 = options4.parse(opts);
|
|
70497
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Login, {
|
|
70498
|
+
options: options16
|
|
70522
70499
|
}, undefined, false, undefined, this));
|
|
70523
70500
|
});
|
|
70524
70501
|
program2.command("logout").description("Clear stored credentials").action(() => {
|
|
70525
|
-
render_default(/* @__PURE__ */
|
|
70502
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Logout, {
|
|
70526
70503
|
options: {}
|
|
70527
70504
|
}, undefined, false, undefined, this));
|
|
70528
70505
|
});
|
|
70529
70506
|
program2.command("list").description("List installed skills").option("-o, --outdated", "Show only outdated skills").option("-a, --all", "Show skills for all agents").action((opts) => {
|
|
70530
|
-
const
|
|
70531
|
-
render_default(/* @__PURE__ */
|
|
70532
|
-
options:
|
|
70507
|
+
const options16 = options3.parse(opts);
|
|
70508
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(List, {
|
|
70509
|
+
options: options16
|
|
70533
70510
|
}, undefined, false, undefined, this));
|
|
70534
70511
|
});
|
|
70535
70512
|
program2.command("search <keyword>").description("Search for skills").option("-a, --all", "Search in all configured repos").action((keyword, opts) => {
|
|
70536
70513
|
const args11 = args8.parse([keyword]);
|
|
70537
|
-
const
|
|
70538
|
-
render_default(/* @__PURE__ */
|
|
70514
|
+
const options16 = options13.parse(opts);
|
|
70515
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Search, {
|
|
70539
70516
|
args: args11,
|
|
70540
|
-
options:
|
|
70517
|
+
options: options16
|
|
70541
70518
|
}, undefined, false, undefined, this));
|
|
70542
70519
|
});
|
|
70543
70520
|
program2.command("install <skill-name>").description("Install a skill").option("-g, --global", "Install globally to agent's global skills path").option("-a, --agent <agent>", "Override current agent (e.g., cursor, claude)").action((skillName, opts) => {
|
|
70544
70521
|
const args11 = args2.parse([skillName]);
|
|
70545
|
-
const
|
|
70546
|
-
render_default(/* @__PURE__ */
|
|
70522
|
+
const options16 = options2.parse(opts);
|
|
70523
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Install, {
|
|
70547
70524
|
args: args11,
|
|
70548
|
-
options:
|
|
70525
|
+
options: options16
|
|
70549
70526
|
}, undefined, false, undefined, this));
|
|
70550
70527
|
});
|
|
70551
70528
|
program2.command("uninstall <skill-name>").description("Uninstall a skill").option("-f, --force", "Skip confirmation").action((skillName, opts) => {
|
|
70552
70529
|
const args11 = args9.parse([skillName]);
|
|
70553
|
-
const
|
|
70554
|
-
render_default(/* @__PURE__ */
|
|
70530
|
+
const options16 = options14.parse(opts);
|
|
70531
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Uninstall, {
|
|
70555
70532
|
args: args11,
|
|
70556
|
-
options:
|
|
70533
|
+
options: options16
|
|
70557
70534
|
}, undefined, false, undefined, this));
|
|
70558
70535
|
});
|
|
70559
70536
|
program2.command("upgrade [skill-name]").description("Upgrade skill(s) to latest version").action((skillName) => {
|
|
70560
70537
|
const args11 = args10.parse([skillName]);
|
|
70561
|
-
render_default(/* @__PURE__ */
|
|
70538
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Upgrade, {
|
|
70562
70539
|
args: args11,
|
|
70563
70540
|
options: {}
|
|
70564
70541
|
}, undefined, false, undefined, this));
|
|
70565
70542
|
});
|
|
70566
70543
|
program2.command("info <skill-name>").description("Show skill details").action((skillName) => {
|
|
70567
70544
|
const args11 = args.parse([skillName]);
|
|
70568
|
-
render_default(/* @__PURE__ */
|
|
70545
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Info, {
|
|
70569
70546
|
args: args11,
|
|
70570
70547
|
options: {}
|
|
70571
70548
|
}, undefined, false, undefined, this));
|
|
70572
70549
|
});
|
|
70573
70550
|
var repoCmd = program2.command("repo").description("Manage skill repositories");
|
|
70574
70551
|
repoCmd.command("list").description("List configured repositories").action(() => {
|
|
70575
|
-
render_default(/* @__PURE__ */
|
|
70552
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoList, {
|
|
70576
70553
|
options: {}
|
|
70577
70554
|
}, undefined, false, undefined, this));
|
|
70578
70555
|
});
|
|
70579
70556
|
repoCmd.command("add <url>").description("Add a skill repository").option("-p, --path <path>", "Skill path within the repo").option("-b, --branch <branch>", "Branch to use").option("-d, --default", "Set as default repository").action((url2, opts) => {
|
|
70580
70557
|
const args11 = args3.parse([url2]);
|
|
70581
|
-
const
|
|
70582
|
-
render_default(/* @__PURE__ */
|
|
70558
|
+
const options16 = options6.parse(opts);
|
|
70559
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoAdd, {
|
|
70583
70560
|
args: args11,
|
|
70584
|
-
options:
|
|
70561
|
+
options: options16
|
|
70585
70562
|
}, undefined, false, undefined, this));
|
|
70586
70563
|
});
|
|
70587
70564
|
repoCmd.command("remove <name>").description("Remove a repository").option("-f, --force", "Skip confirmation").action((name, opts) => {
|
|
70588
70565
|
const args11 = args5.parse([name]);
|
|
70589
|
-
const
|
|
70590
|
-
render_default(/* @__PURE__ */
|
|
70566
|
+
const options16 = options10.parse(opts);
|
|
70567
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoRemove, {
|
|
70591
70568
|
args: args11,
|
|
70592
|
-
options:
|
|
70569
|
+
options: options16
|
|
70593
70570
|
}, undefined, false, undefined, this));
|
|
70594
70571
|
});
|
|
70595
70572
|
repoCmd.command("edit <name>").description("Edit repository settings").option("-p, --path <path>", "New skill path").option("-b, --branch <branch>", "New branch").action((name, opts) => {
|
|
70596
70573
|
const args11 = args4.parse([name]);
|
|
70597
|
-
const
|
|
70598
|
-
render_default(/* @__PURE__ */
|
|
70574
|
+
const options16 = options7.parse(opts);
|
|
70575
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoEdit, {
|
|
70599
70576
|
args: args11,
|
|
70600
|
-
options:
|
|
70577
|
+
options: options16
|
|
70601
70578
|
}, undefined, false, undefined, this));
|
|
70602
70579
|
});
|
|
70603
70580
|
repoCmd.command("use <name>").description("Set default repository").action((name, _opts) => {
|
|
70604
70581
|
const args11 = args6.parse([name]);
|
|
70605
|
-
render_default(/* @__PURE__ */
|
|
70582
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoUse, {
|
|
70606
70583
|
args: args11,
|
|
70607
70584
|
options: {}
|
|
70608
70585
|
}, undefined, false, undefined, this));
|
|
70609
70586
|
});
|
|
70610
70587
|
repoCmd.action(() => {
|
|
70611
|
-
render_default(/* @__PURE__ */
|
|
70588
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Repo, {
|
|
70612
70589
|
options: {}
|
|
70613
70590
|
}, undefined, false, undefined, this));
|
|
70614
70591
|
});
|
|
70615
|
-
|
|
70616
|
-
agentCmd.command("use <agent-id>").description("Switch to a different agent").action((agentId) => {
|
|
70592
|
+
program2.command("agent [agent-id]").description("Switch agent or select interactively").action((agentId) => {
|
|
70617
70593
|
const args11 = args7.parse([agentId]);
|
|
70618
|
-
render_default(/* @__PURE__ */
|
|
70594
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Agent, {
|
|
70619
70595
|
args: args11,
|
|
70620
70596
|
options: {}
|
|
70621
70597
|
}, undefined, false, undefined, this));
|
|
70622
70598
|
});
|
|
70623
|
-
agentCmd.action(() => {
|
|
70624
|
-
render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Agent, {
|
|
70625
|
-
options: {}
|
|
70626
|
-
}, undefined, false, undefined, this));
|
|
70627
|
-
});
|
|
70628
70599
|
program2.parse();
|