instar 1.3.165 → 1.3.166
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/dist/messaging/installAgentMessageHook.d.ts.map +1 -1
- package/dist/messaging/installAgentMessageHook.js +18 -8
- package/dist/messaging/installAgentMessageHook.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.166.md +24 -0
- package/upgrades/side-effects/a2a-inbox-accept-boundary.md +40 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installAgentMessageHook.d.ts","sourceRoot":"","sources":["../../src/messaging/installAgentMessageHook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAmB,MAAM,0BAA0B,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;oFACoF;AACpF,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE7G,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,EAAE,gBAAgB,CAAC;IAC/B;;sDAEkD;IAClD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,2BAA2B,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"installAgentMessageHook.d.ts","sourceRoot":"","sources":["../../src/messaging/installAgentMessageHook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAmB,MAAM,0BAA0B,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;oFACoF;AACpF,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE7G,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,EAAE,gBAAgB,CAAC;IAC/B;;sDAEkD;IAClD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,2BAA2B,GAAG,gBAAgB,CAkGzF"}
|
|
@@ -83,16 +83,26 @@ export function buildAgentMessageHook(deps) {
|
|
|
83
83
|
telegramSenderChatId: input.senderChatId,
|
|
84
84
|
topicId: input.topicId,
|
|
85
85
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
// Accept-boundary (the #581 / #3 class — this is the THIRD a2a path): a role
|
|
87
|
+
// handler (e.g. the mentee mentor-message handler) SPAWNS a session and
|
|
88
|
+
// bounded-waits for the reply — that can take MINUTES — and delivers its
|
|
89
|
+
// reply OUT via a separate a2a message, not this HTTP response. AWAITING it
|
|
90
|
+
// here meant the caller's /a2a/inbox POST waited the full handler, so the
|
|
91
|
+
// sender's ~10s `AbortSignal.timeout` fired and logged a FALSE "local-inbox
|
|
92
|
+
// delivery attempt failed" (the message was in fact accepted — its id is
|
|
93
|
+
// marked processed above — and the reply will arrive on its own channel).
|
|
94
|
+
// Respond ACCEPTED immediately and run the handler in the background. The
|
|
95
|
+
// idempotency mark above still dedups any retry; a handler failure is caught
|
|
96
|
+
// + logged async (it can't reject a response that already returned).
|
|
97
|
+
void Promise.resolve()
|
|
98
|
+
.then(() => handler(msg, { topicId: input.topicId, senderBotId: input.senderBotId }))
|
|
99
|
+
.catch((err) => {
|
|
100
|
+
// A role-handler failure is recorded but doesn't un-mark the id (we still
|
|
101
|
+
// treat the message as processed; retrying would just re-fail). Stage-B
|
|
102
|
+
// forensics can see the routed row + the absence of a downstream effect.
|
|
93
103
|
// eslint-disable-next-line no-console
|
|
94
104
|
console.error(`[a2a] role-handler "${msg.role}" failed:`, err instanceof Error ? err.message : String(err));
|
|
95
|
-
}
|
|
105
|
+
});
|
|
96
106
|
return { handled: true };
|
|
97
107
|
};
|
|
98
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installAgentMessageHook.js","sourceRoot":"","sources":["../../src/messaging/installAgentMessageHook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,GAIZ,MAAM,yBAAyB,CAAC;AAmBjC;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAiC;IACrE,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAEzD,OAAO,KAAK,EAAE,KAAK,EAAE,EAAE;QACrB,MAAM,GAAG,GAAoB;YAC3B,GAAG,EAAE,KAAK,CAAC,IAAI;YACf,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,YAAY,EAAE,KAAK,CAA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EAA6E;QAC7E,qEAAqE;QACrE,KAAK,OAAO,CAAC,OAAO,EAAE;aACnB,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;aACpF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,0EAA0E;YAC1E,wEAAwE;YACxE,yEAAyE;YACzE,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,uBAAuB,GAAG,CAAC,IAAI,WAAW,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9G,CAAC,CAAC,CAAC;QACL,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-31T12:02:03.497Z",
|
|
5
|
+
"instarVersion": "1.3.166",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What to Tell Your User
|
|
7
|
+
|
|
8
|
+
If you run multiple agents that talk to each other, you'll stop seeing spurious "delivery failed" timeouts in the logs for messages that actually went through fine. The receiving agent now confirms it got the message right away and does the work in the background, and the reply still comes back as normal.
|
|
9
|
+
|
|
10
|
+
## Summary of New Capabilities
|
|
11
|
+
|
|
12
|
+
- The agent-to-agent inbox hook (the third and last of the agent-to-agent transports) now responds at the accept boundary: it acknowledges immediately after validating the message and runs the (potentially minutes-long) handler in the background, instead of making the sender wait through it. Completes the same fix already shipped for the co-located relay and the cross-machine threadline paths.
|
|
13
|
+
|
|
14
|
+
## Evidence
|
|
15
|
+
|
|
16
|
+
- Found in the agent's own server log: recurring "[a2a] local-inbox delivery attempt failed (to=instar-codey): aborted due to timeout".
|
|
17
|
+
- Root traced through the call chain: the /a2a/inbox response awaited the role handler, which spawns a session and waits minutes; the sender's ~10s timeout fired first. The reply flows back on a separate channel, so awaiting was unnecessary.
|
|
18
|
+
- Unit tests: a held (slow) handler no longer blocks the response (it would have hung if still awaited); a background handler error still yields a clean acknowledgement. Idempotency, validation, and spoof-defense cases unchanged. Independent adversarial review.
|
|
19
|
+
|
|
20
|
+
## What Changed — Agent-to-agent task delivery no longer logs false "delivery failed" timeouts
|
|
21
|
+
|
|
22
|
+
When one of your agents hands a task to another agent on the same machine (for example a mentor agent assigning work to a mentee), the receiver was only acknowledging the message AFTER it had finished the whole task — which means spinning up a work session and waiting minutes for it to think and reply. But the sender only waits about 10 seconds for an acknowledgement, so it gave up and logged a "delivery failed" every time — even though the message was actually received fine and the reply was on its way back on a separate channel.
|
|
23
|
+
|
|
24
|
+
Now the receiver acknowledges the moment it accepts the message and does the work in the background. The sender gets its acknowledgement right away, stops logging false failures, and stops holding a connection open for ten seconds each time. The actual reply still comes back exactly as before.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Side-effects — /a2a/inbox accept-boundary
|
|
2
|
+
|
|
3
|
+
## 1. What files/state does this touch at runtime?
|
|
4
|
+
`installAgentMessageHook.ts` — the role-handler invocation in the agent-message hook. No new files,
|
|
5
|
+
config, schema, or state. The role handler still runs (now in the background); the idempotency mark
|
|
6
|
+
and ledger row are unchanged.
|
|
7
|
+
|
|
8
|
+
## 2. Does it change any functional behavior?
|
|
9
|
+
The `/a2a/inbox` HTTP response now returns `{handled:true}` immediately after the message is validated
|
|
10
|
+
+ marked processed, instead of after the (minutes-long) role handler completes. The handler runs in
|
|
11
|
+
the background and delivers its reply on its own a2a channel exactly as before. Net: the sender no
|
|
12
|
+
longer times out (its ~10s `AbortSignal.timeout`) and no longer logs a false "delivery failed".
|
|
13
|
+
|
|
14
|
+
## 3. What happens on failure / weird config?
|
|
15
|
+
A background handler rejection is caught and logged (`console.error`), exactly as the old `try/catch`
|
|
16
|
+
did — just on a later microtask. The id stays marked processed (unchanged). Validation failures
|
|
17
|
+
(unknown role, spoof, already-processed) still short-circuit BEFORE the handler, unchanged.
|
|
18
|
+
|
|
19
|
+
## 4. Migration parity — do existing agents get it?
|
|
20
|
+
Yes, via the normal release — code-only, compiled into `dist`. No agent-installed file / config /
|
|
21
|
+
template change → no `PostUpdateMigrator` pass.
|
|
22
|
+
|
|
23
|
+
## 5. Could it spam / flood / burn resources?
|
|
24
|
+
No — it REDUCES resource use (no 10s held connection per mentor a2a message). Same single handler
|
|
25
|
+
run, no new timers/IO/network. The idempotency mark still bounds duplicate processing.
|
|
26
|
+
|
|
27
|
+
## 6. Rollback / off-switch?
|
|
28
|
+
Revert the one block (re-`await` the handler). No data, no migration, no flag. Mirrors #581/#3
|
|
29
|
+
rollback.
|
|
30
|
+
|
|
31
|
+
## 7. Concurrency / ordering?
|
|
32
|
+
The handler now runs after the response returns instead of before. The idempotency `markProcessed`
|
|
33
|
+
still happens BEFORE the response (so retries dedup). The reply-out is unchanged (a separate a2a
|
|
34
|
+
send). A background handler error cannot affect the already-sent response.
|
|
35
|
+
|
|
36
|
+
## Blast radius
|
|
37
|
+
Small + additive: one block in `installAgentMessageHook.ts` swapped from await-then-respond to
|
|
38
|
+
respond-then-background. Exactly mirrors the proven #581 (`/messages/relay-agent`) and #3
|
|
39
|
+
(`/threadline/messages/receive`) accept-boundaries. Only the a2a role-handler dispatch timing
|
|
40
|
+
changes; validation, idempotency, ledger, and the reply path are untouched.
|