Skip to content

harness: a durable turn loop - #2315

Closed
aron-cf wants to merge 1 commit into
tiny-harness-1from
tiny-harness-2
Closed

aron-cf wants to merge 1 commit into
tiny-harness-1from
tiny-harness-2

Conversation

@aron-cf

@aron-cf aron-cf commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

A sketch of a very basic harness based on top of Tasks as the durable alarm loop. It uses AG-UI events as the basis for the message stream.

The task loop is captured in turn.ts, though I'm exploring replacing this with a state-machine based on discussion with @mattzcarey.

There is also a sketch of an approval gate based on top of #2314, to ensure it fits the pattern.

A TinyHarness that accepts a prompt, runs model rounds against a
scripted adapter, projects AG-UI events onto a durable stream, and
settles. No tools, no workspace, no HTTP, no UI -- those stack on top.

turn.ts carries the whole loop and is the bulk of this PR. It survives
without tools because tool execution enters through one injected
deps.runTool seam; harness.ts supplies a bundle of host-registered
tools only, and later PRs add the built-in layers.

approval.ts ships whole but idle. ApprovalMode's 'auto' kind returns
without touching the journal, so nothing parks yet. Its tests need a
tool to gate, so they arrive with exec rather than here -- the plan
assumed otherwise and was wrong about it.

Two seams exist only so the stack can be reviewed in order, and both
are reverted by later PRs: workspace seeding and the AGENTS.md default
are dropped from onStart, and #systemPrompt returns a minimal string
instead of calling buildSystemPrompt.
@changeset-bot

changeset-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5e445aa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@aron-cf aron-cf closed this Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant