pixelkiln 0.40.0 → 0.41.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/cli.js +102 -7
- package/dist/cli.js.map +1 -1
- package/dist/client/gallery.css +1 -0
- package/dist/client/gallery.js +39 -0
- package/dist/index.cjs +114 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +114 -7
- package/dist/index.js.map +1 -1
- package/docs/CLI.md +11 -6
- package/docs/ENDPOINTS.md +7 -0
- package/docs/GENERATORS.md +4 -1
- package/docs/PIXELLAB.md +7 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -346,6 +346,21 @@ interface Provider {
|
|
|
346
346
|
listCharacters?(): AsyncGenerator<RemoteCharacter>;
|
|
347
347
|
/** One character with its rotations and animations. */
|
|
348
348
|
getCharacter?(id: string): Promise<RemoteCharacterDetail>;
|
|
349
|
+
/**
|
|
350
|
+
* The object's source URLs as the service hands them out now, for
|
|
351
|
+
* `fetch --refresh` when recorded URLs go stale (PixelLab stamps a
|
|
352
|
+
* character's rotation URLs with its last edit time, and a cache may keep
|
|
353
|
+
* serving an old stamp's bytes). Resolve `null` when the object is gone
|
|
354
|
+
* upstream and `undefined` for objects whose recorded URLs stay good.
|
|
355
|
+
*/
|
|
356
|
+
refreshSources?(objectId: string, context: RefreshContext): Promise<OutputSource[] | null | undefined>;
|
|
357
|
+
}
|
|
358
|
+
interface RefreshContext {
|
|
359
|
+
generator: Generator;
|
|
360
|
+
/** What the adapter recorded for this entry, under its own namespace. */
|
|
361
|
+
metadata?: ProviderMetadata;
|
|
362
|
+
/** The URLs the lockfile holds, in output order. */
|
|
363
|
+
sources: OutputSource[];
|
|
349
364
|
}
|
|
350
365
|
declare class UnsupportedCapabilityError extends PixelKilnError {
|
|
351
366
|
constructor(providerId: string, capability: string);
|
|
@@ -6744,6 +6759,12 @@ declare class PixelLabProvider implements Provider {
|
|
|
6744
6759
|
delete(assetId: string): Promise<void>;
|
|
6745
6760
|
listCharacters(): AsyncGenerator<RemoteCharacter>;
|
|
6746
6761
|
getCharacter(id: string): Promise<RemoteCharacterDetail>;
|
|
6762
|
+
/**
|
|
6763
|
+
* A character's rotation and frame URLs carry its last edit time as a
|
|
6764
|
+
* cache-buster, so the record's URLs can name bytes a cache still holds
|
|
6765
|
+
* after an edit in PixelLab's editor. Objects keep stable URLs.
|
|
6766
|
+
*/
|
|
6767
|
+
refreshSources(objectId: string, context: RefreshContext): Promise<OutputSource[] | null | undefined>;
|
|
6747
6768
|
}
|
|
6748
6769
|
|
|
6749
6770
|
interface RetroDiffusionOptions {
|
|
@@ -7057,6 +7078,8 @@ declare class FakeProvider implements Provider {
|
|
|
7057
7078
|
private listImpl;
|
|
7058
7079
|
listCharacters(): AsyncGenerator<RemoteCharacter>;
|
|
7059
7080
|
getCharacter(id: string): Promise<RemoteCharacterDetail>;
|
|
7081
|
+
/** Characters answer with whatever the store holds now; other objects keep their URLs. */
|
|
7082
|
+
refreshSources(objectId: string, context: RefreshContext): Promise<OutputSource[] | null | undefined>;
|
|
7060
7083
|
delete(assetId: string): Promise<void>;
|
|
7061
7084
|
/** Seed a pre-existing remote asset, for adopt / salvage tests. */
|
|
7062
7085
|
seed(asset: Partial<RemoteAsset> & {
|
|
@@ -10258,6 +10281,8 @@ interface GalleryItem {
|
|
|
10258
10281
|
revision: LockEntry["revision"];
|
|
10259
10282
|
/** Parent lock key for a revision, so the page can link lineage. */
|
|
10260
10283
|
revisionParentKey: string | null;
|
|
10284
|
+
/** A character family member: what it is, whose it is, and what PixelLab holds for it. */
|
|
10285
|
+
character: GalleryCharacter | null;
|
|
10261
10286
|
outputs: GalleryOutput[];
|
|
10262
10287
|
quality: GalleryQuality | null;
|
|
10263
10288
|
providerMetadata: Record<string, unknown>;
|
|
@@ -10297,6 +10322,17 @@ interface GalleryItem {
|
|
|
10297
10322
|
tags: string[];
|
|
10298
10323
|
category: string | null;
|
|
10299
10324
|
}
|
|
10325
|
+
interface GalleryCharacter {
|
|
10326
|
+
kind: "base" | "state" | "animation";
|
|
10327
|
+
/** Lock key of the base or state this is drawn from; null for a base. */
|
|
10328
|
+
parentKey: string | null;
|
|
10329
|
+
mode: string;
|
|
10330
|
+
directions: number;
|
|
10331
|
+
/** Animations only. */
|
|
10332
|
+
direction: string | null;
|
|
10333
|
+
/** Provider-side character id (an animation's is its character's). */
|
|
10334
|
+
characterId: string | null;
|
|
10335
|
+
}
|
|
10300
10336
|
interface GalleryStyle {
|
|
10301
10337
|
id: string;
|
|
10302
10338
|
/** Workspace project id, or null for a single-project gallery. */
|
|
@@ -10315,6 +10351,12 @@ interface GalleryStyle {
|
|
|
10315
10351
|
/** Strip the generated background (sent for pixflux and non-PixelLab providers). */
|
|
10316
10352
|
noBackground: boolean;
|
|
10317
10353
|
quality: boolean;
|
|
10354
|
+
/** Family counts for a `character` style; null otherwise. */
|
|
10355
|
+
characters: {
|
|
10356
|
+
bases: number;
|
|
10357
|
+
states: number;
|
|
10358
|
+
animations: number;
|
|
10359
|
+
} | null;
|
|
10318
10360
|
tags: string[];
|
|
10319
10361
|
/** Parent style id when this style `extends` one. */
|
|
10320
10362
|
extends: string | null;
|
|
@@ -11738,4 +11780,4 @@ interface WorkspaceStatusReport {
|
|
|
11738
11780
|
*/
|
|
11739
11781
|
declare function workspaceStatus(ws: Workspace, dir: string): Promise<WorkspaceStatusReport>;
|
|
11740
11782
|
|
|
11741
|
-
export { type AdoptResult, type ApproveQualityOptions, type ApprovedQualityReview, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterState, CharacterStateSchema, type ComfyUIBinding, type ComfyUIBindings, type ComfyUIFramesOptions, type ComfyUIImageInput, type ComfyUIOptions, ComfyUIProvider, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_HISTORY_LIMIT, DEFAULT_QUALITY_TOLERANCES, DEFAULT_RATE_LIMIT, DEFAULT_TIMEOUT_MS, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, EDITOR_PIN, EDITOR_RELEASE_BASE, EXIT_CODES, EditorInstallError, type EditorInstallOptions, type EditorInstallProgress, type EditorInstallResult, type EditorInstallStatus, type EditorPin, type ErrorCode, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type GalleryBuild, type GalleryEditHandlerOptions, type GalleryEditMeta, type GalleryEditorHandlers, type GalleryEditorOptions, type GalleryEditorStatus, type GalleryGenerateHandlers, type GalleryGeneration, type GalleryItem, type GalleryMedia, type GalleryOutput, type GalleryProject, type GalleryProjectContext, type GalleryQuality, type GalleryServer, type GalleryServerOptions, type GallerySnapshot, type GalleryState, type GalleryStyle, type GenerateHandlerOptions, type GenerateJob, type GeneratePhase, GenerateRequestError, GenerateRequestSchema, type GenerateStatus, type Generator, GeneratorSchema, type GenericTileset, type GridConfidence, GridConfidenceSchema, HAND_EDIT_DIR, HISTORY_ENV, type HandEditCompanion, HandEditCompanionSchema, type HandEditMember, type HandEditSave, type HandEditSaveInput, type HandEditStart, type HandEditStatus, type HistoryPick, type ImageQualityMetrics, ImageQualityMetricsSchema, InheritedStyleSchema, type InstallRecipeOptions, type InstallRecipeResult, type JobState, type LoadedManifest, type LoadedRecipe, type Lock, type LockEntry, LockEntrySchema, type LockHistoryEntry, LockHistoryEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_HAND_EDIT_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type OpenProjectOptions, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, OverwriteRefusedError, PIXEL_ART_FIXER_REVISION, PIXEL_ART_FIXER_URL, type PackedFrame, type PackedSheet, type PackedSource, type PendingQualityReview, type PickResult, type PixelArtFixerDetection, PixelKilnError, type PixelKilnErrorOptions, type PixelLabCharacter, type PixelLabCharacterAnimation, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type PixelLabUsage, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type Postprocess, PostprocessSchema, type PrepareReviewOptions, type Project, ProjectError, type Provider, ProviderError, type ProviderFactory, type ProviderInputContext, type ProviderInputScalar, type ProviderInputValue, type ProviderMetadata, type ProviderMode, type ProviderOptionContext, type ProviderSubmission, type QualityBaseline, QualityBaselineSchema, type QualityCheck, type QualityProfile, type QualityProfileInspection, QualityProfileSchema, type QualityProfileState, type QualityRegressionCaseResult, type QualityRegressionReport, type QualitySnapshotResult, QualityToleranceSchema, type QualityTolerances, type RateLimit, type Recipe, type RecipeFileVerification, type RecipeModelVerification, RecipeSchema, type RecipeVerification, type RefineAudit, type RefineFrameSetOptions, type RefineFrameSetResult, type RefineOptions, type RefineQualityProfilesOptions, type RefineQualityProfilesResult, type RefineRecordOptions, type RefineResult, type RemoteAsset, type RemoteCharacter, type RemoteCharacterDetail, type RemoteHashCacheHealth, type RenderGalleryOptions, type RenderSheetOptions, type ResolvedCharacter, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedRevision, type ResolvedSpec, type ResolvedStyleImage, type ResumeAction, type ResumeCommand, type RetroDiffusionOptions, RetroDiffusionProvider, type RetryInit, type RetryOptions, type RetryingFetch, type RevertOptions, type RevertResult, type ReviewReadyInfo, type ReviewSession, type Revision, type RevisionMode, RevisionModeSchema, type RevisionReadiness, RevisionSchema, SHEET_FORMATS, type SalvageAction, type SalvageResult, type ScannedAsset, type ScenarioOptions, ScenarioProvider, type SessionBudget, type SheetAtlas, type SheetFormat, type SheetFormatOptions, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, type StyleInput, StyleInputSchema, StyleSchema, type SubmissionCheckpoint, type SubmitContext, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, UsageError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyManifestEdit, applyTags, approveQualityRecord, auditStyle, availableProviders, backoffMs, buildGallerySnapshot, buildManifest, buildPlan, buildWorkspaceGallerySnapshot, bundledRecipeRoot, cacheFileName, candidateCount, characterDirections, checkQualityBaseline, checkQualityRecord, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, createGalleryEditHandler, createGalleryEditorHandlers, createGenerateHandlers, createProvider, currentEntryOutputPath, currentOutputPath, defaultOpenCommand, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, formatCost, frameSetFps, galleryMediaId, galleryMediaRoute, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, providerCredentialEnvs, providerFactory, pushTags, qualityFrameOutputPath, qualityRecordPath, quantizeToPalette, readArtifactBundleManifest, readHandEditCompanion, readQualityBaseline, recipeDigest, referencedHashes, refineAsset, refineFrameSet, refineQualityProfiles, registerProvider, remove, renderAsepriteSheet, renderGallery, renderGodotSpriteFrames, renderSalvageSheet, renderSheet, renderSheetDocument, requireApprovedQualitySources, requireBalance, requireDelete, requireList, requireRevisionReady, requireSelectCandidate, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveQualityInputs, resolveRecipe, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, resumeActions, resumeCommandForStatus, retireGeneration, retryAfterMs, revertGeneration, runPicker, runSalvage, saveHandEdit, saveLock, saveWorkspace, scanAssets, selectEntryOutput, serveGallery, sha256, sha256File, shouldPersistSourceUrl, shouldRetry, slugify, snapshotQualityBaseline, sourceIsStem, sourceOutputPath, specHash, spendByUnit, startHandEdit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
|
11783
|
+
export { type AdoptResult, type ApproveQualityOptions, type ApprovedQualityReview, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterState, CharacterStateSchema, type ComfyUIBinding, type ComfyUIBindings, type ComfyUIFramesOptions, type ComfyUIImageInput, type ComfyUIOptions, ComfyUIProvider, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_HISTORY_LIMIT, DEFAULT_QUALITY_TOLERANCES, DEFAULT_RATE_LIMIT, DEFAULT_TIMEOUT_MS, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, EDITOR_PIN, EDITOR_RELEASE_BASE, EXIT_CODES, EditorInstallError, type EditorInstallOptions, type EditorInstallProgress, type EditorInstallResult, type EditorInstallStatus, type EditorPin, type ErrorCode, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type GalleryBuild, type GalleryEditHandlerOptions, type GalleryEditMeta, type GalleryEditorHandlers, type GalleryEditorOptions, type GalleryEditorStatus, type GalleryGenerateHandlers, type GalleryGeneration, type GalleryItem, type GalleryMedia, type GalleryOutput, type GalleryProject, type GalleryProjectContext, type GalleryQuality, type GalleryServer, type GalleryServerOptions, type GallerySnapshot, type GalleryState, type GalleryStyle, type GenerateHandlerOptions, type GenerateJob, type GeneratePhase, GenerateRequestError, GenerateRequestSchema, type GenerateStatus, type Generator, GeneratorSchema, type GenericTileset, type GridConfidence, GridConfidenceSchema, HAND_EDIT_DIR, HISTORY_ENV, type HandEditCompanion, HandEditCompanionSchema, type HandEditMember, type HandEditSave, type HandEditSaveInput, type HandEditStart, type HandEditStatus, type HistoryPick, type ImageQualityMetrics, ImageQualityMetricsSchema, InheritedStyleSchema, type InstallRecipeOptions, type InstallRecipeResult, type JobState, type LoadedManifest, type LoadedRecipe, type Lock, type LockEntry, LockEntrySchema, type LockHistoryEntry, LockHistoryEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_HAND_EDIT_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type OpenProjectOptions, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, OverwriteRefusedError, PIXEL_ART_FIXER_REVISION, PIXEL_ART_FIXER_URL, type PackedFrame, type PackedSheet, type PackedSource, type PendingQualityReview, type PickResult, type PixelArtFixerDetection, PixelKilnError, type PixelKilnErrorOptions, type PixelLabCharacter, type PixelLabCharacterAnimation, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type PixelLabUsage, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type Postprocess, PostprocessSchema, type PrepareReviewOptions, type Project, ProjectError, type Provider, ProviderError, type ProviderFactory, type ProviderInputContext, type ProviderInputScalar, type ProviderInputValue, type ProviderMetadata, type ProviderMode, type ProviderOptionContext, type ProviderSubmission, type QualityBaseline, QualityBaselineSchema, type QualityCheck, type QualityProfile, type QualityProfileInspection, QualityProfileSchema, type QualityProfileState, type QualityRegressionCaseResult, type QualityRegressionReport, type QualitySnapshotResult, QualityToleranceSchema, type QualityTolerances, type RateLimit, type Recipe, type RecipeFileVerification, type RecipeModelVerification, RecipeSchema, type RecipeVerification, type RefineAudit, type RefineFrameSetOptions, type RefineFrameSetResult, type RefineOptions, type RefineQualityProfilesOptions, type RefineQualityProfilesResult, type RefineRecordOptions, type RefineResult, type RefreshContext, type RemoteAsset, type RemoteCharacter, type RemoteCharacterDetail, type RemoteHashCacheHealth, type RenderGalleryOptions, type RenderSheetOptions, type ResolvedCharacter, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedRevision, type ResolvedSpec, type ResolvedStyleImage, type ResumeAction, type ResumeCommand, type RetroDiffusionOptions, RetroDiffusionProvider, type RetryInit, type RetryOptions, type RetryingFetch, type RevertOptions, type RevertResult, type ReviewReadyInfo, type ReviewSession, type Revision, type RevisionMode, RevisionModeSchema, type RevisionReadiness, RevisionSchema, SHEET_FORMATS, type SalvageAction, type SalvageResult, type ScannedAsset, type ScenarioOptions, ScenarioProvider, type SessionBudget, type SheetAtlas, type SheetFormat, type SheetFormatOptions, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, type StyleInput, StyleInputSchema, StyleSchema, type SubmissionCheckpoint, type SubmitContext, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, UsageError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyManifestEdit, applyTags, approveQualityRecord, auditStyle, availableProviders, backoffMs, buildGallerySnapshot, buildManifest, buildPlan, buildWorkspaceGallerySnapshot, bundledRecipeRoot, cacheFileName, candidateCount, characterDirections, checkQualityBaseline, checkQualityRecord, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, createGalleryEditHandler, createGalleryEditorHandlers, createGenerateHandlers, createProvider, currentEntryOutputPath, currentOutputPath, defaultOpenCommand, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, formatCost, frameSetFps, galleryMediaId, galleryMediaRoute, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, providerCredentialEnvs, providerFactory, pushTags, qualityFrameOutputPath, qualityRecordPath, quantizeToPalette, readArtifactBundleManifest, readHandEditCompanion, readQualityBaseline, recipeDigest, referencedHashes, refineAsset, refineFrameSet, refineQualityProfiles, registerProvider, remove, renderAsepriteSheet, renderGallery, renderGodotSpriteFrames, renderSalvageSheet, renderSheet, renderSheetDocument, requireApprovedQualitySources, requireBalance, requireDelete, requireList, requireRevisionReady, requireSelectCandidate, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveQualityInputs, resolveRecipe, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, resumeActions, resumeCommandForStatus, retireGeneration, retryAfterMs, revertGeneration, runPicker, runSalvage, saveHandEdit, saveLock, saveWorkspace, scanAssets, selectEntryOutput, serveGallery, sha256, sha256File, shouldPersistSourceUrl, shouldRetry, slugify, snapshotQualityBaseline, sourceIsStem, sourceOutputPath, specHash, spendByUnit, startHandEdit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
package/dist/index.d.ts
CHANGED
|
@@ -346,6 +346,21 @@ interface Provider {
|
|
|
346
346
|
listCharacters?(): AsyncGenerator<RemoteCharacter>;
|
|
347
347
|
/** One character with its rotations and animations. */
|
|
348
348
|
getCharacter?(id: string): Promise<RemoteCharacterDetail>;
|
|
349
|
+
/**
|
|
350
|
+
* The object's source URLs as the service hands them out now, for
|
|
351
|
+
* `fetch --refresh` when recorded URLs go stale (PixelLab stamps a
|
|
352
|
+
* character's rotation URLs with its last edit time, and a cache may keep
|
|
353
|
+
* serving an old stamp's bytes). Resolve `null` when the object is gone
|
|
354
|
+
* upstream and `undefined` for objects whose recorded URLs stay good.
|
|
355
|
+
*/
|
|
356
|
+
refreshSources?(objectId: string, context: RefreshContext): Promise<OutputSource[] | null | undefined>;
|
|
357
|
+
}
|
|
358
|
+
interface RefreshContext {
|
|
359
|
+
generator: Generator;
|
|
360
|
+
/** What the adapter recorded for this entry, under its own namespace. */
|
|
361
|
+
metadata?: ProviderMetadata;
|
|
362
|
+
/** The URLs the lockfile holds, in output order. */
|
|
363
|
+
sources: OutputSource[];
|
|
349
364
|
}
|
|
350
365
|
declare class UnsupportedCapabilityError extends PixelKilnError {
|
|
351
366
|
constructor(providerId: string, capability: string);
|
|
@@ -6744,6 +6759,12 @@ declare class PixelLabProvider implements Provider {
|
|
|
6744
6759
|
delete(assetId: string): Promise<void>;
|
|
6745
6760
|
listCharacters(): AsyncGenerator<RemoteCharacter>;
|
|
6746
6761
|
getCharacter(id: string): Promise<RemoteCharacterDetail>;
|
|
6762
|
+
/**
|
|
6763
|
+
* A character's rotation and frame URLs carry its last edit time as a
|
|
6764
|
+
* cache-buster, so the record's URLs can name bytes a cache still holds
|
|
6765
|
+
* after an edit in PixelLab's editor. Objects keep stable URLs.
|
|
6766
|
+
*/
|
|
6767
|
+
refreshSources(objectId: string, context: RefreshContext): Promise<OutputSource[] | null | undefined>;
|
|
6747
6768
|
}
|
|
6748
6769
|
|
|
6749
6770
|
interface RetroDiffusionOptions {
|
|
@@ -7057,6 +7078,8 @@ declare class FakeProvider implements Provider {
|
|
|
7057
7078
|
private listImpl;
|
|
7058
7079
|
listCharacters(): AsyncGenerator<RemoteCharacter>;
|
|
7059
7080
|
getCharacter(id: string): Promise<RemoteCharacterDetail>;
|
|
7081
|
+
/** Characters answer with whatever the store holds now; other objects keep their URLs. */
|
|
7082
|
+
refreshSources(objectId: string, context: RefreshContext): Promise<OutputSource[] | null | undefined>;
|
|
7060
7083
|
delete(assetId: string): Promise<void>;
|
|
7061
7084
|
/** Seed a pre-existing remote asset, for adopt / salvage tests. */
|
|
7062
7085
|
seed(asset: Partial<RemoteAsset> & {
|
|
@@ -10258,6 +10281,8 @@ interface GalleryItem {
|
|
|
10258
10281
|
revision: LockEntry["revision"];
|
|
10259
10282
|
/** Parent lock key for a revision, so the page can link lineage. */
|
|
10260
10283
|
revisionParentKey: string | null;
|
|
10284
|
+
/** A character family member: what it is, whose it is, and what PixelLab holds for it. */
|
|
10285
|
+
character: GalleryCharacter | null;
|
|
10261
10286
|
outputs: GalleryOutput[];
|
|
10262
10287
|
quality: GalleryQuality | null;
|
|
10263
10288
|
providerMetadata: Record<string, unknown>;
|
|
@@ -10297,6 +10322,17 @@ interface GalleryItem {
|
|
|
10297
10322
|
tags: string[];
|
|
10298
10323
|
category: string | null;
|
|
10299
10324
|
}
|
|
10325
|
+
interface GalleryCharacter {
|
|
10326
|
+
kind: "base" | "state" | "animation";
|
|
10327
|
+
/** Lock key of the base or state this is drawn from; null for a base. */
|
|
10328
|
+
parentKey: string | null;
|
|
10329
|
+
mode: string;
|
|
10330
|
+
directions: number;
|
|
10331
|
+
/** Animations only. */
|
|
10332
|
+
direction: string | null;
|
|
10333
|
+
/** Provider-side character id (an animation's is its character's). */
|
|
10334
|
+
characterId: string | null;
|
|
10335
|
+
}
|
|
10300
10336
|
interface GalleryStyle {
|
|
10301
10337
|
id: string;
|
|
10302
10338
|
/** Workspace project id, or null for a single-project gallery. */
|
|
@@ -10315,6 +10351,12 @@ interface GalleryStyle {
|
|
|
10315
10351
|
/** Strip the generated background (sent for pixflux and non-PixelLab providers). */
|
|
10316
10352
|
noBackground: boolean;
|
|
10317
10353
|
quality: boolean;
|
|
10354
|
+
/** Family counts for a `character` style; null otherwise. */
|
|
10355
|
+
characters: {
|
|
10356
|
+
bases: number;
|
|
10357
|
+
states: number;
|
|
10358
|
+
animations: number;
|
|
10359
|
+
} | null;
|
|
10318
10360
|
tags: string[];
|
|
10319
10361
|
/** Parent style id when this style `extends` one. */
|
|
10320
10362
|
extends: string | null;
|
|
@@ -11738,4 +11780,4 @@ interface WorkspaceStatusReport {
|
|
|
11738
11780
|
*/
|
|
11739
11781
|
declare function workspaceStatus(ws: Workspace, dir: string): Promise<WorkspaceStatusReport>;
|
|
11740
11782
|
|
|
11741
|
-
export { type AdoptResult, type ApproveQualityOptions, type ApprovedQualityReview, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterState, CharacterStateSchema, type ComfyUIBinding, type ComfyUIBindings, type ComfyUIFramesOptions, type ComfyUIImageInput, type ComfyUIOptions, ComfyUIProvider, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_HISTORY_LIMIT, DEFAULT_QUALITY_TOLERANCES, DEFAULT_RATE_LIMIT, DEFAULT_TIMEOUT_MS, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, EDITOR_PIN, EDITOR_RELEASE_BASE, EXIT_CODES, EditorInstallError, type EditorInstallOptions, type EditorInstallProgress, type EditorInstallResult, type EditorInstallStatus, type EditorPin, type ErrorCode, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type GalleryBuild, type GalleryEditHandlerOptions, type GalleryEditMeta, type GalleryEditorHandlers, type GalleryEditorOptions, type GalleryEditorStatus, type GalleryGenerateHandlers, type GalleryGeneration, type GalleryItem, type GalleryMedia, type GalleryOutput, type GalleryProject, type GalleryProjectContext, type GalleryQuality, type GalleryServer, type GalleryServerOptions, type GallerySnapshot, type GalleryState, type GalleryStyle, type GenerateHandlerOptions, type GenerateJob, type GeneratePhase, GenerateRequestError, GenerateRequestSchema, type GenerateStatus, type Generator, GeneratorSchema, type GenericTileset, type GridConfidence, GridConfidenceSchema, HAND_EDIT_DIR, HISTORY_ENV, type HandEditCompanion, HandEditCompanionSchema, type HandEditMember, type HandEditSave, type HandEditSaveInput, type HandEditStart, type HandEditStatus, type HistoryPick, type ImageQualityMetrics, ImageQualityMetricsSchema, InheritedStyleSchema, type InstallRecipeOptions, type InstallRecipeResult, type JobState, type LoadedManifest, type LoadedRecipe, type Lock, type LockEntry, LockEntrySchema, type LockHistoryEntry, LockHistoryEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_HAND_EDIT_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type OpenProjectOptions, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, OverwriteRefusedError, PIXEL_ART_FIXER_REVISION, PIXEL_ART_FIXER_URL, type PackedFrame, type PackedSheet, type PackedSource, type PendingQualityReview, type PickResult, type PixelArtFixerDetection, PixelKilnError, type PixelKilnErrorOptions, type PixelLabCharacter, type PixelLabCharacterAnimation, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type PixelLabUsage, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type Postprocess, PostprocessSchema, type PrepareReviewOptions, type Project, ProjectError, type Provider, ProviderError, type ProviderFactory, type ProviderInputContext, type ProviderInputScalar, type ProviderInputValue, type ProviderMetadata, type ProviderMode, type ProviderOptionContext, type ProviderSubmission, type QualityBaseline, QualityBaselineSchema, type QualityCheck, type QualityProfile, type QualityProfileInspection, QualityProfileSchema, type QualityProfileState, type QualityRegressionCaseResult, type QualityRegressionReport, type QualitySnapshotResult, QualityToleranceSchema, type QualityTolerances, type RateLimit, type Recipe, type RecipeFileVerification, type RecipeModelVerification, RecipeSchema, type RecipeVerification, type RefineAudit, type RefineFrameSetOptions, type RefineFrameSetResult, type RefineOptions, type RefineQualityProfilesOptions, type RefineQualityProfilesResult, type RefineRecordOptions, type RefineResult, type RemoteAsset, type RemoteCharacter, type RemoteCharacterDetail, type RemoteHashCacheHealth, type RenderGalleryOptions, type RenderSheetOptions, type ResolvedCharacter, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedRevision, type ResolvedSpec, type ResolvedStyleImage, type ResumeAction, type ResumeCommand, type RetroDiffusionOptions, RetroDiffusionProvider, type RetryInit, type RetryOptions, type RetryingFetch, type RevertOptions, type RevertResult, type ReviewReadyInfo, type ReviewSession, type Revision, type RevisionMode, RevisionModeSchema, type RevisionReadiness, RevisionSchema, SHEET_FORMATS, type SalvageAction, type SalvageResult, type ScannedAsset, type ScenarioOptions, ScenarioProvider, type SessionBudget, type SheetAtlas, type SheetFormat, type SheetFormatOptions, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, type StyleInput, StyleInputSchema, StyleSchema, type SubmissionCheckpoint, type SubmitContext, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, UsageError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyManifestEdit, applyTags, approveQualityRecord, auditStyle, availableProviders, backoffMs, buildGallerySnapshot, buildManifest, buildPlan, buildWorkspaceGallerySnapshot, bundledRecipeRoot, cacheFileName, candidateCount, characterDirections, checkQualityBaseline, checkQualityRecord, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, createGalleryEditHandler, createGalleryEditorHandlers, createGenerateHandlers, createProvider, currentEntryOutputPath, currentOutputPath, defaultOpenCommand, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, formatCost, frameSetFps, galleryMediaId, galleryMediaRoute, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, providerCredentialEnvs, providerFactory, pushTags, qualityFrameOutputPath, qualityRecordPath, quantizeToPalette, readArtifactBundleManifest, readHandEditCompanion, readQualityBaseline, recipeDigest, referencedHashes, refineAsset, refineFrameSet, refineQualityProfiles, registerProvider, remove, renderAsepriteSheet, renderGallery, renderGodotSpriteFrames, renderSalvageSheet, renderSheet, renderSheetDocument, requireApprovedQualitySources, requireBalance, requireDelete, requireList, requireRevisionReady, requireSelectCandidate, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveQualityInputs, resolveRecipe, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, resumeActions, resumeCommandForStatus, retireGeneration, retryAfterMs, revertGeneration, runPicker, runSalvage, saveHandEdit, saveLock, saveWorkspace, scanAssets, selectEntryOutput, serveGallery, sha256, sha256File, shouldPersistSourceUrl, shouldRetry, slugify, snapshotQualityBaseline, sourceIsStem, sourceOutputPath, specHash, spendByUnit, startHandEdit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
|
11783
|
+
export { type AdoptResult, type ApproveQualityOptions, type ApprovedQualityReview, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterState, CharacterStateSchema, type ComfyUIBinding, type ComfyUIBindings, type ComfyUIFramesOptions, type ComfyUIImageInput, type ComfyUIOptions, ComfyUIProvider, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_HISTORY_LIMIT, DEFAULT_QUALITY_TOLERANCES, DEFAULT_RATE_LIMIT, DEFAULT_TIMEOUT_MS, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, EDITOR_PIN, EDITOR_RELEASE_BASE, EXIT_CODES, EditorInstallError, type EditorInstallOptions, type EditorInstallProgress, type EditorInstallResult, type EditorInstallStatus, type EditorPin, type ErrorCode, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type GalleryBuild, type GalleryEditHandlerOptions, type GalleryEditMeta, type GalleryEditorHandlers, type GalleryEditorOptions, type GalleryEditorStatus, type GalleryGenerateHandlers, type GalleryGeneration, type GalleryItem, type GalleryMedia, type GalleryOutput, type GalleryProject, type GalleryProjectContext, type GalleryQuality, type GalleryServer, type GalleryServerOptions, type GallerySnapshot, type GalleryState, type GalleryStyle, type GenerateHandlerOptions, type GenerateJob, type GeneratePhase, GenerateRequestError, GenerateRequestSchema, type GenerateStatus, type Generator, GeneratorSchema, type GenericTileset, type GridConfidence, GridConfidenceSchema, HAND_EDIT_DIR, HISTORY_ENV, type HandEditCompanion, HandEditCompanionSchema, type HandEditMember, type HandEditSave, type HandEditSaveInput, type HandEditStart, type HandEditStatus, type HistoryPick, type ImageQualityMetrics, ImageQualityMetricsSchema, InheritedStyleSchema, type InstallRecipeOptions, type InstallRecipeResult, type JobState, type LoadedManifest, type LoadedRecipe, type Lock, type LockEntry, LockEntrySchema, type LockHistoryEntry, LockHistoryEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_HAND_EDIT_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type OpenProjectOptions, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, OverwriteRefusedError, PIXEL_ART_FIXER_REVISION, PIXEL_ART_FIXER_URL, type PackedFrame, type PackedSheet, type PackedSource, type PendingQualityReview, type PickResult, type PixelArtFixerDetection, PixelKilnError, type PixelKilnErrorOptions, type PixelLabCharacter, type PixelLabCharacterAnimation, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type PixelLabUsage, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type Postprocess, PostprocessSchema, type PrepareReviewOptions, type Project, ProjectError, type Provider, ProviderError, type ProviderFactory, type ProviderInputContext, type ProviderInputScalar, type ProviderInputValue, type ProviderMetadata, type ProviderMode, type ProviderOptionContext, type ProviderSubmission, type QualityBaseline, QualityBaselineSchema, type QualityCheck, type QualityProfile, type QualityProfileInspection, QualityProfileSchema, type QualityProfileState, type QualityRegressionCaseResult, type QualityRegressionReport, type QualitySnapshotResult, QualityToleranceSchema, type QualityTolerances, type RateLimit, type Recipe, type RecipeFileVerification, type RecipeModelVerification, RecipeSchema, type RecipeVerification, type RefineAudit, type RefineFrameSetOptions, type RefineFrameSetResult, type RefineOptions, type RefineQualityProfilesOptions, type RefineQualityProfilesResult, type RefineRecordOptions, type RefineResult, type RefreshContext, type RemoteAsset, type RemoteCharacter, type RemoteCharacterDetail, type RemoteHashCacheHealth, type RenderGalleryOptions, type RenderSheetOptions, type ResolvedCharacter, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedRevision, type ResolvedSpec, type ResolvedStyleImage, type ResumeAction, type ResumeCommand, type RetroDiffusionOptions, RetroDiffusionProvider, type RetryInit, type RetryOptions, type RetryingFetch, type RevertOptions, type RevertResult, type ReviewReadyInfo, type ReviewSession, type Revision, type RevisionMode, RevisionModeSchema, type RevisionReadiness, RevisionSchema, SHEET_FORMATS, type SalvageAction, type SalvageResult, type ScannedAsset, type ScenarioOptions, ScenarioProvider, type SessionBudget, type SheetAtlas, type SheetFormat, type SheetFormatOptions, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, type StyleInput, StyleInputSchema, StyleSchema, type SubmissionCheckpoint, type SubmitContext, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, UsageError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyManifestEdit, applyTags, approveQualityRecord, auditStyle, availableProviders, backoffMs, buildGallerySnapshot, buildManifest, buildPlan, buildWorkspaceGallerySnapshot, bundledRecipeRoot, cacheFileName, candidateCount, characterDirections, checkQualityBaseline, checkQualityRecord, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, createGalleryEditHandler, createGalleryEditorHandlers, createGenerateHandlers, createProvider, currentEntryOutputPath, currentOutputPath, defaultOpenCommand, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, formatCost, frameSetFps, galleryMediaId, galleryMediaRoute, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, providerCredentialEnvs, providerFactory, pushTags, qualityFrameOutputPath, qualityRecordPath, quantizeToPalette, readArtifactBundleManifest, readHandEditCompanion, readQualityBaseline, recipeDigest, referencedHashes, refineAsset, refineFrameSet, refineQualityProfiles, registerProvider, remove, renderAsepriteSheet, renderGallery, renderGodotSpriteFrames, renderSalvageSheet, renderSheet, renderSheetDocument, requireApprovedQualitySources, requireBalance, requireDelete, requireList, requireRevisionReady, requireSelectCandidate, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveQualityInputs, resolveRecipe, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, resumeActions, resumeCommandForStatus, retireGeneration, retryAfterMs, revertGeneration, runPicker, runSalvage, saveHandEdit, saveLock, saveWorkspace, scanAssets, selectEntryOutput, serveGallery, sha256, sha256File, shouldPersistSourceUrl, shouldRetry, slugify, snapshotQualityBaseline, sourceIsStem, sourceOutputPath, specHash, spendByUnit, startHandEdit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
package/dist/index.js
CHANGED
|
@@ -2002,12 +2002,7 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
2002
2002
|
const character = await this.client.getCharacter(jobId);
|
|
2003
2003
|
if (character.status === "failed") return { status: "failed", error: "character generation failed upstream" };
|
|
2004
2004
|
if (character.status !== "completed" || !character.rotation_urls) return { status: "processing" };
|
|
2005
|
-
const
|
|
2006
|
-
const sources = [];
|
|
2007
|
-
for (const direction of order) {
|
|
2008
|
-
const url = character.rotation_urls[direction];
|
|
2009
|
-
if (url) sources.push({ url, role: direction });
|
|
2010
|
-
}
|
|
2005
|
+
const sources = rotationSources(character);
|
|
2011
2006
|
if (!sources.length) return { status: "failed", error: "character completed with no rotation images" };
|
|
2012
2007
|
return {
|
|
2013
2008
|
status: "ready",
|
|
@@ -2299,6 +2294,27 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
2299
2294
|
})))
|
|
2300
2295
|
};
|
|
2301
2296
|
}
|
|
2297
|
+
/**
|
|
2298
|
+
* A character's rotation and frame URLs carry its last edit time as a
|
|
2299
|
+
* cache-buster, so the record's URLs can name bytes a cache still holds
|
|
2300
|
+
* after an edit in PixelLab's editor. Objects keep stable URLs.
|
|
2301
|
+
*/
|
|
2302
|
+
async refreshSources(objectId, context) {
|
|
2303
|
+
if (context.generator !== "character") return void 0;
|
|
2304
|
+
const [characterId, groupId] = objectId.split("#");
|
|
2305
|
+
const character = await this.client.getCharacter(characterId).catch((err) => {
|
|
2306
|
+
if (err instanceof PixelLabError && err.status === 404) return null;
|
|
2307
|
+
throw err;
|
|
2308
|
+
});
|
|
2309
|
+
if (!character) return null;
|
|
2310
|
+
if (!groupId) return character.status === "completed" ? rotationSources(character) : void 0;
|
|
2311
|
+
const recorded = context.metadata?.character ?? {};
|
|
2312
|
+
const direction = recorded.direction ?? "south";
|
|
2313
|
+
const group = character.animations.find((g) => g.animation_group_id === groupId);
|
|
2314
|
+
const frames = group?.directions.find((d) => d.direction === direction && d.frames.length)?.frames ?? (recorded.animationName ? findAnimation(character, recorded.animationName, direction, recorded.animationId ?? null)?.frames : void 0);
|
|
2315
|
+
if (!frames) return null;
|
|
2316
|
+
return frames.map((url, index) => ({ url, role: `frame-${String(index).padStart(2, "0")}` }));
|
|
2317
|
+
}
|
|
2302
2318
|
};
|
|
2303
2319
|
function remoteCharacter(character) {
|
|
2304
2320
|
return {
|
|
@@ -2329,6 +2345,15 @@ function firstUrl(urls) {
|
|
|
2329
2345
|
if (!urls) return null;
|
|
2330
2346
|
return Object.values(urls).find((u) => typeof u === "string") ?? null;
|
|
2331
2347
|
}
|
|
2348
|
+
function rotationSources(character) {
|
|
2349
|
+
const order = character.directions === 4 ? CHARACTER_DIRECTIONS_4 : CHARACTER_DIRECTIONS_8;
|
|
2350
|
+
const sources = [];
|
|
2351
|
+
for (const direction of order) {
|
|
2352
|
+
const url = character.rotation_urls?.[direction];
|
|
2353
|
+
if (url) sources.push({ url, role: direction });
|
|
2354
|
+
}
|
|
2355
|
+
return sources;
|
|
2356
|
+
}
|
|
2332
2357
|
function findAnimation(character, name, direction, animationId) {
|
|
2333
2358
|
for (const group of character.animations) {
|
|
2334
2359
|
const match = group.directions.find((d) => d.direction === direction && d.frames.length > 0);
|
|
@@ -4259,6 +4284,18 @@ var FakeProvider = class {
|
|
|
4259
4284
|
if (!character) throw new Error(`fake provider has no character ${id}`);
|
|
4260
4285
|
return character;
|
|
4261
4286
|
}
|
|
4287
|
+
/** Characters answer with whatever the store holds now; other objects keep their URLs. */
|
|
4288
|
+
async refreshSources(objectId, context) {
|
|
4289
|
+
if (context.generator !== "character") return void 0;
|
|
4290
|
+
const [characterId, groupId] = objectId.split("#");
|
|
4291
|
+
const character = this.characters.get(characterId);
|
|
4292
|
+
if (!character) return null;
|
|
4293
|
+
if (!groupId) return character.rotations;
|
|
4294
|
+
const direction = context.metadata?.character?.direction ?? "south";
|
|
4295
|
+
const animation = character.animations.find((a) => a.groupId === groupId && a.direction === direction);
|
|
4296
|
+
if (!animation) return null;
|
|
4297
|
+
return animation.frames.map((url, index) => ({ url, role: `frame-${String(index).padStart(2, "0")}` }));
|
|
4298
|
+
}
|
|
4262
4299
|
async delete(assetId) {
|
|
4263
4300
|
this.deleted.push(assetId);
|
|
4264
4301
|
this.assets.delete(assetId);
|
|
@@ -7937,7 +7974,40 @@ async function fetchAssets(provider, specs, lock, lockPath, opts = {}) {
|
|
|
7937
7974
|
result.skipped++;
|
|
7938
7975
|
continue;
|
|
7939
7976
|
}
|
|
7940
|
-
const
|
|
7977
|
+
const recordedSources = entry.sourceUrls?.length ? entry.sourceUrls : entry.sourceUrl ? [{ url: entry.sourceUrl }] : opts.repair && entry.outputs.length ? entry.outputs.map((o) => ({ url: "", role: o.role, mediaType: o.mediaType })) : [];
|
|
7978
|
+
let sources = recordedSources;
|
|
7979
|
+
let rotated = false;
|
|
7980
|
+
if (opts.refresh && entry.status === "downloaded" && entry.objectId && provider.refreshSources) {
|
|
7981
|
+
let current;
|
|
7982
|
+
try {
|
|
7983
|
+
current = await provider.refreshSources(entry.objectId, {
|
|
7984
|
+
generator: entry.generator,
|
|
7985
|
+
metadata: entry.providerMetadata?.[provider.id],
|
|
7986
|
+
sources: recordedSources
|
|
7987
|
+
});
|
|
7988
|
+
} catch (err) {
|
|
7989
|
+
const message6 = err instanceof Error ? err.message : String(err);
|
|
7990
|
+
upsert(lock, key, { status: "download-failed", error: `download failed: ${message6}` });
|
|
7991
|
+
result.failed++;
|
|
7992
|
+
log(` FAILED ${key}: ${message6}`);
|
|
7993
|
+
await saveLock(lockPath, lock);
|
|
7994
|
+
continue;
|
|
7995
|
+
}
|
|
7996
|
+
if (current === null) {
|
|
7997
|
+
upsert(lock, key, { status: "download-failed", error: `download failed: ${entry.objectId} no longer exists upstream` });
|
|
7998
|
+
result.failed++;
|
|
7999
|
+
log(` FAILED ${key}: ${entry.objectId} no longer exists upstream`);
|
|
8000
|
+
await saveLock(lockPath, lock);
|
|
8001
|
+
continue;
|
|
8002
|
+
}
|
|
8003
|
+
if (current) {
|
|
8004
|
+
sources = current.map((source) => ({
|
|
8005
|
+
...source,
|
|
8006
|
+
mediaType: source.mediaType ?? recordedSources.find((r) => r.role === source.role)?.mediaType
|
|
8007
|
+
}));
|
|
8008
|
+
rotated = sources.length !== recordedSources.length || sources.some((source, index) => source.url !== recordedSources[index]?.url || source.role !== recordedSources[index]?.role);
|
|
8009
|
+
}
|
|
8010
|
+
}
|
|
7941
8011
|
if (!sources.length) {
|
|
7942
8012
|
upsert(lock, key, {
|
|
7943
8013
|
status: "download-failed",
|
|
@@ -8066,6 +8136,10 @@ async function fetchAssets(provider, specs, lock, lockPath, opts = {}) {
|
|
|
8066
8136
|
log(` wrote ${path16.relative(process.cwd(), target)}`);
|
|
8067
8137
|
}
|
|
8068
8138
|
if (opts.refresh && !wrote) {
|
|
8139
|
+
if (rotated) {
|
|
8140
|
+
const persistent = sources.filter((source) => shouldPersistSourceUrl(source.url));
|
|
8141
|
+
upsert(lock, key, { sourceUrl: persistent[0]?.url ?? null, sourceUrls: persistent });
|
|
8142
|
+
}
|
|
8069
8143
|
result.unchanged = (result.unchanged ?? 0) + 1;
|
|
8070
8144
|
continue;
|
|
8071
8145
|
}
|
|
@@ -11214,6 +11288,32 @@ async function samePixels(a, b) {
|
|
|
11214
11288
|
}
|
|
11215
11289
|
}
|
|
11216
11290
|
var metadataFps = (entry) => entry ? frameSetFps(entry) : null;
|
|
11291
|
+
function describeCharacter(spec, entry) {
|
|
11292
|
+
const recorded = entry?.providerMetadata?.[entry.provider]?.character;
|
|
11293
|
+
if (spec?.character) {
|
|
11294
|
+
const character = spec.character;
|
|
11295
|
+
return {
|
|
11296
|
+
kind: character.kind,
|
|
11297
|
+
parentKey: character.parentAssetId ? lockKey(spec.styleId, character.parentAssetId) : null,
|
|
11298
|
+
mode: character.kind === "animation" ? character.animation.mode : character.mode,
|
|
11299
|
+
directions: character.directions,
|
|
11300
|
+
direction: character.animation?.direction ?? null,
|
|
11301
|
+
characterId: recorded?.characterId ?? entry?.objectId?.split("#")[0] ?? null
|
|
11302
|
+
};
|
|
11303
|
+
}
|
|
11304
|
+
if (entry?.generator === "character") {
|
|
11305
|
+
const kind = recorded?.kind === "animation" || entry.outputs.some((o) => o.role?.startsWith("frame-")) ? "animation" : "base";
|
|
11306
|
+
return {
|
|
11307
|
+
kind,
|
|
11308
|
+
parentKey: null,
|
|
11309
|
+
mode: recorded?.mode ?? "standard",
|
|
11310
|
+
directions: recorded?.directions ?? entry.outputs.length,
|
|
11311
|
+
direction: recorded?.direction ?? null,
|
|
11312
|
+
characterId: recorded?.characterId ?? entry.objectId?.split("#")[0] ?? null
|
|
11313
|
+
};
|
|
11314
|
+
}
|
|
11315
|
+
return null;
|
|
11316
|
+
}
|
|
11217
11317
|
async function fileInfo(absolutePath) {
|
|
11218
11318
|
try {
|
|
11219
11319
|
const info = await stat3(absolutePath);
|
|
@@ -11422,6 +11522,7 @@ async function buildGallerySnapshot(opts) {
|
|
|
11422
11522
|
currentSpecHash: spec.specHash,
|
|
11423
11523
|
revision: entry?.revision ?? null,
|
|
11424
11524
|
revisionParentKey: spec.revision ? lockKey(spec.styleId, spec.revision.sourceAssetId) : entry?.revision ? lockKey(spec.styleId, entry.revision.sourceAssetId) : null,
|
|
11525
|
+
character: describeCharacter(spec, entry),
|
|
11425
11526
|
outputs,
|
|
11426
11527
|
quality,
|
|
11427
11528
|
providerMetadata: entry?.providerMetadata ?? {},
|
|
@@ -11483,6 +11584,7 @@ async function buildGallerySnapshot(opts) {
|
|
|
11483
11584
|
currentSpecHash: null,
|
|
11484
11585
|
revision: entry.revision,
|
|
11485
11586
|
revisionParentKey: entry.revision ? lockKey(entry.styleId, entry.revision.sourceAssetId) : null,
|
|
11587
|
+
character: describeCharacter(void 0, entry),
|
|
11486
11588
|
outputs,
|
|
11487
11589
|
quality: null,
|
|
11488
11590
|
providerMetadata: entry.providerMetadata ?? {},
|
|
@@ -11539,6 +11641,11 @@ async function buildGallerySnapshot(opts) {
|
|
|
11539
11641
|
view: style?.view ?? null,
|
|
11540
11642
|
noBackground: style?.noBackground ?? true,
|
|
11541
11643
|
quality: Boolean(style?.quality),
|
|
11644
|
+
characters: style?.generator === "character" ? {
|
|
11645
|
+
bases: styleItems.filter((item) => item.character?.kind === "base").length,
|
|
11646
|
+
states: styleItems.filter((item) => item.character?.kind === "state").length,
|
|
11647
|
+
animations: styleItems.filter((item) => item.character?.kind === "animation").length
|
|
11648
|
+
} : null,
|
|
11542
11649
|
tags: style?.tags ?? [],
|
|
11543
11650
|
extends: typeof rawStyle?.extends === "string" ? rawStyle.extends : null,
|
|
11544
11651
|
ownFields: rawStyle ? Object.keys(rawStyle).filter((key) => key !== "extends") : [],
|