@yemi33/minions 0.1.1620 → 0.1.1621

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1621 (2026-04-29)
4
+
5
+ ### Features
6
+ - harden action block parsing (#1863)
7
+
3
8
  ## 0.1.1620 (2026-04-29)
4
9
 
5
10
  ### Features
package/dashboard.js CHANGED
@@ -766,6 +766,11 @@ For all state files, look under \`${MINIONS_DIR}\`.`;
766
766
  return result;
767
767
  }
768
768
 
769
+ function findCCActionsDelimiter(text) {
770
+ const header = findCCActionsHeader(text);
771
+ return header && header.parseable ? header.index : -1;
772
+ }
773
+
769
774
  // Single helper that handles both the strict (well-formed) and loose forms of
770
775
  // the ===ACTIONS=== delimiter. `parseable` is true only for the strict form
771
776
  // that parseCCActions can JSON.parse; loose matches still split display text
@@ -783,9 +788,9 @@ function findCCActionsHeader(text) {
783
788
  parseable: true,
784
789
  };
785
790
  }
786
- // Loose: any ===ACTIONS<word-boundary>... line. Catches malformed delimiters
787
- // like ===ACTIONS -> that should still be hidden from output.
788
- const loose = /(?:^|\r?\n)===ACTIONS\b[^\r\n]*(?=\r?\n|$)/m.exec(text);
791
+ // Loose: sentinel-looking malformed delimiters such as ===ACTIONS -> should
792
+ // still be hidden, but prose like "===ACTIONS are documented" must render.
793
+ const loose = /(?:^|\r?\n)===ACTIONS(?:[ \t]*(?:[-=]>?|={1,}|$)|[^A-Za-z0-9_\s\r\n][^\r\n]*)(?=\r?\n|$)/m.exec(text);
789
794
  if (loose) {
790
795
  const headerStart = loose.index + loose[0].indexOf('===ACTIONS');
791
796
  return { index: headerStart, headerLength: 0, parseable: false };
@@ -816,6 +821,15 @@ function stripCCActionsForStream(text) {
816
821
  return text;
817
822
  }
818
823
 
824
+ function stripCCActionsForDisplay(text) {
825
+ if (!text) return '';
826
+ const header = findCCActionsHeader(text);
827
+ if (header) return text.slice(0, header.index).trim();
828
+ const partialIdx = findCCActionsPartialDelimiter(text);
829
+ if (partialIdx >= 0) return text.slice(0, partialIdx).trimEnd();
830
+ return text;
831
+ }
832
+
819
833
  // Issue #1834: non-Claude runtimes (Copilot/GPT) routinely wrap the action JSON
820
834
  // in ```json fences or append trailing prose ("Let me know if that helps!").
821
835
  // JSON.parse on the raw segment fails silently → actions dropped, user sees
@@ -861,7 +875,7 @@ function _extractActionsJson(segment) {
861
875
 
862
876
  function parseCCActions(text) {
863
877
  let actions = [];
864
- let displayText = text;
878
+ let displayText = stripCCActionsForDisplay(text);
865
879
  let parseError = null;
866
880
  const header = findCCActionsHeader(text);
867
881
  let segment = '';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "runtime": "copilot",
3
3
  "models": null,
4
- "cachedAt": "2026-04-29T04:06:55.678Z"
4
+ "cachedAt": "2026-04-29T11:01:36.483Z"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1620",
3
+ "version": "0.1.1621",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"