@civitai/app-sdk 0.80.0 → 0.80.1

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 CHANGED
@@ -575,7 +575,7 @@ The reason codes are a closed set, in this order:
575
575
  | `code` | Fires when | Extra fields |
576
576
  |---|---|---|
577
577
  | `not-api-format` | the entry is not ComfyUI API format (`format` is `ui` or `unknown`, or the graph does not have API shape). The next three are then not checked. | `format` |
578
- | `custom-nodes` | a node class is outside the core list (API graphs, and the node lists of UI graphs and their subgraphs) | `classes`, `packs` (from `properties.cnr_id`, UI graphs only) |
578
+ | `custom-nodes` | a node class is outside the core list (API graphs, and the node lists of UI graphs and their subgraphs) | `classes` (the complete list of offending classes), `packs` (partial: only the `properties.cnr_id` values present on those nodes in the file, so UI graphs only, and a node saved without one adds no pack) |
579
579
  | `model-filenames` | a loader input (`*_name`, e.g. `ckpt_name`, `unet_name`, `lora_name`, `vae_name`, `clip_name`, `control_net_name`; plus `model_file`, `text_encoder`; plus `name` on `ModelPatchLoader` and `existing_lora` on `TrainLoraNode`) holds a model filename (`.safetensors`, `.ckpt`, `.pt`, `.pth`, `.bin`, `.gguf`, …) rather than an AIR (`urn:air:…`) | `inputs` (`nodeId`, `classType`, `input`, `value`) |
580
580
  | `too-many-nodes` | more than `BLOCK_INLINE_COMFY_MAX_NODES` (300) nodes | `nodes`, `max` |
581
581
  | `too-large` | the graph as sent (each node reduced to `class_type` + `inputs`) serializes to more than `BLOCK_INLINE_COMFY_MAX_GRAPH_BYTES` (262144) | `bytes`, `max` |
@@ -596,14 +596,18 @@ that uses one gets `runnable: true` here and can still fail on the worker. The e
596
596
  succeed: the worker image decides which nodes exist, and the host still runs its
597
597
  AIR-containment, entitlement and moderation gates on the body you submit.
598
598
 
599
- Before you submit, two host limits this check does not cover:
599
+ Before you submit, two host limits this check does not cover (the second only
600
+ on one path):
600
601
  - **Strip per-node extras.** The host's node schema is strict: a node carrying
601
602
  anything besides `class_type` and `inputs` (an export's `_meta`, for
602
603
  instance) is rejected. `too-large` already measures the graph without them.
603
- - **The request body is capped at 256 KB of UTF-8, for the whole request.** The
604
- estimate and submit routes refuse a larger body with a 413, and the body
605
- holds `resources`, `prompt` and the rest as well as the graph. So a graph just
606
- under `BLOCK_INLINE_COMFY_MAX_GRAPH_BYTES` can still be refused.
604
+ - **Calling the REST routes directly caps the whole request at 256 KB of
605
+ UTF-8.** If you call `POST /api/v1/blocks/workflows/estimate` or `/submit`
606
+ yourself with a block token, a larger body is refused with a 413. That body
607
+ holds `resources`, `prompt` and the rest as well as the graph, so a graph
608
+ just under `BLOCK_INLINE_COMFY_MAX_GRAPH_BYTES` can still be refused there.
609
+ A page app using the hooks goes through the host bridge instead, which has
610
+ no such 256 KB request cap; the graph cap itself still applies.
607
611
 
608
612
  🔴 **A Comfy estimate is a ceiling, never a price.** Estimating a `customComfy`
609
613
  body returns your `maxBuzz` as `cost.total`, and billing settles to the real GPU
@@ -1019,8 +1019,11 @@ export declare const BLOCK_INLINE_COMFY_MAX_NODES = 300;
1019
1019
  * The largest an inline `customComfy` graph may be, as `JSON.stringify(workflow)
1020
1020
  * .length`. Mirrors civitai's `INLINE_GRAPH_BYTES_MAX` (256 KiB, same file). The
1021
1021
  * host counts UTF-16 code units (its `jsonLengthWithin` default), which equals
1022
- * bytes for an ASCII graph. The route also caps the WHOLE request body at
1023
- * 256 KiB, so the real room for the graph is a little less than this.
1022
+ * bytes for an ASCII graph. Calling the REST routes
1023
+ * `POST /api/v1/blocks/workflows/estimate` / `submit` directly with a block
1024
+ * token also caps the WHOLE request body at 256 KiB, so on that path the real
1025
+ * room for the graph is a little less than this. A page app using the hooks
1026
+ * goes through the host bridge, which has no such 256 KiB request cap.
1024
1027
  */
1025
1028
  export declare const BLOCK_INLINE_COMFY_MAX_GRAPH_BYTES = 262144;
1026
1029
  /**
@@ -124,8 +124,11 @@ export const BLOCK_INLINE_COMFY_MAX_NODES = 300;
124
124
  * The largest an inline `customComfy` graph may be, as `JSON.stringify(workflow)
125
125
  * .length`. Mirrors civitai's `INLINE_GRAPH_BYTES_MAX` (256 KiB, same file). The
126
126
  * host counts UTF-16 code units (its `jsonLengthWithin` default), which equals
127
- * bytes for an ASCII graph. The route also caps the WHOLE request body at
128
- * 256 KiB, so the real room for the graph is a little less than this.
127
+ * bytes for an ASCII graph. Calling the REST routes
128
+ * `POST /api/v1/blocks/workflows/estimate` / `submit` directly with a block
129
+ * token also caps the WHOLE request body at 256 KiB, so on that path the real
130
+ * room for the graph is a little less than this. A page app using the hooks
131
+ * goes through the host bridge, which has no such 256 KiB request cap.
129
132
  */
130
133
  export const BLOCK_INLINE_COMFY_MAX_GRAPH_BYTES = 262144;
131
134
  // ============================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/app-sdk",
3
- "version": "0.80.0",
3
+ "version": "0.80.1",
4
4
  "description": "OAuth + PKCE, encrypted-cookie sessions, scopes, and orchestrator helpers for building third-party Civitai apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",