owenloop 0.5.36 → 0.5.37

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
@@ -4,6 +4,18 @@ All notable changes to this project are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.5.37](https://github.com/typicalday/owenloop/compare/v0.5.36...v0.5.37) (2026-10-05)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **defs:** reject bare indexed map outputs ([#334](https://github.com/typicalday/owenloop/issues/334)) ([9f23088](https://github.com/typicalday/owenloop/commit/9f230889dbcb7607c4d583f0eca2521622d47ae8))
13
+
14
+
15
+ ### Performance Improvements
16
+
17
+ * **checker:** retain BFS predecessor links instead of full paths ([#345](https://github.com/typicalday/owenloop/issues/345)) ([d29c2a0](https://github.com/typicalday/owenloop/commit/d29c2a06d86dfc3df1b313304eb13e56b1407c22))
18
+
7
19
  ## [0.5.36](https://github.com/typicalday/owenloop/compare/v0.5.35...v0.5.36) (2026-10-05)
8
20
 
9
21
 
package/dist/src/model.js CHANGED
@@ -2378,9 +2378,25 @@ export function modelCheck(def, opts = {}) {
2378
2378
  const maxCollectionSize = opts.maxCollectionSize ?? 2;
2379
2379
  const initial = seedArts(def, opts.assumeProvided ?? false);
2380
2380
  const initialKey = canonicalKey(def, initial);
2381
- const visited = new Map(); // key → path to reach it
2382
- visited.set(initialKey, []);
2383
- const queue = [{ arts: initial, path: [], depth: 0 }];
2381
+ // Keep one predecessor link per discovered state. Copying a full path for
2382
+ // every successor makes queue/visited storage grow with both states and
2383
+ // depth, even though only reported findings need materialized paths.
2384
+ const predecessors = [{ parent: -1 }];
2385
+ const visited = new Map(); // key → predecessor id
2386
+ visited.set(initialKey, 0);
2387
+ const pathTo = (id) => {
2388
+ const reversed = [];
2389
+ while (id !== 0) {
2390
+ const link = predecessors[id];
2391
+ reversed.push(link.step);
2392
+ id = link.parent;
2393
+ }
2394
+ return reversed.reverse();
2395
+ };
2396
+ // A cursor avoids Array.shift's repeated compaction. Clear processed slots
2397
+ // so their artifact maps can be reclaimed while descendants stay queued.
2398
+ const queue = [{ arts: initial, id: 0, depth: 0 }];
2399
+ let queueHead = 0;
2384
2400
  const report = {
2385
2401
  def: def.name,
2386
2402
  bounded: false,
@@ -2402,8 +2418,11 @@ export function modelCheck(def, opts = {}) {
2402
2418
  const firedSteps = new Set();
2403
2419
  let depthReached = 0;
2404
2420
  const boundsHit = new Set();
2405
- while (queue.length > 0) {
2406
- const node = queue.shift();
2421
+ while (queueHead < queue.length) {
2422
+ const node = queue[queueHead];
2423
+ queue[queueHead++] = undefined;
2424
+ let reportedPath;
2425
+ const nodePath = () => (reportedPath ??= pathTo(node.id));
2407
2426
  report.stats.statesExplored++;
2408
2427
  if (node.depth > depthReached)
2409
2428
  depthReached = node.depth;
@@ -2424,7 +2443,7 @@ export function modelCheck(def, opts = {}) {
2424
2443
  continue;
2425
2444
  const whenHolds = evalInvariantPredicate(inv.when ?? ALWAYS_TRUE, node.arts, status);
2426
2445
  if (whenHolds && !evalInvariantPredicate(inv.requires, node.arts, status)) {
2427
- report.invariantViolations.push({ invariant: inv.name, path: node.path });
2446
+ report.invariantViolations.push({ invariant: inv.name, path: nodePath() });
2428
2447
  reportedInvariants.add(inv.name);
2429
2448
  }
2430
2449
  }
@@ -2434,7 +2453,7 @@ export function modelCheck(def, opts = {}) {
2434
2453
  if (status.done) {
2435
2454
  if (!report.completable) {
2436
2455
  report.completable = true;
2437
- report.completePath = node.path;
2456
+ report.completePath = nodePath();
2438
2457
  }
2439
2458
  continue; // done states have no successors
2440
2459
  }
@@ -2478,10 +2497,10 @@ export function modelCheck(def, opts = {}) {
2478
2497
  if (firings.length === 0 && !status.done) {
2479
2498
  const eventualFirings = eligibleFirings(def, node.arts, EVENTUAL_TIME_FACTS, { ignoreFreeze: true, modifier: opts.modifier });
2480
2499
  if (eventualFirings.length > 0) {
2481
- report.stallStates.push({ path: node.path });
2500
+ report.stallStates.push({ path: nodePath() });
2482
2501
  }
2483
2502
  else {
2484
- report.deadlocks.push({ path: node.path });
2503
+ report.deadlocks.push({ path: nodePath() });
2485
2504
  }
2486
2505
  continue;
2487
2506
  }
@@ -2494,7 +2513,7 @@ export function modelCheck(def, opts = {}) {
2494
2513
  if (status.debts.some((debt) => debt.stalled
2495
2514
  && !retractClearsDebt(debt.path, retractFirings)
2496
2515
  && progressMovesAnotherBranch(def, debt.path, node.arts, progressFirings))) {
2497
- report.stuck.push({ path: node.path });
2516
+ report.stuck.push({ path: nodePath() });
2498
2517
  }
2499
2518
  // Respect maxDepth
2500
2519
  if (node.depth >= maxDepth) {
@@ -2522,9 +2541,10 @@ export function modelCheck(def, opts = {}) {
2522
2541
  for (const suc of successors) {
2523
2542
  const key = canonicalKey(def, suc);
2524
2543
  if (!visited.has(key)) {
2525
- const newPath = [...node.path, step];
2526
- visited.set(key, newPath);
2527
- queue.push({ arts: suc, path: newPath, depth: node.depth + 1 });
2544
+ const id = predecessors.length;
2545
+ predecessors.push({ parent: node.id, step });
2546
+ visited.set(key, id);
2547
+ queue.push({ arts: suc, id, depth: node.depth + 1 });
2528
2548
  }
2529
2549
  }
2530
2550
  }
package/dist/src/paths.js CHANGED
@@ -118,6 +118,10 @@ export function parseProduce(raw) {
118
118
  const r = raw.trim();
119
119
  let m = MAP_RE.exec(r);
120
120
  if (m) {
121
+ if (m[3] === '') {
122
+ throw new Error(`map produce requires a named child suffix: '${raw}' (for example '${m[1]}[$${m[2]}].result'); ` +
123
+ 'bare indexed paths are reserved for collection members');
124
+ }
121
125
  return { raw: r, kind: 'map', stem: m[1], binder: m[2], suffix: m[3] };
122
126
  }
123
127
  m = COLLECTION_RE.exec(r);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.36",
3
+ "version": "0.5.37",
4
4
  "description": "Deterministic rails for agentic workflows. Declare steps and dependencies; the engine guarantees order, redoes what changes invalidate, and stops what keeps failing — instead of hoping the agent follows through.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "typicalday",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.36",
3
+ "version": "0.5.37",
4
4
  "description": "Claude Code driver for owenloop — cross-harness shift and conduct skills driven by the owenloop CLI, plus one hub control-plane MCP server backing an author skill and a fallback worker, for conducting and authoring workflows against your hosted owenloop server.",
5
5
  "author": {
6
6
  "name": "Typical Day"
@@ -7,7 +7,7 @@
7
7
  "mcp"
8
8
  ],
9
9
  "env": {
10
- "OWENLOOP_PLUGIN_VERSION": "0.5.36"
10
+ "OWENLOOP_PLUGIN_VERSION": "0.5.37"
11
11
  }
12
12
  }
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.36",
3
+ "version": "0.5.37",
4
4
  "description": "Codex plugin for the owenloop workflow engine.",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./.mcp.json"
@@ -6,7 +6,7 @@
6
6
  "mcp"
7
7
  ],
8
8
  "env": {
9
- "OWENLOOP_PLUGIN_VERSION": "0.5.36"
9
+ "OWENLOOP_PLUGIN_VERSION": "0.5.37"
10
10
  },
11
11
  "env_vars": [
12
12
  "HOME",