@canonmsg/agent-sdk 3.2.2 → 3.2.3
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/canon-agent.js +7 -5
- package/package.json +2 -2
package/dist/canon-agent.js
CHANGED
|
@@ -910,9 +910,10 @@ export class CanonAgent {
|
|
|
910
910
|
}
|
|
911
911
|
async handleRuntimePrimitiveEvent(event) {
|
|
912
912
|
// Requests only belong to this runtime once primitive handlers exist —
|
|
913
|
-
//
|
|
913
|
+
// defer otherwise: the request stays in RTDB AND unseen, so a handler
|
|
914
|
+
// registered via onPrimitive() after start still receives it.
|
|
914
915
|
if (!this.hasRuntimePrimitiveSupport())
|
|
915
|
-
return {
|
|
916
|
+
return { defer: true };
|
|
916
917
|
const { conversationId, requestId, value } = event;
|
|
917
918
|
const primitive = value.id;
|
|
918
919
|
// Unknown primitives and unhandled ids fall through so the poller
|
|
@@ -935,10 +936,11 @@ export class CanonAgent {
|
|
|
935
936
|
});
|
|
936
937
|
}
|
|
937
938
|
async handleRuntimeSignalEvent(event) {
|
|
938
|
-
// Signals only belong to this runtime once signal handlers exist —
|
|
939
|
-
//
|
|
939
|
+
// Signals only belong to this runtime once signal handlers exist — defer
|
|
940
|
+
// otherwise: the signal stays in RTDB AND unseen, so a handler registered
|
|
941
|
+
// via on('interrupt' | ...) after start still receives it.
|
|
940
942
|
if (!this.hasRuntimeSignalSupport())
|
|
941
|
-
return {
|
|
943
|
+
return { defer: true };
|
|
942
944
|
const { conversationId, type: signal, updatedAt } = event;
|
|
943
945
|
const handler = signal === 'new_session'
|
|
944
946
|
? this.newSessionHandler
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonmsg/agent-sdk",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "Canon Agent SDK — build AI agents that participate in Canon conversations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"node": ">=18.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@canonmsg/core": "^2.
|
|
31
|
+
"@canonmsg/core": "^2.6.0"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|