@annals/agent-mesh 0.16.4 → 0.16.5

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.js +23 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3676,8 +3676,21 @@ function parseSkillMd(raw) {
3676
3676
  const frontmatter = {};
3677
3677
  let currentKey = null;
3678
3678
  let currentArray = null;
3679
- for (const line of yamlBlock.split("\n")) {
3679
+ let currentMultiline = null;
3680
+ const lines = yamlBlock.split("\n");
3681
+ for (let i = 0; i < lines.length; i++) {
3682
+ const line = lines[i];
3680
3683
  const trimLine = line.trim();
3684
+ if (currentKey && currentMultiline) {
3685
+ if (line.match(/^[ ]{2,}/) && (trimLine || currentMultiline.lines.length > 0)) {
3686
+ currentMultiline.lines.push(trimLine);
3687
+ continue;
3688
+ }
3689
+ const joined = currentMultiline.style === "|" ? currentMultiline.lines.join("\n") : currentMultiline.lines.join(" ");
3690
+ frontmatter[currentKey] = joined.trim();
3691
+ currentKey = null;
3692
+ currentMultiline = null;
3693
+ }
3681
3694
  if (!trimLine || trimLine.startsWith("#")) continue;
3682
3695
  if (trimLine.startsWith("- ") && currentKey && currentArray) {
3683
3696
  currentArray.push(trimLine.slice(2).trim().replace(/^["']|["']$/g, ""));
@@ -3697,6 +3710,11 @@ function parseSkillMd(raw) {
3697
3710
  currentArray = [];
3698
3711
  continue;
3699
3712
  }
3713
+ if (rawVal === "|" || rawVal === ">") {
3714
+ currentKey = key;
3715
+ currentMultiline = { style: rawVal, lines: [] };
3716
+ continue;
3717
+ }
3700
3718
  if (rawVal.startsWith("[") && rawVal.endsWith("]")) {
3701
3719
  frontmatter[key] = rawVal.slice(1, -1).split(",").map((s) => s.trim().replace(/^["']|["']$/g, "")).filter(Boolean);
3702
3720
  continue;
@@ -3715,6 +3733,10 @@ function parseSkillMd(raw) {
3715
3733
  }
3716
3734
  frontmatter[key] = rawVal.replace(/^["']|["']$/g, "");
3717
3735
  }
3736
+ if (currentKey && currentMultiline) {
3737
+ const joined = currentMultiline.style === "|" ? currentMultiline.lines.join("\n") : currentMultiline.lines.join(" ");
3738
+ frontmatter[currentKey] = joined.trim();
3739
+ }
3718
3740
  if (currentKey && currentArray) {
3719
3741
  frontmatter[currentKey] = currentArray;
3720
3742
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annals/agent-mesh",
3
- "version": "0.16.4",
3
+ "version": "0.16.5",
4
4
  "description": "CLI bridge connecting local AI agents to the Agents.Hot platform",
5
5
  "type": "module",
6
6
  "bin": {