@orkestrel/scaffold 0.0.6 → 0.0.8
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/dist/bin/scaffold.js +90 -41
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/CLAUDE.md +53 -27
- package/dist/host/guides/src/scaffold.md +303 -154
- package/dist/host/tests/setupPolicy.ts +1 -0
- package/dist/src/core/index.cjs +639 -322
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +189 -31
- package/dist/src/core/index.d.ts +189 -31
- package/dist/src/core/index.js +629 -323
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +45 -14
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +16 -6
- package/dist/src/server/index.d.ts +16 -6
- package/dist/src/server/index.js +46 -16
- package/dist/src/server/index.js.map +1 -1
- package/package.json +11 -9
package/dist/host/CLAUDE.md
CHANGED
|
@@ -212,7 +212,7 @@ verifies its CLI is present before running and stops with a deviation report nam
|
|
|
212
212
|
fallback when it is not. Benches are cross-provider reach only: a model native to the running
|
|
213
213
|
harness never crosses a bridge.
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
Four bench laws apply to every external engine:
|
|
216
216
|
|
|
217
217
|
- **Transport by work class.** A short interactive exchange (one bounded question or a
|
|
218
218
|
follow-up on a live thread, expected to finish in about two minutes) may use an MCP
|
|
@@ -221,19 +221,27 @@ Three bench laws apply to every external engine:
|
|
|
221
221
|
session invisibly, while a journal survives any client-side failure.
|
|
222
222
|
- **Journal first.** Every bench invocation leaves a tailable on-disk record under
|
|
223
223
|
`tmp/<bench>/` (`tmp/codex/`, `tmp/cursor/`): the brief as a file, the event stream or
|
|
224
|
-
output log, and the final answer.
|
|
225
|
-
journal
|
|
226
|
-
|
|
224
|
+
output log, and the final answer. Every long exec also carries exactly one Monitor on its
|
|
225
|
+
journal — a filtered tail that emits milestones (commands run, files changed, agent
|
|
226
|
+
messages, terminal states) and never the raw event firehose — so progress arrives in the
|
|
227
|
+
conversation while the journal stays tailable for depth. The filter exits on the exec's
|
|
228
|
+
terminal event, so the monitor's lifecycle matches the exec's and no watcher outlives its
|
|
229
|
+
subject. The journal's mtime is the liveness signal; the session id in the journal head is
|
|
230
|
+
the recovery handle. Briefs never travel as fragile shell arguments.
|
|
231
|
+
- **Tracked, never loose.** Every bench unit is registered in the session task registry at
|
|
232
|
+
launch — subject, journal path, session id — and completed there at acceptance, so "what is
|
|
233
|
+
running" always has a first-class answer instead of a recollection of a command.
|
|
227
234
|
- **Ephemeral journals.** Everything under `tmp/` is unit evidence, never committed. Bridges
|
|
228
235
|
never delete journals; the Orchestrator sweeps `tmp/codex/` and `tmp/cursor/` once at
|
|
229
236
|
campaign acceptance, after the final gate evidence is recorded. A journal surviving past
|
|
230
237
|
its campaign is residue.
|
|
231
238
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
the
|
|
235
|
-
|
|
236
|
-
|
|
239
|
+
Every long bench exec is launched by the Orchestrator as a harness-tracked background command
|
|
240
|
+
under a hard time cap, never detached from inside a bridge agent: the harness owns the
|
|
241
|
+
lifecycle, completion re-invokes the session, and the cap kills a wedged bench loudly instead
|
|
242
|
+
of trusting the bridge to report its own failure. A wedged bridge is silent, and silence must
|
|
243
|
+
never read as progress. A stalled journal or a cap-killed exec follows the deviation ladder,
|
|
244
|
+
with the session id from the journal head as the recovery handle.
|
|
237
245
|
|
|
238
246
|
### Cursor Grok
|
|
239
247
|
|
|
@@ -244,6 +252,10 @@ journal head as the recovery handle.
|
|
|
244
252
|
`"$LOCALAPPDATA/cursor-agent/agent.cmd"` — verified with `--version` before first use. Long
|
|
245
253
|
briefs are written to `tmp/cursor/<unit>-brief.md` and the prompt points at the file. The
|
|
246
254
|
tee'd log is the bench's journal.
|
|
255
|
+
- A long ask-mode run obeys the same launch, stream, and ledger discipline as a Codex exec:
|
|
256
|
+
the Orchestrator starts it as a harness-tracked background command under a time cap,
|
|
257
|
+
registers the unit in the task registry, and arms one Monitor on the tee'd log for
|
|
258
|
+
milestones. The `grok` bridge drafts the brief; it never detaches a run and ends its turn.
|
|
247
259
|
- Read-only. `--force` never appears. Nothing it returns is applied.
|
|
248
260
|
- Read the exact model id from `agent models` and store it in `CURSOR_GROK_MODEL`. Never guess
|
|
249
261
|
or substitute.
|
|
@@ -260,11 +272,12 @@ journal head as the recovery handle.
|
|
|
260
272
|
- Reached from Claude Code only through the `codex` role, on journaled, resumable
|
|
261
273
|
`codex exec`; in a Codex session these are native agents.
|
|
262
274
|
- **Every run is journaled and resumable.** `--json` streams the event log to
|
|
263
|
-
`tmp/codex/<unit>.jsonl` (gitignored; the
|
|
264
|
-
`--output-last-message` captures the final answer as a file, and
|
|
265
|
-
journal head goes in
|
|
266
|
-
`codex exec resume <session-id>` with
|
|
267
|
-
the Orchestrator wants a
|
|
275
|
+
`tmp/codex/<unit>.jsonl` (gitignored; the Monitor emits its milestones and the user tails it
|
|
276
|
+
for depth — nobody polls), `--output-last-message` captures the final answer as a file, and
|
|
277
|
+
the session id from the journal head goes in the unit's task registry entry and every bridge
|
|
278
|
+
report so follow-ups continue the same session via `codex exec resume <session-id>` with
|
|
279
|
+
context intact. `--output-schema` is available when the Orchestrator wants a
|
|
280
|
+
machine-checkable return shape.
|
|
268
281
|
- **Transport is chosen by work class.** The MCP wiring (`.mcp.json` registers
|
|
269
282
|
`codex mcp-server`; verified tools `codex` to start a session, `codex-reply` to continue
|
|
270
283
|
one; settings enable project MCP servers without prompting, so the wiring works headless —
|
|
@@ -272,19 +285,27 @@ journal head as the recovery handle.
|
|
|
272
285
|
short interactive exchanges only, and the bridge persists the thread id to
|
|
273
286
|
`tmp/codex/<unit>.session` the moment a response carries it — an interrupted MCP call with
|
|
274
287
|
no persisted id is unrecoverable and treated as failed. Long-running work (audits,
|
|
275
|
-
implementation units) always uses the journaled CLI
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
implementation units) always uses the journaled CLI, and the Orchestrator — never a bridge
|
|
289
|
+
agent — launches it as a harness-tracked background command: the brief at
|
|
290
|
+
`tmp/codex/<unit>-brief.md`, then one
|
|
291
|
+
`timeout <cap> codex exec --json … < /dev/null > tmp/codex/<unit>.jsonl` with
|
|
292
|
+
`--output-last-message`, started through the shell's background-task mechanism so the exec
|
|
293
|
+
appears in the session's task list, its completion re-invokes the session, and the cap kills
|
|
294
|
+
a wedged bench loudly. Stdin is always closed with `< /dev/null`: a background-launched exec
|
|
295
|
+
can inherit an open stdin pipe and wedge forever at "Reading additional input from stdin..."
|
|
296
|
+
before its first event, and a cap kill is the only thing that would ever surface it.
|
|
297
|
+
The journal remains the durable, resumable record and the session id the recovery handle. A
|
|
298
|
+
bridge that backgrounds an exec and ends its turn orphans it — no owner, no completion
|
|
299
|
+
signal, no death notice — so bridges keep two jobs only: drafting briefs and short MCP
|
|
300
|
+
exchanges. Placeholder wait loops and wait-promise reports are deviations. Every exec names
|
|
301
|
+
its working directory with `-C`, and an exec rooted outside a trusted git repository dies at
|
|
302
|
+
launch unless `--skip-git-repo-check` is passed, so cross-repo and fleet-container work
|
|
303
|
+
rooted outside a checkout always passes it. A launch is not a launch until the journal grows
|
|
304
|
+
past its header: the Orchestrator confirms the event stream advanced beyond the
|
|
305
|
+
session-configured head before recording the exec started, and treats an instantly-dead
|
|
306
|
+
journal as a failed launch whose tail is the evidence. Recovery ladder on interruption:
|
|
307
|
+
persisted-id `codex-reply` re-emission → fresh CLI session with the same brief file → for an
|
|
308
|
+
interrupted CLI exec, the journal survives and the Orchestrator chooses resume or fresh.
|
|
288
309
|
- **The inverse bridge exists too:** Claude Code exposes `claude mcp serve`, registered in
|
|
289
310
|
Codex's global config (`codex mcp add claude -- claude mcp serve`) so Codex-primary
|
|
290
311
|
sessions reach Claude/Opus as first-class MCP tools instead of shelling to the CLI.
|
|
@@ -294,6 +315,11 @@ journal head as the recovery handle.
|
|
|
294
315
|
- `implementer` runs `gpt-5.6-sol` at high effort with `--sandbox workspace-write` in the
|
|
295
316
|
main checkout as the sole writer from a clean committed baseline, for bounded
|
|
296
317
|
implementation.
|
|
318
|
+
- **The exec sandbox denies network** (`--unshare-net`). Any unit that needs the registry or
|
|
319
|
+
any other remote endpoint — lockfile generation, real installs, live fetches — belongs to
|
|
320
|
+
the Orchestrator's own tracked commands or a network-capable native agent, never to a Codex
|
|
321
|
+
exec. A Sol exec observed hanging on `npm` until its cap fires is the signature of this
|
|
322
|
+
misroute, not of a slow bench.
|
|
297
323
|
- Raise the analyst to `xhigh` only for a stated hard reasoning need. `gpt-5.6-terra` serves
|
|
298
324
|
only explicitly mechanical, taste-free roles. `gpt-5.6-luna` requires a proven repeatable,
|
|
299
325
|
high-volume workload.
|