@zksecurity/zkao-cli 0.31.0-next.20 → 0.33.0-next.22

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 (2) hide show
  1. package/dist/index.js +32 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -866,6 +866,16 @@ continuous.command("off <repoId>").description("Pause it. The schedule and its s
866
866
  })
867
867
  )
868
868
  );
869
+ continuous.command("prepare <repoId>").description(
870
+ 'Plan the next analysis without running it, as "Prepare next analysis" does. Spends no credits'
871
+ ).option("--branch <branch>", "the branch (default: the scheduled branch)").action(
872
+ (repoId, opts) => run(
873
+ async (c) => c.prepareContinuousTesting(
874
+ repoId,
875
+ opts.branch ?? (await c.getContinuousTesting(repoId)).branch
876
+ )
877
+ )
878
+ );
869
879
  continuous.command("rm <repoId>").description("Remove the schedule. Scans it already ran are kept").option("--branch <branch>", "the scheduled branch").action(
870
880
  (repoId, opts) => run(
871
881
  (c) => c.removeContinuousTesting(repoId, {
@@ -1007,9 +1017,31 @@ findings.command("resolution <findingId> <status>").description("Set resolution
1007
1017
  })
1008
1018
  )
1009
1019
  );
1020
+ findings.command("triage <findingId> <verdict>").description(
1021
+ "Override the AI triage verdict (confirmed|false-positive). Setting the AI's own verdict clears the override"
1022
+ ).option("--note <text>", "add the why as a comment in the same call").action((findingId, verdict, opts) => {
1023
+ const status = verdict.toUpperCase().replace(/-/g, "_");
1024
+ if (status !== "CONFIRMED" && status !== "FALSE_POSITIVE") {
1025
+ fail("The verdict must be confirmed or false-positive.");
1026
+ }
1027
+ return run((c) => c.overrideFindingTriage(findingId, status, { note: opts.note }));
1028
+ });
1010
1029
  findings.command("publish <findingId>").description("Publish a finding as a public artifact").option("--note <noteId>", "note to pin as the published note").option("--password", "generate an access password").action(
1011
1030
  (findingId, opts) => run((c) => c.publishFinding(findingId, { noteId: opts.note, withPassword: opts.password }))
1012
1031
  );
1032
+ var questions = program.command("questions").description("Read and answer the questions Continuous Security analyses ask");
1033
+ questions.command("list").description("List the open questions").action(() => run((c) => c.listAgentQuestions()));
1034
+ questions.command("answer <questionId>").description("Answer with one of the question's options, a note, or both").option("--option <label>", "the label of one of the question's options").option("--note <text>", "your answer in your own words, or what qualifies the option").action((questionId, opts) => {
1035
+ if (opts.option === void 0 && opts.note === void 0) {
1036
+ fail("Pass --option, --note, or both.");
1037
+ }
1038
+ return run(
1039
+ (c) => c.answerAgentQuestion(questionId, {
1040
+ ...opts.option === void 0 ? {} : { selectedOption: opts.option },
1041
+ ...opts.note === void 0 ? {} : { note: opts.note }
1042
+ })
1043
+ );
1044
+ });
1013
1045
  var billing = program.command("billing").description("Read the credit balance available to the project and its usage");
1014
1046
  billing.command("balance").description("The organization's shared credit balance, what active scans hold, and what is available").action(() => run((c) => c.getBillingBalance()));
1015
1047
  billing.command("usage").description("Credit ledger movements (defaults to the last 30 days)").option("--from <date>", "ISO date or timestamp to start from").option("--to <date>", "ISO date or timestamp to stop at").option("--limit <n>", "max events to return", toInt).action(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zksecurity/zkao-cli",
3
- "version": "0.31.0-next.20",
3
+ "version": "0.33.0-next.22",
4
4
  "description": "Command-line interface for the zkao Project API",
5
5
  "license": "MIT",
6
6
  "author": "zkSecurity",
@@ -39,7 +39,7 @@
39
39
  "prepublishOnly": "node -e \"if (!(process.env.npm_config_user_agent || '').includes('bun/')) { console.error('Publish with bun publish: npm ships the literal workspace:* dependency and breaks installs.'); process.exit(1); }\""
40
40
  },
41
41
  "dependencies": {
42
- "@zksecurity/zkao-sdk": "0.31.0-next.20",
42
+ "@zksecurity/zkao-sdk": "0.33.0-next.22",
43
43
  "commander": "^12.1.0"
44
44
  },
45
45
  "devDependencies": {