@zksecurity/zkao-sdk 0.12.0-next.6 → 0.13.0-next.8

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 +15 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -593,6 +593,20 @@ 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 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. */
600
+ ScanBudget: {
601
+ /** @description The most the scan could spend, in credits. */
602
+ limitCredits: number;
603
+ /** @description Credits charged for the scan. Null until it finishes. */
604
+ spentCredits: number | null;
605
+ /**
606
+ * @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.
607
+ * @enum {string|null}
608
+ */
609
+ nextBudgetRecommendation: "keep" | "raise" | null;
596
610
  };
597
611
  /** @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
612
  ScanProgress: {
@@ -691,7 +705,7 @@ interface components {
691
705
  };
692
706
  LaunchScanRequest: {
693
707
  repositoryId: string;
694
- /** @description Max budget for the scan, in credits. Reserved at launch. Omit it to launch at the budget zkao recommends for this scan type and scope on this repository: sized from what past scans of it spent, half again the last budget when that scan ran short of it, or the scan type's minimum on the first. */
708
+ /** @description Max budget for the scan, in credits. Reserved at launch. Omit it to launch at the budget zkao recommends for this scan type and scope on this repository. That is the last such scan's budget, or half again when that scan ran short of it, never above twice the scan type's minimum. A first scan starts at twice the minimum. */
695
709
  creditBudget?: number;
696
710
  /** @description A preset ref from /scan-presets. Defaults to the first active preset. */
697
711
  presetRef?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zksecurity/zkao-sdk",
3
- "version": "0.12.0-next.6",
3
+ "version": "0.13.0-next.8",
4
4
  "description": "TypeScript SDK for the zkao Project API",
5
5
  "license": "MIT",
6
6
  "author": "zkSecurity",