@civitai/app-sdk 0.52.0 → 0.53.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
@@ -446,7 +446,7 @@ The starters in `civitai/civitai-app-starters` wire this into framework-specific
446
446
 
447
447
  ## Choosing a workflow step type
448
448
 
449
- The orchestrator is a workflow API: each request submits a list of typed steps. `WORKFLOW_STEP_TYPES` is the in-code catalog of every step `$type` it accepts, with a one-line description for each — `textToImage`, `imageGen`, `videoGen`, `comfy`, `customComfy`, `textToSpeech`, `aceStepAudio`, `transcription`, `imageUpscaler` among them (50 in total).
449
+ The orchestrator is a workflow API: each request submits a list of typed steps. `WORKFLOW_STEP_TYPES` is the in-code catalog of every step `$type` it accepts, with a one-line description for each — `textToImage`, `imageGen`, `videoGen`, `comfy`, `customComfy`, `textToSpeech`, `aceStepAudio`, `transcription`, `imageUpscaler` among them (51 in total).
450
450
 
451
451
  The catalog is pinned to the orchestrator's published OpenAPI spec two ways — an offline unit test against a transcribed copy of the spec's `WorkflowStepTemplate` discriminator mapping, and a CI job (`pnpm check:catalogs`) that re-fetches the live spec and diffs it. If a `$type` is listed here, the orchestrator accepts it.
452
452
 
@@ -521,15 +521,15 @@ What it exports:
521
521
 
522
522
  | Export | What |
523
523
  |---|---|
524
- | `WorkflowStepTemplates` | `$type` → template type, for 47 of the catalog's 50 step types. Keyed by the WIRE name, which the generated type names don't always match (`model3DPreview` → `Model3dPreviewStepTemplate`). |
524
+ | `WorkflowStepTemplates` | `$type` → template type, for 47 of the catalog's 51 step types. Keyed by the WIRE name, which the generated type names don't always match (`model3DPreview` → `Model3dPreviewStepTemplate`). |
525
525
  | `WorkflowStepTemplateFor<'videoGen'>` | One step's template. |
526
526
  | `WorkflowStepInputFor<'videoGen'>` | One step's `input` shape, without needing the generated `*Input` name. |
527
527
  | `AnyWorkflowStepTemplate` | Discriminated union of all 47 mapped templates — `Extract<…, { $type: 'comfy' }>` and exhaustive `switch` work. `@civitai/client`'s base `WorkflowStepTemplate` has `$type` as a bare `string`, so it narrows nothing. |
528
528
  | `TypedWorkflowTemplate` | The submit envelope with `steps` narrowed to that union. Pass it straight to `submitWorkflow` / `estimateWorkflow`. |
529
529
 
530
- > 🔴 **The map is not total over the catalog, and that is the expected state.** `WORKFLOW_STEP_TYPES` documents 50 `$type`s; this map covers 47. The 3 with no generated template in the pinned `@civitai/client` are `imageScanning`, `preprocessVideo`, `yuE2`, and `WorkflowStepTemplateFor<…>` is a compile error for each of them.
530
+ > 🔴 **The map is not total over the catalog, and that is the expected state.** `WORKFLOW_STEP_TYPES` documents 51 `$type`s; this map covers 47. The 4 with no generated template in the pinned `@civitai/client` are `imageScanning`, `preprocessVideo`, `soniloAudioGen`, `yuE2`, and `WorkflowStepTemplateFor<…>` is a compile error for each of them.
531
531
  >
