@civitai/app-sdk 0.50.0 → 0.51.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.
@@ -1489,6 +1489,16 @@ export interface BlockManifestV1 {
1489
1489
  * `BLOCK_INIT` — that's why `BlockInitPayload.renderMode` is narrower.
1490
1490
  */
1491
1491
  renderMode?: 'iframe' | 'inline' | 'hybrid';
1492
+ /**
1493
+ * Which credential the host hands the block. OPTIONAL, and the canonical does
1494
+ * NOT list it in `required`: omitting it means `"block-token"` — the
1495
+ * block-scoped JWT that `BLOCK_INIT` already carries. `"oauth"` opts the block
1496
+ * into a real OAuth access token for its own `OauthClient`, accepted unchanged
1497
+ * by `/api/v1`, the orchestrator and the MCP. Kept in lockstep with the
1498
+ * canonical schema's `auth` enum; `defineBlock` derives the runtime check from
1499
+ * the vendored schema, so the two cannot disagree on the accepted values.
1500
+ */
1501
+ auth?: 'block-token' | 'oauth';
1492
1502
  /**
1493
1503
  * Config-as-code: the command the platform runs to build the static bundle.
1494
1504
  * One of an allowlisted set (`npm|pnpm|yarn run <script>`, `vite build`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/app-sdk",
3
- "version": "0.50.0",
3
+ "version": "0.51.0",
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",
@@ -70,6 +70,11 @@
70
70
  "description": "How the block renders. Defaults to \"iframe\". \"inline\"/\"hybrid\" require a verified/internal trust tier (server-assigned), so authors should leave this as iframe.",
71
71
  "enum": ["iframe", "inline", "hybrid"]
72
72
  },
73
+ "auth": {
74
+ "type": "string",
75
+ "description": "Which credential the host hands the block: \"block-token\" (default when omitted) is the block-scoped JWT; \"oauth\" opts the block into a real OAuth access token for its own OauthClient, accepted unchanged by /api/v1, the orchestrator and the MCP.",
76
+ "enum": ["block-token", "oauth"]
77
+ },
73
78
  "trustTier": {
74
79
  "type": "string",
75
80
  "description": "SERVER-OWNED. Do NOT set this in your manifest — the platform assigns the trust tier during review. Present here only to reject dev-set values.",