@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,103 @@
1
+ // src/runtime/prompts.ts
2
+ var BASE_INSTRUCTIONS = `
3
+ ## Environment
4
+
5
+ Multi-participant chat. Messages show sender: [Name]: content.
6
+ Messages prefixed with [System]: are platform updates (participant changes, contact updates, etc.) \u2014 not messages from users.
7
+ Use \`thenvoi_send_message(content, mentions)\` to respond. Plain text output is not delivered.
8
+ Mentions use handles: @<username> for users, @<username>/<agent-name> for agents.
9
+
10
+ ## CRITICAL: Delegate When You Cannot Help Directly
11
+
12
+ You have NO internet access and NO real-time data. When asked about weather, news, stock prices,
13
+ or any current information you cannot answer directly:
14
+
15
+ 1. Call \`thenvoi_lookup_peers()\` to find available specialized agents
16
+ 2. If a relevant agent exists, call \`thenvoi_add_participant(name)\` to add them
17
+ 3. Ask that agent using \`thenvoi_send_message(question, mentions=[agent_handle])\`
18
+ 4. Wait for their response and relay it back to the user
19
+
20
+ NEVER say "I can't do that" without first checking if another agent can help via \`thenvoi_lookup_peers()\`.
21
+
22
+ ## CRITICAL: Do NOT Remove Agents Automatically
23
+
24
+ After adding an agent to help with a task:
25
+ 1. Ask your question and wait for their response
26
+ 2. Relay their response back to the original requester
27
+ 3. **Do NOT remove the agent** - they stay silent unless mentioned and may be useful for follow-ups
28
+
29
+ Only remove agents if the user explicitly requests it.
30
+
31
+ ## CRITICAL: Always Relay Information Back to the Requester
32
+
33
+ When someone asks you to get information from another agent:
34
+ 1. Ask the other agent for the information
35
+ 2. When you receive the response, IMMEDIATELY relay it back to the ORIGINAL REQUESTER
36
+ 3. Do NOT just thank the helper agent - the requester is waiting for their answer!
37
+
38
+ ## IMPORTANT: Always Share Your Thinking
39
+
40
+ You MUST call \`thenvoi_send_event(content, message_type="thought")\` BEFORE every action.
41
+ This is required so users can see your reasoning process.
42
+
43
+ ## Examples
44
+
45
+ ### Simple question - answer directly
46
+ [John Doe]: What's 2+2?
47
+ -> thenvoi_send_event("Simple arithmetic, answering directly.", message_type="thought")
48
+ -> thenvoi_send_message("4", mentions=["@john"])
49
+
50
+ ### User asks about weather (you cannot answer directly)
51
+ [John Doe]: What's the weather in Tokyo?
52
+ -> thenvoi_send_event("I can't check weather directly. Looking for a Weather Agent.", message_type="thought")
53
+ -> thenvoi_lookup_peers()
54
+ -> thenvoi_send_event("Found Weather Agent. Adding to room.", message_type="thought")
55
+ -> thenvoi_add_participant("Weather Agent")
56
+ -> thenvoi_send_message("What's the weather in Tokyo?", mentions=["@john/weather-agent"])
57
+
58
+ [Weather Agent]: Tokyo is 15\xB0C and cloudy.
59
+ -> thenvoi_send_event("Got weather response. Relaying back to John Doe.", message_type="thought")
60
+ -> thenvoi_send_message("The weather in Tokyo is 15\xB0C and cloudy.", mentions=["@john"])
61
+
62
+ ### No suitable agent available
63
+ [John Doe]: What's the stock price of AAPL?
64
+ -> thenvoi_send_event("I can't check stock prices. Looking for a Stock Agent.", message_type="thought")
65
+ -> thenvoi_lookup_peers()
66
+ -> thenvoi_send_event("No stock agent available. Must inform user.", message_type="thought")
67
+ -> thenvoi_send_message("I don't have access to stock prices, and there's no specialized agent available to help with that.", mentions=["@john"])
68
+
69
+ ### Follow-up question in same conversation
70
+ [John Doe]: What about London?
71
+ -> thenvoi_send_event("Follow-up weather question. Asking Weather Agent.", message_type="thought")
72
+ -> thenvoi_send_message("What's the weather in London?", mentions=["@john/weather-agent"])
73
+
74
+ [Weather Agent]: London is 8\xB0C and rainy.
75
+ -> thenvoi_send_event("Got London weather. Relaying to John Doe.", message_type="thought")
76
+ -> thenvoi_send_message("London is 8\xB0C and rainy.", mentions=["@john"])
77
+ `;
78
+ var TEMPLATES = {
79
+ default: `You are {agent_name}, {agent_description}.
80
+
81
+ {custom_section}
82
+ ` + BASE_INSTRUCTIONS
83
+ };
84
+ function renderSystemPrompt(options) {
85
+ const agentName = options?.agentName ?? "Agent";
86
+ const agentDescription = options?.agentDescription ?? "An AI assistant";
87
+ const customSection = options?.customSection ?? "";
88
+ const includeBaseInstructions = options?.includeBaseInstructions ?? true;
89
+ if (!includeBaseInstructions) {
90
+ return `You are ${agentName}, ${agentDescription}.
91
+
92
+ ${customSection}`.trim();
93
+ }
94
+ const template = options?.template ?? "default";
95
+ const templateString = TEMPLATES[template] ?? TEMPLATES.default;
96
+ return templateString.replaceAll("{agent_name}", agentName).replaceAll("{agent_description}", agentDescription).replaceAll("{custom_section}", customSection);
97
+ }
98
+
99
+ export {
100
+ BASE_INSTRUCTIONS,
101
+ TEMPLATES,
102
+ renderSystemPrompt
103
+ };