owenloop 0.5.17 → 0.5.19
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/hold/mcp.d.ts +2 -0
- package/dist/packages/work/src/hold/mcp.js +20 -5
- package/dist/packages/work/src/roles/hold.js +1 -0
- package/dist/packages/work/src/submit-file.d.ts +7 -0
- package/dist/packages/work/src/submit-file.js +47 -0
- package/docs/cli.md +21 -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,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.19](https://github.com/typicalday/owenloop/compare/v0.5.18...v0.5.19) (2026-08-22)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **work:** submit an artifact by file reference ([#283](https://github.com/typicalday/owenloop/issues/283)) ([8f0f988](https://github.com/typicalday/owenloop/commit/8f0f988f5a05952340014e40a8aefd4353efa46c))
|
|
13
|
+
|
|
14
|
+
## [0.5.18](https://github.com/typicalday/owenloop/compare/v0.5.17...v0.5.18) (2026-08-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **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))
|
|
20
|
+
|
|
7
21
|
## [0.5.17](https://github.com/typicalday/owenloop/compare/v0.5.16...v0.5.17) (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
|
}
|
|
@@ -48,6 +48,8 @@ export interface HoldMcpDeps {
|
|
|
48
48
|
hub: HubClient;
|
|
49
49
|
workflow: string;
|
|
50
50
|
run: string;
|
|
51
|
+
/** Sole containment root for submit value files. */
|
|
52
|
+
workdir: string;
|
|
51
53
|
/** Positive registration list. Absent exposes the full three-tool server. */
|
|
52
54
|
tools?: readonly HoldMcpToolName[];
|
|
53
55
|
/** Hub origin used to resolve the local machine signing key. */
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
*/
|
|
38
38
|
import { textResult } from "../mcp/server.js";
|
|
39
39
|
import { buildSubmitProof } from "../submit-proof.js";
|
|
40
|
+
import { readSubmitValueFile } from "../submit-file.js";
|
|
40
41
|
import { normalizeSubmitValue } from "../submit-value.js";
|
|
41
42
|
import { createHoldLoop } from "./loop.js";
|
|
42
43
|
export const HOLD_MCP_TOOL_NAMES = ['get_order', 'submit', 'reject', 'ask'];
|
|
@@ -160,15 +161,20 @@ export function createHoldMcp(deps) {
|
|
|
160
161
|
};
|
|
161
162
|
const submitTool = {
|
|
162
163
|
name: 'submit',
|
|
163
|
-
description: 'Submit a receipt for one owed output path of this order. Set done=true when this is the final value for the path. When the hub reports the run has closed, the holder releases and exits.',
|
|
164
|
+
description: 'Submit a receipt for one owed output path of this order. Provide exactly one of value or valueFile. valueFile names a UTF-8 JSON document inside the run working directory. Set done=true when this is the final value for the path. When the hub reports the run has closed, the holder releases and exits.',
|
|
164
165
|
inputSchema: {
|
|
165
166
|
type: 'object',
|
|
166
|
-
required: ['path'
|
|
167
|
+
required: ['path'],
|
|
167
168
|
properties: {
|
|
168
169
|
path: { type: 'string', description: 'The owed output path to submit a receipt for.' },
|
|
169
170
|
value: { description: 'The receipt value (any JSON).' },
|
|
171
|
+
valueFile: { type: 'string', description: 'A UTF-8 JSON file inside the run working directory.' },
|
|
170
172
|
done: { type: 'boolean', description: 'Mark this the final submit for the path.' },
|
|
171
173
|
},
|
|
174
|
+
oneOf: [
|
|
175
|
+
{ required: ['value'] },
|
|
176
|
+
{ required: ['valueFile'] },
|
|
177
|
+
],
|
|
172
178
|
additionalProperties: false,
|
|
173
179
|
},
|
|
174
180
|
handler: async (args) => {
|
|
@@ -179,8 +185,14 @@ export function createHoldMcp(deps) {
|
|
|
179
185
|
if (typeof path !== 'string' || path === '') {
|
|
180
186
|
return textResult({ error: 'submit requires a non-empty string "path"' }, true);
|
|
181
187
|
}
|
|
182
|
-
|
|
183
|
-
|
|
188
|
+
const hasValue = Object.prototype.hasOwnProperty.call(args, 'value');
|
|
189
|
+
const hasValueFile = Object.prototype.hasOwnProperty.call(args, 'valueFile');
|
|
190
|
+
if (hasValue === hasValueFile) {
|
|
191
|
+
return textResult({ error: 'submit-value-source-invalid: provide exactly one of value or valueFile' }, true);
|
|
192
|
+
}
|
|
193
|
+
const valueFile = args['valueFile'];
|
|
194
|
+
if (hasValueFile && (typeof valueFile !== 'string' || valueFile.trim() === '')) {
|
|
195
|
+
return textResult({ error: 'submit-value-file-invalid: valueFile must be a non-empty string' }, true);
|
|
184
196
|
}
|
|
185
197
|
const done = args['done'];
|
|
186
198
|
// Normalize a JSON-encoded string value to the object the hub would
|
|
@@ -188,8 +200,11 @@ export function createHoldMcp(deps) {
|
|
|
188
200
|
// the proof (it stores normalized bytes the signature does not cover),
|
|
189
201
|
// silently, on both sides — see `../submit-value.ts`. One value is used
|
|
190
202
|
// for both the proof and the wire so the two can never diverge.
|
|
191
|
-
const value = normalizeSubmitValue(args['value']);
|
|
192
203
|
try {
|
|
204
|
+
const rawValue = hasValue
|
|
205
|
+
? args['value']
|
|
206
|
+
: await readSubmitValueFile(deps.workdir, valueFile);
|
|
207
|
+
const value = normalizeSubmitValue(rawValue);
|
|
193
208
|
// Submit is also a dynamic-data boundary. Fetch and gate the bound
|
|
194
209
|
// packet even when no origin was supplied for submit-proof signing;
|
|
195
210
|
// otherwise a direct submit call could bypass MCP consume-side
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read a submit value from a JSON document contained in a run worktree.
|
|
3
|
+
*
|
|
4
|
+
* The lexical check rejects traversal before probing the filesystem. The
|
|
5
|
+
* canonical check rejects symlinks whose target leaves the worktree.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readSubmitValueFile(workdir: string, valueFile: unknown): Promise<unknown>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { readFile, realpath } from 'node:fs/promises';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { isInside } from "./harness/gatekeeper.js";
|
|
4
|
+
function errorMessage(error) {
|
|
5
|
+
return error instanceof Error ? error.message : String(error);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Read a submit value from a JSON document contained in a run worktree.
|
|
9
|
+
*
|
|
10
|
+
* The lexical check rejects traversal before probing the filesystem. The
|
|
11
|
+
* canonical check rejects symlinks whose target leaves the worktree.
|
|
12
|
+
*/
|
|
13
|
+
export async function readSubmitValueFile(workdir, valueFile) {
|
|
14
|
+
if (typeof valueFile !== 'string' || valueFile.trim() === '') {
|
|
15
|
+
throw new Error(`submit-value-file-invalid: valueFile must be a non-empty string: ${String(valueFile)}`);
|
|
16
|
+
}
|
|
17
|
+
const candidate = resolve(workdir, valueFile);
|
|
18
|
+
if (!isInside(workdir, candidate)) {
|
|
19
|
+
throw new Error(`submit-value-file-outside-workdir: ${valueFile} is outside the run workdir`);
|
|
20
|
+
}
|
|
21
|
+
let canonicalCandidate;
|
|
22
|
+
try {
|
|
23
|
+
const canonicalWorkdir = await realpath(workdir);
|
|
24
|
+
canonicalCandidate = await realpath(candidate);
|
|
25
|
+
if (!isInside(canonicalWorkdir, canonicalCandidate)) {
|
|
26
|
+
throw new Error(`submit-value-file-outside-workdir: ${valueFile} is outside the run workdir`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (error instanceof Error && error.message.startsWith('submit-value-file-outside-workdir:'))
|
|
31
|
+
throw error;
|
|
32
|
+
throw new Error(`submit-value-file-read-failed: could not read ${valueFile}: ${errorMessage(error)}`);
|
|
33
|
+
}
|
|
34
|
+
let text;
|
|
35
|
+
try {
|
|
36
|
+
text = await readFile(canonicalCandidate, 'utf8');
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
throw new Error(`submit-value-file-read-failed: could not read ${valueFile}: ${errorMessage(error)}`);
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(text);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
throw new Error(`submit-value-file-invalid-json: could not parse ${valueFile}: ${errorMessage(error)}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
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
|
|
@@ -696,6 +703,20 @@ mint or log credentials. If the stored human credential is an expiring OAuth
|
|
|
696
703
|
credential, the decision path may refresh it and persist a rotated token under
|
|
697
704
|
the shared credential lock before answering the hub.
|
|
698
705
|
|
|
706
|
+
### `work hold --mcp` — machine-attached MCP holder
|
|
707
|
+
|
|
708
|
+
`owenloop work hold --order <workflow>/<run> --mcp` keeps the order lease warm
|
|
709
|
+
and exposes the holder's MCP tools over stdio. Its `submit` tool requires
|
|
710
|
+
exactly one of `value` or `valueFile`, along with the owed `path`; `done: true`
|
|
711
|
+
marks the final receipt for that path.
|
|
712
|
+
|
|
713
|
+
`valueFile` is a UTF-8 JSON document resolved inside the holder's run working
|
|
714
|
+
directory. Traversal, outside absolute paths, and symlinks that escape that
|
|
715
|
+
directory are refused. The file is parsed as JSON before the normal submit
|
|
716
|
+
value normalization, so the parsed value is the one sent to the hub and used
|
|
717
|
+
for any submit proof. There is no client-side artifact-size limit; the hub's
|
|
718
|
+
existing size policy still applies.
|
|
719
|
+
|
|
699
720
|
### `util modifier-init`
|
|
700
721
|
|
|
701
722
|
`owenloop util modifier-init --default <value>` is a deterministic helper for
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owenloop",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
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.19",
|
|
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"
|