trackfw 7.2.0 → 7.3.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.
@@ -94,7 +94,18 @@ function silenceConsole(fn) {
94
94
  * - `missing` (nothing present under any of `relPaths`) never triggers
95
95
  * `apply` unless `installMissing` is true.
96
96
  */
97
- function runFileTarget({ id, path: displayPath, root, relPaths, apply, dryRun, installMissing }) {
97
+ // runFileTarget — computes updated/skipped/missing/failed for a target whose
98
+ // only observable effect is writing under a fixed set of paths (files or
99
+ // directories) relative to `root`, by diffing content hashes before/after
100
+ // invoking `apply(root)`.
101
+ //
102
+ // `seeds` (optional) — extra paths copied into the dry-run sandbox but NOT
103
+ // included in the hash comparison. Used for:
104
+ // - trackfw.yaml: agent-rules reads it for agent_conventions (Gap E)
105
+ // - detection signals for agent-hooks: .windsurfrules, .github/copilot-
106
+ // instructions.md, etc. — InjectHooksDetected checks these to decide
107
+ // which hooks to write; absent → hooks silently omitted (Gap C)
108
+ function runFileTarget({ id, path: displayPath, root, relPaths, seeds = [], apply, dryRun, installMissing }) {
98
109
  const before = relPaths.map(rel => hashPath(path.join(root, rel)))
99
110
  const allMissingBefore = before.every(h => h === null)
100
111
 
@@ -108,6 +119,7 @@ function runFileTarget({ id, path: displayPath, root, relPaths, apply, dryRun, i
108
119
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'trackfw-update-'))
109
120
  try {
110
121
  for (const rel of relPaths) copyPath(path.join(root, rel), path.join(tmp, rel))
122
+ for (const rel of seeds) copyPath(path.join(root, rel), path.join(tmp, rel))
111
123
  silenceConsole(() => apply(tmp))
112
124
  after = relPaths.map(rel => hashPath(path.join(tmp, rel)))
113
125
  } finally {