owenloop 0.5.4 → 0.5.6
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 +16 -0
- package/dist/packages/work/src/agent/brief.d.ts +28 -4
- package/dist/packages/work/src/agent/brief.js +170 -2
- package/dist/packages/work/src/agent/loop.d.ts +10 -1
- package/dist/packages/work/src/agent/loop.js +60 -3
- package/dist/packages/work/src/agent/workdir.d.ts +22 -0
- package/dist/packages/work/src/agent/workdir.js +80 -0
- package/dist/packages/work/src/exec/loop.d.ts +13 -1
- package/dist/packages/work/src/exec/loop.js +31 -0
- package/dist/packages/work/src/harness/claude.d.ts +24 -0
- package/dist/packages/work/src/harness/claude.js +131 -23
- package/dist/packages/work/src/harness/contract.d.ts +25 -20
- package/dist/packages/work/src/harness/contract.js +25 -20
- package/dist/packages/work/src/harness/gatekeeper.d.ts +124 -0
- package/dist/packages/work/src/harness/gatekeeper.js +208 -0
- package/dist/packages/work/src/hold/mcp.d.ts +11 -2
- package/dist/packages/work/src/hold/mcp.js +69 -2
- package/dist/packages/work/src/hub/client.d.ts +8 -1
- package/dist/packages/work/src/hub/client.js +1 -0
- package/dist/packages/work/src/hub/types.d.ts +29 -0
- package/dist/packages/work/src/roles/agent-run.js +9 -1
- package/dist/packages/work/src/roles/exec.js +9 -0
- package/dist/packages/work/src/roles/shift.js +9 -1
- package/dist/packages/work/src/settings/settings.d.ts +20 -1
- package/dist/packages/work/src/settings/settings.js +23 -1
- package/dist/packages/work/src/shift/runtime.d.ts +7 -0
- package/dist/packages/work/src/shift/runtime.js +29 -4
- package/dist/packages/work/src/shift/spawn.d.ts +12 -2
- package/dist/packages/work/src/shift/spawn.js +16 -3
- package/dist/src/cli.js +54 -1
- package/dist/src/engine.d.ts +46 -1
- package/dist/src/engine.js +72 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/model.d.ts +29 -5
- package/dist/src/model.js +63 -14
- package/dist/src/types.d.ts +8 -2
- package/docs/agent-runner.md +17 -5
- package/docs/cli.md +34 -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/docs/agent-runner.md
CHANGED
|
@@ -59,8 +59,8 @@ A cache created by an older CLI may contain `filesystem` or `network` under `per
|
|
|
59
59
|
| `network: owenloop-only` | supported through isolated settings, skills, MCP, and built-in tools | refused |
|
|
60
60
|
| `network: unrestricted` | supported | supported with `filesystem: unrestricted`, or with an omitted filesystem field and legacy sandbox `workspace-write` / `danger-full-access`; legacy sandbox `read-only` is refused because Codex has no independent read-only network control |
|
|
61
61
|
| `maxTurns` | enforced by the SDK | refused; Codex app-server has no thread or turn limit parameter |
|
|
62
|
-
| `permissionMode: ask` | translated to `default` | translated to `approvalPolicy: untrusted` |
|
|
63
|
-
| `permissionMode: auto-safe` | translated to `auto`,
|
|
62
|
+
| `permissionMode: ask` | translated to `default`, with the adapter's gatekeeper set to `human-gate` | translated to `approvalPolicy: untrusted` |
|
|
63
|
+
| `permissionMode: auto-safe` | translated to `default` (NOT the SDK's `auto`, which never reaches the permission callback), with the adapter's gatekeeper set to `classifier`; no danger companion flag | translated to `approvalPolicy: on-request` |
|
|
64
64
|
| `permissionMode: full-access` | translated to `bypassPermissions` plus the SDK's `allowDangerouslySkipPermissions` companion flag | translated to `approvalPolicy: never` |
|
|
65
65
|
| another adapter's `permissionMode` value | refused; the Claude Code adapter accepts only its own SDK union plus the three neutral values | refused; the Codex adapter accepts only `untrusted`, `on-request`, `never`, plus the three neutral values |
|
|
66
66
|
|
|
@@ -81,12 +81,24 @@ The neutral vocabulary is three positions on one axis, and both shipped harnesse
|
|
|
81
81
|
| Neutral value | What is the gate | Claude Code | Codex |
|
|
82
82
|
|---|---|---|---|
|
|
83
83
|
| `ask` | a human, before anything beyond trivially safe reads | `default` | `untrusted` |
|
|
84
|
-
| `auto-safe` | a
|
|
84
|
+
| `auto-safe` | a classifier; it proceeds on ordinary work and escalates only when an action is potentially dangerous | `default` + the adapter's gatekeeper | `on-request` |
|
|
85
85
|
| `full-access` | nothing; the harness never consults a human and a failed action is reported back to the model | `bypassPermissions` + `allowDangerouslySkipPermissions` | `never` |
|
|
86
86
|
|
|
87
|
-
`auto-safe` is not a milder `full-access`. It can still
|
|
87
|
+
`auto-safe` is not a milder `full-access`. It can still escalate, which is the whole point of it, so an adapter must never map it onto a never-ask mode. The two exist separately so a definition states the choice rather than having it inferred.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
### Who does the gating, and how a headless step escalates
|
|
90
|
+
|
|
91
|
+
The vendor classifiers do not, in practice, consult anyone. The SDK's `auto` mode was probed with five actions — among them a recursive delete on an absolute path outside the session working directory, an outbound network request, and a read of a file outside that directory. It consulted the host on none of them, auto-denied none of them, and four ran. `auto` also never reaches the SDK's `canUseTool` callback, so no host-side wiring can give it an exception path.
|
|
92
|
+
|
|
93
|
+
The Claude Code adapter therefore does not delegate `auto-safe` to `auto`. Both `ask` and `auto-safe` translate to `default`, the one SDK mode that routes every unapproved tool call to `canUseTool`, and the adapter's own gatekeeper decides:
|
|
94
|
+
|
|
95
|
+
- **Path containment.** A tool call naming a path outside the step's working directory escalates, under either policy. This is decidable and is the check that catches the probes above.
|
|
96
|
+
- **A shell deny-list.** Under `auto-safe`, `Bash` escalates on a short list of destructive or exfiltrating patterns (`sudo`, recursive force-delete, device writes, ownership changes, `curl`/`wget` carrying a request body, changes to what runs on the machine outside the step). It is a deny-list, not a proof: an obfuscated command gets past it. A step whose every command must be reviewed says `ask`, which escalates all of them without consulting the list.
|
|
97
|
+
- **Policy.** `ask` allows only a contained read and escalates everything else. `auto-safe` allows ordinary work and escalates what the two checks above establish. The worker-owned `owenloop` MCP mount is allowed under both, because gating it would remove a stuck step's ability to say so.
|
|
98
|
+
|
|
99
|
+
An escalation in a Shift-dispatched run cannot be a synchronous prompt — no person is watching at the moment of the call, and a call left waiting is a stall that re-arms the step into a retry storm. The adapter denies the call and routes the agent to the `ask` MCP tool, which freezes the owed artifact, closes the run without burning further attempts, and puts the question on a human's attention feed with an answer path back into the next attempt. The denial is also emitted as a progress event, so an operator can see a gate that fired.
|
|
100
|
+
|
|
101
|
+
A step that names no `permissionMode` at all reaches the SDK's `default` and is gated under the `classifier` policy. Before the gatekeeper existed such a step was denied wholesale — `default` denies when no callback is wired — silently and finally, with nobody prompted and nothing recorded.
|
|
90
102
|
|
|
91
103
|
For each neutral value an adapter must either map it onto the vendor mode with the same meaning, or refuse it in preflight. Refusal is a legitimate answer and fails closed: the worker releases its claim and starts no model process. Mapping a value onto a mode that grants more than the value describes is never legitimate.
|
|
92
104
|
|
package/docs/cli.md
CHANGED
|
@@ -189,6 +189,7 @@ The same directory holds `credentials.json`, `allowed_signers`, `org-root.pub`,
|
|
|
189
189
|
owenloop shift start <crew...> [--all] [--origin <url>] [--as <account>] [--name <n>]
|
|
190
190
|
[--cap <n>] [--max-agents <n>] [--poll-interval <ms>] [--once]
|
|
191
191
|
[--cache-dir <p>] [--state-dir <p>] [--log-dir <p>] [--log-max-age <ms>]
|
|
192
|
+
[--work-root <dir>]...
|
|
192
193
|
```
|
|
193
194
|
|
|
194
195
|
At least one named crew is required unless `--all` is present. `--all` and
|
|
@@ -209,6 +210,7 @@ one loop sweep and exits instead of keeping the foreground daemon running.
|
|
|
209
210
|
| `--cache-dir <p>` | cache root; precedence is flag, then `OWENLOOP_CACHE_DIR`, then `settings.cacheDir`, then `$XDG_CACHE_HOME/owenloop`, then `$HOME/.cache/owenloop` |
|
|
210
211
|
| `--state-dir <p>` | socket and child-state root; precedence is flag, then `OWENLOOP_STATE_DIR`, then `settings.stateDir`, then `$XDG_STATE_HOME/owenloop/exec`, then `$HOME/.local/state/owenloop/exec`; the socket is `shift.sock` inside this directory |
|
|
211
212
|
| `--log-dir <p>` | where `shift.log` and each `<run>.log` are written; precedence is flag, then `OWENLOOP_SHIFT_LOG_DIR`, then `settings.shiftLogDir`, then the resolved state directory |
|
|
213
|
+
| `--work-root <dir>` | **repeatable.** restrict this machine to orders whose working directory is inside one of these roots; precedence is the flags, then `OWENLOOP_ALLOWED_WORKDIR_ROOTS` (a `:`-separated list), then `settings.allowedWorkdirRoots`. Each rung REPLACES the one below it rather than extending it. No rung set anywhere ⇒ **no restriction**, which is the default |
|
|
212
214
|
| `--log-max-age <ms>` | worker-log retention, swept once at startup; precedence is flag, then `OWENLOOP_SHIFT_LOG_MAX_AGE_MS`, then `settings.shiftLogMaxAgeMs`, then `1209600000` (14 days). `0` reaps every completed run's log at the next startup; there is no value that disables the sweep, and `shift.log` is never reaped |
|
|
213
215
|
|
|
214
216
|
**On-disk logs.** A running shift appends its dispatch record to
|
|
@@ -219,6 +221,38 @@ dispatch: the shift reports it once on stderr and serves with logging disabled.
|
|
|
219
221
|
Full field-by-field contract, retention rules, and uploader notes in
|
|
220
222
|
[`docs/shift-logs.md`](shift-logs.md).
|
|
221
223
|
|
|
224
|
+
**Where a shift will do work.** A shift is not bound to a project: it is an
|
|
225
|
+
orchestrator that runs whatever its crews are offered. `--work-root` is how the
|
|
226
|
+
person who owns the machine bounds that — it is a **local** policy, declared at
|
|
227
|
+
the shift, and the hub is never asked and never informed in advance.
|
|
228
|
+
|
|
229
|
+
The check happens in the WORKER, not in dispatch. The shift's `whats_next` sweep
|
|
230
|
+
receives a `WorkOrder`, which carries no working directory at all; only the
|
|
231
|
+
`OrderPacket` a worker fetches with `get_order` has one. So `owenloop work exec`
|
|
232
|
+
and `owenloop work agent-run` each resolve the roots themselves — from
|
|
233
|
+
`OWENLOOP_ALLOWED_WORKDIR_ROOTS`, which the shift exports into every child it
|
|
234
|
+
spawns, or from the settings file when run by hand — and refuse there.
|
|
235
|
+
|
|
236
|
+
A refusal is a **release**, not a failure. The order is valid; this machine is
|
|
237
|
+
simply not configured to host that tree. The worker releases its claim, exits
|
|
238
|
+
non-zero, and writes one line to `<log-dir>/<run>.log` naming the directory and
|
|
239
|
+
the roots. The order returns to the hub's pickup window, where a machine that
|
|
240
|
+
*is* configured for that tree can take it.
|
|
241
|
+
|
|
242
|
+
Only a workdir the ORDER names is checked. A step that declares neither
|
|
243
|
+
`workdir:` nor `workdirFrom:` falls back to a directory the operator already
|
|
244
|
+
controls — the shift's own launch directory for a command step, or
|
|
245
|
+
`<workRoot>/<workflow>/<run>/` for an agent step — and is never denied.
|
|
246
|
+
|
|
247
|
+
`--work-root` is not `--work-root`'s neighbour `workRoot`. `workRoot` (settings,
|
|
248
|
+
`OWENLOOP_WORK_ROOT`) is the ONE directory owenloop **creates** per-run
|
|
249
|
+
directories under. `--work-root` / `allowedWorkdirRoots` is the SET of
|
|
250
|
+
directories an order is **allowed to name**. Neither derives from the other.
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
owenloop shift start build --work-root ~/code --work-root /srv/work
|
|
254
|
+
```
|
|
255
|
+
|
|
222
256
|
**One harness per shift.** A shift has no per-order harness switch and no
|
|
223
257
|
`--harness` flag. It never puts `--harness` on a worker's command line; each
|
|
224
258
|
`agent-run` child resolves its own adapter, in this order:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owenloop",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
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.6",
|
|
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"
|