@clockgrove/assetgrove 0.0.0-stage → 0.3.2
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/LICENSE +21 -0
- package/README.md +277 -2
- package/dist/animation/commands.d.ts +180 -0
- package/dist/animation/commands.js +515 -0
- package/dist/animation/facing.d.ts +44 -0
- package/dist/animation/facing.js +100 -0
- package/dist/animation/fix.d.ts +136 -0
- package/dist/animation/fix.js +529 -0
- package/dist/animation/flicker.d.ts +44 -0
- package/dist/animation/flicker.js +117 -0
- package/dist/animation/halo.d.ts +72 -0
- package/dist/animation/halo.js +253 -0
- package/dist/animation/holes.d.ts +122 -0
- package/dist/animation/holes.js +262 -0
- package/dist/animation/preview.d.ts +38 -0
- package/dist/animation/preview.js +161 -0
- package/dist/animation/qa.d.ts +57 -0
- package/dist/animation/qa.js +418 -0
- package/dist/animation/run.d.ts +109 -0
- package/dist/animation/run.js +182 -0
- package/dist/animation/strip.d.ts +13 -0
- package/dist/animation/strip.js +41 -0
- package/dist/animation/template-choice.d.ts +75 -0
- package/dist/animation/template-choice.js +153 -0
- package/dist/animation/templates.d.ts +39 -0
- package/dist/animation/templates.js +333 -0
- package/dist/animation/types.d.ts +257 -0
- package/dist/animation/types.js +1 -0
- package/dist/approvals.d.ts +156 -0
- package/dist/approvals.js +369 -0
- package/dist/audio/aac.d.ts +61 -0
- package/dist/audio/aac.js +152 -0
- package/dist/audio/checks.d.ts +38 -0
- package/dist/audio/checks.js +254 -0
- package/dist/audio/delivery.d.ts +52 -0
- package/dist/audio/delivery.js +105 -0
- package/dist/audio/engine.d.ts +65 -0
- package/dist/audio/engine.js +164 -0
- package/dist/audio/handoff.d.ts +75 -0
- package/dist/audio/handoff.js +185 -0
- package/dist/audio/kinds.d.ts +6 -0
- package/dist/audio/kinds.js +315 -0
- package/dist/audio/loudness.d.ts +22 -0
- package/dist/audio/loudness.js +72 -0
- package/dist/audio/ogg.d.ts +27 -0
- package/dist/audio/ogg.js +65 -0
- package/dist/audio/operations.d.ts +20 -0
- package/dist/audio/operations.js +335 -0
- package/dist/audio/opus.d.ts +40 -0
- package/dist/audio/opus.js +108 -0
- package/dist/audio/profile.d.ts +200 -0
- package/dist/audio/profile.js +126 -0
- package/dist/audio/run.d.ts +83 -0
- package/dist/audio/run.js +192 -0
- package/dist/audio/vorbis-comments.d.ts +25 -0
- package/dist/audio/vorbis-comments.js +243 -0
- package/dist/audio/waveform.d.ts +13 -0
- package/dist/audio/waveform.js +52 -0
- package/dist/audio-parameters.d.ts +17 -0
- package/dist/audio-parameters.js +45 -0
- package/dist/audit/bar.d.ts +65 -0
- package/dist/audit/bar.js +97 -0
- package/dist/audit/members.d.ts +40 -0
- package/dist/audit/members.js +119 -0
- package/dist/bible-view.d.ts +10 -0
- package/dist/bible-view.js +122 -0
- package/dist/bible.d.ts +272 -0
- package/dist/bible.js +641 -0
- package/dist/budget.d.ts +119 -0
- package/dist/budget.js +227 -0
- package/dist/call-parameters.d.ts +71 -0
- package/dist/call-parameters.js +90 -0
- package/dist/calls.d.ts +145 -0
- package/dist/calls.js +788 -0
- package/dist/cli/main.d.ts +22 -0
- package/dist/cli/main.js +137 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +5 -0
- package/dist/commands/animation-qa.d.ts +1 -0
- package/dist/commands/animation-qa.js +240 -0
- package/dist/commands/apply.d.ts +12 -0
- package/dist/commands/apply.js +181 -0
- package/dist/commands/audit.d.ts +92 -0
- package/dist/commands/audit.js +555 -0
- package/dist/commands/bible.d.ts +1 -0
- package/dist/commands/bible.js +39 -0
- package/dist/commands/browse.d.ts +12 -0
- package/dist/commands/browse.js +113 -0
- package/dist/commands/card.d.ts +3 -0
- package/dist/commands/card.js +445 -0
- package/dist/commands/compare.d.ts +1 -0
- package/dist/commands/compare.js +90 -0
- package/dist/commands/confirm.d.ts +1 -0
- package/dist/commands/confirm.js +267 -0
- package/dist/commands/context.d.ts +43 -0
- package/dist/commands/context.js +115 -0
- package/dist/commands/deliver.d.ts +1 -0
- package/dist/commands/deliver.js +99 -0
- package/dist/commands/disclosure.d.ts +1 -0
- package/dist/commands/disclosure.js +80 -0
- package/dist/commands/doctor.d.ts +1 -0
- package/dist/commands/doctor.js +112 -0
- package/dist/commands/estimate.d.ts +2 -0
- package/dist/commands/estimate.js +80 -0
- package/dist/commands/extensions.d.ts +2 -0
- package/dist/commands/extensions.js +70 -0
- package/dist/commands/fix-frame.d.ts +1 -0
- package/dist/commands/fix-frame.js +206 -0
- package/dist/commands/generate-sheet.d.ts +1 -0
- package/dist/commands/generate-sheet.js +245 -0
- package/dist/commands/identity-check.d.ts +1 -0
- package/dist/commands/identity-check.js +110 -0
- package/dist/commands/identity-eval.d.ts +1 -0
- package/dist/commands/identity-eval.js +197 -0
- package/dist/commands/import.d.ts +7 -0
- package/dist/commands/import.js +472 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +117 -0
- package/dist/commands/intake.d.ts +1 -0
- package/dist/commands/intake.js +56 -0
- package/dist/commands/labels.d.ts +1 -0
- package/dist/commands/labels.js +101 -0
- package/dist/commands/library.d.ts +9 -0
- package/dist/commands/library.js +711 -0
- package/dist/commands/lod.d.ts +1 -0
- package/dist/commands/lod.js +93 -0
- package/dist/commands/look-dev.d.ts +1 -0
- package/dist/commands/look-dev.js +148 -0
- package/dist/commands/materials.d.ts +1 -0
- package/dist/commands/materials.js +223 -0
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.js +53 -0
- package/dist/commands/migrate.d.ts +1 -0
- package/dist/commands/migrate.js +123 -0
- package/dist/commands/op.d.ts +5 -0
- package/dist/commands/op.js +114 -0
- package/dist/commands/ops.d.ts +1 -0
- package/dist/commands/ops.js +17 -0
- package/dist/commands/pick-batch.d.ts +24 -0
- package/dist/commands/pick-batch.js +343 -0
- package/dist/commands/pick.d.ts +48 -0
- package/dist/commands/pick.js +469 -0
- package/dist/commands/plan.d.ts +3 -0
- package/dist/commands/plan.js +156 -0
- package/dist/commands/recipe.d.ts +1 -0
- package/dist/commands/recipe.js +52 -0
- package/dist/commands/registry.d.ts +5 -0
- package/dist/commands/registry.js +121 -0
- package/dist/commands/render-sprite.d.ts +1 -0
- package/dist/commands/render-sprite.js +67 -0
- package/dist/commands/rendition.d.ts +1 -0
- package/dist/commands/rendition.js +56 -0
- package/dist/commands/request-change.d.ts +2 -0
- package/dist/commands/request-change.js +950 -0
- package/dist/commands/result.d.ts +34 -0
- package/dist/commands/result.js +237 -0
- package/dist/commands/review.d.ts +28 -0
- package/dist/commands/review.js +444 -0
- package/dist/commands/rig.d.ts +1 -0
- package/dist/commands/rig.js +74 -0
- package/dist/commands/runner.d.ts +45 -0
- package/dist/commands/runner.js +297 -0
- package/dist/commands/runs.d.ts +22 -0
- package/dist/commands/runs.js +159 -0
- package/dist/commands/search.d.ts +69 -0
- package/dist/commands/search.js +638 -0
- package/dist/commands/settings.d.ts +2 -0
- package/dist/commands/settings.js +284 -0
- package/dist/commands/spend.d.ts +2 -0
- package/dist/commands/spend.js +159 -0
- package/dist/commands/stage-source.d.ts +1 -0
- package/dist/commands/stage-source.js +58 -0
- package/dist/commands/stage.d.ts +9 -0
- package/dist/commands/stage.js +229 -0
- package/dist/commands/storage.d.ts +3 -0
- package/dist/commands/storage.js +200 -0
- package/dist/commands/turnaround.d.ts +1 -0
- package/dist/commands/turnaround.js +171 -0
- package/dist/commands/types.d.ts +195 -0
- package/dist/commands/types.js +7 -0
- package/dist/commands/vary.d.ts +2 -0
- package/dist/commands/vary.js +222 -0
- package/dist/commands/write-families.d.ts +14 -0
- package/dist/commands/write-families.js +158 -0
- package/dist/compare.d.ts +87 -0
- package/dist/compare.js +306 -0
- package/dist/confirm/delegation.d.ts +30 -0
- package/dist/confirm/delegation.js +31 -0
- package/dist/confirm/index.d.ts +84 -0
- package/dist/confirm/index.js +176 -0
- package/dist/confirm/mcp.d.ts +60 -0
- package/dist/confirm/mcp.js +253 -0
- package/dist/confirm/pending.d.ts +11 -0
- package/dist/confirm/pending.js +40 -0
- package/dist/confirm/prompt.d.ts +65 -0
- package/dist/confirm/prompt.js +68 -0
- package/dist/confirm/records.d.ts +17 -0
- package/dist/confirm/records.js +63 -0
- package/dist/contact.d.ts +80 -0
- package/dist/contact.js +224 -0
- package/dist/credentials.d.ts +170 -0
- package/dist/credentials.js +598 -0
- package/dist/dataflows.d.ts +32 -0
- package/dist/dataflows.js +42 -0
- package/dist/delivery.d.ts +89 -0
- package/dist/delivery.js +355 -0
- package/dist/disclosure.d.ts +84 -0
- package/dist/disclosure.js +397 -0
- package/dist/env.d.ts +90 -0
- package/dist/env.js +236 -0
- package/dist/errors.d.ts +90 -0
- package/dist/errors.js +105 -0
- package/dist/extension/api.d.ts +389 -0
- package/dist/extension/api.js +20 -0
- package/dist/extension/context.d.ts +9 -0
- package/dist/extension/context.js +60 -0
- package/dist/extension/helpers.d.ts +75 -0
- package/dist/extension/helpers.js +107 -0
- package/dist/extension/http.d.ts +32 -0
- package/dist/extension/http.js +104 -0
- package/dist/extension/setup.d.ts +53 -0
- package/dist/extension/setup.js +162 -0
- package/dist/extension/tools.d.ts +97 -0
- package/dist/extension/tools.js +235 -0
- package/dist/extensions/core.d.ts +7 -0
- package/dist/extensions/core.js +18 -0
- package/dist/extensions/errors.d.ts +22 -0
- package/dist/extensions/errors.js +34 -0
- package/dist/extensions/registry.d.ts +119 -0
- package/dist/extensions/registry.js +535 -0
- package/dist/extensions/version.d.ts +9 -0
- package/dist/extensions/version.js +57 -0
- package/dist/formats.d.ts +46 -0
- package/dist/formats.js +81 -0
- package/dist/frames.d.ts +58 -0
- package/dist/frames.js +80 -0
- package/dist/gateway/anthropic.d.ts +22 -0
- package/dist/gateway/anthropic.js +65 -0
- package/dist/gateway/elevenlabs.d.ts +36 -0
- package/dist/gateway/elevenlabs.js +192 -0
- package/dist/gateway/failure.d.ts +29 -0
- package/dist/gateway/failure.js +70 -0
- package/dist/gateway/openai-compatible.d.ts +20 -0
- package/dist/gateway/openai-compatible.js +76 -0
- package/dist/gateway/openai.d.ts +28 -0
- package/dist/gateway/openai.js +101 -0
- package/dist/gateway/provider.d.ts +380 -0
- package/dist/gateway/provider.js +5 -0
- package/dist/gateway/scripted.d.ts +252 -0
- package/dist/gateway/scripted.js +244 -0
- package/dist/gateway/stability.d.ts +38 -0
- package/dist/gateway/stability.js +232 -0
- package/dist/gateway/structured.d.ts +31 -0
- package/dist/gateway/structured.js +83 -0
- package/dist/gateway/tripo.d.ts +48 -0
- package/dist/gateway/tripo.js +374 -0
- package/dist/gateway/vercel.d.ts +52 -0
- package/dist/gateway/vercel.js +298 -0
- package/dist/generators/generator.d.ts +236 -0
- package/dist/generators/generator.js +12 -0
- package/dist/generators/image.d.ts +21 -0
- package/dist/generators/image.js +286 -0
- package/dist/generators/spec-schema.d.ts +29 -0
- package/dist/generators/spec-schema.js +21 -0
- package/dist/git-marker.d.ts +3 -0
- package/dist/git-marker.js +13 -0
- package/dist/gitlfs.d.ts +38 -0
- package/dist/gitlfs.js +171 -0
- package/dist/guard.d.ts +55 -0
- package/dist/guard.js +323 -0
- package/dist/handoff/current-profile.d.ts +48 -0
- package/dist/handoff/current-profile.js +127 -0
- package/dist/handoff/doctor.d.ts +26 -0
- package/dist/handoff/doctor.js +249 -0
- package/dist/handoff/mark-check.d.ts +17 -0
- package/dist/handoff/mark-check.js +66 -0
- package/dist/handoff/presets/aseprite-json.d.ts +5 -0
- package/dist/handoff/presets/aseprite-json.js +45 -0
- package/dist/handoff/presets/atlas-json.d.ts +44 -0
- package/dist/handoff/presets/atlas-json.js +195 -0
- package/dist/handoff/presets/atlas-pack.d.ts +14 -0
- package/dist/handoff/presets/atlas-pack.js +431 -0
- package/dist/handoff/presets/index.d.ts +273 -0
- package/dist/handoff/presets/index.js +58 -0
- package/dist/handoff/presets/manifest.d.ts +2 -0
- package/dist/handoff/presets/manifest.js +49 -0
- package/dist/handoff/usage.d.ts +27 -0
- package/dist/handoff/usage.js +159 -0
- package/dist/handoff.d.ts +345 -0
- package/dist/handoff.js +1221 -0
- package/dist/identity-eval.d.ts +156 -0
- package/dist/identity-eval.js +321 -0
- package/dist/identity.d.ts +293 -0
- package/dist/identity.js +675 -0
- package/dist/image/apply-style.d.ts +4 -0
- package/dist/image/apply-style.js +37 -0
- package/dist/image/digits.d.ts +5 -0
- package/dist/image/digits.js +40 -0
- package/dist/image/ktx2.d.ts +83 -0
- package/dist/image/ktx2.js +196 -0
- package/dist/image/raster.d.ts +23 -0
- package/dist/image/raster.js +77 -0
- package/dist/image/resample.d.ts +10 -0
- package/dist/image/resample.js +82 -0
- package/dist/image/webp.d.ts +17 -0
- package/dist/image/webp.js +323 -0
- package/dist/init.d.ts +132 -0
- package/dist/init.js +425 -0
- package/dist/inputs.d.ts +67 -0
- package/dist/inputs.js +151 -0
- package/dist/json.d.ts +7 -0
- package/dist/json.js +27 -0
- package/dist/keys.d.ts +34 -0
- package/dist/keys.js +198 -0
- package/dist/kind-schemas.d.ts +17 -0
- package/dist/kind-schemas.js +205 -0
- package/dist/library/actions.d.ts +76 -0
- package/dist/library/actions.js +212 -0
- package/dist/library/adopt.d.ts +177 -0
- package/dist/library/adopt.js +624 -0
- package/dist/library/canonical.d.ts +7 -0
- package/dist/library/canonical.js +29 -0
- package/dist/library/card.d.ts +138 -0
- package/dist/library/card.js +532 -0
- package/dist/library/credits.d.ts +70 -0
- package/dist/library/credits.js +222 -0
- package/dist/library/describe.d.ts +48 -0
- package/dist/library/describe.js +199 -0
- package/dist/library/diff.d.ts +26 -0
- package/dist/library/diff.js +208 -0
- package/dist/library/exact.d.ts +15 -0
- package/dist/library/exact.js +47 -0
- package/dist/library/extent.d.ts +56 -0
- package/dist/library/extent.js +205 -0
- package/dist/library/folder.d.ts +85 -0
- package/dist/library/folder.js +291 -0
- package/dist/library/labels.d.ts +29 -0
- package/dist/library/labels.js +112 -0
- package/dist/library/lfs.d.ts +42 -0
- package/dist/library/lfs.js +140 -0
- package/dist/library/maintain.d.ts +100 -0
- package/dist/library/maintain.js +750 -0
- package/dist/library/media-metadata.d.ts +19 -0
- package/dist/library/media-metadata.js +92 -0
- package/dist/library/paths.d.ts +7 -0
- package/dist/library/paths.js +65 -0
- package/dist/library/relations.d.ts +59 -0
- package/dist/library/relations.js +176 -0
- package/dist/library/review.d.ts +204 -0
- package/dist/library/review.js +545 -0
- package/dist/library/stale.d.ts +88 -0
- package/dist/library/stale.js +229 -0
- package/dist/library/suggestions.d.ts +37 -0
- package/dist/library/suggestions.js +146 -0
- package/dist/library/summary.d.ts +65 -0
- package/dist/library/summary.js +138 -0
- package/dist/library/undo.d.ts +18 -0
- package/dist/library/undo.js +141 -0
- package/dist/library/worklist.d.ts +42 -0
- package/dist/library/worklist.js +91 -0
- package/dist/library/write.d.ts +282 -0
- package/dist/library/write.js +790 -0
- package/dist/license.d.ts +67 -0
- package/dist/license.js +205 -0
- package/dist/limits.d.ts +51 -0
- package/dist/limits.js +100 -0
- package/dist/loop.d.ts +244 -0
- package/dist/loop.js +377 -0
- package/dist/material/core.d.ts +70 -0
- package/dist/material/core.js +238 -0
- package/dist/material/engine.d.ts +15 -0
- package/dist/material/engine.js +141 -0
- package/dist/material/flicker.d.ts +26 -0
- package/dist/material/flicker.js +71 -0
- package/dist/material/operations.d.ts +2 -0
- package/dist/material/operations.js +48 -0
- package/dist/material/pipeline.d.ts +51 -0
- package/dist/material/pipeline.js +431 -0
- package/dist/material/profile.d.ts +29 -0
- package/dist/material/profile.js +97 -0
- package/dist/material/rendition.d.ts +5 -0
- package/dist/material/rendition.js +76 -0
- package/dist/mcp.d.ts +72 -0
- package/dist/mcp.js +514 -0
- package/dist/media.d.ts +36 -0
- package/dist/media.js +46 -0
- package/dist/metadata.d.ts +61 -0
- package/dist/metadata.js +748 -0
- package/dist/model-declarations.d.ts +28 -0
- package/dist/model-declarations.js +14 -0
- package/dist/model3d/clip-map.d.ts +49 -0
- package/dist/model3d/clip-map.js +129 -0
- package/dist/model3d/core-checks.d.ts +61 -0
- package/dist/model3d/core-checks.js +278 -0
- package/dist/model3d/facing.d.ts +49 -0
- package/dist/model3d/facing.js +125 -0
- package/dist/model3d/generator.d.ts +19 -0
- package/dist/model3d/generator.js +482 -0
- package/dist/model3d/glb.d.ts +120 -0
- package/dist/model3d/glb.js +155 -0
- package/dist/model3d/handoff.d.ts +37 -0
- package/dist/model3d/handoff.js +131 -0
- package/dist/model3d/lod/chain.d.ts +50 -0
- package/dist/model3d/lod/chain.js +447 -0
- package/dist/model3d/lod/command.d.ts +38 -0
- package/dist/model3d/lod/command.js +377 -0
- package/dist/model3d/lod/qa.d.ts +36 -0
- package/dist/model3d/lod/qa.js +189 -0
- package/dist/model3d/lod/settings.d.ts +36 -0
- package/dist/model3d/lod/settings.js +137 -0
- package/dist/model3d/lod/simplify.d.ts +35 -0
- package/dist/model3d/lod/simplify.js +337 -0
- package/dist/model3d/lod/textures.d.ts +46 -0
- package/dist/model3d/lod/textures.js +190 -0
- package/dist/model3d/lookdev/command.d.ts +219 -0
- package/dist/model3d/lookdev/command.js +1795 -0
- package/dist/model3d/lookdev/edit.d.ts +44 -0
- package/dist/model3d/lookdev/edit.js +241 -0
- package/dist/model3d/lookdev/groom.d.ts +86 -0
- package/dist/model3d/lookdev/groom.js +462 -0
- package/dist/model3d/lookdev/markings.d.ts +98 -0
- package/dist/model3d/lookdev/markings.js +319 -0
- package/dist/model3d/lookdev/project.d.ts +100 -0
- package/dist/model3d/lookdev/project.js +721 -0
- package/dist/model3d/lookdev/settings.d.ts +65 -0
- package/dist/model3d/lookdev/settings.js +103 -0
- package/dist/model3d/lookdev/texels.d.ts +32 -0
- package/dist/model3d/lookdev/texels.js +192 -0
- package/dist/model3d/profile.d.ts +101 -0
- package/dist/model3d/profile.js +132 -0
- package/dist/model3d/prop.d.ts +29 -0
- package/dist/model3d/prop.js +317 -0
- package/dist/model3d/qa.d.ts +27 -0
- package/dist/model3d/qa.js +105 -0
- package/dist/model3d/render.d.ts +172 -0
- package/dist/model3d/render.js +791 -0
- package/dist/model3d/rig/build.d.ts +14 -0
- package/dist/model3d/rig/build.js +210 -0
- package/dist/model3d/rig/candidate.d.ts +50 -0
- package/dist/model3d/rig/candidate.js +132 -0
- package/dist/model3d/rig/command.d.ts +50 -0
- package/dist/model3d/rig/command.js +229 -0
- package/dist/model3d/rig/fit.d.ts +88 -0
- package/dist/model3d/rig/fit.js +568 -0
- package/dist/model3d/rig/gait.d.ts +105 -0
- package/dist/model3d/rig/gait.js +334 -0
- package/dist/model3d/rig/math.d.ts +27 -0
- package/dist/model3d/rig/math.js +92 -0
- package/dist/model3d/rig/motion.d.ts +26 -0
- package/dist/model3d/rig/motion.js +223 -0
- package/dist/model3d/rig/qa.d.ts +76 -0
- package/dist/model3d/rig/qa.js +357 -0
- package/dist/model3d/rig/rig.d.ts +55 -0
- package/dist/model3d/rig/rig.js +213 -0
- package/dist/model3d/rig/template.d.ts +195 -0
- package/dist/model3d/rig/template.js +456 -0
- package/dist/model3d/scene.d.ts +115 -0
- package/dist/model3d/scene.js +684 -0
- package/dist/model3d/views.d.ts +77 -0
- package/dist/model3d/views.js +190 -0
- package/dist/origin.d.ts +162 -0
- package/dist/origin.js +134 -0
- package/dist/paths.d.ts +53 -0
- package/dist/paths.js +240 -0
- package/dist/planning.d.ts +261 -0
- package/dist/planning.js +1470 -0
- package/dist/policy/blocklist.d.ts +28 -0
- package/dist/policy/blocklist.js +58 -0
- package/dist/policy/brief.d.ts +67 -0
- package/dist/policy/brief.js +110 -0
- package/dist/policy/cuts.d.ts +26 -0
- package/dist/policy/cuts.js +80 -0
- package/dist/policy/model.d.ts +69 -0
- package/dist/policy/model.js +202 -0
- package/dist/policy/text.d.ts +183 -0
- package/dist/policy/text.js +285 -0
- package/dist/postprocess.d.ts +68 -0
- package/dist/postprocess.js +302 -0
- package/dist/profile.d.ts +5 -0
- package/dist/profile.js +98 -0
- package/dist/project-rules.d.ts +54 -0
- package/dist/project-rules.js +105 -0
- package/dist/provenance-binding.d.ts +55 -0
- package/dist/provenance-binding.js +352 -0
- package/dist/providers/adapter.d.ts +176 -0
- package/dist/providers/adapter.js +418 -0
- package/dist/providers/index.d.ts +33 -0
- package/dist/providers/index.js +49 -0
- package/dist/providers/script.d.ts +13 -0
- package/dist/providers/script.js +65 -0
- package/dist/providers/set.d.ts +76 -0
- package/dist/providers/set.js +134 -0
- package/dist/pure-cbor.d.ts +1 -0
- package/dist/pure-cbor.js +8 -0
- package/dist/qa/stability.d.ts +215 -0
- package/dist/qa/stability.js +393 -0
- package/dist/qa/stability.json +32 -0
- package/dist/qa.d.ts +36 -0
- package/dist/qa.js +148 -0
- package/dist/reconcile.d.ts +111 -0
- package/dist/reconcile.js +416 -0
- package/dist/redact.d.ts +29 -0
- package/dist/redact.js +74 -0
- package/dist/regions.d.ts +49 -0
- package/dist/regions.js +113 -0
- package/dist/release-policy.d.ts +99 -0
- package/dist/release-policy.js +266 -0
- package/dist/request.d.ts +74 -0
- package/dist/request.js +249 -0
- package/dist/routes.d.ts +327 -0
- package/dist/routes.js +1166 -0
- package/dist/runs/dir.d.ts +33 -0
- package/dist/runs/dir.js +30 -0
- package/dist/runs/execute.d.ts +86 -0
- package/dist/runs/execute.js +422 -0
- package/dist/runs/journal.d.ts +150 -0
- package/dist/runs/journal.js +216 -0
- package/dist/runs/lock.d.ts +57 -0
- package/dist/runs/lock.js +322 -0
- package/dist/runs/plan.d.ts +261 -0
- package/dist/runs/plan.js +404 -0
- package/dist/search/near-match.d.ts +32 -0
- package/dist/search/near-match.js +86 -0
- package/dist/search/reader.d.ts +17 -0
- package/dist/search/reader.js +334 -0
- package/dist/search/sheet.d.ts +4 -0
- package/dist/search/sheet.js +28 -0
- package/dist/search/style-outliers.d.ts +77 -0
- package/dist/search/style-outliers.js +166 -0
- package/dist/settings-write.d.ts +78 -0
- package/dist/settings-write.js +374 -0
- package/dist/settings.d.ts +436 -0
- package/dist/settings.js +622 -0
- package/dist/shared-settings.d.ts +4 -0
- package/dist/shared-settings.js +24 -0
- package/dist/sheet/blobs.d.ts +33 -0
- package/dist/sheet/blobs.js +145 -0
- package/dist/sheet/generate.d.ts +71 -0
- package/dist/sheet/generate.js +278 -0
- package/dist/sheet/group.d.ts +20 -0
- package/dist/sheet/group.js +191 -0
- package/dist/sheet/import.d.ts +315 -0
- package/dist/sheet/import.js +832 -0
- package/dist/sheet/matte.d.ts +25 -0
- package/dist/sheet/matte.js +508 -0
- package/dist/sheet/media-import.d.ts +41 -0
- package/dist/sheet/media-import.js +118 -0
- package/dist/sheet/register.d.ts +17 -0
- package/dist/sheet/register.js +176 -0
- package/dist/sheet/slice.d.ts +73 -0
- package/dist/sheet/slice.js +912 -0
- package/dist/sheet/types.d.ts +225 -0
- package/dist/sheet/types.js +1 -0
- package/dist/source/aseprite.d.ts +14 -0
- package/dist/source/aseprite.js +124 -0
- package/dist/source/stage.d.ts +24 -0
- package/dist/source/stage.js +172 -0
- package/dist/spend.d.ts +220 -0
- package/dist/spend.js +436 -0
- package/dist/sprite/render.d.ts +22 -0
- package/dist/sprite/render.js +272 -0
- package/dist/storage.d.ts +135 -0
- package/dist/storage.js +405 -0
- package/dist/style.d.ts +19 -0
- package/dist/style.js +26 -0
- package/dist/template.d.ts +29 -0
- package/dist/template.js +98 -0
- package/dist/testing/aseprite.d.ts +54 -0
- package/dist/testing/aseprite.js +191 -0
- package/dist/testing/cli.d.ts +24 -0
- package/dist/testing/cli.js +91 -0
- package/dist/testing/conformance.d.ts +61 -0
- package/dist/testing/conformance.js +455 -0
- package/dist/testing/index.d.ts +23 -0
- package/dist/testing/index.js +15 -0
- package/dist/testing/mcp.d.ts +25 -0
- package/dist/testing/mcp.js +80 -0
- package/dist/testing/project.d.ts +81 -0
- package/dist/testing/project.js +215 -0
- package/dist/testing/samples.d.ts +42 -0
- package/dist/testing/samples.js +122 -0
- package/dist/transform/operations.d.ts +5 -0
- package/dist/transform/operations.js +320 -0
- package/dist/transform/raster-engine.d.ts +9 -0
- package/dist/transform/raster-engine.js +329 -0
- package/dist/transform/rendition.d.ts +65 -0
- package/dist/transform/rendition.js +317 -0
- package/dist/transform/run.d.ts +138 -0
- package/dist/transform/run.js +442 -0
- package/dist/transform/schema.d.ts +33 -0
- package/dist/transform/schema.js +73 -0
- package/dist/transform/types.d.ts +101 -0
- package/dist/transform/types.js +1 -0
- package/dist/tree/address.d.ts +18 -0
- package/dist/tree/address.js +59 -0
- package/dist/tree/list.d.ts +18 -0
- package/dist/tree/list.js +101 -0
- package/dist/tree/project.d.ts +61 -0
- package/dist/tree/project.js +145 -0
- package/dist/tree/read.d.ts +43 -0
- package/dist/tree/read.js +715 -0
- package/dist/tree/search.d.ts +20 -0
- package/dist/tree/search.js +44 -0
- package/dist/tree/serve.d.ts +79 -0
- package/dist/tree/serve.js +415 -0
- package/dist/tree/thumbs.d.ts +26 -0
- package/dist/tree/thumbs.js +134 -0
- package/dist/turnaround.d.ts +195 -0
- package/dist/turnaround.js +622 -0
- package/dist/types.d.ts +595 -0
- package/dist/types.js +1 -0
- package/package.json +112 -3
- package/policy/blocklist.json +47 -0
- package/policy/prompt-policy-cuts.json +15 -0
- package/skills/art-direction/SKILL.md +16 -0
- package/skills/art-direction/default.md +14 -0
- package/skills/art-direction/presets/cozy-storybook.md +121 -0
- package/skills/art-direction/presets/dark-gritty-isometric.md +121 -0
- package/skills/art-direction/presets/flat-cartoon-kids.md +121 -0
- package/skills/art-direction/references/bible-format.md +47 -0
- package/skills/assetgrove/SKILL.md +109 -0
- package/skills/assetgrove/references/commands.md +723 -0
package/dist/paths.js
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path rules for every OS (design section 14). Relative paths in records and JSON output use `/`,
|
|
3
|
+
* and readers accept `/` only. A set of writes in which two name the same file or differ only by
|
|
4
|
+
* case, or a written path segment Windows cannot hold, is refused as invalid input before anything
|
|
5
|
+
* is written, so a run behaves the same on case-insensitive file systems and on Windows, where `:`
|
|
6
|
+
* names an alternate data stream. Long paths need nothing here: on Windows, Node's fs namespaces
|
|
7
|
+
* absolute paths itself.
|
|
8
|
+
*/
|
|
9
|
+
import { posix, relative, resolve, sep } from "node:path";
|
|
10
|
+
import { InputError } from "./errors.js";
|
|
11
|
+
import { DEFAULT_HANDOFF } from "./handoff/presets/index.js";
|
|
12
|
+
import { lookup } from "./template.js";
|
|
13
|
+
import { staticPrefix, within } from "./library/write.js";
|
|
14
|
+
import { libraryPath } from "./library/paths.js";
|
|
15
|
+
/** `rel` as records and JSON output carry it: `/`-separated. */
|
|
16
|
+
export function recordPath(rel) {
|
|
17
|
+
return sep === "/" ? rel : rel.split(sep).join("/");
|
|
18
|
+
}
|
|
19
|
+
/** `path` relative to `root`, as a record path. */
|
|
20
|
+
export function relativeRecordPath(root, path) {
|
|
21
|
+
return recordPath(relative(root, path));
|
|
22
|
+
}
|
|
23
|
+
/** A relative path read from a record: `/`-separated only. */
|
|
24
|
+
export function readRecordPath(rel, what = "record path") {
|
|
25
|
+
if (rel.includes("\\")) {
|
|
26
|
+
throw new InputError(`${what} "${rel}" must use "/" separators`);
|
|
27
|
+
}
|
|
28
|
+
return rel;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* `name` as one file-name segment: lower-case letters, digits and hyphens, every other run of
|
|
32
|
+
* characters (`:` and `/` included) one hyphen. Core asset kinds pass unchanged; `ext:tile`
|
|
33
|
+
* becomes `ext-tile`; a name with nothing left becomes `kind`.
|
|
34
|
+
*/
|
|
35
|
+
export function safeSegment(name) {
|
|
36
|
+
return (name
|
|
37
|
+
.toLowerCase()
|
|
38
|
+
.replace(/[^a-z0-9-]+/g, "-")
|
|
39
|
+
.replace(/^-+|-+$/g, "") || "kind");
|
|
40
|
+
}
|
|
41
|
+
/** Windows device names, which name no file with or without an extension. */
|
|
42
|
+
const RESERVED_NAME = /^(con|prn|aux|nul|com[1-9\u00b9\u00b2\u00b3]|lpt[1-9\u00b9\u00b2\u00b3])(\..*)?$/i;
|
|
43
|
+
/** Why Windows cannot hold `segment` as a file or directory name, or undefined when it can. */
|
|
44
|
+
function windowsProblem(segment) {
|
|
45
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: the pattern matches control characters on purpose
|
|
46
|
+
const bad = /[<>:"|?*\\\u0000-\u001f]/.exec(segment);
|
|
47
|
+
if (bad)
|
|
48
|
+
return `has ${JSON.stringify(bad[0])} in "${segment}"`;
|
|
49
|
+
if (/[. ]$/.test(segment) && segment !== "." && segment !== "..") {
|
|
50
|
+
return `ends "${segment}" with a dot or a space`;
|
|
51
|
+
}
|
|
52
|
+
if (RESERVED_NAME.test(segment))
|
|
53
|
+
return `names the reserved device "${segment}"`;
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* `name` as one file-name segment `windowsProblem` accepts: each character Windows refuses
|
|
58
|
+
* (`<>:"|?*`, a backslash, a control character) and `/` becomes `-`, a trailing dot or space
|
|
59
|
+
* becomes `-`, a device name gets a `_` prefix, and `""`, `.` and `..` become `artifact`.
|
|
60
|
+
*/
|
|
61
|
+
export function safeFileName(name) {
|
|
62
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: the pattern matches control characters on purpose
|
|
63
|
+
let safe = name.replace(/[<>:"|?*\\/\u0000-\u001f]/g, "-");
|
|
64
|
+
if (safe === "" || safe === "." || safe === "..")
|
|
65
|
+
return "artifact";
|
|
66
|
+
safe = safe.replace(/[. ]$/, "-");
|
|
67
|
+
if (RESERVED_NAME.test(safe))
|
|
68
|
+
safe = `_${safe}`;
|
|
69
|
+
return safe;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Refuses, before anything is written, a set of `/`-separated relative paths in which two name the
|
|
73
|
+
* same file or differ only by case, or a segment Windows cannot hold: one with `<>:"|?*`, a
|
|
74
|
+
* backslash or a control character, one ending in a dot or a space, or a device name such as `con`
|
|
75
|
+
* or `lpt1.txt`. The rules hold on every OS, so a target checked out anywhere holds every file.
|
|
76
|
+
*/
|
|
77
|
+
export function checkWrites(rels) {
|
|
78
|
+
const seen = new Map();
|
|
79
|
+
for (const rel of rels) {
|
|
80
|
+
for (const segment of rel.split("/")) {
|
|
81
|
+
const problem = windowsProblem(segment);
|
|
82
|
+
if (problem !== undefined)
|
|
83
|
+
throw new InputError(`written path "${rel}" ${problem}`);
|
|
84
|
+
}
|
|
85
|
+
const normal = posix.normalize(rel);
|
|
86
|
+
const key = normal.toLowerCase();
|
|
87
|
+
const other = seen.get(key);
|
|
88
|
+
if (other !== undefined) {
|
|
89
|
+
throw new InputError(other === normal
|
|
90
|
+
? `two writes name the same path "${normal}"`
|
|
91
|
+
: `written paths "${other}" and "${normal}" differ only by case`);
|
|
92
|
+
}
|
|
93
|
+
seen.set(key, normal);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** Whether the manifest template embeds the whole provenance record as `"{{provenance}}"`. */
|
|
97
|
+
export function embedsProvenance(template) {
|
|
98
|
+
if (typeof template === "string")
|
|
99
|
+
return /^\{\{\s*provenance\s*\}\}$/.test(template);
|
|
100
|
+
if (Array.isArray(template))
|
|
101
|
+
return template.some(embedsProvenance);
|
|
102
|
+
if (template !== null && typeof template === "object") {
|
|
103
|
+
return Object.values(template).some(embedsProvenance);
|
|
104
|
+
}
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
/** The shared layout with this kind's media and optional manifest override. */
|
|
108
|
+
export function layoutFor(profile, kind) {
|
|
109
|
+
const override = profile.kinds?.[kind]?.layout;
|
|
110
|
+
return override === undefined ? profile.layout : { ...profile.layout, ...override };
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Refuses a kind's layout override that renders outside the library root, naming the kind and the
|
|
114
|
+
* field. Only overridden fields are checked; the root is `library.root` or the fixed prefix of the
|
|
115
|
+
* shared `layout.media`. At profile load the default render fills `{{profile.*}}` from the
|
|
116
|
+
* profile's values and name, and every other value with a plain segment.
|
|
117
|
+
*/
|
|
118
|
+
export function checkKindLayoutPaths(profile, kind, render = loadRender(profile), targetDir) {
|
|
119
|
+
const override = profile.kinds?.[kind]?.layout;
|
|
120
|
+
if (override === undefined)
|
|
121
|
+
return;
|
|
122
|
+
const base = resolve(targetDir ?? ".");
|
|
123
|
+
const shared = profile.layout?.media;
|
|
124
|
+
const rootTemplate = profile.library?.root ?? (typeof shared === "string" ? staticPrefix(shared) : undefined);
|
|
125
|
+
if (rootTemplate === undefined) {
|
|
126
|
+
throw new InputError(`kinds.${kind}.layout.media needs a library root: set library.root or layout.media`);
|
|
127
|
+
}
|
|
128
|
+
const rootRel = rootTemplate.replaceAll("\\", "/");
|
|
129
|
+
if (posix.isAbsolute(rootRel) || /^[a-z]:/i.test(rootRel)) {
|
|
130
|
+
throw new InputError(`library.root "${rootRel}" must be a path inside the target`);
|
|
131
|
+
}
|
|
132
|
+
const root = resolve(base, rootRel);
|
|
133
|
+
for (const field of ["media", "manifest"]) {
|
|
134
|
+
const template = override[field];
|
|
135
|
+
if (template === undefined)
|
|
136
|
+
continue;
|
|
137
|
+
const path = render(template);
|
|
138
|
+
const normalized = path.replaceAll("\\", "/");
|
|
139
|
+
if (posix.isAbsolute(normalized) ||
|
|
140
|
+
/^[a-z]:/i.test(normalized) ||
|
|
141
|
+
!within(root, resolve(base, normalized)) ||
|
|
142
|
+
resolve(base, normalized) === root) {
|
|
143
|
+
throw new InputError(`kinds.${kind}.layout.${field} path "${path}" leaves the library root`);
|
|
144
|
+
}
|
|
145
|
+
if (targetDir !== undefined) {
|
|
146
|
+
libraryPath(root, base, path, `kinds.${kind}.layout.${field}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/** The load-time render: `{{profile.*}}` from the profile, any other value as `value`. */
|
|
151
|
+
function loadRender(profile) {
|
|
152
|
+
const context = { profile: { ...profile.values, name: profile.name } };
|
|
153
|
+
return (template) => template.replace(/\{\{\s*([^{}]*?)\s*\}\}/g, (_, path) => {
|
|
154
|
+
const value = path.startsWith("profile.") ? lookup(context, path) : undefined;
|
|
155
|
+
if (value === undefined || value === null)
|
|
156
|
+
return "value";
|
|
157
|
+
return typeof value === "string" ? value : JSON.stringify(value);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
const SPEC_VALUE = /\{\{\s*spec\.([\w.-]+)(\?)?\s*\}\}/g;
|
|
161
|
+
const WHOLE_OPTIONAL = /^\{\{\s*[\w.-]+\?\s*\}\}$/;
|
|
162
|
+
/**
|
|
163
|
+
* Refuses a profile whose layout (`media`, `manifest`, `provenance`) or manifest template names a
|
|
164
|
+
* spec value this spec does not set, as `layout.media needs spec.animationFamily`. The manifest
|
|
165
|
+
* template is checked only when the profile's hand-off lists the `manifest` preset, the one preset
|
|
166
|
+
* that renders it. A whole-string `"{{spec.x?}}"` in the manifest is optional and passes. The hand-off renders the same values, so
|
|
167
|
+
* this refusal comes before any paid call instead of as a render error at pick.
|
|
168
|
+
*/
|
|
169
|
+
export function checkSpecValues(profile, spec) {
|
|
170
|
+
const values = { ...spec.fields, ...spec };
|
|
171
|
+
const check = (field, template) => {
|
|
172
|
+
if (typeof template === "string") {
|
|
173
|
+
if (WHOLE_OPTIONAL.test(template))
|
|
174
|
+
return;
|
|
175
|
+
// Inline, `{{spec.x?}}` is not a template value and renders as written.
|
|
176
|
+
for (const [, path, optional] of template.matchAll(SPEC_VALUE)) {
|
|
177
|
+
if (path !== undefined && !optional && lookup(values, path) === undefined) {
|
|
178
|
+
throw new InputError(`${field} needs spec.${path}, which the spec does not set`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else if (Array.isArray(template)) {
|
|
183
|
+
template.forEach((item, i) => check(`${field}.${i}`, item));
|
|
184
|
+
}
|
|
185
|
+
else if (template !== null && typeof template === "object") {
|
|
186
|
+
for (const [key, item] of Object.entries(template))
|
|
187
|
+
check(`${field}.${key}`, item);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const layout = layoutFor(profile, spec.kind);
|
|
191
|
+
for (const key of ["media", "manifest", "provenance"]) {
|
|
192
|
+
if (typeof layout?.[key] === "string") {
|
|
193
|
+
const overridden = key !== "provenance" && profile.kinds?.[spec.kind]?.layout?.[key] !== undefined;
|
|
194
|
+
check(overridden ? `kinds.${spec.kind}.layout.${key}` : `layout.${key}`, layout[key]);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const handoff = profile.handoff ?? DEFAULT_HANDOFF;
|
|
198
|
+
const rendersManifest = Array.isArray(handoff) &&
|
|
199
|
+
handoff.some((entry) => entry !== null &&
|
|
200
|
+
typeof entry === "object" &&
|
|
201
|
+
entry.preset === "manifest");
|
|
202
|
+
if (rendersManifest)
|
|
203
|
+
check("manifest", profile.manifest);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Refuses, before any paid call, a profile layout whose paths for this spec could never be written:
|
|
207
|
+
* `media`, `manifest` and `provenance` are rendered from the spec and the profile, with each value
|
|
208
|
+
* only known at hand-off standing in as its own name, and checked as the hand-off checks them.
|
|
209
|
+
*/
|
|
210
|
+
export function checkLayout(profile, spec) {
|
|
211
|
+
checkSpecValues(profile, spec);
|
|
212
|
+
const layout = layoutFor(profile, spec.kind);
|
|
213
|
+
if (typeof layout?.media !== "string" || typeof layout.manifest !== "string")
|
|
214
|
+
return;
|
|
215
|
+
const context = {
|
|
216
|
+
spec: { ...spec.fields, ...spec },
|
|
217
|
+
profile: { ...profile.values, name: profile.name },
|
|
218
|
+
};
|
|
219
|
+
const stub = (template) => template.replace(/\{\{\s*([\w.-]+)\s*\}\}/g, (_, path) => {
|
|
220
|
+
const value = /^(spec|profile)\./.test(path) ? lookup(context, path) : undefined;
|
|
221
|
+
if (value === undefined)
|
|
222
|
+
return path;
|
|
223
|
+
return typeof value === "string" ? value : JSON.stringify(value);
|
|
224
|
+
});
|
|
225
|
+
checkKindLayoutPaths(profile, spec.kind, stub);
|
|
226
|
+
const media = stub(layout.media);
|
|
227
|
+
const rels = [media, stub(layout.manifest)];
|
|
228
|
+
if (typeof layout.provenance === "string")
|
|
229
|
+
rels.push(stub(layout.provenance));
|
|
230
|
+
else if (!embedsProvenance(profile.manifest))
|
|
231
|
+
rels.push(`${media}.provenance.json`);
|
|
232
|
+
const git = rels.find(inGitDir);
|
|
233
|
+
if (git !== undefined)
|
|
234
|
+
throw new InputError(`profile layout path "${git}" writes into .git`);
|
|
235
|
+
checkWrites(rels);
|
|
236
|
+
}
|
|
237
|
+
/** Whether a relative path has a `.git` segment, in any case. */
|
|
238
|
+
export function inGitDir(rel) {
|
|
239
|
+
return rel.split(/[\\/]/).some((segment) => segment.toLowerCase() === ".git");
|
|
240
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import type { AudioLoudness } from "./audio/profile.ts";
|
|
2
|
+
import type { RuleFinding } from "./project-rules.ts";
|
|
3
|
+
import { type CapSource } from "./budget.ts";
|
|
4
|
+
import type { SpendLedger } from "./spend.ts";
|
|
5
|
+
import { InputError } from "./errors.ts";
|
|
6
|
+
import type { GenerationProvider } from "./gateway/provider.ts";
|
|
7
|
+
import type { Routes } from "./routes.ts";
|
|
8
|
+
import type { CallRecord } from "./types.ts";
|
|
9
|
+
import type { StabilityEntry } from "./qa/stability.ts";
|
|
10
|
+
import type { RunRecord } from "./loop.ts";
|
|
11
|
+
import type { KindTraits } from "./frames.ts";
|
|
12
|
+
import type { PlanJob } from "./runs/plan.ts";
|
|
13
|
+
import type { PromptPart } from "./policy/text.ts";
|
|
14
|
+
import type { PromptPolicyRecord } from "./policy/text.ts";
|
|
15
|
+
import type { BriefPolicyVerdict } from "./policy/brief.ts";
|
|
16
|
+
export interface GenerationBrief {
|
|
17
|
+
purpose?: string;
|
|
18
|
+
appearsIn?: string;
|
|
19
|
+
neighbouringAssets?: string[];
|
|
20
|
+
mood?: string;
|
|
21
|
+
context?: string;
|
|
22
|
+
adjustments?: Record<string, string | number>;
|
|
23
|
+
/** Declares whether the asset is part of the game's user interface; no `ui-asset` call is made. */
|
|
24
|
+
ui?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The plan-time decisions a saved plan keeps (#378), so apply never asks again: for each
|
|
28
|
+
* out-of-bounds mood or enumerated adjustment, the allowed value chosen (`clamps`, by field name),
|
|
29
|
+
* and whether the asset is UI (`ui`).
|
|
30
|
+
*/
|
|
31
|
+
export interface PlanChoices {
|
|
32
|
+
clamps?: Record<string, string>;
|
|
33
|
+
ui?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** A decision a plan needs that its `PlanChoices` do not answer. */
|
|
36
|
+
export type PlanQuestion = {
|
|
37
|
+
kind: "clamp";
|
|
38
|
+
field: string;
|
|
39
|
+
requested: string;
|
|
40
|
+
allowed: string[];
|
|
41
|
+
} | {
|
|
42
|
+
kind: "ui";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The run options file (`--run-options`): how many candidates, the seed, the QA strictness and
|
|
46
|
+
* the exploration, and optionally a `capUsd`. Nothing in it costs money by itself: `capUsd` may
|
|
47
|
+
* lower the developer settings' `caps.runUsd` for this run, never raise it; routes come from the
|
|
48
|
+
* settings' routes and roles.
|
|
49
|
+
*/
|
|
50
|
+
export interface RunOptions {
|
|
51
|
+
candidates: number;
|
|
52
|
+
seed?: number;
|
|
53
|
+
strictness: number;
|
|
54
|
+
exploration: number;
|
|
55
|
+
capUsd?: number;
|
|
56
|
+
}
|
|
57
|
+
/** The fields a run options file may hold. */
|
|
58
|
+
export declare const RUN_OPTION_FIELDS: readonly ["candidates", "seed", "strictness", "exploration", "capUsd"];
|
|
59
|
+
export interface Clamp {
|
|
60
|
+
field: string;
|
|
61
|
+
requested: unknown;
|
|
62
|
+
applied: unknown;
|
|
63
|
+
reason: string;
|
|
64
|
+
/** The brief-clamp decision's probability for the applied value, when one chose it. */
|
|
65
|
+
probability?: number;
|
|
66
|
+
}
|
|
67
|
+
/** An input file of a saved plan: where it is and the sha256 of its bytes at planning time. */
|
|
68
|
+
export interface PlanInput {
|
|
69
|
+
path: string;
|
|
70
|
+
sha256: string;
|
|
71
|
+
}
|
|
72
|
+
/** The compiled prompts apply sends. */
|
|
73
|
+
export interface PlanPrompts {
|
|
74
|
+
/** One image prompt per frame. */
|
|
75
|
+
images: string[];
|
|
76
|
+
/** The prompt and negatives as one text, recorded in provenance. */
|
|
77
|
+
generation: string;
|
|
78
|
+
negative: string;
|
|
79
|
+
/** The QA verdict prompt. */
|
|
80
|
+
qa: string;
|
|
81
|
+
}
|
|
82
|
+
/** The format line of a saved plan. */
|
|
83
|
+
export declare const PLAN_FORMAT = "assetgrove-plan/1";
|
|
84
|
+
/**
|
|
85
|
+
* A saved plan (`assetgrove-plan/1`, a run artifact): operation names, compiled prompts, input
|
|
86
|
+
* hashes, the request digest and a hash of the planning-time resolution, and nothing else. Apply
|
|
87
|
+
* re-reads the inputs and re-resolves routes, estimates, output grants and the cap from the
|
|
88
|
+
* developer settings; it exits 2 `plan_changed` when they differ from planning time.
|
|
89
|
+
*/
|
|
90
|
+
export interface SavedPlan {
|
|
91
|
+
format: typeof PLAN_FORMAT;
|
|
92
|
+
inputs: Record<string, PlanInput>;
|
|
93
|
+
/** The operations apply runs, in order. */
|
|
94
|
+
operations: string[];
|
|
95
|
+
prompts: PlanPrompts;
|
|
96
|
+
/** The plan-time decisions the brief needed; absent when it needed none. */
|
|
97
|
+
choices?: PlanChoices;
|
|
98
|
+
/** The plan command's request digest (design section 6). */
|
|
99
|
+
requestDigest: string;
|
|
100
|
+
/** sha256 hex of the canonical JSON of the routes, estimates, grants and cap resolved at planning. */
|
|
101
|
+
resolutionSha256: string;
|
|
102
|
+
/** sha256 hex of the canonical JSON of every other field: detects accidental edits. */
|
|
103
|
+
digest: string;
|
|
104
|
+
}
|
|
105
|
+
/** A saved plan that no longer matches what its inputs and the settings resolve to: exit 2 `plan_changed`. */
|
|
106
|
+
export declare class PlanChangedError extends InputError {
|
|
107
|
+
readonly code = "plan_changed";
|
|
108
|
+
constructor(message: string);
|
|
109
|
+
}
|
|
110
|
+
export interface CreatePlanOptions {
|
|
111
|
+
biblePath: string;
|
|
112
|
+
specPath: string;
|
|
113
|
+
/** The target profile; the built-in planned-assets profile when absent. */
|
|
114
|
+
profilePath?: string;
|
|
115
|
+
briefPath?: string;
|
|
116
|
+
/** The run options file: candidates, seed, strictness, exploration and a capUsd that only lowers the cap. */
|
|
117
|
+
runOptionsPath?: string;
|
|
118
|
+
templatePath?: string;
|
|
119
|
+
/** Routes for a single provider; a `ProviderSet` brings the developer settings' own. */
|
|
120
|
+
routes?: Routes;
|
|
121
|
+
provider?: GenerationProvider;
|
|
122
|
+
providerName?: string;
|
|
123
|
+
/** The cross-run spend ledger every paid call also reserves against (src/spend.ts). */
|
|
124
|
+
ledger?: SpendLedger;
|
|
125
|
+
/** Overrides the profile's identity mode: off, shadow or enforce. */
|
|
126
|
+
identityMode?: string;
|
|
127
|
+
/** The developer settings' run cap (`caps.runUsd`); $5 when absent. */
|
|
128
|
+
runCapUsd?: number;
|
|
129
|
+
/** The settings' prompt-policy allow terms (`promptPolicy.allow`). */
|
|
130
|
+
promptAllow?: readonly string[];
|
|
131
|
+
/** The plan command's request digest; a hash of the plan's inputs and resolution when absent. */
|
|
132
|
+
requestDigest?: string;
|
|
133
|
+
/** The stability entries the style verdict filters by (src/qa/stability.json by default). */
|
|
134
|
+
stability?: readonly StabilityEntry[];
|
|
135
|
+
/** The kinds' `media` and `frames` traits; core's own kinds when absent. */
|
|
136
|
+
kinds?: KindTraits;
|
|
137
|
+
/** The developer settings' `audio.loudness`, used where the profile has no loudness block. */
|
|
138
|
+
audioLoudness?: AudioLoudness;
|
|
139
|
+
}
|
|
140
|
+
/** The integrity digest of a saved plan: every field but `digest`. */
|
|
141
|
+
export declare function planDigest(plan: Omit<SavedPlan, "digest"> | SavedPlan): string;
|
|
142
|
+
/** A run options file's values, checked: only its fields, each in range. */
|
|
143
|
+
export declare function runOptionsOf(values: unknown): RunOptions;
|
|
144
|
+
/** What the compiler did while planning; reported by `plan`, never saved in the plan. */
|
|
145
|
+
export interface CompilerRecord {
|
|
146
|
+
mode: "llm" | "template-fallback";
|
|
147
|
+
model: string;
|
|
148
|
+
templateVersion: string;
|
|
149
|
+
output: {
|
|
150
|
+
prompt: string;
|
|
151
|
+
negativePrompt: string;
|
|
152
|
+
framePrompts?: string[];
|
|
153
|
+
};
|
|
154
|
+
fallbackReason?: string;
|
|
155
|
+
rawOutput?: string;
|
|
156
|
+
requestPrompt: string;
|
|
157
|
+
calls: CallRecord[];
|
|
158
|
+
spentUsd: number;
|
|
159
|
+
}
|
|
160
|
+
/** A new plan and what planning did beside it. */
|
|
161
|
+
export interface CreatedPlan {
|
|
162
|
+
ruleFindings: RuleFinding[];
|
|
163
|
+
plan: SavedPlan;
|
|
164
|
+
compiler: CompilerRecord;
|
|
165
|
+
clamps: Clamp[];
|
|
166
|
+
forecast: {
|
|
167
|
+
generationUsd: number;
|
|
168
|
+
compilerUsd: number;
|
|
169
|
+
totalUsd: number;
|
|
170
|
+
withinCap: boolean;
|
|
171
|
+
capUsd: number;
|
|
172
|
+
capSource: CapSource;
|
|
173
|
+
};
|
|
174
|
+
promptPolicy: PromptPolicyRecord;
|
|
175
|
+
/**
|
|
176
|
+
* The brief policy's model verdicts (src/policy/brief.ts): one per protected field on the
|
|
177
|
+
* brief's free text and one per field on the compiler's text, each with its probability.
|
|
178
|
+
*/
|
|
179
|
+
briefPolicy: BriefPolicyVerdict[];
|
|
180
|
+
}
|
|
181
|
+
export declare function createPlan(options: CreatePlanOptions): Promise<CreatedPlan>;
|
|
182
|
+
/** What a plan or apply would call and spend, computed without a provider call. */
|
|
183
|
+
export interface JobForecast {
|
|
184
|
+
ruleFindings?: RuleFinding[];
|
|
185
|
+
jobs: PlanJob[];
|
|
186
|
+
candidates: number;
|
|
187
|
+
capUsd: number;
|
|
188
|
+
/** Where the cap came from. */
|
|
189
|
+
capSource?: CapSource;
|
|
190
|
+
/** Files the plan reads that no argument names: the default prompt template. */
|
|
191
|
+
reads?: Record<string, string>;
|
|
192
|
+
/** The reference images the request loads (the key pose included), as apply's saved plan lists them. */
|
|
193
|
+
referencePaths: string[];
|
|
194
|
+
/**
|
|
195
|
+
* Apply's: the saved plan's prompt text, labelled (`savedPlanPromptParts`): its input files as
|
|
196
|
+
* the plan step labels them and only the compiler's own text model-written.
|
|
197
|
+
*/
|
|
198
|
+
promptParts?: PromptPart[];
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Every call `createPlan` and the `applyPlan` after it can make, from the routes alone: the
|
|
202
|
+
* compiler call when its route is callable, as `createPlan` decides (else the template fallback
|
|
203
|
+
* makes none), generation, QA and identity calls for each candidate. Checks the inputs as
|
|
204
|
+
* `createPlan` does and calls no provider.
|
|
205
|
+
*/
|
|
206
|
+
export declare function planJobs(options: CreatePlanOptions): Promise<JobForecast>;
|
|
207
|
+
export declare function savePlan(plan: SavedPlan, path: string): Promise<void>;
|
|
208
|
+
/** How apply resolves a saved plan's calls: the provider, its routes and the run cap. */
|
|
209
|
+
export interface ResolveOptions {
|
|
210
|
+
provider: GenerationProvider;
|
|
211
|
+
/** Routes for a single provider; a `ProviderSet` brings the developer settings' own. */
|
|
212
|
+
routes?: Routes;
|
|
213
|
+
/** The developer settings' run cap (`caps.runUsd`); $5 when absent. */
|
|
214
|
+
runCapUsd?: number;
|
|
215
|
+
/** The settings' prompt-policy allow terms (`promptPolicy.allow`). */
|
|
216
|
+
promptAllow?: readonly string[];
|
|
217
|
+
/** The kinds' `media` and `frames` traits; core's own kinds when absent. */
|
|
218
|
+
kinds?: KindTraits;
|
|
219
|
+
}
|
|
220
|
+
export interface ApplyPlanOptions extends ResolveOptions {
|
|
221
|
+
providerName?: string;
|
|
222
|
+
/** The cross-run spend ledger every paid call also reserves against (src/spend.ts). */
|
|
223
|
+
ledger?: SpendLedger;
|
|
224
|
+
outDir?: string;
|
|
225
|
+
/** The author's note of this round, appended to each image prompt and checked by the prompt policy. */
|
|
226
|
+
note?: string;
|
|
227
|
+
/**
|
|
228
|
+
* The run's prompt-policy record after its model check (src/policy/model.ts): written to the
|
|
229
|
+
* run record and each candidate's provenance in place of the free check's. When its `fallback`
|
|
230
|
+
* says the check objected only to text the compiler wrote, apply generates from the repository
|
|
231
|
+
* template's prompt in place of the saved plan's.
|
|
232
|
+
*/
|
|
233
|
+
promptPolicy?: PromptPolicyRecord;
|
|
234
|
+
/** The run's directory name under `outDir`, when the caller already opened it. */
|
|
235
|
+
runId?: string;
|
|
236
|
+
/** Receives one line per provider decision call. */
|
|
237
|
+
log?: (message: string) => void;
|
|
238
|
+
/** The stability entries the style verdict filters by (src/qa/stability.json by default). */
|
|
239
|
+
stability?: readonly StabilityEntry[];
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The calls `applyPlan` would make for a saved plan, routed as it routes them. Checks the plan as
|
|
243
|
+
* apply does (format, digest, staleness, resolution) and calls no provider.
|
|
244
|
+
*/
|
|
245
|
+
export declare function applyJobs(input: SavedPlan | string, options: ResolveOptions): Promise<JobForecast>;
|
|
246
|
+
/** Refuses named visual imitation through the prompt policy's blocklist (exit 9). */
|
|
247
|
+
export declare function assertOriginalDescription(text: string, allow?: readonly string[]): void;
|
|
248
|
+
export declare function applyPlan(input: SavedPlan | string, options: ApplyPlanOptions): Promise<{
|
|
249
|
+
run: RunRecord;
|
|
250
|
+
runDir: string;
|
|
251
|
+
}>;
|
|
252
|
+
/** The reference roles a reviewer compares a candidate against on the contact sheet. */
|
|
253
|
+
export declare const CONTACT_REFERENCE_ROLE_PREFIXES: readonly ["identity:", "key-pose:", "positive:"];
|
|
254
|
+
/**
|
|
255
|
+
* The references drawn beside each candidate on a planned run's contact sheet: the identity
|
|
256
|
+
* turnaround and references, the approved key pose and the positive anchors. Negative anchors
|
|
257
|
+
* (counterexamples), the palette swatch and anything else are not targets, so they are left off.
|
|
258
|
+
*/
|
|
259
|
+
export declare function contactSheetReferences<T extends {
|
|
260
|
+
role: string;
|
|
261
|
+
}>(refs: readonly T[]): T[];
|