@canonmsg/agent-sdk 12.0.0 → 12.2.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 +97 -7
- package/dist/chunks/chunk-HITMISWV.js +4897 -0
- package/dist/chunks/{chunk-FPQFTTND.js → chunk-J63YVAKA.js} +1627 -1099
- package/dist/chunks/{chunk-OLJ7H4E2.js → chunk-O5C3ZGI4.js} +6363 -7011
- package/dist/chunks/{mls-crypto-NZDNSPAO.js → mls-crypto-ITVGUEP7.js} +3 -3
- package/dist/cli.js +403 -30
- package/dist/drivers/claude.d.ts +8 -2
- package/dist/drivers/codex.d.ts +11 -2
- package/dist/drivers/connector.d.ts +34 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +26 -4
- package/dist/internal/backend-contracts/artifactActions.d.ts +0 -151
- package/dist/internal/backend-contracts/clientFloor.d.ts +52 -0
- package/dist/internal/backend-contracts/communication.d.ts +15 -0
- package/dist/internal/backend-contracts/connectorRelay.d.ts +179 -0
- package/dist/internal/backend-contracts/endpoint.d.ts +17 -0
- package/dist/internal/backend-contracts/endpointContentPolicy.d.ts +15 -4
- package/dist/internal/backend-contracts/index.d.ts +7 -1
- package/dist/internal/backend-contracts/media-url.d.ts +14 -0
- package/dist/internal/backend-contracts/message.d.ts +1 -1
- package/dist/internal/backend-contracts/mlsDevApplication.d.ts +90 -2
- package/dist/internal/backend-contracts/mlsDevCredential.d.ts +5 -2
- package/dist/internal/backend-contracts/mlsDevDeviceCustody.d.ts +2 -1
- package/dist/internal/backend-contracts/mlsDevEnrollment.d.ts +6 -2
- package/dist/internal/backend-contracts/mlsDevFeedReceipt.d.ts +43 -0
- package/dist/internal/backend-contracts/mlsDevGroup.d.ts +129 -5
- package/dist/internal/backend-contracts/mlsDevGroupFeed.d.ts +6 -2
- package/dist/internal/backend-contracts/mlsDevInteraction.d.ts +159 -0
- package/dist/internal/backend-contracts/mlsEnvironment.d.ts +35 -0
- package/dist/internal/backend-contracts/mlsPrincipalAlias.d.ts +26 -0
- package/dist/internal/backend-contracts/runtimeCardFields.d.ts +0 -4
- package/dist/internal/backend-contracts/upload-mime-types.d.ts +17 -0
- package/dist/internal/backend-contracts/verbContract.d.ts +23 -19
- package/dist/internal/backend-contracts/verbSchemas.d.ts +38 -29
- package/dist/internal/core/agent-profiles.d.ts +0 -4
- package/dist/internal/core/approval-format.d.ts +1 -5
- package/dist/internal/core/approval-types.d.ts +1 -2
- package/dist/internal/core/client.d.ts +3 -152
- package/dist/internal/core/constants.d.ts +0 -3
- package/dist/internal/core/endpoint-client.d.ts +14 -1
- package/dist/internal/core/execution-environment-mode.d.ts +0 -2
- package/dist/internal/core/gifs.d.ts +0 -6
- package/dist/internal/core/host-runtime.d.ts +2 -206
- package/dist/internal/core/index.d.ts +22 -63
- package/dist/internal/core/registration.d.ts +1 -17
- package/dist/internal/core/retry.d.ts +0 -9
- package/dist/internal/core/rtdb-rest.d.ts +0 -4
- package/dist/internal/core/runtime-cards.d.ts +0 -45
- package/dist/internal/core/runtime-descriptor.d.ts +1 -60
- package/dist/internal/core/runtime-presentation.d.ts +1 -27
- package/dist/internal/core/runtime-request-manager.d.ts +0 -1
- package/dist/internal/core/self-context.d.ts +0 -39
- package/dist/internal/core/silent-turn.d.ts +1 -38
- package/dist/internal/core/turn-protocol.d.ts +0 -5
- package/dist/internal/core/turn-verbosity.d.ts +5 -23
- package/dist/internal/core/types.d.ts +0 -292
- package/dist/internal/endpoint/engine.d.ts +31 -1
- package/dist/internal/endpoint/index.d.ts +1 -1
- package/dist/internal/endpoint/media.d.ts +5 -0
- package/dist/internal/endpoint/mls-crypto.d.ts +12 -5
- package/dist/internal/endpoint/mls-dev-client.d.ts +9 -1
- package/dist/internal/endpoint/mls-dev-device.d.ts +2 -0
- package/dist/internal/endpoint/mls-dev-groups.d.ts +65 -5
- package/dist/internal/endpoint/mls-dev-interactions.d.ts +99 -0
- package/dist/internal/endpoint/mls-dev-key-package-service.d.ts +13 -0
- package/dist/internal/endpoint/mls-dev-key-packages.d.ts +23 -3
- package/dist/internal/endpoint/mls-dev-text.d.ts +67 -0
- package/dist/internal/endpoint/mls-dev-transport.d.ts +2 -1
- package/dist/internal/endpoint/node-mls-custody-protocol.d.ts +5 -0
- package/dist/internal/endpoint/transport.d.ts +6 -1
- package/dist/media.js +2 -2
- package/dist/runner/errands.d.ts +118 -0
- package/dist/runner/mls.d.ts +97 -0
- package/dist/runner/relay.d.ts +87 -0
- package/dist/runner/runner.d.ts +61 -0
- package/dist/runner/types.d.ts +51 -4
- package/package.json +1 -1
- package/dist/chunks/chunk-6VK4UZHJ.js +0 -2806
- package/dist/internal/backend-contracts/workSessions.d.ts +0 -205
- package/dist/internal/core/agent-resolver.d.ts +0 -49
- package/dist/internal/core/agent-session.d.ts +0 -12
- package/dist/internal/core/artifacts.d.ts +0 -262
- package/dist/internal/core/attached-native-session.d.ts +0 -174
- package/dist/internal/core/attached-session-file-store.d.ts +0 -3
- package/dist/internal/core/control-poller.d.ts +0 -221
- package/dist/internal/core/exclusive-json-file-store.d.ts +0 -7
- package/dist/internal/core/execution-environment.d.ts +0 -55
- package/dist/internal/core/group-context.d.ts +0 -25
- package/dist/internal/core/inbound-frame.d.ts +0 -64
- package/dist/internal/core/local-runtime-catalog.d.ts +0 -131
- package/dist/internal/core/message-format.d.ts +0 -13
- package/dist/internal/core/native-session-interaction.d.ts +0 -44
- package/dist/internal/core/provenance.d.ts +0 -31
- package/dist/internal/core/registration-cli.d.ts +0 -40
- package/dist/internal/core/stream.d.ts +0 -77
- package/dist/internal/core/turn-output-controller.d.ts +0 -69
- package/dist/internal/core/typing-status-publisher.d.ts +0 -14
- package/dist/internal/core/work-session-provider.d.ts +0 -29
- package/dist/internal/core/workspace-discovery.d.ts +0 -17
|
@@ -141,25 +141,6 @@ export interface CanonConversation {
|
|
|
141
141
|
activeCall?: CanonActiveCallSummary | null;
|
|
142
142
|
createdAt: string;
|
|
143
143
|
}
|
|
144
|
-
/** Opt-in paging for `GET /conversations`. Omit both fields for the full list. */
|
|
145
|
-
export interface CanonConversationsPageOptions {
|
|
146
|
-
/** Page size, 1..100 (server default 50 when the parameter is present). */
|
|
147
|
-
limit?: number;
|
|
148
|
-
/** Cursor from a previous page's `nextBefore`. */
|
|
149
|
-
before?: string;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* One page of conversations. Pages are cut in conversation-id order (stable
|
|
153
|
-
* under live traffic); each page's array is still sorted most-recent-first
|
|
154
|
-
* *within the page*, so concatenating pages is not globally recency-sorted.
|
|
155
|
-
* `nextBefore` is null when the sweep is exhausted — a short page is not a
|
|
156
|
-
* reliable end signal, because hidden conversations are filtered after the
|
|
157
|
-
* page is read.
|
|
158
|
-
*/
|
|
159
|
-
export interface CanonConversationsPage {
|
|
160
|
-
conversations: CanonConversation[];
|
|
161
|
-
nextBefore: string | null;
|
|
162
|
-
}
|
|
163
144
|
export interface CanonMessagesPage {
|
|
164
145
|
messages: CanonMessage[];
|
|
165
146
|
nextBefore?: string | null;
|
|
@@ -185,34 +166,9 @@ export interface CanonRuntimeProvenance {
|
|
|
185
166
|
type?: CanonSelfContext['type'] | string | null;
|
|
186
167
|
} | null;
|
|
187
168
|
}
|
|
188
|
-
/**
|
|
189
|
-
* Outcome of `CanonClient.addMember` / `agent.addMember`. The REST endpoint
|
|
190
|
-
* returns 201 on immediate add and 202 when a group invite is waiting for
|
|
191
|
-
* policy approval.
|
|
192
|
-
* Both are success from the protocol's perspective — distinct outcomes for
|
|
193
|
-
* the caller.
|
|
194
|
-
*/
|
|
195
|
-
export type AddMemberResult = {
|
|
196
|
-
status: 'added';
|
|
197
|
-
} | {
|
|
198
|
-
status: 'pending';
|
|
199
|
-
requestId: string;
|
|
200
|
-
};
|
|
201
169
|
export type ContactSource = 'direct_add' | 'phone_book' | 'contact_request' | 'link' | 'qr' | 'group' | 'open_inbound_message'
|
|
202
170
|
/** Sentinel value emitted by stream-service when a doc lacks a source field. */
|
|
203
171
|
| 'unknown';
|
|
204
|
-
/** A single entry from the agent's `users/{agentId}/contacts/` subcollection. */
|
|
205
|
-
export interface CanonContact {
|
|
206
|
-
/** The contact's userId. */
|
|
207
|
-
id: string;
|
|
208
|
-
source: ContactSource;
|
|
209
|
-
addedAt: string | null;
|
|
210
|
-
displayNameOverride: string | null;
|
|
211
|
-
}
|
|
212
|
-
export type ContactAddedPayload = CanonContact;
|
|
213
|
-
export type ContactRemovedPayload = {
|
|
214
|
-
id: string;
|
|
215
|
-
};
|
|
216
172
|
export type ResolvedAdmissionState = 'self' | 'not-found' | 'allowed' | 'request-required' | 'pending-outbound' | 'blocked' | 'inactive';
|
|
217
173
|
export interface ResolvedAdmissionTargetSummary {
|
|
218
174
|
id: string;
|
|
@@ -236,49 +192,12 @@ export interface ResolvedTargetAdmissionPayload {
|
|
|
236
192
|
blockedByViewer?: boolean;
|
|
237
193
|
blockedByTarget?: boolean;
|
|
238
194
|
}
|
|
239
|
-
export type ResolveAdmissionTargetInput = {
|
|
240
|
-
targetUserId: string;
|
|
241
|
-
canonContactId?: never;
|
|
242
|
-
} | {
|
|
243
|
-
canonContactId: string;
|
|
244
|
-
targetUserId?: never;
|
|
245
|
-
};
|
|
246
195
|
export interface CanonResolveAdmissionResult {
|
|
247
196
|
resolvedTargetUserId?: string | null;
|
|
248
197
|
target: ResolvedAdmissionTargetSummary | null;
|
|
249
198
|
admission: ResolvedTargetAdmissionPayload;
|
|
250
199
|
}
|
|
251
200
|
export type AgentClientType = SerializedAgentClientType;
|
|
252
|
-
export interface ResolvedAdmission {
|
|
253
|
-
discoverable: boolean;
|
|
254
|
-
inboundPolicy: CommunicationRule;
|
|
255
|
-
outboundPolicy?: CommunicationRule;
|
|
256
|
-
groupJoinPolicy: CommunicationRule;
|
|
257
|
-
}
|
|
258
|
-
/** Declares what session controls an agent type supports. */
|
|
259
|
-
export interface AgentCapabilities {
|
|
260
|
-
supportsModelSwitch: boolean;
|
|
261
|
-
supportsPermissionMode: boolean;
|
|
262
|
-
/**
|
|
263
|
-
* Whether permissionMode can be changed mid-session. When undefined,
|
|
264
|
-
* defaults to `supportsPermissionMode` — keep the UI chip non-interactive
|
|
265
|
-
* for agents whose approval mode is locked at session creation.
|
|
266
|
-
*/
|
|
267
|
-
supportsRuntimePermissionMode?: boolean;
|
|
268
|
-
supportsEffort: boolean;
|
|
269
|
-
supportsSessionState: boolean;
|
|
270
|
-
supportsInterrupt: boolean;
|
|
271
|
-
supportsQueue?: boolean;
|
|
272
|
-
supportsInterleave?: boolean;
|
|
273
|
-
/**
|
|
274
|
-
* Whether the agent can present a plan for approval before executing
|
|
275
|
-
* (Mac-app "plan mode"). First-class so clients can advertise/query it
|
|
276
|
-
* instead of inferring it from the descriptor's turnModes shape.
|
|
277
|
-
*/
|
|
278
|
-
supportsPlanMode?: boolean;
|
|
279
|
-
/** Whether the agent asks the user structured questions (AskUserQuestion-style). */
|
|
280
|
-
supportsQuestions?: boolean;
|
|
281
|
-
}
|
|
282
201
|
export interface ModelOption {
|
|
283
202
|
value: string;
|
|
284
203
|
label: string;
|
|
@@ -553,8 +472,6 @@ export interface RuntimeInfoPayload {
|
|
|
553
472
|
notes?: ReadonlyArray<string>;
|
|
554
473
|
updatedAt?: number;
|
|
555
474
|
}
|
|
556
|
-
/** Capability map keyed by clientType. Add new agent types here. */
|
|
557
|
-
export declare const AGENT_CAPABILITIES: Record<AgentClientType, AgentCapabilities>;
|
|
558
475
|
/** Trusted agent identity & access context, provided by the server */
|
|
559
476
|
export interface AgentContext {
|
|
560
477
|
agentId: string;
|
|
@@ -578,11 +495,6 @@ export interface AgentContext {
|
|
|
578
495
|
clientType?: AgentClientType;
|
|
579
496
|
defaultBehavior?: ResolvedAgentBehaviorPolicy;
|
|
580
497
|
}
|
|
581
|
-
export interface UpdateAgentProfileOptions {
|
|
582
|
-
name?: string;
|
|
583
|
-
avatarUrl?: string | null;
|
|
584
|
-
description?: string;
|
|
585
|
-
}
|
|
586
498
|
export interface CanonTurnDispatch {
|
|
587
499
|
kind: 'run_turn' | 'observe_only';
|
|
588
500
|
reason: string;
|
|
@@ -628,29 +540,6 @@ export interface MessageCreatedPayload {
|
|
|
628
540
|
contactCard?: ContactCardPayload;
|
|
629
541
|
};
|
|
630
542
|
}
|
|
631
|
-
export interface MessageUpdatedPayload {
|
|
632
|
-
conversationId: string;
|
|
633
|
-
messageId: string;
|
|
634
|
-
actorId?: string;
|
|
635
|
-
updatedAt?: string;
|
|
636
|
-
changes: {
|
|
637
|
-
reactions?: Record<string, string[]>;
|
|
638
|
-
/** Canonical ready attachments after asynchronous media processing. */
|
|
639
|
-
attachments?: MediaAttachment[];
|
|
640
|
-
[key: string]: unknown;
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
export interface TypingPayload {
|
|
644
|
-
conversationId: string;
|
|
645
|
-
userId: string;
|
|
646
|
-
isTyping: boolean;
|
|
647
|
-
status?: 'thinking' | 'typing';
|
|
648
|
-
timestamp?: number;
|
|
649
|
-
}
|
|
650
|
-
export interface PresencePayload {
|
|
651
|
-
userId: string;
|
|
652
|
-
online: boolean;
|
|
653
|
-
}
|
|
654
543
|
export interface RuntimeUpdatedPayload {
|
|
655
544
|
conversationId: string;
|
|
656
545
|
agentId: string;
|
|
@@ -658,126 +547,6 @@ export interface RuntimeUpdatedPayload {
|
|
|
658
547
|
runtimeInfo?: RuntimeInfoPayload | null;
|
|
659
548
|
agentSession: AgentSessionSnapshot | null;
|
|
660
549
|
}
|
|
661
|
-
export interface TurnUpdatedPayload {
|
|
662
|
-
conversationId: string;
|
|
663
|
-
agentId: string;
|
|
664
|
-
turn: import('./turn-protocol.js').TurnState | null;
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* Observe-only notice that the participation gate suppressed a turn this
|
|
668
|
-
* agent would otherwise have been dispatched (cap reached, mention required,
|
|
669
|
-
* agent-to-agent disabled). Hosts must not run a turn off this event; it
|
|
670
|
-
* exists so a benched agent can tell deliberate policy from a dead stream.
|
|
671
|
-
*/
|
|
672
|
-
export interface ParticipationSuppressedPayload {
|
|
673
|
-
conversationId: string;
|
|
674
|
-
/** The triggering message whose dispatch was suppressed. */
|
|
675
|
-
messageId: string;
|
|
676
|
-
/** Machine code, e.g. 'agent_turn_limit_reached' | 'group_mention_required'. */
|
|
677
|
-
reasonCode: string;
|
|
678
|
-
/** Human-readable form of the same reason. */
|
|
679
|
-
reason: string;
|
|
680
|
-
/** ISO timestamp stamped by stream-service at suppression time. */
|
|
681
|
-
suppressedAt: string;
|
|
682
|
-
}
|
|
683
|
-
export type RuntimeControlEventKind = 'interaction_response' | 'session' | 'signal' | 'primitive' | 'runtimeInput' | 'runtimeCard' | 'runtimeApproval';
|
|
684
|
-
export interface RuntimeControlEventPayload {
|
|
685
|
-
conversationId: string;
|
|
686
|
-
agentId: string;
|
|
687
|
-
kind: RuntimeControlEventKind;
|
|
688
|
-
requestId?: string;
|
|
689
|
-
updatedAt?: number;
|
|
690
|
-
value: Record<string, unknown>;
|
|
691
|
-
/** Conversation-scoped reply capability for an accepted interaction receipt. */
|
|
692
|
-
replyAuthority?: import('../backend-contracts/index.js').AgentReplyAuthorityV1;
|
|
693
|
-
}
|
|
694
|
-
export interface CanonMembershipChange {
|
|
695
|
-
addedMemberIds: string[];
|
|
696
|
-
removedMemberIds: string[];
|
|
697
|
-
memberCount: number;
|
|
698
|
-
}
|
|
699
|
-
export interface CanonKnownRecentParticipant {
|
|
700
|
-
id: string;
|
|
701
|
-
name: string;
|
|
702
|
-
userType: 'human' | 'ai_agent' | 'unknown';
|
|
703
|
-
isOwner: boolean;
|
|
704
|
-
isSelf: boolean;
|
|
705
|
-
}
|
|
706
|
-
export interface CanonGroupContext {
|
|
707
|
-
memberCount: number;
|
|
708
|
-
memberIds: string[];
|
|
709
|
-
ownerId: string;
|
|
710
|
-
ownerName: string;
|
|
711
|
-
ownerPresent: boolean;
|
|
712
|
-
knownRecentParticipants: CanonKnownRecentParticipant[];
|
|
713
|
-
/** Complete current roster, including participants who have not spoken. */
|
|
714
|
-
participants?: CanonKnownRecentParticipant[];
|
|
715
|
-
membershipChange?: CanonMembershipChange;
|
|
716
|
-
}
|
|
717
|
-
export type CanonGroupContextMode = 'initial' | 'membership_change';
|
|
718
|
-
export interface ConversationUpdatedPayload {
|
|
719
|
-
conversationId: string;
|
|
720
|
-
changes: Record<string, unknown>;
|
|
721
|
-
membershipChange?: CanonMembershipChange;
|
|
722
|
-
}
|
|
723
|
-
export interface VoiceSessionEventPayload {
|
|
724
|
-
conversationId: string;
|
|
725
|
-
session: CanonVoiceSession;
|
|
726
|
-
/**
|
|
727
|
-
* True when this call targets the receiving agent (runtime_voice aimed at
|
|
728
|
-
* it). Voice events are conversation-scoped — group and human-mode calls
|
|
729
|
-
* arrive with targetsMe false; never auto-join on a bare 'started'.
|
|
730
|
-
* Absent on streams older than the media/video rollout: treat as targeted
|
|
731
|
-
* (the legacy filter only delivered targeted sessions).
|
|
732
|
-
*/
|
|
733
|
-
targetsMe?: boolean;
|
|
734
|
-
}
|
|
735
|
-
export type CanonStreamEvent = {
|
|
736
|
-
type: 'agent.context';
|
|
737
|
-
payload: AgentContext;
|
|
738
|
-
} | {
|
|
739
|
-
type: 'message.created';
|
|
740
|
-
payload: MessageCreatedPayload;
|
|
741
|
-
} | {
|
|
742
|
-
type: 'message.updated';
|
|
743
|
-
payload: MessageUpdatedPayload;
|
|
744
|
-
} | {
|
|
745
|
-
type: 'contact.added';
|
|
746
|
-
payload: ContactAddedPayload;
|
|
747
|
-
} | {
|
|
748
|
-
type: 'contact.removed';
|
|
749
|
-
payload: ContactRemovedPayload;
|
|
750
|
-
} | {
|
|
751
|
-
type: 'typing';
|
|
752
|
-
payload: TypingPayload;
|
|
753
|
-
} | {
|
|
754
|
-
type: 'presence';
|
|
755
|
-
payload: PresencePayload;
|
|
756
|
-
} | {
|
|
757
|
-
type: 'runtime.updated';
|
|
758
|
-
payload: RuntimeUpdatedPayload;
|
|
759
|
-
} | {
|
|
760
|
-
type: 'turn.updated';
|
|
761
|
-
payload: TurnUpdatedPayload;
|
|
762
|
-
} | {
|
|
763
|
-
type: 'runtime.control';
|
|
764
|
-
payload: RuntimeControlEventPayload;
|
|
765
|
-
} | {
|
|
766
|
-
type: 'message.deleted';
|
|
767
|
-
payload: {
|
|
768
|
-
conversationId: string;
|
|
769
|
-
messageId: string;
|
|
770
|
-
};
|
|
771
|
-
} | {
|
|
772
|
-
type: 'conversation.updated';
|
|
773
|
-
payload: ConversationUpdatedPayload;
|
|
774
|
-
} | {
|
|
775
|
-
type: 'voice.session.started';
|
|
776
|
-
payload: VoiceSessionEventPayload;
|
|
777
|
-
} | {
|
|
778
|
-
type: 'voice.session.ended';
|
|
779
|
-
payload: VoiceSessionEventPayload;
|
|
780
|
-
};
|
|
781
550
|
export interface SendMessageOptions {
|
|
782
551
|
messageId?: string;
|
|
783
552
|
contentType?: 'text' | 'audio' | 'image' | 'video' | 'file' | 'contact_card';
|
|
@@ -794,13 +563,6 @@ export interface SendMessageOptions {
|
|
|
794
563
|
/** Trusted transport context injected by the host, never by the model. */
|
|
795
564
|
replyAuthority?: import('../backend-contracts/index.js').AgentReplyAuthorityV1;
|
|
796
565
|
}
|
|
797
|
-
export interface CreateGroupOptions {
|
|
798
|
-
memberIds: string[];
|
|
799
|
-
name: string;
|
|
800
|
-
}
|
|
801
|
-
export interface CreateGroupResult {
|
|
802
|
-
conversationId: string;
|
|
803
|
-
}
|
|
804
566
|
export type CanonVoiceSessionMode = 'human' | 'runtime_voice';
|
|
805
567
|
export type CanonVoiceSessionStatus = 'active' | 'ended' | 'error';
|
|
806
568
|
/** Call media. Absent anywhere in the wire always means 'audio'. */
|
|
@@ -848,52 +610,6 @@ export interface CanonVoiceSessionToken {
|
|
|
848
610
|
targetAgentId?: string | null;
|
|
849
611
|
expiresAt: string;
|
|
850
612
|
}
|
|
851
|
-
export interface CreateVoiceSessionOptions {
|
|
852
|
-
conversationId: string;
|
|
853
|
-
targetAgentId?: string | null;
|
|
854
|
-
/** Requested call media; the server defaults absent/unknown to 'audio'. */
|
|
855
|
-
media?: CanonVoiceSessionMedia;
|
|
856
|
-
}
|
|
857
|
-
export type CanonMemoStreamStatus = 'live' | 'finalizing' | 'finalized' | 'aborted';
|
|
858
|
-
export interface CreateMemoStreamOptions {
|
|
859
|
-
conversationId: string;
|
|
860
|
-
/** v1 accepts 'wav' only (byte-append decodable and seekable everywhere). */
|
|
861
|
-
container: 'wav';
|
|
862
|
-
codec: {
|
|
863
|
-
mimeType: string;
|
|
864
|
-
sampleRate: number;
|
|
865
|
-
channels: number;
|
|
866
|
-
bitsPerSample: number;
|
|
867
|
-
};
|
|
868
|
-
/** Byte offset of PCM data in the sender's file (RIFF headers precede it). */
|
|
869
|
-
dataOffset?: number;
|
|
870
|
-
/** Pre-allocated durable message id, for the live→durable timeline handoff. */
|
|
871
|
-
messageId?: string | null;
|
|
872
|
-
}
|
|
873
|
-
export interface CreateMemoStreamResult {
|
|
874
|
-
streamId: string;
|
|
875
|
-
bucket: string;
|
|
876
|
-
}
|
|
877
|
-
export interface AppendMemoStreamChunkOptions {
|
|
878
|
-
/** Zero-based, strictly sequential. Retries of the last chunk are acked. */
|
|
879
|
-
seq: number;
|
|
880
|
-
/** Base64 chunk bytes; may be empty when only carrying the final marker. */
|
|
881
|
-
data: string;
|
|
882
|
-
/** Normalized 0..1 amplitude bars for live waveforms. */
|
|
883
|
-
peaks?: number[];
|
|
884
|
-
/** Running duration of the recording in milliseconds. */
|
|
885
|
-
durationMs?: number;
|
|
886
|
-
/** Marks the recording finished; the stream leaves the live window. */
|
|
887
|
-
final?: boolean;
|
|
888
|
-
}
|
|
889
|
-
export interface MemoStreamChunkAck {
|
|
890
|
-
chunkCount: number;
|
|
891
|
-
totalBytes: number;
|
|
892
|
-
applied: boolean;
|
|
893
|
-
}
|
|
894
|
-
export interface JoinVoiceSessionOptions {
|
|
895
|
-
conversationId: string;
|
|
896
|
-
}
|
|
897
613
|
export type StreamingStatus = 'thinking' | 'streaming' | 'tool' | 'waiting_input';
|
|
898
614
|
export interface SetStreamingOptions {
|
|
899
615
|
conversationId: string;
|
|
@@ -1057,14 +773,6 @@ export interface RegistrationInput {
|
|
|
1057
773
|
requestedAgentId?: string;
|
|
1058
774
|
localRegistrationId?: string;
|
|
1059
775
|
}
|
|
1060
|
-
export interface RegistrationResult {
|
|
1061
|
-
status: 'approved' | 'rejected' | 'timeout';
|
|
1062
|
-
apiKey?: string;
|
|
1063
|
-
agentId?: string;
|
|
1064
|
-
agentName?: string;
|
|
1065
|
-
requestId?: string;
|
|
1066
|
-
pollToken?: string;
|
|
1067
|
-
}
|
|
1068
776
|
export interface RegistrationStatus {
|
|
1069
777
|
status: 'pending' | 'approving' | 'approved' | 'rejected';
|
|
1070
778
|
agentName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EndpointMessageGroupInput } from './delivery.js';
|
|
2
|
-
import { type PreparedContent, type EndpointEvent, type EndpointOperationReceipt, type EndpointOperationRequest, type EndpointCapabilities, type EndpointPreconditions } from '../backend-contracts/index.js';
|
|
2
|
+
import { type PreparedContent, type EndpointEvent, type EndpointOperationReceipt, type EndpointOperationRequest, type EndpointCapabilities, type EndpointPreconditions, type StartDirectInput, type StartDirectResult } from '../backend-contracts/index.js';
|
|
3
3
|
import { type EndpointStore } from './store.js';
|
|
4
4
|
import { type EndpointCredentials, type EndpointTransport } from './transport.js';
|
|
5
5
|
import { type EndpointInboundConsumer, type EndpointInboundConsumerOptions } from './inbound.js';
|
|
@@ -116,6 +116,12 @@ export interface EndpointOptions {
|
|
|
116
116
|
hashBytes?: (value: Uint8Array) => Promise<string>;
|
|
117
117
|
queryIntervalMs?: number;
|
|
118
118
|
leaseMs?: number;
|
|
119
|
+
/** The admission duty's retry while a member still has no device in an encrypted room (mls-rooms-by-default.md §2.4):
|
|
120
|
+
* the first delay and the most it backs off to. Defaults 30 s and 2 min. */
|
|
121
|
+
mlsAdmissionRetryMs?: {
|
|
122
|
+
initial: number;
|
|
123
|
+
maximum: number;
|
|
124
|
+
};
|
|
119
125
|
/** Must remain shorter than the server's guaranteed receipt retention. */
|
|
120
126
|
retryHorizonMs?: number;
|
|
121
127
|
/** Agent input must pass the same server admission policy as live delivery. */
|
|
@@ -154,6 +160,18 @@ export interface Endpoint {
|
|
|
154
160
|
subscribe(listener: (operation: EndpointOperation) => void): () => void;
|
|
155
161
|
query<T>(query: string, parameters?: Record<string, unknown>): Promise<T>;
|
|
156
162
|
capabilities(): Promise<EndpointCapabilities | null>;
|
|
163
|
+
/** This account's MLS principal ID: its alias, checked against its opening, or its account ID while it has none
|
|
164
|
+
* (mls-dev-groups.md, erasure privacy). */
|
|
165
|
+
mlsPrincipalId(): Promise<string>;
|
|
166
|
+
/** The account an MLS principal in this room's group stands for, by the room's checked openings; undefined when nothing
|
|
167
|
+
* opens it as that type (an erased account's alias). */
|
|
168
|
+
mlsAccountOf(conversationId: string, principal: {
|
|
169
|
+
type: string;
|
|
170
|
+
id: string;
|
|
171
|
+
}): Promise<string | undefined>;
|
|
172
|
+
/** The alias an account of this type carries in this room's group, among `admitted` aliases when given; undefined when
|
|
173
|
+
* none or several do (its account ID while it has none, until step 14c). */
|
|
174
|
+
mlsAliasOf(conversationId: string, accountId: string, type: 'human' | 'ai_agent', admitted?: readonly string[]): Promise<string | undefined>;
|
|
157
175
|
publish<T = unknown>(action: string, body: Record<string, unknown>): Promise<T>;
|
|
158
176
|
observeQuery<T>(query: string, parameters: Record<string, unknown>, listener: (value: T) => void, onError?: (error: unknown) => void): () => void;
|
|
159
177
|
refreshQueries(): void;
|
|
@@ -171,6 +189,18 @@ export interface Endpoint {
|
|
|
171
189
|
* Return false to defer, or throw a nonretryable EndpointError to retire an
|
|
172
190
|
* unsent operation. An attempted operation still needs its server receipt. */
|
|
173
191
|
registerDeliveryGuard(id: string, allow: () => Promise<boolean>): () => void;
|
|
192
|
+
/** Keep a start's opening line that Canon did not store, and send it once the room and the request allow (§2a.13). */
|
|
193
|
+
deferOpener(input: {
|
|
194
|
+
conversationId: string;
|
|
195
|
+
messageId: string;
|
|
196
|
+
text: string;
|
|
197
|
+
requestId?: string | null;
|
|
198
|
+
}): Promise<void>;
|
|
199
|
+
/** Persist the opening line before starting a room; recover the start through its durable receipt. */
|
|
200
|
+
startWithheldOpener(input: Omit<StartDirectInput, 'opener'> & {
|
|
201
|
+
messageId: string;
|
|
202
|
+
text: string;
|
|
203
|
+
}): Promise<StartDirectResult>;
|
|
174
204
|
applyConversationSnapshot<T extends EndpointConversation>(snapshot: T): Promise<T>;
|
|
175
205
|
getConversation<T extends EndpointConversation = EndpointConversation>(id: string): Promise<T | null>;
|
|
176
206
|
applyEvent(event: EndpointEvent): Promise<boolean>;
|
|
@@ -29,4 +29,4 @@ export { createMlsDevDeviceCoordinator, type MlsDevDeviceView, type MlsDevProtec
|
|
|
29
29
|
export type { MlsDevDeviceClient, MlsDevDeviceClientOptions } from './mls-dev-client.js';
|
|
30
30
|
export type { MlsDevDeviceTransport, MlsDevDeviceHttpOptions, MlsDevKeyPackageTransport } from './mls-dev-transport.js';
|
|
31
31
|
export type { MlsDevKeyPackageClient, MlsDevKeyPackageView, MlsDevProtectedKeyPackagePreparer, MlsDevKeyPackagePublicationView, MlsDevKeyPackageClaimView, MlsDevKeyPackageClaimInput } from './mls-dev-key-packages.js';
|
|
32
|
-
export type { MlsDevGroupClient, MlsDevVerifiedMessageBinding, MlsDevCurrentAudience, MlsDevGroupView, MlsDevGroupRecoveryFailure, MlsDevProtectedGroupPreparer } from './mls-dev-groups.js';
|
|
32
|
+
export type { MlsDevGroupClient, MlsDevVerifiedMessageBinding, MlsDevCurrentAudience, MlsDevAdmissionHold, MlsDevGroupView, MlsDevGroupRecoveryFailure, MlsDevProtectedGroupPreparer } from './mls-dev-groups.js';
|
|
@@ -52,6 +52,8 @@ export interface EndpointMediaFlow {
|
|
|
52
52
|
uploadId?: string;
|
|
53
53
|
generation?: number;
|
|
54
54
|
attachment?: Record<string, unknown>;
|
|
55
|
+
/** How many times a resend asked Canon to process this encrypted room's failed video again. */
|
|
56
|
+
processingRetries?: number;
|
|
55
57
|
}>;
|
|
56
58
|
purpose?: 'prepare';
|
|
57
59
|
publicationGeneration?: number;
|
|
@@ -144,8 +146,11 @@ export interface EndpointMediaPipeline<Source> {
|
|
|
144
146
|
descriptor: EndpointMediaDescriptor;
|
|
145
147
|
}>;
|
|
146
148
|
}, options?: EndpointMediaSendOptions): Promise<string>;
|
|
149
|
+
/** With `conversationId`, false for an encrypted room (or one whose mode is unknown): its files are prepared on the
|
|
150
|
+
* device and sent without the background handoff, so a caller decides before building their descriptors. */
|
|
147
151
|
canSendInBackground(options?: {
|
|
148
152
|
maxProbeWaitMs?: number;
|
|
153
|
+
conversationId?: string;
|
|
149
154
|
}): Promise<boolean>;
|
|
150
155
|
resume(id: string, options?: EndpointMediaSendOptions): Promise<string>;
|
|
151
156
|
resumePending(): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MlsDevCredentialReceipt } from '../backend-contracts/index.js';
|
|
1
|
+
import { type MlsDevCredentialReceipt, type MlsEnvironmentId } from '../backend-contracts/index.js';
|
|
2
2
|
import type { MlsDevDeviceHttpOptions } from './mls-dev-transport.js';
|
|
3
3
|
export interface MlsDevIssuerKey {
|
|
4
4
|
readonly keyVersion: string;
|
|
@@ -6,13 +6,20 @@ export interface MlsDevIssuerKey {
|
|
|
6
6
|
}
|
|
7
7
|
export interface MlsDevClientConfiguration {
|
|
8
8
|
readonly version: 1;
|
|
9
|
-
|
|
9
|
+
/** A declared MLS environment (`MLS_ENVIRONMENT_PROFILES`); every issuer key belongs to it. */
|
|
10
|
+
readonly environmentId: MlsEnvironmentId;
|
|
10
11
|
readonly enabled: true;
|
|
11
|
-
|
|
12
|
+
/**
|
|
13
|
+
* A Dev build's synthetic accounts, the only ones it sets a device up for. A production build lists none: Canon's
|
|
14
|
+
* eligibility (`/endpoint/capabilities`) decides who uses MLS, so an account made after the build can.
|
|
15
|
+
*/
|
|
16
|
+
readonly principalIds?: readonly string[];
|
|
12
17
|
readonly issuerKeys: readonly MlsDevIssuerKey[];
|
|
18
|
+
/** The feed-receipt keys native checks Canon's signed acceptance times with (mls-signed-acceptance.md). */
|
|
19
|
+
readonly receiptKeys: readonly MlsDevIssuerKey[];
|
|
13
20
|
}
|
|
14
|
-
/**
|
|
15
|
-
export declare
|
|
21
|
+
/** An environment's reviewed gateway routes on its own API origin, never values learned from a credential response. */
|
|
22
|
+
export declare function mlsDevDeviceHttpConfiguration(environmentId: MlsEnvironmentId): Readonly<MlsDevDeviceHttpOptions>;
|
|
16
23
|
/** Public build configuration. Issuer pins must come from reviewed provisioning;
|
|
17
24
|
* authenticated service responses are not a trust-root distribution channel. */
|
|
18
25
|
export declare function parseMlsDevClientConfiguration(value: unknown): MlsDevClientConfiguration;
|
|
@@ -23,9 +23,14 @@ export interface MlsDevDeviceClient {
|
|
|
23
23
|
/** Requires a committed same-key credential proof, but not an issuer receipt. */
|
|
24
24
|
reconcile(): Promise<MlsDevDeviceView>;
|
|
25
25
|
/** Resume deliberate provisioning and keep an enrolled device ready, renewing
|
|
26
|
-
*
|
|
26
|
+
* once less than half the credential's lifetime remains, so whatever this
|
|
27
|
+
* device sends stays valid for receivers at least that long. While the
|
|
28
|
+
* current credential is valid, a failed renewal returns it and is retried
|
|
29
|
+
* after a minute. Never creates an unrequested enrollment. */
|
|
27
30
|
ensureReady(): Promise<MlsDevDeviceView>;
|
|
28
31
|
}
|
|
32
|
+
/** Whether readiness would renew this registered device: it has no credential, or less than half its lifetime remains. */
|
|
33
|
+
export declare function isMlsDevCredentialRenewalDue(view: MlsDevDeviceView, now: number): boolean;
|
|
29
34
|
/** Internal factory: the engine owns storage, lifetime, identity and generation. */
|
|
30
35
|
export interface MlsDevDeviceClientContext {
|
|
31
36
|
store: EndpointStore;
|
|
@@ -33,6 +38,9 @@ export interface MlsDevDeviceClientContext {
|
|
|
33
38
|
identity: EndpointResolvedIdentity;
|
|
34
39
|
installationGeneration: number;
|
|
35
40
|
}>;
|
|
41
|
+
/** The account's MLS principal ID, its alias (mls-dev-groups.md, erasure privacy), as Canon gave and this device checked
|
|
42
|
+
* it; the account ID itself while it has none. Bindings, credentials and rosters carry it. */
|
|
43
|
+
mlsPrincipalId(): Promise<string>;
|
|
36
44
|
signal: AbortSignal;
|
|
37
45
|
assertOpen(): void;
|
|
38
46
|
assertCurrent(tx: EndpointStoreTransaction): Promise<void>;
|
|
@@ -37,6 +37,8 @@ export interface MlsDevKeyPackagePrerequisite {
|
|
|
37
37
|
export declare function createMlsDevDeviceCoordinator(input: {
|
|
38
38
|
store: EndpointStore;
|
|
39
39
|
binding: MlsDevDeviceBinding;
|
|
40
|
+
/** The endpoint identity's account, when the binding's principal is its alias. */
|
|
41
|
+
accountId?: string;
|
|
40
42
|
installationGeneration: number;
|
|
41
43
|
prepareProtected: MlsDevProtectedPreparer;
|
|
42
44
|
/** Required independent issuer signature/trust validation, outside storage.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type MlsDevEnrollmentPrincipal, type MlsDevDeviceContext, type MlsDevGroupContext, type MlsDevGroupCommand, type MlsDevGroupPreparation, type MlsDevGroupHead, type MlsDevGroupRosterEntry, type MlsDevGroupQuery, type MlsDevGroupQueryResult,
|
|
1
|
+
import { type MlsDevEnrollmentPrincipal, type MlsDevDeviceContext, type MlsDevGroupContext, type MlsDevGroupCommand, type MlsDevGroupPreparation, type MlsDevGroupHead, type MlsDevGroupRosterEntry, type MlsDevGroupQuery, type MlsDevGroupQueryResult, type MlsDevGroupFeedQuery, type MlsDevGroupFeedResult, type MlsDevTextProtocol, type MlsDevInteractionAnswer, type MlsDevInteractionRequestBody, type MlsDevInteractionWithdrawReason, type EndpointOperationReceipt } from '../backend-contracts/index.js';
|
|
2
2
|
import type { EndpointOperation } from './engine.js';
|
|
3
3
|
import type { MlsDevDeviceClientContext, MlsDevDeviceClientOptions } from './mls-dev-client.js';
|
|
4
4
|
import { type MlsDevKeyPackageClient } from './mls-dev-key-packages.js';
|
|
5
5
|
import { type EndpointStoreTransaction } from './store.js';
|
|
6
6
|
import { EndpointError } from './transport.js';
|
|
7
|
+
import { type MlsDevInteractionView } from './mls-dev-interactions.js';
|
|
7
8
|
import type { EndpointSyncPage, EndpointSyncOptions } from './sync.js';
|
|
8
9
|
export type MlsDevProtectedGroupPreparer = (identityContext: MlsDevDeviceContext, groupContext: MlsDevGroupContext, command: MlsDevGroupCommand, wrappedIdentity: string, wrappedGroup: string | null, wrappedKeyPackage: string | null) => Promise<MlsDevGroupPreparation>;
|
|
9
10
|
export interface MlsDevGroupView {
|
|
@@ -27,7 +28,7 @@ export declare function isMlsDevGroupRoomRecoveryFailure(error: unknown): error
|
|
|
27
28
|
/** Derived exclusively from an atomically committed, native-verified application. */
|
|
28
29
|
export interface MlsDevVerifiedMessageBinding {
|
|
29
30
|
readonly version: 1;
|
|
30
|
-
readonly protocol:
|
|
31
|
+
readonly protocol: MlsDevTextProtocol;
|
|
31
32
|
readonly conversationId: string;
|
|
32
33
|
readonly messageId: string;
|
|
33
34
|
readonly groupId: string;
|
|
@@ -38,11 +39,17 @@ export interface MlsDevVerifiedMessageBinding {
|
|
|
38
39
|
readonly senderPrincipal: MlsDevEnrollmentPrincipal;
|
|
39
40
|
readonly head: MlsDevGroupHead;
|
|
40
41
|
readonly acceptedAtMs: number;
|
|
42
|
+
/** The account the sender's alias opens to in this room, or the erased sender (mls-dev-groups.md, erasure privacy). */
|
|
43
|
+
readonly senderId: string;
|
|
41
44
|
}
|
|
42
45
|
/** An online, fully caught-up audience snapshot for a model turn and its delivery guard. */
|
|
46
|
+
export interface MlsDevAdmissionHold {
|
|
47
|
+
readonly held: boolean;
|
|
48
|
+
readonly waitingPrincipalIds: readonly string[];
|
|
49
|
+
}
|
|
43
50
|
export interface MlsDevCurrentAudience {
|
|
44
51
|
readonly version: 1;
|
|
45
|
-
readonly protocol:
|
|
52
|
+
readonly protocol: MlsDevTextProtocol;
|
|
46
53
|
readonly conversationId: string;
|
|
47
54
|
readonly groupId: string;
|
|
48
55
|
readonly ownDeviceId: string;
|
|
@@ -52,13 +59,36 @@ export interface MlsDevCurrentAudience {
|
|
|
52
59
|
readonly roster: readonly MlsDevGroupRosterEntry[];
|
|
53
60
|
readonly feedOrdinal: number;
|
|
54
61
|
}
|
|
62
|
+
/** One encrypted card operation in a v2 room (encrypted-interactions.md §2.3): exactly one of `request` (agents),
|
|
63
|
+
* `response` (the responder; a secret's plaintext goes in `secret`, which native seals and the endpoint never stores)
|
|
64
|
+
* or `withdraw` (the requesting device). */
|
|
65
|
+
export interface MlsDevInteractionInput {
|
|
66
|
+
readonly conversationId: string;
|
|
67
|
+
readonly messageId?: string;
|
|
68
|
+
readonly operationId?: string;
|
|
69
|
+
readonly guardId?: string;
|
|
70
|
+
readonly request?: Omit<MlsDevInteractionRequestBody, 'secretKey'>;
|
|
71
|
+
readonly response?: {
|
|
72
|
+
readonly requestId: string;
|
|
73
|
+
readonly agentId: string;
|
|
74
|
+
readonly answer: MlsDevInteractionAnswer;
|
|
75
|
+
} | {
|
|
76
|
+
readonly requestId: string;
|
|
77
|
+
readonly agentId: string;
|
|
78
|
+
readonly secret: string;
|
|
79
|
+
};
|
|
80
|
+
readonly withdraw?: {
|
|
81
|
+
readonly requestId: string;
|
|
82
|
+
readonly reason: MlsDevInteractionWithdrawReason;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
55
85
|
export interface MlsDevGroupClient {
|
|
56
86
|
createRoom(input: {
|
|
57
87
|
conversationId: string;
|
|
58
88
|
name: string;
|
|
59
89
|
memberIds: string[];
|
|
60
90
|
operationId?: string;
|
|
61
|
-
protocol?:
|
|
91
|
+
protocol?: MlsDevTextProtocol;
|
|
62
92
|
}): Promise<EndpointOperation>;
|
|
63
93
|
create(input: {
|
|
64
94
|
conversationId: string;
|
|
@@ -81,13 +111,29 @@ export interface MlsDevGroupClient {
|
|
|
81
111
|
messageId: string;
|
|
82
112
|
}): Promise<MlsDevVerifiedMessageBinding | undefined>;
|
|
83
113
|
readCurrentAudience(conversationId: string): Promise<MlsDevCurrentAudience>;
|
|
114
|
+
/** D2 (mls-rooms-by-default.md §2.7): in a room Canon made, the current members with no device in this device's group;
|
|
115
|
+
* while there are any, the room sends nothing. Local state only, as of the last refresh. */
|
|
116
|
+
readAdmissionHold(conversationId: string): Promise<MlsDevAdmissionHold>;
|
|
84
117
|
assertCurrentAudience(expected: MlsDevCurrentAudience): Promise<void>;
|
|
85
118
|
readRecoveryFailure(conversationId: string): Promise<MlsDevGroupRecoveryFailure | undefined>;
|
|
119
|
+
/** Encrypts, journals and queues one card operation from this device; never inbox input for anyone. */
|
|
120
|
+
sendInteraction(input: MlsDevInteractionInput): Promise<EndpointOperation>;
|
|
121
|
+
/** The local reduction of one request, with its derived state (the local deadline is authoritative). */
|
|
122
|
+
readInteraction(input: {
|
|
123
|
+
conversationId: string;
|
|
124
|
+
agentId: string;
|
|
125
|
+
requestId: string;
|
|
126
|
+
}): Promise<MlsDevInteractionView | undefined>;
|
|
127
|
+
/** The requester opens its answered secret once, in memory; the one-time key is deleted in the same commit. */
|
|
128
|
+
openSecretAnswer(input: {
|
|
129
|
+
conversationId: string;
|
|
130
|
+
requestId: string;
|
|
131
|
+
}): Promise<string>;
|
|
86
132
|
}
|
|
87
133
|
export interface MlsDevGroupBridge {
|
|
88
134
|
hash(value: string): Promise<string>;
|
|
89
135
|
hashBytes?(value: Uint8Array): Promise<string>;
|
|
90
|
-
resolveProtocol?(conversationId: string): Promise<
|
|
136
|
+
resolveProtocol?(conversationId: string): Promise<MlsDevTextProtocol | undefined>;
|
|
91
137
|
queryFeed?(request: MlsDevGroupFeedQuery): Promise<MlsDevGroupFeedResult>;
|
|
92
138
|
query(request: MlsDevGroupQuery): Promise<MlsDevGroupQueryResult>;
|
|
93
139
|
queue(tx: EndpointStoreTransaction, operation: EndpointOperation): Promise<EndpointOperation>;
|
|
@@ -95,11 +141,25 @@ export interface MlsDevGroupBridge {
|
|
|
95
141
|
afterReceipt(operation: EndpointOperation): Promise<void>;
|
|
96
142
|
submitted(operation: EndpointOperation): void;
|
|
97
143
|
lookup(operationId: string, installationId: string): Promise<EndpointOperationReceipt | null>;
|
|
144
|
+
/** Renews this device's credential when due, before an operation captures it. Best effort: the operation's own
|
|
145
|
+
* credential checks still decide. */
|
|
146
|
+
ensureDevice?(): Promise<unknown>;
|
|
147
|
+
/** A Welcome used up one of this device's KeyPackages; called after its commit. */
|
|
148
|
+
keyPackageConsumed?(): void;
|
|
149
|
+
/** A control of this device's settled, accepted or lost to another device's: what waited on it can go on now. A hint
|
|
150
|
+
* announcing the room's change may have come while it was pending, and none may follow (D2 holds the room's sends). */
|
|
151
|
+
controlSettled?(conversationId: string): void;
|
|
152
|
+
/** Reads and applies the room's conversation snapshot from Canon, for openings of members admitted since. */
|
|
153
|
+
readRoom?(conversationId: string): Promise<unknown>;
|
|
98
154
|
}
|
|
99
155
|
/** Internal attachment: the engine supplies its existing queue, receipt reducer,
|
|
100
156
|
* event/recovery intake, store and lifetime. Native work never runs inside tx. */
|
|
101
157
|
export declare function createMlsDevGroups(options: MlsDevDeviceClientOptions, context: MlsDevDeviceClientContext, keyPackages: MlsDevKeyPackageClient | undefined, bridge: MlsDevGroupBridge): {
|
|
102
158
|
client: MlsDevGroupClient;
|
|
159
|
+
commitHeldRemoval(conversationId: string): Promise<EndpointOperation | undefined>;
|
|
160
|
+
/** Forwards an encrypted text by re-encryption: this device's own decrypted copy, sent as new text to another
|
|
161
|
+
* encrypted room (mls-payload-v3.md §4). Items and cards are not forwarded yet. */
|
|
162
|
+
forwardText(value: unknown, operationId: string, guardId?: string): Promise<EndpointOperation>;
|
|
103
163
|
sendText(value: unknown, operationId: string, guardId?: string): Promise<EndpointOperation>;
|
|
104
164
|
queryTextHistory(conversationId: string, name: string, parameters: Record<string, unknown>): Promise<{
|
|
105
165
|
messages: Record<string, unknown>[];
|