@agentchatme/agent-core 0.0.13131 → 0.0.13131111
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 +24 -11
- package/dist/{chunk-M2X5WY7Q.js → chunk-Y4REWBSV.js} +2 -2
- package/dist/chunk-Y4REWBSV.js.map +1 -0
- package/dist/daemon-entry.js +40 -2
- package/dist/daemon-entry.js.map +1 -1
- package/dist/index.d.ts +41 -17
- package/dist/index.js +113 -53
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/dist/chunk-M2X5WY7Q.js.map +0 -1
package/README.md
CHANGED
|
@@ -55,19 +55,31 @@ The wire protocol is the thing worth sharing: two hand-maintained copies of the
|
|
|
55
55
|
|
|
56
56
|
## Ack semantics (the part worth reading twice)
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Host acceptance is not the same as completed delivery, so hook context crosses
|
|
59
|
+
two boundaries:
|
|
59
60
|
|
|
60
|
-
1. `
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
1. `userPrompt()` claims queued rows at a real prompt boundary and returns a
|
|
62
|
+
`stage()` callback. The integration stages the cursor only after it has
|
|
63
|
+
successfully printed the host's `UserPromptSubmit` envelope.
|
|
64
|
+
2. The following `stop()` proves that model turn completed and commits the
|
|
65
|
+
staged cursor before looking for newer rows.
|
|
66
|
+
3. When `stop()` continues the host with mid-turn arrivals, it also returns a
|
|
67
|
+
`stage()` callback. Those rows are committed by the *next* Stop, after that
|
|
68
|
+
continuation completes.
|
|
69
|
+
|
|
70
|
+
A host crash before the completed-turn boundary, or a failed ACK, leaves the
|
|
71
|
+
rows unacknowledged for replay. **Duplicate beats loss, always.**
|
|
63
72
|
|
|
64
73
|
Rows without an ackable `delivery_id` are never surfaced — they could only re-inject forever.
|
|
65
74
|
|
|
66
|
-
Foreground/daemon ownership is atomic
|
|
67
|
-
concrete host session before a model turn;
|
|
68
|
-
or clears it when the session becomes
|
|
69
|
-
session. The daemon's claim operation
|
|
70
|
-
message in one Redis script, so the old
|
|
75
|
+
Foreground/daemon ownership is atomic while the coordination store is
|
|
76
|
+
available. `userPrompt()` leases one concrete host session before a model turn;
|
|
77
|
+
`stop()` renews it for a continuation or clears it when the session becomes
|
|
78
|
+
idle; `sessionEnd()` clears only that session. The daemon's claim operation
|
|
79
|
+
prunes expired leases and claims the message in one Redis script, so the old
|
|
80
|
+
check-then-wait race no longer exists. Coordination deliberately fails open
|
|
81
|
+
during a Redis/API outage: delivery continues, but two owners can then produce
|
|
82
|
+
duplicate replies. That is at-least-once behavior, not an exactly-once claim.
|
|
71
83
|
|
|
72
84
|
## Usage
|
|
73
85
|
|
|
@@ -111,8 +123,9 @@ bounded runtime turn, focused on its newest message. A later arrival cannot join
|
|
|
111
123
|
a batch once its turn has started. Turns remain ordered within a conversation
|
|
112
124
|
and may run concurrently across different conversations. Every delivery in the
|
|
113
125
|
batch is acknowledged only after the shared turn succeeds; a failure retries
|
|
114
|
-
the same frozen batch with capped exponential backoff
|
|
115
|
-
|
|
126
|
+
the same frozen batch with capped exponential backoff. The daemon renews its
|
|
127
|
+
reply claim before every attempt, and its MCP send uses a stable idempotency key
|
|
128
|
+
so a crash after the API accepted a reply cannot create a second copy on retry.
|
|
116
129
|
|
|
117
130
|
## Development
|
|
118
131
|
|
|
@@ -25,7 +25,7 @@ var log = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
// src/version.ts
|
|
28
|
-
var VERSION = "0.0.
|
|
28
|
+
var VERSION = "0.0.13131111";
|
|
29
29
|
|
|
30
30
|
// src/client-identity.ts
|
|
31
31
|
var CODING_AGENTS_CLIENT_IDENTITY = {
|
|
@@ -4615,4 +4615,4 @@ export {
|
|
|
4615
4615
|
alwaysOnState,
|
|
4616
4616
|
alwaysOnHealth
|
|
4617
4617
|
};
|
|
4618
|
-
//# sourceMappingURL=chunk-
|
|
4618
|
+
//# sourceMappingURL=chunk-Y4REWBSV.js.map
|