Skip to content

feat(durable): let a host append Thread-scoped updates to the canonical stream - #43

Merged
systemfsoftware-bot merged 12 commits into
mainfrom
feat/thread-host-update
Nov 25, 2026
Merged

systemfsoftware-bot merged 12 commits into
mainfrom
feat/thread-host-update

Conversation

@systemfsoftware-bot

Copy link
Copy Markdown
Contributor

Stacked on #41.

What

  • A new canonical record, ThreadHostUpdateAppended { updateId, update: PersistedJson, relatedRunId? }. It is Thread-scoped and independent of any Run. Its Thread sequence and commit time come from the envelope rather than from duplicated payload fields.
  • DurableAgentRuntime.appendHostUpdate({ threadId, updateId, update, relatedRunId? }) -> HostUpdateAppended { sequence, deduplicated }.
    • It commits under the Thread's progress gate, through the same progress-gated store the update and worker runtimes use, whether a Run is active or the Thread is idle.
    • It retries tail conflicts up to 8 times, then fails with HostUpdateError reason contention.
    • It is idempotent by updateId: a repeat with the same update returns the first commit, and a repeat with a different update fails with conflict.
    • It never wakes a Run.
  • The prompt fold skips the record, via PROMPT_TRANSPARENT_TAGS. The SQL physical tag code is 39.
  • The record format moves from effect-agent/thread@6 to @7, and the baseline is refreshed with pnpm check:record-format --refresh. The changeset carries a BEHAVIOR CHANGE note and bumps minor on 0.x.

Verification

pnpm typecheck, pnpm lint on the changed files, check:record-format, check:exports and check:package-purity all pass.

No tests were added; candidate tests are pending a separate admission ruling.

…owserSession page type

PageScreenshotRequest takes a required PNG or JPEG format; only JPEG carries a quality. BrowserSession.run's page is exported as BrowserSessionPage, because Puppeteer's Node entry declares a separate Page class that is not assignable to the browser build's.
REST credentials move to an optional lifecycle option. Without them, close sends the browser's own close command and reports unconfirmed cleanup, and read-only Live View fails closed with live-view-requires-rest-credentials. close now returns the cleanup it can prove.
…-binding-only

# Conflicts:
#	docs/src/content/docs/guide/browser.md
…dapter

One stateful pass per session: listeners attach before navigation and record console and page errors, failed requests and error responses past caller ignore rules; readiness waits on a page function and network idle; one JSON script; named-viewport screenshots; document status, a response header, the landed URL and timings. A pass that never reaches the page returns PageInspectionNotRun.
# Conflicts:
#	docs/src/content/docs/guide/browser.md
#	packages/platform-cloudflare/src/BrowserSession.ts
…al stream

A new ThreadHostUpdateAppended record (format @7) carries bounded host JSON on the Thread, independent of any Run. appendHostUpdate commits it under the Thread's progress gate, retries tail conflicts, and is idempotent by updateId. The prompt fold skips it.
@systemfsoftware-bot
systemfsoftware-bot changed the base branch from feat/page-inspection to main November 25, 2026 23:18
@systemfsoftware-bot
systemfsoftware-bot merged commit fae524e into main Nov 25, 2026
14 checks passed
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