@band-ai/sdk 0.1.6 → 0.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.
Files changed (85) hide show
  1. package/README.md +372 -0
  2. package/dist/{ClaudeSDKAdapter-CRq4R-WB.d.cts → ClaudeSDKAdapter-BY4zEbCl.d.cts} +14 -10
  3. package/dist/{ClaudeSDKAdapter-BHOkjN3X.d.ts → ClaudeSDKAdapter-Cna5P1dR.d.ts} +14 -10
  4. package/dist/{acp-server-B1Da7L6u.d.ts → acp-server-CiUqN3G3.d.ts} +2 -2
  5. package/dist/{acp-server-BdRz9_UN.d.cts → acp-server-Dlj7D563.d.cts} +2 -2
  6. package/dist/adapters.cjs +734 -279
  7. package/dist/adapters.d.cts +21 -19
  8. package/dist/adapters.d.ts +21 -19
  9. package/dist/adapters.js +65 -44
  10. package/dist/backends-D-dBdDm-.d.ts +27 -0
  11. package/dist/backends-ZLxmQrTZ.d.cts +27 -0
  12. package/dist/{chunk-MSL6CWHY.js → chunk-4IAXZBXX.js} +77 -37
  13. package/dist/{chunk-SG4WLD2H.js → chunk-EAI2M3WM.js} +38 -94
  14. package/dist/{chunk-YR3BOQNW.js → chunk-JY75VSQK.js} +7 -7
  15. package/dist/{chunk-INA6YZTZ.js → chunk-LBWKISBS.js} +51 -31
  16. package/dist/{chunk-I5EZG52P.js → chunk-N2QTUMGO.js} +532 -327
  17. package/dist/{chunk-RHVH2GZR.js → chunk-NMZLX7TP.js} +110 -56
  18. package/dist/{chunk-EDPKUUJL.js → chunk-NT7TBFX2.js} +9 -1
  19. package/dist/{chunk-GVEQ3RAH.js → chunk-RV76SKFT.js} +169 -54
  20. package/dist/{chunk-W5NDZSYE.js → chunk-TLBCKDQO.js} +23 -23
  21. package/dist/chunk-US226AS4.js +130 -0
  22. package/dist/{chunk-IZPV6QS6.js → chunk-WL2HNJZ6.js} +38 -11
  23. package/dist/chunk-WLCM2OXG.js +181 -0
  24. package/dist/config.cjs +40 -13
  25. package/dist/config.d.cts +7 -1
  26. package/dist/config.d.ts +7 -1
  27. package/dist/config.js +2 -2
  28. package/dist/converters.cjs +491 -35
  29. package/dist/converters.d.cts +5 -5
  30. package/dist/converters.d.ts +5 -5
  31. package/dist/converters.js +4 -3
  32. package/dist/core.cjs +53 -10
  33. package/dist/core.d.cts +10 -9
  34. package/dist/core.d.ts +10 -9
  35. package/dist/core.js +8 -4
  36. package/dist/disconnectReason-IuADl6TH.d.cts +34 -0
  37. package/dist/disconnectReason-IuADl6TH.d.ts +34 -0
  38. package/dist/{dtos-DUpbIu8k.d.ts → dtos-B8KU_q4d.d.cts} +26 -6
  39. package/dist/{dtos-DUpbIu8k.d.cts → dtos-B8KU_q4d.d.ts} +26 -6
  40. package/dist/index.cjs +1510 -735
  41. package/dist/index.d.cts +18 -16
  42. package/dist/index.d.ts +18 -16
  43. package/dist/index.js +21 -13
  44. package/dist/linear.cjs +1044 -112
  45. package/dist/linear.d.cts +146 -16
  46. package/dist/linear.d.ts +146 -16
  47. package/dist/linear.js +1031 -110
  48. package/dist/mcp-claude.cjs +338 -66
  49. package/dist/mcp-claude.d.cts +3 -3
  50. package/dist/mcp-claude.d.ts +3 -3
  51. package/dist/mcp-claude.js +215 -16
  52. package/dist/mcp.cjs +414 -105
  53. package/dist/mcp.d.cts +29 -16
  54. package/dist/mcp.d.ts +29 -16
  55. package/dist/mcp.js +14 -14
  56. package/dist/{opencode-BBcDchcN.d.cts → opencode-2YdscIc1.d.cts} +5 -5
  57. package/dist/{opencode-DthQQUsZ.d.ts → opencode-Bld62x5t.d.ts} +5 -5
  58. package/dist/{pagination-CcDkVFxK.d.ts → pagination-BgEx-HeL.d.ts} +2 -2
  59. package/dist/{pagination-BPiys10t.d.cts → pagination-DqdkQArT.d.cts} +2 -2
  60. package/dist/{protocols-DrhzOH6K.d.ts → protocols-Bwwcql0h.d.ts} +1 -1
  61. package/dist/{protocols-CInhtFpA.d.cts → protocols-Bz1rxcUg.d.cts} +1 -1
  62. package/dist/rest.cjs +41 -97
  63. package/dist/rest.d.cts +7 -7
  64. package/dist/rest.d.ts +7 -7
  65. package/dist/rest.js +2 -2
  66. package/dist/runtime.cjs +998 -620
  67. package/dist/runtime.d.cts +22 -29
  68. package/dist/runtime.d.ts +22 -29
  69. package/dist/runtime.js +19 -67
  70. package/dist/{schemas-BpEBkq5V.d.cts → schemas-BotL3ZLH.d.cts} +51 -56
  71. package/dist/{schemas-vos1AaBc.d.ts → schemas-DBsC4J1g.d.ts} +51 -56
  72. package/dist/{sdk-CwTAxhwI.d.cts → sdk-BTciSLRQ.d.cts} +35 -5
  73. package/dist/{sdk-CcnQ5OUC.d.ts → sdk-qKJtMma_.d.ts} +35 -5
  74. package/dist/{simpleAdapter-9OE_p6QW.d.ts → simpleAdapter--wznuoOw.d.ts} +1 -1
  75. package/dist/{simpleAdapter-DqhvjsGr.d.cts → simpleAdapter-BpT4XbZC.d.cts} +1 -1
  76. package/dist/testing.d.cts +3 -3
  77. package/dist/testing.d.ts +3 -3
  78. package/dist/{types-7jVzOeOP.d.ts → types-BTN_ZETM.d.ts} +2 -2
  79. package/dist/{types-CxII3XkA.d.ts → types-BgYFd_Yw.d.cts} +5 -5
  80. package/dist/{types-CSHFipIc.d.cts → types-BivGO7I9.d.ts} +5 -5
  81. package/dist/{types-CovcHpYf.d.cts → types-D958TC71.d.cts} +2 -2
  82. package/package.json +25 -23
  83. package/dist/backends-CzDbiQar.d.ts +0 -20
  84. package/dist/backends-SVMT-7l4.d.cts +0 -20
  85. package/dist/chunk-SFVKOEQH.js +0 -103
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ValidationError
3
- } from "./chunk-YR3BOQNW.js";
3
+ } from "./chunk-JY75VSQK.js";
4
4
 
