superclaude-kiro 1.3.3 → 1.3.7
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.
- package/package.json +2 -2
- package/src/installer.js +32 -5
- package/src/mcp-servers.js +2 -1
- package/src/trusted-commands.js +120 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superclaude-kiro",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "SuperClaude Framework for Kiro (CLI and IDE) - Easy installation for teams",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,4 +46,4 @@
|
|
|
46
46
|
"README.md",
|
|
47
47
|
"LICENSE"
|
|
48
48
|
]
|
|
49
|
-
}
|
|
49
|
+
}
|
package/src/installer.js
CHANGED
|
@@ -209,7 +209,7 @@ export async function installSuperClaude(options = {}) {
|
|
|
209
209
|
console.log(chalk.gray(` - ${selectedServers.length} MCP servers`));
|
|
210
210
|
}
|
|
211
211
|
if (trustedResult && trustedResult.count > 0) {
|
|
212
|
-
console.log(chalk.gray(` - ${trustedResult.total} trusted commands
|
|
212
|
+
console.log(chalk.gray(` - ${trustedResult.total} trusted commands + shell/write/read/webFetch tools`));
|
|
213
213
|
}
|
|
214
214
|
console.log('');
|
|
215
215
|
console.log(chalk.cyan('Quick Start:'));
|
|
@@ -400,22 +400,28 @@ export async function getStatus() {
|
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
// Check trusted commands
|
|
403
|
+
// Check trusted commands and trusted tools
|
|
404
404
|
const ideSettingsPath = getKiroIdeSettingsPath();
|
|
405
405
|
if (await fs.pathExists(ideSettingsPath)) {
|
|
406
406
|
try {
|
|
407
407
|
const ideSettings = await fs.readJson(ideSettingsPath);
|
|
408
408
|
const trustedCmds = ideSettings['kiroAgent.trustedCommands'] || ideSettings['kiro.agent.trustedCommands'] || [];
|
|
409
|
+
const trustedTools = ideSettings['kiroAgent.trustedTools'] || [];
|
|
409
410
|
if (trustedCmds.length > 0) {
|
|
410
411
|
console.log(chalk.green(` ✔ Trusted commands (${trustedCmds.length})`));
|
|
411
412
|
} else {
|
|
412
413
|
console.log(chalk.yellow(' ○ Trusted commands (none configured)'));
|
|
413
414
|
}
|
|
415
|
+
if (trustedTools.length > 0) {
|
|
416
|
+
console.log(chalk.green(` ✔ Trusted tools (${trustedTools.join(', ')})`));
|
|
417
|
+
} else {
|
|
418
|
+
console.log(chalk.yellow(' ○ Trusted tools (none configured - run install to fix)'));
|
|
419
|
+
}
|
|
414
420
|
} catch {
|
|
415
|
-
console.log(chalk.yellow(' ○ Trusted commands (settings unreadable)'));
|
|
421
|
+
console.log(chalk.yellow(' ○ Trusted commands/tools (settings unreadable)'));
|
|
416
422
|
}
|
|
417
423
|
} else {
|
|
418
|
-
console.log(chalk.yellow(' ○ Trusted commands (Kiro IDE settings not found)'));
|
|
424
|
+
console.log(chalk.yellow(' ○ Trusted commands/tools (Kiro IDE settings not found)'));
|
|
419
425
|
}
|
|
420
426
|
|
|
421
427
|
console.log('');
|
|
@@ -573,8 +579,13 @@ function getKiroIdeSettingsPath() {
|
|
|
573
579
|
}
|
|
574
580
|
|
|
575
581
|
/**
|
|
576
|
-
* Configure Kiro IDE trusted commands for auto-approving
|
|
582
|
+
* Configure Kiro IDE trusted commands and trusted tools for auto-approving
|
|
583
|
+
* common dev tool CLI calls and built-in IDE tools.
|
|
577
584
|
* Merges with existing user settings without overwriting.
|
|
585
|
+
*
|
|
586
|
+
* Two separate Kiro IDE settings:
|
|
587
|
+
* - kiroAgent.trustedCommands: shell command prefix patterns (e.g. "git *")
|
|
588
|
+
* - kiroAgent.trustedTools: built-in IDE tool names (e.g. "shell", "write", "read")
|
|
578
589
|
*/
|
|
579
590
|
async function configureTrustedCommands(categories = null) {
|
|
580
591
|
const settingsPath = getKiroIdeSettingsPath();
|
|
@@ -603,6 +614,7 @@ async function configureTrustedCommands(categories = null) {
|
|
|
603
614
|
}
|
|
604
615
|
}
|
|
605
616
|
|
|
617
|
+
// --- trustedCommands ---
|
|
606
618
|
// Use the current Kiro IDE settings key (kiroAgent.trustedCommands)
|
|
607
619
|
// Also migrate from the old key (kiro.agent.trustedCommands) if present
|
|
608
620
|
const CURRENT_KEY = 'kiroAgent.trustedCommands';
|
|
@@ -622,6 +634,21 @@ async function configureTrustedCommands(categories = null) {
|
|
|
622
634
|
delete settings[LEGACY_KEY];
|
|
623
635
|
}
|
|
624
636
|
|
|
637
|
+
// --- trustedTools ---
|
|
638
|
+
// kiroAgent.trustedTools controls Kiro IDE's built-in tool auto-approval
|
|
639
|
+
// (separate from trustedCommands which is for shell command prefix matching).
|
|
640
|
+
// "shell" auto-approves all shell tool invocations including scripts with
|
|
641
|
+
// dynamic variable prefixes like $VAR/script.sh that prefix matching can't handle.
|
|
642
|
+
const TOOLS_KEY = 'kiroAgent.trustedTools';
|
|
643
|
+
const TRUSTED_TOOLS = ['shell', 'write', 'read', 'webFetch', 'remote_web_search'];
|
|
644
|
+
|
|
645
|
+
const existingTools = settings[TOOLS_KEY] || [];
|
|
646
|
+
const existingToolsSet = new Set(existingTools);
|
|
647
|
+
const newTools = TRUSTED_TOOLS.filter(t => !existingToolsSet.has(t));
|
|
648
|
+
if (newTools.length > 0) {
|
|
649
|
+
settings[TOOLS_KEY] = [...existingTools, ...newTools];
|
|
650
|
+
}
|
|
651
|
+
|
|
625
652
|
// Write back
|
|
626
653
|
await fs.ensureDir(path.dirname(settingsPath));
|
|
627
654
|
await fs.writeJson(settingsPath, settings, { spaces: 2 });
|
package/src/mcp-servers.js
CHANGED
|
@@ -127,7 +127,8 @@ export function buildServerConfig(serverName, apiKey = null, overrides = {}) {
|
|
|
127
127
|
|
|
128
128
|
const config = {
|
|
129
129
|
command: overrides.command || server.config.command,
|
|
130
|
-
args: overrides.args ? [...overrides.args] : [...server.config.args]
|
|
130
|
+
args: overrides.args ? [...overrides.args] : [...server.config.args],
|
|
131
|
+
disabled: false
|
|
131
132
|
};
|
|
132
133
|
|
|
133
134
|
// Start with server-defined env, then override env (e.g. PATH augmentation, SSL certs)
|
package/src/trusted-commands.js
CHANGED
|
@@ -188,37 +188,125 @@ export const COMMAND_CATEGORIES = {
|
|
|
188
188
|
'tasklist',
|
|
189
189
|
'tasklist *',
|
|
190
190
|
'wsl *',
|
|
191
|
+
// Bash / shell scripting
|
|
192
|
+
'bash *',
|
|
193
|
+
'sh *',
|
|
194
|
+
'source *',
|
|
195
|
+
'export *',
|
|
196
|
+
'set *',
|
|
197
|
+
'unset *',
|
|
198
|
+
'test *',
|
|
199
|
+
'printf *',
|
|
200
|
+
'dirname *',
|
|
201
|
+
'basename *',
|
|
202
|
+
'realpath *',
|
|
203
|
+
'readlink *',
|
|
204
|
+
'mktemp *',
|
|
205
|
+
'sleep *',
|
|
206
|
+
'true',
|
|
207
|
+
'false',
|
|
208
|
+
'seq *',
|
|
209
|
+
'date *',
|
|
210
|
+
'id',
|
|
211
|
+
'uname *',
|
|
212
|
+
'timeout *',
|
|
213
|
+
'paste *',
|
|
214
|
+
'comm *',
|
|
215
|
+
'column *',
|
|
216
|
+
'nl *',
|
|
217
|
+
'expand *',
|
|
218
|
+
'fold *',
|
|
219
|
+
'md5sum *',
|
|
220
|
+
'sha256sum *',
|
|
221
|
+
'base64 *',
|
|
222
|
+
'strings *',
|
|
223
|
+
'iconv *',
|
|
224
|
+
'dos2unix *',
|
|
225
|
+
'unix2dos *',
|
|
226
|
+
'patch *',
|
|
227
|
+
'envsubst *',
|
|
228
|
+
// PowerShell foreach
|
|
229
|
+
'foreach *',
|
|
230
|
+
'(foreach *',
|
|
231
|
+
'(ForEach-*',
|
|
191
232
|
// PowerShell cmdlets
|
|
192
233
|
'Get-Content *',
|
|
193
234
|
'Set-Content *',
|
|
235
|
+
'Add-Content *',
|
|
236
|
+
'Clear-Content *',
|
|
194
237
|
'Get-Item *',
|
|
195
238
|
'Get-ChildItem',
|
|
196
239
|
'Get-ChildItem *',
|
|
197
240
|
'Get-ItemProperty *',
|
|
241
|
+
'Get-ItemPropertyValue *',
|
|
242
|
+
'Set-ItemProperty *',
|
|
198
243
|
'Select-Object *',
|
|
199
244
|
'Select-String *',
|
|
245
|
+
'Select-Xml *',
|
|
200
246
|
'Where-Object *',
|
|
201
247
|
'ForEach-Object *',
|
|
202
248
|
'ConvertFrom-Json *',
|
|
203
249
|
'ConvertTo-Json *',
|
|
250
|
+
'ConvertFrom-Csv *',
|
|
251
|
+
'ConvertTo-Csv *',
|
|
252
|
+
'Import-Csv *',
|
|
253
|
+
'Export-Csv *',
|
|
204
254
|
'Out-File *',
|
|
255
|
+
'Out-String *',
|
|
256
|
+
'Out-Null',
|
|
205
257
|
'Test-Path *',
|
|
206
258
|
'New-Item *',
|
|
207
259
|
'Copy-Item *',
|
|
208
260
|
'Move-Item *',
|
|
209
261
|
'Rename-Item *',
|
|
210
262
|
'Invoke-WebRequest *',
|
|
263
|
+
'Invoke-RestMethod *',
|
|
211
264
|
'Write-Output *',
|
|
212
265
|
'Write-Host *',
|
|
266
|
+
'Write-Error *',
|
|
267
|
+
'Write-Warning *',
|
|
268
|
+
'Write-Verbose *',
|
|
269
|
+
'Write-Debug *',
|
|
213
270
|
'Get-Process',
|
|
214
271
|
'Get-Process *',
|
|
215
272
|
'Get-Service',
|
|
216
273
|
'Get-Service *',
|
|
217
274
|
'Sort-Object *',
|
|
275
|
+
'Group-Object *',
|
|
218
276
|
'Measure-Object *',
|
|
219
277
|
'Format-Table *',
|
|
220
278
|
'Format-List *',
|
|
221
279
|
'Compare-Object *',
|
|
280
|
+
'Tee-Object *',
|
|
281
|
+
'Add-Member *',
|
|
282
|
+
'New-Object *',
|
|
283
|
+
// PowerShell flow control and scripting
|
|
284
|
+
'Start-Sleep *',
|
|
285
|
+
'Start-Process *',
|
|
286
|
+
'Wait-Process *',
|
|
287
|
+
// PowerShell path and location
|
|
288
|
+
'Join-Path *',
|
|
289
|
+
'Split-Path *',
|
|
290
|
+
'Resolve-Path *',
|
|
291
|
+
'Convert-Path *',
|
|
292
|
+
'Set-Location *',
|
|
293
|
+
'Get-Location',
|
|
294
|
+
'Push-Location *',
|
|
295
|
+
'Pop-Location',
|
|
296
|
+
// PowerShell date, hash, and utility
|
|
297
|
+
'Get-Date',
|
|
298
|
+
'Get-Date *',
|
|
299
|
+
'Get-Random',
|
|
300
|
+
'Get-Random *',
|
|
301
|
+
'Get-Unique *',
|
|
302
|
+
'Get-FileHash *',
|
|
303
|
+
// PowerShell network
|
|
304
|
+
'Test-Connection *',
|
|
305
|
+
'Resolve-DnsName *',
|
|
306
|
+
// PowerShell module management (read-only)
|
|
307
|
+
'Get-Module',
|
|
308
|
+
'Get-Module *',
|
|
309
|
+
'Import-Module *',
|
|
222
310
|
// PowerShell subexpressions — (Get-Content ...) etc.
|
|
223
311
|
'(Get-*',
|
|
224
312
|
'(Set-*',
|
|
@@ -230,6 +318,25 @@ export const COMMAND_CATEGORIES = {
|
|
|
230
318
|
'(New-*',
|
|
231
319
|
'(Copy-*',
|
|
232
320
|
'(Move-*',
|
|
321
|
+
'(Join-*',
|
|
322
|
+
'(Split-*',
|
|
323
|
+
'(Resolve-*',
|
|
324
|
+
'(Convert-*',
|
|
325
|
+
'(Import-*',
|
|
326
|
+
'(Export-*',
|
|
327
|
+
'(Format-*',
|
|
328
|
+
'(Measure-*',
|
|
329
|
+
'(Compare-*',
|
|
330
|
+
'(Add-*',
|
|
331
|
+
'(Start-*',
|
|
332
|
+
'(Wait-*',
|
|
333
|
+
'(Write-*',
|
|
334
|
+
'(Sort-*',
|
|
335
|
+
'(Group-*',
|
|
336
|
+
// Dynamic variable-prefixed commands (e.g. $JAVA_HOME/bin/java, $var/script.sh)
|
|
337
|
+
// These can't be matched by static prefix patterns, so we trust the $ prefix broadly.
|
|
338
|
+
// This covers scripts and binaries invoked via environment variable paths.
|
|
339
|
+
'$*',
|
|
233
340
|
]
|
|
234
341
|
},
|
|
235
342
|
|
|
@@ -252,6 +359,19 @@ export const COMMAND_CATEGORIES = {
|
|
|
252
359
|
'ruff *',
|
|
253
360
|
'black *',
|
|
254
361
|
'flake8 *',
|
|
362
|
+
// Document processing tools (used by docx, pdf, pptx, xlsx skills)
|
|
363
|
+
'pandoc *',
|
|
364
|
+
'pdftotext *',
|
|
365
|
+
'pdfimages *',
|
|
366
|
+
'pdftoppm *',
|
|
367
|
+
'qpdf *',
|
|
368
|
+
'pdftk *',
|
|
369
|
+
'gs *',
|
|
370
|
+
'soffice *',
|
|
371
|
+
'markitdown *',
|
|
372
|
+
// Image and OCR tools (used by pdf, slack-gif-creator skills)
|
|
373
|
+
'convert *',
|
|
374
|
+
'tesseract *',
|
|
255
375
|
]
|
|
256
376
|
},
|
|
257
377
|
|