@civitai/sdk 0.16.0 → 0.17.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.
@@ -7,7 +7,7 @@ export interface HostReply {
7
7
  readonly keys: readonly string[] | null;
8
8
  }
9
9
  /** The civitai commit this ledger was read from. A request the host added after it is refused too. */
10
- export declare const HOST_SNAPSHOT = "464b2023e8";
10
+ export declare const HOST_SNAPSHOT = "cd79a91fe4";
11
11
  /**
12
12
  * Every request the host answered at {@link HOST_SNAPSHOT}. A type absent here is refused.
13
13
  * Reply names and framing are fixed at publish time: if the host renames a reply or moves a
@@ -1,7 +1,7 @@
1
1
  // Generated by scripts/gen-host-replies.mjs from snapshots/host-messages.json
2
- // (civitai/civitai 464b2023e8, 2026-10-14). Do not edit.
2
+ // (civitai/civitai cd79a91fe4, 2026-10-17). Do not edit.
3
3
  /** The civitai commit this ledger was read from. A request the host added after it is refused too. */
4
- export const HOST_SNAPSHOT = "464b2023e8";
4
+ export const HOST_SNAPSHOT = "cd79a91fe4";
5
5
  /**
6
6
  * Every request the host answered at {@link HOST_SNAPSHOT}. A type absent here is refused.
7
7
  * Reply names and framing are fixed at publish time: if the host renames a reply or moves a
@@ -22,6 +22,7 @@ export const HOST_REPLIES = {
22
22
  "GET_BUZZ_BALANCE": { "reply": "BUZZ_BALANCE_RESULT", "framing": "legacy", "keys": ["balance"] },
23
23
  "GET_BUZZ_TRANSACTIONS": { "reply": "BUZZ_TRANSACTIONS_RESULT", "framing": "legacy", "keys": ["result"] },
24
24
  "GET_DAILY_COMPENSATION": { "reply": "DAILY_COMPENSATION_RESULT", "framing": "legacy", "keys": ["result"] },
25
+ "GET_ENTITY_REACTIONS": { "reply": "ENTITY_REACTIONS_RESULT", "framing": "legacy", "keys": ["result"] },
25
26
  "GET_IMAGES_BY_IDS": { "reply": "IMAGES_RESULT", "framing": "legacy", "keys": ["result"] },
26
27
  "GET_VIEWER": { "reply": "VIEWER_RESULT", "framing": "legacy", "keys": ["viewer"] },
27
28
  "GET_WILDCARD_PACK": { "reply": "WILDCARD_PACK_RESULT", "framing": "legacy", "keys": ["pack"] },
@@ -29,6 +30,7 @@ export const HOST_REPLIES = {
29
30
  "OPEN_CHECKPOINT_PICKER": { "reply": "CHECKPOINT_PICKER_RESULT", "framing": "legacy", "keys": ["selected"] },
30
31
  "OPEN_IMAGE_PICKER": { "reply": "IMAGE_PICKER_RESULT", "framing": "legacy", "keys": ["selected", "selectedImages"] },
31
32
  "OPEN_IMAGE_UPLOAD": { "reply": "IMAGE_UPLOAD_RESULT", "framing": "legacy", "keys": ["selected"] },
33
+ "OPEN_MEDIA_UPLOAD": { "reply": "MEDIA_UPLOAD_RESULT", "framing": "legacy", "keys": ["selected"] },
32
34
  "OPEN_RESOURCE_PICKER": { "reply": "RESOURCE_PICKER_RESULT", "framing": "legacy", "keys": ["selected", "selectedResources"] },
33
35
  "POLL_WORKFLOW": { "reply": "WORKFLOW_STATUS", "framing": "legacy", "keys": ["snapshot"] },
34
36
  "PREPARE_TRAINING_DATASET": { "reply": "TRAINING_DATASET_RESULT", "framing": "legacy", "keys": ["result"] },
@@ -39,6 +41,7 @@ export const HOST_REPLIES = {
39
41
  "RUN_TRAINING": { "reply": "TRAINING_RESULT", "framing": "legacy", "keys": ["snapshot"] },
40
42
  "SAVE_IMAGE": { "reply": "SAVE_IMAGE_RESULT", "framing": "legacy", "keys": ["ok"] },
41
43
  "SET_COLLECTION_FOLLOW": { "reply": "COLLECTION_FOLLOW_RESULT", "framing": "legacy", "keys": ["result"] },
44
+ "SET_ENTITY_REACTION": { "reply": "ENTITY_REACTION_RESULT", "framing": "legacy", "keys": ["result"] },
42
45
  "SET_USER_CHECKPOINT": { "reply": "USER_CHECKPOINT_SET", "framing": "legacy", "keys": ["ok"] },
43
46
  "SHARED_APPEND": { "reply": "SHARED_APPEND_RESULT", "framing": "legacy", "keys": ["key"] },
44
47
  "SHARED_GET": { "reply": "SHARED_GET_RESULT", "framing": "legacy", "keys": ["item"] },
@@ -1,5 +1,5 @@
1
1
  /** Every scope an app can hold, as the site names them. */
