@iceinvein/agent-skills 0.18.1 → 0.18.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.
package/dist/cli/index.js CHANGED
@@ -468,6 +468,7 @@ async function wireSessionStartHook(settingsPath, skillName, directive, scriptPa
468
468
  const legacy = `echo ${shq(directive)}`;
469
469
  let adopted = false;
470
470
  let custom = false;
471
+ let customRunsScript = false;
471
472
  let changed = false;
472
473
  for (const group of settings.hooks.SessionStart) {
473
474
  const kept = [];
@@ -479,6 +480,8 @@ async function wireSessionStartHook(settingsPath, skillName, directive, scriptPa
479
480
  const plain = hook.skill !== undefined || hook.command === legacy;
480
481
  if (!plain) {
481
482
  custom = true;
483
+ if (scriptPath && hook.command?.includes(scriptPath))
484
+ customRunsScript = true;
482
485
  kept.push(hook);
483
486
  continue;
484
487
  }
@@ -499,7 +502,7 @@ async function wireSessionStartHook(settingsPath, skillName, directive, scriptPa
499
502
  }
500
503
  settings.hooks.SessionStart = settings.hooks.SessionStart.filter((group) => !group.hooks || group.hooks.length > 0);
501
504
  if (adopted || custom) {
502
- if (custom && !adopted && scriptPath) {
505
+ if (custom && !adopted && scriptPath && !customRunsScript) {
503
506
  console.warn(`${skillName}: a hand-edited SessionStart hook already carries its directive, so it was left as is and ${scriptPath} was not wired; add it to that entry yourself if you want it.`);
504
507
  }
505
508
  if (changed) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iceinvein/agent-skills",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "Install agent skills into AI coding tools",
5
5
  "author": "iceinvein",
6
6
  "license": "MIT",
package/skills/index.json CHANGED
@@ -283,7 +283,7 @@
283
283
  "name": "sluice",
284
284
  "description": "Routes work by change shape into four channels (bypass, fast, main, deep) and applies only the rules each channel needs, so a one-line fix does not pay the cost of a multi-subsystem build. Carries seven rules as one-liners in the router and the full treatment in references read only on friction. Checks the finished plan with plan.sh validate rather than trusting it to memory, seeds the run state from it, keeps a deep run's task breakdown in .sluice/run.json so a statusline segment, one status command and a SessionStart hook can answer where the run is (the hook prints a live run at every session start, compaction included), and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what each dispatched agent cost where the transcript recorded it. Claude Code only; stands down where the superpowers pipeline governs the repo.",
285
285
  "type": "prompt",
286
- "version": "0.19.1"
286
+ "version": "0.19.2"
287
287
  },
288
288
  {
289
289
  "name": "temporal-coupling-detector",
@@ -31,6 +31,52 @@ CONFIGURED="$(jq -r '.statusLine.command // empty' "$SETTINGS" 2>/dev/null || tr
31
31
  [ -n "$CONFIGURED" ] || exit 0
32
32
 
33
33
  RENDER="$(cd "$(dirname "$RENDER")" && pwd)/$(basename "$RENDER")"
34
+ # Physical, and so is every candidate below it: a tmpdir or a home reached
35
+ # through a symlink resolves one way from here and the other way out of a
36
+ # settings string, and the containment check below compares the two.
37
+ CONFIG="$(cd "$BUNDLE/../.." && pwd -P)"
38
+
39
+ # Someone who pasted the two lines a release ago has nothing left to do, and
40
+ # saying it again on every update is the one thing they cannot switch off. So
41
+ # the script the slot runs is read before anything is printed.
42
+ #
43
+ # It is recovered rather than known: settings.json holds a shell command, so
44
+ # every token carrying a slash is tried as a path, with the two variables a
45
+ # config path is ever written through expanded by substitution. Not by eval,
46
+ # which on a settings file means running its contents. A token that resolves to
47
+ # nothing is skipped and the instructions print as they did before, so a command
48
+ # this cannot read costs a notice rather than a wrong silence.
49
+ #
50
+ # Only paths inside the config directory this skill installed into are opened.
51
+ # The slot is someone elses shell string and may name anything; a postinstall
52
+ # that followed it wherever it pointed would be reading arbitrary files off a
53
+ # line it does not control.
54
+ statusline_script() {
55
+ local tok path dir
56
+ for tok in $(printf '%s' "$1" | tr -s "\"'| \t" '\n'); do
57
+ case "$tok" in */*) ;; *) continue ;; esac
58
+ path="$tok"
59
+ path="${path//\$\{CLAUDE_CONFIG_DIR:-\$HOME\/.claude\}/$CONFIG}"
60
+ path="${path//\$\{CLAUDE_CONFIG_DIR\}/$CONFIG}"
61
+ path="${path//\$CLAUDE_CONFIG_DIR/$CONFIG}"
62
+ path="${path//\$\{HOME\}/$HOME}"
63
+ path="${path//\$HOME/$HOME}"
64
+ case "$path" in "~/"*) path="$HOME/${path#\~/}" ;; esac
65
+ [ -f "$path" ] || continue
66
+ dir="$(cd "$(dirname "$path")" 2>/dev/null && pwd -P)"
67
+ [ -n "$dir" ] || continue
68
+ path="$dir/$(basename "$path")"
69
+ case "$path" in "$CONFIG"/*) ;; *) continue ;; esac
70
+ printf '%s\n' "$path"
71
+ return 0
72
+ done
73
+ return 1
74
+ }
75
+
76
+ SLOT_SCRIPT="$(statusline_script "$CONFIGURED" || true)"
77
+ if [ -n "$SLOT_SCRIPT" ] && grep -q "skills/sluice/scripts/statusline.sh" "$SLOT_SCRIPT" 2>/dev/null; then
78
+ exit 0
79
+ fi
34
80
 
35
81
  # The slot points at the bundled command: the install claimed it and there is
36
82
  # nothing for anyone to paste. Say so rather than print instructions that would
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sluice",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
4
4
  "description": "Routes work by change shape into four channels (bypass, fast, main, deep) and applies only the rules each channel needs, so a one-line fix does not pay the cost of a multi-subsystem build. Carries seven rules as one-liners in the router and the full treatment in references read only on friction. Checks the finished plan with plan.sh validate rather than trusting it to memory, seeds the run state from it, keeps a deep run's task breakdown in .sluice/run.json so a statusline segment, one status command and a SessionStart hook can answer where the run is (the hook prints a live run at every session start, compaction included), and closes each run with a ledger read out of the session transcript: elapsed, tools, tokens, and what each dispatched agent cost where the transcript recorded it. Claude Code only; stands down where the superpowers pipeline governs the repo.",
5
5
  "author": "iceinvein",
6
6
  "type": "prompt",