@google/gemini-cli-core 0.1.0-development.2 → 0.1.3-rc.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 (182) hide show
  1. package/dist/google-gemini-cli-core-0.1.3.tgz +0 -0
  2. package/dist/src/code_assist/codeAssist.d.ts +1 -1
  3. package/dist/src/code_assist/codeAssist.js +5 -5
  4. package/dist/src/code_assist/codeAssist.js.map +1 -1
  5. package/dist/src/code_assist/converter.d.ts +1 -2
  6. package/dist/src/code_assist/converter.js +3 -4
  7. package/dist/src/code_assist/converter.js.map +1 -1
  8. package/dist/src/code_assist/converter.test.js +0 -24
  9. package/dist/src/code_assist/converter.test.js.map +1 -1
  10. package/dist/src/code_assist/oauth2.d.ts +1 -9
  11. package/dist/src/code_assist/oauth2.js +5 -115
  12. package/dist/src/code_assist/oauth2.js.map +1 -1
  13. package/dist/src/code_assist/oauth2.test.js +10 -102
  14. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  15. package/dist/src/code_assist/server.d.ts +8 -13
  16. package/dist/src/code_assist/server.js +17 -41
  17. package/dist/src/code_assist/server.js.map +1 -1
  18. package/dist/src/code_assist/server.test.js +21 -21
  19. package/dist/src/code_assist/server.test.js.map +1 -1
  20. package/dist/src/code_assist/setup.d.ts +1 -4
  21. package/dist/src/code_assist/setup.js +20 -39
  22. package/dist/src/code_assist/setup.js.map +1 -1
  23. package/dist/src/code_assist/types.d.ts +1 -9
  24. package/dist/src/code_assist/types.js +1 -1
  25. package/dist/src/config/config.d.ts +2 -10
  26. package/dist/src/config/config.js +58 -72
  27. package/dist/src/config/config.js.map +1 -1
  28. package/dist/src/config/config.test.js +0 -25
  29. package/dist/src/config/config.test.js.map +1 -1
  30. package/dist/src/core/client.d.ts +3 -3
  31. package/dist/src/core/client.js +62 -56
  32. package/dist/src/core/client.js.map +1 -1
  33. package/dist/src/core/client.test.js +5 -304
  34. package/dist/src/core/client.test.js.map +1 -1
  35. package/dist/src/core/contentGenerator.d.ts +7 -5
  36. package/dist/src/core/contentGenerator.js +16 -11
  37. package/dist/src/core/contentGenerator.js.map +1 -1
  38. package/dist/src/core/contentGenerator.test.js +1 -1
  39. package/dist/src/core/contentGenerator.test.js.map +1 -1
  40. package/dist/src/core/coreToolScheduler.d.ts +2 -9
  41. package/dist/src/core/coreToolScheduler.js +2 -28
  42. package/dist/src/core/coreToolScheduler.js.map +1 -1
  43. package/dist/src/core/coreToolScheduler.test.js +2 -79
  44. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  45. package/dist/src/core/geminiChat.d.ts +2 -1
  46. package/dist/src/core/geminiChat.js +19 -24
  47. package/dist/src/core/geminiChat.js.map +1 -1
  48. package/dist/src/core/geminiChat.test.js +16 -18
  49. package/dist/src/core/geminiChat.test.js.map +1 -1
  50. package/dist/src/core/logger.d.ts +4 -3
  51. package/dist/src/core/logger.js +12 -8
  52. package/dist/src/core/logger.js.map +1 -1
  53. package/dist/src/core/logger.test.js +15 -6
  54. package/dist/src/core/logger.test.js.map +1 -1
  55. package/dist/src/core/prompts.d.ts +0 -6
  56. package/dist/src/core/prompts.js +9 -73
  57. package/dist/src/core/prompts.js.map +1 -1
  58. package/dist/src/core/turn.d.ts +11 -2
  59. package/dist/src/core/turn.js +19 -1
  60. package/dist/src/core/turn.js.map +1 -1
  61. package/dist/src/core/turn.test.js +45 -0
  62. package/dist/src/core/turn.test.js.map +1 -1
  63. package/dist/src/index.d.ts +0 -2
  64. package/dist/src/index.js +0 -2
  65. package/dist/src/index.js.map +1 -1
  66. package/dist/src/services/fileDiscoveryService.d.ts +0 -4
  67. package/dist/src/services/fileDiscoveryService.js +0 -13
  68. package/dist/src/services/fileDiscoveryService.js.map +1 -1
  69. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +16 -45
  70. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  71. package/dist/src/telemetry/index.d.ts +0 -1
  72. package/dist/src/telemetry/index.js +0 -1
  73. package/dist/src/telemetry/index.js.map +1 -1
  74. package/dist/src/telemetry/loggers.js +0 -19
  75. package/dist/src/telemetry/loggers.js.map +1 -1
  76. package/dist/src/telemetry/loggers.test.js +0 -41
  77. package/dist/src/telemetry/loggers.test.js.map +1 -1
  78. package/dist/src/telemetry/types.d.ts +0 -1
  79. package/dist/src/telemetry/types.js +0 -2
  80. package/dist/src/telemetry/types.js.map +1 -1
  81. package/dist/src/tools/edit.d.ts +2 -5
  82. package/dist/src/tools/edit.js +10 -17
  83. package/dist/src/tools/edit.js.map +1 -1
  84. package/dist/src/tools/edit.test.js +12 -48
  85. package/dist/src/tools/edit.test.js.map +1 -1
  86. package/dist/src/tools/glob.d.ts +1 -5
  87. package/dist/src/tools/glob.js +1 -5
  88. package/dist/src/tools/glob.js.map +1 -1
  89. package/dist/src/tools/grep.js +2 -4
  90. package/dist/src/tools/grep.js.map +1 -1
  91. package/dist/src/tools/grep.test.js +10 -10
  92. package/dist/src/tools/grep.test.js.map +1 -1
  93. package/dist/src/tools/mcp-client.d.ts +2 -0
  94. package/dist/src/tools/mcp-client.js +25 -38
  95. package/dist/src/tools/mcp-client.js.map +1 -1
  96. package/dist/src/tools/mcp-client.test.js +14 -170
  97. package/dist/src/tools/mcp-client.test.js.map +1 -1
  98. package/dist/src/tools/modifiable-tool.js +4 -5
  99. package/dist/src/tools/modifiable-tool.js.map +1 -1
  100. package/dist/src/tools/modifiable-tool.test.js +3 -16
  101. package/dist/src/tools/modifiable-tool.test.js.map +1 -1
  102. package/dist/src/tools/read-file.js +2 -1
  103. package/dist/src/tools/read-file.js.map +1 -1
  104. package/dist/src/tools/read-many-files.js +1 -1
  105. package/dist/src/tools/read-many-files.test.js +2 -27
  106. package/dist/src/tools/read-many-files.test.js.map +1 -1
  107. package/dist/src/tools/shell.d.ts +0 -20
  108. package/dist/src/tools/shell.js +22 -128
  109. package/dist/src/tools/shell.js.map +1 -1
  110. package/dist/src/tools/shell.json +18 -0
  111. package/dist/src/tools/shell.md +16 -0
  112. package/dist/src/tools/tool-registry.d.ts +2 -16
  113. package/dist/src/tools/tool-registry.js +19 -150
  114. package/dist/src/tools/tool-registry.js.map +1 -1
  115. package/dist/src/tools/tool-registry.test.js +73 -184
  116. package/dist/src/tools/tool-registry.test.js.map +1 -1
  117. package/dist/src/tools/tools.d.ts +1 -4
  118. package/dist/src/tools/tools.js.map +1 -1
  119. package/dist/src/tools/web-fetch.js.map +1 -1
  120. package/dist/src/tools/web-search.d.ts +1 -6
  121. package/dist/src/tools/web-search.js +2 -7
  122. package/dist/src/tools/web-search.js.map +1 -1
  123. package/dist/src/tools/write-file.d.ts +1 -11
  124. package/dist/src/tools/write-file.js +10 -23
  125. package/dist/src/tools/write-file.js.map +1 -1
  126. package/dist/src/tools/write-file.test.js +4 -39
  127. package/dist/src/tools/write-file.test.js.map +1 -1
  128. package/dist/src/utils/editCorrector.d.ts +1 -1
  129. package/dist/src/utils/editCorrector.js +2 -106
  130. package/dist/src/utils/editCorrector.js.map +1 -1
  131. package/dist/src/utils/editCorrector.test.js +19 -65
  132. package/dist/src/utils/editCorrector.test.js.map +1 -1
  133. package/dist/src/utils/editor.d.ts +2 -2
  134. package/dist/src/utils/editor.js +7 -20
  135. package/dist/src/utils/editor.js.map +1 -1
  136. package/dist/src/utils/editor.test.js +27 -60
  137. package/dist/src/utils/editor.test.js.map +1 -1
  138. package/dist/src/utils/fileUtils.d.ts +2 -2
  139. package/dist/src/utils/fileUtils.js +8 -47
  140. package/dist/src/utils/fileUtils.js.map +1 -1
  141. package/dist/src/utils/fileUtils.test.js +0 -39
  142. package/dist/src/utils/fileUtils.test.js.map +1 -1
  143. package/dist/src/utils/flashFallback.integration.test.js +9 -8
  144. package/dist/src/utils/flashFallback.integration.test.js.map +1 -1
  145. package/dist/src/utils/memoryDiscovery.js +2 -5
  146. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  147. package/dist/src/utils/messageInspectors.d.ts +0 -1
  148. package/dist/src/utils/messageInspectors.js +0 -5
  149. package/dist/src/utils/messageInspectors.js.map +1 -1
  150. package/dist/src/utils/nextSpeakerChecker.js +1 -1
  151. package/dist/src/utils/nextSpeakerChecker.js.map +1 -1
  152. package/dist/src/utils/nextSpeakerChecker.test.js +1 -0
  153. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -1
  154. package/dist/src/utils/retry.js +21 -21
  155. package/dist/src/utils/retry.js.map +1 -1
  156. package/dist/src/utils/retry.test.js +26 -2
  157. package/dist/src/utils/retry.test.js.map +1 -1
  158. package/dist/src/utils/user_id.d.ts +3 -9
  159. package/dist/src/utils/user_id.js +16 -37
  160. package/dist/src/utils/user_id.js.map +1 -1
  161. package/dist/tsconfig.tsbuildinfo +1 -1
  162. package/package.json +13 -12
  163. package/LICENSE +0 -202
  164. package/README.md +0 -156
  165. package/dist/src/telemetry/uiTelemetry.d.ts +0 -67
  166. package/dist/src/telemetry/uiTelemetry.js +0 -131
  167. package/dist/src/telemetry/uiTelemetry.js.map +0 -1
  168. package/dist/src/telemetry/uiTelemetry.test.d.ts +0 -6
  169. package/dist/src/telemetry/uiTelemetry.test.js +0 -411
  170. package/dist/src/telemetry/uiTelemetry.test.js.map +0 -1
  171. package/dist/src/tools/shell.test.d.ts +0 -6
  172. package/dist/src/tools/shell.test.js +0 -321
  173. package/dist/src/tools/shell.test.js.map +0 -1
  174. package/dist/src/utils/memoryImportProcessor.d.ts +0 -35
  175. package/dist/src/utils/memoryImportProcessor.js +0 -141
  176. package/dist/src/utils/memoryImportProcessor.js.map +0 -1
  177. package/dist/src/utils/memoryImportProcessor.test.d.ts +0 -6
  178. package/dist/src/utils/memoryImportProcessor.test.js +0 -170
  179. package/dist/src/utils/memoryImportProcessor.test.js.map +0 -1
  180. package/dist/src/utils/user_id.test.d.ts +0 -6
  181. package/dist/src/utils/user_id.test.js +0 -42
  182. package/dist/src/utils/user_id.test.js.map +0 -1
