pixelkiln 0.75.0 → 0.76.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 +139 -14
- package/dist/cli.js.map +1 -1
- package/dist/client/gallery.css +1 -0
- package/dist/client/gallery.js +12 -1
- package/dist/index.cjs +34 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/docs/CHARACTERS.md +5 -2
- package/docs/GENERATORS.md +3 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -12799,6 +12799,21 @@ interface PixelLabUsage {
|
|
|
12799
12799
|
generations?: number | null;
|
|
12800
12800
|
usd?: number | null;
|
|
12801
12801
|
}
|
|
12802
|
+
type ProFlashCostOperation = "create" | "edit" | "inpaint" | "character" | "object";
|
|
12803
|
+
/** One `/pro-flash/cost` answer, in generations. */
|
|
12804
|
+
interface ProFlashQuote {
|
|
12805
|
+
/** The first image: the drawn south sprite, or the edit or inpaint itself. */
|
|
12806
|
+
image: number | null;
|
|
12807
|
+
/** The v3 rotation pass, for a character or object; what a base from a reference pays alone. */
|
|
12808
|
+
rotations: number | null;
|
|
12809
|
+
total: number;
|
|
12810
|
+
}
|
|
12811
|
+
/**
|
|
12812
|
+
* Reads a `/pro-flash/cost` body. Measured answers carry `image` and
|
|
12813
|
+
* `rotations`; a `total`, `generations`, or `*_generations` spelling is
|
|
12814
|
+
* accepted too, and a nested `usage`/`cost` object is looked through.
|
|
12815
|
+
*/
|
|
12816
|
+
declare function parseProFlashQuote(raw: unknown): ProFlashQuote;
|
|
12802
12817
|
declare class PixelLabError extends ProviderError {
|
|
12803
12818
|
readonly body: string;
|
|
12804
12819
|
constructor(message: string, status: number, body: string);
|
|
@@ -12816,6 +12831,21 @@ declare class PixelLabClient {
|
|
|
12816
12831
|
/** Retries transport failures, 429, and 5xx; see http.ts for the policy. */
|
|
12817
12832
|
private request;
|
|
12818
12833
|
balance(): Promise<Balance>;
|
|
12834
|
+
/**
|
|
12835
|
+
* `GET /pro-flash/cost`: PixelLab's own quote for one Pro Flash job, split
|
|
12836
|
+
* into the first image and the v3 rotations. Free, and provisional by
|
|
12837
|
+
* PixelLab's own description; the billed amount on the finished job is
|
|
12838
|
+
* the real one. The response schema is undocumented (`{}` in the spec),
|
|
12839
|
+
* so this reads it leniently: a total if one is given, else the sum of
|
|
12840
|
+
* the parts, and refuses an answer with no number in it.
|
|
12841
|
+
*/
|
|
12842
|
+
proFlashCost(args: {
|
|
12843
|
+
operation: ProFlashCostOperation;
|
|
12844
|
+
width: number;
|
|
12845
|
+
height: number;
|
|
12846
|
+
/** Character and object quotes only; PixelLab's default is 8. */
|
|
12847
|
+
nDirections?: number;
|
|
12848
|
+
}): Promise<ProFlashQuote>;
|
|
12819
12849
|
/**
|
|
12820
12850
|
* Square objects that persist indefinitely.
|
|
12821
12851
|
*
|
|
@@ -21652,4 +21682,4 @@ interface WorkspaceStatusReport {
|
|
|
21652
21682
|
*/
|
|
21653
21683
|
declare function workspaceStatus(ws: Workspace, dir: string): Promise<WorkspaceStatusReport>;
|
|
21654
21684
|
|
|
21655
|
-
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, type AssetBatch, AssetBatchSchema, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type Base64Image, type BilledAmount, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, CHARACTER_PROPORTION_PRESETS, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterOutfit, CharacterOutfitSchema, type CharacterPortrait, CharacterPortraitSchema, type CharacterPortraitSize, CharacterPortraitSizeSchema, type CharacterProportions, CharacterProportionsSchema, 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, FONT_COST_GENERATIONS, FONT_GLYPH_SIZES, FONT_WEIGHTS, FRAME_SET_REVISION_MODES, type FakeOptions, FakeProvider, type FetchResult, type FontGlyphSize, type FontWeight, 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 GenerateFontOptions, type GenerateFontResult, 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, MEMBER_SET_REVISION_MODES, MIRRORED_DIRECTION, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, type MapScene, type MapScenePlacement, MapScenePlacementSchema, MapSceneSchema, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type ObjectAnimationGroup, 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 ResolvedBatch, type ResolvedCharacter, type ResolvedMapScene, type ResolvedMirror, type ResolvedObjectPro, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedReferenceImage, type ResolvedRevision, type ResolvedRevisionMember, type ResolvedSpec, type ResolvedStyleAnchor, 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 RevisionDithering, RevisionDitheringSchema, 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 Tileset, type TilesetExport, type TilesetExportOptions, type TilesetFormat, type TilesetTile, UNZOOM_MAX_AREA, UNZOOM_MIN_SIDE, type UiElement, UiElementSchema, type UiPiece, UiPieceSchema, UnsupportedCapabilityError, type UnzoomFileResult, 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, defaultUnzoomOut, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, fontOutputPaths, formatCost, frameSetFps, galleryContentSecurityPolicy, galleryMediaId, galleryMediaRoute, generateFont, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, isometricTileCost, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTerrainTiles, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseTerrainDescriptions, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, proportionsPayload, 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, terrainTileCount, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, unzoomFile, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
|
21685
|
+
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, type AssetBatch, AssetBatchSchema, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type Base64Image, type BilledAmount, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, CHARACTER_PROPORTION_PRESETS, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterOutfit, CharacterOutfitSchema, type CharacterPortrait, CharacterPortraitSchema, type CharacterPortraitSize, CharacterPortraitSizeSchema, type CharacterProportions, CharacterProportionsSchema, 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, FONT_COST_GENERATIONS, FONT_GLYPH_SIZES, FONT_WEIGHTS, FRAME_SET_REVISION_MODES, type FakeOptions, FakeProvider, type FetchResult, type FontGlyphSize, type FontWeight, 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 GenerateFontOptions, type GenerateFontResult, 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, MEMBER_SET_REVISION_MODES, MIRRORED_DIRECTION, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, type MapScene, type MapScenePlacement, MapScenePlacementSchema, MapSceneSchema, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type ObjectAnimationGroup, 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 ProFlashCostOperation, type ProFlashQuote, 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 ResolvedBatch, type ResolvedCharacter, type ResolvedMapScene, type ResolvedMirror, type ResolvedObjectPro, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedReferenceImage, type ResolvedRevision, type ResolvedRevisionMember, type ResolvedSpec, type ResolvedStyleAnchor, 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 RevisionDithering, RevisionDitheringSchema, 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 Tileset, type TilesetExport, type TilesetExportOptions, type TilesetFormat, type TilesetTile, UNZOOM_MAX_AREA, UNZOOM_MIN_SIDE, type UiElement, UiElementSchema, type UiPiece, UiPieceSchema, UnsupportedCapabilityError, type UnzoomFileResult, 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, defaultUnzoomOut, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, fontOutputPaths, formatCost, frameSetFps, galleryContentSecurityPolicy, galleryMediaId, galleryMediaRoute, generateFont, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, isometricTileCost, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTerrainTiles, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseProFlashQuote, parseTerrainDescriptions, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, proportionsPayload, 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, terrainTileCount, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, unzoomFile, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
package/dist/index.d.ts
CHANGED
|
@@ -12799,6 +12799,21 @@ interface PixelLabUsage {
|
|
|
12799
12799
|
generations?: number | null;
|
|
12800
12800
|
usd?: number | null;
|
|
12801
12801
|
}
|
|
12802
|
+
type ProFlashCostOperation = "create" | "edit" | "inpaint" | "character" | "object";
|
|
12803
|
+
/** One `/pro-flash/cost` answer, in generations. */
|
|
12804
|
+
interface ProFlashQuote {
|
|
12805
|
+
/** The first image: the drawn south sprite, or the edit or inpaint itself. */
|
|
12806
|
+
image: number | null;
|
|
12807
|
+
/** The v3 rotation pass, for a character or object; what a base from a reference pays alone. */
|
|
12808
|
+
rotations: number | null;
|
|
12809
|
+
total: number;
|
|
12810
|
+
}
|
|
12811
|
+
/**
|
|
12812
|
+
* Reads a `/pro-flash/cost` body. Measured answers carry `image` and
|
|
12813
|
+
* `rotations`; a `total`, `generations`, or `*_generations` spelling is
|
|
12814
|
+
* accepted too, and a nested `usage`/`cost` object is looked through.
|
|
12815
|
+
*/
|
|
12816
|
+
declare function parseProFlashQuote(raw: unknown): ProFlashQuote;
|
|
12802
12817
|
declare class PixelLabError extends ProviderError {
|
|
12803
12818
|
readonly body: string;
|
|
12804
12819
|
constructor(message: string, status: number, body: string);
|
|
@@ -12816,6 +12831,21 @@ declare class PixelLabClient {
|
|
|
12816
12831
|
/** Retries transport failures, 429, and 5xx; see http.ts for the policy. */
|
|
12817
12832
|
private request;
|
|
12818
12833
|
balance(): Promise<Balance>;
|
|
12834
|
+
/**
|
|
12835
|
+
* `GET /pro-flash/cost`: PixelLab's own quote for one Pro Flash job, split
|
|
12836
|
+
* into the first image and the v3 rotations. Free, and provisional by
|
|
12837
|
+
* PixelLab's own description; the billed amount on the finished job is
|
|
12838
|
+
* the real one. The response schema is undocumented (`{}` in the spec),
|
|
12839
|
+
* so this reads it leniently: a total if one is given, else the sum of
|
|
12840
|
+
* the parts, and refuses an answer with no number in it.
|
|
12841
|
+
*/
|
|
12842
|
+
proFlashCost(args: {
|
|
12843
|
+
operation: ProFlashCostOperation;
|
|
12844
|
+
width: number;
|
|
12845
|
+
height: number;
|
|
12846
|
+
/** Character and object quotes only; PixelLab's default is 8. */
|
|
12847
|
+
nDirections?: number;
|
|
12848
|
+
}): Promise<ProFlashQuote>;
|
|
12819
12849
|
/**
|
|
12820
12850
|
* Square objects that persist indefinitely.
|
|
12821
12851
|
*
|
|
@@ -21652,4 +21682,4 @@ interface WorkspaceStatusReport {
|
|
|
21652
21682
|
*/
|
|
21653
21683
|
declare function workspaceStatus(ws: Workspace, dir: string): Promise<WorkspaceStatusReport>;
|
|
21654
21684
|
|
|
21655
|
-
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, type AssetBatch, AssetBatchSchema, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type Base64Image, type BilledAmount, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, CHARACTER_PROPORTION_PRESETS, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterOutfit, CharacterOutfitSchema, type CharacterPortrait, CharacterPortraitSchema, type CharacterPortraitSize, CharacterPortraitSizeSchema, type CharacterProportions, CharacterProportionsSchema, 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, FONT_COST_GENERATIONS, FONT_GLYPH_SIZES, FONT_WEIGHTS, FRAME_SET_REVISION_MODES, type FakeOptions, FakeProvider, type FetchResult, type FontGlyphSize, type FontWeight, 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 GenerateFontOptions, type GenerateFontResult, 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, MEMBER_SET_REVISION_MODES, MIRRORED_DIRECTION, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, type MapScene, type MapScenePlacement, MapScenePlacementSchema, MapSceneSchema, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type ObjectAnimationGroup, 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 ResolvedBatch, type ResolvedCharacter, type ResolvedMapScene, type ResolvedMirror, type ResolvedObjectPro, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedReferenceImage, type ResolvedRevision, type ResolvedRevisionMember, type ResolvedSpec, type ResolvedStyleAnchor, 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 RevisionDithering, RevisionDitheringSchema, 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 Tileset, type TilesetExport, type TilesetExportOptions, type TilesetFormat, type TilesetTile, UNZOOM_MAX_AREA, UNZOOM_MIN_SIDE, type UiElement, UiElementSchema, type UiPiece, UiPieceSchema, UnsupportedCapabilityError, type UnzoomFileResult, 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, defaultUnzoomOut, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, fontOutputPaths, formatCost, frameSetFps, galleryContentSecurityPolicy, galleryMediaId, galleryMediaRoute, generateFont, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, isometricTileCost, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTerrainTiles, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseTerrainDescriptions, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, proportionsPayload, 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, terrainTileCount, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, unzoomFile, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
|
21685
|
+
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, type AssetBatch, AssetBatchSchema, AssetSchema, type AtlasSet, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type Base64Image, type BilledAmount, BudgetError, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, CHARACTER_DIRECTIONS_4, CHARACTER_DIRECTIONS_8, CHARACTER_PROPORTION_PRESETS, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type CharacterAnimation, type CharacterAnimationMode, CharacterAnimationModeSchema, CharacterAnimationSchema$1 as CharacterAnimationSchema, type CharacterDirection, CharacterDirectionSchema, type CharacterMode, CharacterModeSchema, type CharacterOutfit, CharacterOutfitSchema, type CharacterPortrait, CharacterPortraitSchema, type CharacterPortraitSize, CharacterPortraitSizeSchema, type CharacterProportions, CharacterProportionsSchema, 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, FONT_COST_GENERATIONS, FONT_GLYPH_SIZES, FONT_WEIGHTS, FRAME_SET_REVISION_MODES, type FakeOptions, FakeProvider, type FetchResult, type FontGlyphSize, type FontWeight, 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 GenerateFontOptions, type GenerateFontResult, 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, MEMBER_SET_REVISION_MODES, MIRRORED_DIRECTION, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, type MapScene, type MapScenePlacement, MapScenePlacementSchema, MapSceneSchema, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type ObjectAnimationGroup, 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 ProFlashCostOperation, type ProFlashQuote, 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 ResolvedBatch, type ResolvedCharacter, type ResolvedMapScene, type ResolvedMirror, type ResolvedObjectPro, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedReferenceImage, type ResolvedRevision, type ResolvedRevisionMember, type ResolvedSpec, type ResolvedStyleAnchor, 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 RevisionDithering, RevisionDitheringSchema, 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 Tileset, type TilesetExport, type TilesetExportOptions, type TilesetFormat, type TilesetTile, UNZOOM_MAX_AREA, UNZOOM_MIN_SIDE, type UiElement, UiElementSchema, type UiPiece, UiPieceSchema, UnsupportedCapabilityError, type UnzoomFileResult, 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, defaultUnzoomOut, detachHandEdit, detectMediaType, doctor, editorBaseUrl, editorDir, editorRoute, editorStatus, editorToolsRoot, errorCode, evaluateAudit, exitCodeFor, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, fetchWithRetry, findOrphans, fontOutputPaths, formatCost, frameSetFps, galleryContentSecurityPolicy, galleryMediaId, galleryMediaRoute, generateFont, generationCost, groupOrphansByStyle, handEditBase, handEditBases, handEditCompanionPath, handEditMembers, handEditPath, handEditProjectPath, hex, historyAfterReplacing, historyLimit, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installEditor, installRecipe, isFrameSetEntry, isMemberSetEntry, isSensitiveSourceUrl, isometricTileCost, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, memberPath, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTerrainTiles, normalizeTileRules, openExternal, openInEditor, openProject, outliers, outputId, packSprites, packStyle, paletteDistance, parentAssetId, parseLock, parseProFlashQuote, parseTerrainDescriptions, parseWorkspace, pickHistory, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, proportionsPayload, 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, terrainTileCount, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, unzoomFile, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
package/dist/index.js
CHANGED
|
@@ -1708,6 +1708,25 @@ function cleanupResults(images, sent, operation) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
return images.map((image) => Buffer.from(image.base64, "base64"));
|
|
1710
1710
|
}
|
|
1711
|
+
function parseProFlashQuote(raw) {
|
|
1712
|
+
const body = raw && typeof raw === "object" ? raw : {};
|
|
1713
|
+
const nested = [body, body.usage, body.cost, body.estimate].filter((v) => Boolean(v) && typeof v === "object");
|
|
1714
|
+
const pick = (...names) => {
|
|
1715
|
+
for (const obj of nested) {
|
|
1716
|
+
for (const name of names) {
|
|
1717
|
+
const value = obj[name];
|
|
1718
|
+
if (typeof value === "number" && Number.isFinite(value) && value >= 0) return value;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
return null;
|
|
1722
|
+
};
|
|
1723
|
+
const image = pick("image", "image_generations", "first_image", "first_image_generations");
|
|
1724
|
+
const rotations = pick("rotations", "rotation", "rotations_generations", "rotation_generations");
|
|
1725
|
+
const total = pick("total", "total_generations", "generations");
|
|
1726
|
+
if (total !== null) return { image, rotations, total };
|
|
1727
|
+
if (image !== null || rotations !== null) return { image, rotations, total: (image ?? 0) + (rotations ?? 0) };
|
|
1728
|
+
throw new Error(`GET /pro-flash/cost returned no price: ${JSON.stringify(raw).slice(0, 200)}`);
|
|
1729
|
+
}
|
|
1711
1730
|
var PixelLabError = class extends ProviderError {
|
|
1712
1731
|
constructor(message6, status, body) {
|
|
1713
1732
|
super("pixellab", message6, { status });
|
|
@@ -1766,6 +1785,19 @@ var PixelLabClient = class {
|
|
|
1766
1785
|
plan: raw.subscription?.plan ?? "unknown"
|
|
1767
1786
|
};
|
|
1768
1787
|
}
|
|
1788
|
+
/**
|
|
1789
|
+
* `GET /pro-flash/cost`: PixelLab's own quote for one Pro Flash job, split
|
|
1790
|
+
* into the first image and the v3 rotations. Free, and provisional by
|
|
1791
|
+
* PixelLab's own description; the billed amount on the finished job is
|
|
1792
|
+
* the real one. The response schema is undocumented (`{}` in the spec),
|
|
1793
|
+
* so this reads it leniently: a total if one is given, else the sum of
|
|
1794
|
+
* the parts, and refuses an answer with no number in it.
|
|
1795
|
+
*/
|
|
1796
|
+
async proFlashCost(args) {
|
|
1797
|
+
const query = new URLSearchParams({ operation: args.operation, width: String(args.width), height: String(args.height) });
|
|
1798
|
+
if (args.nDirections !== void 0) query.set("n_directions", String(args.nDirections));
|
|
1799
|
+
return parseProFlashQuote(await this.request(`/pro-flash/cost?${query}`));
|
|
1800
|
+
}
|
|
1769
1801
|
/**
|
|
1770
1802
|
* Square objects that persist indefinitely.
|
|
1771
1803
|
*
|
|
@@ -18540,6 +18572,7 @@ export {
|
|
|
18540
18572
|
paletteDistance,
|
|
18541
18573
|
parentAssetId,
|
|
18542
18574
|
parseLock,
|
|
18575
|
+
parseProFlashQuote,
|
|
18543
18576
|
parseTerrainDescriptions,
|
|
18544
18577
|
parseWorkspace,
|
|
18545
18578
|
pickHistory,
|