@reinsjs/agent 0.6.0 → 0.6.2
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/CHANGELOG.md +17 -0
- package/README.md +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @reinsjs/agent
|
|
2
2
|
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [61eacbb]
|
|
8
|
+
- @reinsjs/server@0.6.1
|
|
9
|
+
- @reinsjs/ui-agui@0.4.1
|
|
10
|
+
|
|
11
|
+
## 0.6.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 720a809: HTTP mid-run input. `createAgentHandler(agent, { midRunInput: true })` queues a user message that arrives while the session's run is active in this process — sent by the run's own principal, without `resume` / `decisions` — into a per-run in-memory mailbox and answers `202 { status: "queued", sessionId, deliveryId }`; the run writes it into the timeline before its next model call. New request field `deliveryId` (also accepted when a `POST` starts a run) becomes the message's `provenance.ref` with `source: USER_DELIVERY_SOURCE`; delivery is judged by that event appearing in the timeline. Undelivered messages are dropped when the run ends; other cases still answer `409`, a full mailbox (16 waiting) answers `429 mailbox_full`. `@reinsjs/ui-agui` now copies a user message's `provenance` onto its `TEXT_MESSAGE_START` as `metadata.reins.provenance`; other events are unchanged.
|
|
16
|
+
- Updated dependencies [720a809]
|
|
17
|
+
- @reinsjs/server@0.6.0
|
|
18
|
+
- @reinsjs/ui-agui@0.4.0
|
|
19
|
+
|
|
3
20
|
## 0.6.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ for await (const event of agent.run({ input: "Ship staging" })) console.log(even
|
|
|
39
39
|
|
|
40
40
|
`run()` yields every event as it is appended and returns `done | paused | handoff | error`. A `paused` result carries a small signed `state`; resume from any process with `agent.run({ sessionId, resume: state, decisions: [{ toolCallId, approved: true, by: "alice" }] })`.
|
|
41
41
|
|
|
42
|
-
Messages that reach your host while a run is going can be handed to the model before its next call: pass `agent.run({ input, pullInput })` (see "Input that arrives mid-run" in `@reinsjs/core`). It is a per-run option — `createAgent` does not take it,
|
|
42
|
+
Messages that reach your host while a run is going can be handed to the model before its next call: pass `agent.run({ input, pullInput })` (see "Input that arrives mid-run" in `@reinsjs/core`). It is a per-run option — `createAgent` does not take it, and `asTool` sub-agents never pull. Over HTTP, `handler: { midRunInput: true }` queues a message that arrives while the session's run is active into that run instead of answering `409` (see "Messages during a run" in `@reinsjs/server`).
|
|
43
43
|
|
|
44
44
|
## Agents as tools
|
|
45
45
|
|
|
@@ -64,7 +64,7 @@ Whether to call an expert, what to ask, and whether to trust the answer are the
|
|
|
64
64
|
- A loop of a few hundred lines you can read and copy, with pause/resume as a return value.
|
|
65
65
|
- Brain modules that let the model tidy its own context, keep constraints, spill big results, remember, ask before dangerous actions, and stop at a budget — each optional, each measured before it became a default.
|
|
66
66
|
- Fail-closed defaults: unknown events are rejected, forged approval decisions cannot enter through the input, sessions are `404` to anyone not explicitly authorized.
|
|
67
|
-
- One run per session across processes when the store provides a `RunLease` (`pgStores()` does): `createAgent` installs `leasedRunRegistry` with its defaults (30 s lease, random owner). To tune `ttlMs` / `owner`, build it yourself and pass `handler: { runs }` — see "Multiple instances" in `@reinsjs/server`.
|
|
67
|
+
- One run per session across processes when the store provides a `RunLease` (`pgStores()` does): `createAgent` installs `leasedRunRegistry` with its defaults (30 s lease, random owner). To tune `ttlMs` / `owner`, build it yourself and pass `handler: { runs }` — see "Multiple instances" in `@reinsjs/server`. If you call `createAgent` per request (tools assembled per session), build the registry once at process level and pass the same `handler: { runs }` every time; each call otherwise gets its own: stop requests and mid-run input do not reach a run started by another call, and a second request on a busy session answers `409` saying the run is "on another instance" — or, without a `RunLease`, starts a second run on the same session.
|
|
68
68
|
|
|
69
69
|
## Documentation
|
|
70
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reinsjs/agent",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "reins — hand the reins to the model. createAgent() + re-exports of @reinsjs/core, @reinsjs/server and @reinsjs/ui-agui",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@reinsjs/core": "0.11.0",
|
|
39
|
-
"@reinsjs/server": "0.
|
|
40
|
-
"@reinsjs/ui-agui": "0.
|
|
39
|
+
"@reinsjs/server": "0.6.1",
|
|
40
|
+
"@reinsjs/ui-agui": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=22"
|