fullcourtdefense-cli 1.21.9 → 1.21.11
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/dist/commands/login.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface LoginArgs {
|
|
|
11
11
|
*
|
|
12
12
|
* The machine authenticates to the org with a reusable fleet token (distributed
|
|
13
13
|
* by IT/MDM), self-enrolls under its stable machine id, and receives a dedicated
|
|
14
|
-
* per-machine Shield (
|
|
14
|
+
* per-machine Shield (enforcing by default). Credentials are written to
|
|
15
15
|
* ~/.fullcourtdefense.yml so no manual copy/paste of Shield IDs/keys is needed.
|
|
16
16
|
*/
|
|
17
17
|
export declare function loginCommand(args: LoginArgs, config: BotGuardConfig): Promise<void>;
|
package/dist/commands/login.js
CHANGED
|
@@ -8,7 +8,7 @@ const machineIdentity_1 = require("../machineIdentity");
|
|
|
8
8
|
*
|
|
9
9
|
* The machine authenticates to the org with a reusable fleet token (distributed
|
|
10
10
|
* by IT/MDM), self-enrolls under its stable machine id, and receives a dedicated
|
|
11
|
-
* per-machine Shield (
|
|
11
|
+
* per-machine Shield (enforcing by default). Credentials are written to
|
|
12
12
|
* ~/.fullcourtdefense.yml so no manual copy/paste of Shield IDs/keys is needed.
|
|
13
13
|
*/
|
|
14
14
|
async function loginCommand(args, config) {
|
|
@@ -58,7 +58,12 @@ async function loginCommand(args, config) {
|
|
|
58
58
|
});
|
|
59
59
|
console.log('');
|
|
60
60
|
console.log(`\x1b[32m✓ ${result.reused ? 'Re-enrolled' : 'Enrolled'}\x1b[0m ${result.shieldName}`);
|
|
61
|
-
|
|
61
|
+
const modeNote = result.mode === 'block'
|
|
62
|
+
? 'enforcing — dangerous actions and matching policies are blocked'
|
|
63
|
+
: result.mode === 'monitor'
|
|
64
|
+
? 'monitor — actions are logged but not blocked'
|
|
65
|
+
: 'shadow — evaluation only, nothing is blocked';
|
|
66
|
+
console.log(` Mode: ${result.mode} (${modeNote}). Change it anytime from the dashboard.`);
|
|
62
67
|
console.log(` Config: ${savedPath}`);
|
|
63
68
|
console.log('');
|
|
64
69
|
console.log('Next: \x1b[1mfullcourtdefense install-all\x1b[0m to wrap your MCP clients and install available runtime hooks.');
|
|
@@ -1061,6 +1061,30 @@ function writeJsonMcpServer(file, serverName, nodeExe, commandArgs) {
|
|
|
1061
1061
|
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
1062
1062
|
fs.writeFileSync(file, `${JSON.stringify(json, null, 2)}\n`, 'utf8');
|
|
1063
1063
|
}
|
|
1064
|
+
// VS Code uses a DIFFERENT MCP schema than Cursor/Claude/Windsurf:
|
|
1065
|
+
// - .vscode/mcp.json (and the user-profile mcp.json): top-level `servers` key.
|
|
1066
|
+
// - settings.json: nested under `mcp.servers`.
|
|
1067
|
+
// Writing `mcpServers` (the Cursor/Claude key) leaves VS Code silently ignoring
|
|
1068
|
+
// the config, so the gateway never actually runs. These writers target the
|
|
1069
|
+
// correct key for each VS Code file shape.
|
|
1070
|
+
function writeVscodeMcpServer(file, serverName, nodeExe, commandArgs) {
|
|
1071
|
+
const json = readJsonObject(file);
|
|
1072
|
+
const isSettings = file.endsWith('settings.json');
|
|
1073
|
+
if (isSettings) {
|
|
1074
|
+
if (!json.mcp || typeof json.mcp !== 'object')
|
|
1075
|
+
json.mcp = {};
|
|
1076
|
+
if (!json.mcp.servers || typeof json.mcp.servers !== 'object')
|
|
1077
|
+
json.mcp.servers = {};
|
|
1078
|
+
json.mcp.servers[serverName] = { type: 'stdio', command: nodeExe, args: commandArgs };
|
|
1079
|
+
}
|
|
1080
|
+
else {
|
|
1081
|
+
if (!json.servers || typeof json.servers !== 'object')
|
|
1082
|
+
json.servers = {};
|
|
1083
|
+
json.servers[serverName] = { type: 'stdio', command: nodeExe, args: commandArgs };
|
|
1084
|
+
}
|
|
1085
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
1086
|
+
fs.writeFileSync(file, `${JSON.stringify(json, null, 2)}\n`, 'utf8');
|
|
1087
|
+
}
|
|
1064
1088
|
function removeTomlSection(content, tableName) {
|
|
1065
1089
|
const lines = content.split(/\r?\n/);
|
|
1066
1090
|
const out = [];
|
|
@@ -2206,10 +2230,7 @@ async function installVscodeMcpGatewayCommand(args, config) {
|
|
|
2206
2230
|
if (targets.length === 0)
|
|
2207
2231
|
targets.push(vscodeMcpPath(true));
|
|
2208
2232
|
for (const file of targets) {
|
|
2209
|
-
|
|
2210
|
-
writeJsonMcpServer(file, serverName, nodeExe, commandArgs);
|
|
2211
|
-
else
|
|
2212
|
-
writeMcpServerConfig(file, serverName, nodeExe, commandArgs);
|
|
2233
|
+
writeVscodeMcpServer(file, serverName, nodeExe, commandArgs);
|
|
2213
2234
|
}
|
|
2214
2235
|
console.log('AgentGuard MCP Gateway installed for VS Code.');
|
|
2215
2236
|
for (const file of targets)
|
package/dist/commands/onboard.js
CHANGED
|
@@ -419,7 +419,7 @@ async function onboardCommand(args, config) {
|
|
|
419
419
|
const dashboard = (0, notify_1.consoleUrl)('/agent-security/users?view=desktop');
|
|
420
420
|
console.log('');
|
|
421
421
|
if (requiredFailures.length === 0) {
|
|
422
|
-
console.log(`${GREEN}${BOLD}This machine is protected.${RESET} It reports to your org's AI Fleet (
|
|
422
|
+
console.log(`${GREEN}${BOLD}This machine is protected.${RESET} It reports to your org's AI Fleet and enforces your policies (dangerous actions are blocked). An admin can switch it to monitor-only from the dashboard.`);
|
|
423
423
|
console.log(`${DIM}Fleet view: ${dashboard}${RESET}`);
|
|
424
424
|
console.log(`${DIM}Restart your AI clients (Cursor, Claude, VS Code, …) so they pick up the wrapped configs.${RESET}`);
|
|
425
425
|
mark('verification', 'completed');
|
package/dist/version.json
CHANGED