5
5
  // src/contracts/chatEvents.ts
6
6
  var CHAT_EVENT_TYPES = ["tool_call", "tool_result", "thought", "error", "task"];
@@ -16,9 +16,111 @@ function assertChatEventType(value) {
16
16
  }
17
17
  }
18
18
 
19
+ // src/contracts/memory.ts
20
+ var SENSORY_MEMORY_TYPES = [
21
+ "iconic",
22
+ // Visual input
23
+ "echoic",
24
+ // Auditory input
25
+ "haptic"
26
+ // Tactile input
27
+ ];
28
+ var COGNITIVE_MEMORY_TYPES = [
29
+ "episodic",
30
+ // Events that occurred
31
+ "semantic",
32
+ // Facts, preferences, learned knowledge
33
+ "procedural"
34
+ // How to perform tasks
35
+ ];
36
+ function namedValues(values) {
37
+ return Object.fromEntries(values.map((value) => [value, value]));
38
+ }
39
+ var MEMORY_SYSTEM_TYPES = {
40
+ sensory: SENSORY_MEMORY_TYPES,
41
+ // Brief sensory inputs
42
+ working: COGNITIVE_MEMORY_TYPES,
43
+ // Short-term session context
44
+ long_term: COGNITIVE_MEMORY_TYPES
45
+ // Persistent cross-conversation memory
46
+ };
47
+ var MEMORY_SYSTEMS = Object.keys(MEMORY_SYSTEM_TYPES);
48
+ var MEMORY_TYPES = [
49
+ ...SENSORY_MEMORY_TYPES,
50
+ ...COGNITIVE_MEMORY_TYPES
51
+ ];
52
+ var MEMORY_SEGMENTS = [
53
+ "user",
54
+ // User preferences or profile info
55
+ "agent",
56
+ // Facts or events about agents/entities
57
+ "tool",
58
+ // Tool usage or task procedures
59
+ "guideline"
60
+ // Behavioral rules or policies
61
+ ];
62
+ var MEMORY_STORE_SCOPES = [
63
+ "subject",
64
+ // About one person/agent; requires subject_id
65
+ "organization"
66
+ // Shared org-wide
67
+ ];
68
+ var MEMORY_LIST_SCOPES = [
69
+ "subject",
70
+ // Subject-scoped memories only
71
+ "organization",
72
+ // Organization-scoped memories only
73
+ "all"
74
+ // Both scopes (no scope filter)
75
+ ];
76
+ var MEMORY_STATUSES = [
77
+ "active",
78
+ // Normal, visible memories
79
+ "superseded",
80
+ // Outdated; soft-deleted via band_supersede_memory
81
+ "archived",
82
+ // Hidden but preserved via band_archive_memory
83
+ "all"
84
+ // Any status (no filter)
85
+ ];
86
+ var MEMORY_SYSTEM = namedValues(MEMORY_SYSTEMS);
87
+ var MEMORY_TYPE = namedValues(MEMORY_TYPES);
88
+ var MEMORY_SEGMENT = namedValues(MEMORY_SEGMENTS);
89
+ var MEMORY_STORE_SCOPE = namedValues(MEMORY_STORE_SCOPES);
90
+ function isMemorySystem(value) {
91
+ return MEMORY_SYSTEMS.includes(value);
92
+ }
93
+ function isMemoryType(value) {
94
+ return MEMORY_TYPES.includes(value);
95
+ }
96
+ function isMemoryTypeForSystem(system, type) {
97
+ return MEMORY_SYSTEM_TYPES[system].includes(type);
98
+ }
99
+ function isMemorySegment(value) {
100
+ return MEMORY_SEGMENTS.includes(value);
101
+ }
102
+ function isMemoryStoreScope(value) {
103
+ return MEMORY_STORE_SCOPES.includes(value);
104
+ }
105
+ function isMemoryListScope(value) {
106
+ return MEMORY_LIST_SCOPES.includes(value);
107
+ }
108
+ function isMemoryStatus(value) {
109
+ return MEMORY_STATUSES.includes(value);
110
+ }
111
+ function expectedList(values) {
112
+ return values.join(", ");
113
+ }
114
+ function expectedMemoryTypesForSystem(system) {
115
+ return expectedList(MEMORY_SYSTEM_TYPES[system]);
116
+ }
117
+ function memoryTypeForSystemError(system) {
118
+ return `type must be one of: ${expectedMemoryTypesForSystem(system)} for system "${system}"`;
119
+ }
120
+
19
121
  // src/runtime/tools/schemas.ts
