owenloop 0.5.35 → 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 +19 -0
- package/dist/packages/work/src/hold/mcp.js +23 -3
- package/dist/src/model.js +33 -13
- package/dist/src/paths.js +4 -0
- package/package.json +1 -1
- package/plugins/claude-code/plugin/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/plugin/.mcp.json +1 -1
- package/plugins/codex/plugins/owenloop/.codex-plugin/plugin.json +1 -1
- package/plugins/codex/plugins/owenloop/.mcp.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@ 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
|
+
|
|
19
|
+
## [0.5.36](https://github.com/typicalday/owenloop/compare/v0.5.35...v0.5.36) (2026-10-05)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **work:** revoke hold MCP tools immediately on stop ([#346](https://github.com/typicalday/owenloop/issues/346)) ([da3b574](https://github.com/typicalday/owenloop/commit/da3b574850ef05ff19833c69978012bf66dafb9c))
|
|
25
|
+
|
|
7
26
|
## [0.5.35](https://github.com/typicalday/owenloop/compare/v0.5.34...v0.5.35) (2026-10-04)
|
|
8
27
|
|
|
9
28
|
|
|
@@ -111,6 +111,7 @@ export function createHoldMcp(deps) {
|
|
|
111
111
|
// either the model or submit-proof construction.
|
|
112
112
|
let firstContact;
|
|
113
113
|
let captured;
|
|
114
|
+
let stopping = false;
|
|
114
115
|
// Set the moment the lease loop's run() settles (lease-lost, completed,
|
|
115
116
|
// released, …): from then on this mount no longer holds the order, so BOTH
|
|
116
117
|
// registered tools fast-fail with isError and never touch the hub again (plan section 4
|
|
@@ -140,13 +141,17 @@ export function createHoldMcp(deps) {
|
|
|
140
141
|
terminal = outcome;
|
|
141
142
|
return outcome;
|
|
142
143
|
},
|
|
143
|
-
stop: (reason, stopOpts) =>
|
|
144
|
+
stop: (reason, stopOpts) => {
|
|
145
|
+
// Revoke model-facing tools before the asynchronous lease loop settles.
|
|
146
|
+
stopping = true;
|
|
147
|
+
inner.stop(reason, stopOpts);
|
|
148
|
+
},
|
|
144
149
|
};
|
|
145
150
|
/** The fast-fail both tools apply once the hold is over. */
|
|
146
151
|
function terminalGuard() {
|
|
147
|
-
if (terminal === undefined)
|
|
152
|
+
if (terminal === undefined && !stopping)
|
|
148
153
|
return undefined;
|
|
149
|
-
return textResult({ error: `order no longer held (${terminal}) — stop` }, true);
|
|
154
|
+
return textResult({ error: `order no longer held (${terminal ?? 'stopping'}) — stop` }, true);
|
|
150
155
|
}
|
|
151
156
|
async function gate(res) {
|
|
152
157
|
if (res.order === null)
|
|
@@ -182,12 +187,18 @@ export function createHoldMcp(deps) {
|
|
|
182
187
|
return gone;
|
|
183
188
|
if (captured !== undefined) {
|
|
184
189
|
const refused = await gate(captured);
|
|
190
|
+
const afterGate = terminalGuard();
|
|
191
|
+
if (afterGate !== undefined)
|
|
192
|
+
return afterGate;
|
|
185
193
|
if (refused !== undefined)
|
|
186
194
|
return refused;
|
|
187
195
|
return textResult(orderView(captured));
|
|
188
196
|
}
|
|
189
197
|
if (firstContact !== undefined) {
|
|
190
198
|
const refused = await gate(firstContact);
|
|
199
|
+
const afterGate = terminalGuard();
|
|
200
|
+
if (afterGate !== undefined)
|
|
201
|
+
return afterGate;
|
|
191
202
|
if (refused !== undefined)
|
|
192
203
|
return refused;
|
|
193
204
|
captured = firstContact;
|
|
@@ -196,6 +207,9 @@ export function createHoldMcp(deps) {
|
|
|
196
207
|
try {
|
|
197
208
|
const res = await hub.getOrder({ workflow, run, ...holderReq });
|
|
198
209
|
const refused = await gate(res);
|
|
210
|
+
const afterGate = terminalGuard();
|
|
211
|
+
if (afterGate !== undefined)
|
|
212
|
+
return afterGate;
|
|
199
213
|
if (refused !== undefined)
|
|
200
214
|
return refused;
|
|
201
215
|
captured = res;
|
|
@@ -278,6 +292,9 @@ export function createHoldMcp(deps) {
|
|
|
278
292
|
...(deps.sshProcess !== undefined ? { sshProcess: deps.sshProcess } : {}),
|
|
279
293
|
});
|
|
280
294
|
}
|
|
295
|
+
const beforeSubmit = terminalGuard();
|
|
296
|
+
if (beforeSubmit !== undefined)
|
|
297
|
+
return beforeSubmit;
|
|
281
298
|
const res = await hub.submit({
|
|
282
299
|
workflow,
|
|
283
300
|
run,
|
|
@@ -444,6 +461,9 @@ export function createHoldMcp(deps) {
|
|
|
444
461
|
}
|
|
445
462
|
const contentType = typeof contentTypeArg === 'string' ? contentTypeArg.trim() : guessContentType(resolved);
|
|
446
463
|
const filename = typeof filenameArg === 'string' ? filenameArg.trim() : basename(resolved);
|
|
464
|
+
const beforeUpload = terminalGuard();
|
|
465
|
+
if (beforeUpload !== undefined)
|
|
466
|
+
return beforeUpload;
|
|
447
467
|
const res = await hub.putFileArtifact({ workflow, bytes, contentType, filename });
|
|
448
468
|
// Hand back the envelope EXACTLY as it must be submitted. The hub's
|
|
449
469
|
// `text` is dropped from the pointer so the model cannot paste a field
|
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
|
-
|
|
2382
|
-
visited
|
|
2383
|
-
|
|
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
|
|
2406
|
-
const node = queue
|
|
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:
|
|
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 =
|
|
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:
|
|
2500
|
+
report.stallStates.push({ path: nodePath() });
|
|
2482
2501
|
}
|
|
2483
2502
|
else {
|
|
2484
|
-
report.deadlocks.push({ 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:
|
|
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
|
|
2526
|
-
|
|
2527
|
-
|
|
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.
|
|
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.
|
|
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"
|