@pushary/agent-hooks 0.72.0 → 0.73.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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.73.0
4
+
5
+ ### Codex could finish setup with no skill installed
6
+
7
+ If your machine already uses skills.sh, setup installs the Pushary skill
8
+ through that CLI so the install registers rather than being invisible. For
9
+ Codex, `skills add --agent codex` prints "copy to Codex", says "Installation
10
+ complete" and exits 0, then writes only `~/.agents/skills/pushary`. Nothing
11
+ lands in `~/.codex/skills`, which is where Codex reads. Setup took the exit
12
+ code as proof, skipped the copy it ships, and Codex ended up with no skill.
13
+
14
+ Doctor caught it, and then gave advice that could not work: clean and set up
15
+ again reinstalled exactly the same way and failed the same check.
16
+
17
+ The exit code no longer decides this. What decides it is whether the run left
18
+ a SKILL.md where that agent reads, which is the same thing doctor looks at,
19
+ and setup writes its own copy when it did not. Anything skills.sh really did
20
+ install is left exactly as it installed it, symlinks included.
21
+
22
+ Everything else about the wiring was fine, so this cost you the skill and
23
+ nothing more. Approvals, hooks and the instructions in `~/.codex/AGENTS.md`
24
+ were all in place.
25
+
26
+ ### A skill that will not install no longer stops setup
27
+
28
+ The skill is the one piece of the wiring nothing else depends on. It used to
29
+ be able to abort setup partway, leaving an agent half configured. Now it warns
30
+ and setup finishes the rest, and `pushary doctor` tells you the skill is
31
+ missing.
32
+
3
33
  ## 0.72.0
4
34
 
5
35
  ### Setup tells you when Codex was already quarantined
@@ -294,6 +294,17 @@ var installSkillViaSkillsCli = (agent) => {
294
294
  return false;
295
295
  }
296
296
  };
297
+ var installAgentSkill = async (request, effects) => {
298
+ if (request.skillsCliInUse) {
299
+ const startedAt = effects.now();
300
+ if (effects.runSkillsCli(request.agent)) {
301
+ const modifiedAt = effects.skillModifiedAt(request.agentSkillDir);
302
+ if (modifiedAt !== null && modifiedAt >= startedAt) return "skills-cli";
303
+ }
304
+ }
305
+ await effects.writePackagedSkill(request.agentSkillDir);
306
+ return "packaged-copy";
307
+ };
297
308
 
298
309
  // src/setup/telemetry.ts
299
310
  var currentStep = "start";
@@ -607,14 +618,22 @@ var fetchSkillContent = async () => {
607
618
  _cachedSkillContent = readFileSync(source, "utf-8");
608
619
  return _cachedSkillContent;
609
620
  };
621
+ var writePackagedSkill = async (dir) => {
622
+ const content = await fetchSkillContent();
623
+ if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
624
+ writeFileSync(join2(dir, "SKILL.md"), content, "utf-8");
625
+ };
610
626
  var skillsCliInUse = () => isInstalled("skills") || existsSync(join2(homedir(), ".agents", "skills"));
611
- var installSkill = async (agent, fallbackDir) => {
627
+ var skillInstallEffects = {
628
+ runSkillsCli: installSkillViaSkillsCli,
629
+ skillModifiedAt: (dir) => statSync(join2(dir, "SKILL.md"), { throwIfNoEntry: false })?.mtimeMs ?? null,
630
+ writePackagedSkill,
631
+ now: () => Date.now()
632
+ };
633
+ var installSkill = async (agent, agentSkillDir) => {
612
634
  await spinner("Installing Pushary skill", async () => {
613
- if (skillsCliInUse() && installSkillViaSkillsCli(agent)) return;
614
- const content = await fetchSkillContent();
615
- if (!existsSync(fallbackDir)) mkdirSync(fallbackDir, { recursive: true });
616
- writeFileSync(join2(fallbackDir, "SKILL.md"), content, "utf-8");
617
- });
635
+ await installAgentSkill({ agent, agentSkillDir, skillsCliInUse: skillsCliInUse() }, skillInstallEffects);
636
+ }, { optional: true });
618
637
  };
619
638
  var setupClaudeCode = async (apiKey) => {
620
639
  console.log(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushary/agent-hooks",
3
- "version": "0.72.0",
3
+ "version": "0.73.0",
4
4
  "description": "Permission hooks for AI coding agents: route tool approvals through Pushary push notifications",
5
5
  "keywords": [
6
6
  "pushary",