@groundtrack/hooks 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/dist/doctor.js +2 -4
  2. package/package.json +1 -1
package/dist/doctor.js CHANGED
@@ -267,14 +267,12 @@ function removeLegacyAgentInstructions(content) {
267
267
  return lines.join("\n");
268
268
  }
269
269
  function upsertManagedContent(content, desired, migrateLegacyAgentInstructions = false) {
270
- const existing = migrateLegacyAgentInstructions
271
- ? removeLegacyAgentInstructions(content ?? "")
272
- : (content ?? "");
270
+ const existing = content ?? "";
273
271
  const managed = /<!-- groundtrack:start version=\d+ -->[\s\S]*?<!-- groundtrack:end -->/;
274
272
  if (managed.test(existing)) {
275
273
  return `${existing.replace(managed, desired).trimEnd()}\n`;
276
274
  }
277
- const base = existing.trimEnd();
275
+ const base = (migrateLegacyAgentInstructions ? removeLegacyAgentInstructions(existing) : existing).trimEnd();
278
276
  return `${base}${base ? "\n\n" : ""}${desired}\n`;
279
277
  }
280
278
  function versionParts(version) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundtrack/hooks",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Lifecycle hook utilities for Groundtrack MCP clients.",
5
5
  "keywords": [
6
6
  "claude-code",