@civitai/sdk 0.20.0 → 0.20.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
@@ -1046,9 +1046,15 @@ Where it differs from the server on purpose:
1046
1046
 
1047
1047
  `fake.calls` records every request and answer. Options also cover smaller `limits`,
1048
1048
  `consent` (revoked scopes, or `'unavailable'`), `appStatus`, `disabled` and a custom
1049
- `moderate`; by default the scanner refuses the words in `FAKE_STORAGE_MODERATION`. It
1050
- does not model moderator hides or the review-preview namespace, and at the `Http`
1051
- seam there is no URL resolution — the client refuses the segments a URL would
1049
+ `moderate`; by default the scanner refuses the words in `FAKE_STORAGE_MODERATION`.
1050
+ That default is the server's enforced moderation. The host picks each app's
1051
+ moderation mode for shared data, and enforce is not the default there: expect
1052
+ shadow (scanned after the write) or off, where neither a hit nor a scanner outage
1053
+ refuses a write. So never rely on a refusal to keep content out of shared data:
1054
+ a write the fake refuses may land on the server, and other viewers read it. Pass
1055
+ `moderate: () => null` to test what such an app sees. The fake does not model
1056
+ moderator hides or the review-preview namespace, and at the `Http` seam there is no
1057
+ URL resolution — the client refuses the segments a URL would
1052
1058
  rewrite (`''`, `.`, `..`) before sending.
1053
1059
 
1054
1060
  ### The legacy key/value stores
@@ -22,6 +22,13 @@ import { createDocumentStorage } from './index.js';
22
22
  * versions of its own, so which ones a viewer owns is `FakeStorageViewer.modelVersions`
23
23
  * (default none).
24
24
  *
25
+ * Moderation is the server's ENFORCE mode, which the contract's moderation cases
26
+ * describe: a hit refuses `content_rejected` and a scanner outage
27
+ * `moderation_unavailable`. The host picks each app's shared-data moderation mode,
28
+ * and enforce is not its default: in `shadow` (the scan runs after the write) or `off`
29
+ * (no scan) neither a hit nor an outage refuses the write. The fake has no mode of its
30
+ * own: `moderate: () => null` is what a shadow or off app sees.
31
+ *
25
32
  * NOT MODELLED: moderator hides (a hidden document reads as not found on the server;
26
33
  * nothing here hides one), moderator exemption from the scanner, the review-preview
27
34
  * namespace, the token middleware's other refusals (revoked instance, context
@@ -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.20.0";
2
+ export declare const VERSION = "0.20.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.20.0";
3
+ export const VERSION = "0.20.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/sdk",
3
- "version": "0.20.0",
3
+ "version": "0.20.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",