ta
TanStack
OSS
ta
Pipelines
Nx runs
Insights
Compare tasks
Analytics
Sign in
Toggle Sidebar
ai
ai
Pipelines
fix(ai-harness): join and resume a run on any instance, and no insecure transport defaults (#1781) * fix(ai-harness): no insecure or single-process transport defaults - `canAccess` is now required on `createHarnessHandler` and `handleHarnessSocket`. Forgetting it used to let every principal into every thread. Allow-all is now an explicit `canAccess: () => true`. - A durable host (`stores.log`) runs behind several instances, so a random per-handler `mediaSecret` makes signed media URLs fail on every other instance. The handler now throws at creation on a durable host without `mediaSecret`. A host without a log store keeps the random default. - `oauthConnector` no longer defaults to `login: 'loopback'`, which opened a node:http listener on 127.0.0.1 inside the server process, where the user's browser can never reach it. `login` is now required. A default of `'device'` was rejected: it needs `oauth.deviceUrl`, which many apps do not have, so a silent default would just move the failure to run time. Requiring the choice is the smallest change that is correct for both a CLI (`'loopback'`) and a server (`'device'`). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(ai-harness): join and resume a run on any instance of a durable host On serverless hosting, several instances serve one URL with no sticky routing, and a connection can be cut at any time. - `POST run` streamed with no `id:` lines, so a cut stream could not resume. On a durable host each event now carries its log cursor as `id` (the same cursors as `GET events`). The ai-client SSE adapters already re-send the request with `Last-Event-ID`: the run id is the input id, so the retry finds the same turn (live, or replayed from the log on another instance) and streams after that cursor, without running it again. The `resume` branch of `POST run` does the same. - `GET run?runId=` only found turns in this process. When the turn is not local, a durable host now looks up its thread in `stores.runs` (the run id is the operation id, and every chat turn has a run record), opens the thread, and streams that operation's `harness.event` records from the shared log, from the start or `Last-Event-ID`, live until `harness.operation.finished`. Agent runs and child runs stay 404. - `GET run?threadId=` also reports a turn another instance runs as `activeRun` (from `runs.findActiveRun`), so a reloaded ChatClient on another instance knows to join it. Without a log store nothing changes: no ids on `POST run`, since a process-local cursor means nothing on another instance. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(ai-harness): mark the session view experimental, and say what a cursor is `createSessionView`, `SessionViewState`, and `SessionViewEvents` become public API on publish. Tag them `@experimental` so their shape can still change in a minor release. The HTTP transport page now says that event cursors are opaque strings: log positions on a durable host, process-local counters without a log store. So a deployment with more than one instance needs `stores.log`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
nx run-many --targets=build --exclude=examples/**,testing/**
⌘K
fix(ai-harness): join and resume a run on any instance, and no insecure transport defaults (#1781)
Succeeded
in
5s
Started
Linux
4 CPU cores
read-write
access token used
Copy command
nx run-many --targets=build --exclude=examples/**,testing/**
1757
d4c77e0
GitHub
Open on GitHub
Tasks
Resource Usage
ta
TanStack
OSS