@civitai/app-sdk 0.98.1 → 0.99.0
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/README.md +10 -0
- package/dist/blocks/types.d.ts +33 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -363,6 +363,16 @@ flag `app-blocks-confirmed-step` (off by default), and refused for development,
|
|
|
363
363
|
review tokens — so it is exercised against the mock host, not `dev:live`. Use it through
|
|
364
364
|
`@civitai/blocks-react`'s `useRunConfirmedStep()`.
|
|
365
365
|
|
|
366
|
+
**Over budget: `overBudget` and `budget`.** A pass-through `step` or `kind: 'workflow'` estimate
|
|
367
|
+
whose submit is certain to be refused for budget (`insufficient buzz budget`) carries
|
|
368
|
+
`snapshot.overBudget: true` and `snapshot.budget`, the limit it was judged against (the
|
|
369
|
+
per-call budget for a step, the whole-workflow ceiling for a workflow). It is still a priced
|
|
370
|
+
estimate; show it beside the price and do not offer to spend. The fields are omitted when the job
|
|
371
|
+
fits, when a `stepQuote` applies, and on hosts that predate civitai/civitai#10971. A page app's
|
|
372
|
+
per-call budget comes from its manifest's `page.buzzBudgetPerGen`, clamped to the platform cap
|
|
373
|
+
(5,000): declare it well above the largest single job the app submits. A step above that cap, or a
|
|
374
|
+
`kind: 'workflow'` above its per-call limit, cannot run from an app whatever the manifest declares.
|
|
375
|
+
|
|
366
376
|
**3D outputs.** A step that produces 3D models (`polyGen`) still lists every model url in
|
|
367
377
|
`snapshot.imageUrls`; `snapshot.model3dOutputs` (and the same field on an `AppWorkflow` row)
|
|
368
378
|
labels them. Omitted when there are none.
|
package/dist/blocks/types.d.ts
CHANGED
|
@@ -2628,6 +2628,39 @@ export interface BlockWorkflowSnapshot {
|
|
|
2628
2628
|
* it the run is refused and you estimate again. A quote is single-use.
|
|
2629
2629
|
*/
|
|
2630
2630
|
stepQuote?: BlockStepQuote;
|
|
2631
|
+
/**
|
|
2632
|
+
* `true` on an ESTIMATE whose submit is certain to be refused for budget:
|
|
2633
|
+
* `cost.total` is above {@link BlockWorkflowSnapshot.budget}, the limit the
|
|
2634
|
+
* submit compares it with (or the token has no budget at all), and no
|
|
2635
|
+
* {@link BlockWorkflowSnapshot.stepQuote} applies. The estimate is still a
|
|
2636
|
+
* priced snapshot that resolves; show this beside the price and do not offer
|
|
2637
|
+
* to spend — the submit would refuse the job with `insufficient buzz budget`.
|
|
2638
|
+
*
|
|
2639
|
+
* Set by the pass-through `step` estimate ({@link WorkflowBodyPassThroughStep})
|
|
2640
|
+
* and the `kind: 'workflow'` estimate ({@link WorkflowBodyWorkflow}). OMITTED
|
|
2641
|
+
* when the job fits, on every other kind, and on hosts that predate
|
|
2642
|
+
* civitai/civitai#10971 — so absent means "not known to be over", never a
|
|
2643
|
+
* guarantee the submit passes.
|
|
2644
|
+
*
|
|
2645
|
+
* A batch-estimate cell never carries a `stepQuote`, so a cell can say
|
|
2646
|
+
* `overBudget` for a fixed-price job that a single estimate would return as a
|
|
2647
|
+
* viewer-confirmable `stepQuote` instead.
|
|
2648
|
+
*
|
|
2649
|
+
* A page app's per-call budget comes from its manifest's
|
|
2650
|
+
* `page.buzzBudgetPerGen`, clamped to the platform cap (5,000): declare it
|
|
2651
|
+
* well above the largest single job the app submits. A step above that cap,
|
|
2652
|
+
* or a `kind: 'workflow'` above its per-call limit, cannot run from an app
|
|
2653
|
+
* whatever the manifest declares.
|
|
2654
|
+
*/
|
|
2655
|
+
overBudget?: true;
|
|
2656
|
+
/**
|
|
2657
|
+
* The limit {@link BlockWorkflowSnapshot.overBudget} was judged against, as
|
|
2658
|
+
* the submit's gate computes it: the token's per-call budget for a
|
|
2659
|
+
* pass-through `step`, and the whole-workflow ceiling (per-call budget ×
|
|
2660
|
+
* steps, bounded) for `kind: 'workflow'`. `0` when the token has no budget.
|
|
2661
|
+
* Present only with `overBudget`.
|
|
2662
|
+
*/
|
|
2663
|
+
budget?: number;
|
|
2631
2664
|
/**
|
|
2632
2665
|
* What each 3D model in {@link BlockWorkflowSnapshot.imageUrls} IS — one label
|
|
2633
2666
|
* per model a pass-through step produced (e.g. `polyGen`).
|
package/package.json
CHANGED