@callmeradical/augy 0.6.0 → 0.7.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/dist/{author-G46NJ3OW.js → author-W7UKRDYO.js} +1 -1
- package/dist/{bundle-L4LMJLKN.js → bundle-ESWO4DCZ.js} +1 -1
- package/dist/{chunk-A3USXURD.js → chunk-DFZHSX3M.js} +1 -1
- package/dist/{chunk-HZSFPII7.js → chunk-HKE4L4SD.js} +1 -1
- package/dist/{chunk-JM4VVAHN.js → chunk-IORULLX5.js} +7 -0
- package/dist/{chunk-Z4R7NYGP.js → chunk-UJBZ6OAP.js} +2 -2
- package/dist/{diff-JQ5L3GEO.js → diff-EAGTGQYC.js} +2 -2
- package/dist/{home-AEZ5IVC3.js → home-TCFEQEXO.js} +22 -11
- package/dist/index.js +41 -24
- package/dist/{info-2AD4VEXX.js → info-7DPMSTVU.js} +2 -2
- package/dist/{install-27YDQ46H.js → install-4CHE2OFV.js} +3 -3
- package/dist/{list-FTEIYHCK.js → list-3RZJGXTD.js} +1 -1
- package/dist/{registry-2B52E3ME.js → registry-KMUHBN75.js} +3 -1
- package/dist/{rollback-NSDZL7WA.js → rollback-AZTJTYLL.js} +3 -3
- package/dist/{scan-6HFU774V.js → scan-YZ2PPABF.js} +3 -3
- package/dist/{search-Y3ID5H4Z.js → search-H2G7PH7R.js} +2 -2
- package/dist/{set-source-GRYHJOX6.js → set-source-5PSSVVZ2.js} +1 -1
- package/dist/{sync-QQFXUXCN.js → sync-4EKWA3IM.js} +1 -1
- package/dist/tag-DAWGOKEO.js +81 -0
- package/dist/{tap-OWJLWLKR.js → tap-KS57GF5M.js} +2 -2
- package/dist/{uninstall-EYLNWP2L.js → uninstall-PZ5AP4MP.js} +2 -2
- package/dist/{update-VEXE6ZKZ.js → update-GAPWQHVH.js} +2 -2
- package/dist/{versions-BGGRVKJ2.js → versions-33GF7UP5.js} +2 -2
- package/package.json +1 -1
|
@@ -112,6 +112,12 @@ function addTap(registry, tap) {
|
|
|
112
112
|
function removeTap(registry, key) {
|
|
113
113
|
delete registry.taps[key];
|
|
114
114
|
}
|
|
115
|
+
function skillMatchesContext(skillContexts, filter) {
|
|
116
|
+
if (!filter) return true;
|
|
117
|
+
if (!skillContexts || skillContexts.length === 0) return true;
|
|
118
|
+
if (skillContexts.includes("universal")) return true;
|
|
119
|
+
return skillContexts.includes(filter);
|
|
120
|
+
}
|
|
115
121
|
function getHomeConfig(registry) {
|
|
116
122
|
return registry.home;
|
|
117
123
|
}
|
|
@@ -139,6 +145,7 @@ export {
|
|
|
139
145
|
listTaps,
|
|
140
146
|
addTap,
|
|
141
147
|
removeTap,
|
|
148
|
+
skillMatchesContext,
|
|
142
149
|
getHomeConfig,
|
|
143
150
|
setHomeConfig
|
|
144
151
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
versionArchivePath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IORULLX5.js";
|
|
4
4
|
|
|
5
5
|
// src/versions.ts
|
|
6
6
|
import { cp, mkdir, rm } from "fs/promises";
|
|
@@ -32,7 +32,7 @@ Archive path: ${src}`
|
|
|
32
32
|
}
|
|
33
33
|
async function pruneVersions(skillName, keepShas = []) {
|
|
34
34
|
const { join } = await import("path");
|
|
35
|
-
const { versionArchivePath: archivePath, versionsDir } = await import("./registry-
|
|
35
|
+
const { versionArchivePath: archivePath, versionsDir } = await import("./registry-KMUHBN75.js");
|
|
36
36
|
const skillVersionsDir = join(versionsDir(), skillName);
|
|
37
37
|
if (!existsSync(skillVersionsDir)) return;
|
|
38
38
|
const { readdir } = await import("fs/promises");
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-2E5SVRSR.js";
|
|
5
5
|
import {
|
|
6
6
|
archiveExists
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UJBZ6OAP.js";
|
|
8
8
|
import {
|
|
9
9
|
getSkill,
|
|
10
10
|
readRegistry,
|
|
11
11
|
shortSha,
|
|
12
12
|
versionArchivePath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IORULLX5.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/diff.ts
|
|
16
16
|
import { cancel, intro, isCancel, outro, select, spinner } from "@clack/prompts";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
filterableMultiselect
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DFZHSX3M.js";
|
|
4
4
|
import {
|
|
5
5
|
AGENTS,
|
|
6
6
|
agentSkillPath,
|
|
@@ -12,9 +12,10 @@ import {
|
|
|
12
12
|
listSkills,
|
|
13
13
|
readRegistry,
|
|
14
14
|
setHomeConfig,
|
|
15
|
+
skillMatchesContext,
|
|
15
16
|
upsertSkill,
|
|
16
17
|
writeRegistry
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IORULLX5.js";
|
|
18
19
|
|
|
19
20
|
// src/commands/home.ts
|
|
20
21
|
import { intro, isCancel, multiselect, outro, spinner } from "@clack/prompts";
|
|
@@ -168,20 +169,28 @@ async function homePullCommand(opts = {}) {
|
|
|
168
169
|
outro(chalk.dim("No skills found in home repo."));
|
|
169
170
|
return;
|
|
170
171
|
}
|
|
172
|
+
const currentRegistry = await readRegistry();
|
|
171
173
|
const selected = await filterableMultiselect({
|
|
172
174
|
message: `Select skills to install ${chalk.dim(`(${available.length} available)`)}`,
|
|
173
|
-
options: available.map((sk) =>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
options: available.map((sk) => {
|
|
176
|
+
const record = currentRegistry.skills[sk.name];
|
|
177
|
+
const contexts = record?.contexts ?? [];
|
|
178
|
+
const matches = skillMatchesContext(contexts, opts.context);
|
|
179
|
+
const ctxHint = contexts.length ? chalk.dim(contexts.join(", ")) : "";
|
|
180
|
+
const srcHint = sk.isAuthored ? chalk.dim("authored") : chalk.dim(sk.source);
|
|
181
|
+
return {
|
|
182
|
+
value: sk,
|
|
183
|
+
label: sk.name,
|
|
184
|
+
hint: [ctxHint, srcHint].filter(Boolean).join(" "),
|
|
185
|
+
selected: matches
|
|
186
|
+
};
|
|
187
|
+
})
|
|
179
188
|
});
|
|
180
189
|
if (isCancel(selected) || !selected.length) {
|
|
181
190
|
console.log(chalk.dim("Cancelled."));
|
|
182
191
|
process.exit(0);
|
|
183
192
|
}
|
|
184
|
-
const toInstall = selected;
|
|
193
|
+
const toInstall = selected.map((sk) => available.find((a) => a.name === sk.name) ?? sk);
|
|
185
194
|
let targetAgents = opts.agent?.length ? AGENTS.filter((a) => opts.agent.includes(a.id)) : detectInstalledAgents();
|
|
186
195
|
if (!opts.agent?.length) {
|
|
187
196
|
const agentResult = await multiselect({
|
|
@@ -227,7 +236,9 @@ async function homePullCommand(opts = {}) {
|
|
|
227
236
|
upsertSkill(registry, record);
|
|
228
237
|
}
|
|
229
238
|
if (authoredToInstall.length) await writeRegistry(registry);
|
|
230
|
-
const externalToInstall = toInstall.filter(
|
|
239
|
+
const externalToInstall = toInstall.filter(
|
|
240
|
+
(sk) => !sk.isAuthored && sk.source && !sk.source.includes(home.repo)
|
|
241
|
+
);
|
|
231
242
|
if (externalToInstall.length) {
|
|
232
243
|
const { tmpdir: td } = await import("os");
|
|
233
244
|
const { writeFile: wf } = await import("fs/promises");
|
|
@@ -235,7 +246,7 @@ async function homePullCommand(opts = {}) {
|
|
|
235
246
|
for (const sk of externalToInstall) filteredBundle.skills[sk.name] = sk.source;
|
|
236
247
|
const tmpManifest = join(td(), `augy-home-pull-manifest-${Date.now()}.json`);
|
|
237
248
|
await wf(tmpManifest, JSON.stringify(filteredBundle, null, 2) + "\n", "utf8");
|
|
238
|
-
const { syncCommand } = await import("./sync-
|
|
249
|
+
const { syncCommand } = await import("./sync-4EKWA3IM.js");
|
|
239
250
|
await syncCommand(tmpManifest, { ...opts, agent: targetAgents.map((a) => a.id) });
|
|
240
251
|
}
|
|
241
252
|
}
|
package/dist/index.js
CHANGED
|
@@ -10,66 +10,66 @@ var pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf8")
|
|
|
10
10
|
var program = new Command();
|
|
11
11
|
program.name("augy").description("Homebrew for AI agent skills \u2014 install, version, update, rollback").version(pkg.version);
|
|
12
12
|
program.command("install [url]").description("Install skills from a GitHub URL or owner/repo[/path]").option("-a, --agent <agents...>", "Target agent(s): opencode, claude, codex").action(async (url, opts) => {
|
|
13
|
-
const { installCommand } = await import("./install-
|
|
13
|
+
const { installCommand } = await import("./install-4CHE2OFV.js");
|
|
14
14
|
await installCommand(url, opts ?? {});
|
|
15
15
|
});
|
|
16
16
|
program.command("update [skill]").description("Check for upstream changes and upgrade installed skills").action(async (skill) => {
|
|
17
|
-
const { updateCommand } = await import("./update-
|
|
17
|
+
const { updateCommand } = await import("./update-GAPWQHVH.js");
|
|
18
18
|
await updateCommand(skill);
|
|
19
19
|
});
|
|
20
20
|
program.command("list").description("Show all installed skills with version + agent info").option("--json", "Output raw JSON registry").action(async (opts) => {
|
|
21
|
-
const { listCommand } = await import("./list-
|
|
21
|
+
const { listCommand } = await import("./list-3RZJGXTD.js");
|
|
22
22
|
await listCommand(opts ?? {});
|
|
23
23
|
});
|
|
24
24
|
program.command("diff <skill> [sha1] [sha2]").description(
|
|
25
25
|
"Browse file-level diffs for a skill\n augy diff <skill> installed \u2194 upstream HEAD\n augy diff <skill> <sha> installed \u2194 specific SHA (archive or GitHub)\n augy diff <skill> <sha1> <sha2> two local archives side-by-side"
|
|
26
26
|
).action(async (skill, sha1, sha2) => {
|
|
27
|
-
const { diffCommand } = await import("./diff-
|
|
27
|
+
const { diffCommand } = await import("./diff-EAGTGQYC.js");
|
|
28
28
|
await diffCommand(skill, sha1, sha2);
|
|
29
29
|
});
|
|
30
30
|
program.command("bundle").description("Write an augy.json manifest from installed skills for team sharing").option("-o, --output <path>", "Output path (default: ./augy.json)").option("--include-untracked", "Include skills without a known source").action(async (opts) => {
|
|
31
|
-
const { bundleCommand } = await import("./bundle-
|
|
31
|
+
const { bundleCommand } = await import("./bundle-ESWO4DCZ.js");
|
|
32
32
|
await bundleCommand(opts);
|
|
33
33
|
});
|
|
34
34
|
program.command("sync [path]").description("Install/update skills from an augy.json manifest (default: ./augy.json)").option("--dry-run", "Preview changes without applying them").option("-a, --agent <agents...>", "Target agent(s) (default: all detected)").action(async (path, opts) => {
|
|
35
|
-
const { syncCommand } = await import("./sync-
|
|
35
|
+
const { syncCommand } = await import("./sync-4EKWA3IM.js");
|
|
36
36
|
await syncCommand(path, opts ?? {});
|
|
37
37
|
});
|
|
38
38
|
program.command("scan").description("Find skills installed outside augy and optionally import them into the registry").action(async () => {
|
|
39
|
-
const { scanCommand } = await import("./scan-
|
|
39
|
+
const { scanCommand } = await import("./scan-YZ2PPABF.js");
|
|
40
40
|
await scanCommand();
|
|
41
41
|
});
|
|
42
42
|
program.command("info <skill>").description("Show full metadata, version history, and description for an installed skill").action(async (skill) => {
|
|
43
|
-
const { infoCommand } = await import("./info-
|
|
43
|
+
const { infoCommand } = await import("./info-7DPMSTVU.js");
|
|
44
44
|
await infoCommand(skill);
|
|
45
45
|
});
|
|
46
46
|
program.command("search [query]").description("Search all taps for available skills (optionally filter by name)").action(async (query) => {
|
|
47
|
-
const { searchCommand } = await import("./search-
|
|
47
|
+
const { searchCommand } = await import("./search-H2G7PH7R.js");
|
|
48
48
|
await searchCommand(query);
|
|
49
49
|
});
|
|
50
50
|
var tap = program.command("tap").description("Manage trusted repos (taps) for skill name resolution");
|
|
51
51
|
tap.command("add <repo>").description("Register a tap e.g. augy tap add owner/repo").option("--path <skills-dir>", "Subdirectory where skills live (default: skills)").option("--description <text>", "Optional description").action(async (repo, opts) => {
|
|
52
|
-
const { tapAddCommand } = await import("./tap-
|
|
52
|
+
const { tapAddCommand } = await import("./tap-KS57GF5M.js");
|
|
53
53
|
await tapAddCommand(repo, opts);
|
|
54
54
|
});
|
|
55
55
|
tap.command("remove <repo>").description("Unregister a tap").action(async (repo) => {
|
|
56
|
-
const { tapRemoveCommand } = await import("./tap-
|
|
56
|
+
const { tapRemoveCommand } = await import("./tap-KS57GF5M.js");
|
|
57
57
|
await tapRemoveCommand(repo);
|
|
58
58
|
});
|
|
59
59
|
tap.command("list").description("List all registered taps").action(async () => {
|
|
60
|
-
const { tapListCommand } = await import("./tap-
|
|
60
|
+
const { tapListCommand } = await import("./tap-KS57GF5M.js");
|
|
61
61
|
await tapListCommand();
|
|
62
62
|
});
|
|
63
63
|
program.command("set-source <skill> <url>").description("Attach a GitHub source URL to a skill imported without one").action(async (skill, url) => {
|
|
64
|
-
const { setSourceCommand } = await import("./set-source-
|
|
64
|
+
const { setSourceCommand } = await import("./set-source-5PSSVVZ2.js");
|
|
65
65
|
await setSourceCommand(skill, url);
|
|
66
66
|
});
|
|
67
67
|
program.command("uninstall <skill>").description("Remove a skill from all agent paths and the registry").action(async (skill) => {
|
|
68
|
-
const { uninstallCommand } = await import("./uninstall-
|
|
68
|
+
const { uninstallCommand } = await import("./uninstall-PZ5AP4MP.js");
|
|
69
69
|
await uninstallCommand(skill);
|
|
70
70
|
});
|
|
71
71
|
program.command("rollback <skill> [sha]").description("Restore a skill to a previous archived version").action(async (skill, sha) => {
|
|
72
|
-
const { rollbackCommand } = await import("./rollback-
|
|
72
|
+
const { rollbackCommand } = await import("./rollback-AZTJTYLL.js");
|
|
73
73
|
await rollbackCommand(skill, sha);
|
|
74
74
|
});
|
|
75
75
|
program.command("pin <skill>").description("Pin a skill so it is skipped during `augy update`").action(async (skill) => {
|
|
@@ -78,40 +78,57 @@ program.command("pin <skill>").description("Pin a skill so it is skipped during
|
|
|
78
78
|
program.command("unpin <skill>").description("Allow a pinned skill to receive updates again").action(async (skill) => {
|
|
79
79
|
await setPinned(skill, false);
|
|
80
80
|
});
|
|
81
|
+
var tagCmd = program.command("tag [skill] [contexts...]").description("Set or show context tags on a skill (personal / work / universal / custom)").action(async (skill, contexts) => {
|
|
82
|
+
if (!skill) {
|
|
83
|
+
tagCmd.help();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (contexts?.length) {
|
|
87
|
+
const { tagSetCommand } = await import("./tag-DAWGOKEO.js");
|
|
88
|
+
await tagSetCommand(skill, contexts);
|
|
89
|
+
} else {
|
|
90
|
+
const { tagShowCommand } = await import("./tag-DAWGOKEO.js");
|
|
91
|
+
await tagShowCommand(skill);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
program.command("tag migrate").description("Interactively assign context tags to all untagged skills").action(async () => {
|
|
95
|
+
const { tagMigrateCommand } = await import("./tag-DAWGOKEO.js");
|
|
96
|
+
await tagMigrateCommand();
|
|
97
|
+
});
|
|
81
98
|
var author = program.command("author").description("Create and edit self-authored skills");
|
|
82
99
|
author.command("new <name>").description("Scaffold a new skill and open it in $EDITOR").option("--no-edit", "Skip opening the editor after creating").action(async (name, opts) => {
|
|
83
|
-
const { authorNewCommand } = await import("./author-
|
|
100
|
+
const { authorNewCommand } = await import("./author-W7UKRDYO.js");
|
|
84
101
|
await authorNewCommand(name, { noEdit: !opts.edit });
|
|
85
102
|
});
|
|
86
103
|
author.command("edit <name>").description("Open an existing skill in $EDITOR").action(async (name) => {
|
|
87
|
-
const { authorEditCommand } = await import("./author-
|
|
104
|
+
const { authorEditCommand } = await import("./author-W7UKRDYO.js");
|
|
88
105
|
await authorEditCommand(name);
|
|
89
106
|
});
|
|
90
107
|
var home = program.command("home").description("Manage a personal GitHub repo for backing up your skills manifest");
|
|
91
108
|
home.command("set <repo>").description("Set the home repo e.g. augy home set alice/my-skills").option("--path <file>", "Manifest path within the repo (default: augy.json)").option("--skills-path <dir>", "Dir for authored skills in the repo (default: skills)").action(async (repo, opts) => {
|
|
92
|
-
const { homeSetCommand } = await import("./home-
|
|
109
|
+
const { homeSetCommand } = await import("./home-TCFEQEXO.js");
|
|
93
110
|
await homeSetCommand(repo, opts);
|
|
94
111
|
});
|
|
95
112
|
home.command("push").description("Push your installed skills manifest to the home repo").action(async () => {
|
|
96
|
-
const { homePushCommand } = await import("./home-
|
|
113
|
+
const { homePushCommand } = await import("./home-TCFEQEXO.js");
|
|
97
114
|
await homePushCommand();
|
|
98
115
|
});
|
|
99
|
-
home.command("pull").description("Fetch the manifest from the home repo and sync skills").option("--dry-run", "Preview changes without applying them").option("-a, --agent <agents...>", "Target agent(s) (default: all detected)").action(async (opts) => {
|
|
100
|
-
const { homePullCommand } = await import("./home-
|
|
116
|
+
home.command("pull").description("Fetch the manifest from the home repo and sync skills").option("--dry-run", "Preview changes without applying them").option("-a, --agent <agents...>", "Target agent(s) (default: all detected)").option("--context <ctx>", "Pre-select only skills matching this context (e.g. work, personal)").action(async (opts) => {
|
|
117
|
+
const { homePullCommand } = await import("./home-TCFEQEXO.js");
|
|
101
118
|
await homePullCommand(opts);
|
|
102
119
|
});
|
|
103
120
|
home.command("show").description("Show the current home repo configuration").action(async () => {
|
|
104
|
-
const { homeShowCommand } = await import("./home-
|
|
121
|
+
const { homeShowCommand } = await import("./home-TCFEQEXO.js");
|
|
105
122
|
await homeShowCommand();
|
|
106
123
|
});
|
|
107
124
|
program.action(async () => {
|
|
108
|
-
const { installCommand } = await import("./install-
|
|
125
|
+
const { installCommand } = await import("./install-4CHE2OFV.js");
|
|
109
126
|
await installCommand();
|
|
110
127
|
});
|
|
111
128
|
program.parse();
|
|
112
129
|
async function setPinned(skillName, pinned) {
|
|
113
130
|
const chalk = (await import("chalk")).default;
|
|
114
|
-
const { readRegistry, writeRegistry, getSkill } = await import("./registry-
|
|
131
|
+
const { readRegistry, writeRegistry, getSkill } = await import("./registry-KMUHBN75.js");
|
|
115
132
|
const registry = await readRegistry();
|
|
116
133
|
const skill = getSkill(registry, skillName);
|
|
117
134
|
if (!skill) {
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-V5GA2ZHU.js";
|
|
4
4
|
import {
|
|
5
5
|
archiveExists
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UJBZ6OAP.js";
|
|
7
7
|
import {
|
|
8
8
|
getSkill,
|
|
9
9
|
readRegistry,
|
|
10
10
|
shortSha
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IORULLX5.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/info.ts
|
|
14
14
|
import chalk from "chalk";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
filterableMultiselect
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DFZHSX3M.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveSkillFromTaps
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HKE4L4SD.js";
|
|
7
7
|
import {
|
|
8
8
|
AGENTS,
|
|
9
9
|
agentSkillPath,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
readRegistry,
|
|
21
21
|
shortSha,
|
|
22
22
|
writeRegistry
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IORULLX5.js";
|
|
24
24
|
|
|
25
25
|
// src/commands/install.ts
|
|
26
26
|
import {
|
|
@@ -13,12 +13,13 @@ import {
|
|
|
13
13
|
removeTap,
|
|
14
14
|
setHomeConfig,
|
|
15
15
|
shortSha,
|
|
16
|
+
skillMatchesContext,
|
|
16
17
|
tapKey,
|
|
17
18
|
upsertSkill,
|
|
18
19
|
versionArchivePath,
|
|
19
20
|
versionsDir,
|
|
20
21
|
writeRegistry
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IORULLX5.js";
|
|
22
23
|
export {
|
|
23
24
|
addTap,
|
|
24
25
|
augyHome,
|
|
@@ -34,6 +35,7 @@ export {
|
|
|
34
35
|
removeTap,
|
|
35
36
|
setHomeConfig,
|
|
36
37
|
shortSha,
|
|
38
|
+
skillMatchesContext,
|
|
37
39
|
tapKey,
|
|
38
40
|
upsertSkill,
|
|
39
41
|
versionArchivePath,
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
archiveExists,
|
|
7
7
|
restoreVersion
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UJBZ6OAP.js";
|
|
9
9
|
import {
|
|
10
10
|
getSkill,
|
|
11
11
|
readRegistry,
|
|
12
12
|
shortSha,
|
|
13
13
|
writeRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IORULLX5.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/rollback.ts
|
|
17
17
|
import { cancel, intro, isCancel, outro, select, spinner } from "@clack/prompts";
|
|
@@ -74,7 +74,7 @@ The snapshot may have been pruned.`
|
|
|
74
74
|
try {
|
|
75
75
|
const currentDest = destPaths[0];
|
|
76
76
|
if (currentDest) {
|
|
77
|
-
const { archiveVersion } = await import("./versions-
|
|
77
|
+
const { archiveVersion } = await import("./versions-33GF7UP5.js");
|
|
78
78
|
await archiveVersion(currentDest, nameArg, skill.sha);
|
|
79
79
|
}
|
|
80
80
|
await restoreVersion(nameArg, targetSha, destPaths);
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-KCQY4IDO.js";
|
|
5
5
|
import {
|
|
6
6
|
filterableMultiselect
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DFZHSX3M.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveSkillFromTaps
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HKE4L4SD.js";
|
|
11
11
|
import {
|
|
12
12
|
AGENTS
|
|
13
13
|
} from "./chunk-V5GA2ZHU.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
readRegistry,
|
|
23
23
|
shortSha,
|
|
24
24
|
writeRegistry
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-IORULLX5.js";
|
|
26
26
|
|
|
27
27
|
// src/commands/scan.ts
|
|
28
28
|
import { readdir, readFile } from "fs/promises";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchTaps
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HKE4L4SD.js";
|
|
4
4
|
import "./chunk-2E5SVRSR.js";
|
|
5
5
|
import {
|
|
6
6
|
listSkills,
|
|
7
7
|
readRegistry,
|
|
8
8
|
shortSha
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IORULLX5.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/search.ts
|
|
12
12
|
import { spinner } from "@clack/prompts";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getSkill,
|
|
3
|
+
listSkills,
|
|
4
|
+
readRegistry,
|
|
5
|
+
writeRegistry
|
|
6
|
+
} from "./chunk-IORULLX5.js";
|
|
7
|
+
|
|
8
|
+
// src/commands/tag.ts
|
|
9
|
+
import { intro, isCancel, multiselect, note, outro } from "@clack/prompts";
|
|
10
|
+
import chalk from "chalk";
|
|
11
|
+
var SUGGESTED_CONTEXTS = [
|
|
12
|
+
{ value: "universal", label: "universal", hint: "install on every machine" },
|
|
13
|
+
{ value: "personal", label: "personal", hint: "personal machine only" },
|
|
14
|
+
{ value: "work", label: "work", hint: "work machine only" }
|
|
15
|
+
];
|
|
16
|
+
async function tagSetCommand(skill, contexts) {
|
|
17
|
+
const registry = await readRegistry();
|
|
18
|
+
const record = getSkill(registry, skill);
|
|
19
|
+
if (!record) {
|
|
20
|
+
throw new Error(`Skill "${skill}" not found in registry.`);
|
|
21
|
+
}
|
|
22
|
+
record.contexts = contexts;
|
|
23
|
+
registry.skills[skill] = record;
|
|
24
|
+
await writeRegistry(registry);
|
|
25
|
+
const display = contexts.length ? contexts.map((c) => chalk.cyan(c)).join(chalk.dim(", ")) : chalk.dim("(none \u2014 treated as universal)");
|
|
26
|
+
console.log(`${chalk.cyan(skill)} contexts: ${display}`);
|
|
27
|
+
}
|
|
28
|
+
async function tagShowCommand(skill) {
|
|
29
|
+
const registry = await readRegistry();
|
|
30
|
+
const record = getSkill(registry, skill);
|
|
31
|
+
if (!record) {
|
|
32
|
+
throw new Error(`Skill "${skill}" not found in registry.`);
|
|
33
|
+
}
|
|
34
|
+
const contexts = record.contexts ?? [];
|
|
35
|
+
const display = contexts.length ? contexts.map((c) => chalk.cyan(c)).join(chalk.dim(", ")) : chalk.dim("none (treated as universal)");
|
|
36
|
+
console.log(`${chalk.bold(skill)} ${display}`);
|
|
37
|
+
}
|
|
38
|
+
async function tagMigrateCommand() {
|
|
39
|
+
intro(chalk.bold("augy") + chalk.dim(" \u2014 tag migrate"));
|
|
40
|
+
const registry = await readRegistry();
|
|
41
|
+
const all = listSkills(registry);
|
|
42
|
+
const untagged = all.filter((s) => !s.contexts || s.contexts.length === 0);
|
|
43
|
+
if (!untagged.length) {
|
|
44
|
+
outro(chalk.green("All skills already have context tags."));
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
console.log(
|
|
48
|
+
chalk.dim(`
|
|
49
|
+
${all.length - untagged.length} skill(s) already tagged \xB7 `) + chalk.bold(String(untagged.length)) + chalk.dim(" to tag\n")
|
|
50
|
+
);
|
|
51
|
+
let tagged = 0;
|
|
52
|
+
for (const skill of untagged) {
|
|
53
|
+
const sourceHint = skill.source ? chalk.dim(skill.source) : chalk.dim("authored (no external source)");
|
|
54
|
+
note(
|
|
55
|
+
`${chalk.bold(skill.name)}
|
|
56
|
+
${sourceHint}`,
|
|
57
|
+
"Tag this skill"
|
|
58
|
+
);
|
|
59
|
+
const result = await multiselect({
|
|
60
|
+
message: `Contexts for ${chalk.cyan(skill.name)}?`,
|
|
61
|
+
options: SUGGESTED_CONTEXTS,
|
|
62
|
+
required: false
|
|
63
|
+
});
|
|
64
|
+
if (isCancel(result)) {
|
|
65
|
+
console.log(chalk.dim("\nMigration paused \u2014 progress saved."));
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
skill.contexts = result;
|
|
69
|
+
registry.skills[skill.name] = skill;
|
|
70
|
+
await writeRegistry(registry);
|
|
71
|
+
tagged++;
|
|
72
|
+
const display = result.length ? result.map((c) => chalk.cyan(c)).join(chalk.dim(", ")) : chalk.dim("(universal)");
|
|
73
|
+
console.log(` ${chalk.green("\u2713")} ${chalk.bold(skill.name)} ${display}`);
|
|
74
|
+
}
|
|
75
|
+
outro(chalk.green(`${tagged} skill(s) tagged.`) + chalk.dim("\n Run `augy home push` to save contexts to your home repo."));
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
tagMigrateCommand,
|
|
79
|
+
tagSetCommand,
|
|
80
|
+
tagShowCommand
|
|
81
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseTapArg,
|
|
3
3
|
tapSource
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HKE4L4SD.js";
|
|
5
5
|
import {
|
|
6
6
|
discoverSkills,
|
|
7
7
|
parseGitHubUrl
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
removeTap,
|
|
14
14
|
tapKey,
|
|
15
15
|
writeRegistry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IORULLX5.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/tap.ts
|
|
19
19
|
import { cancel, confirm, intro, isCancel, outro, spinner, text } from "@clack/prompts";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pruneVersions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UJBZ6OAP.js";
|
|
4
4
|
import {
|
|
5
5
|
getSkill,
|
|
6
6
|
readRegistry,
|
|
7
7
|
removeSkill,
|
|
8
8
|
versionsDir,
|
|
9
9
|
writeRegistry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IORULLX5.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/uninstall.ts
|
|
13
13
|
import { cancel, confirm, intro, isCancel, outro, spinner } from "@clack/prompts";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-2E5SVRSR.js";
|
|
10
10
|
import {
|
|
11
11
|
archiveVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UJBZ6OAP.js";
|
|
13
13
|
import {
|
|
14
14
|
listSkills,
|
|
15
15
|
readRegistry,
|
|
16
16
|
shortSha,
|
|
17
17
|
writeRegistry
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IORULLX5.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/update.ts
|
|
21
21
|
import { cancel, confirm, intro, isCancel, multiselect, outro, spinner } from "@clack/prompts";
|