@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,444 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `review` and `approve` (design section 3.3). `review` appends a comment, a reply, a resolution or
|
|
3
|
+
* a rejection to a version's record or a candidate's; `approve` is the only way to approve a
|
|
4
|
+
* version and needs a person's pick confirmation, whose digest covers the asset id, the version's
|
|
5
|
+
* sha256 and the record's head, so a stored confirmation no longer applies once the record changes.
|
|
6
|
+
* Headless settings never approve. Annotation text reaches a tool result only under `sharedText`.
|
|
7
|
+
*/
|
|
8
|
+
import { confirmationPath, digestOf, requireConfirmation } from "../confirm/index.js";
|
|
9
|
+
import { InputError } from "../errors.js";
|
|
10
|
+
import { anchorMembers, anchorOf, checkAnchor, describeAnchor, versionExtent, } from "../library/extent.js";
|
|
11
|
+
import { annotateCandidate, loadAsset, locateAsset, locateCandidate, newest, selectVersion, withLibraryLock, writeAsset, } from "../library/actions.js";
|
|
12
|
+
import { appendAnnotation, nextStamp, placeholderBody, placeholderMarks, recordHead, versionNumber, versionStatus, } from "../library/review.js";
|
|
13
|
+
import { PlanChangedError } from "../planning.js";
|
|
14
|
+
import { defineCommand } from "./types.js";
|
|
15
|
+
/** An annotation as a tool result names it: by id, motivation and action, never its text. */
|
|
16
|
+
export function annotationFields(annotation) {
|
|
17
|
+
const target = annotation.target;
|
|
18
|
+
const anchor = anchorOf(target);
|
|
19
|
+
return {
|
|
20
|
+
id: annotation.id,
|
|
21
|
+
motivation: annotation.motivation,
|
|
22
|
+
...(annotation["ag:action"] !== undefined && { action: annotation["ag:action"] }),
|
|
23
|
+
...(annotation["ag:resolves"] !== undefined && { resolves: annotation["ag:resolves"] }),
|
|
24
|
+
...(typeof target === "string"
|
|
25
|
+
? { target }
|
|
26
|
+
: target["ag:version"] !== undefined && { version: target["ag:version"] }),
|
|
27
|
+
...(anchor !== undefined && { anchor }),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** The annotation's text bodies, as the `sharedText` of a tool result (design section 3.3). */
|
|
31
|
+
export function annotationText(annotation) {
|
|
32
|
+
const body = annotation.body === undefined ? [] : [annotation.body].flat();
|
|
33
|
+
return body.flatMap((part, i) => part.type === "TextualBody" && part.value !== ""
|
|
34
|
+
? [{ source: `annotation ${annotation.id} body[${i}]`, text: part.value }]
|
|
35
|
+
: []);
|
|
36
|
+
}
|
|
37
|
+
function textBody(value, purpose) {
|
|
38
|
+
return [{ type: "TextualBody", purpose, value }];
|
|
39
|
+
}
|
|
40
|
+
function requireAnnotation(record, id, option) {
|
|
41
|
+
const ref = id.startsWith("#") ? id : `#${id}`;
|
|
42
|
+
if (!record.annotations.some((a) => a.id === ref)) {
|
|
43
|
+
throw new InputError(`${option} ${id}: the record has no annotation with that id`);
|
|
44
|
+
}
|
|
45
|
+
return ref;
|
|
46
|
+
}
|
|
47
|
+
const NUMBER = /^\d+(\.\d+)?$/;
|
|
48
|
+
const INTEGER = /^\d+$/;
|
|
49
|
+
/** The anchor the `--frames`, `--cell` and `--time` options ask for, strictly parsed. */
|
|
50
|
+
function parseAnchor(args) {
|
|
51
|
+
const anchor = {};
|
|
52
|
+
if (args.frames !== undefined) {
|
|
53
|
+
const parts = args.frames.trim().split("-");
|
|
54
|
+
const [from, to] = parts.length === 1 ? [parts[0], parts[0]] : [parts[0], parts[1]];
|
|
55
|
+
if (parts.length > 2 || !INTEGER.test(from) || !INTEGER.test(to) || Number(from) > Number(to)) {
|
|
56
|
+
throw new InputError(`--frames must be <from>-<to> (or one frame), whole numbers from 0 with from at or before to, got "${args.frames}"`);
|
|
57
|
+
}
|
|
58
|
+
anchor.frames = { from: Number(from), to: Number(to) };
|
|
59
|
+
}
|
|
60
|
+
if (args.cell !== undefined) {
|
|
61
|
+
const parts = args.cell.trim().split(",");
|
|
62
|
+
if (parts.length !== 2 || !parts.every((p) => INTEGER.test(p.trim()))) {
|
|
63
|
+
throw new InputError(`--cell must be <column>,<row>, whole numbers from 0, got "${args.cell}"`);
|
|
64
|
+
}
|
|
65
|
+
anchor.cell = { column: Number(parts[0]), row: Number(parts[1]) };
|
|
66
|
+
}
|
|
67
|
+
if (args.time !== undefined) {
|
|
68
|
+
const parts = args.time.trim().split(",");
|
|
69
|
+
const [start, end] = parts.map((p) => p.trim());
|
|
70
|
+
if (parts.length !== 2 ||
|
|
71
|
+
!NUMBER.test(start) ||
|
|
72
|
+
!NUMBER.test(end) ||
|
|
73
|
+
Number(start) >= Number(end)) {
|
|
74
|
+
throw new InputError(`--time must be <start>,<end> in seconds, non-negative with start before end, got "${args.time}"`);
|
|
75
|
+
}
|
|
76
|
+
anchor.time = { start: Number(start), end: Number(end) };
|
|
77
|
+
}
|
|
78
|
+
return Object.keys(anchor).length === 0 ? undefined : anchor;
|
|
79
|
+
}
|
|
80
|
+
/** Anchors go only with a new comment on a version; this refuses them anywhere else. */
|
|
81
|
+
function requireNewComment(args) {
|
|
82
|
+
const anchor = parseAnchor(args);
|
|
83
|
+
if (anchor !== undefined && args.placeholder === true) {
|
|
84
|
+
throw new InputError("--placeholder marks the whole version; it takes no --frames, --cell or --time");
|
|
85
|
+
}
|
|
86
|
+
if (anchor !== undefined &&
|
|
87
|
+
(args.candidate !== undefined ||
|
|
88
|
+
args.reply !== undefined ||
|
|
89
|
+
args.resolve !== undefined ||
|
|
90
|
+
args.reject !== undefined)) {
|
|
91
|
+
throw new InputError("--frames, --cell and --time anchor a new --comment on a version; they do not go with --reply, --resolve, --reject or --candidate");
|
|
92
|
+
}
|
|
93
|
+
return anchor;
|
|
94
|
+
}
|
|
95
|
+
/** The annotation a review's options ask for, against `target` (the version or the candidate). */
|
|
96
|
+
function reviewAnnotation(args, record, target, created) {
|
|
97
|
+
if (args.placeholder === true) {
|
|
98
|
+
if (args.candidate !== undefined ||
|
|
99
|
+
args.reply !== undefined ||
|
|
100
|
+
args.resolve !== undefined ||
|
|
101
|
+
args.reject !== undefined) {
|
|
102
|
+
throw new InputError("--placeholder marks a version; it does not go with --candidate, --reply, --resolve or --reject");
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
type: "Annotation",
|
|
106
|
+
motivation: "tagging",
|
|
107
|
+
created,
|
|
108
|
+
body: [
|
|
109
|
+
placeholderBody(),
|
|
110
|
+
...(args.comment !== undefined && args.comment.trim() !== ""
|
|
111
|
+
? [{ type: "TextualBody", purpose: "commenting", value: args.comment }]
|
|
112
|
+
: []),
|
|
113
|
+
],
|
|
114
|
+
target,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const actions = [args.reply, args.resolve, args.reject].filter((v) => v !== undefined);
|
|
118
|
+
if (actions.length > 1 || (args.reject !== undefined && args.comment !== undefined)) {
|
|
119
|
+
throw new InputError("review takes one of --comment, --reply <id> --comment <text>, --resolve <id>, --reject <reason> or --placeholder");
|
|
120
|
+
}
|
|
121
|
+
if (args.reject !== undefined) {
|
|
122
|
+
if (args.reject.trim() === "")
|
|
123
|
+
throw new InputError("--reject needs a reason");
|
|
124
|
+
return {
|
|
125
|
+
type: "Annotation",
|
|
126
|
+
motivation: "assessing",
|
|
127
|
+
created,
|
|
128
|
+
body: textBody(args.reject, "assessing"),
|
|
129
|
+
target,
|
|
130
|
+
"ag:action": "reject",
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
if (args.resolve !== undefined) {
|
|
134
|
+
const resolves = requireAnnotation(record, args.resolve, "--resolve");
|
|
135
|
+
return {
|
|
136
|
+
type: "Annotation",
|
|
137
|
+
motivation: "moderating",
|
|
138
|
+
created,
|
|
139
|
+
...(args.comment !== undefined &&
|
|
140
|
+
args.comment !== "" && { body: textBody(args.comment, "commenting") }),
|
|
141
|
+
target: resolves,
|
|
142
|
+
"ag:action": "resolve",
|
|
143
|
+
"ag:resolves": resolves,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
if (args.comment === undefined || args.comment.trim() === "") {
|
|
147
|
+
throw new InputError(args.reply !== undefined
|
|
148
|
+
? "--reply needs its text in --comment"
|
|
149
|
+
: "review needs --comment, --reply, --resolve, --reject or --placeholder");
|
|
150
|
+
}
|
|
151
|
+
if (args.reply !== undefined) {
|
|
152
|
+
return {
|
|
153
|
+
type: "Annotation",
|
|
154
|
+
motivation: "replying",
|
|
155
|
+
created,
|
|
156
|
+
body: textBody(args.comment, "replying"),
|
|
157
|
+
target: requireAnnotation(record, args.reply, "--reply"),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
type: "Annotation",
|
|
162
|
+
motivation: "commenting",
|
|
163
|
+
created,
|
|
164
|
+
body: textBody(args.comment, "commenting"),
|
|
165
|
+
target,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function versionTarget(asset, version) {
|
|
169
|
+
return { source: asset.resource, "ag:version": version.sha256 };
|
|
170
|
+
}
|
|
171
|
+
export const reviewCommand = defineCommand({
|
|
172
|
+
name: "review",
|
|
173
|
+
tool: "review",
|
|
174
|
+
summary: "comment on, reply to, resolve or reject a version or a candidate, or mark a version as a placeholder",
|
|
175
|
+
details: `Appends one annotation to a review record (docs/library.md): for a version, the asset's
|
|
176
|
+
<assetId>.review.json (the address is its card, media or review record; --version names the version
|
|
177
|
+
by number or sha256, the current one by default); for a candidate, <run>/reviews/<candidate>.review.json
|
|
178
|
+
(the address is the run directory, with --candidate). --comment <text> comments; --reply <id> with
|
|
179
|
+
--comment <text> replies to an annotation; --resolve <id> closes a request (--comment is its note);
|
|
180
|
+
--reject <reason> rejects. --placeholder marks the exact version as a placeholder (a tagging
|
|
181
|
+
annotation with the tag placeholder; --comment is its note), so a release deliver refuses it; it
|
|
182
|
+
takes no --candidate, --reply, --resolve, --reject or anchor. Existing lines never change. For a
|
|
183
|
+
version it then rewrites the card's state, the folder indexes and log.md. No confirmation. The
|
|
184
|
+
text is returned only under sharedText.
|
|
185
|
+
A new --comment on a version may anchor to part of it: --frames <from>-<to> (0-based, inclusive),
|
|
186
|
+
--cell <column>,<row> (0-based) and --time <start>,<end> (seconds); each is checked against the
|
|
187
|
+
version's own bytes and refused, naming the valid range, when it falls outside.`,
|
|
188
|
+
input: {
|
|
189
|
+
type: "object",
|
|
190
|
+
properties: {
|
|
191
|
+
address: {
|
|
192
|
+
type: "string",
|
|
193
|
+
description: "the asset's card, media or review record, or a run directory",
|
|
194
|
+
placeholder: "<address>",
|
|
195
|
+
},
|
|
196
|
+
candidate: {
|
|
197
|
+
type: "string",
|
|
198
|
+
description: "the candidate of the run directory to review",
|
|
199
|
+
placeholder: "<id>",
|
|
200
|
+
},
|
|
201
|
+
version: {
|
|
202
|
+
type: "string",
|
|
203
|
+
description: "the version to review, by number or sha256; the current one by default",
|
|
204
|
+
placeholder: "<n|sha256>",
|
|
205
|
+
},
|
|
206
|
+
comment: { type: "string", description: "the comment's text", placeholder: "<text>" },
|
|
207
|
+
reply: {
|
|
208
|
+
type: "string",
|
|
209
|
+
description: "the annotation id to reply to, with --comment",
|
|
210
|
+
placeholder: "<id>",
|
|
211
|
+
},
|
|
212
|
+
resolve: {
|
|
213
|
+
type: "string",
|
|
214
|
+
description: "the annotation id of the request to resolve",
|
|
215
|
+
placeholder: "<id>",
|
|
216
|
+
},
|
|
217
|
+
reject: { type: "string", description: "reject, with this reason", placeholder: "<reason>" },
|
|
218
|
+
placeholder: {
|
|
219
|
+
type: "boolean",
|
|
220
|
+
description: "mark the version as a placeholder, so a release delivery refuses it",
|
|
221
|
+
},
|
|
222
|
+
frames: {
|
|
223
|
+
type: "string",
|
|
224
|
+
description: "anchor a new comment to a frame range of a version, 0-based and inclusive",
|
|
225
|
+
placeholder: "<from>-<to>",
|
|
226
|
+
},
|
|
227
|
+
cell: {
|
|
228
|
+
type: "string",
|
|
229
|
+
description: "anchor a new comment to an atlas cell of a version, 0-based",
|
|
230
|
+
placeholder: "<column>,<row>",
|
|
231
|
+
},
|
|
232
|
+
time: {
|
|
233
|
+
type: "string",
|
|
234
|
+
description: "anchor a new comment to a time range of a version, in seconds",
|
|
235
|
+
placeholder: "<start>,<end>",
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
required: ["address"],
|
|
239
|
+
additionalProperties: false,
|
|
240
|
+
},
|
|
241
|
+
positionals: [{ name: "address" }],
|
|
242
|
+
effect: { readOnly: false, spends: "never", writes: "target" },
|
|
243
|
+
async run(args, ctx) {
|
|
244
|
+
const anchor = requireNewComment(args);
|
|
245
|
+
if (args.candidate !== undefined) {
|
|
246
|
+
if (args.version !== undefined)
|
|
247
|
+
throw new InputError("--version names a version, not a candidate");
|
|
248
|
+
const location = await locateCandidate(args.address, args.candidate);
|
|
249
|
+
const { annotation } = await annotateCandidate(location, (record) => reviewAnnotation(args, record, { source: `../${location.file}`, "ag:version": location.sha256 }, nextStamp(record)));
|
|
250
|
+
return {
|
|
251
|
+
exitCode: 0,
|
|
252
|
+
fields: {
|
|
253
|
+
run: location.runDir,
|
|
254
|
+
candidate: location.candidate,
|
|
255
|
+
record: location.reviewPath,
|
|
256
|
+
annotation: annotationFields(annotation),
|
|
257
|
+
files: [location.reviewPath],
|
|
258
|
+
sharedText: annotationText(annotation),
|
|
259
|
+
},
|
|
260
|
+
human: `${annotation.motivation} ${annotation.id} on candidate ${location.candidate} of run ${location.runId}\nwrote ${location.reviewPath}`,
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
const location = locateAsset(args.address);
|
|
264
|
+
return withLibraryLock(location, ctx.settings.stateDir, async () => {
|
|
265
|
+
const asset = await loadAsset(location);
|
|
266
|
+
const version = selectVersion(asset.record, args.version);
|
|
267
|
+
let target = versionTarget(asset, version);
|
|
268
|
+
if (anchor !== undefined) {
|
|
269
|
+
checkAnchor(anchor, await versionExtent(asset, version), asset.assetId);
|
|
270
|
+
target = { ...target, ...anchorMembers(anchor) };
|
|
271
|
+
}
|
|
272
|
+
const input = reviewAnnotation(args, asset.record, target, nextStamp(asset.record));
|
|
273
|
+
const record = appendAnnotation(asset.record, input);
|
|
274
|
+
const annotation = newest(record, input);
|
|
275
|
+
const written = await writeAsset(asset, record);
|
|
276
|
+
const number = versionNumber(record, version.sha256);
|
|
277
|
+
const marked = placeholderMarks(record, version.sha256).length > 0;
|
|
278
|
+
return {
|
|
279
|
+
exitCode: 0,
|
|
280
|
+
fields: {
|
|
281
|
+
asset: asset.assetId,
|
|
282
|
+
version: number,
|
|
283
|
+
sha256: version.sha256,
|
|
284
|
+
state: versionStatus(record, version.sha256),
|
|
285
|
+
cardState: written.state,
|
|
286
|
+
annotation: annotationFields(annotation),
|
|
287
|
+
...(marked && { placeholder: true }),
|
|
288
|
+
files: written.files,
|
|
289
|
+
sharedText: annotationText(annotation),
|
|
290
|
+
},
|
|
291
|
+
human: [
|
|
292
|
+
`${annotation.motivation} ${annotation.id} on version ${number} of ${asset.assetId}${anchor === undefined ? "" : ` (${describeAnchor(anchor)})`}${marked ? `\nversion ${number} is marked as a placeholder` : ""}`,
|
|
293
|
+
...written.files.map((f) => `wrote ${f}`),
|
|
294
|
+
].join("\n"),
|
|
295
|
+
};
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
/**
|
|
300
|
+
* The approve request: a pick confirmation whose digest covers the asset id, the version's sha256
|
|
301
|
+
* and the record's head (its last annotation's id and the hash of its item lines).
|
|
302
|
+
*/
|
|
303
|
+
export function approveRequest(asset, version) {
|
|
304
|
+
const head = recordHead(asset.record);
|
|
305
|
+
const number = versionNumber(asset.record, version.sha256);
|
|
306
|
+
const body = {
|
|
307
|
+
command: "approve",
|
|
308
|
+
asset: asset.assetId,
|
|
309
|
+
card: asset.cardPath,
|
|
310
|
+
candidate: version.sha256,
|
|
311
|
+
version: version.sha256,
|
|
312
|
+
head,
|
|
313
|
+
};
|
|
314
|
+
const id = digestOf(body);
|
|
315
|
+
return {
|
|
316
|
+
kind: "pick",
|
|
317
|
+
id,
|
|
318
|
+
summary: `approve version ${number} of ${asset.assetId} (sha256 ${version.sha256})`,
|
|
319
|
+
details: {
|
|
320
|
+
asset: asset.assetId,
|
|
321
|
+
card: asset.cardPath,
|
|
322
|
+
version: number,
|
|
323
|
+
sha256: version.sha256,
|
|
324
|
+
state: versionStatus(asset.record, version.sha256),
|
|
325
|
+
lastAnnotation: head.last,
|
|
326
|
+
digest: id,
|
|
327
|
+
},
|
|
328
|
+
body,
|
|
329
|
+
choices: [version.sha256],
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
/** Rebuilds a pending approve request from its body; undefined when the body names none. */
|
|
333
|
+
export async function rebuildApproveRequest(body) {
|
|
334
|
+
if (typeof body["card"] !== "string" || typeof body["version"] !== "string")
|
|
335
|
+
return undefined;
|
|
336
|
+
const asset = await loadAsset(locateAsset(body["card"]));
|
|
337
|
+
return approveRequest(asset, selectVersion(asset.record, body["version"]));
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Exit 8 `confirmation_required` under headless settings, before anything is written: no score,
|
|
341
|
+
* run or operator setting approves or adopts (design section 3.3).
|
|
342
|
+
*/
|
|
343
|
+
export function headlessRefusal(request, fields, what) {
|
|
344
|
+
const message = `${request.summary}: headless settings never ${what}; a person runs it with attended settings`;
|
|
345
|
+
return {
|
|
346
|
+
exitCode: 8,
|
|
347
|
+
fields: { ...fields, digest: request.id },
|
|
348
|
+
human: message,
|
|
349
|
+
error: { code: "confirmation_required", message },
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
/** The confirmation of a request, refusing headless settings first. */
|
|
353
|
+
export async function personConfirms(request, ctx) {
|
|
354
|
+
return requireConfirmation(request, {
|
|
355
|
+
settings: ctx.settings,
|
|
356
|
+
...(ctx.prompt && { prompt: ctx.prompt }),
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/** Exit 2 `plan_changed` when the request rebuilt under the lock is not the one confirmed. */
|
|
360
|
+
export function requireSameRequest(confirmed, now) {
|
|
361
|
+
if (now.id !== confirmed.id) {
|
|
362
|
+
throw new PlanChangedError(`the review record of ${String(now.body["asset"])} changed after the confirmation (was ${confirmed.id}, now ${now.id}); run it again`);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
export const approveCommand = defineCommand({
|
|
366
|
+
name: "approve",
|
|
367
|
+
tool: "approve",
|
|
368
|
+
summary: "approve a version of a picked asset, with a person's confirmation",
|
|
369
|
+
details: `The only way to approve (design section 3.3). The address is the asset's card, media or
|
|
370
|
+
review record; --version names the version by number or sha256, the current one by default. A person
|
|
371
|
+
confirms the approval like a pick: a record at <configDir>/confirmations/<hex>.json for its digest,
|
|
372
|
+
an MCP client's form, the TTY, or exit 8 confirmation_required and \`assetgrove confirm <hex>\`. The
|
|
373
|
+
digest covers the asset id, the version's sha256 and the review record's head (its last annotation's
|
|
374
|
+
id and a sha256 of its item lines), so a stored confirmation no longer applies after a reject, a pull
|
|
375
|
+
or a merge adds a line: approve asks again. Under headless settings it exits 8 confirmation_required
|
|
376
|
+
and writes nothing. Then appends an assessing annotation (ag:action approve) with the confirmation
|
|
377
|
+
method and digest, sets the card's state to approved, rewrites its lock and logs a line. The
|
|
378
|
+
manifest's review field stays at pending.`,
|
|
379
|
+
input: {
|
|
380
|
+
type: "object",
|
|
381
|
+
properties: {
|
|
382
|
+
address: {
|
|
383
|
+
type: "string",
|
|
384
|
+
description: "the asset's card, media or review record",
|
|
385
|
+
placeholder: "<address>",
|
|
386
|
+
},
|
|
387
|
+
version: {
|
|
388
|
+
type: "string",
|
|
389
|
+
description: "the version to approve, by number or sha256; the current one by default",
|
|
390
|
+
placeholder: "<n|sha256>",
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
required: ["address"],
|
|
394
|
+
additionalProperties: false,
|
|
395
|
+
},
|
|
396
|
+
positionals: [{ name: "address" }],
|
|
397
|
+
effect: { readOnly: false, spends: "never", writes: "target" },
|
|
398
|
+
confirm: "pick",
|
|
399
|
+
async run(args, ctx) {
|
|
400
|
+
const location = locateAsset(args.address);
|
|
401
|
+
const before = await loadAsset(location);
|
|
402
|
+
const request = approveRequest(before, selectVersion(before.record, args.version));
|
|
403
|
+
const sha256 = String(request.body["version"]);
|
|
404
|
+
if (ctx.settings.mode === "headless") {
|
|
405
|
+
return headlessRefusal(request, { asset: before.assetId, sha256 }, "approve");
|
|
406
|
+
}
|
|
407
|
+
const confirmation = await personConfirms(request, ctx);
|
|
408
|
+
return withLibraryLock(location, ctx.settings.stateDir, async () => {
|
|
409
|
+
const asset = await loadAsset(location);
|
|
410
|
+
const version = selectVersion(asset.record, sha256);
|
|
411
|
+
requireSameRequest(request, approveRequest(asset, version));
|
|
412
|
+
const input = {
|
|
413
|
+
type: "Annotation",
|
|
414
|
+
motivation: "assessing",
|
|
415
|
+
created: nextStamp(asset.record),
|
|
416
|
+
target: versionTarget(asset, version),
|
|
417
|
+
"ag:action": "approve",
|
|
418
|
+
"ag:confirmation": { method: confirmation.method, digest: confirmation.digest },
|
|
419
|
+
};
|
|
420
|
+
const record = appendAnnotation(asset.record, input);
|
|
421
|
+
const annotation = newest(record, input);
|
|
422
|
+
const written = await writeAsset(asset, record);
|
|
423
|
+
const number = versionNumber(record, version.sha256);
|
|
424
|
+
return {
|
|
425
|
+
exitCode: 0,
|
|
426
|
+
fields: {
|
|
427
|
+
asset: asset.assetId,
|
|
428
|
+
version: number,
|
|
429
|
+
sha256: version.sha256,
|
|
430
|
+
state: versionStatus(record, version.sha256),
|
|
431
|
+
cardState: written.state,
|
|
432
|
+
annotation: annotationFields(annotation),
|
|
433
|
+
confirmation,
|
|
434
|
+
confirmationRecord: confirmationPath(ctx.settings.configDir, confirmation.digest),
|
|
435
|
+
files: written.files,
|
|
436
|
+
},
|
|
437
|
+
human: [
|
|
438
|
+
`approved version ${number} of ${asset.assetId} (${confirmation.method})`,
|
|
439
|
+
...written.files.map((f) => `wrote ${f}`),
|
|
440
|
+
].join("\n"),
|
|
441
|
+
};
|
|
442
|
+
});
|
|
443
|
+
},
|
|
444
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const rigCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { basename, dirname, extname, resolve } from "node:path";
|
|
2
|
+
import { InputError } from "../errors.js";
|
|
3
|
+
import { readRun } from "../loop.js";
|
|
4
|
+
import { readJson, readModel, loadProfile } from "../inputs.js";
|
|
5
|
+
import { readProvenance, rerig } from "../model3d/rig/command.js";
|
|
6
|
+
import { formatRun, refusal } from "./result.js";
|
|
7
|
+
import { defineCommand } from "./types.js";
|
|
8
|
+
export const rigCommand = defineCommand({
|
|
9
|
+
name: "rig",
|
|
10
|
+
tool: "rig",
|
|
11
|
+
summary: "re-rig a 3D character on the target's shared rig with generated gaits and motions",
|
|
12
|
+
details: `Fits the target profile's skeleton template (model3d.rig) to an existing character model, such
|
|
13
|
+
as a picked candidate, skins it, generates the clips its gait profiles (model3d.gaits) and
|
|
14
|
+
motions (model3d.motions) declare for the spec's clips, and checks foot contact, joint limits,
|
|
15
|
+
skinning, loops and one-shot ends per clip. The result is staged as a one-candidate run, with
|
|
16
|
+
turntable renders, side views and a looping preview per clip, that pick hands off
|
|
17
|
+
as for stage. The source's provenance is carried over with the rig's hashes. No model is called
|
|
18
|
+
and nothing is spent (docs/characters-3d.md).`,
|
|
19
|
+
input: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
model: { type: "string", description: "the character model", placeholder: "<model.glb>" },
|
|
23
|
+
provenance: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "the model's provenance",
|
|
26
|
+
placeholder: "<provenance.json>",
|
|
27
|
+
},
|
|
28
|
+
spec: { type: "string", description: "the asset spec", placeholder: "<spec.json>" },
|
|
29
|
+
profile: { type: "string", description: "the target profile", placeholder: "<profile.json>" },
|
|
30
|
+
runs: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "where runs are staged",
|
|
33
|
+
default: ".assetgrove/runs",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ["model", "provenance", "spec", "profile"],
|
|
37
|
+
additionalProperties: false,
|
|
38
|
+
},
|
|
39
|
+
effect: { readOnly: false, spends: "never", writes: "runs" },
|
|
40
|
+
async run(args) {
|
|
41
|
+
const model = await readModel(args.model).catch(async (error) => {
|
|
42
|
+
throw (await failedBeforeModel(args.model)) ?? error;
|
|
43
|
+
});
|
|
44
|
+
const spec = await readJson(args.spec);
|
|
45
|
+
const profile = await loadProfile(args.profile);
|
|
46
|
+
const { run, runDir, passed } = await rerig({
|
|
47
|
+
model,
|
|
48
|
+
provenance: await readProvenance(args.provenance, model, { rejected: true }),
|
|
49
|
+
spec: spec.value,
|
|
50
|
+
specDir: spec.dir,
|
|
51
|
+
profile: profile.value,
|
|
52
|
+
profileDir: profile.dir,
|
|
53
|
+
runsDir: resolve(args.runs ?? ".assetgrove/runs"),
|
|
54
|
+
});
|
|
55
|
+
const fields = { runDir, ...run };
|
|
56
|
+
const human = formatRun(run, runDir);
|
|
57
|
+
if (passed)
|
|
58
|
+
return { exitCode: 0, fields, human };
|
|
59
|
+
return refusal("qa_found_nothing", "the re-rigged model did not pass QA", fields, human);
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
/** The refusal for a model file that is no file because its candidate failed before generation. */
|
|
63
|
+
async function failedBeforeModel(path) {
|
|
64
|
+
const dir = dirname(resolve(path));
|
|
65
|
+
const n = /^c(\d+)$/.exec(basename(path, extname(path)))?.[1];
|
|
66
|
+
if (n === undefined)
|
|
67
|
+
return undefined;
|
|
68
|
+
const run = await readRun(dir).catch(() => undefined);
|
|
69
|
+
const prefix = `candidate ${n}: `;
|
|
70
|
+
const error = run?.errors?.find((e) => e.startsWith(prefix));
|
|
71
|
+
if (error === undefined)
|
|
72
|
+
return undefined;
|
|
73
|
+
return new InputError(`candidate c${n} of ${dir} failed before its model was generated (${error.slice(prefix.length)}): there is no model to re-rig`);
|
|
74
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CommandSpec, JsonSchemaObject, JsonSchemaProperty, Outcome, RunContext } from "./types.ts";
|
|
2
|
+
type Args = Record<string, unknown>;
|
|
3
|
+
/** The CLI flag of an input property: its kebab-case name (`identityMode` is `--identity-mode`). */
|
|
4
|
+
export declare function flagName(property: string): string;
|
|
5
|
+
/** The input properties a command takes as flags: every property that is not a positional. */
|
|
6
|
+
export declare function flagProperties(spec: CommandSpec): [string, JsonSchemaProperty][];
|
|
7
|
+
/** Every flag a command accepts on the command line, `--help` and (unless it opts out) `--json`. */
|
|
8
|
+
export declare function cliFlags(spec: CommandSpec): string[];
|
|
9
|
+
/** A command line's arguments as the command's input, and whether it asked for help. */
|
|
10
|
+
export declare function parseCommandLine(spec: CommandSpec, argv: string[]): {
|
|
11
|
+
args: Args;
|
|
12
|
+
help: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Checks a command's input: every required option present and not empty, then the whole object
|
|
16
|
+
* against the spec's input schema through the JSON Schema validator the MCP SDK uses.
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateArgs(spec: CommandSpec, args: Args): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Validates a command's input and runs it; a thrown error becomes its refusal outcome. A command
|
|
21
|
+
* that can send a key first refuses an environment its settings do not allow (exit 2
|
|
22
|
+
* `settings_invalid`); a paid command then refuses a key in a tracked file of the working
|
|
23
|
+
* directory's repository (exit 2 `key_tracked`); pick and write-families refuse a key in a tracked
|
|
24
|
+
* file of their target's repository. A command that needs the search slot exits 2
|
|
25
|
+
* `extension_unavailable` while no loaded extension fills it, and checks the environment too.
|
|
26
|
+
* The command's log is redacted.
|
|
27
|
+
*/
|
|
28
|
+
export declare function runCommand(spec: CommandSpec, args: Args, ctx: RunContext): Promise<Outcome>;
|
|
29
|
+
/** The outcome of a thrown error; a settings refusal keeps its own code, `settings_invalid`. */
|
|
30
|
+
export declare function errorOutcome(error: unknown): Outcome;
|
|
31
|
+
/**
|
|
32
|
+
* Input properties no tool accepts: the scripted provider and routes come from the server, a dry
|
|
33
|
+
* run is the CLI's. `json` and `help` are CLI flags, not properties. A property marked `cliOnly`
|
|
34
|
+
* is left out too.
|
|
35
|
+
*/
|
|
36
|
+
export declare const CLI_ONLY_PROPERTIES: readonly string[];
|
|
37
|
+
/** A tool's input schema: the command's input without the CLI-only properties or help placeholders. */
|
|
38
|
+
export declare function toolInputSchema(spec: CommandSpec): JsonSchemaObject;
|
|
39
|
+
/** A command's help, derived from its spec: the usage line, summary, details and every option. */
|
|
40
|
+
export declare function commandUsage(spec: CommandSpec): string;
|
|
41
|
+
/** The commands a context offers: every core command, and each slot command whose slot is filled. */
|
|
42
|
+
export declare function availableCommands(all: readonly CommandSpec[], extensions: {
|
|
43
|
+
search?: unknown;
|
|
44
|
+
} | undefined): CommandSpec[];
|
|
45
|
+
export {};
|