@band-ai/sdk 0.1.2

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.
Files changed (91) hide show
  1. package/dist/CodexAdapter-A1k_LMdZ.d.ts +1278 -0
  2. package/dist/CodexAdapter-BbZD-nBd.d.cts +1278 -0
  3. package/dist/adapters.cjs +10643 -0
  4. package/dist/adapters.d.cts +217 -0
  5. package/dist/adapters.d.ts +217 -0
  6. package/dist/adapters.js +92 -0
  7. package/dist/backends-BnOLsG7w.d.cts +20 -0
  8. package/dist/backends-C4n6cKOf.d.ts +20 -0
  9. package/dist/chunk-3BKAC4OZ.js +44 -0
  10. package/dist/chunk-5CXIMAH2.js +52 -0
  11. package/dist/chunk-6AJA2OPC.js +3682 -0
  12. package/dist/chunk-A3TDK6GP.js +6674 -0
  13. package/dist/chunk-AVVDPXP4.js +39 -0
  14. package/dist/chunk-EDPKUUJL.js +177 -0
  15. package/dist/chunk-FUODYQRE.js +2562 -0
  16. package/dist/chunk-GVEQ3RAH.js +373 -0
  17. package/dist/chunk-INA6YZTZ.js +88 -0
  18. package/dist/chunk-IZPV6QS6.js +115 -0
  19. package/dist/chunk-LY55KYVI.js +0 -0
  20. package/dist/chunk-NIAQBANR.js +577 -0
  21. package/dist/chunk-OD2G5LFQ.js +78 -0
  22. package/dist/chunk-SFVKOEQH.js +103 -0
  23. package/dist/chunk-SG4WLD2H.js +1093 -0
  24. package/dist/chunk-YR3BOQNW.js +39 -0
  25. package/dist/chunk-ZZJRRBPQ.js +82 -0
  26. package/dist/claude-CcnQ5OUC.d.ts +53 -0
  27. package/dist/claude-CwTAxhwI.d.cts +53 -0
  28. package/dist/config.cjs +164 -0
  29. package/dist/config.d.cts +19 -0
  30. package/dist/config.d.ts +19 -0
  31. package/dist/config.js +9 -0
  32. package/dist/converters.cjs +1086 -0
  33. package/dist/converters.d.cts +143 -0
  34. package/dist/converters.d.ts +143 -0
  35. package/dist/converters.js +468 -0
  36. package/dist/core.cjs +185 -0
  37. package/dist/core.d.cts +22 -0
  38. package/dist/core.d.ts +22 -0
  39. package/dist/core.js +24 -0
  40. package/dist/customTools-BzF0IISO.d.cts +10 -0
  41. package/dist/customTools-BzF0IISO.d.ts +10 -0
  42. package/dist/dtos-DUpbIu8k.d.cts +163 -0
  43. package/dist/dtos-DUpbIu8k.d.ts +163 -0
  44. package/dist/history-ByessXNq.d.ts +24 -0
  45. package/dist/history-i6yN7neC.d.cts +24 -0
  46. package/dist/index.cjs +13914 -0
  47. package/dist/index.d.cts +63 -0
  48. package/dist/index.d.ts +63 -0
  49. package/dist/index.js +198 -0
  50. package/dist/linear.cjs +2207 -0
  51. package/dist/linear.d.cts +167 -0
  52. package/dist/linear.d.ts +167 -0
  53. package/dist/linear.js +2139 -0
  54. package/dist/logger-CABQOnlR.d.cts +21 -0
  55. package/dist/logger-CABQOnlR.d.ts +21 -0
  56. package/dist/mcp-claude.cjs +584 -0
  57. package/dist/mcp-claude.d.cts +4 -0
  58. package/dist/mcp-claude.d.ts +4 -0
  59. package/dist/mcp-claude.js +11 -0
  60. package/dist/mcp.cjs +1247 -0
  61. package/dist/mcp.d.cts +97 -0
  62. package/dist/mcp.d.ts +97 -0
  63. package/dist/mcp.js +27 -0
  64. package/dist/opencode-BBcDchcN.d.cts +159 -0
  65. package/dist/opencode-DthQQUsZ.d.ts +159 -0
  66. package/dist/pagination-BPiys10t.d.cts +25 -0
  67. package/dist/pagination-CcDkVFxK.d.ts +25 -0
  68. package/dist/protocols-CInhtFpA.d.cts +116 -0
  69. package/dist/protocols-DrhzOH6K.d.ts +116 -0
  70. package/dist/rest.cjs +1159 -0
  71. package/dist/rest.d.cts +144 -0
  72. package/dist/rest.d.ts +144 -0
  73. package/dist/rest.js +18 -0
  74. package/dist/runtime.cjs +5353 -0
  75. package/dist/runtime.d.cts +276 -0
  76. package/dist/runtime.d.ts +276 -0
  77. package/dist/runtime.js +274 -0
  78. package/dist/schemas-BpEBkq5V.d.cts +592 -0
  79. package/dist/schemas-vos1AaBc.d.ts +592 -0
  80. package/dist/sdk-HJUVSSWA.js +10 -0
  81. package/dist/simpleAdapter-9OE_p6QW.d.ts +29 -0
  82. package/dist/simpleAdapter-DqhvjsGr.d.cts +29 -0
  83. package/dist/testing.cjs +217 -0
  84. package/dist/testing.d.cts +126 -0
  85. package/dist/testing.d.ts +126 -0
  86. package/dist/testing.js +186 -0
  87. package/dist/types-7jVzOeOP.d.ts +446 -0
  88. package/dist/types-CSHFipIc.d.cts +331 -0
  89. package/dist/types-CovcHpYf.d.cts +446 -0
  90. package/dist/types-CxII3XkA.d.ts +331 -0
  91. package/package.json +189 -0
