fullcourtdefense-cli 1.7.18 → 1.7.19

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.
@@ -3,6 +3,7 @@ export interface AgentCiArgs {
3
3
  failOn?: string;
4
4
  format?: string;
5
5
  upload?: string;
6
+ requireUpload?: string;
6
7
  requireGateway?: string;
7
8
  requireApprovalFor?: string;
8
9
  extraPath?: string;
@@ -286,16 +286,24 @@ async function agentCiCommand(args, config) {
286
286
  else {
287
287
  printSummary(report, failed, failOn);
288
288
  }
289
- if (args.upload === 'true') {
289
+ const uploadRequested = args.upload === 'true' || args.requireUpload === 'true';
290
+ if (uploadRequested) {
290
291
  const creds = (0, config_1.resolveCliCredentials)(config, { apiKey: args.apiKey, apiUrl: args.apiUrl });
291
292
  if (creds.apiKey || (creds.shieldId && creds.shieldKey)) {
292
- await (0, discover_1.runDiscoverUpload)({ apiKey: args.apiKey, apiUrl: args.apiUrl, silent: true }, config).catch(error => {
293
- if (format === 'summary')
294
- console.error(`Upload skipped: ${error instanceof Error ? error.message : String(error)}`);
295
- });
293
+ try {
294
+ await (0, discover_1.runDiscoverUpload)({ apiKey: args.apiKey, apiUrl: args.apiUrl, silent: true }, config);
295
+ console.error('AgentGuard evidence upload: uploaded to AI Fleet / discovery posture inventory.');
296
+ }
297
+ catch (error) {
298
+ console.error(`AgentGuard evidence upload: failed (${error instanceof Error ? error.message : String(error)})`);
299
+ if (args.requireUpload === 'true')
300
+ process.exit(1);
301
+ }
296
302
  }
297
- else if (format === 'summary') {
298
- console.error('Upload skipped: run fullcourtdefense login first or pass --api-key.');
303
+ else {
304
+ console.error('AgentGuard evidence upload: missing credentials. Run fullcourtdefense login or pass FULLCOURTDEFENSE_API_KEY.');
305
+ if (args.requireUpload === 'true')
306
+ process.exit(1);
299
307
  }
300
308
  }
301
309
  if (failed)
package/dist/index.js CHANGED
@@ -264,6 +264,7 @@ function printHelp() {
264
264
  --fail-on <severity> agent-ci fail threshold: critical, high, medium, low
265
265
  --require-gateway agent-ci requires risky MCP servers to use FCD gateway
266
266
  --require-approval-for agent-ci risky controls list, e.g. payment,delete,shell,secrets
267
+ --require-upload agent-ci fails if evidence cannot upload to AgentGuard UI
267
268
  --method <GET|POST> Local endpoint method
268
269
  --request-format <fmt> Local endpoint request format: custom or openai
269
270
  --auth-type <type> none, bearer, basic, api-key
@@ -502,6 +503,7 @@ async function main() {
502
503
  failOn: flags['fail-on'],
503
504
  format: flags.format,
504
505
  upload: flags.upload,
506
+ requireUpload: flags['require-upload'],
505
507
  requireGateway: flags['require-gateway'],
506
508
  requireApprovalFor: flags['require-approval-for'],
507
509
  extraPath: flags.path,
package/dist/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "1.7.18"
2
+ "version": "1.7.19"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullcourtdefense-cli",
3
- "version": "1.7.18",
3
+ "version": "1.7.19",
4
4
  "description": "Full Court Defense CLI — security scanning for AI agents from your terminal",
5
5
  "main": "dist/index.js",
6
6
  "bin": {