owenloop 0.5.16 → 0.5.18
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 +14 -0
- package/dist/packages/work/src/harness/claude.js +42 -1
- package/dist/packages/work/src/hub/types.d.ts +5 -0
- package/dist/packages/work/src/lease/loop.js +2 -1
- package/dist/packages/work/src/shift/loop.js +5 -4
- package/docs/agent-runner.md +3 -2
- package/docs/cli.md +7 -0
- package/docs/shift-logs.md +5 -4
- 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,20 @@ 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.18](https://github.com/typicalday/owenloop/compare/v0.5.17...v0.5.18) (2026-08-22)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **work:** show the call a parked approval is asking about ([#281](https://github.com/typicalday/owenloop/issues/281)) ([86ab4b0](https://github.com/typicalday/owenloop/commit/86ab4b0878b71a25e9d1f31290657a063030ea90))
|
|
13
|
+
|
|
14
|
+
## [0.5.17](https://github.com/typicalday/owenloop/compare/v0.5.16...v0.5.17) (2026-08-21)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **work:** send the release reason so an unservable order stops being silent ([#279](https://github.com/typicalday/owenloop/issues/279)) ([6bd1194](https://github.com/typicalday/owenloop/commit/6bd119449a8684fb25eae034703d8746b28f175a))
|
|
20
|
+
|
|
7
21
|
## [0.5.16](https://github.com/typicalday/owenloop/compare/v0.5.15...v0.5.16) (2026-08-21)
|
|
8
22
|
|
|
9
23
|
|
|
@@ -315,6 +315,46 @@ function decisionMessage(reason, note) {
|
|
|
315
315
|
'If the work has an equivalent inside your own working directory, do that instead. If it does not, call the `ask` tool on the mounted `owenloop` MCP server and state what you need and why. Do not guess, and do not submit work that pretends this succeeded.',
|
|
316
316
|
].join(' ');
|
|
317
317
|
}
|
|
318
|
+
/** The only model-authored arguments safe to summarize for an approval prompt. */
|
|
319
|
+
const APPROVAL_FILE_PATH_ARGS = new Map([
|
|
320
|
+
['Read', ['file_path']],
|
|
321
|
+
['Write', ['file_path']],
|
|
322
|
+
['Edit', ['file_path']],
|
|
323
|
+
['NotebookRead', ['notebook_path']],
|
|
324
|
+
['NotebookEdit', ['notebook_path']],
|
|
325
|
+
['Glob', ['path']],
|
|
326
|
+
['Grep', ['path']],
|
|
327
|
+
]);
|
|
328
|
+
function nonEmptyString(value) {
|
|
329
|
+
return typeof value === 'string' && value !== '' ? value : undefined;
|
|
330
|
+
}
|
|
331
|
+
/** A hostile model-authored input must not turn an approval into a hung callback. */
|
|
332
|
+
function inputString(input, key) {
|
|
333
|
+
try {
|
|
334
|
+
return nonEmptyString(input[key]);
|
|
335
|
+
}
|
|
336
|
+
catch {
|
|
337
|
+
return undefined;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Return the bounded one-line call detail an operator needs to approve Claude
|
|
342
|
+
* tool use, without serializing the arbitrary model-authored input bag.
|
|
343
|
+
*/
|
|
344
|
+
function approvalTitle(toolName, input, suppliedTitle) {
|
|
345
|
+
let title = nonEmptyString(suppliedTitle);
|
|
346
|
+
if (title === undefined && toolName === 'Bash')
|
|
347
|
+
title = inputString(input, 'command');
|
|
348
|
+
if (title === undefined) {
|
|
349
|
+
const paths = (APPROVAL_FILE_PATH_ARGS.get(toolName) ?? [])
|
|
350
|
+
.map((key) => inputString(input, key))
|
|
351
|
+
.filter((path) => path !== undefined);
|
|
352
|
+
if (paths.length > 0)
|
|
353
|
+
title = `${toolName} ${paths.join(', ')}`;
|
|
354
|
+
}
|
|
355
|
+
const selected = title ?? nonEmptyString(toolName);
|
|
356
|
+
return selected === undefined ? undefined : cap(selected);
|
|
357
|
+
}
|
|
318
358
|
/**
|
|
319
359
|
* The `canUseTool` callback, wired on every start.
|
|
320
360
|
*
|
|
@@ -355,6 +395,7 @@ function buildCanUseTool(cwd, policy, filesystem, onEvent, approvals) {
|
|
|
355
395
|
if (verdict.decision === 'allow')
|
|
356
396
|
return { behavior: 'allow' };
|
|
357
397
|
if (approvals !== undefined) {
|
|
398
|
+
const title = approvalTitle(toolName, input, options.title);
|
|
358
399
|
onEvent({
|
|
359
400
|
kind: 'progress',
|
|
360
401
|
text: `permission escalation: ${toolName} raised for approval — ${verdict.reason}`,
|
|
@@ -366,7 +407,7 @@ function buildCanUseTool(cwd, policy, filesystem, onEvent, approvals) {
|
|
|
366
407
|
toolName,
|
|
367
408
|
toolInput: input,
|
|
368
409
|
reason: verdict.reason,
|
|
369
|
-
...(
|
|
410
|
+
...(title !== undefined ? { title } : {}),
|
|
370
411
|
...(options.signal !== undefined ? { signal: options.signal } : {}),
|
|
371
412
|
});
|
|
372
413
|
}
|
|
@@ -352,6 +352,7 @@ export type ReleaseRequest = {
|
|
|
352
352
|
} | {
|
|
353
353
|
workflow: string;
|
|
354
354
|
run: string;
|
|
355
|
+
reason?: string;
|
|
355
356
|
};
|
|
356
357
|
/**
|
|
357
358
|
* Response shapes mirror hub-core `verbs/release.ts` (verified 2026-07-18):
|
|
@@ -362,6 +363,10 @@ export type ReleaseRequest = {
|
|
|
362
363
|
* drain-exempt-ion, never list which claims were exempt.
|
|
363
364
|
* - targeted: `{ released: boolean, reason?, workflow?, run? }` — idempotent
|
|
364
365
|
* (a not-held target is `released: false`, not an error).
|
|
366
|
+
* Targeted requests may carry an optional `reason`; the hub trims it,
|
|
367
|
+
* treats blank text as absent, truncates it to 1024 Unicode code points
|
|
368
|
+
* without splitting surrogate pairs, and records whether truncation
|
|
369
|
+
* occurred. It retains only the first observation for a workflow/step.
|
|
365
370
|
*
|
|
366
371
|
* The by-session form's `released` array is REQUIRED (the drain role reads it);
|
|
367
372
|
* the targeted form's fields are all optional so callers that only do a
|
|
@@ -225,8 +225,9 @@ export function createLeaseLoop(opts) {
|
|
|
225
225
|
return 'stopped';
|
|
226
226
|
opts.out(`owenloop work ${role}: final breath (${stopReason || 'stop'}) — releasing ${workflow}/${runId}`);
|
|
227
227
|
try {
|
|
228
|
+
const request = { workflow, run: runId, ...(stopReason !== '' ? { reason: stopReason } : {}) };
|
|
228
229
|
const raced = await Promise.race([
|
|
229
|
-
opts.hub.release(
|
|
230
|
+
opts.hub.release(request).then(() => 'ok'),
|
|
230
231
|
opts.sleep(RELEASE_CAP_MS).then(() => 'timeout'),
|
|
231
232
|
]);
|
|
232
233
|
if (raced === 'timeout') {
|
|
@@ -391,14 +391,15 @@ export function createShiftLoop(opts) {
|
|
|
391
391
|
* deliberately stays off the dispatch critical path; a failed release falls
|
|
392
392
|
* back to the existing pickup-window behavior and is observable.
|
|
393
393
|
*/
|
|
394
|
-
function releaseClaim(workflow, run) {
|
|
395
|
-
void opts.hub.release({ workflow, run }).catch((e) => {
|
|
394
|
+
function releaseClaim(workflow, run, reason) {
|
|
395
|
+
void opts.hub.release({ workflow, run, ...(reason !== undefined ? { reason } : {}) }).catch((e) => {
|
|
396
396
|
noteServerBackoff(e);
|
|
397
397
|
const message = errMsg(e);
|
|
398
398
|
opts.err(`[${workflow}/${run}] release failed: ${message} — leaving the hub pickup window to re-offer it`);
|
|
399
399
|
emit({ type: 'hub-error', op: 'release', workflow, message });
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
+
const formatReleaseReason = (reason, message) => `${reason}: ${message}`;
|
|
402
403
|
function acquireDispatchLock(waitMs, label) {
|
|
403
404
|
return acquireFileLockSync(join(opts.stateDir, '.dispatch.lock'), {
|
|
404
405
|
...opts.dispatchLockOptions,
|
|
@@ -614,7 +615,7 @@ export function createShiftLoop(opts) {
|
|
|
614
615
|
reason: 'claim-expired',
|
|
615
616
|
message,
|
|
616
617
|
});
|
|
617
|
-
releaseClaim(candidate.workflow, candidate.order.run);
|
|
618
|
+
releaseClaim(candidate.workflow, candidate.order.run, formatReleaseReason('claim-expired', message));
|
|
618
619
|
return true;
|
|
619
620
|
}
|
|
620
621
|
/** Dispatch already-claimed orders when local child capacity becomes free. */
|
|
@@ -787,7 +788,7 @@ export function createShiftLoop(opts) {
|
|
|
787
788
|
*/
|
|
788
789
|
const releaseOrder = (workflow, order, reason, message) => {
|
|
789
790
|
dropOrder(workflow, order, reason, message);
|
|
790
|
-
releaseClaim(workflow, order.run);
|
|
791
|
+
releaseClaim(workflow, order.run, formatReleaseReason(reason, message));
|
|
791
792
|
// Re-arm the next sweep, but only for the two TRANSIENT reasons — see
|
|
792
793
|
// `SweepResult.releasedForCapacity` for why `agent-lane-closed` is not
|
|
793
794
|
// one of them. The independent cooldown prevents a busy cursor from
|
package/docs/agent-runner.md
CHANGED
|
@@ -17,8 +17,9 @@ which policy applies. If the turn ends without a hub outcome, its
|
|
|
17
17
|
terminal local line repeats the provider-reported runtime model and a bounded
|
|
18
18
|
harness diagnostic when either was reported; missing values are named rather
|
|
19
19
|
than guessed. These messages are telemetry only. The hub remains the sole
|
|
20
|
-
source of task outcome
|
|
21
|
-
|
|
20
|
+
source of task outcome. Its targeted release receives the stable
|
|
21
|
+
`capability-silent-no-submit` reason, while the provider-reported runtime model
|
|
22
|
+
and bounded harness diagnostic remain local to the worker output.
|
|
22
23
|
|
|
23
24
|
Native judge entries do not carry a separately authored `x` map. The definition
|
|
24
25
|
compiler deep-clones the producer step's complete parsed `x` map onto every
|
package/docs/cli.md
CHANGED
|
@@ -688,6 +688,13 @@ The execution settings file is `<config>/settings.json` (see
|
|
|
688
688
|
|
|
689
689
|
`work approvals` distinguishes a worker that is still running and waiting on a
|
|
690
690
|
tool decision from a pending input gate or an `ask` that ends the current run.
|
|
691
|
+
Each human-readable pending approval includes a bounded `call:` title when the
|
|
692
|
+
harness can provide one. Claude preserves a non-empty SDK title; otherwise it
|
|
693
|
+
shows the Bash command, a known file-tool path, or the tool name as a fallback.
|
|
694
|
+
Titles use the adapters' shared 2,000-character cap. The separate `why:` text
|
|
695
|
+
continues to explain the gatekeeper decision. `--json` returns the hub's
|
|
696
|
+
approval rows unchanged and therefore exposes the title, not the full
|
|
697
|
+
model-authored tool-input bag.
|
|
691
698
|
Listing uses the agent credential selected by `OWENLOOP_ACCOUNT` (default
|
|
692
699
|
`default`). `approve` and `deny` always use the stored `human` credential,
|
|
693
700
|
ignore `OWENLOOP_ACCOUNT` and `OWENLOOP_TOKEN`, and require
|
package/docs/shift-logs.md
CHANGED
|
@@ -46,10 +46,11 @@ stdout/stderr, so Shift dispatch preserves them in `<run>.log`. The claim
|
|
|
46
46
|
warning states whether the harness will use its default or an authored step
|
|
47
47
|
model/effort; the terminal message may name the harness-reported runtime model
|
|
48
48
|
and bounded failure context when available. It is intentionally not a
|
|
49
|
-
`shift.log` event
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
these local diagnostics are not
|
|
49
|
+
`shift.log` event. The targeted hub release receives only the stable
|
|
50
|
+
`capability-silent-no-submit` reason; the detailed provider and failure context
|
|
51
|
+
stays in worker output. Local logging can still be disabled as described below,
|
|
52
|
+
in which case the worker remains runnable but these local diagnostics are not
|
|
53
|
+
retained.
|
|
53
54
|
|
|
54
55
|
| Command outcome | Worker channel | Header |
|
|
55
56
|
| --- | --- | --- |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owenloop",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.18",
|
|
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.18",
|
|
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"
|