owenloop 0.5.31 → 0.5.33
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 +15 -0
- package/dist/packages/work/src/hold/mcp.js +7 -2
- package/dist/packages/work/src/hub/types.d.ts +2 -0
- package/dist/packages/work/src/shift/state.js +37 -2
- package/dist/src/bundle/call-target.d.ts +9 -0
- package/dist/src/bundle/call-target.js +32 -0
- package/dist/src/bundle/error.d.ts +8 -0
- package/dist/src/bundle/error.js +11 -0
- package/dist/src/bundle/manifest.d.ts +5 -6
- package/dist/src/bundle/manifest.js +10 -30
- package/dist/src/bundle/types.d.ts +2 -11
- package/dist/src/bundle/types.js +1 -14
- package/dist/src/defs.js +3 -2
- package/dist/src/engine.d.ts +5 -1
- package/dist/src/engine.js +8 -5
- 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,21 @@ 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.33](https://github.com/typicalday/owenloop/compare/v0.5.32...v0.5.33) (2026-10-01)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **engine:** allow terminal tree teardown to skip parent cascade ([f9eaaea](https://github.com/typicalday/owenloop/commit/f9eaaea4ef097060ce4cc717aae5b4e0d73d8e73))
|
|
13
|
+
* **work:** publish shift reservations atomically ([2ca3025](https://github.com/typicalday/owenloop/commit/2ca302577f28fa59c0274d0cbb3719a028227b89))
|
|
14
|
+
|
|
15
|
+
## [0.5.32](https://github.com/typicalday/owenloop/compare/v0.5.31...v0.5.32) (2026-10-01)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **work:** forward requested modifier from held reject ([#323](https://github.com/typicalday/owenloop/issues/323)) ([f543983](https://github.com/typicalday/owenloop/commit/f54398307f0c93f087cbb443546a68aec508534a))
|
|
21
|
+
|
|
7
22
|
## [0.5.31](https://github.com/typicalday/owenloop/compare/v0.5.30...v0.5.31) (2026-10-01)
|
|
8
23
|
|
|
9
24
|
|
|
@@ -299,13 +299,14 @@ export function createHoldMcp(deps) {
|
|
|
299
299
|
};
|
|
300
300
|
const rejectTool = {
|
|
301
301
|
name: 'reject',
|
|
302
|
-
description: 'Reject a consumed artifact path with a reason. The hub derives the rejecting step from this held run; the client cannot supply `by`.',
|
|
302
|
+
description: 'Reject a consumed artifact path with a reason and optional requested modifier. The hub derives the rejecting step from this held run; the client cannot supply `by`.',
|
|
303
303
|
inputSchema: {
|
|
304
304
|
type: 'object',
|
|
305
305
|
required: ['path', 'text'],
|
|
306
306
|
properties: {
|
|
307
307
|
path: { type: 'string', description: 'The consumed artifact path to reject.' },
|
|
308
308
|
text: { type: 'string', description: 'The reason for rejecting the artifact.' },
|
|
309
|
+
requested: { type: 'string', description: 'Optional declared modifier to request from the producer.' },
|
|
309
310
|
},
|
|
310
311
|
additionalProperties: false,
|
|
311
312
|
},
|
|
@@ -315,14 +316,18 @@ export function createHoldMcp(deps) {
|
|
|
315
316
|
return gone;
|
|
316
317
|
const path = args['path'];
|
|
317
318
|
const text = args['text'];
|
|
319
|
+
const requested = args['requested'];
|
|
318
320
|
if (typeof path !== 'string' || path.trim() === '') {
|
|
319
321
|
return textResult({ error: 'reject requires a non-empty string "path"' }, true);
|
|
320
322
|
}
|
|
321
323
|
if (typeof text !== 'string' || text.trim() === '') {
|
|
322
324
|
return textResult({ error: 'reject requires a non-empty string "text"' }, true);
|
|
323
325
|
}
|
|
326
|
+
if (requested !== undefined && (typeof requested !== 'string' || requested.trim() === '')) {
|
|
327
|
+
return textResult({ error: 'reject "requested" must be a non-empty string when provided' }, true);
|
|
328
|
+
}
|
|
324
329
|
try {
|
|
325
|
-
const res = await hub.reject({ workflow, run, path, text });
|
|
330
|
+
const res = await hub.reject({ workflow, run, path, text, ...(requested === undefined ? {} : { requested }) });
|
|
326
331
|
if (res.closed === true)
|
|
327
332
|
loop.stop('submitted', { release: false });
|
|
328
333
|
return textResult({ ok: res.ok, closed: res.closed ?? false, text: res.text });
|
|
@@ -484,6 +484,8 @@ export interface RejectRequest {
|
|
|
484
484
|
run: string;
|
|
485
485
|
path: string;
|
|
486
486
|
text: string;
|
|
487
|
+
/** Optional declared modifier requested from the input artifact's producer. */
|
|
488
|
+
requested?: string;
|
|
487
489
|
}
|
|
488
490
|
/** The reject verb's flattened response envelope. */
|
|
489
491
|
export interface RejectResponse extends HubResponse {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* crash after PID persistence leaves enough state for restart reconciliation to
|
|
10
10
|
* open the gate safely.
|
|
11
11
|
*/
|
|
12
|
-
import { closeSync, existsSync, fsyncSync, ftruncateSync, mkdirSync, openSync, readdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync, } from 'node:fs';
|
|
12
|
+
import { closeSync, existsSync, fsyncSync, ftruncateSync, linkSync, mkdirSync, openSync, readdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync, } from 'node:fs';
|
|
13
13
|
import { randomBytes } from 'node:crypto';
|
|
14
14
|
import { basename, join, resolve } from 'node:path';
|
|
15
15
|
export const DEFAULT_RESERVATION_MAX_AGE_MS = 2 * 60_000;
|
|
@@ -121,6 +121,41 @@ function atomicWrite(path, value) {
|
|
|
121
121
|
throw error;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
+
/** Publish a complete reservation without replacing another shift's claim. */
|
|
125
|
+
function atomicExclusiveWrite(path, value) {
|
|
126
|
+
const dir = join(path, '..');
|
|
127
|
+
mkdirSync(dir, { recursive: true });
|
|
128
|
+
const tmp = join(dir, `.${randomBytes(8).toString('hex')}-${process.pid}-${Date.now()}.tmp`);
|
|
129
|
+
try {
|
|
130
|
+
durableExclusiveWrite(tmp, value);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
try {
|
|
134
|
+
durableRemove(tmp);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
// Preserve the write or sync failure; no canonical record was installed.
|
|
138
|
+
}
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
141
|
+
try {
|
|
142
|
+
// open('wx') on the canonical path exposes an empty file before its write.
|
|
143
|
+
// A hard link installs the already-fsynced inode atomically and still
|
|
144
|
+
// refuses an existing run record instead of replacing its owner.
|
|
145
|
+
linkSync(tmp, path);
|
|
146
|
+
syncDirectory(dir);
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
try {
|
|
150
|
+
durableRemove(tmp);
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
// Preserve the install failure; a leftover temp is never a run record.
|
|
154
|
+
}
|
|
155
|
+
throw error;
|
|
156
|
+
}
|
|
157
|
+
durableRemove(tmp);
|
|
158
|
+
}
|
|
124
159
|
function writeStateRecord(stateDir, record) {
|
|
125
160
|
atomicWrite(recordFile(stateDir, record.run), JSON.stringify(record));
|
|
126
161
|
}
|
|
@@ -146,7 +181,7 @@ export function reserveChild(stateDir, request) {
|
|
|
146
181
|
try {
|
|
147
182
|
// Exclusive create is the same-run reservation point. A stale, live, or even
|
|
148
183
|
// corrupt existing record blocks dispatch rather than being overwritten.
|
|
149
|
-
|
|
184
|
+
atomicExclusiveWrite(recordFile(stateDir, reservation.run), JSON.stringify(reservation));
|
|
150
185
|
}
|
|
151
186
|
catch (error) {
|
|
152
187
|
try {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Workflow map keys: lowercase-start, lowercase alphanumeric and hyphen. */
|
|
2
|
+
export declare const WORKFLOW_NAME_RE: RegExp;
|
|
3
|
+
/** Parse an exact call. `#` cannot occur in a store coordinate. */
|
|
4
|
+
export declare function parseVersionedCallTarget(text: string, validateCoordinate: (coordinate: string) => unknown): {
|
|
5
|
+
coordinate: string;
|
|
6
|
+
workflow?: string;
|
|
7
|
+
};
|
|
8
|
+
/** True for a well-formed exact package call, optionally selecting a named workflow. */
|
|
9
|
+
export declare function isVersionedReference(text: string, validateCoordinate: (coordinate: string) => unknown): boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Exact bundle-call syntax, separate from filesystem and YAML manifest loading. */
|
|
2
|
+
import { BundleError } from "./error.js";
|
|
3
|
+
/** Workflow map keys: lowercase-start, lowercase alphanumeric and hyphen. */
|
|
4
|
+
export const WORKFLOW_NAME_RE = /^[a-z][a-z0-9-]*$/;
|
|
5
|
+
/** Historical explicit-coordinate spelling; store parsing excludes ambiguous separators. */
|
|
6
|
+
const VERSIONED_REF_RE = /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+@[!-~]+$/;
|
|
7
|
+
/** Parse an exact call. `#` cannot occur in a store coordinate. */
|
|
8
|
+
export function parseVersionedCallTarget(text, validateCoordinate) {
|
|
9
|
+
const hash = text.indexOf('#');
|
|
10
|
+
const coordinate = hash < 0 ? text : text.slice(0, hash);
|
|
11
|
+
if (!VERSIONED_REF_RE.test(coordinate)) {
|
|
12
|
+
throw new BundleError('MANIFEST_ERROR', `invalid exact versioned call target '${text}'`);
|
|
13
|
+
}
|
|
14
|
+
validateCoordinate(coordinate);
|
|
15
|
+
if (hash < 0)
|
|
16
|
+
return { coordinate };
|
|
17
|
+
const workflow = text.slice(hash + 1);
|
|
18
|
+
if (!WORKFLOW_NAME_RE.test(workflow)) {
|
|
19
|
+
throw new BundleError('MANIFEST_ERROR', `invalid named workflow selector '${text}'`);
|
|
20
|
+
}
|
|
21
|
+
return { coordinate, workflow };
|
|
22
|
+
}
|
|
23
|
+
/** True for a well-formed exact package call, optionally selecting a named workflow. */
|
|
24
|
+
export function isVersionedReference(text, validateCoordinate) {
|
|
25
|
+
try {
|
|
26
|
+
parseVersionedCallTarget(text, validateCoordinate);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Stable bundle failure codes shared by readers and the portable call parser. */
|
|
2
|
+
export type BundleErrorCode = 'BUNDLE_IO' | 'BUNDLE_NOT_GZIP' | 'BUNDLE_LIMIT' | 'ARCHIVE_TOO_MANY_ENTRIES' | 'ARCHIVE_ENTRY_TOO_LARGE' | 'ARCHIVE_PATH_TOO_LONG' | 'ARCHIVE_PATH_VIOLATION' | 'ARCHIVE_DUPLICATE_PATH' | 'ARCHIVE_PATH_PREFIX_COLLISION' | 'ARCHIVE_TRUNCATED' | 'ARCHIVE_BAD_CHECKSUM' | 'ARCHIVE_BAD_OCTAL' | 'ARCHIVE_BAD_PAX' | 'ARCHIVE_DANGLING_PAX' | 'ARCHIVE_TRAILING_BYTES' | 'UNSUPPORTED_ENTRY_TYPE' | 'NON_CANONICAL_HEADER' | 'MANIFEST_ERROR' | 'RUNTIME_INCOMPATIBLE' | 'UNSUPPORTED_FORMAT_VERSION' | 'MANIFEST_MISSING' | 'WORKFLOW_MISSING' | 'WORKFLOW_INVALID' | 'INTEGRITY_MISMATCH' | 'SOURCE_NOT_A_DIRECTORY' | 'SOURCE_NOT_A_FILE' | 'SOURCE_SYMLINK' | 'SOURCE_INVALID_PATH' | 'SOURCE_FILE_CHANGED' | 'OUTPUT_INSIDE_SOURCE' | 'OUTPUT_INVALID' | 'DESTINATION_EXISTS' | 'DESTINATION_PARENT_INVALID' | 'WORKFLOW_ERROR';
|
|
3
|
+
/** A typed bundle failure. */
|
|
4
|
+
export declare class BundleError extends Error {
|
|
5
|
+
readonly code: BundleErrorCode;
|
|
6
|
+
readonly entryPath?: string;
|
|
7
|
+
constructor(code: BundleErrorCode, message: string, entryPath?: string);
|
|
8
|
+
}
|
|
@@ -18,17 +18,16 @@
|
|
|
18
18
|
* indent, one final newline.
|
|
19
19
|
*/
|
|
20
20
|
import type { BundleManifest } from './types.ts';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/** Workflow map keys: lowercase-start, lowercase alphanumeric and hyphen. */
|
|
24
|
-
export declare const WORKFLOW_NAME_RE: RegExp;
|
|
25
|
-
/** Parse an exact call. `#` cannot occur in a store coordinate, so the selector is unambiguous. */
|
|
21
|
+
export { WORKFLOW_NAME_RE } from './call-target.ts';
|
|
22
|
+
/** Parse an exact call using the store's canonical coordinate validator. */
|
|
26
23
|
export declare function parseVersionedCallTarget(text: string): {
|
|
27
24
|
coordinate: string;
|
|
28
25
|
workflow?: string;
|
|
29
26
|
};
|
|
30
|
-
/**
|
|
27
|
+
/** Preserve the manifest API's boolean check for an exact call. */
|
|
31
28
|
export declare function isVersionedReference(text: string): boolean;
|
|
29
|
+
/** Lowercase 64-hex SHA-256 of `bytes`. */
|
|
30
|
+
export declare function sha256Hex(bytes: Uint8Array): string;
|
|
32
31
|
/**
|
|
33
32
|
* Parse and validate `.wnlp` manifest bytes, fail-closed. Refuses non-UTF-8
|
|
34
33
|
* input, a missing (or double) final newline, any YAML parse error or
|
|
@@ -21,8 +21,18 @@ import { createHash } from 'node:crypto';
|
|
|
21
21
|
import { isAlias, isMap, isPair, isScalar, isSeq, parseDocument, } from 'yaml';
|
|
22
22
|
import { canonicalBundlePathViolation } from "../archive.js";
|
|
23
23
|
import { parseWorkflowCoordinate } from "../store/types.js";
|
|
24
|
+
import { isVersionedReference as isPortableVersionedReference, parseVersionedCallTarget as parsePortableVersionedCallTarget, WORKFLOW_NAME_RE, } from "./call-target.js";
|
|
24
25
|
import { assertCurrentRuntimeCompatible, isCanonicalSemver } from "./runtime.js";
|
|
25
26
|
import { BundleError } from "./types.js";
|
|
27
|
+
export { WORKFLOW_NAME_RE } from "./call-target.js";
|
|
28
|
+
/** Parse an exact call using the store's canonical coordinate validator. */
|
|
29
|
+
export function parseVersionedCallTarget(text) {
|
|
30
|
+
return parsePortableVersionedCallTarget(text, parseWorkflowCoordinate);
|
|
31
|
+
}
|
|
32
|
+
/** Preserve the manifest API's boolean check for an exact call. */
|
|
33
|
+
export function isVersionedReference(text) {
|
|
34
|
+
return isPortableVersionedReference(text, parseWorkflowCoordinate);
|
|
35
|
+
}
|
|
26
36
|
/** Lowercase 64-hex SHA-256 of `bytes`. */
|
|
27
37
|
export function sha256Hex(bytes) {
|
|
28
38
|
return createHash('sha256').update(bytes).digest('hex');
|
|
@@ -30,8 +40,6 @@ export function sha256Hex(bytes) {
|
|
|
30
40
|
const DIGEST_RE = /^[0-9a-f]{64}$/;
|
|
31
41
|
/** Portable package namespace. */
|
|
32
42
|
const PACKAGE_NAME_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
|
|
33
|
-
/** Workflow map keys: lowercase-start, lowercase alphanumeric and hyphen. */
|
|
34
|
-
export const WORKFLOW_NAME_RE = /^[a-z][a-z0-9-]*$/;
|
|
35
43
|
/** Version: printable ASCII, no separators that would break filenames or lock keys. */
|
|
36
44
|
const VERSION_RE = /^[!-~]{1,128}$/;
|
|
37
45
|
/** Versioned runtime feature identifier ending in a positive `.vN` version. */
|
|
@@ -40,34 +48,6 @@ const RUNTIME_FEATURE_RE = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*\.v[1-9][0-9]*$/;
|
|
|
40
48
|
const PLATFORM_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
41
49
|
/** Capability class identifier. */
|
|
42
50
|
const CAPABILITY_CLASS_RE = /^[A-Za-z][A-Za-z0-9._-]{0,127}$/;
|
|
43
|
-
/** Historical explicit-coordinate spelling; store parsing further excludes ambiguous separators. */
|
|
44
|
-
const VERSIONED_REF_RE = /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+@[!-~]+$/;
|
|
45
|
-
/** Parse an exact call. `#` cannot occur in a store coordinate, so the selector is unambiguous. */
|
|
46
|
-
export function parseVersionedCallTarget(text) {
|
|
47
|
-
const hash = text.indexOf('#');
|
|
48
|
-
const coordinate = hash < 0 ? text : text.slice(0, hash);
|
|
49
|
-
if (!VERSIONED_REF_RE.test(coordinate)) {
|
|
50
|
-
throw new BundleError('MANIFEST_ERROR', `invalid exact versioned call target '${text}'`);
|
|
51
|
-
}
|
|
52
|
-
parseWorkflowCoordinate(coordinate);
|
|
53
|
-
if (hash < 0)
|
|
54
|
-
return { coordinate };
|
|
55
|
-
const workflow = text.slice(hash + 1);
|
|
56
|
-
if (!WORKFLOW_NAME_RE.test(workflow)) {
|
|
57
|
-
throw new BundleError('MANIFEST_ERROR', `invalid named workflow selector '${text}'`);
|
|
58
|
-
}
|
|
59
|
-
return { coordinate, workflow };
|
|
60
|
-
}
|
|
61
|
-
/** True for a well-formed exact package call, optionally selecting a named workflow. */
|
|
62
|
-
export function isVersionedReference(text) {
|
|
63
|
-
try {
|
|
64
|
-
parseVersionedCallTarget(text);
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
catch {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
51
|
/**
|
|
72
52
|
* Walk a yaml AST into plain JS values, fail-closed: refuses aliases, merge
|
|
73
53
|
* keys, any tag (custom `!x` or built-in `!!x`), and non-string map keys.
|
|
@@ -6,17 +6,8 @@
|
|
|
6
6
|
* bytes. See `docs/bundles.md` for the full format contract.
|
|
7
7
|
*/
|
|
8
8
|
import type { TarLimits } from '../archive.ts';
|
|
9
|
-
|
|
10
|
-
export type BundleErrorCode
|
|
11
|
-
/**
|
|
12
|
-
* A typed bundle failure. `message` is human-readable; `entryPath` carries
|
|
13
|
-
* the offending archive/manifest entry when applicable.
|
|
14
|
-
*/
|
|
15
|
-
export declare class BundleError extends Error {
|
|
16
|
-
readonly code: BundleErrorCode;
|
|
17
|
-
readonly entryPath?: string;
|
|
18
|
-
constructor(code: BundleErrorCode, message: string, entryPath?: string);
|
|
19
|
-
}
|
|
9
|
+
export { BundleError } from './error.ts';
|
|
10
|
+
export type { BundleErrorCode } from './error.ts';
|
|
20
11
|
/** Compatibility requirements that a format-v2 bundle places on its reader/runtime. */
|
|
21
12
|
export interface BundleRuntimeRequirements {
|
|
22
13
|
/** Minimum canonical Owenloop SemVer accepted by the bundle. */
|
package/dist/src/bundle/types.js
CHANGED
|
@@ -5,17 +5,4 @@
|
|
|
5
5
|
* ("def digest") is the lowercase SHA-256 of the UNCOMPRESSED canonical tar
|
|
6
6
|
* bytes. See `docs/bundles.md` for the full format contract.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
* A typed bundle failure. `message` is human-readable; `entryPath` carries
|
|
10
|
-
* the offending archive/manifest entry when applicable.
|
|
11
|
-
*/
|
|
12
|
-
export class BundleError extends Error {
|
|
13
|
-
code;
|
|
14
|
-
entryPath;
|
|
15
|
-
constructor(code, message, entryPath) {
|
|
16
|
-
super(message);
|
|
17
|
-
this.code = code;
|
|
18
|
-
if (entryPath !== undefined)
|
|
19
|
-
this.entryPath = entryPath;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
8
|
+
export { BundleError } from "./error.js";
|
package/dist/src/defs.js
CHANGED
|
@@ -29,7 +29,8 @@ import { assertValidSchema } from "./schema.js";
|
|
|
29
29
|
// The separator lives with composition/matching (capabilities.ts); the parser
|
|
30
30
|
// only enforces that an AUTHORED name never contains it.
|
|
31
31
|
import { MODIFIER_SEPARATOR } from "./capabilities.js";
|
|
32
|
-
import { parseVersionedCallTarget } from "./bundle/
|
|
32
|
+
import { parseVersionedCallTarget } from "./bundle/call-target.js";
|
|
33
|
+
import { parseWorkflowCoordinate } from "./store/types.js";
|
|
33
34
|
import { isCallStep } from "./types.js";
|
|
34
35
|
/** Hand-maintained key allowlist for RawInput — kept next to the interface so
|
|
35
36
|
* the two can't silently drift (§27 unknown-key rejection). */
|
|
@@ -2319,7 +2320,7 @@ function resolveCallsTargetKey(defs, target, from) {
|
|
|
2319
2320
|
let lockKey = target;
|
|
2320
2321
|
if (target.includes('#')) {
|
|
2321
2322
|
try {
|
|
2322
|
-
lockKey = parseVersionedCallTarget(target).coordinate;
|
|
2323
|
+
lockKey = parseVersionedCallTarget(target, parseWorkflowCoordinate).coordinate;
|
|
2323
2324
|
}
|
|
2324
2325
|
catch {
|
|
2325
2326
|
return undefined;
|
package/dist/src/engine.d.ts
CHANGED
|
@@ -947,7 +947,11 @@ export declare class Engine {
|
|
|
947
947
|
*/
|
|
948
948
|
retry(workflow: string, path: string, by?: Author, text?: string): void;
|
|
949
949
|
/** Close a run (audit/budget) and release its lease so the task can re-arm. */
|
|
950
|
-
close(workflow: string, run: string, outcome?: 'ok' | 'no_work' | 'released' | 'failed' | 'skipped', summary?: string
|
|
950
|
+
close(workflow: string, run: string, outcome?: 'ok' | 'no_work' | 'released' | 'failed' | 'skipped', summary?: string, opts?: {
|
|
951
|
+
/** Disable the child-to-parent cascade only while terminating an entire
|
|
952
|
+
* calls tree. A live parent needs this cascade for forward progress. */
|
|
953
|
+
maintainParent?: boolean;
|
|
954
|
+
}): void;
|
|
951
955
|
/**
|
|
952
956
|
* Touch the liveness timestamp on an open run's task. A run that periodically
|
|
953
957
|
* calls heartbeat() will never be falsely reaped as long as beats arrive within
|
package/dist/src/engine.js
CHANGED
|
@@ -15,7 +15,7 @@ import { summarizeIssues, validateValue } from "./schema.js";
|
|
|
15
15
|
import { hashDef } from "./defs.js";
|
|
16
16
|
import { checkInterfaceCompatibility } from "./implements.js";
|
|
17
17
|
import { isDefDigest, parseWorkflowCoordinate } from "./store/types.js";
|
|
18
|
-
import { parseVersionedCallTarget } from "./bundle/
|
|
18
|
+
import { parseVersionedCallTarget } from "./bundle/call-target.js";
|
|
19
19
|
import { applyCapabilityMappings, applyCapabilityRewrites, claimMatches, composeCapabilities } from "./capabilities.js";
|
|
20
20
|
import { localMidnightMs, nowMs, randId } from "./util.js";
|
|
21
21
|
import { isCallStep } from "./types.js";
|
|
@@ -181,7 +181,7 @@ function hasExactImplementationClaim(def, expected) {
|
|
|
181
181
|
*/
|
|
182
182
|
function callsPinViolation(parentDef, childDef, target) {
|
|
183
183
|
if (target.includes('/')) {
|
|
184
|
-
const lockKey = target.includes('#') ? parseVersionedCallTarget(target).coordinate : target;
|
|
184
|
+
const lockKey = target.includes('#') ? parseVersionedCallTarget(target, parseWorkflowCoordinate).coordinate : target;
|
|
185
185
|
const pinned = parentDef.bundleLock?.[lockKey];
|
|
186
186
|
if (pinned === undefined) {
|
|
187
187
|
return parentDef.bundleDigest !== undefined && target.includes('#')
|
|
@@ -575,7 +575,7 @@ export class Engine {
|
|
|
575
575
|
let snapshotDef;
|
|
576
576
|
let optimisticInterfaceBinding;
|
|
577
577
|
const namedExactLockKey = step.calls !== undefined && step.calls.includes('#') && parentDef.bundleDigest !== undefined
|
|
578
|
-
? parseVersionedCallTarget(step.calls).coordinate
|
|
578
|
+
? parseVersionedCallTarget(step.calls, parseWorkflowCoordinate).coordinate
|
|
579
579
|
: undefined;
|
|
580
580
|
let verifiedParentPin;
|
|
581
581
|
// Interface targets are selected once, stored on the parent, and resolved by
|
|
@@ -2882,7 +2882,7 @@ export class Engine {
|
|
|
2882
2882
|
}
|
|
2883
2883
|
// ---- run lifecycle ---------------------------------------------------------
|
|
2884
2884
|
/** Close a run (audit/budget) and release its lease so the task can re-arm. */
|
|
2885
|
-
close(workflow, run, outcome = 'ok', summary) {
|
|
2885
|
+
close(workflow, run, outcome = 'ok', summary, opts) {
|
|
2886
2886
|
this.store.tx(() => {
|
|
2887
2887
|
const r = this.store.getRun(run);
|
|
2888
2888
|
if (!r)
|
|
@@ -2910,7 +2910,10 @@ export class Engine {
|
|
|
2910
2910
|
// forward cascade and no `settled` to derive — just the lifecycle signal.
|
|
2911
2911
|
this.fire({ type: 'closed', workflow, run, outcome });
|
|
2912
2912
|
// M2B cascade-up prompt: closing a run may advance the child's artifact state.
|
|
2913
|
-
|
|
2913
|
+
// Terminal tree cancellation closes every lease itself. Maintaining a
|
|
2914
|
+
// parent while that tree is being torn down can create new calls children.
|
|
2915
|
+
if (opts?.maintainParent !== false)
|
|
2916
|
+
this.triggerParentIfChild(workflow);
|
|
2914
2917
|
}
|
|
2915
2918
|
/**
|
|
2916
2919
|
* Touch the liveness timestamp on an open run's task. A run that periodically
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owenloop",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.33",
|
|
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.33",
|
|
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"
|