@callmeradical/augy 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,6 +116,10 @@ async function homePushCommand() {
116
116
  for (const skill of authored) {
117
117
  bundle.skills[skill.name] = "";
118
118
  }
119
+ const contextEntries = allSkills.filter((s3) => s3.contexts && s3.contexts.length > 0).map((s3) => [s3.name, s3.contexts]);
120
+ if (contextEntries.length) {
121
+ bundle.contexts = Object.fromEntries(contextEntries);
122
+ }
119
123
  await writeFile(
120
124
  join(cloneDir, home.path),
121
125
  JSON.stringify(bundle, null, 2) + "\n",
@@ -126,12 +130,24 @@ async function homePushCommand() {
126
130
  await gitAddAll(cloneDir);
127
131
  const skillCount = allSkills.length;
128
132
  const authoredNote = authored.length ? ` (${authored.length} authored)` : "";
129
- await gitCommit(cloneDir, `chore: update skills via augy \u2014 ${skillCount} skill(s)${authoredNote}`);
130
- await gitPush(cloneDir);
133
+ let pushed = false;
134
+ try {
135
+ await gitCommit(cloneDir, `chore: update skills via augy \u2014 ${skillCount} skill(s)${authoredNote}`);
136
+ await gitPush(cloneDir);
137
+ pushed = true;
138
+ s2.stop(`${chalk.green("\u2713")} Pushed`);
139
+ } catch (err) {
140
+ const msg = String(err);
141
+ if (msg.includes("nothing to commit") || msg.includes("nothing added to commit")) {
142
+ s2.stop(chalk.dim("Nothing changed \u2014 home repo is already up to date"));
143
+ } else {
144
+ s2.stop(chalk.red("\u2717 Push failed"));
145
+ throw err;
146
+ }
147
+ }
131
148
  outro(
132
- `${chalk.bold(String(skillCount))} skill(s) saved to ${chalk.cyan(home.repo)}
133
- ` + (authored.length ? chalk.dim(` ${authored.length} authored skill(s) committed + source registered
134
- `) : "") + chalk.dim(` Run \`augy home pull\` on a new machine to restore.`)
149
+ pushed ? `${chalk.bold(String(skillCount))} skill(s) saved to ${chalk.cyan(home.repo)}
150
+ ` + chalk.dim(` Run \`augy home pull\` on a new machine to restore.`) : chalk.dim("Home repo is up to date \u2014 no changes to push.")
135
151
  );
136
152
  }
137
153
  async function homePullCommand(opts = {}) {
@@ -155,10 +171,12 @@ async function homePullCommand(opts = {}) {
155
171
  if (e.isDirectory()) available.push({ name: e.name, source: "", isAuthored: true });
156
172
  }
157
173
  }
174
+ let bundleContexts = {};
158
175
  const manifestPath = join(cloneDir, home.path);
159
176
  if (existsSync(manifestPath)) {
160
177
  const { readFile } = await import("fs/promises");
161
178
  const bundle = JSON.parse(await readFile(manifestPath, "utf8"));
179
+ bundleContexts = bundle.contexts ?? {};
162
180
  for (const [name, source] of Object.entries(bundle.skills)) {
163
181
  if (source && !available.find((s2) => s2.name === name)) {
164
182
  available.push({ name, source, isAuthored: false });
@@ -173,8 +191,7 @@ async function homePullCommand(opts = {}) {
173
191
  const selected = await filterableMultiselect({
174
192
  message: `Select skills to install ${chalk.dim(`(${available.length} available)`)}`,
175
193
  options: available.map((sk) => {
176
- const record = currentRegistry.skills[sk.name];
177
- const contexts = record?.contexts ?? [];
194
+ const contexts = bundleContexts[sk.name] ?? currentRegistry.skills[sk.name]?.contexts ?? [];
178
195
  const matches = skillMatchesContext(contexts, opts.context);
179
196
  const ctxHint = contexts.length ? chalk.dim(contexts.join(", ")) : "";
180
197
  const srcHint = sk.isAuthored ? chalk.dim("authored") : chalk.dim(sk.source);
@@ -233,6 +250,7 @@ async function homePullCommand(opts = {}) {
233
250
  agentIds: targetAgents.map((a) => a.id),
234
251
  agentPaths
235
252
  });
253
+ if (bundleContexts[sk.name]) record.contexts = bundleContexts[sk.name];
236
254
  upsertSkill(registry, record);
237
255
  }
238
256
  if (authoredToInstall.length) await writeRegistry(registry);
package/dist/index.js CHANGED
@@ -78,20 +78,16 @@ 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
- }
81
+ var tag = program.command("tag").description("Manage skill context tags (personal / work / universal / custom)");
82
+ tag.command("set <skill> [contexts...]").description("Set context tags on a skill e.g. augy tag set tdd work universal").action(async (skill, contexts) => {
83
+ const { tagSetCommand } = await import("./tag-DAWGOKEO.js");
84
+ await tagSetCommand(skill, contexts ?? []);
85
+ });
86
+ tag.command("show <skill>").description("Show current context tags for a skill").action(async (skill) => {
87
+ const { tagShowCommand } = await import("./tag-DAWGOKEO.js");
88
+ await tagShowCommand(skill);
93
89
  });
94
- program.command("tag migrate").description("Interactively assign context tags to all untagged skills").action(async () => {
90
+ tag.command("migrate").description("Interactively assign context tags to all untagged skills").action(async () => {
95
91
  const { tagMigrateCommand } = await import("./tag-DAWGOKEO.js");
96
92
  await tagMigrateCommand();
97
93
  });
@@ -106,19 +102,19 @@ author.command("edit <name>").description("Open an existing skill in $EDITOR").a
106
102
  });
107
103
  var home = program.command("home").description("Manage a personal GitHub repo for backing up your skills manifest");
108
104
  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) => {
109
- const { homeSetCommand } = await import("./home-TCFEQEXO.js");
105
+ const { homeSetCommand } = await import("./home-PGOEFTIJ.js");
110
106
  await homeSetCommand(repo, opts);
111
107
  });
112
108
  home.command("push").description("Push your installed skills manifest to the home repo").action(async () => {
113
- const { homePushCommand } = await import("./home-TCFEQEXO.js");
109
+ const { homePushCommand } = await import("./home-PGOEFTIJ.js");
114
110
  await homePushCommand();
115
111
  });
116
112
  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");
113
+ const { homePullCommand } = await import("./home-PGOEFTIJ.js");
118
114
  await homePullCommand(opts);
119
115
  });
120
116
  home.command("show").description("Show the current home repo configuration").action(async () => {
121
- const { homeShowCommand } = await import("./home-TCFEQEXO.js");
117
+ const { homeShowCommand } = await import("./home-PGOEFTIJ.js");
122
118
  await homeShowCommand();
123
119
  });
124
120
  program.action(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@callmeradical/augy",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Homebrew for AI agent skills — install, version, update, rollback",
5
5
  "type": "module",
6
6
  "license": "MIT",