@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 @@
|
|
|
1
|
+
export declare const lodCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { InputError } from "../errors.js";
|
|
3
|
+
import { readJson, readModel, loadProfile } from "../inputs.js";
|
|
4
|
+
import { lodChain } from "../model3d/lod/command.js";
|
|
5
|
+
import { readProvenance } from "../model3d/rig/command.js";
|
|
6
|
+
import { formatRun, refusal } from "./result.js";
|
|
7
|
+
import { defineCommand } from "./types.js";
|
|
8
|
+
/** The named options, each present or a refusal in the wording of a missing required option. */
|
|
9
|
+
function need(args, flags) {
|
|
10
|
+
const names = Object.keys(flags);
|
|
11
|
+
const missing = names.filter((n) => typeof args[n] !== "string" || args[n] === "");
|
|
12
|
+
if (missing.length > 0) {
|
|
13
|
+
throw new InputError(`missing required option ${missing.map((n) => flags[n]).join(", ")}`);
|
|
14
|
+
}
|
|
15
|
+
return Object.fromEntries(names.map((n) => [n, args[n]]));
|
|
16
|
+
}
|
|
17
|
+
export const lodCommand = defineCommand({
|
|
18
|
+
name: "lod",
|
|
19
|
+
tool: "lod",
|
|
20
|
+
summary: "make a 3D model's detail levels and texture tiers within the target's budgets",
|
|
21
|
+
details: `Two forms: --run and --candidate (with optional --profile) name a staged candidate;
|
|
22
|
+
--model, --provenance, --spec and --profile name a given .glb.
|
|
23
|
+
|
|
24
|
+
Makes the detail-level chain the target profile declares (model3d.lods) from a staged candidate
|
|
25
|
+
or a given .glb: each lower level simplifies the index lists only, so the skeleton, skin weights,
|
|
26
|
+
clips and UVs stay as they are. Then, per quality tier (model3d.tiers), a rendition with the levels
|
|
27
|
+
within its triangle budget, its textures and look-dev side maps within its size, or those maps
|
|
28
|
+
dropped where the tier draws no fur. Each level is checked against the full model (silhouette in
|
|
29
|
+
the turntable views and clip frames, skin, UVs, clips) and left out, with the reason, when it
|
|
30
|
+
fails. The levels are packaged as model3d.handoff.lods declares (embedded or files) and staged as
|
|
31
|
+
a one-candidate run that pick hands off. No model is called and nothing is spent
|
|
32
|
+
(docs/characters-3d.md).`,
|
|
33
|
+
input: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
run: { type: "string", description: "the staged run directory", placeholder: "<run dir>" },
|
|
37
|
+
candidate: { type: "string", description: "the candidate in that run", placeholder: "<id>" },
|
|
38
|
+
model: { type: "string", description: "the character model", placeholder: "<model.glb>" },
|
|
39
|
+
provenance: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "the model's provenance",
|
|
42
|
+
placeholder: "<provenance.json>",
|
|
43
|
+
},
|
|
44
|
+
spec: { type: "string", description: "the asset spec", placeholder: "<spec.json>" },
|
|
45
|
+
profile: { type: "string", description: "the target profile", placeholder: "<profile.json>" },
|
|
46
|
+
runs: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "where runs are staged",
|
|
49
|
+
default: ".assetgrove/runs",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
additionalProperties: false,
|
|
53
|
+
},
|
|
54
|
+
effect: { readOnly: false, spends: "never", writes: "runs" },
|
|
55
|
+
async run(args) {
|
|
56
|
+
const runsDir = resolve(args.runs ?? ".assetgrove/runs");
|
|
57
|
+
const profile = typeof args.profile === "string" ? await loadProfile(args.profile) : undefined;
|
|
58
|
+
let result;
|
|
59
|
+
if (typeof args.run === "string") {
|
|
60
|
+
const files = need(args, { run: "--run", candidate: "--candidate" });
|
|
61
|
+
result = await lodChain({
|
|
62
|
+
run: { dir: resolve(files.run), candidate: files.candidate },
|
|
63
|
+
...(profile && { profile: profile.value, profileDir: profile.dir }),
|
|
64
|
+
runsDir,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const files = need(args, {
|
|
69
|
+
model: "--model",
|
|
70
|
+
provenance: "--provenance",
|
|
71
|
+
spec: "--spec",
|
|
72
|
+
profile: "--profile",
|
|
73
|
+
});
|
|
74
|
+
const model = await readModel(files.model);
|
|
75
|
+
const spec = await readJson(files.spec);
|
|
76
|
+
result = await lodChain({
|
|
77
|
+
model,
|
|
78
|
+
provenance: await readProvenance(files.provenance, model),
|
|
79
|
+
spec: spec.value,
|
|
80
|
+
specDir: spec.dir,
|
|
81
|
+
profile: profile.value,
|
|
82
|
+
profileDir: profile.dir,
|
|
83
|
+
runsDir,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const { run, runDir, passed } = result;
|
|
87
|
+
const fields = { runDir, ...run };
|
|
88
|
+
const human = formatRun(run, runDir);
|
|
89
|
+
if (passed)
|
|
90
|
+
return { exitCode: 0, fields, human };
|
|
91
|
+
return refusal("qa_found_nothing", "the detail-level chain did not pass QA", fields, human);
|
|
92
|
+
},
|
|
93
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const lookDevCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { basename, dirname } from "node:path";
|
|
2
|
+
import { readJson, readModel, loadProfile, loadStyleBible } from "../inputs.js";
|
|
3
|
+
import { lookDev, lookdevViewCalls, planLookdev } from "../model3d/lookdev/command.js";
|
|
4
|
+
import { runCapParts } from "../budget.js";
|
|
5
|
+
import { providerSet, spendLedger } from "../providers/index.js";
|
|
6
|
+
import { rigReads } from "../model3d/rig/template.js";
|
|
7
|
+
import { lookdevSettings } from "../model3d/lookdev/settings.js";
|
|
8
|
+
import { subjectOf } from "../request.js";
|
|
9
|
+
import { readProvenance } from "../model3d/rig/command.js";
|
|
10
|
+
import { checkSpecValues } from "../paths.js";
|
|
11
|
+
import { dryRunOutcome, formatRun, refusal, usd } from "./result.js";
|
|
12
|
+
import { defineCommand } from "./types.js";
|
|
13
|
+
import { DRY_RUN_PROPERTY, ROUND_PROPERTY, buildWorkPlan, jobsOf, paidBy, specReads, styleBibleReads, } from "../runs/plan.js";
|
|
14
|
+
/** Look-dev's plan step: its inputs, providers, look-dev plan and WorkPlan, with no call. */
|
|
15
|
+
async function prepare(args, ctx) {
|
|
16
|
+
const spec = await readJson(args.spec);
|
|
17
|
+
const bible = await loadStyleBible(args.bible);
|
|
18
|
+
const profile = await loadProfile(args.profile);
|
|
19
|
+
// Before any paid call: every spec value the layout names, which pick hands off with, is set.
|
|
20
|
+
checkSpecValues(profile.value, spec.value);
|
|
21
|
+
const providers = await providerSet(args.providerScript, ctx);
|
|
22
|
+
const routes = providers.routes;
|
|
23
|
+
const { capUsd, capSource } = runCapParts(args.cap, ctx.settings, planLookdev(profile.value, routes).capUsd);
|
|
24
|
+
// The view calls of the references that declare no view are part of the forecast.
|
|
25
|
+
const plan = planLookdev(profile.value, routes, capUsd, lookdevViewCalls(spec.value, bible.value, routes));
|
|
26
|
+
const jobs = jobsOf(plan.calls, routes);
|
|
27
|
+
// The groom prompts name each season the profile declares and carry its traits.
|
|
28
|
+
const { seasons, traits } = lookdevSettings(profile.value);
|
|
29
|
+
const work = await buildWorkPlan(lookDevCommand, args, {
|
|
30
|
+
promptAllow: ctx.settings.promptPolicy.allow,
|
|
31
|
+
inputs: ["model", "provenance", "spec", "bible", "profile"],
|
|
32
|
+
reads: {
|
|
33
|
+
...styleBibleReads("bible", bible),
|
|
34
|
+
...specReads("spec", spec),
|
|
35
|
+
...rigReads("profile", profile),
|
|
36
|
+
},
|
|
37
|
+
// The look-dev prompts name the subject (the asset id when the spec has no subject), so the
|
|
38
|
+
// plan step checks it, free, before the spend is confirmed.
|
|
39
|
+
promptText: [
|
|
40
|
+
subjectOf(spec.value),
|
|
41
|
+
...(seasons ?? []).flatMap((season) => [season, traits[season] ?? ""]),
|
|
42
|
+
],
|
|
43
|
+
jobs,
|
|
44
|
+
capUsd,
|
|
45
|
+
capSource,
|
|
46
|
+
paid: paidBy(providers, jobs),
|
|
47
|
+
providers,
|
|
48
|
+
candidates: 1,
|
|
49
|
+
});
|
|
50
|
+
return { spec, bible, profile, providers, routes, capUsd, plan, work };
|
|
51
|
+
}
|
|
52
|
+
export const lookDevCommand = defineCommand({
|
|
53
|
+
name: "look-dev",
|
|
54
|
+
tool: "look_dev",
|
|
55
|
+
summary: "give a picked 3D character its look: base colour, fur groom maps and eyes",
|
|
56
|
+
details: `Repaints a picked character's base colour on its own UVs in the look the bible's approved
|
|
57
|
+
references define (restyled renders projected back onto the model), writes fur groom maps
|
|
58
|
+
(length, direction, density) and tint textures per season the profile declares
|
|
59
|
+
(model3d.groom), gives the eyes their own glossy material and mask, and checks them: the
|
|
60
|
+
maps' zero-length masks, map-driven shell-fur renders, UV seams, the eyes' catch-light at the
|
|
61
|
+
closest zoom and the identity lock. Before-and-after renders beside the approved turnaround
|
|
62
|
+
are written for the person who approves; pick hands the result off. The cap defaults to
|
|
63
|
+
model3d.lookdev.capUsd or $3 and is reserved before any call (docs/look-dev.md).`,
|
|
64
|
+
input: {
|
|
65
|
+
type: "object",
|
|
66
|
+
properties: {
|
|
67
|
+
model: { type: "string", description: "the character model", placeholder: "<model.glb>" },
|
|
68
|
+
provenance: {
|
|
69
|
+
type: "string",
|
|
70
|
+
description: "the model's provenance",
|
|
71
|
+
placeholder: "<provenance.json>",
|
|
72
|
+
},
|
|
73
|
+
spec: { type: "string", description: "the asset spec", placeholder: "<spec.json>" },
|
|
74
|
+
bible: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "the style bible (BIBLE.md)",
|
|
77
|
+
placeholder: "<BIBLE.md>",
|
|
78
|
+
},
|
|
79
|
+
profile: { type: "string", description: "the target profile", placeholder: "<profile.json>" },
|
|
80
|
+
cap: {
|
|
81
|
+
type: "number",
|
|
82
|
+
description: "the run's cost cap in USD; defaults to the profile's look-dev cap, at most the settings' caps.runUsd",
|
|
83
|
+
placeholder: "<usd>",
|
|
84
|
+
},
|
|
85
|
+
runs: {
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "where runs are staged",
|
|
88
|
+
default: ".assetgrove/runs",
|
|
89
|
+
},
|
|
90
|
+
workItem: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "the work item the spend ledger counts against",
|
|
93
|
+
placeholder: "<label>",
|
|
94
|
+
},
|
|
95
|
+
providerScript: {
|
|
96
|
+
type: "string",
|
|
97
|
+
description: "answer every model call from this module instead of a provider",
|
|
98
|
+
placeholder: "<module>",
|
|
99
|
+
},
|
|
100
|
+
round: ROUND_PROPERTY,
|
|
101
|
+
dryRun: DRY_RUN_PROPERTY,
|
|
102
|
+
},
|
|
103
|
+
required: ["model", "provenance", "spec", "bible", "profile"],
|
|
104
|
+
additionalProperties: false,
|
|
105
|
+
},
|
|
106
|
+
effect: { readOnly: false, spends: "conditional", writes: "runs" },
|
|
107
|
+
confirm: "spend",
|
|
108
|
+
plan: async (args, ctx) => (await prepare(args, ctx)).work,
|
|
109
|
+
async run(args, ctx) {
|
|
110
|
+
const ledger = spendLedger(ctx, args.workItem);
|
|
111
|
+
const { spec, bible, profile, providers, routes, capUsd, plan, work } = await prepare(args, ctx);
|
|
112
|
+
if (args.dryRun) {
|
|
113
|
+
const human = [
|
|
114
|
+
`look-dev: ${plan.calls.length} call(s), forecast ${usd(plan.estimateUsd)} against the $${plan.capUsd.toFixed(2)} cap`,
|
|
115
|
+
...plan.calls.map((c) => ` ${c.operation} ${c.model} ${usd(c.estimatedCostUsd)}`),
|
|
116
|
+
` seasons: ${plan.seasons.join(", ")}`,
|
|
117
|
+
].join("\n");
|
|
118
|
+
return dryRunOutcome(work, human, ledger.forProfile(profile.value), plan);
|
|
119
|
+
}
|
|
120
|
+
// The runner opened the request's run directory `<runs>/r-<16 hex>/`; look-dev runs in it.
|
|
121
|
+
const dir = ctx.run?.dir ?? work.runDir;
|
|
122
|
+
const model = await readModel(args.model);
|
|
123
|
+
const { run, runDir, passed } = await lookDev({
|
|
124
|
+
model,
|
|
125
|
+
provenance: await readProvenance(args.provenance, model),
|
|
126
|
+
spec: spec.value,
|
|
127
|
+
specDir: spec.dir,
|
|
128
|
+
bible: bible.value,
|
|
129
|
+
bibleDir: bible.dir,
|
|
130
|
+
profile: profile.value,
|
|
131
|
+
profileDir: profile.dir,
|
|
132
|
+
routes,
|
|
133
|
+
provider: providers,
|
|
134
|
+
ledger,
|
|
135
|
+
runsDir: dirname(dir),
|
|
136
|
+
runId: basename(dir),
|
|
137
|
+
capUsd,
|
|
138
|
+
stateDir: ctx.settings.stateDir,
|
|
139
|
+
log: ctx.log,
|
|
140
|
+
...(work.promptPolicy && { promptPolicy: work.promptPolicy }),
|
|
141
|
+
});
|
|
142
|
+
const fields = { runDir, ...run };
|
|
143
|
+
const human = formatRun(run, runDir);
|
|
144
|
+
if (passed)
|
|
145
|
+
return { exitCode: 0, fields, human };
|
|
146
|
+
return refusal("qa_found_nothing", "the looked-dev model did not pass its checks", fields, human);
|
|
147
|
+
},
|
|
148
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const materialsCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { statSync } from "node:fs";
|
|
2
|
+
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
3
|
+
import { Budget, runCapParts } from "../budget.js";
|
|
4
|
+
import { Caller } from "../calls.js";
|
|
5
|
+
import { InputError } from "../errors.js";
|
|
6
|
+
import { declarationOption, readJson, loadProfile } from "../inputs.js";
|
|
7
|
+
import { runMaterials } from "../material/pipeline.js";
|
|
8
|
+
import { resolveMaterialProfile } from "../material/profile.js";
|
|
9
|
+
import { providerSet, spendLedger } from "../providers/index.js";
|
|
10
|
+
import { ledgerFor } from "../spend.js";
|
|
11
|
+
import { dryRunOutcome, refusal, usd } from "./result.js";
|
|
12
|
+
import { defineCommand } from "./types.js";
|
|
13
|
+
import { gateOf } from "../confirm/index.js";
|
|
14
|
+
import { DRY_RUN_PROPERTY, ROUND_PROPERTY, RUNS_PROPERTY, buildWorkPlan, jobsOf, paidBy, } from "../runs/plan.js";
|
|
15
|
+
/** Whether `path` names a regular file. */
|
|
16
|
+
function isFile(path) {
|
|
17
|
+
try {
|
|
18
|
+
return statSync(path).isFile();
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/** A read's name: its path from the profile's directory, `/`-separated, under `profile/`. */
|
|
25
|
+
function readName(profileDir, path) {
|
|
26
|
+
const rel = relative(profileDir, path);
|
|
27
|
+
return `profile/${(isAbsolute(rel) ? path : rel).split(sep).join("/")}`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The files the profile's compression and preview commands name, wherever they are: a changed
|
|
31
|
+
* compressor, renderer or script (`node ../tools/render.mjs`) changes the request digest, so it
|
|
32
|
+
* is a new run, not a reused one. Each command's program is hashed only when it is named as a
|
|
33
|
+
* relative path (`./compress.sh`, `../tools/render`); a program found on the PATH or named by an
|
|
34
|
+
* absolute path is the interpreter or a system tool (node itself), and is not hashed. Arguments
|
|
35
|
+
* that name no regular file (flags, words) are not inputs.
|
|
36
|
+
*/
|
|
37
|
+
function commandReads(config, profileDir) {
|
|
38
|
+
const reads = {};
|
|
39
|
+
for (const command of [config.compression?.command ?? [], config.preview?.command ?? []]) {
|
|
40
|
+
command.forEach((arg, position) => {
|
|
41
|
+
if (arg === "" || arg.includes("{{"))
|
|
42
|
+
return;
|
|
43
|
+
if (position === 0 && (isAbsolute(arg) || !/[\\/]/.test(arg)))
|
|
44
|
+
return;
|
|
45
|
+
const path = resolve(profileDir, arg);
|
|
46
|
+
if (isFile(path))
|
|
47
|
+
reads[readName(profileDir, path)] = path;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return reads;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The source images the derivation names (`maps[channel].path`, `lightSources[].mask`), resolved
|
|
54
|
+
* from its directory as the pipeline reads them: an edited source changes the request digest.
|
|
55
|
+
*/
|
|
56
|
+
function derivationReads(derivation, baseDir) {
|
|
57
|
+
const reads = {};
|
|
58
|
+
for (const [channel, input] of Object.entries(derivation.maps ?? {})) {
|
|
59
|
+
if (typeof input?.path !== "string" || input.path === "")
|
|
60
|
+
continue;
|
|
61
|
+
const path = resolve(baseDir, input.path);
|
|
62
|
+
if (isFile(path))
|
|
63
|
+
reads[`derivation/maps/${channel}`] = path;
|
|
64
|
+
}
|
|
65
|
+
(derivation.lightSources ?? []).forEach((source, index) => {
|
|
66
|
+
if (typeof source?.mask !== "string" || source.mask === "")
|
|
67
|
+
return;
|
|
68
|
+
const path = resolve(baseDir, source.mask);
|
|
69
|
+
if (isFile(path))
|
|
70
|
+
reads[`derivation/lightSources/${index}`] = path;
|
|
71
|
+
});
|
|
72
|
+
return reads;
|
|
73
|
+
}
|
|
74
|
+
/** The plan step: the inputs, the channels' model calls and the QA call, with no call made. */
|
|
75
|
+
async function prepare(args, ctx) {
|
|
76
|
+
const spec = await readJson(args.spec);
|
|
77
|
+
const profile = await loadProfile(args.profile);
|
|
78
|
+
const derivation = await readJson(args.derivation);
|
|
79
|
+
const provider = await providerSet(args.providerScript, ctx);
|
|
80
|
+
const routes = provider.routes;
|
|
81
|
+
const config = resolveMaterialProfile(profile.value.style?.materials);
|
|
82
|
+
const { capUsd, capSource } = runCapParts(args.cap, ctx.settings);
|
|
83
|
+
new Budget(capUsd);
|
|
84
|
+
const needed = new Set(config.channels);
|
|
85
|
+
if (needed.has("normal") && derivation.value.maps?.normal?.method === "height-derived-normal")
|
|
86
|
+
needed.add("height");
|
|
87
|
+
const operations = [...needed].flatMap((channel) => {
|
|
88
|
+
const input = derivation.value.maps?.[channel];
|
|
89
|
+
if (!input?.version?.trim())
|
|
90
|
+
throw new InputError(`missing declared method/version for ${channel}`);
|
|
91
|
+
return input.method === "model-assisted-painting" ? [`material-${channel}`] : [];
|
|
92
|
+
});
|
|
93
|
+
// At most one map-flicker decision per channel and frame pair the pixel comparison cannot clear.
|
|
94
|
+
const frameCount = spec.value.frames?.count ?? 1;
|
|
95
|
+
const flickerPairs = frameCount > 1 ? frameCount : 0;
|
|
96
|
+
for (let i = 0; i < config.channels.length * flickerPairs; i++)
|
|
97
|
+
operations.push("map-flicker");
|
|
98
|
+
operations.push("material-qa");
|
|
99
|
+
const perCall = operations.map((operation) => {
|
|
100
|
+
const route = routes[operation];
|
|
101
|
+
if (!route || !Number.isFinite(route.estimatedCostUsd) || route.estimatedCostUsd < 0)
|
|
102
|
+
throw new InputError(`missing or invalid route for ${operation}`);
|
|
103
|
+
return { operation, model: route.model, estimatedCostUsd: route.estimatedCostUsd };
|
|
104
|
+
});
|
|
105
|
+
const jobs = jobsOf(perCall, routes);
|
|
106
|
+
const work = await buildWorkPlan(materialsCommand, args, {
|
|
107
|
+
promptAllow: ctx.settings.promptPolicy.allow,
|
|
108
|
+
inputs: ["albedo", "spec", "profile", "derivation"],
|
|
109
|
+
reads: {
|
|
110
|
+
...commandReads(config, profile.dir),
|
|
111
|
+
...derivationReads(derivation.value, derivation.dir),
|
|
112
|
+
},
|
|
113
|
+
jobs,
|
|
114
|
+
capUsd,
|
|
115
|
+
capSource,
|
|
116
|
+
paid: paidBy(provider, jobs),
|
|
117
|
+
providers: provider,
|
|
118
|
+
candidates: 1,
|
|
119
|
+
});
|
|
120
|
+
return { spec, profile, derivation, provider, routes, config, capUsd, perCall, work };
|
|
121
|
+
}
|
|
122
|
+
export const materialsCommand = defineCommand({
|
|
123
|
+
name: "materials",
|
|
124
|
+
tool: "materials",
|
|
125
|
+
summary: "derive and check material maps, native renditions and target lit previews",
|
|
126
|
+
details: `Derives the channels requested by style.materials, checks alignment and temporal stability
|
|
127
|
+
(a map-flicker decision on each frame pair whose map pixels cannot clear it),
|
|
128
|
+
writes native-resolution renditions, runs target compression and dusk-rain/night previews,
|
|
129
|
+
and judges the flat and lit images with vision QA. Rejected materials exit 5 and remain
|
|
130
|
+
unapproved. Model calls reserve against --cap. See docs/materials.md.`,
|
|
131
|
+
input: {
|
|
132
|
+
type: "object",
|
|
133
|
+
properties: {
|
|
134
|
+
albedo: {
|
|
135
|
+
type: "string",
|
|
136
|
+
description: "the painted albedo image",
|
|
137
|
+
placeholder: "<painted.png>",
|
|
138
|
+
},
|
|
139
|
+
spec: { type: "string", description: "the asset spec", placeholder: "<spec.json>" },
|
|
140
|
+
profile: { type: "string", description: "the target profile", placeholder: "<profile.json>" },
|
|
141
|
+
derivation: {
|
|
142
|
+
type: "string",
|
|
143
|
+
description: "the declared method and version of every channel",
|
|
144
|
+
placeholder: "<derivation.json>",
|
|
145
|
+
},
|
|
146
|
+
out: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "where maps, renditions and the report are written",
|
|
149
|
+
placeholder: "<directory>",
|
|
150
|
+
},
|
|
151
|
+
cap: {
|
|
152
|
+
type: "number",
|
|
153
|
+
description: "the run's cost cap in USD; at most, and by default, the settings' caps.runUsd",
|
|
154
|
+
placeholder: "<usd>",
|
|
155
|
+
},
|
|
156
|
+
workItem: {
|
|
157
|
+
type: "string",
|
|
158
|
+
description: "the work item the spend ledger counts against",
|
|
159
|
+
placeholder: "<label>",
|
|
160
|
+
},
|
|
161
|
+
digitalSourceType: {
|
|
162
|
+
type: "string",
|
|
163
|
+
description: "the IPTC digital source type to declare",
|
|
164
|
+
placeholder: "<IPTC code or URI>",
|
|
165
|
+
},
|
|
166
|
+
providerScript: {
|
|
167
|
+
type: "string",
|
|
168
|
+
description: "answer every model call from this module instead of a provider",
|
|
169
|
+
placeholder: "<module>",
|
|
170
|
+
},
|
|
171
|
+
round: ROUND_PROPERTY,
|
|
172
|
+
runs: RUNS_PROPERTY,
|
|
173
|
+
dryRun: DRY_RUN_PROPERTY,
|
|
174
|
+
},
|
|
175
|
+
required: ["albedo", "spec", "profile", "derivation", "out"],
|
|
176
|
+
additionalProperties: false,
|
|
177
|
+
},
|
|
178
|
+
effect: { readOnly: false, spends: "conditional", writes: "out" },
|
|
179
|
+
confirm: "spend",
|
|
180
|
+
plan: async (args, ctx) => (await prepare(args, ctx)).work,
|
|
181
|
+
async run(args, ctx) {
|
|
182
|
+
const { spec, profile, derivation, provider, routes, config, capUsd, perCall, work } = await prepare(args, ctx);
|
|
183
|
+
const ledger = spendLedger(ctx, args.workItem).forProfile(profile.value);
|
|
184
|
+
if (args.dryRun) {
|
|
185
|
+
const estimateUsd = work.forecastUsd;
|
|
186
|
+
const plan = {
|
|
187
|
+
kind: "materials",
|
|
188
|
+
channels: config.channels,
|
|
189
|
+
scales: config.scales,
|
|
190
|
+
calls: perCall.length,
|
|
191
|
+
perCall,
|
|
192
|
+
estimateUsd,
|
|
193
|
+
capUsd,
|
|
194
|
+
withinCap: estimateUsd <= capUsd + 1e-9,
|
|
195
|
+
};
|
|
196
|
+
const human = `dry run: materials, ${plan.calls} planned call(s), nothing spent\nforecast ${usd(estimateUsd)} against a $${capUsd.toFixed(2)} cap`;
|
|
197
|
+
return dryRunOutcome(work, human, ledger, plan);
|
|
198
|
+
}
|
|
199
|
+
const call = new Caller({
|
|
200
|
+
provider,
|
|
201
|
+
budget: new Budget(capUsd, ledgerFor(ledger, provider)),
|
|
202
|
+
routes,
|
|
203
|
+
});
|
|
204
|
+
const declared = declarationOption(args.digitalSourceType);
|
|
205
|
+
const result = await runMaterials({
|
|
206
|
+
albedoPath: resolve(args.albedo),
|
|
207
|
+
...(declared && { digitalSourceType: declared }),
|
|
208
|
+
spec: spec.value,
|
|
209
|
+
profile: profile.value,
|
|
210
|
+
derivation: derivation.value,
|
|
211
|
+
baseDir: derivation.dir,
|
|
212
|
+
profileDir: profile.dir,
|
|
213
|
+
outDir: resolve(args.out),
|
|
214
|
+
call,
|
|
215
|
+
gate: gateOf(ctx),
|
|
216
|
+
});
|
|
217
|
+
const fields = { ...result };
|
|
218
|
+
const human = `materials ${result.passed ? "passed QA" : "failed QA"}: ${result.reportPath}`;
|
|
219
|
+
if (!result.passed)
|
|
220
|
+
return refusal("qa_found_nothing", "material maps failed QA", fields, human);
|
|
221
|
+
return { exitCode: 0, fields, human };
|
|
222
|
+
},
|
|
223
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mcpCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineCommand } from "./types.js";
|
|
2
|
+
export const mcpCommand = defineCommand({
|
|
3
|
+
name: "mcp",
|
|
4
|
+
tool: null,
|
|
5
|
+
summary: "serve every command as an MCP tool, and the library as resources, over stdio",
|
|
6
|
+
details: `Serves MCP over stdio with the official MCP SDK: one tool per command other than mcp, each
|
|
7
|
+
returning the command's --json document, and the project's library as asset:// resources (the
|
|
8
|
+
same tree ls and cat read; --target names the project, the working directory's Git top level by
|
|
9
|
+
default). Model keys come from the environment. File paths are
|
|
10
|
+
local to this server. Refuses to start (exit 2) when a proxy or TLS variable is set that the
|
|
11
|
+
settings' environment.allow does not list. With --read-only, registers only read-only tools that\nnever spend and write nothing (cat's CLI-only --out is unavailable over MCP); direct calls to\nedit, spend and pick tools are refused. Resources include library facets and hash-bound staged\ncandidate links, verified before their bytes are read.`,
|
|
12
|
+
json: false,
|
|
13
|
+
input: {
|
|
14
|
+
type: "object",
|
|
15
|
+
properties: {
|
|
16
|
+
readOnly: {
|
|
17
|
+
type: "boolean",
|
|
18
|
+
description: "expose only tools that read without spending or writing",
|
|
19
|
+
},
|
|
20
|
+
target: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "the project whose library to serve as resources",
|
|
23
|
+
placeholder: "<dir>",
|
|
24
|
+
},
|
|
25
|
+
workItem: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "the work item the spend ledger counts against",
|
|
28
|
+
placeholder: "<label>",
|
|
29
|
+
},
|
|
30
|
+
providerScript: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "answer every model call from this module instead of a provider",
|
|
33
|
+
placeholder: "<module>",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
},
|
|
38
|
+
effect: { readOnly: false, spends: "conditional", writes: "target" },
|
|
39
|
+
async run(args, ctx) {
|
|
40
|
+
// The MCP server module is imported here, so start-up never loads the MCP SDK.
|
|
41
|
+
const { serveMcp } = await import("../mcp.js");
|
|
42
|
+
// Decision-call log lines go to stderr; stdout carries only JSON-RPC.
|
|
43
|
+
await serveMcp({
|
|
44
|
+
...ctx,
|
|
45
|
+
...(args.providerScript !== undefined && { providerScript: args.providerScript }),
|
|
46
|
+
...(args.workItem !== undefined && { workItem: args.workItem }),
|
|
47
|
+
}, process.stdin, process.stdout, {
|
|
48
|
+
...(args.target !== undefined && { target: args.target }),
|
|
49
|
+
...(args.readOnly && { readOnly: true }),
|
|
50
|
+
});
|
|
51
|
+
return { exitCode: 0, fields: {}, human: "" };
|
|
52
|
+
},
|
|
53
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const migrateCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { extname, resolve } from "node:path";
|
|
3
|
+
import { parseDocument } from "yaml";
|
|
4
|
+
import { splitFrontMatter } from "../bible.js";
|
|
5
|
+
import { InputError } from "../errors.js";
|
|
6
|
+
import { formatLine, readFormat } from "../formats.js";
|
|
7
|
+
import { defineCommand } from "./types.js";
|
|
8
|
+
const KINDS = ["target-profile", "style-bible", "style-preset", "recipe", "settings"];
|
|
9
|
+
function isRecord(value) {
|
|
10
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11
|
+
}
|
|
12
|
+
export const migrateCommand = defineCommand({
|
|
13
|
+
name: "migrate",
|
|
14
|
+
tool: "migrate",
|
|
15
|
+
summary: "add the format line to a shared file, or move an older one forward",
|
|
16
|
+
details: `Adds the format line of --kind to a file that has none and moves a file with an older format
|
|
17
|
+
forward to the current one, rewriting it in place. A file already current is left untouched. A file
|
|
18
|
+
whose format is newer than this Assetgrove reads, or of another kind, is refused. The file is not
|
|
19
|
+
otherwise validated; loading it does that.`,
|
|
20
|
+
input: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
file: { type: "string", description: "the file to migrate", placeholder: "<file>" },
|
|
24
|
+
kind: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "the kind of file: target-profile, style-bible, style-preset, recipe or settings",
|
|
27
|
+
placeholder: "<kind>",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
required: ["kind"],
|
|
31
|
+
additionalProperties: false,
|
|
32
|
+
},
|
|
33
|
+
positionals: [{ name: "file" }],
|
|
34
|
+
effect: { readOnly: false, spends: "never", writes: "target" },
|
|
35
|
+
async run(args) {
|
|
36
|
+
if (args.file === undefined)
|
|
37
|
+
throw new InputError("missing the file to migrate");
|
|
38
|
+
if (!KINDS.includes(args.kind)) {
|
|
39
|
+
throw new InputError(`unknown --kind "${args.kind}"; expected ${KINDS.join(", ")}`);
|
|
40
|
+
}
|
|
41
|
+
const kind = args.kind;
|
|
42
|
+
const file = resolve(args.file);
|
|
43
|
+
let source;
|
|
44
|
+
try {
|
|
45
|
+
source = await readFile(file, "utf8");
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
throw new InputError(`cannot read ${file}`, { cause: error });
|
|
49
|
+
}
|
|
50
|
+
const markdown = extname(file) === ".md" || source.startsWith("---");
|
|
51
|
+
const line = formatLine(kind);
|
|
52
|
+
let status;
|
|
53
|
+
let from = null;
|
|
54
|
+
let output;
|
|
55
|
+
if (markdown) {
|
|
56
|
+
const { front, prose } = splitFrontMatter(source);
|
|
57
|
+
const doc = parseDocument(front);
|
|
58
|
+
if (doc.errors.length > 0) {
|
|
59
|
+
throw new InputError(`${file}: invalid front matter YAML: ${doc.errors[0].message}`);
|
|
60
|
+
}
|
|
61
|
+
const value = doc.toJS();
|
|
62
|
+
if (!isRecord(value))
|
|
63
|
+
throw new InputError(`${file}: front matter must be a mapping`);
|
|
64
|
+
if (value["format"] === undefined) {
|
|
65
|
+
status = "added";
|
|
66
|
+
if (doc.contents === null)
|
|
67
|
+
doc.set("format", line);
|
|
68
|
+
else
|
|
69
|
+
doc.contents.items.unshift(doc.createPair("format", line));
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const result = readFormat(kind, value, file);
|
|
73
|
+
if (result.migratedFrom === undefined) {
|
|
74
|
+
status = "current";
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
status = "migrated";
|
|
78
|
+
from = result.migratedFrom;
|
|
79
|
+
for (const key of Object.keys(value))
|
|
80
|
+
if (!(key in result.value))
|
|
81
|
+
doc.delete(key);
|
|
82
|
+
for (const [key, entry] of Object.entries(result.value))
|
|
83
|
+
doc.set(key, entry);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
output = `---\n${doc.toString()}---\n${prose}`;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
let value;
|
|
90
|
+
try {
|
|
91
|
+
value = JSON.parse(source);
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
throw new InputError(`${file} is not valid JSON: ${error.message}`);
|
|
95
|
+
}
|
|
96
|
+
if (!isRecord(value))
|
|
97
|
+
throw new InputError(`${file}: expected a JSON object`);
|
|
98
|
+
let next = value;
|
|
99
|
+
if (value["format"] === undefined) {
|
|
100
|
+
status = "added";
|
|
101
|
+
next = { format: line, ...value };
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
const result = readFormat(kind, value, file);
|
|
105
|
+
if (result.migratedFrom === undefined) {
|
|
106
|
+
status = "current";
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
status = "migrated";
|
|
110
|
+
from = result.migratedFrom;
|
|
111
|
+
next = result.value;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
output = `${JSON.stringify(next, null, 2)}\n`;
|
|
115
|
+
}
|
|
116
|
+
if (status !== "current")
|
|
117
|
+
await writeFile(file, output);
|
|
118
|
+
const human = status === "current"
|
|
119
|
+
? `${file} is already ${line}`
|
|
120
|
+
: `${status === "added" ? "added" : `migrated from ${from} to`} ${line} in ${file}`;
|
|
121
|
+
return { exitCode: 0, fields: { file, kind, status, from, format: line }, human };
|
|
122
|
+
},
|
|
123
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TransformFilesOptions } from "../transform/run.ts";
|
|
2
|
+
import type { Outcome } from "./types.ts";
|
|
3
|
+
/** Runs a recipe over input files with the style and frame size of an optional profile. */
|
|
4
|
+
export declare function runTransform(options: Pick<TransformFilesOptions, "recipe" | "inputs" | "out" | "digitalSourceType">, profilePath: string | undefined): Promise<Outcome>;
|
|
5
|
+
export declare const opCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|