@civitai/app-sdk 0.95.0 → 0.96.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/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/scopes.js +3 -2
- package/dist/blocks/types.d.ts +82 -25
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/manifest/defineBlock.js +5 -2
- package/package.json +1 -1
- package/schemas/app-block/v1.json +5 -3
package/dist/blocks/index.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ export { isModelSlotContext, isPageSlotContext } from './types.js';
|
|
|
88
88
|
* in `types.ts` for which of the two it uses and why.
|
|
89
89
|
*/
|
|
90
90
|
export { isSignedIn } from './types.js';
|
|
91
|
-
export type { BlockContext, KnownSlotId, ModelSlotId, PageSlotContext, PageSlotId, UnknownSlotContext, BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockSettings, BlockStorageCollectionDeclaration, BlockStorageCollectionHook, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, BlockToken, ContentRating, ManifestBooleanField, ManifestIframe, ManifestNumberField, ManifestPage, ManifestPreview, ManifestSettingField, ManifestSettings, ManifestStringField, ManifestTarget, ModelSlotContext, SettingScope, SettingWidget, Theme, ViewerInfo, BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockSourceImage, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockUploadedGenerationSource, BlockPersistGenerationSourceRequest, BlockPersistedGenerationSource, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockMediaUploadBatchItemResult, BlockPendingImageInfo, BlockSharedUploadImageInfo, BlockSharedPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockShareLinkMethod, BlockShareLinkRequest, BlockShareLinkResult, BlockTextToImageParams, BlockWorkflowSnapshot, BlockEstimateBatchAggregate, BlockModelSubstitution, ModelSubstitutionReason, KnownBlockWorkflowErrorCode, BlockStepToolCall, BlockTrainedEpoch, BlockPublishedModel, BuzzAccountType, ShowcaseImage, WorkflowBody, WorkflowBodyTextToImage, WorkflowBodyCustomComfy, WorkflowBodyCustomComfyRecipe, WorkflowBodyCustomComfyInline, InlineComfyNode, WorkflowBodyStep, WorkflowBodyPassThroughStep, WorkflowBodyWorkflow, WorkflowBodyWorkflowStep, WorkflowStepRef, WithWorkflowStepRefs, BlockWorkflowStepSnapshot, BlockWorkflowStepQueue, BlockWorkflowEta, KnownBlockWorkflowQueueSupport, BlockWorkflowOutput, BlockWorkflowAvailableOutput, BlockWorkflowRestrictedOutput, BlockWorkflowPendingOutput, BlockWorkflowBlockedOutput, KnownBlockWorkflowOutputRating, KnownBlockWorkflowRestrictionReason, KnownBlockOutputUnlockOutcome, BlockOutputUnlockResult, WorkflowStatus, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileEntry, BlockResourceFileEntryFormat, BlockResourceFileErrorCode, BlockResourceFileMeta, AppWorkflow, AppWorkflowImage, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostRequest, BlockCreatePostResult, BlockCreatePostHostError, WorkflowBodyTraining, AiToolkitTrainingParams, AiToolkitTrainingParamsBase, AiToolkitPlainEcosystem, AiToolkitLrScheduler, AiToolkitOptimizerType, BlockTrainingQuote, BlockTrainingDatasetItem, BlockTrainingDataImage, BlockTrainingDataUploadResult, BlockRunTrainingHostError, BlockStepQuote, BlockModel3dOutput, BlockRunConfirmedStepHostError, } from './types.js';
|
|
91
|
+
export type { BlockContext, KnownSlotId, ModelSlotId, PageSlotContext, PageSlotId, UnknownSlotContext, BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockSettings, BlockStorageCollectionDeclaration, BlockStorageCollectionHook, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, BlockToken, ContentRating, ManifestBooleanField, ManifestIframe, ManifestNumberField, ManifestPage, ManifestPreview, ManifestSettingField, ManifestSettings, ManifestStringField, ManifestTarget, ModelSlotContext, SettingScope, SettingWidget, Theme, ViewerInfo, BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockSourceImage, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockUploadedGenerationSource, BlockPersistGenerationSourceRequest, BlockPersistedGenerationSource, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockMediaUploadBatchItemResult, BlockPendingImageInfo, BlockSharedUploadImageInfo, BlockSharedPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockShareLinkMethod, BlockShareLinkRequest, BlockShareLinkResult, BlockTextToImageParams, BlockWorkflowSnapshot, RateLimitMeta, BlockEstimateBatchAggregate, BlockModelSubstitution, ModelSubstitutionReason, KnownBlockWorkflowErrorCode, BlockStepToolCall, BlockTrainedEpoch, BlockPublishedModel, BuzzAccountType, ShowcaseImage, WorkflowBody, WorkflowBodyTextToImage, WorkflowBodyCustomComfy, WorkflowBodyCustomComfyRecipe, WorkflowBodyCustomComfyInline, InlineComfyNode, WorkflowBodyStep, WorkflowBodyPassThroughStep, WorkflowBodyWorkflow, WorkflowBodyWorkflowStep, WorkflowStepRef, WithWorkflowStepRefs, BlockWorkflowStepSnapshot, BlockWorkflowStepQueue, BlockWorkflowEta, KnownBlockWorkflowQueueSupport, BlockWorkflowOutput, BlockWorkflowAvailableOutput, BlockWorkflowRestrictedOutput, BlockWorkflowPendingOutput, BlockWorkflowBlockedOutput, KnownBlockWorkflowOutputRating, KnownBlockWorkflowRestrictionReason, KnownBlockOutputUnlockOutcome, BlockOutputUnlockResult, WorkflowStatus, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileEntry, BlockResourceFileEntryFormat, BlockResourceFileErrorCode, BlockResourceFileMeta, AppWorkflow, AppWorkflowImage, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostRequest, BlockCreatePostResult, BlockCreatePostHostError, WorkflowBodyTraining, AiToolkitTrainingParams, AiToolkitTrainingParamsBase, AiToolkitPlainEcosystem, AiToolkitLrScheduler, AiToolkitOptimizerType, BlockTrainingQuote, BlockTrainingDatasetItem, BlockTrainingDataImage, BlockTrainingDataUploadResult, BlockRunTrainingHostError, BlockStepQuote, BlockModel3dOutput, BlockRunConfirmedStepHostError, } from './types.js';
|
|
92
92
|
/**
|
|
93
93
|
* Host bounds for an inline `customComfy` graph, mirrored from civitai/civitai —
|
|
94
94
|
* see `WorkflowBodyCustomComfyInline.workflow`.
|
package/dist/blocks/scopes.js
CHANGED
|
@@ -30,8 +30,9 @@ export const BLOCK_SCOPES = {
|
|
|
30
30
|
// apps:storage / apps:storage:publish — the DOCUMENT STORE, declared per
|
|
31
31
|
// collection in the manifest's `storage` block, that succeeds the four
|
|
32
32
|
// scopes above (which stay live until apps migrate). Same no-OAuth-bit
|
|
33
|
-
// posture. `apps:storage` covers reads, the viewer's private collections
|
|
34
|
-
//
|
|
33
|
+
// posture. `apps:storage` covers reads, the viewer's private collections and
|
|
34
|
+
// deleting the viewer's own shared documents (marks and counters, which it
|
|
35
|
+
// also covered, were removed from civitai.com), and is CONSENT-EXEMPT; any manifest declaring a
|
|
35
36
|
// collection must request it. `apps:storage:publish` writes documents in a
|
|
36
37
|
// SHARED collection under the viewer's identity — SENSITIVE (needs a
|
|
37
38
|
// `scopeJustifications` entry) and CONSENT-GATED. `apps:storage` is the one
|
package/dist/blocks/types.d.ts
CHANGED
|
@@ -2702,6 +2702,48 @@ export interface BlockWorkflowSnapshot {
|
|
|
2702
2702
|
* whose throttled reply is `{ workflowId, status: 'processing' }`.
|
|
2703
2703
|
*/
|
|
2704
2704
|
throttled?: true;
|
|
2705
|
+
/**
|
|
2706
|
+
* The retry metadata of the rate limit that refused this request: which limit,
|
|
2707
|
+
* when to try again and, for a limit that publishes them, its counts. The same
|
|
2708
|
+
* `rateLimit` the host attaches to every other bridge error reply.
|
|
2709
|
+
*
|
|
2710
|
+
* Set on a `failed` snapshot the host built from a rate-limited refusal (an
|
|
2711
|
+
* estimate, submit or cancel the limit turned away), and on a
|
|
2712
|
+
* {@link BlockWorkflowSnapshot.throttled} reply when a rate limit shed the poll
|
|
2713
|
+
* or cancel. Absent on every other snapshot, and on a host that predates the
|
|
2714
|
+
* field — so its absence never means "not rate-limited" on an older host.
|
|
2715
|
+
*
|
|
2716
|
+
* `@civitai/blocks-react` drops a malformed value and copies it onto the error
|
|
2717
|
+
* the workflow hook rejects with (`err.rateLimit`).
|
|
2718
|
+
*/
|
|
2719
|
+
rateLimit?: RateLimitMeta;
|
|
2720
|
+
}
|
|
2721
|
+
/**
|
|
2722
|
+
* Retry metadata the host attaches to a rate-limit refusal (Civitai's standard
|
|
2723
|
+
* `rateLimit`), so an app renders the wait instead of parsing it out of a
|
|
2724
|
+
* message. The same shape as `BridgeError.rateLimit` in `@civitai/sdk`.
|
|
2725
|
+
*/
|
|
2726
|
+
export interface RateLimitMeta {
|
|
2727
|
+
/** Whole seconds until the call may be tried again; at least 1. */
|
|
2728
|
+
retryAfterSeconds: number;
|
|
2729
|
+
/** ISO-8601 instant at which the call may be tried again. */
|
|
2730
|
+
retryAt: string;
|
|
2731
|
+
/** Stable id of the refusing limit, e.g. `apps.submit`. */
|
|
2732
|
+
id?: string;
|
|
2733
|
+
/**
|
|
2734
|
+
* `product`: an allowance the viewer may see and buy more of. `abuse`: an
|
|
2735
|
+
* anti-flood or money/safety bound. Informational: an abuse limit can carry
|
|
2736
|
+
* counts too.
|
|
2737
|
+
*/
|
|
2738
|
+
kind?: 'product' | 'abuse';
|
|
2739
|
+
/** The counts below are sent only for a limit that publishes them. */
|
|
2740
|
+
limit?: number;
|
|
2741
|
+
/** Attempts in the window; can exceed `limit`. */
|
|
2742
|
+
used?: number;
|
|
2743
|
+
remaining?: number;
|
|
2744
|
+
windowSeconds?: number;
|
|
2745
|
+
/** ISO-8601 instant at which the whole window is clear. */
|
|
2746
|
+
resetAt?: string;
|
|
2705
2747
|
}
|
|
2706
2748
|
/** One entry of {@link BlockWorkflowSnapshot.steps}. */
|
|
2707
2749
|
export interface BlockWorkflowStepSnapshot {
|
|
@@ -3322,7 +3364,7 @@ export type BlockStorageSchemaType = 'object' | 'array' | 'string' | 'number' |
|
|
|
3322
3364
|
* checked. The server checks every create and put, and refuses a document that does not match
|
|
3323
3365
|
* with 400 `schema_violation`. The refusal's message and `details.pointer` name the FIRST
|
|
3324
3366
|
* failing JSON pointer into `data` (for example `/title`), and `details.keyword` names the
|
|
3325
|
-
* keyword it failed.
|
|
3367
|
+
* keyword it failed. Changing a schema does not re-check
|
|
3326
3368
|
* stored documents; each is checked the next time it is written.
|
|
3327
3369
|
*
|
|
3328
3370
|
* Only these keywords exist; any other is refused at submit by name. Semantics: a keyword for
|
|
@@ -3336,8 +3378,8 @@ export type BlockStorageSchemaType = 'object' | 'array' | 'string' | 'number' |
|
|
|
3336
3378
|
* bytes of JSON and 16 patterns per collection schema, and 32 patterns across all of the
|
|
3337
3379
|
* manifest's collection schemas together; a `pattern` is at most 256 characters,
|
|
3338
3380
|
* must compile, needs a `maxLength` of at most 1000 on the same schema, and must not backtrack
|
|
3339
|
-
* catastrophically; no `min*` above its `max*`. Not allowed on a `write: 'none'` collection
|
|
3340
|
-
*
|
|
3381
|
+
* catastrophically; no `min*` above its `max*`. Not allowed on a `write: 'none'` collection
|
|
3382
|
+
* (REMOVED: read-only, no document bodies are written there). Mirrors the canonical schema's
|
|
3341
3383
|
* `$defs.storageCollectionSchema`.
|
|
3342
3384
|
*/
|
|
3343
3385
|
export interface BlockStorageCollectionSchema {
|
|
@@ -3453,7 +3495,7 @@ export interface BlockStorageCollectionHook {
|
|
|
3453
3495
|
/**
|
|
3454
3496
|
* A PRIVATE collection — a separate key space per viewer, read and written
|
|
3455
3497
|
* only by that viewer. Carries none of the shared-only fields (`write`,
|
|
3456
|
-
* `counters
|
|
3498
|
+
* the removed `counters` and `marks`, `showAuthor`, `dailyWritesPerAuthor`,
|
|
3457
3499
|
* `ownedModelVersions`, `registry`, `keyedBy`); the canonical
|
|
3458
3500
|
* forbids them here. See {@link BlockStorageSharedCollectionDeclaration} for
|
|
3459
3501
|
* the fields both kinds share.
|
|
@@ -3496,30 +3538,44 @@ export interface BlockStorageSharedCollectionDeclaration {
|
|
|
3496
3538
|
* Who may create, update and delete documents.
|
|
3497
3539
|
*
|
|
3498
3540
|
* - `'own'` — eligible signed-in viewers create documents; only a document's
|
|
3499
|
-
* author updates or deletes it.
|
|
3500
|
-
*
|
|
3501
|
-
*
|
|
3502
|
-
*
|
|
3541
|
+
* author updates or deletes it. A vote, like or per-viewer entry is a
|
|
3542
|
+
* viewer-keyed `'own'` collection (`keyedBy`).
|
|
3543
|
+
* - `'none'` — REMOVED (it existed for counters, which were removed):
|
|
3544
|
+
* civitai.com refuses it on a collection that the app's previous approved
|
|
3545
|
+
* version did not already declare with `'none'`, and serves a collection
|
|
3546
|
+
* that keeps it READ-ONLY (nobody creates, updates or deletes its
|
|
3547
|
+
* documents). Use `'own'` with `keyedBy` (a viewer-keyed collection)
|
|
3548
|
+
* instead. Still typed so a manifest that already declares it compiles.
|
|
3503
3549
|
* - `'anyone'` — RESERVED (refused at submit until enabled): eligible
|
|
3504
3550
|
* signed-in viewers update or delete any document.
|
|
3505
3551
|
* - `'owner'` — RESERVED (refused at submit until enabled): only the app
|
|
3506
|
-
* owner writes documents
|
|
3552
|
+
* owner writes documents.
|
|
3507
3553
|
*
|
|
3508
|
-
* `'own'` and `'anyone'` require the `apps:storage:publish` scope.
|
|
3554
|
+
* `'own'` and `'anyone'` require the `apps:storage:publish` scope. Available
|
|
3555
|
+
* today: `'own'` (and `'none'` only where already declared, as above).
|
|
3509
3556
|
*/
|
|
3510
3557
|
write: 'own' | 'anyone' | 'owner' | 'none';
|
|
3511
3558
|
/**
|
|
3512
|
-
*
|
|
3513
|
-
* At most 8 distinct lowercase snake_case names (`^[a-z][a-z0-9_]{0,31}$`),
|
|
3514
|
-
*
|
|
3559
|
+
* Still typed so a manifest that already declares counters compiles; a declared one does
|
|
3560
|
+
* nothing. At most 8 distinct lowercase snake_case names (`^[a-z][a-z0-9_]{0,31}$`), never
|
|
3561
|
+
* `report`, and never a name also used by a mark.
|
|
3562
|
+
*
|
|
3563
|
+
* @deprecated REMOVED — use a viewer-keyed collection (`keyedBy`) instead. civitai.com serves
|
|
3564
|
+
* no counters: a declared one does nothing, and documents carry no counts. civitai.com refuses
|
|
3565
|
+
* a counter that the collection did not already declare in the app's previous approved
|
|
3566
|
+
* version; a collection may keep the counters it already declares (inert) or drop them.
|
|
3515
3567
|
*/
|
|
3516
3568
|
counters?: string[];
|
|
3517
3569
|
/**
|
|
3518
|
-
*
|
|
3519
|
-
*
|
|
3520
|
-
*
|
|
3521
|
-
*
|
|
3522
|
-
* collection
|
|
3570
|
+
* Still typed so a manifest that already declares marks compiles; a declared one does
|
|
3571
|
+
* nothing. At most 8 distinct lowercase snake_case names. `report` is reserved and must NOT
|
|
3572
|
+
* be declared.
|
|
3573
|
+
*
|
|
3574
|
+
* @deprecated REMOVED — use a viewer-keyed collection (`keyedBy`) instead: each viewer's own
|
|
3575
|
+
* document is their vote or entry. To report a document, use the moderation report API.
|
|
3576
|
+
* civitai.com serves no marks: a declared one does nothing. civitai.com refuses a mark that
|
|
3577
|
+
* the collection did not already declare in the app's previous approved version; a
|
|
3578
|
+
* collection may keep the marks it already declares (inert) or drop them.
|
|
3523
3579
|
*/
|
|
3524
3580
|
marks?: string[];
|
|
3525
3581
|
/** See {@link BlockStorageIndexes}. */
|
|
@@ -3588,8 +3644,9 @@ export interface BlockStorageSharedCollectionDeclaration {
|
|
|
3588
3644
|
*/
|
|
3589
3645
|
registry?: 'public';
|
|
3590
3646
|
/**
|
|
3591
|
-
* Viewer-keyed documents
|
|
3592
|
-
*
|
|
3647
|
+
* Viewer-keyed documents — what replaces the removed `counters` and `marks`: each viewer's
|
|
3648
|
+
* own document is their vote or entry, counted by listing. `write` `'own'` collections only,
|
|
3649
|
+
* never with `kind` `'log'`, and never beside the removed `counters` or `marks` — the canonical
|
|
3593
3650
|
* refuses it under `'anyone'`, `'owner'` and `'none'`, on log and private
|
|
3594
3651
|
* collections, and with either of those fields.
|
|
3595
3652
|
*
|
|
@@ -3610,13 +3667,13 @@ export interface BlockStorageSharedCollectionDeclaration {
|
|
|
3610
3667
|
keyedBy?: 'viewer' | 'parent+viewer';
|
|
3611
3668
|
/**
|
|
3612
3669
|
* The schema every document's `data` must match — see {@link BlockStorageCollectionSchema}.
|
|
3613
|
-
* Not allowed with `write` `'none'` (no document bodies are written there).
|
|
3670
|
+
* Not allowed with the removed `write` `'none'` (no document bodies are written there).
|
|
3614
3671
|
*/
|
|
3615
3672
|
schema?: BlockStorageCollectionSchema;
|
|
3616
3673
|
/**
|
|
3617
3674
|
* 1 to 32 ops applied to the documents ALREADY STORED when this version is approved, for a
|
|
3618
3675
|
* `schema` change that would otherwise leave them unwritable — see
|
|
3619
|
-
* {@link BlockStorageMigrationOp}. Not allowed with `write` `'none'`.
|
|
3676
|
+
* {@link BlockStorageMigrationOp}. Not allowed with the removed `write` `'none'`.
|
|
3620
3677
|
*/
|
|
3621
3678
|
migrations?: BlockStorageMigrationOp[];
|
|
3622
3679
|
/**
|
|
@@ -3657,9 +3714,9 @@ export interface BlockStorageImport {
|
|
|
3657
3714
|
/** 1 to 16 distinct names of collections the source declares. */
|
|
3658
3715
|
collections: string[];
|
|
3659
3716
|
/**
|
|
3660
|
-
* `'read'`: reads only; every write
|
|
3661
|
-
* `'readwrite'`: also writes, under the source collection's own write policy. A write
|
|
3662
|
-
*
|
|
3717
|
+
* `'read'`: reads only; every write and report is refused (`write_policy`).
|
|
3718
|
+
* `'readwrite'`: also writes, under the source collection's own write policy. A write
|
|
3719
|
+
* or report in one of the source's SHARED collections also needs the viewer's own
|
|
3663
3720
|
* `apps:storage:publish` grant IN THE SOURCE APP; a private collection needs only the
|
|
3664
3721
|
* import grant.
|
|
3665
3722
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
*
|
|
26
26
|
* - **`./blocks`** — importing it RUNS `./safe-storage` for its side effect
|
|
27
27
|
* (repairing `localStorage`/`sessionStorage` at an opaque origin). Folding
|
|
28
|
-
*
|
|
28
|
+
* 245 symbols and that side effect into the root would make every OAuth app
|
|
29
29
|
* that writes `import { exchangeCode } from '@civitai/app-sdk'` pay for the
|
|
30
30
|
* Civitai-Apps contract it does not use. Blocks and OAuth apps are disjoint
|
|
31
31
|
* audiences; see this package's README.
|
|
32
|
-
* 🔴 That
|
|
32
|
+
* 🔴 That 245 is ASSERTED, not merely quoted — by
|
|
33
33
|
* `packages/civitai-app-sdk/test/export-surface.test.ts`, which pins
|
|
34
34
|
* `surface.get('./blocks').size`. It said 119 here against a real 125 until
|
|
35
35
|
* 2026-10-04, because the existing checks pin the root as an exact union and
|
package/dist/index.js
CHANGED
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
*
|
|
26
26
|
* - **`./blocks`** — importing it RUNS `./safe-storage` for its side effect
|
|
27
27
|
* (repairing `localStorage`/`sessionStorage` at an opaque origin). Folding
|
|
28
|
-
*
|
|
28
|
+
* 245 symbols and that side effect into the root would make every OAuth app
|
|
29
29
|
* that writes `import { exchangeCode } from '@civitai/app-sdk'` pay for the
|
|
30
30
|
* Civitai-Apps contract it does not use. Blocks and OAuth apps are disjoint
|
|
31
31
|
* audiences; see this package's README.
|
|
32
|
-
* 🔴 That
|
|
32
|
+
* 🔴 That 245 is ASSERTED, not merely quoted — by
|
|
33
33
|
* `packages/civitai-app-sdk/test/export-surface.test.ts`, which pins
|
|
34
34
|
* `surface.get('./blocks').size`. It said 119 here against a real 125 until
|
|
35
35
|
* 2026-10-04, because the existing checks pin the root as an exact union and
|
|
@@ -148,7 +148,10 @@ export const KNOWN_GAPS = {
|
|
|
148
148
|
'"own" or "anyone") also requires `apps:storage:publish`, declaring `imports` requires ' +
|
|
149
149
|
'`apps:storage:import` (and `apps:storage`), requesting any of these scopes with nothing for ' +
|
|
150
150
|
'it to reach is rejected, an import never names this app itself and names each source at ' +
|
|
151
|
-
'most once, a counter may not share a name with a mark, and
|
|
151
|
+
'most once, a counter may not share a name with a mark, `counters`, `marks` and `write` ' +
|
|
152
|
+
'"none" are REMOVED (civitai.com serves none of them and refuses one a collection did not ' +
|
|
153
|
+
'already declare in the app\'s previous approved version; use a viewer-keyed collection, ' +
|
|
154
|
+
'`keyedBy`, instead), and the ' +
|
|
152
155
|
'RESERVED features (`kind` "log", `ttlSeconds`, `dailyWritesPerAuthor`, `registry`, ' +
|
|
153
156
|
'`write` "anyone" / "owner") validate offline and are refused at submit. A new or changed ' +
|
|
154
157
|
'`hook` is in a limited rollout: it validates offline and is refused at submit for an author ' +
|
|
@@ -175,7 +178,7 @@ export const KNOWN_GAPS = {
|
|
|
175
178
|
'fields. All of those validate here.',
|
|
176
179
|
'storage-keyedBy-immutable': 'A collection\'s `keyedBy` (viewer-keyed documents): the canonical encodes its values ' +
|
|
177
180
|
'("viewer" / "parent+viewer") and where it may appear — shared `write` "own" collections ' +
|
|
178
|
-
'only, never `kind` "log", never beside `counters` or `marks` — and Ajv enforces those ' +
|
|
181
|
+
'only, never `kind` "log", never beside the removed `counters` or `marks` — and Ajv enforces those ' +
|
|
179
182
|
'exactly. That it cannot be added, removed or changed on a collection ANY previously ' +
|
|
180
183
|
'approved version declared needs those approved manifests, so it is decided by the server at ' +
|
|
181
184
|
'submit. A change to it validates here.',
|
package/package.json
CHANGED
|
@@ -442,12 +442,13 @@
|
|
|
442
442
|
},
|
|
443
443
|
"write": {
|
|
444
444
|
"type": "string",
|
|
445
|
-
"description": "Shared collections only, and REQUIRED on them. Who may create, update and delete documents. \"own\": eligible signed-in viewers create documents, and only a document's author updates or deletes it. \"anyone\": eligible signed-in viewers may update or delete any document — RESERVED: civitai.com refuses \"anyone\" until it is enabled. \"none\"
|
|
445
|
+
"description": "Shared collections only, and REQUIRED on them. Who may create, update and delete documents. \"own\": eligible signed-in viewers create documents, and only a document's author updates or deletes it. \"anyone\": eligible signed-in viewers may update or delete any document — RESERVED: civitai.com refuses \"anyone\" until it is enabled. \"none\" is REMOVED (it existed for counters, which were removed): civitai.com refuses it on a collection that the app's previous approved version did not already declare with \"none\", and serves a collection that keeps it READ-ONLY (nobody creates, updates or deletes its documents). Use \"own\" with `keyedBy` (a viewer-keyed collection) instead. \"owner\": only the app owner writes documents. Only \"own\" and \"anyone\" require the `apps:storage:publish` scope. RESERVED: civitai.com refuses \"owner\" until owner-written documents are enabled. Available today: \"own\" (and \"none\" only where already declared, as above).",
|
|
446
446
|
"enum": ["own", "anyone", "owner", "none"]
|
|
447
447
|
},
|
|
448
448
|
"counters": {
|
|
449
449
|
"type": "array",
|
|
450
|
-
"
|
|
450
|
+
"deprecated": true,
|
|
451
|
+
"description": "REMOVED — use a viewer-keyed collection (`keyedBy`) instead. civitai.com serves no counters: a declared one does nothing, and documents carry no counts. civitai.com refuses a counter that the collection did not already declare in the app's previous approved version; a collection may keep the counters it already declares (inert) or drop them. Shared collections only. At most 8 distinct names, each lowercase snake_case: a letter, then up to 31 of a-z, 0-9 or _. A counter may not share a name with a mark on the same collection, or with the reserved `report` name.",
|
|
451
452
|
"maxItems": 8,
|
|
452
453
|
"uniqueItems": true,
|
|
453
454
|
"items": {
|
|
@@ -458,7 +459,8 @@
|
|
|
458
459
|
},
|
|
459
460
|
"marks": {
|
|
460
461
|
"type": "array",
|
|
461
|
-
"
|
|
462
|
+
"deprecated": true,
|
|
463
|
+
"description": "REMOVED — use a viewer-keyed collection (`keyedBy`) instead: each viewer's own document is their vote or entry. To report a document, use the moderation report API. civitai.com serves no marks: a declared one does nothing. civitai.com refuses a mark that the collection did not already declare in the app's previous approved version; a collection may keep the marks it already declares (inert) or drop them. Shared collections only. At most 8 distinct names, each lowercase snake_case: a letter, then up to 31 of a-z, 0-9 or _. `report` is reserved and must NOT be declared. A mark may not share a name with a counter on the same collection.",
|
|
462
464
|
"maxItems": 8,
|
|
463
465
|
"uniqueItems": true,
|
|
464
466
|
"items": {
|