@@ -0,0 +1,592 @@
1
+ import { h as AgentToolsCapabilities, g as PlatformMessageLike, A as AdapterToolsProtocol, e as Preprocessor, F as FrameworkAdapter, i as PreprocessorContext } from './protocols-CInhtFpA.cjs';
2
+ import { f as PlatformEvent, P as PlatformMessage, e as ConversationContext, S as SessionConfig, c as ContactEventConfig, A as AgentConfig, C as ContactEvent, a as AgentInput } from './types-CovcHpYf.cjs';
3
+ import { M as MetadataMap, P as ParticipantRecord } from './dtos-DUpbIu8k.cjs';
4
+ import { L as Logger } from './logger-CABQOnlR.cjs';
5
+ import { T as ThenvoiLinkRestApi, b as RestRequestOptions, P as PaginatedResponse, e as AgentToolsRestApi } from './types-CSHFipIc.cjs';
6
+ import { P as PaginationOptions } from './pagination-BPiys10t.cjs';
7
+
8
+ interface TopicHandlers {
9
+ [event: string]: (payload: Record<string, unknown>) => Promise<void> | void;
10
+ }
11
+ interface StreamingTransport {
12
+ connect(): Promise<void>;
13
+ disconnect(): Promise<void>;
14
+ join(topic: string, handlers: TopicHandlers): Promise<void>;
15
+ leave(topic: string): Promise<void>;
16
+ runForever(signal: AbortSignal): Promise<void>;
17
+ isConnected(): boolean;
18
+ }
19
+
20
+ interface ThenvoiLinkOptions {
21
+ agentId: string;
22
+ apiKey: string;
23
+ wsUrl?: string;
24
+ restUrl?: string;
25
+ restApi?: ThenvoiLinkRestApi;
26
+ transport?: StreamingTransport;
27
+ logger?: Logger;
28
+ capabilities?: Partial<AgentToolsCapabilities>;
29
+ }
30
+ interface MessageMarkOptions {
31
+ bestEffort?: boolean;
32
+ }
33
+ declare class ThenvoiLink implements AsyncIterable<PlatformEvent> {
34
+ readonly agentId: string;
35
+ private readonly apiKey;
36
+ readonly wsUrl: string;
37
+ readonly restUrl: string;
38
+ readonly rest: ThenvoiLinkRestApi;
39
+ readonly capabilities: AgentToolsCapabilities;
40
+ private readonly logger;
41
+ private readonly transport;
42
+ private readonly subscribedRooms;
43
+ private readonly eventQueue;
44
+ private readonly waiters;
45
+ private connected;
46
+ constructor(options: ThenvoiLinkOptions);
47
+ isConnected(): boolean;
48
+ connect(): Promise<void>;
49
+ disconnect(): Promise<void>;
50
+ runForever(signal: AbortSignal): Promise<void>;
51
+ queueEvent(event: PlatformEvent): void;
52
+ subscribeAgentRooms(): Promise<void>;
53
+ subscribeRoom(roomId: string): Promise<void>;
54
+ unsubscribeRoom(roomId: string): Promise<void>;
55
+ subscribeAgentContacts(): Promise<void>;
56
+ unsubscribeAgentContacts(): Promise<void>;
57
+ nextEvent(signal?: AbortSignal): Promise<PlatformEvent | null>;
58
+ [Symbol.asyncIterator](): AsyncIterator<PlatformEvent>;
59
+ markProcessing(roomId: string, messageId: string, options?: MessageMarkOptions): Promise<void>;
60
+ markProcessed(roomId: string, messageId: string, options?: MessageMarkOptions): Promise<void>;
61
+ markFailed(roomId: string, messageId: string, error: string, options?: MessageMarkOptions): Promise<void>;
62
+ private markMessageStatus;
63
+ getNextMessage(roomId: string): Promise<PlatformMessageLike | null>;
64
+ getStaleProcessingMessages(roomId: string): Promise<PlatformMessageLike[]>;
65
+ listChats(request: {
66
+ page: number;
67
+ pageSize: number;
68
+ }, requestOptions?: RestRequestOptions): Promise<PaginatedResponse>;
69
+ listAllChats(options?: PaginationOptions, requestOptions?: RestRequestOptions): Promise<MetadataMap[]>;
70
+ private emit;
71
+ }
72
+
73
+ declare class MessageRetryTracker {
74
+ private readonly maxRetriesValue;
75
+ private readonly maxTracked;
76
+ private attempts;
77
+ private failed;
78
+ constructor(maxRetries?: number, maxTracked?: number);
79
+ get maxRetries(): number;
80
+ isPermanentlyFailed(messageId: string): boolean;
81
+ recordAttempt(messageId: string): [number, boolean];
82
+ markSuccess(messageId: string): void;
83
+ markPermanentlyFailed(messageId: string): void;
84
+ private evictMapIfNeeded;
85
+ private evictSetIfNeeded;
86
+ }
87
+
88
+ type ExecutionState = "starting" | "idle" | "processing";
89
+ interface ExecutionContextLink {
90
+ rest: AgentToolsRestApi;
91
+ capabilities?: Partial<AgentToolsCapabilities>;
92
+ }
93
+ interface ExecutionContextOptions {
94
+ roomId: string;
95
+ link: ExecutionContextLink;
96
+ maxContextMessages: number;
97
+ maxMessageRetries?: number;
98
+ enableContextCache?: boolean;
99
+ contextCacheTtlSeconds?: number;
100
+ enableContextHydration?: boolean;
101
+ }
102
+ declare class ExecutionContext {
103
+ readonly roomId: string;
104
+ readonly link: ExecutionContextLink;
105
+ private readonly maxContextMessages;
106
+ private readonly enableContextCache;
107
+ private readonly contextCacheTtlMs;
108
+ private readonly enableContextHydration;
109
+ private readonly history;
110
+ private messageIds;
111
+ private readonly dedupCache;
112
+ private participants;
113
+ private readonly tools;
114
+ private readonly adapterTools;
115
+ private participantsMessage;
116
+ private lastSentParticipantIds;
117
+ private contactsMessage;
118
+ private contextCache;
119
+ private contextCacheExpiresAt;
120
+ private _state;
121
+ private readonly retryTrackerInstance;
122
+ private _llmInitialized;
123
+ private readonly _pendingSystemMessages;
124
+ constructor(options: ExecutionContextOptions);
125
+ get state(): ExecutionState;
126
+ setState(state: ExecutionState): void;
127
+ getRetryTracker(): MessageRetryTracker;
128
+ get isLlmInitialized(): boolean;
129
+ markLlmInitialized(): void;
130
+ injectSystemMessage(message: string): void;
131
+ consumeSystemMessages(): string[];
132
+ getTools(): AdapterToolsProtocol;
133
+ hasMessage(messageId: string): boolean;
134
+ recordMessage(message: PlatformMessage): void;
135
+ getRawHistory(): MetadataMap[];
136
+ setParticipants(participants: ParticipantRecord[]): void;
137
+ addParticipant(participant: ParticipantRecord): void;
138
+ removeParticipant(participantId: string): void;
139
+ setContactsMessage(message: string | null): void;
140
+ consumeParticipantsMessage(): string | null;
141
+ consumeContactsMessage(): string | null;
142
+ getHydratedHistory(excludeMessageId?: string): Promise<MetadataMap[]>;
143
+ hydrateContext(forceRefresh?: boolean): Promise<ConversationContext>;
144
+ private replaceParticipants;
145
+ private buildLocalContext;
146
+ private loadParticipants;
147
+ private loadHydratedMessages;
148
+ private updateCachedParticipants;
149
+ private isCacheExpired;
150
+ private nextCacheExpiry;
151
+ private toHistoryEntry;
152
+ private rebuildMessageIds;
153
+ private trackDedup;
154
+ }
155
+
156
+ interface PlatformRuntimeOptions {
157
+ agentId: string;
158
+ apiKey: string;
159
+ wsUrl?: string;
160
+ restUrl?: string;
161
+ link?: ThenvoiLink;
162
+ linkOptions?: Omit<ThenvoiLinkOptions, "agentId" | "apiKey">;
163
+ preprocessor?: Preprocessor<PlatformEvent>;
164
+ sessionConfig?: SessionConfig;
165
+ contactConfig?: ContactEventConfig;
166
+ agentConfig?: AgentConfig;
167
+ logger?: Logger;
168
+ onParticipantAdded?: (roomId: string, participant: ParticipantRecord) => Promise<void> | void;
169
+ onParticipantRemoved?: (roomId: string, participantId: string) => Promise<void> | void;
170
+ roomFilter?: (room: MetadataMap) => boolean;
171
+ contextFactory?: (roomId: string, defaults: ExecutionContextOptions) => ExecutionContext;
172
+ identity?: {
173
+ name: string;
174
+ description?: string | null;
175
+ };
176
+ }
177
+ declare class PlatformRuntime {
178
+ private readonly _agentId;
179
+ private readonly _apiKey;
180
+ private readonly _wsUrl?;
181
+ private readonly _restUrl?;
182
+ private readonly preprocessor;
183
+ private readonly sessionConfig?;
184
+ private readonly contactConfig?;
185
+ private readonly agentConfig?;
186
+ private readonly linkOptions?;
187
+ private readonly configuredIdentity?;
188
+ private readonly logger;
189
+ private readonly _onParticipantAdded?;
190
+ private readonly _onParticipantRemoved?;
191
+ private readonly _roomFilter?;
192
+ private readonly _contextFactory?;
193
+ private linkInstance?;
194
+ private initPromise;
195
+ private runtime?;
196
+ private contactHandler?;
197
+ private activeAdapter?;
198
+ private stopping;
199
+ private _agentName;
200
+ private _agentDescription;
201
+ private contactsSubscribed;
202
+ constructor(options: PlatformRuntimeOptions);
203
+ get link(): ThenvoiLink;
204
+ get name(): string;
205
+ get agentId(): string;
206
+ get description(): string;
207
+ get contactConfiguration(): ContactEventConfig | undefined;
208
+ get isContactsSubscribed(): boolean;
209
+ initialize(): Promise<void>;
210
+ private doInitialize;
211
+ start(adapter: FrameworkAdapter): Promise<void>;
212
+ stop(timeoutMs?: number): Promise<boolean>;
213
+ runForever(): Promise<void>;
214
+ bootstrapRoomMessage(roomId: string, message: PlatformMessage): Promise<void>;
215
+ resetRoomSession(roomId: string, timeoutMs?: number): Promise<boolean>;
216
+ private executeAdapter;
217
+ private handleContactEvent;
218
+ }
219
+
220
+ interface AgentRuntimeOptions {
221
+ link: ThenvoiLink;
222
+ agentId: string;
223
+ onExecute: (context: ExecutionContext, event: PlatformEvent) => Promise<void>;
224
+ onSessionCleanup?: (roomId: string) => Promise<void>;
225
+ onRoomJoined?: (roomId: string, payload: MetadataMap) => Promise<void> | void;
226
+ onRoomLeft?: (roomId: string) => Promise<void> | void;
227
+ onContactEvent?: (event: ContactEvent) => Promise<void>;
228
+ onParticipantAdded?: (roomId: string, participant: ParticipantRecord) => Promise<void> | void;
229
+ onParticipantRemoved?: (roomId: string, participantId: string) => Promise<void> | void;
230
+ onError?: (error: unknown, event: PlatformEvent) => void;
231
+ roomFilter?: (room: MetadataMap) => boolean;
232
+ contextFactory?: (roomId: string, defaults: ExecutionContextOptions) => ExecutionContext;
233
+ sessionConfig?: SessionConfig;
234
+ agentConfig?: AgentConfig;
235
+ logger?: Logger;
236
+ }
237
+ declare class AgentRuntime {
238
+ private readonly link;
239
+ private readonly agentId;
240
+ private readonly onExecute;
241
+ private readonly onSessionCleanup;
242
+ private readonly onRoomJoined?;
243
+ private readonly onRoomLeft?;
244
+ private readonly onContactEvent?;
245
+ private readonly onParticipantAdded?;
246
+ private readonly onParticipantRemoved?;
247
+ private readonly onError?;
248
+ private readonly roomFilter?;
249
+ private readonly contextFactory?;
250
+ private readonly sessionConfig;
251
+ private readonly autoSubscribeExistingRooms;
252
+ private readonly subscribedRooms;
253
+ private readonly contexts;
254
+ private readonly executions;
255
+ private readonly executionWatchers;
256
+ private readonly logger;
257
+ private running;
258
+ private stopping;
259
+ private stopController;
260
+ private consumeTask;
261
+ private fatalError;
262
+ constructor(options: AgentRuntimeOptions);
263
+ start(): Promise<void>;
264
+ private handleStartFailure;
265
+ stop(timeoutMs?: number): Promise<boolean>;
266
+ getContext(roomId: string): ExecutionContext | undefined;
267
+ waitUntilStopped(): Promise<void>;
268
+ getContexts(): ExecutionContext[];
269
+ private consumeLoop;
270
+ private handleEvent;
271
+ enqueueEvent(roomId: string, event: PlatformEvent): Promise<void>;
272
+ bootstrapRoomMessage(roomId: string, message: PlatformMessage): Promise<void>;
273
+ resetRoomSession(roomId: string, timeoutMs?: number): Promise<boolean>;
274
+ private getOrCreateExecution;
275
+ getOrCreateContext(roomId: string): ExecutionContext;
276
+ private subscribeExistingRooms;
277
+ private leaveTrackedRoom;
278
+ private failRuntime;
279
+ private notifyOnError;
280
+ }
281
+
282
+ declare class DefaultPreprocessor implements Preprocessor<PlatformEvent> {
283
+ process(context: PreprocessorContext, event: PlatformEvent, agentId: string): Promise<AgentInput | null>;
284
+ }
285
+
286
+ declare const TOOL_MODELS: {
287
+ readonly thenvoi_send_message: {
288
+ readonly description: string;
289
+ readonly properties: {
290
+ readonly content: {
291
+ readonly type: "string";
292
+ readonly description: "The message content to send.";
293
+ };
294
+ readonly mentions: {
295
+ readonly type: "array";
296
+ readonly items: {
297
+ readonly type: "string";
298
+ };
299
+ readonly minItems: 1;
300
+ readonly description: string;
301
+ };
302
+ };
303
+ readonly required: readonly ["content", "mentions"];
304
+ };
305
+ readonly thenvoi_send_event: {
306
+ readonly description: string;
307
+ readonly properties: {
308
+ readonly content: {
309
+ readonly type: "string";
310
+ readonly description: "Human-readable event content.";
311
+ };
312
+ readonly message_type: {
313
+ readonly type: "string";
314
+ readonly enum: readonly ["tool_call", "tool_result", "thought", "error", "task"];
315
+ readonly description: "Type of event.";
316
+ };
317
+ readonly metadata: {
318
+ readonly type: "object";
319
+ readonly description: "Optional structured data for the event.";
320
+ };
321
+ };
322
+ readonly required: readonly ["content", "message_type"];
323
+ };
324
+ readonly thenvoi_add_participant: {
325
+ readonly description: string;
326
+ readonly properties: {
327
+ readonly name: {
328
+ readonly type: "string";
329
+ readonly description: "Name of participant to add (must match a name from thenvoi_lookup_peers).";
330
+ };
331
+ readonly role: {
332
+ readonly type: "string";
333
+ readonly enum: readonly ["owner", "admin", "member"];
334
+ readonly description: "Role for the participant in this room.";
335
+ };
336
+ };
337
+ readonly required: readonly ["name"];
338
+ };
339
+ readonly thenvoi_remove_participant: {
340
+ readonly description: "Remove a participant from the chat room by name.";
341
+ readonly properties: {
342
+ readonly name: {
343
+ readonly type: "string";
344
+ readonly description: "Name of the participant to remove.";
345
+ };
346
+ };
347
+ readonly required: readonly ["name"];
348
+ };
349
+ readonly thenvoi_get_participants: {
350
+ readonly description: "Get a list of all participants in the current chat room.";
351
+ readonly properties: {};
352
+ readonly required: readonly [];
353
+ };
354
+ readonly thenvoi_lookup_peers: {
355
+ readonly description: string;
356
+ readonly properties: {
357
+ readonly page: {
358
+ readonly type: "integer";
359
+ readonly description: "Page number.";
360
+ };
361
+ readonly page_size: {
362
+ readonly type: "integer";
363
+ readonly description: "Items per page (max 100).";
364
+ readonly maximum: 100;
365
+ };
366
+ };
367
+ readonly required: readonly [];
368
+ };
369
+ readonly thenvoi_create_chatroom: {
370
+ readonly description: "Create a new chat room for a specific task or conversation.";
371
+ readonly properties: {
372
+ readonly task_id: {
373
+ readonly type: "string";
374
+ readonly description: "Associated task ID (optional).";
375
+ };
376
+ };
377
+ readonly required: readonly [];
378
+ };
379
+ readonly thenvoi_list_contacts: {
380
+ readonly description: "List agent's contacts with pagination.";
381
+ readonly properties: {
382
+ readonly page: {
383
+ readonly type: "integer";
384
+ readonly description: "Page number.";
385
+ readonly minimum: 1;
386
+ };
387
+ readonly page_size: {
388
+ readonly type: "integer";
389
+ readonly description: "Items per page.";
390
+ readonly minimum: 1;
391
+ readonly maximum: 100;
392
+ };
393
+ };
394
+ readonly required: readonly [];
395
+ };
396
+ readonly thenvoi_add_contact: {
397
+ readonly description: string;
398
+ readonly properties: {
399
+ readonly handle: {
400
+ readonly type: "string";
401
+ readonly description: "Handle of user/agent to add (e.g., '@john' or '@john/agent-name').";
402
+ };
403
+ readonly message: {
404
+ readonly type: "string";
405
+ readonly description: "Optional message with the request.";
406
+ };
407
+ };
408
+ readonly required: readonly ["handle"];
409
+ };
410
+ readonly thenvoi_remove_contact: {
411
+ readonly description: "Remove an existing contact by handle or ID.";
412
+ readonly properties: {
413
+ readonly handle: {
414
+ readonly type: "string";
415
+ readonly description: "Contact's handle.";
416
+ };
417
+ readonly contact_id: {
418
+ readonly type: "string";
419
+ readonly description: "Or contact record ID (UUID).";
420
+ };
421
+ };
422
+ readonly required: readonly [];
423
+ };
424
+ readonly thenvoi_list_contact_requests: {
425
+ readonly description: string;
426
+ readonly properties: {
427
+ readonly page: {
428
+ readonly type: "integer";
429
+ readonly description: "Page number.";
430
+ readonly minimum: 1;
431
+ };
432
+ readonly page_size: {
433
+ readonly type: "integer";
434
+ readonly description: "Items per page per direction (max 100).";
435
+ readonly minimum: 1;
436
+ readonly maximum: 100;
437
+ };
438
+ readonly sent_status: {
439
+ readonly type: "string";
440
+ readonly enum: readonly ["pending", "approved", "rejected", "cancelled", "all"];
441
+ readonly description: "Filter sent requests by status.";
442
+ };
443
+ };
444
+ readonly required: readonly [];
445
+ };
446
+ readonly thenvoi_respond_contact_request: {
447
+ readonly description: string;
448
+ readonly properties: {
449
+ readonly action: {
450
+ readonly type: "string";
451
+ readonly enum: readonly ["approve", "reject", "cancel"];
452
+ readonly description: "Action to take.";
453
+ };
454
+ readonly handle: {
455
+ readonly type: "string";
456
+ readonly description: "Other party's handle.";
457
+ };
458
+ readonly request_id: {
459
+ readonly type: "string";
460
+ readonly description: "Or request ID (UUID).";
461
+ };
462
+ };
463
+ readonly required: readonly ["action"];
464
+ };
465
+ readonly thenvoi_list_memories: {
466
+ readonly description: string;
467
+ readonly properties: {
468
+ readonly subject_id: {
469
+ readonly type: "string";
470
+ readonly description: "Filter by subject UUID (required for subject-scoped queries).";
471
+ };
472
+ readonly scope: {
473
+ readonly type: "string";
474
+ readonly enum: readonly ["subject", "organization", "all"];
475
+ readonly description: "Filter by scope.";
476
+ };
477
+ readonly system: {
478
+ readonly type: "string";
479
+ readonly enum: readonly ["sensory", "working", "long_term"];
480
+ readonly description: "Filter by memory system.";
481
+ };
482
+ readonly type: {
483
+ readonly type: "string";
484
+ readonly enum: readonly ["iconic", "echoic", "haptic", "episodic", "semantic", "procedural"];
485
+ readonly description: "Filter by memory type.";
486
+ };
487
+ readonly segment: {
488
+ readonly type: "string";
489
+ readonly enum: readonly ["user", "agent", "tool", "guideline"];
490
+ readonly description: "Filter by segment.";
491
+ };
492
+ readonly content_query: {
493
+ readonly type: "string";
494
+ readonly description: "Full-text search query.";
495
+ };
496
+ readonly page_size: {
497
+ readonly type: "integer";
498
+ readonly description: "Number of results per page.";
499
+ readonly minimum: 1;
500
+ readonly maximum: 50;
501
+ };
502
+ readonly status: {
503
+ readonly type: "string";
504
+ readonly enum: readonly ["active", "superseded", "archived", "all"];
505
+ readonly description: "Filter by status.";
506
+ };
507
+ };
508
+ readonly required: readonly [];
509
+ };
510
+ readonly thenvoi_store_memory: {
511
+ readonly description: string;
512
+ readonly properties: {
513
+ readonly content: {
514
+ readonly type: "string";
515
+ readonly description: "The memory content.";
516
+ };
517
+ readonly system: {
518
+ readonly type: "string";
519
+ readonly enum: readonly ["sensory", "working", "long_term"];
520
+ readonly description: "Memory system tier.";
521
+ };
522
+ readonly type: {
523
+ readonly type: "string";
524
+ readonly enum: readonly ["iconic", "echoic", "haptic", "episodic", "semantic", "procedural"];
525
+ readonly description: "Memory type (must be valid for selected system).";
526
+ };
527
+ readonly segment: {
528
+ readonly type: "string";
529
+ readonly enum: readonly ["user", "agent", "tool", "guideline"];
530
+ readonly description: "Logical segment.";
531
+ };
532
+ readonly thought: {
533
+ readonly type: "string";
534
+ readonly description: "Agent's reasoning for storing this memory.";
535
+ };
536
+ readonly scope: {
537
+ readonly type: "string";
538
+ readonly enum: readonly ["subject", "organization"];
539
+ readonly description: "Visibility scope.";
540
+ };
541
+ readonly subject_id: {
542
+ readonly type: "string";
543
+ readonly description: "UUID of the subject this memory is about (required for subject scope).";
544
+ };
545
+ readonly metadata: {
546
+ readonly type: "object";
547
+ readonly description: "Additional metadata (tags, references).";
548
+ };
549
+ };
550
+ readonly required: readonly ["content", "system", "type", "segment", "thought"];
551
+ };
552
+ readonly thenvoi_get_memory: {
553
+ readonly description: "Retrieve a specific memory by ID.";
554
+ readonly properties: {
555
+ readonly memory_id: {
556
+ readonly type: "string";
557
+ readonly description: "Memory ID (UUID).";
558
+ };
559
+ };
560
+ readonly required: readonly ["memory_id"];
561
+ };
562
+ readonly thenvoi_supersede_memory: {
563
+ readonly description: string;
564
+ readonly properties: {
565
+ readonly memory_id: {
566
+ readonly type: "string";
567
+ readonly description: "Memory ID (UUID).";
568
+ };
569
+ };
570
+ readonly required: readonly ["memory_id"];
571
+ };
572
+ readonly thenvoi_archive_memory: {
573
+ readonly description: string;
574
+ readonly properties: {
575
+ readonly memory_id: {
576
+ readonly type: "string";
577
+ readonly description: "Memory ID (UUID).";
578
+ };
579
+ };
580
+ readonly required: readonly ["memory_id"];
581
+ };
582
+ };
583
+ declare const ALL_TOOL_NAMES: Set<string>;
584
+ declare const MEMORY_TOOL_NAMES: Set<string>;
585
+ declare const CONTACT_TOOL_NAMES: Set<string>;
586
+ declare const BASE_TOOL_NAMES: Set<string>;
587
+ declare const CHAT_TOOL_NAMES: Set<string>;
588
+ declare const MCP_TOOL_PREFIX = "mcp__thenvoi__";
589
+ declare function mcpToolNames(names: Set<string>): string[];
590
+ declare function getToolDescription(name: string): string;
591
+
592
+ export { AgentRuntime as A, BASE_TOOL_NAMES as B, CHAT_TOOL_NAMES as C, DefaultPreprocessor as D, type ExecutionContextOptions as E, MCP_TOOL_PREFIX as M, PlatformRuntime as P, TOOL_MODELS as T, type PlatformRuntimeOptions as a, ThenvoiLink as b, ExecutionContext as c, ALL_TOOL_NAMES as d, CONTACT_TOOL_NAMES as e, type ExecutionState as f, MEMORY_TOOL_NAMES as g, MessageRetryTracker as h, getToolDescription as i, mcpToolNames as m };