@@ -1,321 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { expect, describe, it } from 'vitest';
7
- import { ShellTool } from './shell.js';
8
- describe('ShellTool', () => {
9
- it('should allow a command if no restrictions are provided', async () => {
10
- const config = {
11
- getCoreTools: () => undefined,
12
- getExcludeTools: () => undefined,
13
- };
14
- const shellTool = new ShellTool(config);
15
- const result = shellTool.isCommandAllowed('ls -l');
16
- expect(result.allowed).toBe(true);
17
- });
18
- it('should allow a command if it is in the allowed list', async () => {
19
- const config = {
20
- getCoreTools: () => ['ShellTool(ls -l)'],
21
- getExcludeTools: () => undefined,
22
- };
23
- const shellTool = new ShellTool(config);
24
- const result = shellTool.isCommandAllowed('ls -l');
25
- expect(result.allowed).toBe(true);
26
- });
27
- it('should block a command if it is not in the allowed list', async () => {
28
- const config = {
29
- getCoreTools: () => ['ShellTool(ls -l)'],
30
- getExcludeTools: () => undefined,
31
- };
32
- const shellTool = new ShellTool(config);
33
- const result = shellTool.isCommandAllowed('rm -rf /');
34
- expect(result.allowed).toBe(false);
35
- expect(result.reason).toBe("Command 'rm -rf /' is not in the allowed commands list");
36
- });
37
- it('should block a command if it is in the blocked list', async () => {
38
- const config = {
39
- getCoreTools: () => undefined,
40
- getExcludeTools: () => ['ShellTool(rm -rf /)'],
41
- };
42
- const shellTool = new ShellTool(config);
43
- const result = shellTool.isCommandAllowed('rm -rf /');
44
- expect(result.allowed).toBe(false);
45
- expect(result.reason).toBe("Command 'rm -rf /' is blocked by configuration");
46
- });
47
- it('should allow a command if it is not in the blocked list', async () => {
48
- const config = {
49
- getCoreTools: () => undefined,
50
- getExcludeTools: () => ['ShellTool(rm -rf /)'],
51
- };
52
- const shellTool = new ShellTool(config);
53
- const result = shellTool.isCommandAllowed('ls -l');
54
- expect(result.allowed).toBe(true);
55
- });
56
- it('should block a command if it is in both the allowed and blocked lists', async () => {
57
- const config = {
58
- getCoreTools: () => ['ShellTool(rm -rf /)'],
59
- getExcludeTools: () => ['ShellTool(rm -rf /)'],
60
- };
61
- const shellTool = new ShellTool(config);
62
- const result = shellTool.isCommandAllowed('rm -rf /');
63
- expect(result.allowed).toBe(false);
64
- expect(result.reason).toBe("Command 'rm -rf /' is blocked by configuration");
65
- });
66
- it('should allow any command when ShellTool is in coreTools without specific commands', async () => {
67
- const config = {
68
- getCoreTools: () => ['ShellTool'],
69
- getExcludeTools: () => [],
70
- };
71
- const shellTool = new ShellTool(config);
72
- const result = shellTool.isCommandAllowed('any command');
73
- expect(result.allowed).toBe(true);
74
- });
75
- it('should block any command when ShellTool is in excludeTools without specific commands', async () => {
76
- const config = {
77
- getCoreTools: () => [],
78
- getExcludeTools: () => ['ShellTool'],
79
- };
80
- const shellTool = new ShellTool(config);
81
- const result = shellTool.isCommandAllowed('any command');
82
- expect(result.allowed).toBe(false);
83
- expect(result.reason).toBe('Shell tool is globally disabled in configuration');
84
- });
85
- it('should allow a command if it is in the allowed list using the public-facing name', async () => {
86
- const config = {
87
- getCoreTools: () => ['run_shell_command(ls -l)'],
88
- getExcludeTools: () => undefined,
89
- };
90
- const shellTool = new ShellTool(config);
91
- const result = shellTool.isCommandAllowed('ls -l');
92
- expect(result.allowed).toBe(true);
93
- });
94
- it('should block a command if it is in the blocked list using the public-facing name', async () => {
95
- const config = {
96
- getCoreTools: () => undefined,
97
- getExcludeTools: () => ['run_shell_command(rm -rf /)'],
98
- };
99
- const shellTool = new ShellTool(config);
100
- const result = shellTool.isCommandAllowed('rm -rf /');
101
- expect(result.allowed).toBe(false);
102
- expect(result.reason).toBe("Command 'rm -rf /' is blocked by configuration");
103
- });
104
- it('should block any command when ShellTool is in excludeTools using the public-facing name', async () => {
105
- const config = {
106
- getCoreTools: () => [],
107
- getExcludeTools: () => ['run_shell_command'],
108
- };
109
- const shellTool = new ShellTool(config);
110
- const result = shellTool.isCommandAllowed('any command');
111
- expect(result.allowed).toBe(false);
112
- expect(result.reason).toBe('Shell tool is globally disabled in configuration');
113
- });
114
- it('should block any command if coreTools contains an empty ShellTool command list using the public-facing name', async () => {
115
- const config = {
116
- getCoreTools: () => ['run_shell_command()'],
117
- getExcludeTools: () => [],
118
- };
119
- const shellTool = new ShellTool(config);
120
- const result = shellTool.isCommandAllowed('any command');
121
- expect(result.allowed).toBe(false);
122
- expect(result.reason).toBe("Command 'any command' is not in the allowed commands list");
123
- });
124
- it('should block any command if coreTools contains an empty ShellTool command list', async () => {
125
- const config = {
126
- getCoreTools: () => ['ShellTool()'],
127
- getExcludeTools: () => [],
128
- };
129
- const shellTool = new ShellTool(config);
130
- const result = shellTool.isCommandAllowed('any command');
131
- expect(result.allowed).toBe(false);
132
- expect(result.reason).toBe("Command 'any command' is not in the allowed commands list");
133
- });
134
- it('should block a command with extra whitespace if it is in the blocked list', async () => {
135
- const config = {
136
- getCoreTools: () => undefined,
137
- getExcludeTools: () => ['ShellTool(rm -rf /)'],
138
- };
139
- const shellTool = new ShellTool(config);
140
- const result = shellTool.isCommandAllowed(' rm -rf / ');
141
- expect(result.allowed).toBe(false);
142
- expect(result.reason).toBe("Command 'rm -rf /' is blocked by configuration");
143
- });
144
- it('should allow any command when ShellTool is present with specific commands', async () => {
145
- const config = {
146
- getCoreTools: () => ['ShellTool', 'ShellTool(ls)'],
147
- getExcludeTools: () => [],
148
- };
149
- const shellTool = new ShellTool(config);
150
- const result = shellTool.isCommandAllowed('any command');
151
- expect(result.allowed).toBe(true);
152
- });
153
- it('should block a command on the blocklist even with a wildcard allow', async () => {
154
- const config = {
155
- getCoreTools: () => ['ShellTool'],
156
- getExcludeTools: () => ['ShellTool(rm -rf /)'],
157
- };
158
- const shellTool = new ShellTool(config);
159
- const result = shellTool.isCommandAllowed('rm -rf /');
160
- expect(result.allowed).toBe(false);
161
- expect(result.reason).toBe("Command 'rm -rf /' is blocked by configuration");
162
- });
163
- it('should allow a command that starts with an allowed command prefix', async () => {
164
- const config = {
165
- getCoreTools: () => ['ShellTool(gh issue edit)'],
166
- getExcludeTools: () => [],
167
- };
168
- const shellTool = new ShellTool(config);
169
- const result = shellTool.isCommandAllowed('gh issue edit 1 --add-label "kind/feature"');
170
- expect(result.allowed).toBe(true);
171
- });
172
- it('should allow a command that starts with an allowed command prefix using the public-facing name', async () => {
173
- const config = {
174
- getCoreTools: () => ['run_shell_command(gh issue edit)'],
175
- getExcludeTools: () => [],
176
- };
177
- const shellTool = new ShellTool(config);
178
- const result = shellTool.isCommandAllowed('gh issue edit 1 --add-label "kind/feature"');
179
- expect(result.allowed).toBe(true);
180
- });
181
- it('should not allow a command that starts with an allowed command prefix but is chained with another command', async () => {
182
- const config = {
183
- getCoreTools: () => ['run_shell_command(gh issue edit)'],
184
- getExcludeTools: () => [],
185
- };
186
- const shellTool = new ShellTool(config);
187
- const result = shellTool.isCommandAllowed('gh issue edit&&rm -rf /');
188
- expect(result.allowed).toBe(false);
189
- expect(result.reason).toBe("Command 'rm -rf /' is not in the allowed commands list");
190
- });
191
- it('should not allow a command that is a prefix of an allowed command', async () => {
192
- const config = {
193
- getCoreTools: () => ['run_shell_command(gh issue edit)'],
194
- getExcludeTools: () => [],
195
- };
196
- const shellTool = new ShellTool(config);
197
- const result = shellTool.isCommandAllowed('gh issue');
198
- expect(result.allowed).toBe(false);
199
- expect(result.reason).toBe("Command 'gh issue' is not in the allowed commands list");
200
- });
201
- it('should not allow a command that is a prefix of a blocked command', async () => {
202
- const config = {
203
- getCoreTools: () => [],
204
- getExcludeTools: () => ['run_shell_command(gh issue edit)'],
205
- };
206
- const shellTool = new ShellTool(config);
207
- const result = shellTool.isCommandAllowed('gh issue');
208
- expect(result.allowed).toBe(true);
209
- });
210
- it('should not allow a command that is chained with a pipe', async () => {
211
- const config = {
212
- getCoreTools: () => ['run_shell_command(gh issue list)'],
213
- getExcludeTools: () => [],
214
- };
215
- const shellTool = new ShellTool(config);
216
- const result = shellTool.isCommandAllowed('gh issue list | rm -rf /');
217
- expect(result.allowed).toBe(false);
218
- expect(result.reason).toBe("Command 'rm -rf /' is not in the allowed commands list");
219
- });
220
- it('should not allow a command that is chained with a semicolon', async () => {
221
- const config = {
222
- getCoreTools: () => ['run_shell_command(gh issue list)'],
223
- getExcludeTools: () => [],
224
- };
225
- const shellTool = new ShellTool(config);
226
- const result = shellTool.isCommandAllowed('gh issue list; rm -rf /');
227
- expect(result.allowed).toBe(false);
228
- expect(result.reason).toBe("Command 'rm -rf /' is not in the allowed commands list");
229
- });
230
- it('should block a chained command if any part is blocked', async () => {
231
- const config = {
232
- getCoreTools: () => ['run_shell_command(echo "hello")'],
233
- getExcludeTools: () => ['run_shell_command(rm)'],
234
- };
235
- const shellTool = new ShellTool(config);
236
- const result = shellTool.isCommandAllowed('echo "hello" && rm -rf /');
237
- expect(result.allowed).toBe(false);
238
- expect(result.reason).toBe("Command 'rm -rf /' is blocked by configuration");
239
- });
240
- it('should block a command if its prefix is on the blocklist, even if the command itself is on the allowlist', async () => {
241
- const config = {
242
- getCoreTools: () => ['run_shell_command(git push)'],
243
- getExcludeTools: () => ['run_shell_command(git)'],
244
- };
245
- const shellTool = new ShellTool(config);
246
- const result = shellTool.isCommandAllowed('git push');
247
- expect(result.allowed).toBe(false);
248
- expect(result.reason).toBe("Command 'git push' is blocked by configuration");
249
- });
250
- it('should be case-sensitive in its matching', async () => {
251
- const config = {
252
- getCoreTools: () => ['run_shell_command(echo)'],
253
- getExcludeTools: () => [],
254
- };
255
- const shellTool = new ShellTool(config);
256
- const result = shellTool.isCommandAllowed('ECHO "hello"');
257
- expect(result.allowed).toBe(false);
258
- expect(result.reason).toBe('Command \'ECHO "hello"\' is not in the allowed commands list');
259
- });
260
- it('should correctly handle commands with extra whitespace around chaining operators', async () => {
261
- const config = {
262
- getCoreTools: () => ['run_shell_command(ls -l)'],
263
- getExcludeTools: () => ['run_shell_command(rm)'],
264
- };
265
- const shellTool = new ShellTool(config);
266
- const result = shellTool.isCommandAllowed('ls -l ; rm -rf /');
267
- expect(result.allowed).toBe(false);
268
- expect(result.reason).toBe("Command 'rm -rf /' is blocked by configuration");
269
- });
270
- it('should allow a chained command if all parts are allowed', async () => {
271
- const config = {
272
- getCoreTools: () => [
273
- 'run_shell_command(echo)',
274
- 'run_shell_command(ls -l)',
275
- ],
276
- getExcludeTools: () => [],
277
- };
278
- const shellTool = new ShellTool(config);
279
- const result = shellTool.isCommandAllowed('echo "hello" && ls -l');
280
- expect(result.allowed).toBe(true);
281
- });
282
- it('should allow a command with command substitution using backticks', async () => {
283
- const config = {
284
- getCoreTools: () => ['run_shell_command(echo)'],
285
- getExcludeTools: () => [],
286
- };
287
- const shellTool = new ShellTool(config);
288
- const result = shellTool.isCommandAllowed('echo `rm -rf /`');
289
- expect(result.allowed).toBe(true);
290
- });
291
- it('should block a command with command substitution using $()', async () => {
292
- const config = {
293
- getCoreTools: () => ['run_shell_command(echo)'],
294
- getExcludeTools: () => [],
295
- };
296
- const shellTool = new ShellTool(config);
297
- const result = shellTool.isCommandAllowed('echo $(rm -rf /)');
298
- expect(result.allowed).toBe(false);
299
- expect(result.reason).toBe('Command substitution using $() is not allowed for security reasons');
300
- });
301
- it('should allow a command with I/O redirection', async () => {
302
- const config = {
303
- getCoreTools: () => ['run_shell_command(echo)'],
304
- getExcludeTools: () => [],
305
- };
306
- const shellTool = new ShellTool(config);
307
- const result = shellTool.isCommandAllowed('echo "hello" > file.txt');
308
- expect(result.allowed).toBe(true);
309
- });
310
- it('should not allow a command that is chained with a double pipe', async () => {
311
- const config = {
312
- getCoreTools: () => ['run_shell_command(gh issue list)'],
313
- getExcludeTools: () => [],
314
- };
315
- const shellTool = new ShellTool(config);
316
- const result = shellTool.isCommandAllowed('gh issue list || rm -rf /');
317
- expect(result.allowed).toBe(false);
318
- expect(result.reason).toBe("Command 'rm -rf /' is not in the allowed commands list");
319
- });
320
- });
321
- //# sourceMappingURL=shell.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell.test.js","sourceRoot":"","sources":["../../../src/tools/shell.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;A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E;SACL,CAAC;QACvB,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,MAAM,GAAG,SAAS,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;QACvE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CACxB,wDAAwD,CACzD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,35 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /**
7
- * Interface for tracking import processing state to prevent circular imports
8
- */
9
- interface ImportState {
10
- processedFiles: Set<string>;
11
- maxDepth: number;
12
- currentDepth: number;
13
- currentFile?: string;
14
- }
15
- /**
16
- * Processes import statements in GEMINI.md content
17
- * Supports @path/to/file.md syntax for importing content from other files
18
- *
19
- * @param content - The content to process for imports
20
- * @param basePath - The directory path where the current file is located
21
- * @param debugMode - Whether to enable debug logging
22
- * @param importState - State tracking for circular import prevention
23
- * @returns Processed content with imports resolved
24
- */
25
- export declare function processImports(content: string, basePath: string, debugMode?: boolean, importState?: ImportState): Promise<string>;
26
- /**
27
- * Validates import paths to ensure they are safe and within allowed directories
28
- *
29
- * @param importPath - The import path to validate
30
- * @param basePath - The base directory for resolving relative paths
31
- * @param allowedDirectories - Array of allowed directory paths
32
- * @returns Whether the import path is valid
33
- */
34
- export declare function validateImportPath(importPath: string, basePath: string, allowedDirectories: string[]): boolean;
35
- export {};
@@ -1,141 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import * as fs from 'fs/promises';
7
- import * as path from 'path';
8
- // Simple console logger for import processing
9
- const logger = {
10
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
- debug: (...args) => console.debug('[DEBUG] [ImportProcessor]', ...args),
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- warn: (...args) => console.warn('[WARN] [ImportProcessor]', ...args),
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
- error: (...args) => console.error('[ERROR] [ImportProcessor]', ...args),
16
- };
17
- /**
18
- * Processes import statements in GEMINI.md content
19
- * Supports @path/to/file.md syntax for importing content from other files
20
- *
21
- * @param content - The content to process for imports
22
- * @param basePath - The directory path where the current file is located
23
- * @param debugMode - Whether to enable debug logging
24
- * @param importState - State tracking for circular import prevention
25
- * @returns Processed content with imports resolved
26
- */
27
- export async function processImports(content, basePath, debugMode = false, importState = {
28
- processedFiles: new Set(),
29
- maxDepth: 10,
30
- currentDepth: 0,
31
- }) {
32
- if (importState.currentDepth >= importState.maxDepth) {
33
- if (debugMode) {
34
- logger.warn(`Maximum import depth (${importState.maxDepth}) reached. Stopping import processing.`);
35
- }
36
- return content;
37
- }
38
- // Regex to match @path/to/file imports (supports any file extension)
39
- // Supports both @path/to/file.md and @./path/to/file.md syntax
40
- const importRegex = /@([./]?[^\s\n]+\.[^\s\n]+)/g;
41
- let processedContent = content;
42
- let match;
43
- // Process all imports in the content
44
- while ((match = importRegex.exec(content)) !== null) {
45
- const importPath = match[1];
46
- // Validate import path to prevent path traversal attacks
47
- if (!validateImportPath(importPath, basePath, [basePath])) {
48
- processedContent = processedContent.replace(match[0], `<!-- Import failed: ${importPath} - Path traversal attempt -->`);
49
- continue;
50
- }
51
- // Check if the import is for a non-md file and warn
52
- if (!importPath.endsWith('.md')) {
53
- logger.warn(`Import processor only supports .md files. Attempting to import non-md file: ${importPath}. This will fail.`);
54
- // Replace the import with a warning comment
55
- processedContent = processedContent.replace(match[0], `<!-- Import failed: ${importPath} - Only .md files are supported -->`);
56
- continue;
57
- }
58
- const fullPath = path.resolve(basePath, importPath);
59
- if (debugMode) {
60
- logger.debug(`Processing import: ${importPath} -> ${fullPath}`);
61
- }
62
- // Check for circular imports - if we're already processing this file
63
- if (importState.currentFile === fullPath) {
64
- if (debugMode) {
65
- logger.warn(`Circular import detected: ${importPath}`);
66
- }
67
- // Replace the import with a warning comment
68
- processedContent = processedContent.replace(match[0], `<!-- Circular import detected: ${importPath} -->`);
69
- continue;
70
- }
71
- // Check if we've already processed this file in this import chain
72
- if (importState.processedFiles.has(fullPath)) {
73
- if (debugMode) {
74
- logger.warn(`File already processed in this chain: ${importPath}`);
75
- }
76
- // Replace the import with a warning comment
77
- processedContent = processedContent.replace(match[0], `<!-- File already processed: ${importPath} -->`);
78
- continue;
79
- }
80
- // Check for potential circular imports by looking at the import chain
81
- if (importState.currentFile) {
82
- const currentFileDir = path.dirname(importState.currentFile);
83
- const potentialCircularPath = path.resolve(currentFileDir, importPath);
84
- if (potentialCircularPath === importState.currentFile) {
85
- if (debugMode) {
86
- logger.warn(`Circular import detected: ${importPath}`);
87
- }
88
- // Replace the import with a warning comment
89
- processedContent = processedContent.replace(match[0], `<!-- Circular import detected: ${importPath} -->`);
90
- continue;
91
- }
92
- }
93
- try {
94
- // Check if the file exists
95
- await fs.access(fullPath);
96
- // Read the imported file content
97
- const importedContent = await fs.readFile(fullPath, 'utf-8');
98
- if (debugMode) {
99
- logger.debug(`Successfully read imported file: ${fullPath}`);
100
- }
101
- // Recursively process imports in the imported content
102
- const processedImportedContent = await processImports(importedContent, path.dirname(fullPath), debugMode, {
103
- ...importState,
104
- processedFiles: new Set([...importState.processedFiles, fullPath]),
105
- currentDepth: importState.currentDepth + 1,
106
- currentFile: fullPath, // Set the current file being processed
107
- });
108
- // Replace the import statement with the processed content
109
- processedContent = processedContent.replace(match[0], `<!-- Imported from: ${importPath} -->\n${processedImportedContent}\n<!-- End of import from: ${importPath} -->`);
110
- }
111
- catch (error) {
112
- const errorMessage = error instanceof Error ? error.message : String(error);
113
- if (debugMode) {
114
- logger.error(`Failed to import ${importPath}: ${errorMessage}`);
115
- }
116
- // Replace the import with an error comment
117
- processedContent = processedContent.replace(match[0], `<!-- Import failed: ${importPath} - ${errorMessage} -->`);
118
- }
119
- }
120
- return processedContent;
121
- }
122
- /**
123
- * Validates import paths to ensure they are safe and within allowed directories
124
- *
125
- * @param importPath - The import path to validate
126
- * @param basePath - The base directory for resolving relative paths
127
- * @param allowedDirectories - Array of allowed directory paths
128
- * @returns Whether the import path is valid
129
- */
130
- export function validateImportPath(importPath, basePath, allowedDirectories) {
131
- // Reject URLs
132
- if (/^(file|https?):\/\//.test(importPath)) {
133
- return false;
134
- }
135
- const resolvedPath = path.resolve(basePath, importPath);
136
- return allowedDirectories.some((allowedDir) => {
137
- const normalizedAllowedDir = path.resolve(allowedDir);
138
- return resolvedPath.startsWith(normalizedAllowedDir);
139
- });
140
- }
141
- //# sourceMappingURL=memoryImportProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memoryImportProcessor.js","sourceRoot":"","sources":["../../../src/utils/memoryImportProcessor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,8CAA8C;AAC9C,MAAM,MAAM,GAAG;IACb,8DAA8D;IAC9D,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CACxB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,IAAI,CAAC;IACrD,8DAA8D;IAC9D,IAAI,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,IAAI,CAAC;IAC3E,8DAA8D;IAC9D,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CACxB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,IAAI,CAAC;CACtD,CAAC;AAYF;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,OAAe,EACf,QAAgB,EAChB,YAAqB,KAAK,EAC1B,cAA2B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