@codeany/open-agent-sdk 0.2.1 → 0.2.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 (232) hide show
  1. package/.env.example +8 -0
  2. package/examples/01-simple-query.ts +43 -0
  3. package/examples/02-multi-tool.ts +44 -0
  4. package/examples/03-multi-turn.ts +39 -0
  5. package/examples/04-prompt-api.ts +29 -0
  6. package/examples/05-custom-system-prompt.ts +26 -0
  7. package/examples/06-mcp-server.ts +49 -0
  8. package/examples/07-custom-tools.ts +87 -0
  9. package/examples/08-official-api-compat.ts +38 -0
  10. package/examples/09-subagents.ts +48 -0
  11. package/examples/10-permissions.ts +40 -0
  12. package/examples/11-custom-mcp-tools.ts +101 -0
  13. package/examples/12-skills.ts +88 -0
  14. package/examples/13-hooks.ts +88 -0
  15. package/examples/14-openai-compat.ts +71 -0
  16. package/examples/web/index.html +365 -0
  17. package/examples/web/server.ts +157 -0
  18. package/package.json +1 -7
  19. package/src/engine.ts +3 -0
  20. package/tsconfig.json +19 -0
  21. package/dist/agent.d.ts +0 -113
  22. package/dist/agent.d.ts.map +0 -1
  23. package/dist/agent.js +0 -446
  24. package/dist/agent.js.map +0 -1
  25. package/dist/engine.d.ts +0 -62
  26. package/dist/engine.d.ts.map +0 -1
  27. package/dist/engine.js +0 -494
  28. package/dist/engine.js.map +0 -1
  29. package/dist/hooks.d.ts +0 -111
  30. package/dist/hooks.d.ts.map +0 -1
  31. package/dist/hooks.js +0 -179
  32. package/dist/hooks.js.map +0 -1
  33. package/dist/index.d.ts +0 -66
  34. package/dist/index.d.ts.map +0 -1
  35. package/dist/index.js +0 -133
  36. package/dist/index.js.map +0 -1
  37. package/dist/mcp/client.d.ts +0 -19
  38. package/dist/mcp/client.d.ts.map +0 -1
  39. package/dist/mcp/client.js +0 -126
  40. package/dist/mcp/client.js.map +0 -1
  41. package/dist/providers/anthropic.d.ts +0 -17
  42. package/dist/providers/anthropic.d.ts.map +0 -1
  43. package/dist/providers/anthropic.js +0 -47
  44. package/dist/providers/anthropic.js.map +0 -1
  45. package/dist/providers/index.d.ts +0 -20
  46. package/dist/providers/index.d.ts.map +0 -1
  47. package/dist/providers/index.js +0 -26
  48. package/dist/providers/index.js.map +0 -1
  49. package/dist/providers/openai.d.ts +0 -26
  50. package/dist/providers/openai.d.ts.map +0 -1
  51. package/dist/providers/openai.js +0 -212
  52. package/dist/providers/openai.js.map +0 -1
  53. package/dist/providers/types.d.ts +0 -84
  54. package/dist/providers/types.d.ts.map +0 -1
  55. package/dist/providers/types.js +0 -11
  56. package/dist/providers/types.js.map +0 -1
  57. package/dist/sdk-mcp-server.d.ts +0 -52
  58. package/dist/sdk-mcp-server.d.ts.map +0 -1
  59. package/dist/sdk-mcp-server.js +0 -57
  60. package/dist/sdk-mcp-server.js.map +0 -1
  61. package/dist/session.d.ts +0 -73
  62. package/dist/session.d.ts.map +0 -1
  63. package/dist/session.js +0 -159
  64. package/dist/session.js.map +0 -1
  65. package/dist/skills/bundled/commit.d.ts +0 -7
  66. package/dist/skills/bundled/commit.d.ts.map +0 -1
  67. package/dist/skills/bundled/commit.js +0 -35
  68. package/dist/skills/bundled/commit.js.map +0 -1
  69. package/dist/skills/bundled/debug.d.ts +0 -7
  70. package/dist/skills/bundled/debug.d.ts.map +0 -1
  71. package/dist/skills/bundled/debug.js +0 -46
  72. package/dist/skills/bundled/debug.js.map +0 -1
  73. package/dist/skills/bundled/index.d.ts +0 -11
  74. package/dist/skills/bundled/index.d.ts.map +0 -1
  75. package/dist/skills/bundled/index.js +0 -26
  76. package/dist/skills/bundled/index.js.map +0 -1
  77. package/dist/skills/bundled/review.d.ts +0 -7
  78. package/dist/skills/bundled/review.d.ts.map +0 -1
  79. package/dist/skills/bundled/review.js +0 -38
  80. package/dist/skills/bundled/review.js.map +0 -1
  81. package/dist/skills/bundled/simplify.d.ts +0 -8
  82. package/dist/skills/bundled/simplify.d.ts.map +0 -1
  83. package/dist/skills/bundled/simplify.js +0 -48
  84. package/dist/skills/bundled/simplify.js.map +0 -1
  85. package/dist/skills/bundled/test.d.ts +0 -7
  86. package/dist/skills/bundled/test.d.ts.map +0 -1
  87. package/dist/skills/bundled/test.js +0 -40
  88. package/dist/skills/bundled/test.js.map +0 -1
  89. package/dist/skills/index.d.ts +0 -7
  90. package/dist/skills/index.d.ts.map +0 -1
  91. package/dist/skills/index.js +0 -8
  92. package/dist/skills/index.js.map +0 -1
  93. package/dist/skills/registry.d.ts +0 -43
  94. package/dist/skills/registry.d.ts.map +0 -1
  95. package/dist/skills/registry.js +0 -111
  96. package/dist/skills/registry.js.map +0 -1
  97. package/dist/skills/types.d.ts +0 -83
  98. package/dist/skills/types.d.ts.map +0 -1
  99. package/dist/skills/types.js +0 -8
  100. package/dist/skills/types.js.map +0 -1
  101. package/dist/tool-helper.d.ts +0 -73
  102. package/dist/tool-helper.d.ts.map +0 -1
  103. package/dist/tool-helper.js +0 -86
  104. package/dist/tool-helper.js.map +0 -1
  105. package/dist/tools/agent-tool.d.ts +0 -17
  106. package/dist/tools/agent-tool.d.ts.map +0 -1
  107. package/dist/tools/agent-tool.js +0 -146
  108. package/dist/tools/agent-tool.js.map +0 -1
  109. package/dist/tools/ask-user.d.ts +0 -18
  110. package/dist/tools/ask-user.d.ts.map +0 -1
  111. package/dist/tools/ask-user.js +0 -72
  112. package/dist/tools/ask-user.js.map +0 -1
  113. package/dist/tools/bash.d.ts +0 -5
  114. package/dist/tools/bash.d.ts.map +0 -1
  115. package/dist/tools/bash.js +0 -67
  116. package/dist/tools/bash.js.map +0 -1
  117. package/dist/tools/config-tool.d.ts +0 -20
  118. package/dist/tools/config-tool.d.ts.map +0 -1
  119. package/dist/tools/config-tool.js +0 -83
  120. package/dist/tools/config-tool.js.map +0 -1
  121. package/dist/tools/cron-tools.d.ts +0 -33
  122. package/dist/tools/cron-tools.d.ts.map +0 -1
  123. package/dist/tools/cron-tools.js +0 -128
  124. package/dist/tools/cron-tools.js.map +0 -1
  125. package/dist/tools/edit.d.ts +0 -5
  126. package/dist/tools/edit.d.ts.map +0 -1
  127. package/dist/tools/edit.js +0 -70
  128. package/dist/tools/edit.js.map +0 -1
  129. package/dist/tools/glob.d.ts +0 -5
  130. package/dist/tools/glob.d.ts.map +0 -1
  131. package/dist/tools/glob.js +0 -75
  132. package/dist/tools/glob.js.map +0 -1
  133. package/dist/tools/grep.d.ts +0 -5
  134. package/dist/tools/grep.d.ts.map +0 -1
  135. package/dist/tools/grep.js +0 -168
  136. package/dist/tools/grep.js.map +0 -1
  137. package/dist/tools/index.d.ts +0 -45
  138. package/dist/tools/index.d.ts.map +0 -1
  139. package/dist/tools/index.js +0 -162
  140. package/dist/tools/index.js.map +0 -1
  141. package/dist/tools/lsp-tool.d.ts +0 -9
  142. package/dist/tools/lsp-tool.d.ts.map +0 -1
  143. package/dist/tools/lsp-tool.js +0 -137
  144. package/dist/tools/lsp-tool.js.map +0 -1
  145. package/dist/tools/mcp-resource-tools.d.ts +0 -14
  146. package/dist/tools/mcp-resource-tools.d.ts.map +0 -1
  147. package/dist/tools/mcp-resource-tools.js +0 -117
  148. package/dist/tools/mcp-resource-tools.js.map +0 -1
  149. package/dist/tools/notebook-edit.d.ts +0 -5
  150. package/dist/tools/notebook-edit.d.ts.map +0 -1
  151. package/dist/tools/notebook-edit.js +0 -85
  152. package/dist/tools/notebook-edit.js.map +0 -1
  153. package/dist/tools/plan-tools.d.ts +0 -12
  154. package/dist/tools/plan-tools.d.ts.map +0 -1
  155. package/dist/tools/plan-tools.js +0 -77
  156. package/dist/tools/plan-tools.js.map +0 -1
  157. package/dist/tools/read.d.ts +0 -5
  158. package/dist/tools/read.d.ts.map +0 -1
  159. package/dist/tools/read.js +0 -66
  160. package/dist/tools/read.js.map +0 -1
  161. package/dist/tools/send-message.d.ts +0 -31
  162. package/dist/tools/send-message.d.ts.map +0 -1
  163. package/dist/tools/send-message.js +0 -77
  164. package/dist/tools/send-message.js.map +0 -1
  165. package/dist/tools/skill-tool.d.ts +0 -9
  166. package/dist/tools/skill-tool.d.ts.map +0 -1
  167. package/dist/tools/skill-tool.js +0 -115
  168. package/dist/tools/skill-tool.js.map +0 -1
  169. package/dist/tools/task-tools.d.ts +0 -48
  170. package/dist/tools/task-tools.d.ts.map +0 -1
  171. package/dist/tools/task-tools.js +0 -242
  172. package/dist/tools/task-tools.js.map +0 -1
  173. package/dist/tools/team-tools.d.ts +0 -34
  174. package/dist/tools/team-tools.d.ts.map +0 -1
  175. package/dist/tools/team-tools.js +0 -103
  176. package/dist/tools/team-tools.js.map +0 -1
  177. package/dist/tools/todo-tool.d.ts +0 -22
  178. package/dist/tools/todo-tool.d.ts.map +0 -1
  179. package/dist/tools/todo-tool.js +0 -93
  180. package/dist/tools/todo-tool.js.map +0 -1
  181. package/dist/tools/tool-search.d.ts +0 -13
  182. package/dist/tools/tool-search.d.ts.map +0 -1
  183. package/dist/tools/tool-search.js +0 -76
  184. package/dist/tools/tool-search.js.map +0 -1
  185. package/dist/tools/types.d.ts +0 -29
  186. package/dist/tools/types.d.ts.map +0 -1
  187. package/dist/tools/types.js +0 -52
  188. package/dist/tools/types.js.map +0 -1
  189. package/dist/tools/web-fetch.d.ts +0 -5
  190. package/dist/tools/web-fetch.d.ts.map +0 -1
  191. package/dist/tools/web-fetch.js +0 -60
  192. package/dist/tools/web-fetch.js.map +0 -1
  193. package/dist/tools/web-search.d.ts +0 -5
  194. package/dist/tools/web-search.d.ts.map +0 -1
  195. package/dist/tools/web-search.js +0 -77
  196. package/dist/tools/web-search.js.map +0 -1
  197. package/dist/tools/worktree-tools.d.ts +0 -10
  198. package/dist/tools/worktree-tools.d.ts.map +0 -1
  199. package/dist/tools/worktree-tools.js +0 -130
  200. package/dist/tools/worktree-tools.js.map +0 -1
  201. package/dist/tools/write.d.ts +0 -5
  202. package/dist/tools/write.d.ts.map +0 -1
  203. package/dist/tools/write.js +0 -40
  204. package/dist/tools/write.js.map +0 -1
  205. package/dist/types.d.ts +0 -423
  206. package/dist/types.d.ts.map +0 -1
  207. package/dist/types.js +0 -5
  208. package/dist/types.js.map +0 -1
  209. package/dist/utils/compact.d.ts +0 -44
  210. package/dist/utils/compact.d.ts.map +0 -1
  211. package/dist/utils/compact.js +0 -162
  212. package/dist/utils/compact.js.map +0 -1
  213. package/dist/utils/context.d.ts +0 -35
  214. package/dist/utils/context.d.ts.map +0 -1
  215. package/dist/utils/context.js +0 -174
  216. package/dist/utils/context.js.map +0 -1
  217. package/dist/utils/fileCache.d.ts +0 -64
  218. package/dist/utils/fileCache.d.ts.map +0 -1
  219. package/dist/utils/fileCache.js +0 -117
  220. package/dist/utils/fileCache.js.map +0 -1
  221. package/dist/utils/messages.d.ts +0 -57
  222. package/dist/utils/messages.d.ts.map +0 -1
  223. package/dist/utils/messages.js +0 -152
  224. package/dist/utils/messages.js.map +0 -1
  225. package/dist/utils/retry.d.ts +0 -48
  226. package/dist/utils/retry.d.ts.map +0 -1
  227. package/dist/utils/retry.js +0 -111
  228. package/dist/utils/retry.js.map +0 -1
  229. package/dist/utils/tokens.d.ts +0 -57
  230. package/dist/utils/tokens.d.ts.map +0 -1
  231. package/dist/utils/tokens.js +0 -134
  232. package/dist/utils/tokens.js.map +0 -1
