pixelkiln 0.2.0 → 0.3.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/CONTRIBUTING.md +48 -0
- package/NAMING.md +15 -15
- package/PROVIDERS.md +13 -13
- package/README.md +22 -9
- package/dist/cli.d.ts +18 -1
- package/dist/cli.js +588 -142
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +291 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +168 -1
- package/dist/index.d.ts +168 -1
- package/dist/index.js +280 -21
- package/dist/index.js.map +1 -1
- package/docs/AGENTS.md +1 -1
- package/docs/ARCHITECTURE.md +4 -2
- package/docs/CLI.md +47 -0
- package/docs/ENDPOINTS.md +39 -38
- package/docs/GENERATORS.md +1 -1
- package/docs/RECOVERY.md +44 -0
- package/docs/TILES.md +1 -1
- package/examples/minimal/README.md +2 -2
- package/package.json +1 -1
- package/schema/workspace.schema.json +54 -0
package/dist/index.d.cts
CHANGED
|
@@ -2576,6 +2576,18 @@ interface SiblingManifest {
|
|
|
2576
2576
|
label: string;
|
|
2577
2577
|
manifest: Manifest;
|
|
2578
2578
|
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Loads every sibling project's manifest for `groupOrphansByStyle`'s
|
|
2581
|
+
* sibling-exclusion signal, from the union of a workspace catalog's
|
|
2582
|
+
* registered manifests and the conventional sibling beside each `--claims`
|
|
2583
|
+
* lockfile (same directory, by the convention `--lock` defaults from
|
|
2584
|
+
* `--manifest`). The two sources are meant to combine, not choose between
|
|
2585
|
+
* (docs/RECOVERY.md: "`--claims` still works and unions with a workspace's
|
|
2586
|
+
* claim set") — a `--claims` path passed alongside `--workspace` must still
|
|
2587
|
+
* contribute its own style signal. Best-effort: a missing or malformed
|
|
2588
|
+
* sibling just means no extra signal for that orphan, not an error.
|
|
2589
|
+
*/
|
|
2590
|
+
declare function loadSiblingManifests(ownManifestPath: string, workspaceManifestPaths: string[], claimPaths: string[]): Promise<SiblingManifest[]>;
|
|
2579
2591
|
interface OrphanGroups {
|
|
2580
2592
|
/** styleId → its matched orphans, in manifest style order. */
|
|
2581
2593
|
matched: Map<string, Orphan[]>;
|
|
@@ -2676,4 +2688,159 @@ interface SalvageSheetContext {
|
|
|
2676
2688
|
*/
|
|
2677
2689
|
declare function renderSalvageSheet(orphans: Orphan[], ctx?: SalvageSheetContext): string;
|
|
2678
2690
|
|
|
2679
|
-
|
|
2691
|
+
/**
|
|
2692
|
+
* One sibling project registered in a workspace catalog. Only paths and
|
|
2693
|
+
* identity live here — never a credential. Each project keeps loading its own
|
|
2694
|
+
* key from its own `.env`, the same as it does standalone.
|
|
2695
|
+
*/
|
|
2696
|
+
declare const WorkspaceProjectSchema: z.ZodObject<{
|
|
2697
|
+
id: z.ZodString;
|
|
2698
|
+
/** Manifest path, relative to the catalog file's own directory. */
|
|
2699
|
+
manifest: z.ZodString;
|
|
2700
|
+
/** Lockfile path, relative to the catalog file's own directory. */
|
|
2701
|
+
lock: z.ZodString;
|
|
2702
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
2703
|
+
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
2704
|
+
account: z.ZodOptional<z.ZodString>;
|
|
2705
|
+
}, "strict", z.ZodTypeAny, {
|
|
2706
|
+
provider: string;
|
|
2707
|
+
id: string;
|
|
2708
|
+
manifest: string;
|
|
2709
|
+
lock: string;
|
|
2710
|
+
account?: string | undefined;
|
|
2711
|
+
}, {
|
|
2712
|
+
id: string;
|
|
2713
|
+
manifest: string;
|
|
2714
|
+
lock: string;
|
|
2715
|
+
provider?: string | undefined;
|
|
2716
|
+
account?: string | undefined;
|
|
2717
|
+
}>;
|
|
2718
|
+
declare const WorkspaceSchema: z.ZodObject<{
|
|
2719
|
+
version: z.ZodLiteral<1>;
|
|
2720
|
+
projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2721
|
+
id: z.ZodString;
|
|
2722
|
+
/** Manifest path, relative to the catalog file's own directory. */
|
|
2723
|
+
manifest: z.ZodString;
|
|
2724
|
+
/** Lockfile path, relative to the catalog file's own directory. */
|
|
2725
|
+
lock: z.ZodString;
|
|
2726
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
2727
|
+
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
2728
|
+
account: z.ZodOptional<z.ZodString>;
|
|
2729
|
+
}, "strict", z.ZodTypeAny, {
|
|
2730
|
+
provider: string;
|
|
2731
|
+
id: string;
|
|
2732
|
+
manifest: string;
|
|
2733
|
+
lock: string;
|
|
2734
|
+
account?: string | undefined;
|
|
2735
|
+
}, {
|
|
2736
|
+
id: string;
|
|
2737
|
+
manifest: string;
|
|
2738
|
+
lock: string;
|
|
2739
|
+
provider?: string | undefined;
|
|
2740
|
+
account?: string | undefined;
|
|
2741
|
+
}>, "many">>;
|
|
2742
|
+
}, "strict", z.ZodTypeAny, {
|
|
2743
|
+
version: 1;
|
|
2744
|
+
projects: {
|
|
2745
|
+
provider: string;
|
|
2746
|
+
id: string;
|
|
2747
|
+
manifest: string;
|
|
2748
|
+
lock: string;
|
|
2749
|
+
account?: string | undefined;
|
|
2750
|
+
}[];
|
|
2751
|
+
}, {
|
|
2752
|
+
version: 1;
|
|
2753
|
+
projects?: {
|
|
2754
|
+
id: string;
|
|
2755
|
+
manifest: string;
|
|
2756
|
+
lock: string;
|
|
2757
|
+
provider?: string | undefined;
|
|
2758
|
+
account?: string | undefined;
|
|
2759
|
+
}[] | undefined;
|
|
2760
|
+
}>;
|
|
2761
|
+
type WorkspaceProject = z.infer<typeof WorkspaceProjectSchema>;
|
|
2762
|
+
type Workspace = z.infer<typeof WorkspaceSchema>;
|
|
2763
|
+
/**
|
|
2764
|
+
* Parses a workspace catalog, rejecting anything that is not v1.
|
|
2765
|
+
*
|
|
2766
|
+
* Mirrors `parseLock`'s stance: no migration path, fail loudly rather than
|
|
2767
|
+
* guess at a hand-edited or corrupted file's intent.
|
|
2768
|
+
*/
|
|
2769
|
+
declare function parseWorkspace(raw: unknown): Workspace;
|
|
2770
|
+
declare function loadWorkspace(workspacePath: string): Promise<Workspace>;
|
|
2771
|
+
/** Atomic write — a crash mid-save must not leave a truncated catalog. */
|
|
2772
|
+
declare function saveWorkspace(workspacePath: string, ws: Workspace): Promise<void>;
|
|
2773
|
+
/** Stored path convention: relative to the catalog's directory, forward-slash. */
|
|
2774
|
+
declare function toPortablePath(dir: string, absolute: string): string;
|
|
2775
|
+
/** Resolve a registered project's stored paths against the catalog's directory. */
|
|
2776
|
+
declare function resolveProject(dir: string, project: WorkspaceProject): {
|
|
2777
|
+
manifestPath: string;
|
|
2778
|
+
lockPath: string;
|
|
2779
|
+
};
|
|
2780
|
+
interface WorkspaceDiagnostic {
|
|
2781
|
+
id: "duplicate-id" | "duplicate-lock" | "duplicate-manifest" | "missing-manifest" | "missing-lock" | "absolute-path" | "mixed-provider";
|
|
2782
|
+
level: "error" | "warning";
|
|
2783
|
+
message: string;
|
|
2784
|
+
}
|
|
2785
|
+
/**
|
|
2786
|
+
* Checks the catalog without touching the network or any registered
|
|
2787
|
+
* project's files. Duplicate ids and duplicate lock paths are errors — either
|
|
2788
|
+
* would corrupt the union claim set. A duplicate manifest is only a warning,
|
|
2789
|
+
* because a manifest paired with a variant `--lock` is an already-supported
|
|
2790
|
+
* pattern (see `cachePathFor`). Missing files are errors: a claim set derived
|
|
2791
|
+
* from a workspace that silently skipped a project is the exact hazard this
|
|
2792
|
+
* catalog exists to prevent.
|
|
2793
|
+
*/
|
|
2794
|
+
declare function validateWorkspace(ws: Workspace, dir: string): WorkspaceDiagnostic[];
|
|
2795
|
+
|
|
2796
|
+
interface WorkspaceClaims {
|
|
2797
|
+
claimed: Set<string>;
|
|
2798
|
+
/** Claim count contributed by each registered project. */
|
|
2799
|
+
byProject: Record<string, number>;
|
|
2800
|
+
lockPaths: string[];
|
|
2801
|
+
}
|
|
2802
|
+
/**
|
|
2803
|
+
* The complete account-wide claim set, derived from every registered lock.
|
|
2804
|
+
*
|
|
2805
|
+
* Delegates the union rule itself to `loadClaims` rather than reimplementing
|
|
2806
|
+
* it, so the workspace and single-project `--claims` paths cannot drift. Each
|
|
2807
|
+
* lock is loaded one at a time — rather than handing `loadClaims` the whole
|
|
2808
|
+
* path list at once — purely so a failure can be attributed to the project
|
|
2809
|
+
* that owns it; the safety property (any unreadable registered lock aborts
|
|
2810
|
+
* before returning a claim set) is identical either way.
|
|
2811
|
+
*/
|
|
2812
|
+
declare function workspaceClaims(ws: Workspace, dir: string): Promise<WorkspaceClaims>;
|
|
2813
|
+
interface WorkspaceProjectStatus {
|
|
2814
|
+
id: string;
|
|
2815
|
+
provider: string;
|
|
2816
|
+
account: string | null;
|
|
2817
|
+
manifest: string;
|
|
2818
|
+
lock: string;
|
|
2819
|
+
entries: number;
|
|
2820
|
+
byState: Record<PlanState, number>;
|
|
2821
|
+
spendByUnit: Record<CostUnit, number>;
|
|
2822
|
+
error: string | null;
|
|
2823
|
+
}
|
|
2824
|
+
interface WorkspaceStatusReport {
|
|
2825
|
+
version: 1;
|
|
2826
|
+
safe: boolean;
|
|
2827
|
+
/** The catalog's own directory — resolved paths in `projects` sit under it. */
|
|
2828
|
+
dir: string;
|
|
2829
|
+
projects: WorkspaceProjectStatus[];
|
|
2830
|
+
totals: {
|
|
2831
|
+
byState: Record<PlanState, number>;
|
|
2832
|
+
spendByUnit: Record<CostUnit, number>;
|
|
2833
|
+
claims: number;
|
|
2834
|
+
};
|
|
2835
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* Aggregate, read-only account/project state — offline throughout, using the
|
|
2839
|
+
* same offline cost estimator `plan` uses. A project whose manifest or lock
|
|
2840
|
+
* fails to load surfaces as that project's own `error` rather than aborting
|
|
2841
|
+
* the whole report, so one broken sibling does not hide every other
|
|
2842
|
+
* project's status. It never writes to any registered project's lock.
|
|
2843
|
+
*/
|
|
2844
|
+
declare function workspaceStatus(ws: Workspace, dir: string): Promise<WorkspaceStatusReport>;
|
|
2845
|
+
|
|
2846
|
+
export { type AdoptResult, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type CacheHealthOptions, type CacheHealthReport, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_RATE_LIMIT, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type Generator, GeneratorSchema, type GenericTileset, type JobState, type LoadedManifest, type Lock, type LockEntry, LockEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestSchema, type MapObject, type MountPlacement, type MountedSheet, type NormalizedTileRules, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, type PackedFrame, type PackedSheet, type PackedSource, type PickResult, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type Provider, type ProviderMetadata, type RateLimit, type RemoteAsset, type RemoteHashCacheHealth, type ResolvedOutput, type ResolvedSpec, type ResolvedStyleImage, type SalvageAction, type SalvageResult, type ScannedAsset, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, StyleSchema, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyTags, auditStyle, backoffMs, buildManifest, buildPlan, candidateCount, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, currentEntryOutputPath, currentOutputPath, doctor, evaluateAudit, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, findOrphans, formatCost, generationCost, groupOrphansByStyle, hex, idFromPrompt, imageMetadata, inspectCaches, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeTileRules, outliers, outputId, packSprites, packStyle, paletteDistance, parseLock, parseWorkspace, pngSize, poll, portableOutputPath, primaryOutput, pushTags, remove, renderSalvageSheet, renderSheet, requireDelete, requireList, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, retryAfterMs, runPicker, runSalvage, saveLock, saveWorkspace, scanAssets, selectEntryOutput, sha256, sha256File, shouldRetry, slugify, specHash, spendByUnit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateWorkspace, verifyArtifactBundle, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
package/dist/index.d.ts
CHANGED
|
@@ -2576,6 +2576,18 @@ interface SiblingManifest {
|
|
|
2576
2576
|
label: string;
|
|
2577
2577
|
manifest: Manifest;
|
|
2578
2578
|
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Loads every sibling project's manifest for `groupOrphansByStyle`'s
|
|
2581
|
+
* sibling-exclusion signal, from the union of a workspace catalog's
|
|
2582
|
+
* registered manifests and the conventional sibling beside each `--claims`
|
|
2583
|
+
* lockfile (same directory, by the convention `--lock` defaults from
|
|
2584
|
+
* `--manifest`). The two sources are meant to combine, not choose between
|
|
2585
|
+
* (docs/RECOVERY.md: "`--claims` still works and unions with a workspace's
|
|
2586
|
+
* claim set") — a `--claims` path passed alongside `--workspace` must still
|
|
2587
|
+
* contribute its own style signal. Best-effort: a missing or malformed
|
|
2588
|
+
* sibling just means no extra signal for that orphan, not an error.
|
|
2589
|
+
*/
|
|
2590
|
+
declare function loadSiblingManifests(ownManifestPath: string, workspaceManifestPaths: string[], claimPaths: string[]): Promise<SiblingManifest[]>;
|
|
2579
2591
|
interface OrphanGroups {
|
|
2580
2592
|
/** styleId → its matched orphans, in manifest style order. */
|
|
2581
2593
|
matched: Map<string, Orphan[]>;
|
|
@@ -2676,4 +2688,159 @@ interface SalvageSheetContext {
|
|
|
2676
2688
|
*/
|
|
2677
2689
|
declare function renderSalvageSheet(orphans: Orphan[], ctx?: SalvageSheetContext): string;
|
|
2678
2690
|
|
|
2679
|
-
|
|
2691
|
+
/**
|
|
2692
|
+
* One sibling project registered in a workspace catalog. Only paths and
|
|
2693
|
+
* identity live here — never a credential. Each project keeps loading its own
|
|
2694
|
+
* key from its own `.env`, the same as it does standalone.
|
|
2695
|
+
*/
|
|
2696
|
+
declare const WorkspaceProjectSchema: z.ZodObject<{
|
|
2697
|
+
id: z.ZodString;
|
|
2698
|
+
/** Manifest path, relative to the catalog file's own directory. */
|
|
2699
|
+
manifest: z.ZodString;
|
|
2700
|
+
/** Lockfile path, relative to the catalog file's own directory. */
|
|
2701
|
+
lock: z.ZodString;
|
|
2702
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
2703
|
+
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
2704
|
+
account: z.ZodOptional<z.ZodString>;
|
|
2705
|
+
}, "strict", z.ZodTypeAny, {
|
|
2706
|
+
provider: string;
|
|
2707
|
+
id: string;
|
|
2708
|
+
manifest: string;
|
|
2709
|
+
lock: string;
|
|
2710
|
+
account?: string | undefined;
|
|
2711
|
+
}, {
|
|
2712
|
+
id: string;
|
|
2713
|
+
manifest: string;
|
|
2714
|
+
lock: string;
|
|
2715
|
+
provider?: string | undefined;
|
|
2716
|
+
account?: string | undefined;
|
|
2717
|
+
}>;
|
|
2718
|
+
declare const WorkspaceSchema: z.ZodObject<{
|
|
2719
|
+
version: z.ZodLiteral<1>;
|
|
2720
|
+
projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2721
|
+
id: z.ZodString;
|
|
2722
|
+
/** Manifest path, relative to the catalog file's own directory. */
|
|
2723
|
+
manifest: z.ZodString;
|
|
2724
|
+
/** Lockfile path, relative to the catalog file's own directory. */
|
|
2725
|
+
lock: z.ZodString;
|
|
2726
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
2727
|
+
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
2728
|
+
account: z.ZodOptional<z.ZodString>;
|
|
2729
|
+
}, "strict", z.ZodTypeAny, {
|
|
2730
|
+
provider: string;
|
|
2731
|
+
id: string;
|
|
2732
|
+
manifest: string;
|
|
2733
|
+
lock: string;
|
|
2734
|
+
account?: string | undefined;
|
|
2735
|
+
}, {
|
|
2736
|
+
id: string;
|
|
2737
|
+
manifest: string;
|
|
2738
|
+
lock: string;
|
|
2739
|
+
provider?: string | undefined;
|
|
2740
|
+
account?: string | undefined;
|
|
2741
|
+
}>, "many">>;
|
|
2742
|
+
}, "strict", z.ZodTypeAny, {
|
|
2743
|
+
version: 1;
|
|
2744
|
+
projects: {
|
|
2745
|
+
provider: string;
|
|
2746
|
+
id: string;
|
|
2747
|
+
manifest: string;
|
|
2748
|
+
lock: string;
|
|
2749
|
+
account?: string | undefined;
|
|
2750
|
+
}[];
|
|
2751
|
+
}, {
|
|
2752
|
+
version: 1;
|
|
2753
|
+
projects?: {
|
|
2754
|
+
id: string;
|
|
2755
|
+
manifest: string;
|
|
2756
|
+
lock: string;
|
|
2757
|
+
provider?: string | undefined;
|
|
2758
|
+
account?: string | undefined;
|
|
2759
|
+
}[] | undefined;
|
|
2760
|
+
}>;
|
|
2761
|
+
type WorkspaceProject = z.infer<typeof WorkspaceProjectSchema>;
|
|
2762
|
+
type Workspace = z.infer<typeof WorkspaceSchema>;
|
|
2763
|
+
/**
|
|
2764
|
+
* Parses a workspace catalog, rejecting anything that is not v1.
|
|
2765
|
+
*
|
|
2766
|
+
* Mirrors `parseLock`'s stance: no migration path, fail loudly rather than
|
|
2767
|
+
* guess at a hand-edited or corrupted file's intent.
|
|
2768
|
+
*/
|
|
2769
|
+
declare function parseWorkspace(raw: unknown): Workspace;
|
|
2770
|
+
declare function loadWorkspace(workspacePath: string): Promise<Workspace>;
|
|
2771
|
+
/** Atomic write — a crash mid-save must not leave a truncated catalog. */
|
|
2772
|
+
declare function saveWorkspace(workspacePath: string, ws: Workspace): Promise<void>;
|
|
2773
|
+
/** Stored path convention: relative to the catalog's directory, forward-slash. */
|
|
2774
|
+
declare function toPortablePath(dir: string, absolute: string): string;
|
|
2775
|
+
/** Resolve a registered project's stored paths against the catalog's directory. */
|
|
2776
|
+
declare function resolveProject(dir: string, project: WorkspaceProject): {
|
|
2777
|
+
manifestPath: string;
|
|
2778
|
+
lockPath: string;
|
|
2779
|
+
};
|
|
2780
|
+
interface WorkspaceDiagnostic {
|
|
2781
|
+
id: "duplicate-id" | "duplicate-lock" | "duplicate-manifest" | "missing-manifest" | "missing-lock" | "absolute-path" | "mixed-provider";
|
|
2782
|
+
level: "error" | "warning";
|
|
2783
|
+
message: string;
|
|
2784
|
+
}
|
|
2785
|
+
/**
|
|
2786
|
+
* Checks the catalog without touching the network or any registered
|
|
2787
|
+
* project's files. Duplicate ids and duplicate lock paths are errors — either
|
|
2788
|
+
* would corrupt the union claim set. A duplicate manifest is only a warning,
|
|
2789
|
+
* because a manifest paired with a variant `--lock` is an already-supported
|
|
2790
|
+
* pattern (see `cachePathFor`). Missing files are errors: a claim set derived
|
|
2791
|
+
* from a workspace that silently skipped a project is the exact hazard this
|
|
2792
|
+
* catalog exists to prevent.
|
|
2793
|
+
*/
|
|
2794
|
+
declare function validateWorkspace(ws: Workspace, dir: string): WorkspaceDiagnostic[];
|
|
2795
|
+
|
|
2796
|
+
interface WorkspaceClaims {
|
|
2797
|
+
claimed: Set<string>;
|
|
2798
|
+
/** Claim count contributed by each registered project. */
|
|
2799
|
+
byProject: Record<string, number>;
|
|
2800
|
+
lockPaths: string[];
|
|
2801
|
+
}
|
|
2802
|
+
/**
|
|
2803
|
+
* The complete account-wide claim set, derived from every registered lock.
|
|
2804
|
+
*
|
|
2805
|
+
* Delegates the union rule itself to `loadClaims` rather than reimplementing
|
|
2806
|
+
* it, so the workspace and single-project `--claims` paths cannot drift. Each
|
|
2807
|
+
* lock is loaded one at a time — rather than handing `loadClaims` the whole
|
|
2808
|
+
* path list at once — purely so a failure can be attributed to the project
|
|
2809
|
+
* that owns it; the safety property (any unreadable registered lock aborts
|
|
2810
|
+
* before returning a claim set) is identical either way.
|
|
2811
|
+
*/
|
|
2812
|
+
declare function workspaceClaims(ws: Workspace, dir: string): Promise<WorkspaceClaims>;
|
|
2813
|
+
interface WorkspaceProjectStatus {
|
|
2814
|
+
id: string;
|
|
2815
|
+
provider: string;
|
|
2816
|
+
account: string | null;
|
|
2817
|
+
manifest: string;
|
|
2818
|
+
lock: string;
|
|
2819
|
+
entries: number;
|
|
2820
|
+
byState: Record<PlanState, number>;
|
|
2821
|
+
spendByUnit: Record<CostUnit, number>;
|
|
2822
|
+
error: string | null;
|
|
2823
|
+
}
|
|
2824
|
+
interface WorkspaceStatusReport {
|
|
2825
|
+
version: 1;
|
|
2826
|
+
safe: boolean;
|
|
2827
|
+
/** The catalog's own directory — resolved paths in `projects` sit under it. */
|
|
2828
|
+
dir: string;
|
|
2829
|
+
projects: WorkspaceProjectStatus[];
|
|
2830
|
+
totals: {
|
|
2831
|
+
byState: Record<PlanState, number>;
|
|
2832
|
+
spendByUnit: Record<CostUnit, number>;
|
|
2833
|
+
claims: number;
|
|
2834
|
+
};
|
|
2835
|
+
diagnostics: WorkspaceDiagnostic[];
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* Aggregate, read-only account/project state — offline throughout, using the
|
|
2839
|
+
* same offline cost estimator `plan` uses. A project whose manifest or lock
|
|
2840
|
+
* fails to load surfaces as that project's own `error` rather than aborting
|
|
2841
|
+
* the whole report, so one broken sibling does not hide every other
|
|
2842
|
+
* project's status. It never writes to any registered project's lock.
|
|
2843
|
+
*/
|
|
2844
|
+
declare function workspaceStatus(ws: Workspace, dir: string): Promise<WorkspaceStatusReport>;
|
|
2845
|
+
|
|
2846
|
+
export { type AdoptResult, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type CacheHealthOptions, type CacheHealthReport, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_RATE_LIMIT, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type Generator, GeneratorSchema, type GenericTileset, type JobState, type LoadedManifest, type Lock, type LockEntry, LockEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestSchema, type MapObject, type MountPlacement, type MountedSheet, type NormalizedTileRules, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, type PackedFrame, type PackedSheet, type PackedSource, type PickResult, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type Provider, type ProviderMetadata, type RateLimit, type RemoteAsset, type RemoteHashCacheHealth, type ResolvedOutput, type ResolvedSpec, type ResolvedStyleImage, type SalvageAction, type SalvageResult, type ScannedAsset, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, StyleSchema, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyTags, auditStyle, backoffMs, buildManifest, buildPlan, candidateCount, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, currentEntryOutputPath, currentOutputPath, doctor, evaluateAudit, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, findOrphans, formatCost, generationCost, groupOrphansByStyle, hex, idFromPrompt, imageMetadata, inspectCaches, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeTileRules, outliers, outputId, packSprites, packStyle, paletteDistance, parseLock, parseWorkspace, pngSize, poll, portableOutputPath, primaryOutput, pushTags, remove, renderSalvageSheet, renderSheet, requireDelete, requireList, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, retryAfterMs, runPicker, runSalvage, saveLock, saveWorkspace, scanAssets, selectEntryOutput, sha256, sha256File, shouldRetry, slugify, specHash, spendByUnit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateWorkspace, verifyArtifactBundle, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|