2
- export declare const SCOPES: readonly ['ai:write:budgeted', 'apps:storage', 'apps:storage:publish', 'apps:storage:read', 'apps:storage:shared:read', 'apps:storage:shared:write', 'apps:storage:write', 'apps:store:items:write', 'buzz:read:self', 'collections:read:private', 'collections:read:self', 'collections:write:self', 'goods:purchase:self', 'goods:read:self', 'models:read:self', 'posts:write:self', 'social:tip:self', 'user:read:self'];
2
+ export declare const SCOPES: readonly ['ai:write:budgeted', 'apps:storage', 'apps:storage:publish', 'apps:storage:read', 'apps:storage:shared:read', 'apps:storage:shared:write', 'apps:storage:write', 'apps:store:items:write', 'buzz:read:self', 'collections:read:private', 'collections:read:self', 'collections:write:self', 'goods:purchase:self', 'goods:read:self', 'models:read:self', 'posts:write:self', 'social:react:self', 'social:tip:self', 'user:read:self'];
3
3
  export type Scope = (typeof SCOPES)[number];
4
4
  export interface TokenOptions {
5
5
  /** Skip the held token and get a new one, e.g. after the API refused it. */
@@ -16,6 +16,7 @@ export const SCOPES = [
16
16
  'goods:read:self',
17
17
  'models:read:self',
18
18
  'posts:write:self',
19
+ 'social:react:self',
19
20
  'social:tip:self',
20
21
  'user:read:self',
21
22
  ];
@@ -1,2 +1,2 @@
1
1
  /** This package's version, reported to the host as `sdkVersion` in `BLOCK_READY`. */
2
- export declare const VERSION = "0.16.0";
2
+ export declare const VERSION = "0.17.1";
@@ -1,3 +1,3 @@
1
1
  /* AUTOGENERATED from package.json by scripts/gen-version.mjs. DO NOT EDIT. */
2
2
  /** This package's version, reported to the host as `sdkVersion` in `BLOCK_READY`. */
3
- export const VERSION = "0.16.0";
3
+ export const VERSION = "0.17.1";
@@ -612,8 +612,14 @@ export type WorkflowBodyPassThroughStep = {
612
612
  *
613
613
  * Consequently the orchestrator's per-`$type` schema is the ONLY authority for
614
614
  * what a given `$type` accepts; nothing in this package or on the host mirrors
615
- * it. Bounded only by size: at most **262144 bytes** (256 KB) serialized, which
616
- * is a payload-DoS bound and not a shape gate.
615
+ * it. Its shape is not checked; its size is: at most **262144 bytes** (256 KB)
616
+ * serialized, which is a payload-DoS bound and not a shape gate.
617
+ *
618
+ * 🔴 **No inline media.** The host refuses a `data:image|video|audio` URI or a
619
+ * long raw base64 string anywhere in here: upload the image, video or audio
620
+ * with `useMediaUpload()` (an image also works with
621
+ * `useImageUpload({ purpose: 'generationSource' })` or `useImagePicker()`)
622
+ * and pass the returned `url`.
617
623
  */
618
624
  input: Record<string, unknown>;
619
625
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/sdk",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "description": "The Civitai SDK: an app holds a token and calls the Civitai API and the orchestrator; a block asks its host only to show host UI.",
5
5
  "license": "MIT",
6
6
  "type": "module",