yt-briefing 0.14.0 → 0.14.1

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/README.md CHANGED
@@ -148,7 +148,7 @@ valid JSON the installer leaves it alone and says so — add the entry yourself:
148
148
  "hooks": {
149
149
  "PreToolUse": [
150
150
  { "matcher": "AskUserQuestion",
151
- "hooks": [ { "type": "command", "command": "node \"node_modules/yt-briefing/dist/yt-summary-gate.js\"" } ] }
151
+ "hooks": [ { "type": "command", "command": "node \"${CLAUDE_PROJECT_DIR}/node_modules/yt-briefing/dist/yt-summary-gate.js\"" } ] }
152
152
  ]
153
153
  }
154
154
  }
@@ -107,9 +107,16 @@ export function installSkills(root, dist = false) {
107
107
  export const CLAUDE_CODE = '1';
108
108
  /** Substring identifying our gate inside a settings.json hook command (used to update in place). */
109
109
  const GATE_ID = 'yt-summary-gate';
110
- /** How settings.json must invoke the gate — same portable form as the skill's engine commands. */
110
+ /**
111
+ * How settings.json must invoke the gate. Like the skill's engine commands it bakes nothing
112
+ * machine-absolute, but a hook may NOT assume its cwd — Claude Code's hooks reference states the
113
+ * working directory can vary, so a bare relative path would fail open, silently and invisibly
114
+ * (the popup appears ungated, which is exactly the bug the gate exists to catch). Hence the
115
+ * `$CLAUDE_PROJECT_DIR` prefix: still just a placeholder string in the committed JSON, resolved
116
+ * to the project root at hook time.
117
+ */
111
118
  export const gateCommand = (dist = false) => dist
112
- ? `${isBun ? 'bun' : 'node'} "${toProjectRel(join(DIST_DIR, GATE_ID + '.js'))}"`
119
+ ? `${isBun ? 'bun' : 'node'} "\${CLAUDE_PROJECT_DIR}/${toProjectRel(join(DIST_DIR, GATE_ID + '.js'))}"`
113
120
  : `bun run src/${GATE_ID}.ts`;
114
121
  /**
115
122
  * Put the gate into a settings object: a PreToolUse hook on AskUserQuestion. Merges — every other
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-briefing",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "A self-learning YouTube briefing engine: it sweeps the channels you follow, filters noise in two stages (title, then transcript), summarizes the rest in your language, and adapts to your ratings — one video at a time.",
5
5
  "type": "module",
6
6
  "bin": {