@agent-facets/adapter-claude-code 0.4.3 → 0.4.4

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/index.mjs +12 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -6655,6 +6655,17 @@ const FRONT_MATTER_RE = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/;
6655
6655
  * Assemble a full file string from optional front-matter metadata + body.
6656
6656
  * When `body` already contains a front-matter block, the two are merged
6657
6657
  * (`metadata` wins on key collision) so external keys on the body survive.
6658
+ *
6659
+ * The output is exactly `---\n<yaml>\n---\n<body>` — no separator newline
6660
+ * between the closing fence and the body. This is the inverse of
6661
+ * `splitAssetContent`'s regex (which consumes one `\n` after `---`), so
6662
+ * `assemble → write → read → split` is byte-stable.
6663
+ *
6664
+ * Earlier versions inserted a cosmetic blank line between the fence and
6665
+ * the body; that asymmetry caused materialize's skip-if-identical check
6666
+ * to see phantom drift on every re-install (`# body` going in, `\n# body`
6667
+ * coming out). Tests in this file's "round-trip" describe block enforce
6668
+ * the inverse contract explicitly.
6658
6669
  */
6659
6670
  function assembleAssetContent(body, metadata) {
6660
6671
  const existing = splitAssetContent(body);
@@ -6664,7 +6675,7 @@ function assembleAssetContent(body, metadata) {
6664
6675
  };
6665
6676
  const bodyOnly = existing.content;
6666
6677
  if (Object.keys(merged).length === 0) return bodyOnly;
6667
- return `---\n${(0, import_dist.stringify)(merged).trimEnd()}\n---\n${bodyOnly.length === 0 || bodyOnly.startsWith("\n") ? "" : "\n"}${bodyOnly}`;
6678
+ return `---\n${(0, import_dist.stringify)(merged).trimEnd()}\n---\n${bodyOnly}`;
6668
6679
  }
6669
6680
  /**
6670
6681
  * Parse a file string into its body + parsed front-matter metadata. Returns
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/agent-facets/facets",
6
6
  "directory": "packages/adapters/claude-code"
7
7
  },
8
- "version": "0.4.3",
8
+ "version": "0.4.4",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"