@canonmsg/agent-sdk 11.2.0 → 11.2.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/dist/canon-agent.d.ts +3 -5
- package/dist/canon-agent.js +8 -11
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
package/dist/canon-agent.d.ts
CHANGED
|
@@ -212,11 +212,9 @@ export declare class CanonAgent {
|
|
|
212
212
|
private markQueuedMessagesAccepted;
|
|
213
213
|
private notifyMessageInterrupt;
|
|
214
214
|
/**
|
|
215
|
-
* Builds a runtime-state publisher bound to this agent's scoped
|
|
216
|
-
* handle (captured in start()).
|
|
217
|
-
*
|
|
218
|
-
* would fall back to core's deprecated module-global RTDB client,
|
|
219
|
-
* where the last-started agent's token wins in multi-agent processes.
|
|
215
|
+
* Builds a runtime-state publisher bound to this agent's scoped,
|
|
216
|
+
* endpoint-backed handle (captured in start()). The publisher requires
|
|
217
|
+
* that handle, so each agent uses its own CanonClient credentials.
|
|
220
218
|
*/
|
|
221
219
|
private createRuntimeStatePublisher;
|
|
222
220
|
private requireRuntimeStatePublisher;
|
package/dist/canon-agent.js
CHANGED
|
@@ -608,16 +608,15 @@ export class CanonAgent {
|
|
|
608
608
|
if (this.options.sessions?.enabled && !this.sessionManager) {
|
|
609
609
|
this.sessionManager = new SessionManager(this.options.sessions);
|
|
610
610
|
}
|
|
611
|
-
//
|
|
612
|
-
//
|
|
613
|
-
//
|
|
614
|
-
// so multiple CanonAgents in one process cannot clobber each other.
|
|
611
|
+
// One scoped endpoint-backed runtime-state handle per agent. Control
|
|
612
|
+
// pollers and publishers thread it through this agent's CanonClient;
|
|
613
|
+
// there is no direct RTDB connection or module-global fallback.
|
|
615
614
|
this.rtdbHandle = initRTDBAuth(this.apiClient, {
|
|
616
615
|
rtdbUrl: this.runtimeConnection.rtdbUrl,
|
|
617
616
|
firebaseApiKey: this.runtimeConnection.firebaseWebApiKey,
|
|
618
617
|
});
|
|
619
|
-
// Identity lookup only.
|
|
620
|
-
//
|
|
618
|
+
// Identity lookup only. Runtime state uses the endpoint-backed handle;
|
|
619
|
+
// the SSE stream authenticates with the API key.
|
|
621
620
|
const { agentId } = await this.apiClient.getAuthToken();
|
|
622
621
|
if (generation !== this.lifecycleGeneration)
|
|
623
622
|
return;
|
|
@@ -1245,11 +1244,9 @@ export class CanonAgent {
|
|
|
1245
1244
|
});
|
|
1246
1245
|
}
|
|
1247
1246
|
/**
|
|
1248
|
-
* Builds a runtime-state publisher bound to this agent's scoped
|
|
1249
|
-
* handle (captured in start()).
|
|
1250
|
-
*
|
|
1251
|
-
* would fall back to core's deprecated module-global RTDB client,
|
|
1252
|
-
* where the last-started agent's token wins in multi-agent processes.
|
|
1247
|
+
* Builds a runtime-state publisher bound to this agent's scoped,
|
|
1248
|
+
* endpoint-backed handle (captured in start()). The publisher requires
|
|
1249
|
+
* that handle, so each agent uses its own CanonClient credentials.
|
|
1253
1250
|
*/
|
|
1254
1251
|
createRuntimeStatePublisher() {
|
|
1255
1252
|
if (!this.agentId)
|
package/dist/types.d.ts
CHANGED
|
@@ -332,7 +332,7 @@ export interface CanonAgentConnectionOptions {
|
|
|
332
332
|
baseUrl?: string;
|
|
333
333
|
streamUrl?: string;
|
|
334
334
|
rtdbUrl?: string;
|
|
335
|
-
/**
|
|
335
|
+
/** Legacy Firebase connection option; endpoint-backed runtime state does not use it. */
|
|
336
336
|
firebaseApiKey?: string;
|
|
337
337
|
}
|
|
338
338
|
export interface CanonAgentOptions extends CanonAgentConnectionOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonmsg/agent-sdk",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.1",
|
|
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": ">=22.22.3"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@canonmsg/core": "^13.
|
|
31
|
+
"@canonmsg/core": "^13.4.0"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|