@canonmsg/agent-sdk 9.1.0 → 10.0.0
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 +3 -20
- package/dist/canon-agent.d.ts +5 -11
- package/dist/canon-agent.js +11 -37
- package/dist/index.d.ts +2 -2
- package/dist/realtime.d.ts +1 -7
- package/dist/realtime.js +1 -12
- package/dist/types.d.ts +1 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -190,7 +190,7 @@ The `message` event handler receives a context object with:
|
|
|
190
190
|
| `leave` | `() => Promise<void>` | Leave the current group conversation |
|
|
191
191
|
| `react` | `(messageId, emoji) => Promise<void>` | Toggle an emoji reaction |
|
|
192
192
|
| `addMember` / `removeMember` | functions | Manage group members when the agent has permission |
|
|
193
|
-
| `communicate` | function | Message an existing conversation, start a direct conversation, create a group,
|
|
193
|
+
| `communicate` | function | Message an existing conversation, start a direct conversation, create a group, forward an exact message, share a contact, or manage group members |
|
|
194
194
|
| `agent` | `AgentContext` | Trusted Canon agent identity and access context |
|
|
195
195
|
| `activeSelfContextId` | `string \| null` | Active private self-context id for this turn |
|
|
196
196
|
| `selfContexts` | `CanonSelfContext[] \| undefined` | Private context explaining this agent's cross-session actions |
|
|
@@ -213,16 +213,15 @@ Messages from the agent itself are automatically filtered out -- your handler on
|
|
|
213
213
|
|
|
214
214
|
## Events
|
|
215
215
|
|
|
216
|
-
`agent.on(event, handler)` accepts
|
|
216
|
+
`agent.on(event, handler)` accepts ten events. Each event holds a single handler; registering again replaces it.
|
|
217
217
|
|
|
218
218
|
| Event | Payload | Notes |
|
|
219
219
|
|---|---|---|
|
|
220
220
|
| `message` | `MessageHandlerContext` | Debounced inbound batch for one conversation |
|
|
221
221
|
| `messageUpdated` | `MessageUpdatedPayload` | Reaction/status changes; not a new turn |
|
|
222
|
-
| `contactRequest` | `CanonContactRequest` | Awareness only — the owner still approves |
|
|
223
|
-
| `contactApproved` | `CanonContactRequest` | Awareness only |
|
|
224
222
|
| `contactAdded` | `ContactAddedPayload` | A contact edge now exists |
|
|
225
223
|
| `contactRemoved` | `ContactRemovedPayload` | A contact edge was removed |
|
|
224
|
+
| `participationSuppressed` | `ParticipationSuppressedPayload` | Observe-only notice that policy withheld a turn |
|
|
226
225
|
| `interrupt` | `RuntimeSignalContext` | Same signal as `runtimeControls.onInterrupt` |
|
|
227
226
|
| `stopAndDrop` | `RuntimeSignalContext` | Same signal as `runtimeControls.onStopAndDrop` |
|
|
228
227
|
| `newSession` | `RuntimeSignalContext` | Same signal as `runtimeControls.onNewSession` |
|
|
@@ -278,22 +277,6 @@ const review = await ctx.requestCard({
|
|
|
278
277
|
|
|
279
278
|
The SDK does not validate card documents — it forwards `request.card` to Canon as-is, and a malformed card surfaces as a backend 400. Install [`@canonmsg/rich-cards`](https://www.npmjs.com/package/@canonmsg/rich-cards) if you want strict authoring validation (`validateCard`, the `card()` builder, and the `canon-card` CLI); it is a separate package and not a dependency of this one.
|
|
280
279
|
|
|
281
|
-
## Contact Request Awareness
|
|
282
|
-
|
|
283
|
-
Agents can also observe contact-request lifecycle events without becoming the approver:
|
|
284
|
-
|
|
285
|
-
```typescript
|
|
286
|
-
agent.on('contactRequest', (request) => {
|
|
287
|
-
console.log('New request aimed at this agent:', request.requesterName);
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
agent.on('contactApproved', (request) => {
|
|
291
|
-
console.log('Request approved:', request.id);
|
|
292
|
-
});
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
These are awareness callbacks only. Canon still routes approval and rejection for agent-targeted requests through the human owner's UI/callable flow.
|
|
296
|
-
|
|
297
280
|
### Turn-aware example
|
|
298
281
|
|
|
299
282
|
```typescript
|
package/dist/canon-agent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AddMemberResult, type CanonContact, type CommunicateInput, type CommunicateResult, type CanonConversation, type CanonConversationsPage, type CanonConversationsPageOptions, type CreateGroupOptions, type CreateGroupResult, type CanonRuntimeActivityItem, type CanonRuntimeCommandDescriptor, type CanonRuntimeFact, type CanonRuntimePrimitiveId, type ClearRuntimeActivityOptions, type CanonVoiceSession, type CanonVoiceSessionToken, type CreateVoiceSessionOptions, type VoiceSessionEventPayload } from '@canonmsg/core';
|
|
2
|
-
import type { CanonAgentConnectionOptions, CanonAgentOptions, ContactAddedHandler, ContactRemovedHandler, MessageHandler, MessageUpdatedHandler, ParticipationSuppressedHandler,
|
|
2
|
+
import type { CanonAgentConnectionOptions, CanonAgentOptions, ContactAddedHandler, ContactRemovedHandler, MessageHandler, MessageUpdatedHandler, ParticipationSuppressedHandler, RuntimeSignalHandler, RuntimePrimitiveHandler } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Contact-graph operations exposed under `agent.contacts`. Wraps the REST
|
|
5
5
|
* endpoints in CanonClient — the same surface a human user would hit through
|
|
@@ -40,8 +40,6 @@ export declare class CanonAgent {
|
|
|
40
40
|
private realtimeManager;
|
|
41
41
|
private sessionManager;
|
|
42
42
|
private handler;
|
|
43
|
-
private contactRequestHandler;
|
|
44
|
-
private contactApprovedHandler;
|
|
45
43
|
private contactAddedHandler;
|
|
46
44
|
private contactRemovedHandler;
|
|
47
45
|
private messageUpdatedHandler;
|
|
@@ -101,8 +99,6 @@ export declare class CanonAgent {
|
|
|
101
99
|
private filterApprovalReplyMessages;
|
|
102
100
|
on(event: 'message', handler: MessageHandler): void;
|
|
103
101
|
on(event: 'messageUpdated', handler: MessageUpdatedHandler): void;
|
|
104
|
-
on(event: 'contactRequest', handler: ContactRequestHandler): void;
|
|
105
|
-
on(event: 'contactApproved', handler: ContactRequestHandler): void;
|
|
106
102
|
on(event: 'contactAdded', handler: ContactAddedHandler): void;
|
|
107
103
|
on(event: 'contactRemoved', handler: ContactRemovedHandler): void;
|
|
108
104
|
/**
|
|
@@ -151,12 +147,11 @@ export declare class CanonAgent {
|
|
|
151
147
|
* Outcome depends on the target's `groupJoinPolicy` and the relationship
|
|
152
148
|
* graph:
|
|
153
149
|
* - `{ status: 'added' }` — the member was added immediately.
|
|
154
|
-
* - `{ status: 'pending', requestId
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* (you can listen for `contact.approved` SSE events to know when).
|
|
150
|
+
* - `{ status: 'pending', requestId }` — the target needs policy approval.
|
|
151
|
+
* The server created one `group_invite`; membership activates after approval
|
|
152
|
+
* The approved membership arrives through the normal conversation update.
|
|
158
153
|
*
|
|
159
|
-
* Throws `CanonApiError` for hard failures (block, inactive,
|
|
154
|
+
* Throws `CanonApiError` for hard failures (block, inactive, closed policy,
|
|
160
155
|
* member cap, requester not authorized).
|
|
161
156
|
*/
|
|
162
157
|
addMember(conversationId: string, userId: string): Promise<AddMemberResult>;
|
|
@@ -165,7 +160,6 @@ export declare class CanonAgent {
|
|
|
165
160
|
url: string;
|
|
166
161
|
attachment: import('@canonmsg/core').MediaAttachment;
|
|
167
162
|
}>;
|
|
168
|
-
private handleContactRequestEvent;
|
|
169
163
|
private handleContactGraphEvent;
|
|
170
164
|
private handleParticipationSuppressedEvent;
|
|
171
165
|
private handleMessageUpdatedEvent;
|
package/dist/canon-agent.js
CHANGED
|
@@ -281,8 +281,6 @@ export class CanonAgent {
|
|
|
281
281
|
realtimeManager = null;
|
|
282
282
|
sessionManager = null;
|
|
283
283
|
handler = null;
|
|
284
|
-
contactRequestHandler = null;
|
|
285
|
-
contactApprovedHandler = null;
|
|
286
284
|
contactAddedHandler = null;
|
|
287
285
|
contactRemovedHandler = null;
|
|
288
286
|
messageUpdatedHandler = null;
|
|
@@ -484,14 +482,6 @@ export class CanonAgent {
|
|
|
484
482
|
this.messageUpdatedHandler = handler;
|
|
485
483
|
return;
|
|
486
484
|
}
|
|
487
|
-
if (event === 'contactRequest') {
|
|
488
|
-
this.contactRequestHandler = handler;
|
|
489
|
-
return;
|
|
490
|
-
}
|
|
491
|
-
if (event === 'contactApproved') {
|
|
492
|
-
this.contactApprovedHandler = handler;
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
485
|
if (event === 'contactAdded') {
|
|
496
486
|
this.contactAddedHandler = handler;
|
|
497
487
|
return;
|
|
@@ -634,7 +624,6 @@ export class CanonAgent {
|
|
|
634
624
|
const runtimeState = this.createRuntimeStatePublisher();
|
|
635
625
|
for (const id of this.cachedConversationIds) {
|
|
636
626
|
runtimeState?.writeSessionState(id, {
|
|
637
|
-
cwd: process.cwd(),
|
|
638
627
|
isActive: true,
|
|
639
628
|
...(this.options.clientType ? { clientType: this.options.clientType } : {}),
|
|
640
629
|
}).catch(() => { });
|
|
@@ -667,14 +656,6 @@ export class CanonAgent {
|
|
|
667
656
|
this.agentContext = ctx;
|
|
668
657
|
this.ensureApprovalManager(ctx);
|
|
669
658
|
});
|
|
670
|
-
rtm.setContactRequestHandlers({
|
|
671
|
-
onContactRequest: (request) => {
|
|
672
|
-
void this.handleContactRequestEvent(this.contactRequestHandler, request);
|
|
673
|
-
},
|
|
674
|
-
onContactApproved: (request) => {
|
|
675
|
-
void this.handleContactRequestEvent(this.contactApprovedHandler, request);
|
|
676
|
-
},
|
|
677
|
-
});
|
|
678
659
|
rtm.setContactGraphHandlers({
|
|
679
660
|
onContactAdded: (payload) => {
|
|
680
661
|
void this.handleContactGraphEvent(this.contactAddedHandler, payload);
|
|
@@ -753,12 +734,11 @@ export class CanonAgent {
|
|
|
753
734
|
* Outcome depends on the target's `groupJoinPolicy` and the relationship
|
|
754
735
|
* graph:
|
|
755
736
|
* - `{ status: 'added' }` — the member was added immediately.
|
|
756
|
-
* - `{ status: 'pending', requestId
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
* (you can listen for `contact.approved` SSE events to know when).
|
|
737
|
+
* - `{ status: 'pending', requestId }` — the target needs policy approval.
|
|
738
|
+
* The server created one `group_invite`; membership activates after approval
|
|
739
|
+
* The approved membership arrives through the normal conversation update.
|
|
760
740
|
*
|
|
761
|
-
* Throws `CanonApiError` for hard failures (block, inactive,
|
|
741
|
+
* Throws `CanonApiError` for hard failures (block, inactive, closed policy,
|
|
762
742
|
* member cap, requester not authorized).
|
|
763
743
|
*/
|
|
764
744
|
async addMember(conversationId, userId) {
|
|
@@ -770,16 +750,6 @@ export class CanonAgent {
|
|
|
770
750
|
async uploadMedia(conversationId, data, mimeType, fileName) {
|
|
771
751
|
return this.apiClient.uploadMedia(conversationId, data, mimeType, fileName);
|
|
772
752
|
}
|
|
773
|
-
async handleContactRequestEvent(handler, request) {
|
|
774
|
-
if (!handler)
|
|
775
|
-
return;
|
|
776
|
-
try {
|
|
777
|
-
await handler(request);
|
|
778
|
-
}
|
|
779
|
-
catch (error) {
|
|
780
|
-
console.error('[canon-sdk] Contact-request handler failed:', error instanceof Error ? error.message : error);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
753
|
async handleContactGraphEvent(handler, payload) {
|
|
784
754
|
if (!handler)
|
|
785
755
|
return;
|
|
@@ -1246,6 +1216,7 @@ export class CanonAgent {
|
|
|
1246
1216
|
// The freshest message in the batch is the turn's trigger — same convention
|
|
1247
1217
|
// as the provenance lookup for turn verbosity below.
|
|
1248
1218
|
const triggeringMessageId = messages[messages.length - 1]?.id;
|
|
1219
|
+
const triggeringReplyAuthority = messages[messages.length - 1]?.replyAuthority;
|
|
1249
1220
|
const agentId = this.agentId;
|
|
1250
1221
|
const runtimeState = this.createRuntimeStatePublisher();
|
|
1251
1222
|
const queueDepth = () => this.sessionManager?.getQueueDepth(conversationId) ?? 0;
|
|
@@ -1520,9 +1491,12 @@ export class CanonAgent {
|
|
|
1520
1491
|
const activeSelfContextId = selfContexts.length > 0 ? resolvedActiveSelfContextId : null;
|
|
1521
1492
|
const withActiveSelfContext = (options) => {
|
|
1522
1493
|
const base = { ...(options ?? {}) };
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1494
|
+
const withContext = base.selfContextId !== undefined || !activeSelfContextId
|
|
1495
|
+
? base
|
|
1496
|
+
: { ...base, selfContextId: activeSelfContextId };
|
|
1497
|
+
return withContext.replyAuthority !== undefined || !triggeringReplyAuthority
|
|
1498
|
+
? withContext
|
|
1499
|
+
: { ...withContext, replyAuthority: triggeringReplyAuthority };
|
|
1526
1500
|
};
|
|
1527
1501
|
// Core's chunked sender walks the parts in a plain loop and knows nothing
|
|
1528
1502
|
// about this turn's abort signal, so a stop landing after part 1 would
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export { DEFAULT_ANTHROPIC_REQUEST_HEADROOM_BYTES, DEFAULT_MEDIA_CACHE_DIR, DEFA
|
|
|
7
7
|
export type { AnthropicImageBlock, AnthropicImageBudgetOptions, AnthropicImageMimeType, MaterializeMediaOptions, MaterializedCanonAttachment, MaterializedCanonReplyContext, ReplyWithFileOptions, UploadMediaFileOptions, } from './media.js';
|
|
8
8
|
export type { SessionConfig, Session } from './session-manager.js';
|
|
9
9
|
export type { CanonAgentTurnVerbosityOption } from './turn-verbosity-option.js';
|
|
10
|
-
export type { AgentContext, CanonGroupContext, CanonKnownRecentParticipant, CanonMembershipChange,
|
|
11
|
-
export type { CanonAgentConnectionOptions, CanonAgentOptions, ContactAddedHandler, ContactRemovedHandler,
|
|
10
|
+
export type { AgentContext, CanonGroupContext, CanonKnownRecentParticipant, CanonMembershipChange, CanonMessage, CanonConversation, CommunicateInput, CommunicateResult, DirectConversationSelection, CanonConversationsPage, CanonConversationsPageOptions, CanonReplyContext, CanonSelfContext, CanonTurnContextV2, CanonRuntimeDescriptor, MessageUpdatedPayload, SendMessageOptions, CreateGroupOptions, CreateGroupResult, TurnVerbosity, TurnVerbosityConfig, } from '@canonmsg/core';
|
|
11
|
+
export type { CanonAgentConnectionOptions, CanonAgentOptions, ContactAddedHandler, ContactRemovedHandler, FinalMessageResult, MessageHandler, MessageHandlerContext, MessageUpdatedHandler, ParticipationSuppressedHandler, ProgressMessageOptions, ProgressMessageResult, RuntimeApprovalRequest, RuntimeInputRequest, RuntimeInputResult, RuntimePlanReviewRequest, RuntimePlanReviewResult, RuntimeControlSurface, RuntimePrimitiveContext, RuntimePrimitiveHandler, RuntimePrimitiveHandlers, SessionInfo, SessionOptions, DeliveryMode, } from './types.js';
|
package/dist/realtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentContext, type ContactAddedPayload, type
|
|
1
|
+
import { type AgentContext, type ContactAddedPayload, type ContactRemovedPayload, type ConversationUpdatedPayload, type MessageUpdatedPayload, type ParticipationSuppressedPayload, type VoiceSessionEventPayload } from '@canonmsg/core';
|
|
2
2
|
import { Debouncer } from './debouncer.js';
|
|
3
3
|
/**
|
|
4
4
|
* Wraps @canonmsg/core's CanonStream with SDK-specific features:
|
|
@@ -15,8 +15,6 @@ export declare class RealtimeManager {
|
|
|
15
15
|
private lastSseErrorAt;
|
|
16
16
|
private suppressedSseErrorCount;
|
|
17
17
|
private onAgentContext;
|
|
18
|
-
private onContactRequest;
|
|
19
|
-
private onContactApproved;
|
|
20
18
|
private onContactAdded;
|
|
21
19
|
private onContactRemoved;
|
|
22
20
|
private onConversationUpdated;
|
|
@@ -35,10 +33,6 @@ export declare class RealtimeManager {
|
|
|
35
33
|
private pruneRecentInboundMessageIds;
|
|
36
34
|
private logSseError;
|
|
37
35
|
setOnAgentContext(cb: (ctx: AgentContext) => void): void;
|
|
38
|
-
setContactRequestHandlers(handlers: {
|
|
39
|
-
onContactRequest?: (payload: ContactRequestPayload) => void;
|
|
40
|
-
onContactApproved?: (payload: ContactApprovedPayload) => void;
|
|
41
|
-
}): void;
|
|
42
36
|
setContactGraphHandlers(handlers: {
|
|
43
37
|
onContactAdded?: (payload: ContactAddedPayload) => void;
|
|
44
38
|
onContactRemoved?: (payload: ContactRemovedPayload) => void;
|
package/dist/realtime.js
CHANGED
|
@@ -16,8 +16,6 @@ export class RealtimeManager {
|
|
|
16
16
|
lastSseErrorAt = 0;
|
|
17
17
|
suppressedSseErrorCount = 0;
|
|
18
18
|
onAgentContext = null;
|
|
19
|
-
onContactRequest = null;
|
|
20
|
-
onContactApproved = null;
|
|
21
19
|
onContactAdded = null;
|
|
22
20
|
onContactRemoved = null;
|
|
23
21
|
onConversationUpdated = null;
|
|
@@ -86,6 +84,7 @@ export class RealtimeManager {
|
|
|
86
84
|
createdAt: m.createdAt ?? new Date().toISOString(),
|
|
87
85
|
...(m.contactCard ? { contactCard: m.contactCard } : {}),
|
|
88
86
|
...(m.metadata ? { metadata: m.metadata } : {}),
|
|
87
|
+
...(payload.replyAuthority ? { replyAuthority: payload.replyAuthority } : {}),
|
|
89
88
|
};
|
|
90
89
|
this.debouncer.add(payload.conversationId, message, payload.provenance ?? null);
|
|
91
90
|
},
|
|
@@ -99,12 +98,6 @@ export class RealtimeManager {
|
|
|
99
98
|
onAgentContext: (ctx) => {
|
|
100
99
|
this.onAgentContext?.(ctx);
|
|
101
100
|
},
|
|
102
|
-
onContactRequest: (payload) => {
|
|
103
|
-
this.onContactRequest?.(payload);
|
|
104
|
-
},
|
|
105
|
-
onContactApproved: (payload) => {
|
|
106
|
-
this.onContactApproved?.(payload);
|
|
107
|
-
},
|
|
108
101
|
onContactAdded: (payload) => {
|
|
109
102
|
this.onContactAdded?.(payload);
|
|
110
103
|
},
|
|
@@ -173,10 +166,6 @@ export class RealtimeManager {
|
|
|
173
166
|
setOnAgentContext(cb) {
|
|
174
167
|
this.onAgentContext = cb;
|
|
175
168
|
}
|
|
176
|
-
setContactRequestHandlers(handlers) {
|
|
177
|
-
this.onContactRequest = handlers.onContactRequest ?? null;
|
|
178
|
-
this.onContactApproved = handlers.onContactApproved ?? null;
|
|
179
|
-
}
|
|
180
169
|
setContactGraphHandlers(handlers) {
|
|
181
170
|
this.onContactAdded = handlers.onContactAdded ?? null;
|
|
182
171
|
this.onContactRemoved = handlers.onContactRemoved ?? null;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AddMemberResult,
|
|
1
|
+
export type { AddMemberResult, AgentClientType, CanonGroupContext, CanonRuntimeActivityItem, CanonRuntimeActivityKind, CanonRuntimeActivityStatus, CanonRuntimeDescriptor, CanonRuntimeFact, CanonRuntimeFactGroup, CanonRuntimePrimitiveId, CanonRuntimeProvenance, CanonTurnContextV2, CanonMessage, CanonConversation, CommunicateInput, CommunicateResult, CanonReplyContext, CanonContact, CanonResolveAdmissionResult, ContactAddedPayload, ContactRemovedPayload, ContactSource, AgentContext, ResolveAdmissionTargetInput, ResolvedAdmissionState, ResolvedAdmissionTargetSummary, ResolvedTargetAdmissionPayload, CanonSelfContext, CreateGroupOptions, CreateGroupResult, SendMessageOptions, TurnLifecycleState, TurnOutputBlock, TurnOutputBlockInput, ApprovalNativeRequestMetadata, ApprovalRequestCategory, ApprovalRequestDetail, ApprovalRequestMetadata, ApprovalRisk, ApprovalReplyMetadata, ApprovalOutcomeMetadata, RuntimeInputChoice, RuntimeInputAnswers, RuntimeInputKind, RuntimeInputNativeMetadata, RuntimeInputQuestion, RuntimePlanRequestPayload, RuntimePlanRequestResult, RuntimeCardNativeMetadata, RuntimeCardV1, ResumableMediaUploadResult, MediaAttachment, VideoProcessingStatus, VideoProcessingErrorCode, SessionRule, ApprovalResult, } from '@canonmsg/core';
|
|
2
2
|
import type { AddMemberResult, CanonGroupContext, CanonMessage, CanonConversation, CommunicateInput, CommunicateResult, CanonReplyContext, CanonRuntimeActionDispatch, CanonRuntimePrimitiveId, CanonRuntimeProvenance, CanonTurnContextV2, ApprovalNativeRequestMetadata, ApprovalRequestCategory, ApprovalRequestDetail, ApprovalResult, ApprovalRisk, RuntimeInputChoice, RuntimeInputAnswers, RuntimeInputKind, RuntimeInputNativeMetadata, RuntimeInputQuestion, RuntimePlanRequestPayload, RuntimePlanRequestResult, RuntimeCardNativeMetadata, RuntimeCardV1, ResumableMediaUploadResult, SendMessageOptions, TurnOutputBlock, TurnOutputBlockInput } from '@canonmsg/core';
|
|
3
3
|
import type { MaterializeMediaOptions, MaterializedCanonAttachment, ReplyWithFileOptions, UploadMediaFileOptions } from './media.js';
|
|
4
4
|
export interface ProgressMessageOptions extends SendMessageOptions {
|
|
@@ -345,7 +345,6 @@ export interface CanonAgentOptions extends CanonAgentConnectionOptions {
|
|
|
345
345
|
*/
|
|
346
346
|
turnVerbosity?: import('./turn-verbosity-option.js').CanonAgentTurnVerbosityOption;
|
|
347
347
|
}
|
|
348
|
-
export type ContactRequestHandler = (request: import('@canonmsg/core').CanonContactRequest) => void | Promise<void>;
|
|
349
348
|
export type ContactAddedHandler = (contact: import('@canonmsg/core').ContactAddedPayload) => void | Promise<void>;
|
|
350
349
|
export type ContactRemovedHandler = (payload: import('@canonmsg/core').ContactRemovedPayload) => void | Promise<void>;
|
|
351
350
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonmsg/agent-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
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": "^
|
|
31
|
+
"@canonmsg/core": "^12.0.0"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|