@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Readable, Writable } from "node:stream";
|
|
2
|
+
import type { CommandSpec } from "../commands/types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* The CLI's own help: every command `listed` (core's, and each slot command whose slot is
|
|
5
|
+
* filled; core's alone by default) with its summary, the options, spend and exits.
|
|
6
|
+
*/
|
|
7
|
+
export declare function mainUsage(listed?: readonly CommandSpec[]): string;
|
|
8
|
+
/** The streams one CLI run reads and writes; a stream whose `isTTY` is true is a terminal. */
|
|
9
|
+
export interface CliIo {
|
|
10
|
+
stdout: Writable;
|
|
11
|
+
stderr: Writable;
|
|
12
|
+
stdin: Readable;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Runs one command line on the streams given and returns its exit code: what the process does
|
|
16
|
+
* (`src/cli.ts`) and what a test runs in process (`cli()` in src/testing). The inline prompt is
|
|
17
|
+
* built only when stdin and stderr are both TTYs. An error nothing else handled is written to
|
|
18
|
+
* stderr and exits `internal_error`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function run(argv: readonly string[], io: CliIo): Promise<number>;
|
|
21
|
+
/** Runs one command line on the process's own streams and returns its exit code. */
|
|
22
|
+
export declare function main(argv: string[]): Promise<number>;
|
package/dist/cli/main.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { EXIT, EXIT_MEANING } from "../errors.js";
|
|
3
|
+
import { InputError } from "../errors.js";
|
|
4
|
+
import { commands } from "../commands/registry.js";
|
|
5
|
+
import { createRunContext, settingsScope } from "../commands/context.js";
|
|
6
|
+
import { availableCommands, commandUsage, errorOutcome, parseCommandLine, runCommand, } from "../commands/runner.js";
|
|
7
|
+
import { resultDocument } from "../commands/result.js";
|
|
8
|
+
import { ttyPort } from "../confirm/prompt.js";
|
|
9
|
+
import { WORK_ITEM_ENV } from "../spend.js";
|
|
10
|
+
/**
|
|
11
|
+
* The CLI's own help: every command `listed` (core's, and each slot command whose slot is
|
|
12
|
+
* filled; core's alone by default) with its summary, the options, spend and exits.
|
|
13
|
+
*/
|
|
14
|
+
export function mainUsage(listed = availableCommands(commands, undefined)) {
|
|
15
|
+
const width = Math.max(...listed.map((c) => c.name.length));
|
|
16
|
+
const exits = Object.entries(EXIT_MEANING).map(([exit, meaning]) => `${exit} ${meaning}`);
|
|
17
|
+
return [
|
|
18
|
+
"Usage: assetgrove <command> [options]",
|
|
19
|
+
"",
|
|
20
|
+
"Commands:",
|
|
21
|
+
...listed.map((c) => ` ${c.name.padEnd(width)} ${c.summary}`),
|
|
22
|
+
"",
|
|
23
|
+
"Options:",
|
|
24
|
+
" --json print exactly one JSON document on stdout (logs stay on stderr)",
|
|
25
|
+
" --help, -h print usage; with a command, that command's usage",
|
|
26
|
+
" --version print the version",
|
|
27
|
+
"",
|
|
28
|
+
"Spend: the developer settings cap every run (caps.runUsd; --cap may only lower it), and every",
|
|
29
|
+
"paid call reserves against the ledger <stateDir>/spend.jsonl: a daily cap (caps.dailyUsd) and,",
|
|
30
|
+
`with --work-item or ${WORK_ITEM_ENV}, a work-item cap (caps.workItemUsd). A call that would`,
|
|
31
|
+
"cross a cap, or a paid provider with no declared limit, is refused with exit 3.",
|
|
32
|
+
"",
|
|
33
|
+
`Exit codes: ${exits.join(", ")}.`,
|
|
34
|
+
"Run `assetgrove <command> --help` for a command's options.",
|
|
35
|
+
].join("\n");
|
|
36
|
+
}
|
|
37
|
+
function version() {
|
|
38
|
+
const pkg = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
39
|
+
return pkg.version;
|
|
40
|
+
}
|
|
41
|
+
const isTTY = (stream) => stream.isTTY === true;
|
|
42
|
+
const line = (stream, text) => void stream.write(`${text}\n`);
|
|
43
|
+
/** Prints an outcome: the result document with --json, else the human text; returns the exit. */
|
|
44
|
+
function emit(io, json, command, outcome) {
|
|
45
|
+
if (outcome.error)
|
|
46
|
+
line(io.stderr, outcome.error.message);
|
|
47
|
+
if (json)
|
|
48
|
+
line(io.stdout, JSON.stringify(resultDocument(command, outcome), null, 2));
|
|
49
|
+
else if (outcome.human)
|
|
50
|
+
line(io.stdout, outcome.human);
|
|
51
|
+
return outcome.exitCode;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The commands help lists: a slot command only when the settings load an extension that fills its
|
|
55
|
+
* slot. Settings or extensions that cannot load leave core's commands alone.
|
|
56
|
+
*/
|
|
57
|
+
async function listedCommands(stderr) {
|
|
58
|
+
try {
|
|
59
|
+
const ctx = await createRunContext({ log: () => { }, packLog: (m) => line(stderr, m) });
|
|
60
|
+
return availableCommands(commands, ctx.extensions);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return availableCommands(commands, undefined);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Runs one command line on the streams given and returns its exit code: what the process does
|
|
68
|
+
* (`src/cli.ts`) and what a test runs in process (`cli()` in src/testing). The inline prompt is
|
|
69
|
+
* built only when stdin and stderr are both TTYs. An error nothing else handled is written to
|
|
70
|
+
* stderr and exits `internal_error`.
|
|
71
|
+
*/
|
|
72
|
+
export async function run(argv, io) {
|
|
73
|
+
try {
|
|
74
|
+
return await dispatch([...argv], io);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
line(io.stderr, error instanceof Error ? error.message : String(error));
|
|
78
|
+
return EXIT.internal_error;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Runs one command line on the process's own streams and returns its exit code. */
|
|
82
|
+
export function main(argv) {
|
|
83
|
+
return run(argv, { stdout: process.stdout, stderr: process.stderr, stdin: process.stdin });
|
|
84
|
+
}
|
|
85
|
+
async function dispatch(argv, io) {
|
|
86
|
+
const json = argv.includes("--json");
|
|
87
|
+
// A two-word command (`runs list`) is named by its first two words. One whose second word is a
|
|
88
|
+
// flag (`pick --batch`) is named by its first word and that flag anywhere after it, as any flag.
|
|
89
|
+
const flagged = argv
|
|
90
|
+
.slice(1)
|
|
91
|
+
.findIndex((word) => word.startsWith("--") && commands.some((c) => c.name === `${argv[0]} ${word}`));
|
|
92
|
+
const [first, ...rest] = argv[0] !== undefined &&
|
|
93
|
+
argv[1] !== undefined &&
|
|
94
|
+
commands.some((c) => c.name === `${argv[0]} ${argv[1]}`)
|
|
95
|
+
? [`${argv[0]} ${argv[1]}`, ...argv.slice(2)]
|
|
96
|
+
: flagged >= 0
|
|
97
|
+
? [`${argv[0]} ${argv[flagged + 1]}`, ...argv.slice(1).filter((_, i) => i !== flagged)]
|
|
98
|
+
: argv;
|
|
99
|
+
if (first === undefined) {
|
|
100
|
+
line(io.stderr, mainUsage());
|
|
101
|
+
return EXIT.invalid_input;
|
|
102
|
+
}
|
|
103
|
+
if (first === "--help" || first === "-h" || first === "help") {
|
|
104
|
+
const listed = await listedCommands(io.stderr);
|
|
105
|
+
const usage = mainUsage(listed);
|
|
106
|
+
const fields = { usage, commands: listed.map((c) => c.name) };
|
|
107
|
+
return emit(io, json, null, { exitCode: 0, fields, human: usage });
|
|
108
|
+
}
|
|
109
|
+
if (first === "--version") {
|
|
110
|
+
line(io.stdout, version());
|
|
111
|
+
return 0;
|
|
112
|
+
}
|
|
113
|
+
const spec = commands.find((c) => c.name === first);
|
|
114
|
+
const name = spec?.name ?? null;
|
|
115
|
+
try {
|
|
116
|
+
if (!spec)
|
|
117
|
+
throw new InputError(`unknown command "${first}"\n${mainUsage()}`);
|
|
118
|
+
const { args, help } = parseCommandLine(spec, rest);
|
|
119
|
+
if (help) {
|
|
120
|
+
const usage = commandUsage(spec);
|
|
121
|
+
return emit(io, json, name, { exitCode: 0, fields: { usage }, human: usage });
|
|
122
|
+
}
|
|
123
|
+
const prompt = isTTY(io.stdin) && isTTY(io.stderr)
|
|
124
|
+
? ttyPort(io.stdin, io.stderr)
|
|
125
|
+
: undefined;
|
|
126
|
+
const ctx = await createRunContext({
|
|
127
|
+
log: (m) => line(io.stderr, m),
|
|
128
|
+
packLog: (m) => line(io.stderr, m),
|
|
129
|
+
...(prompt !== undefined && { prompt }),
|
|
130
|
+
...settingsScope(args),
|
|
131
|
+
});
|
|
132
|
+
return emit(io, json, name, await runCommand(spec, args, ctx));
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
return emit(io, json, name, errorOutcome(error));
|
|
136
|
+
}
|
|
137
|
+
}
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const animationQaCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { join, resolve } from "node:path";
|
|
2
|
+
import { importTargets, parseAnchor, planAnimationQa, runAnimationQa, stripTarget, TEMPLATE_LOG, } from "../animation/commands.js";
|
|
3
|
+
import { FLICKER_LOG, formatReport } from "../animation/run.js";
|
|
4
|
+
import { InputError } from "../errors.js";
|
|
5
|
+
import { specForQa, loadProfile } from "../inputs.js";
|
|
6
|
+
import { runCapParts } from "../budget.js";
|
|
7
|
+
import { providerSet, spendLedger } from "../providers/index.js";
|
|
8
|
+
import { dryRunOutcome, refusal, usd } from "./result.js";
|
|
9
|
+
import { defineCommand } from "./types.js";
|
|
10
|
+
import { MOTION_TEMPLATE_OPERATION } from "../routes.js";
|
|
11
|
+
import { DRY_RUN_PROPERTY, ROUND_PROPERTY, RUNS_PROPERTY, buildWorkPlan, jobOf, paidBy, } from "../runs/plan.js";
|
|
12
|
+
/** The plan step: the strips, their flicker and holes calls and the WorkPlan, with no call made. */
|
|
13
|
+
async function prepare(args, ctx) {
|
|
14
|
+
const { capUsd, capSource } = runCapParts(args.cap, ctx.settings);
|
|
15
|
+
const providers = await providerSet(args.providerScript, ctx);
|
|
16
|
+
const routes = providers.routes;
|
|
17
|
+
const vision = !args.noVision;
|
|
18
|
+
const spec = await specForQa(args.spec);
|
|
19
|
+
let targets;
|
|
20
|
+
if (typeof args.import === "string") {
|
|
21
|
+
if (args.strip !== undefined)
|
|
22
|
+
throw new InputError("give --strip or --import, not both");
|
|
23
|
+
targets = await importTargets(args.import);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const missing = ["strip", "family", "profile"].filter((n) => !args[n]);
|
|
27
|
+
if (missing.length > 0) {
|
|
28
|
+
throw new InputError(`missing required option ${missing.map((n) => `--${n}`).join(", ")}`);
|
|
29
|
+
}
|
|
30
|
+
const profile = await loadProfile(args.profile);
|
|
31
|
+
const anchor = parseAnchor(args.anchor);
|
|
32
|
+
targets = [
|
|
33
|
+
stripTarget({
|
|
34
|
+
path: args.strip,
|
|
35
|
+
family: args.family,
|
|
36
|
+
profile: profile.value,
|
|
37
|
+
...(args.subject !== undefined && { subject: args.subject }),
|
|
38
|
+
...(anchor !== undefined && { anchor }),
|
|
39
|
+
}),
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
const subject = args.subject ?? spec.subject;
|
|
43
|
+
for (const t of targets) {
|
|
44
|
+
if (subject !== undefined)
|
|
45
|
+
t.subject = subject;
|
|
46
|
+
if (spec.gait !== undefined)
|
|
47
|
+
t.gait = spec.gait;
|
|
48
|
+
// The spec's template is its own family's: the one strip given, or the import's family of
|
|
49
|
+
// the spec's name.
|
|
50
|
+
if (spec.template !== undefined &&
|
|
51
|
+
(spec.family === undefined ? targets.length === 1 : t.family === spec.family))
|
|
52
|
+
t.template = spec.template;
|
|
53
|
+
}
|
|
54
|
+
// --no-vision makes no call at all: a family whose template needs a decision stays undecided,
|
|
55
|
+
// its template checks pending.
|
|
56
|
+
const plan = await planAnimationQa(targets, routes, capUsd, vision, vision);
|
|
57
|
+
const flickers = plan.perFamily.reduce((sum, f) => sum + f.flickerCalls, 0);
|
|
58
|
+
const holes = plan.perFamily.reduce((sum, f) => sum + f.holeCalls, 0);
|
|
59
|
+
const decisions = plan.perFamily.reduce((sum, f) => sum + f.templateCalls, 0);
|
|
60
|
+
const jobs = [];
|
|
61
|
+
if (decisions > 0)
|
|
62
|
+
jobs.push(jobOf(MOTION_TEMPLATE_OPERATION, routes[MOTION_TEMPLATE_OPERATION], decisions));
|
|
63
|
+
if (flickers > 0)
|
|
64
|
+
jobs.push(jobOf("flicker", routes.flicker, flickers));
|
|
65
|
+
if (holes > 0)
|
|
66
|
+
jobs.push(jobOf("holes", routes.holes, holes));
|
|
67
|
+
const work = await buildWorkPlan(animationQaCommand, args, {
|
|
68
|
+
promptAllow: ctx.settings.promptPolicy.allow,
|
|
69
|
+
inputs: ["spec", "strip", "profile", "import"],
|
|
70
|
+
// The motion-template, flicker and holes prompts name the family and the subject.
|
|
71
|
+
promptText: jobs.length > 0 ? [args.family, args.subject].filter((t) => t !== undefined) : [],
|
|
72
|
+
jobs,
|
|
73
|
+
capUsd,
|
|
74
|
+
capSource,
|
|
75
|
+
paid: paidBy(providers, jobs),
|
|
76
|
+
providers,
|
|
77
|
+
candidates: 0,
|
|
78
|
+
});
|
|
79
|
+
return { capUsd, providers, routes, vision, targets, plan, work };
|
|
80
|
+
}
|
|
81
|
+
export const animationQaCommand = defineCommand({
|
|
82
|
+
name: "animation-qa",
|
|
83
|
+
tool: "animation_qa",
|
|
84
|
+
summary: "check strips against motion templates and for loop and continuity; write previews",
|
|
85
|
+
details: `Checks each strip against its family's motion template (beats, timing, contact frames,
|
|
86
|
+
silhouette variation) and runs loop and continuity QA on pixels (loop seam, ground line,
|
|
87
|
+
footprint drift, a colour halo at the edge). Two checks need vision, within the
|
|
88
|
+
cost cap in USD: identity flicker, one call per pair of consecutive frames, each label and
|
|
89
|
+
confidence appended to flicker.jsonl; and holes, one call per frame with a see-through area
|
|
90
|
+
inside the figure's outline, which the model judges a hole or a natural opening between
|
|
91
|
+
parts. --no-vision skips both. Writes <family>.qa.json, the onion-skin
|
|
92
|
+
sheet <family>.onion.png and the looping preview <family>.webp into --out.
|
|
93
|
+
--import checks every family write-families wrote from that import.
|
|
94
|
+
--spec reads the asset spec's gait, template (and its subject, unless --subject is given); the
|
|
95
|
+
gait picks the motion template's footprint rule for it, over the profile's animation.gait.
|
|
96
|
+
A family no spec or grouping declares a template for, and that no template is named for, costs
|
|
97
|
+
one motion-template decision per run, logged to motion-template.jsonl. --no-vision makes no call
|
|
98
|
+
and needs no key: such a family stays undecided, its ground-contact, footprint-drift and
|
|
99
|
+
loop-seam checks pending ("not run: template undecided"), and the run exits 5 naming them.
|
|
100
|
+
With none chosen, ground contact, footprint drift and the loop seam are not applicable.
|
|
101
|
+
--import decides and checks a family write-families left undecided (its checks pending there).
|
|
102
|
+
--dry-run prints the planned calls, the cost forecast and the spend left under the daily and
|
|
103
|
+
work-item limits, writes nothing and needs no key.
|
|
104
|
+
Give --strip, --family and --profile for one strip, or --import for every family of an import.
|
|
105
|
+
Exits 5 when any check fails; every failed check names its frame.`,
|
|
106
|
+
input: {
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: {
|
|
109
|
+
strip: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "the sprite strip to check",
|
|
112
|
+
placeholder: "<strip.png>",
|
|
113
|
+
},
|
|
114
|
+
family: {
|
|
115
|
+
type: "string",
|
|
116
|
+
description: "the animation family of the strip",
|
|
117
|
+
placeholder: "<name>",
|
|
118
|
+
},
|
|
119
|
+
profile: { type: "string", description: "the target profile", placeholder: "<profile.json>" },
|
|
120
|
+
import: {
|
|
121
|
+
type: "string",
|
|
122
|
+
description: "check every family write-families wrote from this import",
|
|
123
|
+
placeholder: "<import directory>",
|
|
124
|
+
},
|
|
125
|
+
out: {
|
|
126
|
+
type: "string",
|
|
127
|
+
description: "where reports and previews are written",
|
|
128
|
+
default: ".assetgrove/animation",
|
|
129
|
+
},
|
|
130
|
+
subject: {
|
|
131
|
+
type: "string",
|
|
132
|
+
description: "the subject the strips show",
|
|
133
|
+
placeholder: "<name>",
|
|
134
|
+
},
|
|
135
|
+
spec: {
|
|
136
|
+
type: "string",
|
|
137
|
+
description: "the asset spec; supplies the gait, template and subject",
|
|
138
|
+
placeholder: "<spec.json>",
|
|
139
|
+
},
|
|
140
|
+
anchor: { type: "string", description: "the anchor point of the frames", placeholder: "x,y" },
|
|
141
|
+
noVision: {
|
|
142
|
+
type: "boolean",
|
|
143
|
+
description: "skip the flicker and holes checks that need vision",
|
|
144
|
+
},
|
|
145
|
+
cap: {
|
|
146
|
+
type: "number",
|
|
147
|
+
description: "the run's cost cap in USD; at most, and by default, the settings' caps.runUsd",
|
|
148
|
+
placeholder: "<usd>",
|
|
149
|
+
},
|
|
150
|
+
workItem: {
|
|
151
|
+
type: "string",
|
|
152
|
+
description: "the work item the spend ledger counts against",
|
|
153
|
+
placeholder: "<label>",
|
|
154
|
+
},
|
|
155
|
+
providerScript: {
|
|
156
|
+
type: "string",
|
|
157
|
+
description: "answer every model call from this module instead of a provider",
|
|
158
|
+
placeholder: "<module>",
|
|
159
|
+
},
|
|
160
|
+
round: ROUND_PROPERTY,
|
|
161
|
+
runs: RUNS_PROPERTY,
|
|
162
|
+
dryRun: DRY_RUN_PROPERTY,
|
|
163
|
+
},
|
|
164
|
+
additionalProperties: false,
|
|
165
|
+
},
|
|
166
|
+
effect: { readOnly: false, spends: "conditional", writes: "out" },
|
|
167
|
+
confirm: "spend",
|
|
168
|
+
plan: async (args, ctx) => (await prepare(args, ctx)).work,
|
|
169
|
+
async run(args, ctx) {
|
|
170
|
+
const { capUsd, providers, routes, vision, targets, plan, work } = await prepare(args, ctx);
|
|
171
|
+
if (args.dryRun) {
|
|
172
|
+
const human = [
|
|
173
|
+
`dry run: ${targets.length} strip(s), ${plan.calls} planned call(s), nothing spent`,
|
|
174
|
+
...plan.perFamily.map((f) => ` ${f.family}: ${f.flickerCalls} flicker call(s) ${plan.model}; ${f.holeCalls} holes call(s) ${plan.holesModel}` +
|
|
175
|
+
(f.templateCalls > 0
|
|
176
|
+
? `; ${f.templateCalls} motion-template call ${plan.templateModel}`
|
|
177
|
+
: "")),
|
|
178
|
+
`forecast ${usd(plan.estimateUsd)} against a $${capUsd.toFixed(2)} cap` +
|
|
179
|
+
(plan.withinCap ? "" : " (over the cap)"),
|
|
180
|
+
].join("\n");
|
|
181
|
+
const ledger = targets.reduce((l, t) => l.forProfile(t.profile), spendLedger(ctx, args.workItem));
|
|
182
|
+
return dryRunOutcome(work, human, ledger, plan);
|
|
183
|
+
}
|
|
184
|
+
const outDir = resolve(args.out ?? ".assetgrove/animation");
|
|
185
|
+
const { results, spentUsd, templateDecisions } = await runAnimationQa({
|
|
186
|
+
targets,
|
|
187
|
+
outDir,
|
|
188
|
+
routes,
|
|
189
|
+
capUsd,
|
|
190
|
+
ledger: spendLedger(ctx, args.workItem),
|
|
191
|
+
provider: { provider: providers, name: providers.billing.providerId },
|
|
192
|
+
vision,
|
|
193
|
+
decide: vision,
|
|
194
|
+
});
|
|
195
|
+
const lines = [];
|
|
196
|
+
for (const r of results) {
|
|
197
|
+
lines.push(...formatReport(r.report));
|
|
198
|
+
lines.push(` onion skin ${r.files.onion}`, ` preview ${r.files.preview}`);
|
|
199
|
+
}
|
|
200
|
+
// Each log is named only when this run wrote to it.
|
|
201
|
+
const logs = [
|
|
202
|
+
...(vision ? [join(outDir, FLICKER_LOG)] : []),
|
|
203
|
+
...(templateDecisions.length > 0 ? [join(outDir, TEMPLATE_LOG)] : []),
|
|
204
|
+
];
|
|
205
|
+
if (vision || spentUsd > 0)
|
|
206
|
+
lines.push(`$${spentUsd.toFixed(4)} spent` +
|
|
207
|
+
(logs.length > 0 ? `; decisions in ${logs.join(" and ")}` : ""));
|
|
208
|
+
const fields = {
|
|
209
|
+
outDir,
|
|
210
|
+
spentUsd,
|
|
211
|
+
templateDecisions,
|
|
212
|
+
families: results.map((r) => ({
|
|
213
|
+
...r.report,
|
|
214
|
+
decisions: r.decisions,
|
|
215
|
+
holeDecisions: r.holeDecisions,
|
|
216
|
+
files: r.files,
|
|
217
|
+
})),
|
|
218
|
+
};
|
|
219
|
+
const human = lines.join("\n");
|
|
220
|
+
const failed = results
|
|
221
|
+
.filter((r) => r.report.reasons.some((x) => !x.passed && !x.shadow))
|
|
222
|
+
.map((r) => r.report.family);
|
|
223
|
+
const pending = results
|
|
224
|
+
.filter((r) => !r.report.passed && !failed.includes(r.report.family))
|
|
225
|
+
.map((r) => r.report.family);
|
|
226
|
+
if (failed.length > 0 || pending.length > 0) {
|
|
227
|
+
const message = [
|
|
228
|
+
...(failed.length > 0 ? [`animation QA failed for ${failed.join(", ")}`] : []),
|
|
229
|
+
...(pending.length > 0
|
|
230
|
+
? [
|
|
231
|
+
`checks pending for ${pending.join(", ")} (template undecided: run without ` +
|
|
232
|
+
"--no-vision to decide it, or declare template)",
|
|
233
|
+
]
|
|
234
|
+
: []),
|
|
235
|
+
].join("; ");
|
|
236
|
+
return refusal("qa_found_nothing", message, fields, human);
|
|
237
|
+
}
|
|
238
|
+
return { exitCode: 0, fields, human };
|
|
239
|
+
},
|
|
240
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConfirmationRecord } from "../types.ts";
|
|
2
|
+
import type { WorkPlan } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* The plan's confirmation, when it covers this apply (design section 7): one plan request covers
|
|
5
|
+
* one apply run, the default round's, of the plan file that request's run saved (the record holds
|
|
6
|
+
* its digest), while every input hash its record holds equals the saved plan's and apply's forecast
|
|
7
|
+
* is at or under the confirmed one. The first apply run it covers binds it to its run directory;
|
|
8
|
+
* once that run finishes it covers no other. Another round is another paid request, and it, like
|
|
9
|
+
* any apply the record does not cover, asks under its own digest.
|
|
10
|
+
*/
|
|
11
|
+
export declare function planConfirmation(planPath: string, work: WorkPlan, configDir: string, round?: number): Promise<ConfirmationRecord | undefined>;
|
|
12
|
+
export declare const applyCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { InputError } from "../errors.js";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { basename, dirname } from "node:path";
|
|
4
|
+
import { loadBible } from "../bible.js";
|
|
5
|
+
import { readJson } from "../inputs.js";
|
|
6
|
+
import { nearMatchesFor, subjectReferencePaths } from "../search/near-match.js";
|
|
7
|
+
import { applyJobs, applyPlan, planDigest } from "../planning.js";
|
|
8
|
+
import { bindingAllows, readConfirmation, writeConfirmation } from "../confirm/records.js";
|
|
9
|
+
import { sharedTexts, withSharedText } from "../request.js";
|
|
10
|
+
import { providerSet, spendLedger } from "../providers/index.js";
|
|
11
|
+
import { DEFAULT_ROUND, DRY_RUN_PROPERTY, NOTE_PROPERTY, ROUND_PROPERTY, buildWorkPlan, paidBy, } from "../runs/plan.js";
|
|
12
|
+
import { dryRunOutcome, formatRun, formatWork, refusal } from "./result.js";
|
|
13
|
+
import { defineCommand } from "./types.js";
|
|
14
|
+
/** The near matches of the spec a saved plan names, with its key pose and identity turnaround. */
|
|
15
|
+
async function savedPlanNearMatches(planPath, ctx) {
|
|
16
|
+
try {
|
|
17
|
+
const saved = JSON.parse(await readFile(planPath, "utf8"));
|
|
18
|
+
const specPath = saved.inputs["spec"]?.path;
|
|
19
|
+
if (specPath === undefined)
|
|
20
|
+
return {};
|
|
21
|
+
const spec = await readJson(specPath);
|
|
22
|
+
const references = await subjectReferencePaths(spec, saved.inputs["bible"]?.path);
|
|
23
|
+
const briefPath = saved.inputs["brief"]?.path;
|
|
24
|
+
const brief = briefPath === undefined ? undefined : (await readJson(briefPath)).value;
|
|
25
|
+
return await nearMatchesFor(spec.value, references, ctx, brief);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** The plan step: the saved plan checked as apply checks it, and the calls apply would make. */
|
|
32
|
+
async function prepare(plan, args, ctx) {
|
|
33
|
+
const providers = await providerSet(args.providerScript, ctx);
|
|
34
|
+
const forecast = await applyJobs(plan, {
|
|
35
|
+
provider: providers,
|
|
36
|
+
runCapUsd: ctx.settings.caps.runUsd,
|
|
37
|
+
promptAllow: ctx.settings.promptPolicy.allow,
|
|
38
|
+
...(ctx.extensions && { kinds: ctx.extensions }),
|
|
39
|
+
});
|
|
40
|
+
const near = await savedPlanNearMatches(plan, ctx);
|
|
41
|
+
const work = await buildWorkPlan(applyCommand, args, {
|
|
42
|
+
near,
|
|
43
|
+
inputs: ["plan"],
|
|
44
|
+
jobs: forecast.jobs,
|
|
45
|
+
capUsd: forecast.capUsd,
|
|
46
|
+
...(forecast.capSource && { capSource: forecast.capSource }),
|
|
47
|
+
paid: paidBy(providers, forecast.jobs),
|
|
48
|
+
providers,
|
|
49
|
+
candidates: forecast.candidates,
|
|
50
|
+
runsArg: "out",
|
|
51
|
+
promptAllow: ctx.settings.promptPolicy.allow,
|
|
52
|
+
...(forecast.promptParts && { promptParts: forecast.promptParts }),
|
|
53
|
+
promptText: args.note !== undefined ? [args.note] : [],
|
|
54
|
+
});
|
|
55
|
+
return { providers, work };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The plan's confirmation, when it covers this apply (design section 7): one plan request covers
|
|
59
|
+
* one apply run, the default round's, of the plan file that request's run saved (the record holds
|
|
60
|
+
* its digest), while every input hash its record holds equals the saved plan's and apply's forecast
|
|
61
|
+
* is at or under the confirmed one. The first apply run it covers binds it to its run directory;
|
|
62
|
+
* once that run finishes it covers no other. Another round is another paid request, and it, like
|
|
63
|
+
* any apply the record does not cover, asks under its own digest.
|
|
64
|
+
*/
|
|
65
|
+
export async function planConfirmation(planPath, work, configDir, round = DEFAULT_ROUND) {
|
|
66
|
+
if (round !== DEFAULT_ROUND)
|
|
67
|
+
return undefined;
|
|
68
|
+
let saved;
|
|
69
|
+
try {
|
|
70
|
+
saved = JSON.parse(await readFile(planPath, "utf8"));
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
if (typeof saved.requestDigest !== "string" || !/^[0-9a-f]{64}$/.test(saved.requestDigest))
|
|
76
|
+
return undefined;
|
|
77
|
+
const record = await readConfirmation(configDir, "spend", saved.requestDigest);
|
|
78
|
+
if (record === undefined || record.command !== "plan")
|
|
79
|
+
return undefined;
|
|
80
|
+
if (record.savedPlan !== saved.digest || planDigest(saved) !== saved.digest)
|
|
81
|
+
return undefined;
|
|
82
|
+
if (!bindingAllows(record.coveredRun, work.runDir))
|
|
83
|
+
return undefined;
|
|
84
|
+
const inputs = saved.inputs ?? {};
|
|
85
|
+
for (const [name, sha256] of Object.entries(record.inputs)) {
|
|
86
|
+
// The plan request hashes its arguments' files and the files they name (`bible/<path>`);
|
|
87
|
+
// the saved plan records the arguments' files. Each one both name must agree.
|
|
88
|
+
if (name.includes("/"))
|
|
89
|
+
continue;
|
|
90
|
+
if (inputs[name] === undefined || inputs[name].sha256 !== sha256)
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
if (work.forecastUsd > record.forecastUsd + 1e-9)
|
|
94
|
+
return undefined;
|
|
95
|
+
if (record.coveredRun !== undefined)
|
|
96
|
+
return record;
|
|
97
|
+
const bound = { ...record, coveredRun: { runDir: work.runDir } };
|
|
98
|
+
await writeConfirmation(configDir, bound);
|
|
99
|
+
return bound;
|
|
100
|
+
}
|
|
101
|
+
export const applyCommand = defineCommand({
|
|
102
|
+
name: "apply",
|
|
103
|
+
tool: "apply",
|
|
104
|
+
summary: "generate exactly a saved plan after explicit spend approval",
|
|
105
|
+
details: `Refuses stale inputs before generation, and exits 2 plan_changed when the routes, estimates,
|
|
106
|
+
output grants or run cap resolved from the developer settings differ from planning time.
|
|
107
|
+
--note adds the author's note to each image prompt (policy-checked before spend, part of the request's digest);
|
|
108
|
+
with --round it asks for another round, and a plan's confirmation never covers a note.
|
|
109
|
+
The plan's prompts pass the prompt policy (exit 9 prompt_refused) before any spend.
|
|
110
|
+
The plan's spend confirmation covers one apply run of the plan it saved, the default round, while every
|
|
111
|
+
input hash it confirmed still matches and apply's forecast is at or under the confirmed one; --round n > 1,
|
|
112
|
+
another --out once that run started, or any other apply, asks under its own digest (headless
|
|
113
|
+
settings, a record, an MCP client's form, the TTY, or exit 8 confirmation_required and \`assetgrove confirm <id>\`). The
|
|
114
|
+
confirmation authorizes this generation spend; resulting assets remain pending review.`,
|
|
115
|
+
input: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
plan: { type: "string", description: "the saved plan", placeholder: "<plan.json>" },
|
|
119
|
+
out: {
|
|
120
|
+
type: "string",
|
|
121
|
+
description: "where runs are staged",
|
|
122
|
+
placeholder: "<runs directory>",
|
|
123
|
+
},
|
|
124
|
+
workItem: {
|
|
125
|
+
type: "string",
|
|
126
|
+
description: "the work item the spend ledger counts against",
|
|
127
|
+
placeholder: "<label>",
|
|
128
|
+
},
|
|
129
|
+
providerScript: {
|
|
130
|
+
type: "string",
|
|
131
|
+
description: "answer every model call from this module instead of a provider",
|
|
132
|
+
placeholder: "<module>",
|
|
133
|
+
},
|
|
134
|
+
note: NOTE_PROPERTY,
|
|
135
|
+
round: ROUND_PROPERTY,
|
|
136
|
+
dryRun: DRY_RUN_PROPERTY,
|
|
137
|
+
},
|
|
138
|
+
additionalProperties: false,
|
|
139
|
+
},
|
|
140
|
+
positionals: [{ name: "plan" }],
|
|
141
|
+
effect: { readOnly: false, spends: "always", writes: "runs" },
|
|
142
|
+
confirm: "spend",
|
|
143
|
+
plan: async (args, ctx) => {
|
|
144
|
+
if (args.plan === undefined)
|
|
145
|
+
throw new InputError("apply requires exactly one plan file");
|
|
146
|
+
return (await prepare(args.plan, args, ctx)).work;
|
|
147
|
+
},
|
|
148
|
+
priorConfirmation: (args, ctx, work) => args.plan === undefined || args.note !== undefined
|
|
149
|
+
? Promise.resolve(undefined)
|
|
150
|
+
: planConfirmation(args.plan, work, ctx.settings.configDir, args.round),
|
|
151
|
+
async run(args, ctx) {
|
|
152
|
+
if (args.plan === undefined)
|
|
153
|
+
throw new InputError("apply requires exactly one plan file");
|
|
154
|
+
const { providers, work } = await prepare(args.plan, args, ctx);
|
|
155
|
+
const ledger = spendLedger(ctx, args.workItem);
|
|
156
|
+
if (args.dryRun)
|
|
157
|
+
return dryRunOutcome(work, formatWork("apply", work), ledger);
|
|
158
|
+
const dir = ctx.run?.dir ?? work.runDir;
|
|
159
|
+
const result = await applyPlan(args.plan, {
|
|
160
|
+
provider: providers,
|
|
161
|
+
ledger,
|
|
162
|
+
log: ctx.log,
|
|
163
|
+
runCapUsd: ctx.settings.caps.runUsd,
|
|
164
|
+
promptAllow: ctx.settings.promptPolicy.allow,
|
|
165
|
+
outDir: dirname(dir),
|
|
166
|
+
...(args.note !== undefined && { note: args.note }),
|
|
167
|
+
...(ctx.run?.promptPolicy !== undefined && { promptPolicy: ctx.run.promptPolicy }),
|
|
168
|
+
runId: basename(dir),
|
|
169
|
+
...(ctx.extensions && { kinds: ctx.extensions }),
|
|
170
|
+
});
|
|
171
|
+
const bible = await loadBible(JSON.parse(await readFile(args.plan, "utf8")).inputs["bible"].path);
|
|
172
|
+
const fields = withSharedText({
|
|
173
|
+
...result,
|
|
174
|
+
...(result.run.contactSheet && { contactSheet: result.run.contactSheet }),
|
|
175
|
+
}, sharedTexts(bible.data));
|
|
176
|
+
const human = formatRun(result.run, result.runDir);
|
|
177
|
+
if (result.run.candidates.length === 0)
|
|
178
|
+
return refusal("qa_found_nothing", "no candidate passed QA", fields, human);
|
|
179
|
+
return { exitCode: 0, fields, human };
|
|
180
|
+
},
|
|
181
|
+
});
|