superclaude-kiro 1.3.6 → 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 +4 -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
|
@@ -333,6 +333,10 @@ export const COMMAND_CATEGORIES = {
|
|
|
333
333
|
'(Write-*',
|
|
334
334
|
'(Sort-*',
|
|
335
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
|
+
'$*',
|
|
336
340
|
]
|
|
337
341
|
},
|
|
338
342
|
|