@agentsmarket/pipeline-runtime 0.1.10 → 0.1.12

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/stages.js +14 -1
  2. package/package.json +1 -1
package/dist/stages.js CHANGED
@@ -85,7 +85,7 @@ export function parseUsesList(stage) {
85
85
  return [];
86
86
  }
87
87
  function getPath(obj, dotted) {
88
- const parts = dotted.split('.');
88
+ const parts = dotted.match(/[^.\[]+|\[\*\]/g)?.map((p) => (p === '[*]' ? '*' : p)) ?? [];
89
89
  let cursor = obj;
90
90
  for (let i = 0; i < parts.length; i++) {
91
91
  if (cursor == null)
@@ -94,6 +94,19 @@ function getPath(obj, dotted) {
94
94
  return { found: false, reason: `expected object at segment '${parts[i]}', got ${typeof cursor}` };
95
95
  }
96
96
  const key = parts[i];
97
+ if (key === '*') {
98
+ if (!Array.isArray(cursor)) {
99
+ return { found: false, reason: `expected array at segment '${parts[i - 1]}' for wildcard, got ${typeof cursor}` };
100
+ }
101
+ const restPath = parts.slice(i + 1).join('.');
102
+ for (let j = 0; j < cursor.length; j++) {
103
+ const itemResult = getPath(cursor[j], restPath);
104
+ if (!itemResult.found) {
105
+ return { found: false, reason: `array item [${j}]: ${itemResult.reason}` };
106
+ }
107
+ }
108
+ return { found: true, reason: '' };
109
+ }
97
110
  if (Array.isArray(cursor)) {
98
111
  const idx = Number(key);
99
112
  if (!Number.isInteger(idx) || idx < 0 || idx >= cursor.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsmarket/pipeline-runtime",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Runtime for executing PIPELINE.md workflows (multi-skill orchestration). Provider-agnostic (MiniMax, Claude, OpenAI).",
5
5
  "license": "MIT",
6
6
  "type": "module",