@civitai/app-sdk 0.91.0 → 0.92.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 CHANGED
@@ -28,8 +28,8 @@ pnpm add @civitai/app-sdk
28
28
  | `oauth/*` — `generatePkce`, `buildAuthorizeUrl`, `exchangeCode`, `refreshToken`, `revokeToken`, `fetchMe` | The Civitai OAuth flow (Authorization Code + PKCE S256), as a set of stateless functions you call from your server-side handlers. |
29
29
  | `scopes/*` — `TokenScope`, `TokenScopePresets`, `bitmaskFromScopes`, `scopesFromBitmask`, `hasScope`, `getScopeLabel` | Civitai scopes are stored as bitmasks. These helpers let you compose scope sets from named flags rather than magic numbers. |
30
30
  | `cookies/*` — `sealCookie`, `unsealCookie`, `buildSetCookieHeader`, `readCookie` | AES-256-GCM authenticated cookie crypto. Use to seal a session blob (refresh token, expiry, scope) into an `httpOnly` cookie with zero external session store. |
31
- | `orchestrator/*` — `createOrchestratorClient`, `estimateWorkflow`, `submitWorkflow`, `getWorkflow`, `pollWorkflow`, `buildTextToImageBody`, `buildImageGenBody`, `buildWorkflowBody`, `WORKFLOW_STEP_TYPES`, `IMAGE_GEN_ENGINES`, `isTerminal`, `extractImageUrls`, `OrchestratorError`, `WorkflowSnapshot`, `GenerateInput`, `ImageGenInput`, `WorkflowStepType`, `ImageGenEngine`, `DEFAULT_MODEL_AIR` | Orchestrator workflow glue — types, body builders, raw HTTP, and long-poll helper. Client + server safe (fetch-only). `estimateWorkflow` calls `?whatif=true` to preview Buzz cost without spending. `pollWorkflow` long-polls to terminal status. `WORKFLOW_STEP_TYPES` is the catalog of every step `$type` the orchestrator accepts. |
32
- | `orchestrator/steps` — `WorkflowStepTemplates`, `WorkflowStepTemplateFor`, `WorkflowStepInputFor`, `AnyWorkflowStepTemplate`, `TypedWorkflowTemplate` | **Type-only** subpath (0 runtime bytes) keying the orchestrator's generated workflow-step shapes from `@civitai/client` by wire `$type`, so apps compose real step bodies against types that track the spec instead of hand-maintained copies. Requires the optional peer `@civitai/client@beta`. Type surface only — it grants no submit permission; see "Typed step shapes" below. |
31
+ | `orchestrator/*` — `createOrchestratorClient`, `estimateWorkflow`, `submitWorkflow`, `getWorkflow`, `pollWorkflow`, `buildTextToImageBody`, `buildImageGenBody`, `buildWorkflowBody`, `WORKFLOW_STEP_TYPES`, `IMAGE_GEN_ENGINES`, `isTerminal`, `extractImageUrls`, `OrchestratorError`, `OrchestratorLogger`, `WorkflowSnapshot`, `GenerateInput`, `ImageGenInput`, `WorkflowStepType`, `ImageGenEngine`, `DEFAULT_MODEL_AIR` | Orchestrator workflow glue — types, body builders, raw HTTP, and long-poll helper. Client + server safe (fetch-only). `estimateWorkflow` calls `?whatif=true` to preview Buzz cost without spending. `pollWorkflow` long-polls to terminal status. `WORKFLOW_STEP_TYPES` is the catalog of every step `$type` the orchestrator accepts. |
32
+ | `orchestrator/steps` — `WorkflowStepTemplates`, `WorkflowStepTemplateFor`, `WorkflowStepInputFor`, `AnyWorkflowStepTemplate`, `TypedWorkflowTemplate` | **Type-only** subpath (0 runtime bytes) keying the orchestrator's generated workflow-step shapes from `@civitai/client` by wire `$type`, so apps compose real step bodies against generated types instead of hand-maintained copies. Requires the optional peer `@civitai/client@beta`, which is frozen (renamed upstream; see "Installing the peer"). Type surface only — it grants no submit permission; see "Typed step shapes" below. |
33
33
  | `blocks/*` — `BlockManifestError`, `BLOCK_SCOPES`, `BLOCK_SCOPE_PATTERN`, `isMessage`, types (`BlockManifestV1`, `BlockContext`, `BlockToken`, `BlockSettings`, `ViewerInfo`, `ThemeInfo`, `BlockWorkflowSnapshot`, `BlockInitPayload`, `ParentToBlockMessage`, `BlockToParentMessage`, …) | Framework-agnostic contract for [Civitai Apps](https://github.com/civitai/civitai-app-starters/blob/main/docs/build-your-first-app-block.md). Ships a byte-identical copy of the server-published canonical JSON Schema (draft 2020-12, https://civitai.com/schemas/app-block/v1.json) at the `./schemas/app-block/v1.json` subpath for offline validation; a CI drift-check keeps it in sync. Runtime-agnostic and **zero runtime dependencies** — no React, no DOM types, nothing in your install graph. Hooks and the iframe transport live in a separate package. |
34
34
  | `manifest/*` — `defineBlock`, `SCHEMA_DIVERGENCES`, `KNOWN_GAPS` (**Node only**) | Build-time manifest validation. `defineBlock(config)` compiles the vendored canonical schema with [Ajv](https://ajv.js.org) and validates a `BlockManifestV1` against it, so authoring mistakes surface in `pnpm dev` instead of at `civitai app validate`/submit. It is **derived from the schema, not a hand-written mirror of it** — that mirror is what produced [#330](https://github.com/civitai/civitai-app-starters/issues/330). Needs `node:fs` and the optional peer `ajv`, which is why it is not on the browser-facing `./blocks` surface. |
35
35
  | `vite/*` — `blockManifestPlugin` (**Node only**) | A Vite plugin wrapping `defineBlock`, firing from `configResolved` — the one hook Vite calls on both the dev-server and the build path. Every block scaffold registers it, so `pnpm dev`, `pnpm dev:harness` and `pnpm build` all fail on a bad manifest with the offending field path. On the dev server only, it also exposes the manifest's `scopes` + `storage` to `@civitai/sdk` for a dev-tunnel local preview. Optional peers: `ajv` (runtime) and `vite` (types only). |
@@ -68,7 +68,7 @@ import { defineBlock } from '@civitai/app-sdk/manifest';
68
68
  // The same gate as a Vite plugin (NODE ONLY — optional peers `ajv` + `vite`):
69
69
  import { blockManifestPlugin } from '@civitai/app-sdk/vite';
70
70
  // Type-only: the orchestrator's generated per-step shapes. Needs the optional
71
- // peer `@civitai/client@beta` — see "Typed step shapes" below:
71
+ // (frozen) peer `@civitai/client@beta` — see "Typed step shapes" below:
72
72
  import type { TypedWorkflowTemplate } from '@civitai/app-sdk/orchestrator/steps';
73
73
  // Opaque-origin storage shim — see "Web storage in a block" below:
74
74
  import '@civitai/app-sdk/safe-storage';
@@ -887,6 +887,16 @@ console.log(`Hi ${me.username}`);
887
887
  > explicit `baseUrl` to each call only when targeting a local / self-hosted
888
888
  > instance (e.g. a dev auth hub vs a dev main app).
889
889
 
890
+ > **Failed orchestrator calls are logged, and you choose where.** Before it
891
+ > throws `OrchestratorError`, `callOrchestrator` (which `estimateWorkflow`,
892
+ > `submitWorkflow`, `getWorkflow` and `pollWorkflow` all use) logs one line
893
+ > with the method, path, status text and the first 500 characters of the raw response body.
894
+ > That body can echo what you submitted, such as the user's prompt. By default
895
+ > the line goes to `console.error`. Pass `logger: { error: (...args) => … }` to
896
+ > `createOrchestratorClient` to send it to your own logger, or `logger: null`
897
+ > to keep it out of your logs entirely. The thrown error still carries `status`
898
+ > and `body` either way.
899
+
890
900
  > **`fallbackScope`, and what happens to a `scope` we cannot read.** Civitai's
891
901
  > token endpoint returns `scope` as a decimal bitmask in a JSON *string*
892
902
  > (`"scope": "114689"` — see the
@@ -982,7 +992,7 @@ Per-engine input shapes (`aspectRatio`, `resolution`, `numImages`, etc.) come fr
982
992
 
983
993
  ## Typed step shapes (`@civitai/app-sdk/orchestrator/steps`)
984
994
 
985
- `WORKFLOW_STEP_TYPES` tells you which `$type`s exist; the body builders above take `input: unknown`. This subpath is the other half: the real per-step input shapes, keyed by wire `$type` over the orchestrator's own generated client (`@civitai/client`) so they track the spec by codegen rather than by hand.
995
+ `WORKFLOW_STEP_TYPES` tells you which `$type`s exist; the body builders above take `input: unknown`. This subpath is the other half: the real per-step input shapes, keyed by wire `$type` over the orchestrator's own generated client (`@civitai/client`) so they come from codegen rather than by hand.
986
996
 
987
997
  It is **type-only** — every export is a `type`, the built `dist/orchestrator/steps.js` is an empty module, and bundling it yields 0 bytes. Nothing is added to your runtime.
988
998
 
@@ -1027,7 +1037,7 @@ What it exports:
1027
1037
 
1028
1038
  > 🔴 **The map is not total over the catalog, and that is the expected state.** `WORKFLOW_STEP_TYPES` documents 58 `$type`s; this map covers 47. The 11 with no generated template in the pinned `@civitai/client` are `archiveExtraction`, `audioModeration`, `imageScanning`, `liveTextToSpeech`, `liveTranscription`, `merge`, `multimodalEmbedding`, `preprocessVideo`, `promptModeration`, `soniloAudioGen`, `yuE2`, and `WorkflowStepTemplateFor<…>` is a compile error for each of them.
1029
1039
  >
1030
- > The two surfaces move independently on purpose: the catalog tracks the **live** orchestrator spec (a daily job syncs it), while these types track whatever `@civitai/client` was last published from. So the catalog runs ahead and the client catches up. The gap is never silent — `test/orchestrator/step-templates.test-d.ts` carries it as a `never` ledger plus one `@ts-expect-error` per gap `$type`, and `test/orchestrator/step-count-prose.test.ts` derives all four numbers (58, 47, 11, and the names) from `WORKFLOW_STEP_TYPES` and the map's own AST, then fails if this paragraph or its twin in `src/orchestrator/steps.ts` disagrees by one character.
1040
+ > The two surfaces move independently: the catalog tracks the **live** orchestrator spec (a daily job syncs it), while these types come from `@civitai/client`, which is frozen at `0.2.0-beta.98` and will receive no further releases (see "Installing the peer"). So the gap will not close through a `@civitai/client` release; it changes only if this subpath's types source does. The gap is never silent — `test/orchestrator/step-templates.test-d.ts` carries it as a `never` ledger plus one `@ts-expect-error` per gap `$type`, and `test/orchestrator/step-count-prose.test.ts` derives all four numbers (58, 47, 11, and the names) from `WORKFLOW_STEP_TYPES` and the map's own AST, then fails if this paragraph or its twin in `src/orchestrator/steps.ts` disagrees by one character.
1031
1041
 
1032
1042
  The generated `*StepTemplate` and `*Input` types are **not** re-exported individually. Using this subpath already requires `@civitai/client` installed, so if you want one by name, import it straight from there — `import type { TextToImageStepTemplate } from '@civitai/client'`.
1033
1043
 
@@ -1041,6 +1051,8 @@ In practice `WorkflowStepTemplateFor<T>` and `WorkflowStepInputFor<T>` are the b
1041
1051
  pnpm add -D @civitai/client@beta
1042
1052
  ```
1043
1053
 
1054
+ > 🔴 **`@civitai/client` is frozen, and this subpath intentionally stays on it.** The package was renamed to `@civitai/orchestration-client`; npm marks `@civitai/client` deprecated ("Moved to @civitai/orchestration-client"), and `0.2.0-beta.98` under the `beta` tag is its last release. It remains installable and works as documented here. This subpath's types import the module name `@civitai/client`, so installing only `@civitai/orchestration-client` does **not** satisfy it: the guard below reports exactly as if the peer were missing. Keep `@civitai/client@beta` installed for these types. If you want step types generated from the renamed client, `@civitai/sdk` (a separate package in this repo) types its orchestration steps from `@civitai/orchestration-client`.
1055
+
1044
1056
  > 🔴 **Use the `beta` tag, not `latest`.** `@civitai/client`'s npm `latest` dist-tag points at `0.1.1-beta.0`, roughly 97 betas behind the `beta` tag the orchestrator is actually generated against — and missing most of the step types above. A plain `pnpm add @civitai/client` installs the stale one with no error; the first symptom is `TextToImageStepTemplate` not existing.
1045
1057
 
1046
1058
  > 🔴 **If the peer's types don't resolve, these types tell you — they used to just stop checking.** The unresolved `@civitai/client` import is in the SDK's shipped `steps.d.ts`, so `skipLibCheck: true` — the default for a TypeScript app, and set by every starter in this repo — suppresses the `TS2307` along with every other declaration-file diagnostic, and the types above degrade to an error type that behaves like `any`. Measured on a consumer with the peer uninstalled, against the subpath as it stood before the guard existed: **1 diagnostic** — a planted `const x: number = 's'` — on a project that also had a deliberately wrong `$type`. The wrong `$type` reported nothing.
@@ -943,7 +943,7 @@ export type WorkflowStatus = 'idle' | 'estimating' | 'confirming' | 'submitting'
943
943
  export type BuzzAccountType = 'blue' | 'green' | 'yellow';
944
944
  /**
945
945
  * Generation parameters a block can override. All optional — the host fills
946
- * sensible defaults (sampler='Euler', steps=25, dimensions from the
946
+ * sensible defaults (the family's default sampler, steps=25, dimensions from the
947
947
  * base-model family) when omitted, so the simplest block can submit
948
948
  * `{ kind: 'textToImage', modelId, modelVersionId, params: { prompt } }`.
949
949
  *
@@ -955,7 +955,13 @@ export interface BlockTextToImageParams {
955
955
  negativePrompt?: string;
956
956
  /** Range 1–30. */
957
957
  cfgScale?: number;
958
- /** Sampler name (e.g. 'Euler', 'DPM++ 2M Karras'). Defaults to 'Euler'. */
958
+ /**
959
+ * Sampler name. Valid names depend on the model family: read them with
960
+ * `fetchGenerationSamplers` from `@civitai/app-sdk/blocks`. A name the family
961
+ * does not offer is replaced by the family's default, with no error. Omitted,
962
+ * the host uses the family's default, and sends none for a family with no
963
+ * sampler control.
964
+ */
959
965
  sampler?: string;
960
966
  /** Range 1–50. */
961
967
  steps?: number;
@@ -370,6 +370,10 @@ export interface WorkflowSnapshot {
370
370
  export interface OrchestratorClient {
371
371
  baseUrl: string;
372
372
  accessToken: string;
373
+ logger?: OrchestratorLogger | null;
374
+ }
375
+ export interface OrchestratorLogger {
376
+ error: (...args: unknown[]) => void;
373
377
  }
374
378
  export declare class OrchestratorError extends Error {
375
379
  readonly status: number;
@@ -382,6 +386,14 @@ export interface CreateOrchestratorClientOptions {
382
386
  accessToken: string;
383
387
  /** Orchestrator base URL. Defaults to Civitai's prod orchestrator. */
384
388
  baseUrl?: string;
389
+ /**
390
+ * Where {@link callOrchestrator} logs a failed response before it throws:
391
+ * method, path, status text and the first 500 characters of the raw response body, which
392
+ * can echo the submitted input (a prompt, for example). Omit it to keep
393
+ * `console.error`; pass `null` to log nothing. This covers the orchestrator
394
+ * client only, not the OAuth helpers.
395
+ */
396
+ logger?: OrchestratorLogger | null;
385
397
  }
386
398
  /**
387
399
  * Build an {@link OrchestratorClient} from a user's access token. Pass the
@@ -396,9 +408,9 @@ export interface CreateOrchestratorClientOptions {
396
408
  */
397
409
  export declare function createOrchestratorClient(opts: CreateOrchestratorClientOptions): OrchestratorClient;
398
410
  /**
399
- * Internal raw-fetch helper. Logs the failing response to console.error and
400
- * throws {@link OrchestratorError} on non-2xx. Exported so callers can build
401
- * their own orchestrator routes without duplicating this code.
411
+ * Internal raw-fetch helper. Logs the failing response to the configured logger
412
+ * and throws {@link OrchestratorError} on non-2xx. Exported so callers can
413
+ * build their own orchestrator routes without duplicating this code.
402
414
  */
403
415
  export declare function callOrchestrator(client: OrchestratorClient, path: string, init?: RequestInit): Promise<unknown>;
404
416
  export interface BuildTextToImageBodyOptions {
@@ -345,16 +345,19 @@ export class OrchestratorError extends Error {
345
345
  * const estimate = await estimateWorkflow(client, body);
346
346
  */
347
347
  export function createOrchestratorClient(opts) {
348
- return {
348
+ const client = {
349
349
  baseUrl: opts.baseUrl ?? DEFAULT_ORCHESTRATOR_BASE_URL,
350
350
  accessToken: opts.accessToken,
351
351
  };
352
+ if (opts.logger !== undefined)
353
+ client.logger = opts.logger;
354
+ return client;
352
355
  }
353
356
  // ---------- Raw HTTP --------------------------------------------------------
354
357
  /**
355
- * Internal raw-fetch helper. Logs the failing response to console.error and
356
- * throws {@link OrchestratorError} on non-2xx. Exported so callers can build
357
- * their own orchestrator routes without duplicating this code.
358
+ * Internal raw-fetch helper. Logs the failing response to the configured logger
359
+ * and throws {@link OrchestratorError} on non-2xx. Exported so callers can
360
+ * build their own orchestrator routes without duplicating this code.
358
361
  */
359
362
  export async function callOrchestrator(client, path, init = {}) {
360
363
  const { headers, ...rest } = init;
@@ -375,8 +378,22 @@ export async function callOrchestrator(client, path, init = {}) {
375
378
  body = text;
376
379
  }
377
380
  if (!res.ok) {
378
- console.error(`[orchestrator] ${init.method ?? 'GET'} ${path} -> ${res.status} ${res.statusText}\n` +
379
- ` raw body: ${text.length ? text.slice(0, 500) : '(empty)'}`);
381
+ const logger = client.logger === undefined ? console : client.logger;
382
+ // A caller-supplied logger must never change what this function throws:
383
+ // callers branch on `instanceof OrchestratorError` to pass the status on.
384
+ // So a logger that throws is swallowed, and one that returns a rejected
385
+ // promise (an async log sink that is down) is caught rather than left as
386
+ // an unhandled rejection that would crash a Node process.
387
+ try {
388
+ const logged = logger?.error(`[orchestrator] ${init.method ?? 'GET'} ${path} -> ${res.status} ${res.statusText}\n` +
389
+ ` raw body: ${text.length ? text.slice(0, 500) : '(empty)'}`);
390
+ if (logged && typeof logged.then === 'function') {
391
+ Promise.resolve(logged).catch(() => { });
392
+ }
393
+ }
394
+ catch {
395
+ // Logging is best-effort; the OrchestratorError below is the contract.
396
+ }
380
397
  throw new OrchestratorError(`HTTP ${res.status}`, res.status, body);
381
398
  }
382
399
  return body;
@@ -6,8 +6,12 @@
6
6
  * (`WORKFLOW_STEP_TYPES` — 58 `$type` names and what each one does) and the
7
7
  * fetch helpers (`submitWorkflow`, `estimateWorkflow`, …), but its body
8
8
  * builders take `input: unknown`. This module is the missing half: the actual
9
- * per-step input shapes, tracked against the orchestrator's OpenAPI spec by
10
- * codegen instead of by hand.
9
+ * per-step input shapes, generated from the orchestrator's OpenAPI spec by
10
+ * codegen instead of written by hand. 🔴 `@civitai/client` is FROZEN: it was
11
+ * renamed `@civitai/orchestration-client`, npm marks it deprecated, and
12
+ * `0.2.0-beta.98` is its last release. This module still imports the name
13
+ * `@civitai/client` on purpose, so the renamed package alone does not satisfy
14
+ * it (see "Why this is a separate deep entry point" below).
11
15
  *
12
16
  * What this module adds on top of `@civitai/client` is the `$type` → template
13
17
  * MAP (`WorkflowStepTemplates`) and the lookups derived from it. The generated
@@ -106,9 +110,10 @@
106
110
  *
107
111
  * That gap is EXPECTED and is not a defect in either surface. The catalog
108
112
  * tracks the LIVE orchestrator spec (`pnpm check:catalogs` and the daily
109
- * `sync-orchestrator-catalogs` automation keep it there); these types track
110
- * whatever `@civitai/client` was last published from. The catalog syncs ahead;
111
- * the client catches up later. What is NOT optional is that the gap stays
113
+ * `sync-orchestrator-catalogs` automation keep it there); these types come
114
+ * from `@civitai/client`, which is frozen and will receive no further
115
+ * releases. So the gap does not close through a client release; it changes
116
+ * only if this module's types source does. What is NOT optional is that the gap stays
112
117
  * stated: it is spelled as a `never` ledger in
113
118
  * `test/orchestrator/step-templates.test-d.ts` (which also pins the compile
114
119
  * error above, one `@ts-expect-error` per gap `$type`), and the sentence naming
@@ -133,6 +138,11 @@
133
138
  * pnpm add -D @civitai/client@beta
134
139
  * ```
135
140
  *
141
+ * That is the frozen package's last release, and it stays this module's peer:
142
+ * installing only the renamed `@civitai/orchestration-client` leaves the
143
+ * `@civitai/client` import unresolved, which the guard below reports exactly as
144
+ * a missing peer.
145
+ *
136
146
  * 🔴 **WITHOUT A GUARD, FORGETTING THE PEER IS SILENT UNDER
137
147
  * `skipLibCheck: true`, WHICH IS THE DEFAULT.** The unresolved
138
148
  * `@civitai/client` import lands in the emitted `steps.d.ts`, so `skipLibCheck`
@@ -336,10 +346,11 @@ interface StepTemplateMap {
336
346
  * catalog nor the pinned client knows about. That is the catalog's own
337
347
  * drift check's job (`pnpm check:catalogs`, which re-fetches the LIVE spec).
338
348
  *
339
- * The two can legitimately disagree for a while: the catalog tracks the live
340
- * spec, while these types track whatever `@civitai/client` was last published
341
- * from. When the catalog syncs ahead, name the not-yet-typed step types in the
342
- * test's ledger in the same PR, and clear them when the client republishes.
349
+ * The two can legitimately disagree: the catalog tracks the live spec, while
350
+ * these types come from the frozen `@civitai/client`. When the catalog syncs
351
+ * ahead, name the not-yet-typed step types in the test's ledger in the same
352
+ * PR. No client republish will clear them; only a change of this module's
353
+ * types source can.
343
354
  */
344
355
  export type WorkflowStepTemplates = {
345
356
  [K in keyof StepTemplateMap]: GuardPeer<StepTemplateMap[K]>;
@@ -6,8 +6,12 @@
6
6
  * (`WORKFLOW_STEP_TYPES` — 58 `$type` names and what each one does) and the
7
7
  * fetch helpers (`submitWorkflow`, `estimateWorkflow`, …), but its body
8
8
  * builders take `input: unknown`. This module is the missing half: the actual
9
- * per-step input shapes, tracked against the orchestrator's OpenAPI spec by
10
- * codegen instead of by hand.
9
+ * per-step input shapes, generated from the orchestrator's OpenAPI spec by
10
+ * codegen instead of written by hand. 🔴 `@civitai/client` is FROZEN: it was
11
+ * renamed `@civitai/orchestration-client`, npm marks it deprecated, and
12
+ * `0.2.0-beta.98` is its last release. This module still imports the name
13
+ * `@civitai/client` on purpose, so the renamed package alone does not satisfy
14
+ * it (see "Why this is a separate deep entry point" below).
11
15
  *
12
16
  * What this module adds on top of `@civitai/client` is the `$type` → template
13
17
  * MAP (`WorkflowStepTemplates`) and the lookups derived from it. The generated
@@ -106,9 +110,10 @@
106
110
  *
107
111
  * That gap is EXPECTED and is not a defect in either surface. The catalog
108
112
  * tracks the LIVE orchestrator spec (`pnpm check:catalogs` and the daily
109
- * `sync-orchestrator-catalogs` automation keep it there); these types track
110
- * whatever `@civitai/client` was last published from. The catalog syncs ahead;
111
- * the client catches up later. What is NOT optional is that the gap stays
113
+ * `sync-orchestrator-catalogs` automation keep it there); these types come
114
+ * from `@civitai/client`, which is frozen and will receive no further
115
+ * releases. So the gap does not close through a client release; it changes
116
+ * only if this module's types source does. What is NOT optional is that the gap stays
112
117
  * stated: it is spelled as a `never` ledger in
113
118
  * `test/orchestrator/step-templates.test-d.ts` (which also pins the compile
114
119
  * error above, one `@ts-expect-error` per gap `$type`), and the sentence naming
@@ -133,6 +138,11 @@
133
138
  * pnpm add -D @civitai/client@beta
134
139
  * ```
135
140
  *
141
+ * That is the frozen package's last release, and it stays this module's peer:
142
+ * installing only the renamed `@civitai/orchestration-client` leaves the
143
+ * `@civitai/client` import unresolved, which the guard below reports exactly as
144
+ * a missing peer.
145
+ *
136
146
  * 🔴 **WITHOUT A GUARD, FORGETTING THE PEER IS SILENT UNDER
137
147
  * `skipLibCheck: true`, WHICH IS THE DEFAULT.** The unresolved
138
148
  * `@civitai/client` import lands in the emitted `steps.d.ts`, so `skipLibCheck`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/app-sdk",
3
- "version": "0.91.0",
3
+ "version": "0.92.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",
@@ -86,7 +86,13 @@
86
86
  "and MISSING MOST STEP TYPES, with no error. The range below deliberately",
87
87
  "excludes 0.1.x: verify with",
88
88
  "`semver.satisfies('0.1.1-beta.0', '^0.2.0-beta.98')` === false.",
89
- "Install with the tag: `pnpm add -D @civitai/client@beta`."
89
+ "Install with the tag: `pnpm add -D @civitai/client@beta`.",
90
+ "",
91
+ "🔴 @civitai/client IS FROZEN. It was renamed @civitai/orchestration-client;",
92
+ "npm marks it deprecated and 0.2.0-beta.98 is its last release, so the",
93
+ "catalog/type gap will not close through a @civitai/client release. The",
94
+ "peer stays @civitai/client on purpose: the renamed package alone does not",
95
+ "satisfy `./orchestrator/steps` (the README's \"Installing the peer\")."
90
96
  ],
91
97
  "comment-peerDependencies-ajv-vite": [
92
98
  "ajv and vite are OPTIONAL peers of the NODE-ONLY subpaths added when #330",