532
- > 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 (50, 47, 3, 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.
532
+ > 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 (51, 47, 4, 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.
533
533
 
534
534
  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'`.
535
535
 
@@ -566,7 +566,7 @@ A `$type` having a type here says nothing about whether you may submit it.
566
566
 
567
567
  Several of the 47 exist to serve Civitai's own pipelines rather than third-party apps — `modelPickleScan`, `xGuardModeration`, `training`, `comfyNodepackSnapshot`, `qwenImageBench`, the `model*`/`media*` hashing and classification steps. They're in the consumer spec, so they're typed here. They are not an invitation.
568
568
 
569
- Note that `WORKFLOW_STEP_TYPES` does **not** mark most of them: of its 50 entries exactly two — `comfyNodepackSnapshot` and `qwenImageBench` — sit under its "Platform internals" heading, and the rest are ordinary documented entries (`webScrape` even carries usage notes). The reason the platform steps are typed anyway is not that the catalog flags them as internal; it's that the catalog *documents* them, so skipping them would make `WorkflowStepTemplateFor<'training'>` a compile error for a step type the SDK documents — which is exactly what is live today for the 3 `$type`s the pinned client cannot type, and is why that gap is spelled out above rather than left to be discovered.
569
+ Note that `WORKFLOW_STEP_TYPES` does **not** mark most of them: of its 51 entries exactly two — `comfyNodepackSnapshot` and `qwenImageBench` — sit under its "Platform internals" heading, and the rest are ordinary documented entries (`webScrape` even carries usage notes). The reason the platform steps are typed anyway is not that the catalog flags them as internal; it's that the catalog *documents* them, so skipping them would make `WorkflowStepTemplateFor<'training'>` a compile error for a step type the SDK documents — which is exactly what is live today for the 3 `$type`s the pinned client cannot type, and is why that gap is spelled out above rather than left to be discovered.
570
570
 
571
571
  ## Public vs. confidential clients
572
572
 
@@ -130,6 +130,8 @@ export declare const WORKFLOW_STEP_TYPES: {
130
130
  * `maxDuration` is an upper bound; generation can stop earlier.
131
131
  */
132
132
  readonly yuE2: "Generate a song from style and lyrics with YuE2";
133
+ /** Music or a standalone sound effect from a text prompt. */
134
+ readonly soniloAudioGen: "Music or a sound effect from a text prompt (Sonilo)";
133
135
  /** Speech-to-text transcription. */
134
136
  readonly transcription: "Speech-to-text transcription";
135
137
  /** Generate captions from audio. */
@@ -134,6 +134,8 @@ export const WORKFLOW_STEP_TYPES = {
134
134
  * `maxDuration` is an upper bound; generation can stop earlier.
135
135
  */
136
136
  yuE2: 'Generate a song from style and lyrics with YuE2',
137
+ /** Music or a standalone sound effect from a text prompt. */
138
+ soniloAudioGen: 'Music or a sound effect from a text prompt (Sonilo)',
137
139
  /** Speech-to-text transcription. */
138
140
  transcription: 'Speech-to-text transcription',
139
141
  /** Generate captions from audio. */
@@ -3,7 +3,7 @@
3
3
  * own generated client (`@civitai/client`).
4
4
  *
5
5
  * The sibling `@civitai/app-sdk/orchestrator` module gives you the *catalog*
6
- * (`WORKFLOW_STEP_TYPES` — 50 `$type` names and what each one does) and the
6
+ * (`WORKFLOW_STEP_TYPES` — 51 `$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
9
  * per-step input shapes, tracked against the orchestrator's OpenAPI spec by
@@ -70,7 +70,7 @@
70
70
  * consumer spec, so they are typed here. They are not an invitation.
71
71
  *
72
72
  * ⚠️ `WORKFLOW_STEP_TYPES` does NOT mark most of them. Counted at this commit:
73
- * of its 50 entries, exactly TWO sit under its "Platform internals" heading —
73
+ * of its 51 entries, exactly TWO sit under its "Platform internals" heading —
74
74
  * `comfyNodepackSnapshot` and `qwenImageBench`. `training`, `webScrape`,
75
75
  * `xGuardModeration`, `modelPickleScan` and the `model*` / `media*` steps are
76
76
  * ordinary documented entries under ordinary headings, and `webScrape` carries
@@ -89,9 +89,9 @@
89
89
  * (#315) without anything going red. The measured state, derived rather than
90
90
  * typed:
91
91
  *
92
- * `WORKFLOW_STEP_TYPES` documents 50 `$type`s; this map covers 47. The 3 with
92
+ * `WORKFLOW_STEP_TYPES` documents 51 `$type`s; this map covers 47. The 4 with
93
93
  * no generated template in the pinned `@civitai/client` are `imageScanning`,
94
- * `preprocessVideo`, `yuE2`, and `WorkflowStepTemplateFor<…>` is a compile
94
+ * `preprocessVideo`, `soniloAudioGen`, `yuE2`, and `WorkflowStepTemplateFor<…>` is a compile
95
95
  * error for each of them.
96
96
  *
97
97
  * That gap is EXPECTED and is not a defect in either surface. The catalog
@@ -300,7 +300,7 @@ interface StepTemplateMap {
300
300
  xGuardModeration: XGuardModerationStepTemplate;
301
301
  }
302
302
  /**
303
- * `$type` → its step-template type, for 47 of the catalog's 50 step types.
303
+ * `$type` → its step-template type, for 47 of the catalog's 51 step types.
304
304
  *
305
305
  * Keyed by the WIRE name rather than the generated type name, because the wire
306
306
  * name is what you actually have in hand and the generator does not always
@@ -3,7 +3,7 @@
3
3
  * own generated client (`@civitai/client`).
4
4
  *
5
5
  * The sibling `@civitai/app-sdk/orchestrator` module gives you the *catalog*
6
- * (`WORKFLOW_STEP_TYPES` — 50 `$type` names and what each one does) and the
6
+ * (`WORKFLOW_STEP_TYPES` — 51 `$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
9
  * per-step input shapes, tracked against the orchestrator's OpenAPI spec by
@@ -70,7 +70,7 @@
70
70
  * consumer spec, so they are typed here. They are not an invitation.
71
71
  *
72
72
  * ⚠️ `WORKFLOW_STEP_TYPES` does NOT mark most of them. Counted at this commit:
73
- * of its 50 entries, exactly TWO sit under its "Platform internals" heading —
73
+ * of its 51 entries, exactly TWO sit under its "Platform internals" heading —
74
74
  * `comfyNodepackSnapshot` and `qwenImageBench`. `training`, `webScrape`,
75
75
  * `xGuardModeration`, `modelPickleScan` and the `model*` / `media*` steps are
76
76
  * ordinary documented entries under ordinary headings, and `webScrape` carries
@@ -89,9 +89,9 @@
89
89
  * (#315) without anything going red. The measured state, derived rather than
90
90
  * typed:
91
91
  *
92
- * `WORKFLOW_STEP_TYPES` documents 50 `$type`s; this map covers 47. The 3 with
92
+ * `WORKFLOW_STEP_TYPES` documents 51 `$type`s; this map covers 47. The 4 with
93
93
  * no generated template in the pinned `@civitai/client` are `imageScanning`,
94
- * `preprocessVideo`, `yuE2`, and `WorkflowStepTemplateFor<…>` is a compile
94
+ * `preprocessVideo`, `soniloAudioGen`, `yuE2`, and `WorkflowStepTemplateFor<…>` is a compile
95
95
  * error for each of them.
96
96
  *
97
97
  * That gap is EXPECTED and is not a defect in either surface. The catalog
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/app-sdk",
3
- "version": "0.52.0",
3
+ "version": "0.53.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",