skilluse 0.2.0 → 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 +590 -610
- 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
|
|
@@ -67782,6 +67725,7 @@ async function checkForUpdate(token, skill, repoConfig) {
|
|
|
67782
67725
|
function List({ options: opts }) {
|
|
67783
67726
|
const { exit } = use_app_default();
|
|
67784
67727
|
const [state, setState] = import_react33.useState({ phase: "checking" });
|
|
67728
|
+
const [outputItems, setOutputItems] = import_react33.useState([]);
|
|
67785
67729
|
import_react33.useEffect(() => {
|
|
67786
67730
|
async function loadSkills() {
|
|
67787
67731
|
const config2 = getConfig();
|
|
@@ -67795,7 +67739,6 @@ function List({ options: opts }) {
|
|
|
67795
67739
|
currentAgent,
|
|
67796
67740
|
showingAll: opts.all
|
|
67797
67741
|
});
|
|
67798
|
-
exit();
|
|
67799
67742
|
return;
|
|
67800
67743
|
}
|
|
67801
67744
|
const credentials = await getCredentials();
|
|
@@ -67816,7 +67759,6 @@ function List({ options: opts }) {
|
|
|
67816
67759
|
phase: "auth_required",
|
|
67817
67760
|
message: result.message
|
|
67818
67761
|
});
|
|
67819
|
-
exit();
|
|
67820
67762
|
return;
|
|
67821
67763
|
}
|
|
67822
67764
|
if (result.hasUpdate) {
|
|
@@ -67831,42 +67773,44 @@ function List({ options: opts }) {
|
|
|
67831
67773
|
currentAgent,
|
|
67832
67774
|
showingAll: opts.all
|
|
67833
67775
|
});
|
|
67834
|
-
exit();
|
|
67835
67776
|
}
|
|
67836
67777
|
loadSkills();
|
|
67837
|
-
}, [opts.outdated, opts.all
|
|
67838
|
-
|
|
67839
|
-
|
|
67840
|
-
|
|
67841
|
-
|
|
67778
|
+
}, [opts.outdated, opts.all]);
|
|
67779
|
+
import_react33.useEffect(() => {
|
|
67780
|
+
const isFinalState = state.phase === "success" || state.phase === "error" || state.phase === "auth_required";
|
|
67781
|
+
if (isFinalState && outputItems.length === 0) {
|
|
67782
|
+
setOutputItems([{ id: "output" }]);
|
|
67783
|
+
}
|
|
67784
|
+
}, [state.phase, outputItems.length]);
|
|
67785
|
+
import_react33.useEffect(() => {
|
|
67786
|
+
if (outputItems.length > 0) {
|
|
67787
|
+
process.nextTick(() => exit());
|
|
67788
|
+
}
|
|
67789
|
+
}, [outputItems.length, exit]);
|
|
67790
|
+
const renderContent = () => {
|
|
67791
|
+
if (state.phase === "auth_required") {
|
|
67792
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(StatusMessage, {
|
|
67793
|
+
type: "error",
|
|
67794
|
+
children: state.message
|
|
67842
67795
|
}, undefined, false, undefined, this);
|
|
67843
|
-
|
|
67844
|
-
|
|
67845
|
-
|
|
67846
|
-
|
|
67847
|
-
|
|
67848
|
-
children: state.message
|
|
67849
|
-
}, undefined, false, undefined, this)
|
|
67850
|
-
}, undefined, false, undefined, this);
|
|
67851
|
-
case "checking_updates":
|
|
67852
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Spinner2, {
|
|
67853
|
-
text: `Checking for updates (${state.current}/${state.total})...`
|
|
67796
|
+
}
|
|
67797
|
+
if (state.phase === "error") {
|
|
67798
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(StatusMessage, {
|
|
67799
|
+
type: "error",
|
|
67800
|
+
children: state.message
|
|
67854
67801
|
}, undefined, false, undefined, this);
|
|
67855
|
-
|
|
67802
|
+
}
|
|
67803
|
+
if (state.phase === "success") {
|
|
67856
67804
|
const agentInfo = getAgent(state.currentAgent);
|
|
67857
67805
|
const agentName = agentInfo?.name || state.currentAgent;
|
|
67858
67806
|
if (state.skills.length === 0) {
|
|
67859
67807
|
if (state.showingOutdated) {
|
|
67860
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(
|
|
67861
|
-
|
|
67862
|
-
children:
|
|
67863
|
-
type: "success",
|
|
67864
|
-
children: "All skills are up to date"
|
|
67865
|
-
}, undefined, false, undefined, this)
|
|
67808
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(StatusMessage, {
|
|
67809
|
+
type: "success",
|
|
67810
|
+
children: "All skills are up to date"
|
|
67866
67811
|
}, undefined, false, undefined, this);
|
|
67867
67812
|
}
|
|
67868
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(
|
|
67869
|
-
flexDirection: "column",
|
|
67813
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
67870
67814
|
children: [
|
|
67871
67815
|
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
67872
67816
|
children: [
|
|
@@ -67908,8 +67852,7 @@ function List({ options: opts }) {
|
|
|
67908
67852
|
}, undefined, true, undefined, this);
|
|
67909
67853
|
}
|
|
67910
67854
|
if (state.showingOutdated) {
|
|
67911
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(
|
|
67912
|
-
flexDirection: "column",
|
|
67855
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
67913
67856
|
children: [
|
|
67914
67857
|
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
67915
67858
|
children: [
|
|
@@ -67989,8 +67932,7 @@ function List({ options: opts }) {
|
|
|
67989
67932
|
]
|
|
67990
67933
|
}, undefined, true, undefined, this);
|
|
67991
67934
|
}
|
|
67992
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(
|
|
67993
|
-
flexDirection: "column",
|
|
67935
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
67994
67936
|
children: [
|
|
67995
67937
|
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
67996
67938
|
children: [
|
|
@@ -68071,12 +68013,22 @@ function List({ options: opts }) {
|
|
|
68071
68013
|
]
|
|
68072
68014
|
}, undefined, true, undefined, this);
|
|
68073
68015
|
}
|
|
68074
|
-
|
|
68075
|
-
|
|
68076
|
-
|
|
68077
|
-
|
|
68078
|
-
|
|
68079
|
-
|
|
68016
|
+
return null;
|
|
68017
|
+
};
|
|
68018
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
68019
|
+
children: [
|
|
68020
|
+
(state.phase === "checking" || state.phase === "checking_updates") && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Spinner2, {
|
|
68021
|
+
text: state.phase === "checking_updates" ? `Checking for updates (${state.current}/${state.total})...` : "Loading..."
|
|
68022
|
+
}, undefined, false, undefined, this),
|
|
68023
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Static, {
|
|
68024
|
+
items: outputItems,
|
|
68025
|
+
children: (item) => /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
68026
|
+
flexDirection: "column",
|
|
68027
|
+
children: renderContent()
|
|
68028
|
+
}, item.id, false, undefined, this)
|
|
68029
|
+
}, undefined, false, undefined, this)
|
|
68030
|
+
]
|
|
68031
|
+
}, undefined, true, undefined, this);
|
|
68080
68032
|
}
|
|
68081
68033
|
|
|
68082
68034
|
// src/commands/login.tsx
|
|
@@ -68338,12 +68290,12 @@ var options5 = exports_external.object({});
|
|
|
68338
68290
|
function Logout(_props) {
|
|
68339
68291
|
const { exit } = use_app_default();
|
|
68340
68292
|
const [state, setState] = import_react35.useState({ phase: "checking" });
|
|
68293
|
+
const [outputItems, setOutputItems] = import_react35.useState([]);
|
|
68341
68294
|
import_react35.useEffect(() => {
|
|
68342
68295
|
async function runLogout() {
|
|
68343
68296
|
const existing = await getCredentials();
|
|
68344
68297
|
if (!existing) {
|
|
68345
68298
|
setState({ phase: "not_logged_in" });
|
|
68346
|
-
exit();
|
|
68347
68299
|
return;
|
|
68348
68300
|
}
|
|
68349
68301
|
try {
|
|
@@ -68356,31 +68308,54 @@ function Logout(_props) {
|
|
|
68356
68308
|
message: err instanceof Error ? err.message : "Failed to clear credentials"
|
|
68357
68309
|
});
|
|
68358
68310
|
}
|
|
68359
|
-
exit();
|
|
68360
68311
|
}
|
|
68361
68312
|
runLogout();
|
|
68362
|
-
}, [
|
|
68363
|
-
|
|
68364
|
-
|
|
68365
|
-
|
|
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, {
|
|
68366
68348
|
text: "Logging out..."
|
|
68367
|
-
}, undefined, false, undefined, this)
|
|
68368
|
-
|
|
68369
|
-
|
|
68370
|
-
|
|
68371
|
-
|
|
68372
|
-
|
|
68373
|
-
|
|
68374
|
-
|
|
68375
|
-
|
|
68376
|
-
|
|
68377
|
-
}, undefined, false, undefined, this);
|
|
68378
|
-
case "error":
|
|
68379
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(StatusMessage, {
|
|
68380
|
-
type: "error",
|
|
68381
|
-
children: state.message
|
|
68382
|
-
}, undefined, false, undefined, this);
|
|
68383
|
-
}
|
|
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);
|
|
68384
68359
|
}
|
|
68385
68360
|
|
|
68386
68361
|
// src/commands/repo/add.tsx
|
|
@@ -68943,12 +68918,12 @@ var options8 = exports_external.object({});
|
|
|
68943
68918
|
function Repo(_props) {
|
|
68944
68919
|
const { exit } = use_app_default();
|
|
68945
68920
|
const [state, setState] = import_react38.useState({ phase: "checking" });
|
|
68921
|
+
const [outputItems, setOutputItems] = import_react38.useState([]);
|
|
68946
68922
|
import_react38.useEffect(() => {
|
|
68947
68923
|
async function checkRepo() {
|
|
68948
68924
|
const credentials = await getCredentials();
|
|
68949
68925
|
if (!credentials) {
|
|
68950
68926
|
setState({ phase: "not_logged_in" });
|
|
68951
|
-
exit();
|
|
68952
68927
|
return;
|
|
68953
68928
|
}
|
|
68954
68929
|
const config2 = getConfig();
|
|
@@ -68957,18 +68932,22 @@ function Repo(_props) {
|
|
|
68957
68932
|
defaultRepo: config2.defaultRepo,
|
|
68958
68933
|
repos: config2.repos
|
|
68959
68934
|
});
|
|
68960
|
-
exit();
|
|
68961
68935
|
}
|
|
68962
68936
|
checkRepo();
|
|
68963
|
-
}, [
|
|
68964
|
-
|
|
68965
|
-
|
|
68966
|
-
|
|
68967
|
-
|
|
68968
|
-
|
|
68969
|
-
|
|
68970
|
-
|
|
68971
|
-
|
|
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, {
|
|
68972
68951
|
children: [
|
|
68973
68952
|
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(StatusMessage, {
|
|
68974
68953
|
type: "error",
|
|
@@ -68980,10 +68959,16 @@ function Repo(_props) {
|
|
|
68980
68959
|
}, undefined, false, undefined, this)
|
|
68981
68960
|
]
|
|
68982
68961
|
}, undefined, true, undefined, this);
|
|
68983
|
-
|
|
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") {
|
|
68984
68970
|
if (!state.defaultRepo) {
|
|
68985
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(
|
|
68986
|
-
flexDirection: "column",
|
|
68971
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(jsx_dev_runtime15.Fragment, {
|
|
68987
68972
|
children: [
|
|
68988
68973
|
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
68989
68974
|
bold: true,
|
|
@@ -69033,8 +69018,7 @@ function Repo(_props) {
|
|
|
69033
69018
|
}, undefined, true, undefined, this);
|
|
69034
69019
|
}
|
|
69035
69020
|
const defaultRepoConfig = state.repos.find((r) => r.repo === state.defaultRepo);
|
|
69036
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(
|
|
69037
|
-
flexDirection: "column",
|
|
69021
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(jsx_dev_runtime15.Fragment, {
|
|
69038
69022
|
children: [
|
|
69039
69023
|
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text, {
|
|
69040
69024
|
bold: true,
|
|
@@ -69099,12 +69083,22 @@ function Repo(_props) {
|
|
|
69099
69083
|
]
|
|
69100
69084
|
}, undefined, true, undefined, this);
|
|
69101
69085
|
}
|
|
69102
|
-
|
|
69103
|
-
|
|
69104
|
-
|
|
69105
|
-
|
|
69106
|
-
|
|
69107
|
-
|
|
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);
|
|
69108
69102
|
}
|
|
69109
69103
|
|
|
69110
69104
|
// src/commands/repo/list.tsx
|
|
@@ -69447,86 +69441,19 @@ function RepoUse({ args: [repoArg], options: _opts }) {
|
|
|
69447
69441
|
// src/commands/agent/index.tsx
|
|
69448
69442
|
var import_react42 = __toESM(require_react(), 1);
|
|
69449
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
|
+
]);
|
|
69450
69447
|
var options12 = exports_external.object({});
|
|
69451
|
-
function Agent(
|
|
69448
|
+
function Agent({ args: [agentIdArg] }) {
|
|
69452
69449
|
const { exit } = use_app_default();
|
|
69453
69450
|
const [state, setState] = import_react42.useState({ phase: "loading" });
|
|
69451
|
+
const [outputItems, setOutputItems] = import_react42.useState([]);
|
|
69454
69452
|
import_react42.useEffect(() => {
|
|
69455
|
-
|
|
69456
|
-
const currentAgent = getCurrentAgent();
|
|
69457
|
-
const agents = listAgents();
|
|
69458
|
-
setState({ phase: "success", currentAgent, agents });
|
|
69459
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
69460
|
-
exit();
|
|
69461
|
-
}
|
|
69462
|
-
loadAgents();
|
|
69463
|
-
}, [exit]);
|
|
69464
|
-
switch (state.phase) {
|
|
69465
|
-
case "loading":
|
|
69466
|
-
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Spinner2, {
|
|
69467
|
-
text: "Loading agents..."
|
|
69468
|
-
}, undefined, false, undefined, this);
|
|
69469
|
-
case "success": {
|
|
69470
|
-
const tableData = state.agents.map((agent) => ({
|
|
69471
|
-
id: agent.id,
|
|
69472
|
-
name: agent.name,
|
|
69473
|
-
description: agent.description,
|
|
69474
|
-
current: agent.id === state.currentAgent ? "*" : ""
|
|
69475
|
-
}));
|
|
69476
|
-
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69477
|
-
flexDirection: "column",
|
|
69478
|
-
children: [
|
|
69479
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69480
|
-
marginBottom: 1,
|
|
69481
|
-
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69482
|
-
bold: true,
|
|
69483
|
-
children: "Supported Agents"
|
|
69484
|
-
}, undefined, false, undefined, this)
|
|
69485
|
-
}, undefined, false, undefined, this),
|
|
69486
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Table, {
|
|
69487
|
-
data: tableData,
|
|
69488
|
-
columns: ["current", "id", "name", "description"]
|
|
69489
|
-
}, undefined, false, undefined, this),
|
|
69490
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69491
|
-
marginTop: 1,
|
|
69492
|
-
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69493
|
-
dimColor: true,
|
|
69494
|
-
children: [
|
|
69495
|
-
"Current: ",
|
|
69496
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69497
|
-
color: "cyan",
|
|
69498
|
-
children: state.currentAgent
|
|
69499
|
-
}, undefined, false, undefined, this)
|
|
69500
|
-
]
|
|
69501
|
-
}, undefined, true, undefined, this)
|
|
69502
|
-
}, undefined, false, undefined, this),
|
|
69503
|
-
/* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
69504
|
-
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
|
|
69505
|
-
dimColor: true,
|
|
69506
|
-
children: "Run 'skilluse agent use <id>' to switch agents."
|
|
69507
|
-
}, undefined, false, undefined, this)
|
|
69508
|
-
}, undefined, false, undefined, this)
|
|
69509
|
-
]
|
|
69510
|
-
}, undefined, true, undefined, this);
|
|
69511
|
-
}
|
|
69512
|
-
}
|
|
69513
|
-
}
|
|
69514
|
-
|
|
69515
|
-
// src/commands/agent/use.tsx
|
|
69516
|
-
var import_react43 = __toESM(require_react(), 1);
|
|
69517
|
-
var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
|
|
69518
|
-
var args7 = exports_external.tuple([exports_external.string().describe("Agent ID to switch to")]);
|
|
69519
|
-
var options13 = exports_external.object({});
|
|
69520
|
-
function AgentUse({ args: [agentIdArg], options: _opts }) {
|
|
69521
|
-
const { exit } = use_app_default();
|
|
69522
|
-
const [state, setState] = import_react43.useState({ phase: "checking" });
|
|
69523
|
-
import_react43.useEffect(() => {
|
|
69524
|
-
async function switchAgent() {
|
|
69453
|
+
if (agentIdArg) {
|
|
69525
69454
|
const agent = getAgent(agentIdArg);
|
|
69526
69455
|
if (!agent) {
|
|
69527
69456
|
setState({ phase: "not_found", agentId: agentIdArg });
|
|
69528
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
69529
|
-
exit();
|
|
69530
69457
|
return;
|
|
69531
69458
|
}
|
|
69532
69459
|
const currentAgent = getCurrentAgent();
|
|
@@ -69536,88 +69463,147 @@ function AgentUse({ args: [agentIdArg], options: _opts }) {
|
|
|
69536
69463
|
agentId: agentIdArg,
|
|
69537
69464
|
agentName: agent.name
|
|
69538
69465
|
});
|
|
69539
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
69540
|
-
exit();
|
|
69541
69466
|
return;
|
|
69542
69467
|
}
|
|
69543
69468
|
setCurrentAgent(agentIdArg);
|
|
69544
69469
|
setState({
|
|
69545
|
-
phase: "
|
|
69470
|
+
phase: "switched",
|
|
69546
69471
|
agentId: agentIdArg,
|
|
69547
69472
|
agentName: agent.name
|
|
69548
69473
|
});
|
|
69549
|
-
|
|
69550
|
-
|
|
69474
|
+
} else {
|
|
69475
|
+
const currentAgent = getCurrentAgent();
|
|
69476
|
+
const agents = listAgents();
|
|
69477
|
+
setState({ phase: "selecting", currentAgent, agents });
|
|
69551
69478
|
}
|
|
69552
|
-
|
|
69553
|
-
|
|
69554
|
-
|
|
69555
|
-
|
|
69556
|
-
|
|
69557
|
-
|
|
69558
|
-
|
|
69559
|
-
|
|
69560
|
-
|
|
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
|
-
|
|
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, {
|
|
69598
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",
|
|
69599
69563
|
children: [
|
|
69600
|
-
"
|
|
69601
|
-
state.
|
|
69602
|
-
"'s paths."
|
|
69564
|
+
"Switched to ",
|
|
69565
|
+
state.agentName
|
|
69603
69566
|
]
|
|
69604
|
-
}, undefined, true, undefined, this)
|
|
69605
|
-
|
|
69606
|
-
|
|
69607
|
-
|
|
69608
|
-
|
|
69609
|
-
|
|
69610
|
-
|
|
69611
|
-
|
|
69612
|
-
|
|
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);
|
|
69613
69589
|
}
|
|
69590
|
+
if (state.phase === "selecting") {
|
|
69591
|
+
return renderContent();
|
|
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);
|
|
69614
69600
|
}
|
|
69615
69601
|
|
|
69616
69602
|
// src/commands/search.tsx
|
|
69617
|
-
var
|
|
69618
|
-
var
|
|
69603
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
69604
|
+
var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
|
|
69619
69605
|
var args8 = exports_external.tuple([exports_external.string().describe("Search keyword")]);
|
|
69620
|
-
var
|
|
69606
|
+
var options13 = exports_external.object({
|
|
69621
69607
|
all: exports_external.boolean().default(false).describe("Search in all configured repos (not just default)")
|
|
69622
69608
|
});
|
|
69623
69609
|
function parseFrontmatter4(content) {
|
|
@@ -69707,8 +69693,8 @@ function filterSkills(skills, keyword) {
|
|
|
69707
69693
|
}
|
|
69708
69694
|
function Search({ args: [keyword], options: opts }) {
|
|
69709
69695
|
const { exit } = use_app_default();
|
|
69710
|
-
const [state, setState] =
|
|
69711
|
-
|
|
69696
|
+
const [state, setState] = import_react43.useState({ phase: "checking" });
|
|
69697
|
+
import_react43.useEffect(() => {
|
|
69712
69698
|
async function search() {
|
|
69713
69699
|
const config2 = getConfig();
|
|
69714
69700
|
let reposToSearch = [];
|
|
@@ -69754,62 +69740,62 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69754
69740
|
}, [keyword, opts.all, exit]);
|
|
69755
69741
|
switch (state.phase) {
|
|
69756
69742
|
case "checking":
|
|
69757
|
-
return /* @__PURE__ */
|
|
69743
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Spinner2, {
|
|
69758
69744
|
text: "Initializing..."
|
|
69759
69745
|
}, undefined, false, undefined, this);
|
|
69760
69746
|
case "auth_required":
|
|
69761
|
-
return /* @__PURE__ */
|
|
69747
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69762
69748
|
flexDirection: "column",
|
|
69763
|
-
children: /* @__PURE__ */
|
|
69749
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69764
69750
|
type: "error",
|
|
69765
69751
|
children: state.message
|
|
69766
69752
|
}, undefined, false, undefined, this)
|
|
69767
69753
|
}, undefined, false, undefined, this);
|
|
69768
69754
|
case "no_repos":
|
|
69769
|
-
return /* @__PURE__ */
|
|
69755
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69770
69756
|
flexDirection: "column",
|
|
69771
69757
|
children: [
|
|
69772
|
-
/* @__PURE__ */
|
|
69758
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69773
69759
|
type: "warning",
|
|
69774
69760
|
children: "No repositories configured"
|
|
69775
69761
|
}, undefined, false, undefined, this),
|
|
69776
|
-
/* @__PURE__ */
|
|
69762
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69777
69763
|
dimColor: true,
|
|
69778
69764
|
children: "Run 'skilluse repo add owner/repo' to add a skill repository."
|
|
69779
69765
|
}, undefined, false, undefined, this)
|
|
69780
69766
|
]
|
|
69781
69767
|
}, undefined, true, undefined, this);
|
|
69782
69768
|
case "searching":
|
|
69783
|
-
return /* @__PURE__ */
|
|
69769
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Spinner2, {
|
|
69784
69770
|
text: `Searching ${state.repo}...`
|
|
69785
69771
|
}, undefined, false, undefined, this);
|
|
69786
69772
|
case "success":
|
|
69787
69773
|
if (state.skills.length === 0) {
|
|
69788
|
-
return /* @__PURE__ */
|
|
69774
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69789
69775
|
flexDirection: "column",
|
|
69790
69776
|
children: [
|
|
69791
|
-
/* @__PURE__ */
|
|
69777
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69792
69778
|
marginBottom: 1,
|
|
69793
69779
|
children: [
|
|
69794
|
-
/* @__PURE__ */
|
|
69780
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69795
69781
|
children: 'Search results for "'
|
|
69796
69782
|
}, undefined, false, undefined, this),
|
|
69797
|
-
/* @__PURE__ */
|
|
69783
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69798
69784
|
color: "cyan",
|
|
69799
69785
|
children: state.keyword
|
|
69800
69786
|
}, undefined, false, undefined, this),
|
|
69801
|
-
/* @__PURE__ */
|
|
69787
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69802
69788
|
children: '"'
|
|
69803
69789
|
}, undefined, false, undefined, this)
|
|
69804
69790
|
]
|
|
69805
69791
|
}, undefined, true, undefined, this),
|
|
69806
|
-
/* @__PURE__ */
|
|
69792
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69807
69793
|
type: "warning",
|
|
69808
69794
|
children: "No skills found"
|
|
69809
69795
|
}, undefined, false, undefined, this),
|
|
69810
|
-
/* @__PURE__ */
|
|
69796
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69811
69797
|
marginTop: 1,
|
|
69812
|
-
children: /* @__PURE__ */
|
|
69798
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69813
69799
|
dimColor: true,
|
|
69814
69800
|
children: "Try a different search term or check your configured repos with 'skilluse repo list'."
|
|
69815
69801
|
}, undefined, false, undefined, this)
|
|
@@ -69817,36 +69803,36 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69817
69803
|
]
|
|
69818
69804
|
}, undefined, true, undefined, this);
|
|
69819
69805
|
}
|
|
69820
|
-
return /* @__PURE__ */
|
|
69806
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69821
69807
|
flexDirection: "column",
|
|
69822
69808
|
children: [
|
|
69823
|
-
/* @__PURE__ */
|
|
69809
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69824
69810
|
marginBottom: 1,
|
|
69825
69811
|
children: [
|
|
69826
|
-
/* @__PURE__ */
|
|
69812
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69827
69813
|
children: 'Search results for "'
|
|
69828
69814
|
}, undefined, false, undefined, this),
|
|
69829
|
-
/* @__PURE__ */
|
|
69815
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69830
69816
|
color: "cyan",
|
|
69831
69817
|
children: state.keyword
|
|
69832
69818
|
}, undefined, false, undefined, this),
|
|
69833
|
-
/* @__PURE__ */
|
|
69819
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69834
69820
|
children: '"'
|
|
69835
69821
|
}, undefined, false, undefined, this)
|
|
69836
69822
|
]
|
|
69837
69823
|
}, undefined, true, undefined, this),
|
|
69838
|
-
state.skills.map((skill) => /* @__PURE__ */
|
|
69824
|
+
state.skills.map((skill) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69839
69825
|
flexDirection: "column",
|
|
69840
69826
|
marginBottom: 1,
|
|
69841
69827
|
children: [
|
|
69842
|
-
/* @__PURE__ */
|
|
69828
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69843
69829
|
children: [
|
|
69844
|
-
/* @__PURE__ */
|
|
69830
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69845
69831
|
color: "cyan",
|
|
69846
69832
|
bold: true,
|
|
69847
69833
|
children: skill.name
|
|
69848
69834
|
}, undefined, false, undefined, this),
|
|
69849
|
-
skill.version && /* @__PURE__ */
|
|
69835
|
+
skill.version && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69850
69836
|
dimColor: true,
|
|
69851
69837
|
children: [
|
|
69852
69838
|
" v",
|
|
@@ -69855,15 +69841,15 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69855
69841
|
}, undefined, true, undefined, this)
|
|
69856
69842
|
]
|
|
69857
69843
|
}, undefined, true, undefined, this),
|
|
69858
|
-
/* @__PURE__ */
|
|
69844
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69859
69845
|
marginLeft: 2,
|
|
69860
|
-
children: /* @__PURE__ */
|
|
69846
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69861
69847
|
children: skill.description
|
|
69862
69848
|
}, undefined, false, undefined, this)
|
|
69863
69849
|
}, undefined, false, undefined, this),
|
|
69864
|
-
/* @__PURE__ */
|
|
69850
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69865
69851
|
marginLeft: 2,
|
|
69866
|
-
children: /* @__PURE__ */
|
|
69852
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69867
69853
|
dimColor: true,
|
|
69868
69854
|
children: [
|
|
69869
69855
|
skill.repo,
|
|
@@ -69873,9 +69859,9 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69873
69859
|
}, undefined, false, undefined, this)
|
|
69874
69860
|
]
|
|
69875
69861
|
}, `${skill.repo}/${skill.path}`, true, undefined, this)),
|
|
69876
|
-
/* @__PURE__ */
|
|
69862
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
69877
69863
|
marginTop: 1,
|
|
69878
|
-
children: /* @__PURE__ */
|
|
69864
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
|
|
69879
69865
|
dimColor: true,
|
|
69880
69866
|
children: [
|
|
69881
69867
|
state.skills.length,
|
|
@@ -69889,7 +69875,7 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69889
69875
|
]
|
|
69890
69876
|
}, undefined, true, undefined, this);
|
|
69891
69877
|
case "error":
|
|
69892
|
-
return /* @__PURE__ */
|
|
69878
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
|
|
69893
69879
|
type: "error",
|
|
69894
69880
|
children: state.message
|
|
69895
69881
|
}, undefined, false, undefined, this);
|
|
@@ -69898,10 +69884,10 @@ function Search({ args: [keyword], options: opts }) {
|
|
|
69898
69884
|
|
|
69899
69885
|
// src/commands/uninstall.tsx
|
|
69900
69886
|
import { rm } from "node:fs/promises";
|
|
69901
|
-
var
|
|
69902
|
-
var
|
|
69887
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
69888
|
+
var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
|
|
69903
69889
|
var args9 = exports_external.tuple([exports_external.string().describe("Skill name to uninstall")]);
|
|
69904
|
-
var
|
|
69890
|
+
var options14 = exports_external.object({
|
|
69905
69891
|
force: exports_external.boolean().default(false).describe("Skip confirmation prompt")
|
|
69906
69892
|
});
|
|
69907
69893
|
function ConfirmPrompt({
|
|
@@ -69916,20 +69902,20 @@ function ConfirmPrompt({
|
|
|
69916
69902
|
onCancel();
|
|
69917
69903
|
}
|
|
69918
69904
|
});
|
|
69919
|
-
return /* @__PURE__ */
|
|
69905
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69920
69906
|
flexDirection: "column",
|
|
69921
69907
|
children: [
|
|
69922
|
-
/* @__PURE__ */
|
|
69908
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69923
69909
|
children: [
|
|
69924
|
-
/* @__PURE__ */
|
|
69910
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69925
69911
|
children: "Uninstall "
|
|
69926
69912
|
}, undefined, false, undefined, this),
|
|
69927
|
-
/* @__PURE__ */
|
|
69913
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69928
69914
|
color: "cyan",
|
|
69929
69915
|
bold: true,
|
|
69930
69916
|
children: skill.name
|
|
69931
69917
|
}, undefined, false, undefined, this),
|
|
69932
|
-
/* @__PURE__ */
|
|
69918
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69933
69919
|
children: [
|
|
69934
69920
|
" v",
|
|
69935
69921
|
skill.version,
|
|
@@ -69938,9 +69924,9 @@ function ConfirmPrompt({
|
|
|
69938
69924
|
}, undefined, true, undefined, this)
|
|
69939
69925
|
]
|
|
69940
69926
|
}, undefined, true, undefined, this),
|
|
69941
|
-
/* @__PURE__ */
|
|
69927
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69942
69928
|
marginLeft: 2,
|
|
69943
|
-
children: /* @__PURE__ */
|
|
69929
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69944
69930
|
dimColor: true,
|
|
69945
69931
|
children: [
|
|
69946
69932
|
"Location: ",
|
|
@@ -69948,26 +69934,26 @@ function ConfirmPrompt({
|
|
|
69948
69934
|
]
|
|
69949
69935
|
}, undefined, true, undefined, this)
|
|
69950
69936
|
}, undefined, false, undefined, this),
|
|
69951
|
-
/* @__PURE__ */
|
|
69937
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
69952
69938
|
marginTop: 1,
|
|
69953
69939
|
children: [
|
|
69954
|
-
/* @__PURE__ */
|
|
69940
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69955
69941
|
dimColor: true,
|
|
69956
69942
|
children: "Press "
|
|
69957
69943
|
}, undefined, false, undefined, this),
|
|
69958
|
-
/* @__PURE__ */
|
|
69944
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69959
69945
|
color: "green",
|
|
69960
69946
|
children: "Y"
|
|
69961
69947
|
}, undefined, false, undefined, this),
|
|
69962
|
-
/* @__PURE__ */
|
|
69948
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69963
69949
|
dimColor: true,
|
|
69964
69950
|
children: " to confirm, "
|
|
69965
69951
|
}, undefined, false, undefined, this),
|
|
69966
|
-
/* @__PURE__ */
|
|
69952
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69967
69953
|
color: "red",
|
|
69968
69954
|
children: "N"
|
|
69969
69955
|
}, undefined, false, undefined, this),
|
|
69970
|
-
/* @__PURE__ */
|
|
69956
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
69971
69957
|
dimColor: true,
|
|
69972
69958
|
children: " to cancel"
|
|
69973
69959
|
}, undefined, false, undefined, this)
|
|
@@ -69978,8 +69964,8 @@ function ConfirmPrompt({
|
|
|
69978
69964
|
}
|
|
69979
69965
|
function Uninstall({ args: [skillName], options: opts }) {
|
|
69980
69966
|
const { exit } = use_app_default();
|
|
69981
|
-
const [state, setState] =
|
|
69982
|
-
const performUninstall =
|
|
69967
|
+
const [state, setState] = import_react44.useState({ phase: "checking" });
|
|
69968
|
+
const performUninstall = import_react44.useCallback(async (skill) => {
|
|
69983
69969
|
setState({ phase: "uninstalling", skill });
|
|
69984
69970
|
try {
|
|
69985
69971
|
await rm(skill.installedPath, { recursive: true, force: true });
|
|
@@ -69993,7 +69979,7 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
69993
69979
|
}
|
|
69994
69980
|
exit();
|
|
69995
69981
|
}, [exit]);
|
|
69996
|
-
|
|
69982
|
+
import_react44.useEffect(() => {
|
|
69997
69983
|
const config2 = getConfig();
|
|
69998
69984
|
const currentAgentId = getCurrentAgent();
|
|
69999
69985
|
const agentInfo = getAgent(currentAgentId);
|
|
@@ -70021,14 +70007,14 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70021
70007
|
}
|
|
70022
70008
|
switch (state.phase) {
|
|
70023
70009
|
case "checking":
|
|
70024
|
-
return /* @__PURE__ */
|
|
70010
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Spinner2, {
|
|
70025
70011
|
text: "Loading..."
|
|
70026
70012
|
}, undefined, false, undefined, this);
|
|
70027
70013
|
case "not_found":
|
|
70028
|
-
return /* @__PURE__ */
|
|
70014
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
70029
70015
|
flexDirection: "column",
|
|
70030
70016
|
children: [
|
|
70031
|
-
/* @__PURE__ */
|
|
70017
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70032
70018
|
type: "error",
|
|
70033
70019
|
children: [
|
|
70034
70020
|
'Skill "',
|
|
@@ -70037,15 +70023,15 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70037
70023
|
state.agentName
|
|
70038
70024
|
]
|
|
70039
70025
|
}, undefined, true, undefined, this),
|
|
70040
|
-
/* @__PURE__ */
|
|
70026
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
70041
70027
|
marginTop: 1,
|
|
70042
|
-
children: /* @__PURE__ */
|
|
70028
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
70043
70029
|
dimColor: true,
|
|
70044
70030
|
children: "Run 'skilluse list' to see installed skills."
|
|
70045
70031
|
}, undefined, false, undefined, this)
|
|
70046
70032
|
}, undefined, false, undefined, this),
|
|
70047
|
-
/* @__PURE__ */
|
|
70048
|
-
children: /* @__PURE__ */
|
|
70033
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
70034
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
|
|
70049
70035
|
dimColor: true,
|
|
70050
70036
|
children: "Run 'skilluse list --all' to see skills for all agents."
|
|
70051
70037
|
}, undefined, false, undefined, this)
|
|
@@ -70053,17 +70039,17 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70053
70039
|
]
|
|
70054
70040
|
}, undefined, true, undefined, this);
|
|
70055
70041
|
case "confirming":
|
|
70056
|
-
return /* @__PURE__ */
|
|
70042
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(ConfirmPrompt, {
|
|
70057
70043
|
skill: state.skill,
|
|
70058
70044
|
onConfirm: handleConfirm,
|
|
70059
70045
|
onCancel: handleCancel
|
|
70060
70046
|
}, undefined, false, undefined, this);
|
|
70061
70047
|
case "uninstalling":
|
|
70062
|
-
return /* @__PURE__ */
|
|
70048
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Spinner2, {
|
|
70063
70049
|
text: `Uninstalling ${state.skill.name}...`
|
|
70064
70050
|
}, undefined, false, undefined, this);
|
|
70065
70051
|
case "success":
|
|
70066
|
-
return /* @__PURE__ */
|
|
70052
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70067
70053
|
type: "success",
|
|
70068
70054
|
children: [
|
|
70069
70055
|
'Uninstalled "',
|
|
@@ -70072,12 +70058,12 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70072
70058
|
]
|
|
70073
70059
|
}, undefined, true, undefined, this);
|
|
70074
70060
|
case "cancelled":
|
|
70075
|
-
return /* @__PURE__ */
|
|
70061
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70076
70062
|
type: "warning",
|
|
70077
70063
|
children: "Uninstall cancelled"
|
|
70078
70064
|
}, undefined, false, undefined, this);
|
|
70079
70065
|
case "error":
|
|
70080
|
-
return /* @__PURE__ */
|
|
70066
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
|
|
70081
70067
|
type: "error",
|
|
70082
70068
|
children: state.message
|
|
70083
70069
|
}, undefined, false, undefined, this);
|
|
@@ -70087,12 +70073,12 @@ function Uninstall({ args: [skillName], options: opts }) {
|
|
|
70087
70073
|
// src/commands/upgrade.tsx
|
|
70088
70074
|
import { mkdir as mkdir2, rm as rm2, writeFile as writeFile2 } from "node:fs/promises";
|
|
70089
70075
|
import { join as join4 } from "node:path";
|
|
70090
|
-
var
|
|
70091
|
-
var
|
|
70076
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
70077
|
+
var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
|
|
70092
70078
|
var args10 = exports_external.tuple([
|
|
70093
70079
|
exports_external.string().optional().describe("Skill name to upgrade (optional, upgrades all if omitted)")
|
|
70094
70080
|
]);
|
|
70095
|
-
var
|
|
70081
|
+
var options15 = exports_external.object({});
|
|
70096
70082
|
function parseFrontmatter5(content) {
|
|
70097
70083
|
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
70098
70084
|
if (!frontmatterMatch)
|
|
@@ -70201,8 +70187,8 @@ async function downloadSkillFiles2(token, repo, skillPath, branch, targetDir) {
|
|
|
70201
70187
|
}
|
|
70202
70188
|
function Upgrade({ args: [skillName] }) {
|
|
70203
70189
|
const { exit } = use_app_default();
|
|
70204
|
-
const [state, setState] =
|
|
70205
|
-
|
|
70190
|
+
const [state, setState] = import_react45.useState({ phase: "checking" });
|
|
70191
|
+
import_react45.useEffect(() => {
|
|
70206
70192
|
async function upgrade() {
|
|
70207
70193
|
const config2 = getConfig();
|
|
70208
70194
|
let skillsToCheck = [];
|
|
@@ -70298,22 +70284,22 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70298
70284
|
}, [skillName, exit]);
|
|
70299
70285
|
switch (state.phase) {
|
|
70300
70286
|
case "checking":
|
|
70301
|
-
return /* @__PURE__ */
|
|
70287
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Spinner2, {
|
|
70302
70288
|
text: "Initializing..."
|
|
70303
70289
|
}, undefined, false, undefined, this);
|
|
70304
70290
|
case "auth_required":
|
|
70305
|
-
return /* @__PURE__ */
|
|
70291
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70306
70292
|
flexDirection: "column",
|
|
70307
|
-
children: /* @__PURE__ */
|
|
70293
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70308
70294
|
type: "error",
|
|
70309
70295
|
children: state.message
|
|
70310
70296
|
}, undefined, false, undefined, this)
|
|
70311
70297
|
}, undefined, false, undefined, this);
|
|
70312
70298
|
case "not_found":
|
|
70313
|
-
return /* @__PURE__ */
|
|
70299
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70314
70300
|
flexDirection: "column",
|
|
70315
70301
|
children: [
|
|
70316
|
-
/* @__PURE__ */
|
|
70302
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70317
70303
|
type: "error",
|
|
70318
70304
|
children: [
|
|
70319
70305
|
'Skill "',
|
|
@@ -70321,9 +70307,9 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70321
70307
|
'" is not installed'
|
|
70322
70308
|
]
|
|
70323
70309
|
}, undefined, true, undefined, this),
|
|
70324
|
-
/* @__PURE__ */
|
|
70310
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70325
70311
|
marginTop: 1,
|
|
70326
|
-
children: /* @__PURE__ */
|
|
70312
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70327
70313
|
dimColor: true,
|
|
70328
70314
|
children: "Run 'skilluse list' to see installed skills."
|
|
70329
70315
|
}, undefined, false, undefined, this)
|
|
@@ -70331,50 +70317,50 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70331
70317
|
]
|
|
70332
70318
|
}, undefined, true, undefined, this);
|
|
70333
70319
|
case "checking_updates":
|
|
70334
|
-
return /* @__PURE__ */
|
|
70320
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Spinner2, {
|
|
70335
70321
|
text: `Checking for updates (${state.current}/${state.total})...`
|
|
70336
70322
|
}, undefined, false, undefined, this);
|
|
70337
70323
|
case "no_updates":
|
|
70338
|
-
return /* @__PURE__ */
|
|
70324
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70339
70325
|
type: "success",
|
|
70340
70326
|
children: "All skills are up to date"
|
|
70341
70327
|
}, undefined, false, undefined, this);
|
|
70342
70328
|
case "upgrading":
|
|
70343
|
-
return /* @__PURE__ */
|
|
70329
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70344
70330
|
flexDirection: "column",
|
|
70345
70331
|
children: [
|
|
70346
|
-
/* @__PURE__ */
|
|
70332
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70347
70333
|
marginBottom: 1,
|
|
70348
|
-
children: /* @__PURE__ */
|
|
70334
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70349
70335
|
bold: true,
|
|
70350
70336
|
children: "Upgrading skills..."
|
|
70351
70337
|
}, undefined, false, undefined, this)
|
|
70352
70338
|
}, undefined, false, undefined, this),
|
|
70353
|
-
state.upgrades.map((upgrade, i) => /* @__PURE__ */
|
|
70339
|
+
state.upgrades.map((upgrade, i) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70354
70340
|
children: [
|
|
70355
|
-
/* @__PURE__ */
|
|
70341
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70356
70342
|
children: [
|
|
70357
|
-
i < state.current && /* @__PURE__ */
|
|
70343
|
+
i < state.current && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70358
70344
|
color: "green",
|
|
70359
70345
|
children: "✔"
|
|
70360
70346
|
}, undefined, false, undefined, this),
|
|
70361
|
-
i === state.current && /* @__PURE__ */
|
|
70347
|
+
i === state.current && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70362
70348
|
color: "yellow",
|
|
70363
70349
|
children: "◐"
|
|
70364
70350
|
}, undefined, false, undefined, this),
|
|
70365
|
-
i > state.current && /* @__PURE__ */
|
|
70351
|
+
i > state.current && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70366
70352
|
dimColor: true,
|
|
70367
70353
|
children: "○"
|
|
70368
70354
|
}, undefined, false, undefined, this)
|
|
70369
70355
|
]
|
|
70370
70356
|
}, undefined, true, undefined, this),
|
|
70371
|
-
/* @__PURE__ */
|
|
70357
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70372
70358
|
children: [
|
|
70373
70359
|
" ",
|
|
70374
70360
|
upgrade.skill.name
|
|
70375
70361
|
]
|
|
70376
70362
|
}, undefined, true, undefined, this),
|
|
70377
|
-
/* @__PURE__ */
|
|
70363
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70378
70364
|
dimColor: true,
|
|
70379
70365
|
children: [
|
|
70380
70366
|
" ",
|
|
@@ -70386,9 +70372,9 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70386
70372
|
}, undefined, true, undefined, this)
|
|
70387
70373
|
]
|
|
70388
70374
|
}, upgrade.skill.name, true, undefined, this)),
|
|
70389
|
-
/* @__PURE__ */
|
|
70375
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70390
70376
|
marginTop: 1,
|
|
70391
|
-
children: /* @__PURE__ */
|
|
70377
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ProgressBar, {
|
|
70392
70378
|
percent: state.progress,
|
|
70393
70379
|
width: 30
|
|
70394
70380
|
}, undefined, false, undefined, this)
|
|
@@ -70396,10 +70382,10 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70396
70382
|
]
|
|
70397
70383
|
}, undefined, true, undefined, this);
|
|
70398
70384
|
case "success":
|
|
70399
|
-
return /* @__PURE__ */
|
|
70385
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70400
70386
|
flexDirection: "column",
|
|
70401
70387
|
children: [
|
|
70402
|
-
/* @__PURE__ */
|
|
70388
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70403
70389
|
type: "success",
|
|
70404
70390
|
children: [
|
|
70405
70391
|
"Upgraded ",
|
|
@@ -70407,10 +70393,10 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70407
70393
|
" skill(s)"
|
|
70408
70394
|
]
|
|
70409
70395
|
}, undefined, true, undefined, this),
|
|
70410
|
-
/* @__PURE__ */
|
|
70396
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
70411
70397
|
flexDirection: "column",
|
|
70412
70398
|
marginLeft: 2,
|
|
70413
|
-
children: state.upgraded.map((name) => /* @__PURE__ */
|
|
70399
|
+
children: state.upgraded.map((name) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
|
|
70414
70400
|
dimColor: true,
|
|
70415
70401
|
children: name
|
|
70416
70402
|
}, name, false, undefined, this))
|
|
@@ -70418,7 +70404,7 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70418
70404
|
]
|
|
70419
70405
|
}, undefined, true, undefined, this);
|
|
70420
70406
|
case "error":
|
|
70421
|
-
return /* @__PURE__ */
|
|
70407
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
|
|
70422
70408
|
type: "error",
|
|
70423
70409
|
children: state.message
|
|
70424
70410
|
}, undefined, false, undefined, this);
|
|
@@ -70427,7 +70413,7 @@ function Upgrade({ args: [skillName] }) {
|
|
|
70427
70413
|
// package.json
|
|
70428
70414
|
var package_default = {
|
|
70429
70415
|
name: "skilluse",
|
|
70430
|
-
version: "0.
|
|
70416
|
+
version: "0.3.0",
|
|
70431
70417
|
description: "CLI tool for managing and installing AI Coding Agent Skills",
|
|
70432
70418
|
main: "dist/cli.js",
|
|
70433
70419
|
bin: {
|
|
@@ -70497,7 +70483,7 @@ var package_default = {
|
|
|
70497
70483
|
};
|
|
70498
70484
|
|
|
70499
70485
|
// src/cli.tsx
|
|
70500
|
-
var
|
|
70486
|
+
var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
|
|
70501
70487
|
var VERSION = process.env.VERSION || package_default.version;
|
|
70502
70488
|
var BUILD_TIME = process.env.BUILD_TIME || new Date().toISOString();
|
|
70503
70489
|
var program2 = new Command;
|
|
@@ -70507,113 +70493,107 @@ program2.name("skilluse").description("CLI tool for managing and installing AI C
|
|
|
70507
70493
|
process.exit(0);
|
|
70508
70494
|
});
|
|
70509
70495
|
program2.command("login").description("Authenticate with GitHub").option("-f, --force", "Force re-authentication").action((opts) => {
|
|
70510
|
-
const
|
|
70511
|
-
render_default(/* @__PURE__ */
|
|
70512
|
-
options:
|
|
70496
|
+
const options16 = options4.parse(opts);
|
|
70497
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Login, {
|
|
70498
|
+
options: options16
|
|
70513
70499
|
}, undefined, false, undefined, this));
|
|
70514
70500
|
});
|
|
70515
70501
|
program2.command("logout").description("Clear stored credentials").action(() => {
|
|
70516
|
-
render_default(/* @__PURE__ */
|
|
70502
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Logout, {
|
|
70517
70503
|
options: {}
|
|
70518
70504
|
}, undefined, false, undefined, this));
|
|
70519
70505
|
});
|
|
70520
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) => {
|
|
70521
|
-
const
|
|
70522
|
-
render_default(/* @__PURE__ */
|
|
70523
|
-
options:
|
|
70507
|
+
const options16 = options3.parse(opts);
|
|
70508
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(List, {
|
|
70509
|
+
options: options16
|
|
70524
70510
|
}, undefined, false, undefined, this));
|
|
70525
70511
|
});
|
|
70526
70512
|
program2.command("search <keyword>").description("Search for skills").option("-a, --all", "Search in all configured repos").action((keyword, opts) => {
|
|
70527
70513
|
const args11 = args8.parse([keyword]);
|
|
70528
|
-
const
|
|
70529
|
-
render_default(/* @__PURE__ */
|
|
70514
|
+
const options16 = options13.parse(opts);
|
|
70515
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Search, {
|
|
70530
70516
|
args: args11,
|
|
70531
|
-
options:
|
|
70517
|
+
options: options16
|
|
70532
70518
|
}, undefined, false, undefined, this));
|
|
70533
70519
|
});
|
|
70534
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) => {
|
|
70535
70521
|
const args11 = args2.parse([skillName]);
|
|
70536
|
-
const
|
|
70537
|
-
render_default(/* @__PURE__ */
|
|
70522
|
+
const options16 = options2.parse(opts);
|
|
70523
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Install, {
|
|
70538
70524
|
args: args11,
|
|
70539
|
-
options:
|
|
70525
|
+
options: options16
|
|
70540
70526
|
}, undefined, false, undefined, this));
|
|
70541
70527
|
});
|
|
70542
70528
|
program2.command("uninstall <skill-name>").description("Uninstall a skill").option("-f, --force", "Skip confirmation").action((skillName, opts) => {
|
|
70543
70529
|
const args11 = args9.parse([skillName]);
|
|
70544
|
-
const
|
|
70545
|
-
render_default(/* @__PURE__ */
|
|
70530
|
+
const options16 = options14.parse(opts);
|
|
70531
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Uninstall, {
|
|
70546
70532
|
args: args11,
|
|
70547
|
-
options:
|
|
70533
|
+
options: options16
|
|
70548
70534
|
}, undefined, false, undefined, this));
|
|
70549
70535
|
});
|
|
70550
70536
|
program2.command("upgrade [skill-name]").description("Upgrade skill(s) to latest version").action((skillName) => {
|
|
70551
70537
|
const args11 = args10.parse([skillName]);
|
|
70552
|
-
render_default(/* @__PURE__ */
|
|
70538
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Upgrade, {
|
|
70553
70539
|
args: args11,
|
|
70554
70540
|
options: {}
|
|
70555
70541
|
}, undefined, false, undefined, this));
|
|
70556
70542
|
});
|
|
70557
70543
|
program2.command("info <skill-name>").description("Show skill details").action((skillName) => {
|
|
70558
70544
|
const args11 = args.parse([skillName]);
|
|
70559
|
-
render_default(/* @__PURE__ */
|
|
70545
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Info, {
|
|
70560
70546
|
args: args11,
|
|
70561
70547
|
options: {}
|
|
70562
70548
|
}, undefined, false, undefined, this));
|
|
70563
70549
|
});
|
|
70564
70550
|
var repoCmd = program2.command("repo").description("Manage skill repositories");
|
|
70565
70551
|
repoCmd.command("list").description("List configured repositories").action(() => {
|
|
70566
|
-
render_default(/* @__PURE__ */
|
|
70552
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoList, {
|
|
70567
70553
|
options: {}
|
|
70568
70554
|
}, undefined, false, undefined, this));
|
|
70569
70555
|
});
|
|
70570
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) => {
|
|
70571
70557
|
const args11 = args3.parse([url2]);
|
|
70572
|
-
const
|
|
70573
|
-
render_default(/* @__PURE__ */
|
|
70558
|
+
const options16 = options6.parse(opts);
|
|
70559
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoAdd, {
|
|
70574
70560
|
args: args11,
|
|
70575
|
-
options:
|
|
70561
|
+
options: options16
|
|
70576
70562
|
}, undefined, false, undefined, this));
|
|
70577
70563
|
});
|
|
70578
70564
|
repoCmd.command("remove <name>").description("Remove a repository").option("-f, --force", "Skip confirmation").action((name, opts) => {
|
|
70579
70565
|
const args11 = args5.parse([name]);
|
|
70580
|
-
const
|
|
70581
|
-
render_default(/* @__PURE__ */
|
|
70566
|
+
const options16 = options10.parse(opts);
|
|
70567
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoRemove, {
|
|
70582
70568
|
args: args11,
|
|
70583
|
-
options:
|
|
70569
|
+
options: options16
|
|
70584
70570
|
}, undefined, false, undefined, this));
|
|
70585
70571
|
});
|
|
70586
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) => {
|
|
70587
70573
|
const args11 = args4.parse([name]);
|
|
70588
|
-
const
|
|
70589
|
-
render_default(/* @__PURE__ */
|
|
70574
|
+
const options16 = options7.parse(opts);
|
|
70575
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoEdit, {
|
|
70590
70576
|
args: args11,
|
|
70591
|
-
options:
|
|
70577
|
+
options: options16
|
|
70592
70578
|
}, undefined, false, undefined, this));
|
|
70593
70579
|
});
|
|
70594
70580
|
repoCmd.command("use <name>").description("Set default repository").action((name, _opts) => {
|
|
70595
70581
|
const args11 = args6.parse([name]);
|
|
70596
|
-
render_default(/* @__PURE__ */
|
|
70582
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(RepoUse, {
|
|
70597
70583
|
args: args11,
|
|
70598
70584
|
options: {}
|
|
70599
70585
|
}, undefined, false, undefined, this));
|
|
70600
70586
|
});
|
|
70601
70587
|
repoCmd.action(() => {
|
|
70602
|
-
render_default(/* @__PURE__ */
|
|
70588
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Repo, {
|
|
70603
70589
|
options: {}
|
|
70604
70590
|
}, undefined, false, undefined, this));
|
|
70605
70591
|
});
|
|
70606
|
-
|
|
70607
|
-
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) => {
|
|
70608
70593
|
const args11 = args7.parse([agentId]);
|
|
70609
|
-
render_default(/* @__PURE__ */
|
|
70594
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Agent, {
|
|
70610
70595
|
args: args11,
|
|
70611
70596
|
options: {}
|
|
70612
70597
|
}, undefined, false, undefined, this));
|
|
70613
70598
|
});
|
|
70614
|
-
agentCmd.action(() => {
|
|
70615
|
-
render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Agent, {
|
|
70616
|
-
options: {}
|
|
70617
|
-
}, undefined, false, undefined, this));
|
|
70618
|
-
});
|
|
70619
70599
|
program2.parse();
|