@@ -1,137 +0,0 @@
1
- /**
2
- * LSPTool - Language Server Protocol integration
3
- *
4
- * Provides code intelligence: go-to-definition, find-references,
5
- * hover, document symbols, workspace symbols, etc.
6
- */
7
- import { execSync } from 'child_process';
8
- export const LSPTool = {
9
- name: 'LSP',
10
- description: 'Language Server Protocol operations for code intelligence. Supports go-to-definition, find-references, hover, and symbol lookup.',
11
- inputSchema: {
12
- type: 'object',
13
- properties: {
14
- operation: {
15
- type: 'string',
16
- enum: [
17
- 'goToDefinition',
18
- 'findReferences',
19
- 'hover',
20
- 'documentSymbol',
21
- 'workspaceSymbol',
22
- 'goToImplementation',
23
- 'prepareCallHierarchy',
24
- 'incomingCalls',
25
- 'outgoingCalls',
26
- ],
27
- description: 'LSP operation to perform',
28
- },
29
- file_path: { type: 'string', description: 'File path for the operation' },
30
- line: { type: 'number', description: 'Line number (0-based)' },
31
- character: { type: 'number', description: 'Character position (0-based)' },
32
- query: { type: 'string', description: 'Symbol name (for workspace symbol search)' },
33
- },
34
- required: ['operation'],
35
- },
36
- isReadOnly: () => true,
37
- isConcurrencySafe: () => true,
38
- isEnabled: () => true,
39
- async prompt() { return 'Code intelligence via Language Server Protocol.'; },
40
- async call(input, context) {
41
- const { operation, file_path, line, character, query } = input;
42
- // LSP requires a running language server. In standalone mode,
43
- // we fall back to basic grep/ripgrep-based symbol lookup.
44
- try {
45
- switch (operation) {
46
- case 'goToDefinition':
47
- case 'goToImplementation': {
48
- if (!file_path || line === undefined) {
49
- return { type: 'tool_result', tool_use_id: '', content: 'file_path and line required', is_error: true };
50
- }
51
- // Use grep to find definition
52
- const symbol = await getSymbolAtPosition(file_path, line, character || 0, context.cwd);
53
- if (!symbol) {
54
- return { type: 'tool_result', tool_use_id: '', content: 'Could not identify symbol at position' };
55
- }
56
- const results = execSync(`rg -n "(?:function|class|interface|type|const|let|var|export)\\s+${symbol}" --type-add 'src:*.{ts,tsx,js,jsx,py,go,rs,java}' -t src ${context.cwd} 2>/dev/null || grep -rn "(?:function|class|interface|type|const|let|var|export)\\s*${symbol}" ${context.cwd} --include='*.ts' --include='*.js' 2>/dev/null`, { encoding: 'utf-8', timeout: 10000 }).trim();
57
- return { type: 'tool_result', tool_use_id: '', content: results || `No definition found for "${symbol}"` };
58
- }
59
- case 'findReferences': {
60
- if (!file_path || line === undefined) {
61
- return { type: 'tool_result', tool_use_id: '', content: 'file_path and line required', is_error: true };
62
- }
63
- const sym = await getSymbolAtPosition(file_path, line, character || 0, context.cwd);
64
- if (!sym) {
65
- return { type: 'tool_result', tool_use_id: '', content: 'Could not identify symbol at position' };
66
- }
67
- const refs = execSync(`rg -n "${sym}" ${context.cwd} --type-add 'src:*.{ts,tsx,js,jsx,py,go,rs,java}' -t src 2>/dev/null | head -50`, { encoding: 'utf-8', timeout: 10000 }).trim();
68
- return { type: 'tool_result', tool_use_id: '', content: refs || `No references found for "${sym}"` };
69
- }
70
- case 'hover': {
71
- return {
72
- type: 'tool_result',
73
- tool_use_id: '',
74
- content: 'Hover information requires a running language server. Use Read tool to examine the file content.',
75
- };
76
- }
77
- case 'documentSymbol': {
78
- if (!file_path) {
79
- return { type: 'tool_result', tool_use_id: '', content: 'file_path required', is_error: true };
80
- }
81
- const symbols = execSync(`rg -n "^\\s*(export\\s+)?(function|class|interface|type|const|let|var|enum)\\s+" ${JSON.stringify(file_path)} 2>/dev/null || grep -n "^\\s*\\(export\\s\\+\\)\\?\\(function\\|class\\|interface\\|type\\|const\\|let\\|var\\|enum\\)\\s" ${JSON.stringify(file_path)} 2>/dev/null`, { encoding: 'utf-8', cwd: context.cwd, timeout: 10000 }).trim();
82
- return { type: 'tool_result', tool_use_id: '', content: symbols || 'No symbols found' };
83
- }
84
- case 'workspaceSymbol': {
85
- if (!query) {
86
- return { type: 'tool_result', tool_use_id: '', content: 'query required', is_error: true };
87
- }
88
- const wsSymbols = execSync(`rg -n "${query}" ${context.cwd} --type-add 'src:*.{ts,tsx,js,jsx,py,go,rs,java}' -t src 2>/dev/null | head -30`, { encoding: 'utf-8', timeout: 10000 }).trim();
89
- return { type: 'tool_result', tool_use_id: '', content: wsSymbols || `No symbols found for "${query}"` };
90
- }
91
- default:
92
- return {
93
- type: 'tool_result',
94
- tool_use_id: '',
95
- content: `LSP operation "${operation}" requires a running language server.`,
96
- };
97
- }
98
- }
99
- catch (err) {
100
- return {
101
- type: 'tool_result',
102
- tool_use_id: '',
103
- content: `LSP error: ${err.message}`,
104
- is_error: true,
105
- };
106
- }
107
- },
108
- };
109
- /**
110
- * Get the symbol at a given position in a file.
111
- */
112
- async function getSymbolAtPosition(filePath, line, character, cwd) {
113
- try {
114
- const { readFile } = await import('fs/promises');
115
- const { resolve } = await import('path');
116
- const content = await readFile(resolve(cwd, filePath), 'utf-8');
117
- const lines = content.split('\n');
118
- if (line >= lines.length)
119
- return null;
120
- const lineText = lines[line];
121
- if (!lineText || character >= lineText.length)
122
- return null;
123
- // Extract word at position
124
- const wordMatch = /\b\w+\b/g;
125
- let match;
126
- while ((match = wordMatch.exec(lineText)) !== null) {
127
- if (match.index <= character && match.index + match[0].length >= character) {
128
- return match[0];
129
- }
130
- }
131
- return null;
132
- }
133
- catch {
134
- return null;
135
- }
136
- }
137
- //# sourceMappingURL=lsp-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lsp-tool.js","sourceRoot":"","sources":["../../src/tools/lsp-tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGxC,MAAM,CAAC,MAAM,OAAO,GAAmB;IACrC,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,kIAAkI;IAC/I,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE;oBACJ,gBAAgB;oBAChB,gBAAgB;oBAChB,OAAO;oBACP,gBAAgB;oBAChB,iBAAiB;oBACjB,oBAAoB;oBACpB,sBAAsB;oBACtB,eAAe;oBACf,eAAe;iBAChB;gBACD,WAAW,EAAE,0BAA0B;aACxC;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;YACzE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE;YAC9D,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;YAC1E,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAAE;SACpF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI;IACtB,iBAAiB,EAAE,GAAG,EAAE,CAAC,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AAA;AAED;;GAEG;AACH,KAAK,UAAU,mBAAmB,CAChC,QAAgB,EAChB,IAAY,EACZ,SAAiB,EACjB,GAAW;IAEX,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAA;QAChD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAA;QACxC,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAA;QAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEjC,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM;YAAE,OAAO,IAAI,CAAA;QAErC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,QAAQ,CAAC,MAAM;YAAE,OAAO,IAAI,CAAA;QAE1D,2BAA2B;QAC3B,MAAM,SAAS,GAAG,UAAU,CAAA;QAC5B,IAAI,KAAK,CAAA;QACT,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACnD,IAAI,KAAK,CAAC,KAAK,IAAI,SAAS,IAAI,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;gBAC3E,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;YACjB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * MCP Resource Tools
3
- *
4
- * ListMcpResources / ReadMcpResource - Access resources from MCP servers.
5
- */
6
- import type { ToolDefinition } from '../types.js';
7
- import type { MCPConnection } from '../mcp/client.js';
8
- /**
9
- * Set MCP connections for resource access.
10
- */
11
- export declare function setMcpConnections(connections: MCPConnection[]): void;
12
- export declare const ListMcpResourcesTool: ToolDefinition;
13
- export declare const ReadMcpResourceTool: ToolDefinition;
14
- //# sourceMappingURL=mcp-resource-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-resource-tools.d.ts","sourceRoot":"","sources":["../../src/tools/mcp-resource-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,aAAa,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAKrD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,aAAa,EAAE,GAAG,IAAI,CAEpE;AAED,eAAO,MAAM,oBAAoB,EAAE,cAqDlC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,cAkDjC,CAAA"}
@@ -1,117 +0,0 @@
1
- /**
2
- * MCP Resource Tools
3
- *
4
- * ListMcpResources / ReadMcpResource - Access resources from MCP servers.
5
- */
6
- // Registry of MCP connections (set by the agent)
7
- let mcpConnections = [];
8
- /**
9
- * Set MCP connections for resource access.
10
- */
11
- export function setMcpConnections(connections) {
12
- mcpConnections = connections;
13
- }
14
- export const ListMcpResourcesTool = {
15
- name: 'ListMcpResources',
16
- description: 'List available resources from connected MCP servers. Resources can include files, databases, and other data sources.',
17
- inputSchema: {
18
- type: 'object',
19
- properties: {
20
- server: { type: 'string', description: 'Filter by MCP server name' },
21
- },
22
- },
23
- isReadOnly: () => true,
24
- isConcurrencySafe: () => true,
25
- isEnabled: () => true,
26
- async prompt() { return 'List MCP resources.'; },
27
- async call(input) {
28
- const connections = input.server
29
- ? mcpConnections.filter(c => c.name === input.server)
30
- : mcpConnections;
31
- if (connections.length === 0) {
32
- return {
33
- type: 'tool_result',
34
- tool_use_id: '',
35
- content: 'No MCP servers connected.',
36
- };
37
- }
38
- const results = [];
39
- for (const conn of connections) {
40
- if (conn.status !== 'connected')
41
- continue;
42
- try {
43
- // Access the underlying client to list resources
44
- const resources = conn._client?.listResources?.();
45
- if (resources) {
46
- results.push(`Server: ${conn.name}`);
47
- for (const r of resources) {
48
- results.push(` - ${r.name}: ${r.description || r.uri || ''}`);
49
- }
50
- }
51
- else {
52
- results.push(`Server: ${conn.name} (${conn.tools.length} tools available)`);
53
- }
54
- }
55
- catch {
56
- results.push(`Server: ${conn.name} (resource listing not supported)`);
57
- }
58
- }
59
- return {
60
- type: 'tool_result',
61
- tool_use_id: '',
62
- content: results.join('\n') || 'No resources found.',
63
- };
64
- },
65
- };
66
- export const ReadMcpResourceTool = {
67
- name: 'ReadMcpResource',
68
- description: 'Read a specific resource from an MCP server.',
69
- inputSchema: {
70
- type: 'object',
71
- properties: {
72
- server: { type: 'string', description: 'MCP server name' },
73
- uri: { type: 'string', description: 'Resource URI to read' },
74
- },
75
- required: ['server', 'uri'],
76
- },
77
- isReadOnly: () => true,
78
- isConcurrencySafe: () => true,
79
- isEnabled: () => true,
80
- async prompt() { return 'Read an MCP resource.'; },
81
- async call(input) {
82
- const conn = mcpConnections.find(c => c.name === input.server);
83
- if (!conn) {
84
- return {
85
- type: 'tool_result',
86
- tool_use_id: '',
87
- content: `MCP server not found: ${input.server}`,
88
- is_error: true,
89
- };
90
- }
91
- try {
92
- const result = await conn._client?.readResource?.({ uri: input.uri });
93
- if (result?.contents) {
94
- const texts = result.contents.map((c) => c.text || JSON.stringify(c)).join('\n');
95
- return {
96
- type: 'tool_result',
97
- tool_use_id: '',
98
- content: texts,
99
- };
100
- }
101
- return {
102
- type: 'tool_result',
103
- tool_use_id: '',
104
- content: 'Resource read returned no content.',
105
- };
106
- }
107
- catch (err) {
108
- return {
109
- type: 'tool_result',
110
- tool_use_id: '',
111
- content: `Error reading resource: ${err.message}`,
112
- is_error: true,
113
- };
114
- }
115
- },
116
- };
117
- //# sourceMappingURL=mcp-resource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OAAO,EAAE,2BAA2B,GAAG,CAAC,OAAO,EAAE;gBACjD,QAAQ,EAAE,IAAI;aACf,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -1,5 +0,0 @@
1
- /**
2
- * NotebookEditTool - Edit Jupyter notebooks
3
- */
4
- export declare const NotebookEditTool: import("../types.js").ToolDefinition;
5
- //# sourceMappingURL=notebook-edit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-edit.d.ts","sourceRoot":"","sources":["../../src/tools/notebook-edit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,eAAO,MAAM,gBAAgB,sCAoF3B,CAAA"}
@@ -1,85 +0,0 @@
1
- /**
2
- * NotebookEditTool - Edit Jupyter notebooks
3
- */
4
- import { readFile, writeFile } from 'fs/promises';
5
- import { resolve } from 'path';
6
- import { defineTool } from './types.js';
7
- export const NotebookEditTool = defineTool({
8
- name: 'NotebookEdit',
9
- description: 'Edit Jupyter notebook (.ipynb) cells. Can insert, replace, or delete cells.',
10
- inputSchema: {
11
- type: 'object',
12
- properties: {
13
- file_path: {
14
- type: 'string',
15
- description: 'Path to the .ipynb file',
16
- },
17
- command: {
18
- type: 'string',
19
- enum: ['insert', 'replace', 'delete'],
20
- description: 'The edit operation to perform',
21
- },
22
- cell_number: {
23
- type: 'number',
24
- description: 'Cell index (0-based) to operate on',
25
- },
26
- cell_type: {
27
- type: 'string',
28
- enum: ['code', 'markdown'],
29
- description: 'Type of cell (for insert/replace)',
30
- },
31
- source: {
32
- type: 'string',
33
- description: 'Cell content (for insert/replace)',
34
- },
35
- },
36
- required: ['file_path', 'command', 'cell_number'],
37
- },
38
- isReadOnly: false,
39
- isConcurrencySafe: false,
40
- async call(input, context) {
41
- const filePath = resolve(context.cwd, input.file_path);
42
- try {
43
- const content = await readFile(filePath, 'utf-8');
44
- const notebook = JSON.parse(content);
45
- if (!notebook.cells || !Array.isArray(notebook.cells)) {
46
- return { data: 'Error: Invalid notebook format', is_error: true };
47
- }
48
- const { command, cell_number, cell_type, source } = input;
49
- switch (command) {
50
- case 'insert': {
51
- const newCell = {
52
- cell_type: cell_type || 'code',
53
- source: (source || '').split('\n').map((l, i, arr) => i < arr.length - 1 ? l + '\n' : l),
54
- metadata: {},
55
- ...(cell_type !== 'markdown' ? { outputs: [], execution_count: null } : {}),
56
- };
57
- notebook.cells.splice(cell_number, 0, newCell);
58
- break;
59
- }
60
- case 'replace': {
61
- if (cell_number >= notebook.cells.length) {
62
- return { data: `Error: Cell ${cell_number} does not exist`, is_error: true };
63
- }
64
- notebook.cells[cell_number].source = (source || '').split('\n').map((l, i, arr) => i < arr.length - 1 ? l + '\n' : l);
65
- if (cell_type)
66
- notebook.cells[cell_number].cell_type = cell_type;
67
- break;
68
- }
69
- case 'delete': {
70
- if (cell_number >= notebook.cells.length) {
71
- return { data: `Error: Cell ${cell_number} does not exist`, is_error: true };
72
- }
73
- notebook.cells.splice(cell_number, 1);
74
- break;
75
- }
76
- }
77
- await writeFile(filePath, JSON.stringify(notebook, null, 1), 'utf-8');
78
- return `Notebook ${command}: cell ${cell_number} in ${filePath}`;
79
- }
80
- catch (err) {
81
- return { data: `Error: ${err.message}`, is_error: true };
82
- }
83
- },
84
- });
85
- //# sourceMappingURL=notebook-edit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook-edit.js","sourceRoot":"","sources":["../../src/tools/notebook-edit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACzC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,6EAA6E;IAC1F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE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CAAA;oBAChE,MAAK;gBACP,CAAC;gBACD,KAAK,QAAQ,CAAC,CAAC,CAAC;oBACd,IAAI,WAAW,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;wBACzC,OAAO,EAAE,IAAI,EAAE,eAAe,WAAW,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;oBAC9E,CAAC;oBACD,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;oBACrC,MAAK;gBACP,CAAC;YACH,CAAC;YAED,MAAM,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;YACrE,OAAO,YAAY,OAAO,UAAU,WAAW,OAAO,QAAQ,EAAE,CAAA;QAClE,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;QAC1D,CAAC;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Plan Mode Tools
3
- *
4
- * EnterPlanMode / ExitPlanMode - Structured planning workflow.
5
- * Allows the agent to enter a design/planning phase before execution.
6
- */
7
- import type { ToolDefinition } from '../types.js';
8
- export declare function isPlanModeActive(): boolean;
9
- export declare function getCurrentPlan(): string | null;
10
- export declare const EnterPlanModeTool: ToolDefinition;
11
- export declare const ExitPlanModeTool: ToolDefinition;
12
- //# sourceMappingURL=plan-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan-tools.d.ts","sourceRoot":"","sources":["../../src/tools/plan-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,aAAa,CAAA;AAM7D,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAE9C;AAED,eAAO,MAAM,iBAAiB,EAAE,cA6B/B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,cAmC9B,CAAA"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Plan Mode Tools
3
- *
4
- * EnterPlanMode / ExitPlanMode - Structured planning workflow.
5
- * Allows the agent to enter a design/planning phase before execution.
6
- */
7
- // Track plan mode state
8
- let planModeActive = false;
9
- let currentPlan = null;
10
- export function isPlanModeActive() {
11
- return planModeActive;
12
- }
13
- export function getCurrentPlan() {
14
- return currentPlan;
15
- }
16
- export const EnterPlanModeTool = {
17
- name: 'EnterPlanMode',
18
- description: 'Enter plan/design mode for complex tasks. In plan mode, the agent focuses on designing the approach before executing.',
19
- inputSchema: {
20
- type: 'object',
21
- properties: {},
22
- },
23
- isReadOnly: () => false,
24
- isConcurrencySafe: () => false,
25
- isEnabled: () => true,
26
- async prompt() { return 'Enter plan mode for structured planning.'; },
27
- async call() {
28
- if (planModeActive) {
29
- return {
30
- type: 'tool_result',
31
- tool_use_id: '',
32
- content: 'Already in plan mode.',
33
- };
34
- }
35
- planModeActive = true;
36
- currentPlan = null;
37
- return {
38
- type: 'tool_result',
39
- tool_use_id: '',
40
- content: 'Entered plan mode. Design your approach before executing. Use ExitPlanMode when the plan is ready.',
41
- };
42
- },
43
- };
44
- export const ExitPlanModeTool = {
45
- name: 'ExitPlanMode',
46
- description: 'Exit plan mode with a completed plan. The plan will be recorded and execution can proceed.',
47
- inputSchema: {
48
- type: 'object',
49
- properties: {
50
- plan: { type: 'string', description: 'The completed plan' },
51
- approved: { type: 'boolean', description: 'Whether the plan is approved for execution' },
52
- },
53
- },
54
- isReadOnly: () => false,
55
- isConcurrencySafe: () => false,
56
- isEnabled: () => true,
57
- async prompt() { return 'Exit plan mode with a completed plan.'; },
58
- async call(input) {
59
- if (!planModeActive) {
60
- return {
61
- type: 'tool_result',
62
- tool_use_id: '',
63
- content: 'Not in plan mode.',
64
- is_error: true,
65
- };
66
- }
67
- planModeActive = false;
68
- currentPlan = input.plan || null;
69
- const status = input.approved !== false ? 'approved' : 'pending approval';
70
- return {
71
- type: 'tool_result',
72
- tool_use_id: '',
73
- content: `Plan mode exited. Plan status: ${status}.${currentPlan ? `\n\nPlan:\n${currentPlan}` : ''}`,
74
- };
75
- },
76
- };
77
- //# sourceMappingURL=plan-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan-tools.js","sourceRoot":"","sources":["../../src/tools/plan-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,wBAAwB;AACxB,IAAI,cAAc,GAAG,KAAK,CAAA;AAC1B,IAAI,WAAW,GAAkB,IAAI,CAAA;AAErC,MAAM,UAAU,gBAAgB;IAC9B,OAAO,cAAc,CAAA;AACvB,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,WAAW,CAAA;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAmB;IAC/C,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,uHAAuH;IACpI,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;KACf;IACD,UAAU,EAAE,GAAG,EAAE,CAAC,KAAK;IACvB,iBAAiB,EAAE,GAAG,EAAE,CAAC,KAAK;IAC9B,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI;IACrB,KAAK,CAAC,MAAM,KAAK,OAAO,0CAA0C,CAAA,CAAC,CAAC;IACpE,KAAK,CAAC,IAAI;QACR,IAAI,cAAc,EAAE,CAAC;YACnB,OAAO;gBACL,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,EAAE;gBACf,OAAO,EAAE,uBAAuB;aACjC,CAAA;QACH,CAAC;QAED,cAAc,GAAG,IAAI,CAAA;QACrB,WAAW,GAAG,IAAI,CAAA;QAElB,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,oGAA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types.js").ToolDefinition;
5
- //# sourceMappingURL=read.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,eAAO,MAAM,YAAY,sCAgEvB,CAAA"}
@@ -1,66 +0,0 @@
1
- /**
2
- * FileReadTool - Read file contents with line numbers
3
- */
4
- import { readFile, stat } from 'fs/promises';
5
- import { resolve } from 'path';
6
- import { defineTool } from './types.js';
7
- export const FileReadTool = defineTool({
8
- name: 'Read',
9
- description: 'Read a file from the filesystem. Returns content with line numbers. Supports text files, images (returns visual content), and PDFs.',
10
- inputSchema: {
11
- type: 'object',
12
- properties: {
13
- file_path: {
14
- type: 'string',
15
- description: 'The absolute path to the file to read',
16
- },
17
- offset: {
18
- type: 'number',
19
- description: 'Line number to start reading from (0-based)',
20
- },
21
- limit: {
22
- type: 'number',
23
- description: 'Maximum number of lines to read',
24
- },
25
- },
26
- required: ['file_path'],
27
- },
28
- isReadOnly: true,
29
- isConcurrencySafe: true,
30
- async call(input, context) {
31
- const filePath = resolve(context.cwd, input.file_path);
32
- try {
33
- const fileStat = await stat(filePath);
34
- if (fileStat.isDirectory()) {
35
- return { data: `Error: ${filePath} is a directory, not a file. Use Bash with 'ls' to list directory contents.`, is_error: true };
36
- }
37
- // Check for binary/image files
38
- const ext = filePath.split('.').pop()?.toLowerCase();
39
- if (['png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp', 'svg'].includes(ext || '')) {
40
- return `[Image file: ${filePath} (${fileStat.size} bytes)]`;
41
- }
42
- const content = await readFile(filePath, 'utf-8');
43
- const lines = content.split('\n');
44
- const offset = input.offset || 0;
45
- const limit = input.limit || 2000;
46
- const selectedLines = lines.slice(offset, offset + limit);
47
- // Format with line numbers (cat -n style)
48
- const numbered = selectedLines.map((line, i) => {
49
- const lineNum = offset + i + 1;
50
- return `${lineNum}\t${line}`;
51
- }).join('\n');
52
- let result = numbered;
53
- if (lines.length > offset + limit) {
54
- result += `\n\n(${lines.length - offset - limit} more lines not shown)`;
55
- }
56
- return result || '(empty file)';
57
- }
58
- catch (err) {
59
- if (err.code === 'ENOENT') {
60
- return { data: `Error: File not found: ${filePath}`, is_error: true };
61
- }
62
- return { data: `Error reading file: ${err.message}`, is_error: true };
63
- }
64
- },
65
- });
66
- //# sourceMappingURL=read.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,qIAAqI;IAClJ,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6CAA6C;aAC3D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;aAC/C;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,UAAU,EAAE,IAAI;IAChB,iBAAiB,EAAE,IAAI;IACvB,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO;QACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;QAEtD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAA;YACrC,IAAI,QAAQ,CAAC,WAAW,EAAE,EAA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MAAM,GAAG,MAAM,GAAG,KAAK,wBAAwB,CAAA;YACzE,CAAC;YAED,OAAO,MAAM,IAAI,cAAc,CAAA;QACjC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC1B,OAAO,EAAE,IAAI,EAAE,0BAA0B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;YACvE,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,uBAAuB,GAAG,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;QACvE,CAAC;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -1,31 +0,0 @@
1
- /**
2
- * SendMessageTool - Inter-agent messaging
3
- *
4
- * Supports plain text and structured protocol messages
5
- * between teammates in a multi-agent setup.
6
- */
7
- import type { ToolDefinition } from '../types.js';
8
- /**
9
- * Message inbox for inter-agent communication.
10
- */
11
- export interface AgentMessage {
12
- from: string;
13
- to: string;
14
- content: string;
15
- timestamp: string;
16
- type: 'text' | 'shutdown_request' | 'shutdown_response' | 'plan_approval_response';
17
- }
18
- /**
19
- * Read messages from a mailbox.
20
- */
21
- export declare function readMailbox(agentName: string): AgentMessage[];
22
- /**
23
- * Write to a mailbox.
24
- */
25
- export declare function writeToMailbox(agentName: string, message: AgentMessage): void;
26
- /**
27
- * Clear all mailboxes.
28
- */
29
- export declare function clearMailboxes(): void;
30
- export declare const SendMessageTool: ToolDefinition;
31
- //# sourceMappingURL=send-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../src/tools/send-message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,aAAa,CAAA;AAE7D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,wBAAwB,CAAA;CACnF;AAID;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE,CAI7D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAI7E;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED,eAAO,MAAM,eAAe,EAAE,cAgD7B,CAAA"}