@dudousxd/nestjs-agent 1.16.1 → 1.17.1
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/README.md +15 -0
- package/dist/durable/index.cjs +1686 -1616
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +1 -0
- package/dist/durable/index.d.ts +1 -0
- package/dist/durable/index.js +1012 -942
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +452 -392
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -2
- package/dist/index.d.ts +32 -2
- package/dist/index.js +73 -15
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -286,6 +286,21 @@ turns it on), or upload through your own route and give the React side your own
|
|
|
286
286
|
your `resolve` recognises. `list` is optional and only needed for `GET /agent/attachments` and
|
|
287
287
|
sweeping.
|
|
288
288
|
|
|
289
|
+
### A turn that dies mid-step
|
|
290
|
+
|
|
291
|
+
A failing run settles what it left: the calls it had put to a person become `failed`
|
|
292
|
+
(`AgentStore.failUnsettledToolCalls`), its run row is settled and its thread released — also when
|
|
293
|
+
the durable runtime refused a checkpoint position, where nothing can be journaled and the three
|
|
294
|
+
are written straight to the store. The next turn on the thread is shown a result for every tool
|
|
295
|
+
call the dead one made. `AgentService.approve` / `reject` / `answer` / `skip` (and
|
|
296
|
+
`signalToolCall`) throw `RunNotActiveException` — `409 { code: 'run_not_active' }` — when the run
|
|
297
|
+
that asked has ended, instead of signalling a run that will never read it. The stream's error
|
|
298
|
+
frame carries a stable `code` and, in production, a generic message (`exposeStreamErrorDetails`
|
|
299
|
+
from core overrides that); the error itself is logged with its run id and kept on the run row.
|
|
300
|
+
|
|
301
|
+
A tool receives `ctx.idempotencyKey` (`<runId>:<toolCallId>`) — pass it on to whatever the tool
|
|
302
|
+
writes to, so a call re-executed after a worker crash lands on the first attempt.
|
|
303
|
+
|
|
289
304
|
### Who may read a run
|
|
290
305
|
|
|
291
306
|
`GET /agent/chat/:runId/stream` and `POST /agent/chat/:runId/cancel` both resolve the acting actor
|