@zksecurity/zkao-sdk 0.12.0-next.7 → 0.14.0-next.9

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.d.ts +28 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -593,6 +593,32 @@ interface components {
593
593
  completedAt?: string | null;
594
594
  /** @description Phase progress while the scan is in flight. Null once the scan reaches a terminal state, and null before it has been dispatched (no phases exist yet). */
595
595
  progress?: components["schemas"]["ScanProgress"] | null;
596
+ /** @description Null for a scan launched without a budget. */
597
+ budget?: components["schemas"]["ScanBudget"] | null;
598
+ };
599
+ /** @description Where a launch came from. References only: no URL is accepted, and the link the scan page shows is built from the scanned repository, so a token can never point that page somewhere of its own choosing. */
600
+ ScanTrigger: {
601
+ /**
602
+ * @description What asked for the scan.
603
+ * @enum {string}
604
+ */
605
+ kind: "github_action" | "pr_comment" | "agent" | "api";
606
+ /** @description Pull request number in the scanned repository. Its existence is not checked: a wrong number only yields a dead link in your own repository. */
607
+ pullRequest?: number | null;
608
+ /** @description The comment that asked for the scan, so the link lands on it. Requires pullRequest. */
609
+ commentId?: string | null;
610
+ };
611
+ /** @description What a scan was allowed to spend, what it was charged, and whether the next scan of its type and scope should get more. Check the last scan of a type before choosing the next one's budget. */
612
+ ScanBudget: {
613
+ /** @description The most the scan could spend, in credits. */
614
+ limitCredits: number;
615
+ /** @description Credits charged for the scan. Null until it finishes. */
616
+ spentCredits: number | null;
617
+ /**
618
+ * @description Whether the next scan of this type and scope should keep this budget or raise it. A raise is half again, never above twice the scan type's minimum. A raise can follow a scan that spent well under its limit: the limit is divided between the parts of the analysis, and one part cannot use another's unspent share. Null until the scan completes.
619
+ * @enum {string|null}
620
+ */
621
+ nextBudgetRecommendation: "keep" | "raise" | null;
596
622
  };
597
623
  /** @description How far a running scan has got through its phases. Deliberately not a time estimate: a phase's duration moves with the guidance it was given, the repository, and the model that ran it. */
598
624
  ScanProgress: {
@@ -702,6 +728,8 @@ interface components {
702
728
  commitMessage?: string | null;
703
729
  /** @description What a diff scan's change is measured from: a commit SHA, branch, or tag. Required by a diff scan preset and refused by every other. The scan records the merge base of this and the scanned commit. */
704
730
  baseCommit?: string | null;
731
+ /** @description Where this launch came from, shown on the scan page. Optional, and display only: nothing in the pipeline reads it. */
732
+ trigger?: components["schemas"]["ScanTrigger"] | null;
705
733
  /** @description Area keys from /audit-areas to scope this scan to. Omit or send an empty array to scan the whole repository. A key the repository's current map no longer names fails the launch rather than being dropped, so a scan budgeted for one subsystem never silently runs against everything. */
706
734
  auditAreaKeys?: string[];
707
735
  /** @description Guidance for this scan only, replacing the repository's configured guidance layer (it is still layered over any committed zkao.md). Omit the field to inherit the repository's guidance; send null to scan with no guidance layer. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zksecurity/zkao-sdk",
3
- "version": "0.12.0-next.7",
3
+ "version": "0.14.0-next.9",
4
4
  "description": "TypeScript SDK for the zkao Project API",
5
5
  "license": "MIT",
6
6
  "author": "zkSecurity",