20
122
  var TOOL_MODELS = {
21
- thenvoi_send_message: {
123
+ band_send_message: {
22
124
  description: "Send a message to the chat room. Use this to respond to users or other agents. Messages require at least one @mention in the mentions array. You MUST use this tool to communicate \u2014 plain text responses won't reach users. When delegating, send the full task context in this message instead of assuming hidden state.",
23
125
  properties: {
24
126
  content: {
@@ -34,7 +136,7 @@ var TOOL_MODELS = {
34
136
  },
35
137
  required: ["content", "mentions"]
36
138
  },
37
- thenvoi_send_event: {
139
+ band_send_event: {
38
140
  description: "Send an event to the chat room. No mentions required. 'thought': Share your reasoning or plan BEFORE taking actions. Explain what you're about to do and why. 'error': Report an error or problem that occurred. 'task': Report task progress or completion status. Always send a thought before complex actions to keep users informed.",
39
141
  properties: {
40
142
  content: {
@@ -53,12 +155,12 @@ var TOOL_MODELS = {
53
155
  },
54
156
  required: ["content", "message_type"]
55
157
  },
56
- thenvoi_add_participant: {
57
- description: "Add a participant (agent or user) to the chat room by name. IMPORTANT: Use thenvoi_lookup_peers() first to find available agents. Pass the exact peer name from thenvoi_lookup_peers, not the handle. For normal delegation, omit role or use 'member'.",
158
+ band_add_participant: {
159
+ description: "Add a participant (agent or user) to the chat room by name. IMPORTANT: Use band_lookup_peers() first to find available agents. Pass the exact peer name from band_lookup_peers, not the handle. For normal delegation, omit role or use 'member'.",
58
160
  properties: {
59
161
  name: {
60
162
  type: "string",
61
- description: "Name of participant to add (must match a name from thenvoi_lookup_peers)."
163
+ description: "Name of participant to add (must match a name from band_lookup_peers)."
62
164
  },
63
165
  role: {
64
166
  type: "string",
@@ -68,7 +170,7 @@ var TOOL_MODELS = {
68
170
  },
69
171
  required: ["name"]
70
172
  },
71
- thenvoi_remove_participant: {
173
+ band_remove_participant: {
72
174
  description: "Remove a participant from the chat room by name.",
73
175
  properties: {
74
176
  name: {
@@ -78,12 +180,12 @@ var TOOL_MODELS = {
78
180
  },
79
181
  required: ["name"]
80
182
  },
81
- thenvoi_get_participants: {
183
+ band_get_participants: {
82
184
  description: "Get a list of all participants in the current chat room.",
83
185
  properties: {},
84
186
  required: []
85
187
  },
86
- thenvoi_lookup_peers: {
188
+ band_lookup_peers: {
87
189
  description: "List available peers (agents and users) that can be added to this room. Automatically excludes peers already in the room. Returns dict with 'peers' list and 'metadata' (page, page_size, total_count, total_pages). Use this to find specialized agents (e.g., Weather Agent) when you cannot answer a question directly.",
88
190
  properties: {
89
191
  page: {
@@ -98,7 +200,7 @@ var TOOL_MODELS = {
98
200
  },
99
201
  required: []
100
202
  },
101
- thenvoi_create_chatroom: {
203
+ band_create_chatroom: {
102
204
  description: "Create a new chat room for a specific task or conversation.",
103
205
  properties: {
104
206
  task_id: {
@@ -108,7 +210,7 @@ var TOOL_MODELS = {
108
210
  },
109
211
  required: []
110
212
  },
111
- thenvoi_list_contacts: {
213
+ band_list_contacts: {
112
214
  description: "List agent's contacts with pagination.",
113
215
  properties: {
114
216
  page: {
@@ -125,7 +227,7 @@ var TOOL_MODELS = {
125
227
  },
126
228
  required: []
127
229
  },
128
- thenvoi_add_contact: {
230
+ band_add_contact: {
129
231
  description: "Send a contact request to add someone as a contact. Returns 'pending' when request is created. Returns 'approved' when inverse request existed and was auto-accepted.",
130
232
  properties: {
131
233
  handle: {
@@ -139,7 +241,7 @@ var TOOL_MODELS = {
139
241
  },
140
242
  required: ["handle"]
141
243
  },
142
- thenvoi_remove_contact: {
244
+ band_remove_contact: {
143
245
  description: "Remove an existing contact by handle or ID.",
144
246
  properties: {
145
247
  handle: {
@@ -153,7 +255,7 @@ var TOOL_MODELS = {
153
255
  },
154
256
  required: []
155
257
  },
156
- thenvoi_list_contact_requests: {
258
+ band_list_contact_requests: {
157
259
  description: "List both received and sent contact requests. Received requests are always filtered to pending status. Sent requests can be filtered by status.",
158
260
  properties: {
159
261
  page: {
@@ -175,7 +277,7 @@ var TOOL_MODELS = {
175
277
  },
176
278
  required: []
177
279
  },
178
- thenvoi_respond_contact_request: {
280
+ band_respond_contact_request: {
179
281
  description: "Respond to a contact request. 'approve'/'reject': For requests you RECEIVED (handle = requester's handle). 'cancel': For requests you SENT (handle = recipient's handle).",
180
282
  properties: {
181
283
  action: {
@@ -194,7 +296,7 @@ var TOOL_MODELS = {
194
296
  },
195
297
  required: ["action"]
196
298
  },
197
- thenvoi_list_memories: {
299
+ band_list_memories: {
198
300
  description: "List memories accessible to the agent. Returns memories about the specified subject (cross-agent sharing) and organization-wide shared memories.",
199
301
  properties: {
200
302
  subject_id: {
@@ -203,29 +305,22 @@ var TOOL_MODELS = {
203
305
  },
204
306
  scope: {
205
307
  type: "string",
206
- enum: ["subject", "organization", "all"],
308
+ enum: [...MEMORY_LIST_SCOPES],
207
309
  description: "Filter by scope."
208
310
  },
209
311
  system: {
210
312
  type: "string",
211
- enum: ["sensory", "working", "long_term"],
313
+ enum: [...MEMORY_SYSTEMS],
212
314
  description: "Filter by memory system."
213
315
  },
214
316
  type: {
215
317
  type: "string",
216
- enum: [
217
- "iconic",
218
- "echoic",
219
- "haptic",
220
- "episodic",
221
- "semantic",
222
- "procedural"
223
- ],
318
+ enum: [...MEMORY_TYPES],
224
319
  description: "Filter by memory type."
225
320
  },
226
321
  segment: {
227
322
  type: "string",
228
- enum: ["user", "agent", "tool", "guideline"],
323
+ enum: [...MEMORY_SEGMENTS],
229
324
  description: "Filter by segment."
230
325
  },
231
326
  content_query: {
@@ -240,13 +335,13 @@ var TOOL_MODELS = {
240
335
  },
241
336
  status: {
242
337
  type: "string",
243
- enum: ["active", "superseded", "archived", "all"],
338
+ enum: [...MEMORY_STATUSES],
244
339
  description: "Filter by status."
245
340
  }
246
341
  },
247
342
  required: []
248
343
  },
249
- thenvoi_store_memory: {
344
+ band_store_memory: {
250
345
  description: "Store a new memory entry. The memory will be associated with the authenticated agent as the source. For subject-scoped memories, provide a subject_id. For organization-scoped memories, omit subject_id.",
251
346
  properties: {
252
347
  content: {
@@ -255,24 +350,17 @@ var TOOL_MODELS = {
255
350
  },
256
351
  system: {
257
352
  type: "string",
258
- enum: ["sensory", "working", "long_term"],
353
+ enum: [...MEMORY_SYSTEMS],
259
354
  description: "Memory system tier."
260
355
  },
261
356
  type: {
262
357
  type: "string",
263
- enum: [
264
- "iconic",
265
- "echoic",
266
- "haptic",
267
- "episodic",
268
- "semantic",
269
- "procedural"
270
- ],
358
+ enum: [...MEMORY_TYPES],
271
359
  description: "Memory type (must be valid for selected system)."
272
360
  },
273
361
  segment: {
274
362
  type: "string",
275
- enum: ["user", "agent", "tool", "guideline"],
363
+ enum: [...MEMORY_SEGMENTS],
276
364
  description: "Logical segment."
277
365
  },
278
366
  thought: {
@@ -281,7 +369,7 @@ var TOOL_MODELS = {
281
369
  },
282
370
  scope: {
283
371
  type: "string",
284
- enum: ["subject", "organization"],
372
+ enum: [...MEMORY_STORE_SCOPES],
285
373
  description: "Visibility scope."
286
374
  },
287
375
  subject_id: {
@@ -295,7 +383,7 @@ var TOOL_MODELS = {
295
383
  },
296
384
  required: ["content", "system", "type", "segment", "thought"]
297
385
  },
298
- thenvoi_get_memory: {
386
+ band_get_memory: {
299
387
  description: "Retrieve a specific memory by ID.",
300
388
  properties: {
301
389
  memory_id: {
@@ -305,7 +393,7 @@ var TOOL_MODELS = {
305
393
  },
306
394
  required: ["memory_id"]
307
395
  },
308
- thenvoi_supersede_memory: {
396
+ band_supersede_memory: {
309
397
  description: "Mark a memory as superseded (soft delete). Use when information is outdated or incorrect. The memory remains for audit trail but won't appear in normal queries. Only the source agent can supersede.",
310
398
  properties: {
311
399
  memory_id: {
@@ -315,7 +403,7 @@ var TOOL_MODELS = {
315
403
  },
316
404
  required: ["memory_id"]
317
405
  },
318
- thenvoi_archive_memory: {
406
+ band_archive_memory: {
319
407
  description: "Archive a memory (hide but preserve). Use when memory is valid but not currently needed. Archived memories can be restored later by humans. Only the source agent can archive.",
320
408
  properties: {
321
409
  memory_id: {
@@ -328,18 +416,18 @@ var TOOL_MODELS = {
328
416
  };
329
417
  var ALL_TOOL_NAMES = new Set(Object.keys(TOOL_MODELS));
330
418
  var MEMORY_TOOL_NAMES = /* @__PURE__ */ new Set([
331
- "thenvoi_list_memories",
332
- "thenvoi_store_memory",
333
- "thenvoi_get_memory",
334
- "thenvoi_supersede_memory",
335
- "thenvoi_archive_memory"
419
+ "band_list_memories",
420
+ "band_store_memory",
421
+ "band_get_memory",
422
+ "band_supersede_memory",
423
+ "band_archive_memory"
336
424
  ]);
337
425
  var CONTACT_TOOL_NAMES = /* @__PURE__ */ new Set([
338
- "thenvoi_list_contacts",
339
- "thenvoi_add_contact",
340
- "thenvoi_remove_contact",
341
- "thenvoi_list_contact_requests",
342
- "thenvoi_respond_contact_request"
426
+ "band_list_contacts",
427
+ "band_add_contact",
428
+ "band_remove_contact",
429
+ "band_list_contact_requests",
430
+ "band_respond_contact_request"
343
431
  ]);
344
432
  var BASE_TOOL_NAMES = new Set(
345
433
  [...ALL_TOOL_NAMES].filter((name) => !MEMORY_TOOL_NAMES.has(name))
@@ -347,7 +435,10 @@ var BASE_TOOL_NAMES = new Set(
347
435
  var CHAT_TOOL_NAMES = new Set(
348
436
  [...BASE_TOOL_NAMES].filter((name) => !CONTACT_TOOL_NAMES.has(name))
349
437
  );
350
- var MCP_TOOL_PREFIX = "mcp__thenvoi__";
438
+ var MCP_TOOL_PREFIX = "mcp__band__";
439
+ var MCP_SERVER_NAME = "band";
440
+ var SEND_MESSAGE_TOOL_NAME = "band_send_message";
441
+ var SEND_EVENT_TOOL_NAME = "band_send_event";
351
442
  function mcpToolNames(names) {
352
443
  return [...names].sort((a, b) => a.localeCompare(b)).map((name) => `${MCP_TOOL_PREFIX}${name}`);
353
444
  }
@@ -361,6 +452,27 @@ export {
361
452
  CHAT_MESSAGE_TYPES,
362
453
  isChatEventType,
363
454
  assertChatEventType,
455
+ MEMORY_SYSTEM_TYPES,
456
+ MEMORY_SYSTEMS,
457
+ MEMORY_TYPES,
458
+ MEMORY_SEGMENTS,
459
+ MEMORY_STORE_SCOPES,
460
+ MEMORY_LIST_SCOPES,
461
+ MEMORY_STATUSES,
462
+ MEMORY_SYSTEM,
463
+ MEMORY_TYPE,
464
+ MEMORY_SEGMENT,
465
+ MEMORY_STORE_SCOPE,
466
+ isMemorySystem,
467
+ isMemoryType,
468
+ isMemoryTypeForSystem,
469
+ isMemorySegment,
470
+ isMemoryStoreScope,
471
+ isMemoryListScope,
472
+ isMemoryStatus,
473
+ expectedList,
474
+ expectedMemoryTypesForSystem,
475
+ memoryTypeForSystemError,
364
476
  TOOL_MODELS,
365
477
  ALL_TOOL_NAMES,
366
478
  MEMORY_TOOL_NAMES,
@@ -368,6 +480,9 @@ export {
368
480
  BASE_TOOL_NAMES,
369
481
  CHAT_TOOL_NAMES,
370
482
  MCP_TOOL_PREFIX,
483
+ MCP_SERVER_NAME,
484
+ SEND_MESSAGE_TOOL_NAME,
485
+ SEND_EVENT_TOOL_NAME,
371
486
  mcpToolNames,
372
487
  getToolDescription
373
488
  };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-AVVDPXP4.js";
4
4
  import {
5
5
  renderSystemPrompt
6
- } from "./chunk-SFVKOEQH.js";
6
+ } from "./chunk-WLCM2OXG.js";
7
7
  import {
8
8
  asErrorMessage,
9
9
  asNonEmptyString,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  UnsupportedFeatureError,
17
17
  ValidationError
18
- } from "./chunk-YR3BOQNW.js";
18
+ } from "./chunk-JY75VSQK.js";
19
19
 
20
20
  // src/adapters/shared/history.ts
21
21
  function findLatestTaskMetadata(raw, predicate) {
@@ -1098,7 +1098,7 @@ function buildAgentCard(peer, gatewayUrl) {
1098
1098
  id: "default",
1099
1099
  name: peer.name,
1100
1100
  description: peer.description,
1101
- tags: ["thenvoi", "gateway"]
1101
+ tags: ["band", "gateway"]
1102
1102
  }
1103
1103
  ],
1104
1104
  defaultInputModes: ["text/plain"],
@@ -1281,7 +1281,7 @@ var DEFAULT_RESPONSE_TIMEOUT_MS = 12e4;
1281
1281
  var DEFAULT_PEER_PAGE_SIZE = 100;
1282
1282
  var DEFAULT_MAX_PEER_PAGES = 25;
1283
1283
  var A2AGatewayAdapter = class extends SimpleAdapter {
1284
- thenvoiRest;
1284
+ bandRest;
1285
1285
  gatewayUrl;
1286
1286
  host;
1287
1287
  port;
@@ -1302,7 +1302,7 @@ var A2AGatewayAdapter = class extends SimpleAdapter {
1302
1302
  super({
1303
1303
  historyConverter: new GatewayHistoryConverter()
1304
1304
  });
1305
- this.thenvoiRest = options.thenvoiRest;
1305
+ this.bandRest = options.bandRest;
1306
1306
  this.gatewayUrl = options.gatewayUrl ?? DEFAULT_GATEWAY_URL;
1307
1307
  this.host = options.host ?? DEFAULT_HOST;
1308
1308
  this.port = options.port ?? DEFAULT_PORT;
@@ -1382,13 +1382,13 @@ var A2AGatewayAdapter = class extends SimpleAdapter {
1382
1382
  async refreshPeers() {
1383
1383
  this.peersBySlug.clear();
1384
1384
  this.peersById.clear();
1385
- if (!this.thenvoiRest.listPeers) {
1385
+ if (!this.bandRest.listPeers) {
1386
1386
  throw new UnsupportedFeatureError(
1387
1387
  "Peer listing is not available in current REST adapter"
1388
1388
  );
1389
1389
  }
1390
1390
  for (let page = 1; page <= this.maxPeerPages; page += 1) {
1391
- const response = await this.thenvoiRest.listPeers({
1391
+ const response = await this.bandRest.listPeers({
1392
1392
  page,
1393
1393
  pageSize: this.peerPageSize,
1394
1394
  notInChat: ""
@@ -1458,7 +1458,7 @@ var A2AGatewayAdapter = class extends SimpleAdapter {
1458
1458
  try {
1459
1459
  await this.emitContextEvent(roomId, contextId);
1460
1460
  const content = extractMessageText2(request.message) ?? "";
1461
- await this.thenvoiRest.createChatMessage(roomId, {
1461
+ await this.bandRest.createChatMessage(roomId, {
1462
1462
  content: buildMentionedContent(peer.name, content),
1463
1463
  mentions: buildMentions(peer),
1464
1464
  metadata: {
@@ -1489,7 +1489,7 @@ var A2AGatewayAdapter = class extends SimpleAdapter {
1489
1489
  contextId: pending.contextId,
1490
1490
  state: "failed",
1491
1491
  final: true,
1492
- text: "Timed out waiting for a Thenvoi peer response."
1492
+ text: "Timed out waiting for a Band peer response."
1493
1493
  });
1494
1494
  return;
1495
1495
  }
@@ -1576,7 +1576,7 @@ var A2AGatewayAdapter = class extends SimpleAdapter {
1576
1576
  if (existingRoom) {
1577
1577
  const participants = this.roomParticipants.get(existingRoom) ?? /* @__PURE__ */ new Set();
1578
1578
  if (!participants.has(targetPeerId)) {
1579
- await this.thenvoiRest.addChatParticipant(existingRoom, {
1579
+ await this.bandRest.addChatParticipant(existingRoom, {
1580
1580
  participantId: targetPeerId,
1581
1581
  role: "member"
1582
1582
  });
@@ -1586,11 +1586,11 @@ var A2AGatewayAdapter = class extends SimpleAdapter {
1586
1586
  return [existingRoom, contextId];
1587
1587
  }
1588
1588
  const normalizedContextId = contextId && contextId.length > 0 ? contextId : randomUUID4();
1589
- const created = await this.thenvoiRest.createChat(
1589
+ const created = await this.bandRest.createChat(
1590
1590
  `a2a:gateway:${normalizedContextId}`
1591
1591
  );
1592
1592
  const roomId = created.id;
1593
- await this.thenvoiRest.addChatParticipant(roomId, {
1593
+ await this.bandRest.addChatParticipant(roomId, {
1594
1594
  participantId: targetPeerId,
1595
1595
  role: "member"
1596
1596
  });
@@ -1599,7 +1599,7 @@ var A2AGatewayAdapter = class extends SimpleAdapter {
1599
1599
  return [roomId, normalizedContextId];
1600
1600
  }
1601
1601
  async emitContextEvent(roomId, contextId) {
1602
- await this.thenvoiRest.createChatEvent(roomId, {
1602
+ await this.bandRest.createChatEvent(roomId, {
1603
1603
  content: "A2A gateway context",
1604
1604
  messageType: "task",
1605
1605
  metadata: {
@@ -1777,10 +1777,10 @@ function toStatusUpdateEvent(message, taskId, contextId) {
1777
1777
  final,
1778
1778
  text: message.content,
1779
1779
  metadata: {
1780
- thenvoi_message_id: message.id,
1781
- thenvoi_message_type: message.messageType,
1782
- thenvoi_sender_id: message.senderId,
1783
- thenvoi_room_id: message.roomId
1780
+ band_message_id: message.id,
1781
+ band_message_type: message.messageType,
1782
+ band_sender_id: message.senderId,
1783
+ band_room_id: message.roomId
1784
1784
  }
1785
1785
  });
1786
1786
  }
@@ -1994,8 +1994,8 @@ var ParlantAdapter = class extends SimpleAdapter {
1994
1994
  message: userMessage,
1995
1995
  moderation: "none",
1996
1996
  metadata: {
1997
- thenvoi_source: "thenvoi-sdk-typescript",
1998
- thenvoi_room_id: context.roomId
1997
+ band_source: "band-sdk-typescript",
1998
+ band_room_id: context.roomId
1999
1999
  }
2000
2000
  },
2001
2001
  this.requestOptions()
@@ -2070,9 +2070,9 @@ var ParlantAdapter = class extends SimpleAdapter {
2070
2070
  {
2071
2071
  agentId: this.agentId,
2072
2072
  customerId,
2073
- title: `Thenvoi Room ${roomId.slice(0, 8)}`,
2073
+ title: `Band Room ${roomId.slice(0, 8)}`,
2074
2074
  metadata: {
2075
- thenvoi_room_id: roomId
2075
+ band_room_id: roomId
2076
2076
  }
2077
2077
  },
2078
2078
  this.requestOptions()
@@ -2085,7 +2085,7 @@ var ParlantAdapter = class extends SimpleAdapter {
2085
2085
  source: "system",
2086
2086
  message: this.systemPrompt,
2087
2087
  metadata: {
2088
- thenvoi_system_prompt: true
2088
+ band_system_prompt: true
2089
2089
  }
2090
2090
  },
2091
2091
  this.requestOptions()
@@ -2139,7 +2139,7 @@ var ParlantAdapter = class extends SimpleAdapter {
2139
2139
  {
2140
2140
  name: customerName,
2141
2141
  metadata: {
2142
- thenvoi_room_id: roomId
2142
+ band_room_id: roomId
2143
2143
  }
2144
2144
  },
2145
2145
  this.requestOptions()