youmd 0.8.11 → 0.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/build.js +2 -2
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/chat.js +1 -1
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +11 -10
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/init.js +5 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/keys.js +8 -1
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/login.js +2 -2
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/machine.d.ts.map +1 -1
- package/dist/commands/machine.js +193 -13
- package/dist/commands/machine.js.map +1 -1
- package/dist/commands/mcp.js +4 -4
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/private.js +2 -2
- package/dist/commands/private.js.map +1 -1
- package/dist/commands/publish.js +1 -1
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/pull.js +1 -1
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.js +1 -1
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/skill.d.ts +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +72 -53
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +30 -25
- package/dist/commands/stack.js.map +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.js +2 -2
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/whoami.js +3 -3
- package/dist/commands/whoami.js.map +1 -1
- package/dist/create.js +0 -0
- package/dist/index.js +30 -28
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +11 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +3 -2
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/config.d.ts +20 -12
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +113 -42
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/daemon.d.ts +2 -0
- package/dist/lib/daemon.d.ts.map +1 -1
- package/dist/lib/daemon.js +28 -19
- package/dist/lib/daemon.js.map +1 -1
- package/dist/lib/machine-bootstrap-prompt.d.ts.map +1 -1
- package/dist/lib/machine-bootstrap-prompt.js +135 -128
- package/dist/lib/machine-bootstrap-prompt.js.map +1 -1
- package/dist/lib/machine-verify.d.ts +24 -0
- package/dist/lib/machine-verify.d.ts.map +1 -1
- package/dist/lib/machine-verify.js +41 -3
- package/dist/lib/machine-verify.js.map +1 -1
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +3 -8
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/portfolio-audit.d.ts.map +1 -1
- package/dist/lib/portfolio-audit.js +2 -1
- package/dist/lib/portfolio-audit.js.map +1 -1
- package/dist/lib/project.d.ts +3 -3
- package/dist/lib/project.d.ts.map +1 -1
- package/dist/lib/project.js +18 -11
- package/dist/lib/project.js.map +1 -1
- package/dist/lib/projectContext.d.ts +10 -9
- package/dist/lib/projectContext.d.ts.map +1 -1
- package/dist/lib/projectContext.js +29 -23
- package/dist/lib/projectContext.js.map +1 -1
- package/dist/lib/realtime-sync.d.ts +1 -1
- package/dist/lib/realtime-sync.d.ts.map +1 -1
- package/dist/lib/realtime-sync.js +9 -8
- package/dist/lib/realtime-sync.js.map +1 -1
- package/dist/lib/render.js +1 -1
- package/dist/lib/render.js.map +1 -1
- package/dist/lib/skill-catalog.d.ts +26 -0
- package/dist/lib/skill-catalog.d.ts.map +1 -1
- package/dist/lib/skill-catalog.js +100 -0
- package/dist/lib/skill-catalog.js.map +1 -1
- package/dist/lib/vault.d.ts +3 -3
- package/dist/lib/vault.d.ts.map +1 -1
- package/dist/lib/vault.js +10 -8
- package/dist/lib/vault.js.map +1 -1
- package/dist/lib/youstack.js +12 -12
- package/dist/lib/youstack.js.map +1 -1
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +74 -13
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +135 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/postinstall.js +3 -2
- package/dist/postinstall.js.map +1 -1
- package/dist/you.js +0 -0
- package/package.json +1 -1
- package/scripts/local-agent-stack-inventory.mjs +59 -21
- package/scripts/skillstack-sync/README.md +25 -25
- package/scripts/skillstack-sync/bootstrap-new-mac.sh +1 -1
- package/scripts/skillstack-sync/capture-agent-config.sh +8 -1
- package/scripts/skillstack-sync/{com.youmd.context-sync.plist → com.you.context-sync.plist} +3 -3
- package/scripts/skillstack-sync/{com.youmd.identity-sync.plist → com.you.identity-sync.plist} +3 -3
- package/scripts/skillstack-sync/{com.youmd.realtime-sync.plist → com.you.realtime-sync.plist} +3 -3
- package/scripts/skillstack-sync/{com.youmd.skillstack-sync.plist → com.you.skillstack-sync.plist} +3 -3
- package/scripts/skillstack-sync/context-sync.sh +1 -1
- package/scripts/skillstack-sync/install-daemons.sh +20 -6
- package/scripts/skillstack-sync/restore-agent-config.sh +1 -1
- package/scripts/skillstack-sync/sync.sh +1 -1
- package/skills/machine-bootstrap.md +57 -55
package/dist/commands/skill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* you skill — identity-aware agent skill system.
|
|
4
4
|
*
|
|
5
5
|
* Subcommand router following the project.ts pattern.
|
|
6
6
|
* Manages skill lifecycle: install, remove, use, sync, link, init-project.
|
|
@@ -147,8 +147,9 @@ function flagString(flags, key) {
|
|
|
147
147
|
}
|
|
148
148
|
function resolveInventoryScript() {
|
|
149
149
|
const candidates = [
|
|
150
|
-
process.env.YOUMD_AGENT_STACK_INVENTORY_SCRIPT,
|
|
150
|
+
process.env.YOU_AGENT_STACK_INVENTORY_SCRIPT || process.env.YOUMD_AGENT_STACK_INVENTORY_SCRIPT,
|
|
151
151
|
path.join(os.homedir(), ".agent-shared", "claude-skills", "agent-stack-inventory", "scripts", "local-agent-stack-inventory.mjs"),
|
|
152
|
+
path.join((0, config_1.getSkillsDir)(), "agent-stack-inventory", "scripts", "local-agent-stack-inventory.mjs"),
|
|
152
153
|
path.join(os.homedir(), ".youmd", "skills", "agent-stack-inventory", "scripts", "local-agent-stack-inventory.mjs"),
|
|
153
154
|
path.resolve(__dirname, "../../scripts/local-agent-stack-inventory.mjs"),
|
|
154
155
|
path.resolve(__dirname, "../../../scripts/local-agent-stack-inventory.mjs"),
|
|
@@ -341,6 +342,13 @@ function inventorySampleNames(rows) {
|
|
|
341
342
|
.filter(Boolean)
|
|
342
343
|
.slice(0, 24);
|
|
343
344
|
}
|
|
345
|
+
function inventoryCatalogRows(snapshot) {
|
|
346
|
+
return (snapshot.missingFromCatalog || []).flatMap((row) => {
|
|
347
|
+
if (typeof row === "string")
|
|
348
|
+
return [{ name: row }];
|
|
349
|
+
return [row];
|
|
350
|
+
});
|
|
351
|
+
}
|
|
344
352
|
function buildAgentStackInventorySyncPayload(snapshot, jsonPath, htmlPath, syncRepo = true) {
|
|
345
353
|
const totals = snapshot.totals || {};
|
|
346
354
|
return {
|
|
@@ -353,7 +361,7 @@ function buildAgentStackInventorySyncPayload(snapshot, jsonPath, htmlPath, syncR
|
|
|
353
361
|
reportJsonPath: jsonPath,
|
|
354
362
|
reportHtmlPath: htmlPath,
|
|
355
363
|
source: "youmd-cli",
|
|
356
|
-
agentName: "
|
|
364
|
+
agentName: "you skill inventory",
|
|
357
365
|
totals: {
|
|
358
366
|
uniqueSkillNames: safeInventoryCount(totals.uniqueSkillNames),
|
|
359
367
|
uniqueRealSkillFiles: safeInventoryCount(totals.uniqueRealSkillFiles),
|
|
@@ -416,11 +424,11 @@ const RECOMMENDED_SKILLS = new Set([
|
|
|
416
424
|
async function listSkills() {
|
|
417
425
|
const catalog = (0, skill_catalog_1.readSkillCatalog)();
|
|
418
426
|
console.log("");
|
|
419
|
-
console.log(" " + chalk_1.default.bold("
|
|
427
|
+
console.log(" " + chalk_1.default.bold("you skills") + DIM(` (${catalog.skills.length} in catalog)`));
|
|
420
428
|
console.log("");
|
|
421
429
|
if (catalog.skills.length === 0) {
|
|
422
430
|
console.log(DIM(" no skills registered."));
|
|
423
|
-
console.log(DIM(" run ") + chalk_1.default.cyan("
|
|
431
|
+
console.log(DIM(" run ") + chalk_1.default.cyan("you skill add <name> <source>") + DIM(" to add one."));
|
|
424
432
|
console.log("");
|
|
425
433
|
return;
|
|
426
434
|
}
|
|
@@ -470,7 +478,7 @@ async function listSkills() {
|
|
|
470
478
|
if (installed === 0) {
|
|
471
479
|
console.log("");
|
|
472
480
|
console.log(DIM(" get started: ") +
|
|
473
|
-
chalk_1.default.cyan("
|
|
481
|
+
chalk_1.default.cyan("you skill install youstack-start"));
|
|
474
482
|
}
|
|
475
483
|
console.log("");
|
|
476
484
|
}
|
|
@@ -501,8 +509,8 @@ async function installSkillCmd(args) {
|
|
|
501
509
|
}
|
|
502
510
|
if (!name) {
|
|
503
511
|
console.log("");
|
|
504
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
505
|
-
console.log(DIM(" or:
|
|
512
|
+
console.log(chalk_1.default.yellow(" usage: you skill install <name>"));
|
|
513
|
+
console.log(DIM(" or: you skill install all"));
|
|
506
514
|
console.log("");
|
|
507
515
|
return;
|
|
508
516
|
}
|
|
@@ -574,8 +582,8 @@ async function installSkillCmd(args) {
|
|
|
574
582
|
}
|
|
575
583
|
console.log("");
|
|
576
584
|
console.log(chalk_1.default.yellow(` skill "${name}" not found in catalog or registry.`));
|
|
577
|
-
console.log(DIM(" run ") + chalk_1.default.cyan("
|
|
578
|
-
console.log(DIM(" or: ") + chalk_1.default.cyan("
|
|
585
|
+
console.log(DIM(" run ") + chalk_1.default.cyan("you skill list") + DIM(" to see available skills."));
|
|
586
|
+
console.log(DIM(" or: ") + chalk_1.default.cyan("you skill browse") + DIM(" to check the registry."));
|
|
579
587
|
console.log("");
|
|
580
588
|
return;
|
|
581
589
|
}
|
|
@@ -638,8 +646,8 @@ async function removeSkillCmd(args) {
|
|
|
638
646
|
}
|
|
639
647
|
if (!name) {
|
|
640
648
|
console.log("");
|
|
641
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
642
|
-
console.log(DIM(" or:
|
|
649
|
+
console.log(chalk_1.default.yellow(" usage: you skill remove <name>"));
|
|
650
|
+
console.log(DIM(" or: you skill remove all"));
|
|
643
651
|
console.log("");
|
|
644
652
|
return;
|
|
645
653
|
}
|
|
@@ -659,7 +667,7 @@ async function skillUseCmd(args) {
|
|
|
659
667
|
const name = args[0];
|
|
660
668
|
if (!name) {
|
|
661
669
|
console.log("");
|
|
662
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
670
|
+
console.log(chalk_1.default.yellow(" usage: you skill use <name>"));
|
|
663
671
|
console.log("");
|
|
664
672
|
return;
|
|
665
673
|
}
|
|
@@ -680,7 +688,7 @@ async function skillUseCmd(args) {
|
|
|
680
688
|
console.log("");
|
|
681
689
|
console.log(ACCENT(` ${filled}/${total} identity fields resolved.`) +
|
|
682
690
|
DIM(` missing: ${missing.join(", ")}`));
|
|
683
|
-
console.log(DIM(" fill these via ") + chalk_1.default.cyan("you") + DIM(" or edit .
|
|
691
|
+
console.log(DIM(" fill these via ") + chalk_1.default.cyan("you") + DIM(" or edit .you/preferences/"));
|
|
684
692
|
}
|
|
685
693
|
else {
|
|
686
694
|
console.log(DIM(` ${total}/${total} identity fields resolved.`));
|
|
@@ -761,7 +769,7 @@ function addSkillCmd(args) {
|
|
|
761
769
|
const source = args[1];
|
|
762
770
|
if (!name || !source) {
|
|
763
771
|
console.log("");
|
|
764
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
772
|
+
console.log(chalk_1.default.yellow(" usage: you skill add <name> <source>"));
|
|
765
773
|
console.log(DIM(" source: local:/path/to/skill.md, github:owner/repo/path, or registry:<name>"));
|
|
766
774
|
console.log("");
|
|
767
775
|
return;
|
|
@@ -779,14 +787,14 @@ function addSkillCmd(args) {
|
|
|
779
787
|
console.log("");
|
|
780
788
|
console.log(chalk_1.default.green(" \u2713") + ` ${chalk_1.default.bold(name)} added to catalog`);
|
|
781
789
|
console.log(DIM(` source: ${source}`));
|
|
782
|
-
console.log(DIM(" run ") + chalk_1.default.cyan(`
|
|
790
|
+
console.log(DIM(" run ") + chalk_1.default.cyan(`you skill install ${name}`) + DIM(" to install."));
|
|
783
791
|
console.log("");
|
|
784
792
|
}
|
|
785
793
|
async function createSkillCmd(args) {
|
|
786
794
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
787
795
|
const ask = (q) => new Promise((res) => rl.question(q, (a) => res(a.trim())));
|
|
788
796
|
console.log("");
|
|
789
|
-
console.log(" " + chalk_1.default.bold("
|
|
797
|
+
console.log(" " + chalk_1.default.bold("you skill create"));
|
|
790
798
|
console.log(DIM(" scaffold a new identity-aware skill\n"));
|
|
791
799
|
// Name
|
|
792
800
|
let name = args[0] || "";
|
|
@@ -840,8 +848,8 @@ async function createSkillCmd(args) {
|
|
|
840
848
|
"3. (step 3)",
|
|
841
849
|
"",
|
|
842
850
|
].join("\n");
|
|
843
|
-
// Write to ~/.
|
|
844
|
-
const skillDir = path.join(
|
|
851
|
+
// Write to ~/.you/skills/<name>/SKILL.md
|
|
852
|
+
const skillDir = path.join((0, config_1.getSkillsDir)(), slug);
|
|
845
853
|
fs.mkdirSync(skillDir, { recursive: true });
|
|
846
854
|
fs.writeFileSync(path.join(skillDir, "SKILL.md"), skillContent);
|
|
847
855
|
// Add to catalog
|
|
@@ -861,15 +869,15 @@ async function createSkillCmd(args) {
|
|
|
861
869
|
console.log(DIM(` ${path.join(skillDir, "SKILL.md")}`));
|
|
862
870
|
console.log("");
|
|
863
871
|
console.log(DIM(" edit the SKILL.md, then:"));
|
|
864
|
-
console.log(` ${chalk_1.default.cyan(`
|
|
865
|
-
console.log(` ${chalk_1.default.cyan(`
|
|
872
|
+
console.log(` ${chalk_1.default.cyan(`you skill use ${slug}`)} ${DIM("render with your identity")}`);
|
|
873
|
+
console.log(` ${chalk_1.default.cyan(`you skill link claude`)} ${DIM("link to your project")}`);
|
|
866
874
|
console.log("");
|
|
867
875
|
}
|
|
868
876
|
function pushSkillCmd(args) {
|
|
869
877
|
const name = args[0];
|
|
870
878
|
if (!name) {
|
|
871
879
|
console.log("");
|
|
872
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
880
|
+
console.log(chalk_1.default.yellow(" usage: you skill push <name>"));
|
|
873
881
|
console.log("");
|
|
874
882
|
return;
|
|
875
883
|
}
|
|
@@ -888,7 +896,7 @@ function pushSkillCmd(args) {
|
|
|
888
896
|
console.log("");
|
|
889
897
|
return;
|
|
890
898
|
}
|
|
891
|
-
const skillPath =
|
|
899
|
+
const skillPath = (0, skills_2.getSkillDir)(entry.name);
|
|
892
900
|
if (!fs.existsSync(skillPath)) {
|
|
893
901
|
console.log(chalk_1.default.yellow(` SKILL.md not found for "${name}". install first.`));
|
|
894
902
|
return;
|
|
@@ -949,7 +957,7 @@ function parseInitProjectMode(args) {
|
|
|
949
957
|
}
|
|
950
958
|
async function initProjectCmd(args = []) {
|
|
951
959
|
console.log("");
|
|
952
|
-
console.log(" " + chalk_1.default.bold("
|
|
960
|
+
console.log(" " + chalk_1.default.bold("you skill init-project"));
|
|
953
961
|
const mode = parseInitProjectMode(args);
|
|
954
962
|
// Detect existing .youmd-project
|
|
955
963
|
const youmdProjectPath = path.join(process.cwd(), ".youmd-project");
|
|
@@ -1173,7 +1181,7 @@ async function improveCmd() {
|
|
|
1173
1181
|
for (const f of missing) {
|
|
1174
1182
|
console.log(` ${chalk_1.default.yellow(f)}`);
|
|
1175
1183
|
}
|
|
1176
|
-
console.log(DIM("\n fill via ") + chalk_1.default.cyan("you") + DIM(" or edit .
|
|
1184
|
+
console.log(DIM("\n fill via ") + chalk_1.default.cyan("you") + DIM(" or edit .you/preferences/"));
|
|
1177
1185
|
console.log("");
|
|
1178
1186
|
}
|
|
1179
1187
|
else if (allFields.size > 0) {
|
|
@@ -1206,14 +1214,14 @@ async function improveCmd() {
|
|
|
1206
1214
|
identityChangedAt !== null &&
|
|
1207
1215
|
(Number.isNaN(lastSyncedAtMs) || identityChangedAt > lastSyncedAtMs)) {
|
|
1208
1216
|
proposals.push(Number.isNaN(lastSyncedAtMs)
|
|
1209
|
-
? "run \"
|
|
1210
|
-
: "run \"
|
|
1217
|
+
? "run \"you skill sync\" — installed skills haven't been synced against your identity yet"
|
|
1218
|
+
: "run \"you skill sync\" — your identity changed after the last skill sync");
|
|
1211
1219
|
}
|
|
1212
1220
|
// Propose linking if skills are installed but not linked into the Claude
|
|
1213
1221
|
// Code discovery layout (.claude/skills/<name>/SKILL.md)
|
|
1214
1222
|
if (installed.length > 0 &&
|
|
1215
1223
|
!(0, host_link_1.hasLinkedClaudeSkills)(process.cwd(), installed.map((s) => s.name))) {
|
|
1216
|
-
proposals.push("run \"
|
|
1224
|
+
proposals.push("run \"you skill link claude\" — skills aren't linked to this project's agent");
|
|
1217
1225
|
}
|
|
1218
1226
|
if (proposals.length > 0) {
|
|
1219
1227
|
console.log(" " + chalk_1.default.bold("proposals:"));
|
|
@@ -1288,8 +1296,8 @@ function inventoryDiffCmd(args) {
|
|
|
1288
1296
|
const rightPath = flagString(flags, "right") || positional[1];
|
|
1289
1297
|
if (!leftPath || !rightPath) {
|
|
1290
1298
|
console.log("");
|
|
1291
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
1292
|
-
console.log(DIM(" or:
|
|
1299
|
+
console.log(chalk_1.default.yellow(" usage: you skill inventory diff --left mac-mini.json --right laptop.json"));
|
|
1300
|
+
console.log(DIM(" or: you skill inventory diff mac-mini.json laptop.json"));
|
|
1293
1301
|
console.log("");
|
|
1294
1302
|
return;
|
|
1295
1303
|
}
|
|
@@ -1345,7 +1353,7 @@ function inventoryDiffCmd(args) {
|
|
|
1345
1353
|
}
|
|
1346
1354
|
async function inventoryStatusCmd(args) {
|
|
1347
1355
|
const { flags } = parseFlagArgs(args);
|
|
1348
|
-
const outDir = path.resolve(flagString(flags, "out-dir") || path.join(
|
|
1356
|
+
const outDir = path.resolve(flagString(flags, "out-dir") || path.join((0, config_1.getWritableHomeBundleDir)(), "agent-stack-inventory"));
|
|
1349
1357
|
const limitRaw = flagString(flags, "limit");
|
|
1350
1358
|
const limit = limitRaw && Number.isFinite(Number(limitRaw))
|
|
1351
1359
|
? Math.max(1, Math.min(50, Math.trunc(Number(limitRaw))))
|
|
@@ -1359,14 +1367,14 @@ async function inventoryStatusCmd(args) {
|
|
|
1359
1367
|
console.log(JSON.stringify({
|
|
1360
1368
|
success: false,
|
|
1361
1369
|
error: "not_authenticated",
|
|
1362
|
-
repair: "
|
|
1370
|
+
repair: "you login",
|
|
1363
1371
|
secretValuesExposed: false,
|
|
1364
1372
|
}, null, 2));
|
|
1365
1373
|
return;
|
|
1366
1374
|
}
|
|
1367
1375
|
console.log("");
|
|
1368
|
-
console.log(chalk_1.default.yellow(" not authenticated. run: ") + chalk_1.default.cyan("
|
|
1369
|
-
console.log(DIM(" then: ") + chalk_1.default.cyan("
|
|
1376
|
+
console.log(chalk_1.default.yellow(" not authenticated. run: ") + chalk_1.default.cyan("you login"));
|
|
1377
|
+
console.log(DIM(" then: ") + chalk_1.default.cyan("you skill inventory status"));
|
|
1370
1378
|
console.log("");
|
|
1371
1379
|
return;
|
|
1372
1380
|
}
|
|
@@ -1425,7 +1433,7 @@ async function inventoryStatusCmd(args) {
|
|
|
1425
1433
|
}
|
|
1426
1434
|
else {
|
|
1427
1435
|
console.log(chalk_1.default.yellow(" local latest: missing"));
|
|
1428
|
-
console.log(DIM(" repair: ") + chalk_1.default.cyan(`
|
|
1436
|
+
console.log(DIM(" repair: ") + chalk_1.default.cyan(`you skill inventory --out-dir ${outDir} --register-catalog --sync`));
|
|
1429
1437
|
}
|
|
1430
1438
|
console.log("");
|
|
1431
1439
|
if (inventories.length === 0) {
|
|
@@ -1469,9 +1477,9 @@ async function inventoryStatusCmd(args) {
|
|
|
1469
1477
|
}
|
|
1470
1478
|
renderInventoryDrift(drift);
|
|
1471
1479
|
console.log("");
|
|
1472
|
-
console.log(DIM(" refresh: ") + chalk_1.default.cyan(`
|
|
1473
|
-
console.log(DIM(" verify: ") + chalk_1.default.cyan("
|
|
1474
|
-
console.log(DIM(" exact diff needs two local JSON files: ") + chalk_1.default.cyan("
|
|
1480
|
+
console.log(DIM(" refresh: ") + chalk_1.default.cyan(`you skill inventory --out-dir ${outDir} --register-catalog --sync`));
|
|
1481
|
+
console.log(DIM(" verify: ") + chalk_1.default.cyan("you machine verify --write-report --sync-report"));
|
|
1482
|
+
console.log(DIM(" exact diff needs two local JSON files: ") + chalk_1.default.cyan("you skill inventory diff macbook.json mac-mini.json"));
|
|
1475
1483
|
console.log("");
|
|
1476
1484
|
}
|
|
1477
1485
|
async function inventoryCmd(args) {
|
|
@@ -1490,9 +1498,10 @@ async function inventoryCmd(args) {
|
|
|
1490
1498
|
console.log(chalk_1.default.yellow(" agent-stack-inventory script not found on this machine."));
|
|
1491
1499
|
console.log(DIM(" expected one of:"));
|
|
1492
1500
|
console.log(DIM(" ~/.agent-shared/claude-skills/agent-stack-inventory/scripts/local-agent-stack-inventory.mjs"));
|
|
1493
|
-
console.log(DIM(" ~/.
|
|
1501
|
+
console.log(DIM(" ~/.you/skills/agent-stack-inventory/scripts/local-agent-stack-inventory.mjs"));
|
|
1502
|
+
console.log(DIM(" ~/.youmd/skills/agent-stack-inventory/scripts/local-agent-stack-inventory.mjs (legacy)"));
|
|
1494
1503
|
console.log("");
|
|
1495
|
-
console.log(DIM(" run ") + chalk_1.default.cyan("
|
|
1504
|
+
console.log(DIM(" run ") + chalk_1.default.cyan("you skill install agent-stack-inventory") + DIM(" or sync your shared skills, then retry."));
|
|
1496
1505
|
console.log("");
|
|
1497
1506
|
return;
|
|
1498
1507
|
}
|
|
@@ -1501,6 +1510,7 @@ async function inventoryCmd(args) {
|
|
|
1501
1510
|
const date = flagString(flags, "date");
|
|
1502
1511
|
const shouldSync = flags.sync === true;
|
|
1503
1512
|
const shouldSyncRepo = flags["no-repo-sync"] !== true;
|
|
1513
|
+
const shouldRegisterCatalog = flags["register-catalog"] === true;
|
|
1504
1514
|
const startedAt = Date.now();
|
|
1505
1515
|
const scriptArgs = [script, "--out-dir", outDir, "--progress"];
|
|
1506
1516
|
if (workspace)
|
|
@@ -1530,6 +1540,15 @@ async function inventoryCmd(args) {
|
|
|
1530
1540
|
renderInventoryPhaseTimings(parsed);
|
|
1531
1541
|
console.log("");
|
|
1532
1542
|
}
|
|
1543
|
+
if (shouldRegisterCatalog && parsed) {
|
|
1544
|
+
const catalog = (0, skill_catalog_1.readSkillCatalog)();
|
|
1545
|
+
const result = (0, skill_catalog_1.addInventorySkillsToCatalog)(catalog, inventoryCatalogRows(parsed));
|
|
1546
|
+
const label = result.added > 0 ? chalk_1.default.green(`${result.added} added`) : DIM("no new entries");
|
|
1547
|
+
console.log(` ${DIM("catalog")} ${label}${result.skipped ? DIM(` · ${result.skipped} already known/skipped`) : ""}`);
|
|
1548
|
+
if (result.skills.length > 0) {
|
|
1549
|
+
console.log(` ${DIM("catalog samples")} ${result.skills.slice(0, 8).map((name) => chalk_1.default.cyan(name)).join(DIM(", "))}`);
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1533
1552
|
let htmlPath = latest ? latest.replace(/\.json$/, ".html") : undefined;
|
|
1534
1553
|
let jsonPath = latest || undefined;
|
|
1535
1554
|
try {
|
|
@@ -1549,7 +1568,7 @@ async function inventoryCmd(args) {
|
|
|
1549
1568
|
}
|
|
1550
1569
|
if (shouldSync && parsed) {
|
|
1551
1570
|
if (!(0, config_1.isAuthenticated)()) {
|
|
1552
|
-
console.log(DIM(" sync skipped: run `
|
|
1571
|
+
console.log(DIM(" sync skipped: run `you login` or set YOU_API_KEY to persist this machine inventory."));
|
|
1553
1572
|
}
|
|
1554
1573
|
else {
|
|
1555
1574
|
try {
|
|
@@ -1581,7 +1600,7 @@ function searchCmd(args) {
|
|
|
1581
1600
|
const query = args.join(" ");
|
|
1582
1601
|
if (!query) {
|
|
1583
1602
|
console.log("");
|
|
1584
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
1603
|
+
console.log(chalk_1.default.yellow(" usage: you skill search <query>"));
|
|
1585
1604
|
console.log("");
|
|
1586
1605
|
return;
|
|
1587
1606
|
}
|
|
@@ -1604,7 +1623,7 @@ function searchCmd(args) {
|
|
|
1604
1623
|
async function browseCmd() {
|
|
1605
1624
|
if (!(0, config_1.isAuthenticated)()) {
|
|
1606
1625
|
console.log("");
|
|
1607
|
-
console.log(chalk_1.default.yellow(" not authenticated. run:
|
|
1626
|
+
console.log(chalk_1.default.yellow(" not authenticated. run: you login"));
|
|
1608
1627
|
console.log("");
|
|
1609
1628
|
return;
|
|
1610
1629
|
}
|
|
@@ -1622,7 +1641,7 @@ async function browseCmd() {
|
|
|
1622
1641
|
spinner.stop(`${skills.length} skill${skills.length === 1 ? "" : "s"} in registry`);
|
|
1623
1642
|
if (skills.length === 0) {
|
|
1624
1643
|
console.log(DIM(" no skills published yet."));
|
|
1625
|
-
console.log(DIM(" be the first: ") + chalk_1.default.cyan("
|
|
1644
|
+
console.log(DIM(" be the first: ") + chalk_1.default.cyan("you skill publish <name>"));
|
|
1626
1645
|
console.log("");
|
|
1627
1646
|
return;
|
|
1628
1647
|
}
|
|
@@ -1635,7 +1654,7 @@ async function browseCmd() {
|
|
|
1635
1654
|
console.log(` ${DIM("v" + s.version)} ${DIM(s.scope)} ${DIM(`[${s.identityFields.join(", ")}]`)}`);
|
|
1636
1655
|
}
|
|
1637
1656
|
console.log("");
|
|
1638
|
-
console.log(DIM(` install with:
|
|
1657
|
+
console.log(DIM(` install with: you skill install <name>`));
|
|
1639
1658
|
}
|
|
1640
1659
|
catch {
|
|
1641
1660
|
spinner.fail("registry unreachable");
|
|
@@ -1646,14 +1665,14 @@ async function publishSkillCmd(args) {
|
|
|
1646
1665
|
const name = args[0];
|
|
1647
1666
|
if (!name) {
|
|
1648
1667
|
console.log("");
|
|
1649
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
1668
|
+
console.log(chalk_1.default.yellow(" usage: you skill publish <name>"));
|
|
1650
1669
|
console.log(DIM(" publishes an installed skill to the you.md registry."));
|
|
1651
1670
|
console.log("");
|
|
1652
1671
|
return;
|
|
1653
1672
|
}
|
|
1654
1673
|
if (!(0, config_1.isAuthenticated)()) {
|
|
1655
1674
|
console.log("");
|
|
1656
|
-
console.log(chalk_1.default.yellow(" not authenticated. run:
|
|
1675
|
+
console.log(chalk_1.default.yellow(" not authenticated. run: you login"));
|
|
1657
1676
|
console.log("");
|
|
1658
1677
|
return;
|
|
1659
1678
|
}
|
|
@@ -1688,7 +1707,7 @@ async function publishSkillCmd(args) {
|
|
|
1688
1707
|
spinner.stop(res.data.updated ? "updated" : "published");
|
|
1689
1708
|
console.log("");
|
|
1690
1709
|
console.log(chalk_1.default.green(" \u2713") + ` ${chalk_1.default.bold(entry.name)} is live on the registry`);
|
|
1691
|
-
console.log(DIM(` others can install with:
|
|
1710
|
+
console.log(DIM(` others can install with: you skill install ${entry.name}`));
|
|
1692
1711
|
}
|
|
1693
1712
|
else {
|
|
1694
1713
|
spinner.fail((0, api_1.apiErrorMessage)(res.data) || "publish failed");
|
|
@@ -1702,7 +1721,7 @@ async function publishSkillCmd(args) {
|
|
|
1702
1721
|
async function remoteStatusCmd() {
|
|
1703
1722
|
if (!(0, config_1.isAuthenticated)()) {
|
|
1704
1723
|
console.log("");
|
|
1705
|
-
console.log(chalk_1.default.yellow(" not authenticated. run:
|
|
1724
|
+
console.log(chalk_1.default.yellow(" not authenticated. run: you login"));
|
|
1706
1725
|
console.log("");
|
|
1707
1726
|
return;
|
|
1708
1727
|
}
|
|
@@ -1739,7 +1758,7 @@ function infoCmd(args) {
|
|
|
1739
1758
|
const name = args[0];
|
|
1740
1759
|
if (!name) {
|
|
1741
1760
|
console.log("");
|
|
1742
|
-
console.log(chalk_1.default.yellow(" usage:
|
|
1761
|
+
console.log(chalk_1.default.yellow(" usage: you skill info <name>"));
|
|
1743
1762
|
console.log("");
|
|
1744
1763
|
return;
|
|
1745
1764
|
}
|
|
@@ -1815,10 +1834,10 @@ function exportSkillsCmd(args) {
|
|
|
1815
1834
|
continue;
|
|
1816
1835
|
// Export the raw SKILL.md
|
|
1817
1836
|
const outPath = path.join(outputDir, `${entry.name}.md`);
|
|
1818
|
-
const raw = fs.readFileSync(
|
|
1837
|
+
const raw = fs.readFileSync((0, skills_2.getSkillDir)(entry.name), "utf-8");
|
|
1819
1838
|
fs.writeFileSync(outPath, raw);
|
|
1820
1839
|
// Also export the rendered version
|
|
1821
|
-
const renderedPath = path.join(
|
|
1840
|
+
const renderedPath = path.join((0, config_1.getSkillsDir)(), entry.name, "RENDERED.md");
|
|
1822
1841
|
if (fs.existsSync(renderedPath)) {
|
|
1823
1842
|
fs.writeFileSync(path.join(outputDir, `${entry.name}.rendered.md`), fs.readFileSync(renderedPath, "utf-8"));
|
|
1824
1843
|
}
|
|
@@ -1918,7 +1937,7 @@ async function skillCommand(subcommand, ...args) {
|
|
|
1918
1937
|
const catalog = (0, skill_catalog_1.readSkillCatalog)();
|
|
1919
1938
|
const installed = catalog.skills.filter((s) => s.installed);
|
|
1920
1939
|
console.log("");
|
|
1921
|
-
console.log(" " + chalk_1.default.bold("
|
|
1940
|
+
console.log(" " + chalk_1.default.bold("you skill") + DIM(" — identity-aware agent skills"));
|
|
1922
1941
|
console.log("");
|
|
1923
1942
|
if (installed.length > 0) {
|
|
1924
1943
|
// Quick identity coverage
|