@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,393 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check stability: which QA checks are model-backed, and whether a model-backed check may filter.
|
|
3
|
+
*
|
|
4
|
+
* A model-backed check can answer the same input differently, and can agree with itself while being
|
|
5
|
+
* wrong (always "passed", always 0.75). So it filters only with a measured entry in `stability.json`
|
|
6
|
+
* for its id, version and the run's model that is both stable and right against labels: at least
|
|
7
|
+
* `MIN_REPEATS` repeats and `MIN_AGREEMENT` agreement, and a labelled set with at least
|
|
8
|
+
* `MIN_CLASS_CASES` should-pass and `MIN_CLASS_CASES` should-fail cases on which the check's
|
|
9
|
+
* false-pass rate is at most `MAX_FALSE_PASS_RATE` and its false-fail rate at most
|
|
10
|
+
* `MAX_FALSE_FAIL_RATE`. A class with too few labelled cases is not measured and never qualifies,
|
|
11
|
+
* as in identity evaluation (src/identity-eval.ts). Otherwise its reasons are advisory: marked
|
|
12
|
+
* `shadow` (recorded beside QA, never used to filter), and the result's `filtering` field says why.
|
|
13
|
+
*/
|
|
14
|
+
import { MODEL3D_FACING_OPERATION, STYLE_VERDICT_OPERATION, defaultRoutes } from "../routes.js";
|
|
15
|
+
import shipped from "./stability.json" with { type: "json" };
|
|
16
|
+
export const MIN_REPEATS = 3;
|
|
17
|
+
export const MIN_AGREEMENT = 0.95;
|
|
18
|
+
/** Labelled cases needed of each class (should-pass, should-fail). */
|
|
19
|
+
export const MIN_CLASS_CASES = 15;
|
|
20
|
+
/** The most should-fail cases a filtering check may pass, as a share of them. */
|
|
21
|
+
export const MAX_FALSE_PASS_RATE = 0.05;
|
|
22
|
+
/** The most should-pass cases a filtering check may fail, as a share of them. */
|
|
23
|
+
export const MAX_FALSE_FAIL_RATE = 0.1;
|
|
24
|
+
const image = (id) => ({
|
|
25
|
+
id,
|
|
26
|
+
version: "1",
|
|
27
|
+
modelBacked: false,
|
|
28
|
+
source: "deterministic",
|
|
29
|
+
});
|
|
30
|
+
const vision = (id, operation) => ({
|
|
31
|
+
id,
|
|
32
|
+
version: "1",
|
|
33
|
+
modelBacked: true,
|
|
34
|
+
source: "vision",
|
|
35
|
+
operation,
|
|
36
|
+
});
|
|
37
|
+
/** Image QA (src/qa.ts): deterministic pixel checks and the vision verdict's checks. */
|
|
38
|
+
export const IMAGE_QA_CHECKS = [
|
|
39
|
+
image("transparency"),
|
|
40
|
+
image("frame-count"),
|
|
41
|
+
image("palette"),
|
|
42
|
+
image("edge-halo"),
|
|
43
|
+
vision("transparency", "vision"),
|
|
44
|
+
vision("frame-count", "vision"),
|
|
45
|
+
vision("identity", "vision"),
|
|
46
|
+
vision("perspective", "vision"),
|
|
47
|
+
];
|
|
48
|
+
/**
|
|
49
|
+
* Animation QA's model-backed checks (src/animation/flicker.ts, src/animation/holes.ts): typed
|
|
50
|
+
* Boolean decisions (version 2, #376; version 1 read a label and a self-reported confidence from a
|
|
51
|
+
* vision model's text).
|
|
52
|
+
*/
|
|
53
|
+
export const ANIMATION_VISION_CHECKS = [
|
|
54
|
+
{
|
|
55
|
+
id: "identity-flicker",
|
|
56
|
+
version: "2",
|
|
57
|
+
modelBacked: true,
|
|
58
|
+
source: "decision",
|
|
59
|
+
operation: "flicker",
|
|
60
|
+
},
|
|
61
|
+
{ id: "holes", version: "2", modelBacked: true, source: "decision", operation: "holes" },
|
|
62
|
+
];
|
|
63
|
+
/**
|
|
64
|
+
* Stage's cut-out (src/generators/image.ts, #364): a typed Boolean decision on whether background
|
|
65
|
+
* removal cut part of the subject away or left background attached.
|
|
66
|
+
*/
|
|
67
|
+
export const CUTOUT_CHECK = {
|
|
68
|
+
id: "cutout",
|
|
69
|
+
version: "1",
|
|
70
|
+
modelBacked: true,
|
|
71
|
+
source: "decision",
|
|
72
|
+
operation: "cutout",
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Turnaround's subject check (src/turnaround.ts, #627): a typed choice decision on whether a view
|
|
76
|
+
* shows its subject alone, or what else it shows, asked of each of a candidate's views on its own
|
|
77
|
+
* (version 2, #638; version 1 asked once of all four views together).
|
|
78
|
+
*/
|
|
79
|
+
export const TURNAROUND_SUBJECT_CHECK = {
|
|
80
|
+
id: "turnaround:not-subject",
|
|
81
|
+
version: "2",
|
|
82
|
+
modelBacked: true,
|
|
83
|
+
source: "decision",
|
|
84
|
+
operation: "turnaround-subject",
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* A prop's facing (src/model3d/prop.ts, #649): a typed choice decision on which yaw render of the
|
|
88
|
+
* raw mesh shows the side the subject's approved front reference shows, or unclear. It never fails
|
|
89
|
+
* a candidate; once it qualifies, its answer turns the model, and until then the route's facing holds.
|
|
90
|
+
*/
|
|
91
|
+
export const PROP_FACING_CHECK = {
|
|
92
|
+
id: "prop-facing",
|
|
93
|
+
version: "1",
|
|
94
|
+
modelBacked: true,
|
|
95
|
+
source: "decision",
|
|
96
|
+
operation: MODEL3D_FACING_OPERATION,
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Look-dev markings (src/model3d/lookdev/markings.ts): a typed decision judges each marking kept,
|
|
100
|
+
* drifted or missing on the reference crop and the render crop (version 2, #365; version 1
|
|
101
|
+
* measured pixels in boxes a vision model drew).
|
|
102
|
+
*/
|
|
103
|
+
export const LOOKDEV_MARKINGS_CHECK = {
|
|
104
|
+
id: "lookdev-markings",
|
|
105
|
+
version: "2",
|
|
106
|
+
modelBacked: true,
|
|
107
|
+
source: "decision",
|
|
108
|
+
operation: "lookdev-marking",
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* The planned run's style verdict (src/planning.ts): a typed Boolean decision on whether each
|
|
112
|
+
* candidate violates the constitution or asset spec (version 2, #378; version 1 read a
|
|
113
|
+
* self-reported styleScore from a vision model's JSON).
|
|
114
|
+
*/
|
|
115
|
+
export const STYLE_SCORE_CHECK = {
|
|
116
|
+
id: "style-score",
|
|
117
|
+
version: "2",
|
|
118
|
+
modelBacked: true,
|
|
119
|
+
source: "decision",
|
|
120
|
+
operation: STYLE_VERDICT_OPERATION,
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* The set-level audit's scores (src/commands/audit.ts): a vision model scores each member's style
|
|
124
|
+
* against the bible's look and the set, and the identity decision model scores its likeness to its
|
|
125
|
+
* subject's lock. They never filter; the audit marks each score advisory until it qualifies here.
|
|
126
|
+
*/
|
|
127
|
+
export const AUDIT_STYLE_CHECK = vision("audit-style", "vision");
|
|
128
|
+
export const AUDIT_IDENTITY_CHECK = vision("audit-identity", "identity");
|
|
129
|
+
/** The material pipeline's lit checks (src/material/pipeline.ts): a vision model judges the renders. */
|
|
130
|
+
export const MATERIAL_LIT_CHECKS = [
|
|
131
|
+
"flat-albedo",
|
|
132
|
+
"normal-orientation",
|
|
133
|
+
"emissive-placement",
|
|
134
|
+
"dusk-rain",
|
|
135
|
+
"night",
|
|
136
|
+
].map((id) => vision(id, "material-qa"));
|
|
137
|
+
/**
|
|
138
|
+
* Material map flicker (src/material/flicker.ts, #364): a typed choice decision judges each frame
|
|
139
|
+
* pair the pixel comparison could not clear; only `flickers` fails. Its deterministic twin (pairs
|
|
140
|
+
* cleared by pixels, or with no corresponding pixels) is not model-backed.
|
|
141
|
+
*/
|
|
142
|
+
export const MATERIAL_FLICKER_CHECK = {
|
|
143
|
+
id: "material-flicker",
|
|
144
|
+
version: "1",
|
|
145
|
+
modelBacked: true,
|
|
146
|
+
source: "decision",
|
|
147
|
+
operation: "map-flicker",
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Every declared QA check that filters candidates. A check whose verdict a model decides is
|
|
151
|
+
* declared here as model-backed; the coverage test reads this list.
|
|
152
|
+
*/
|
|
153
|
+
export const QA_CHECKS = [
|
|
154
|
+
...IMAGE_QA_CHECKS,
|
|
155
|
+
...ANIMATION_VISION_CHECKS,
|
|
156
|
+
CUTOUT_CHECK,
|
|
157
|
+
TURNAROUND_SUBJECT_CHECK,
|
|
158
|
+
PROP_FACING_CHECK,
|
|
159
|
+
LOOKDEV_MARKINGS_CHECK,
|
|
160
|
+
STYLE_SCORE_CHECK,
|
|
161
|
+
...MATERIAL_LIT_CHECKS,
|
|
162
|
+
MATERIAL_FLICKER_CHECK,
|
|
163
|
+
AUDIT_STYLE_CHECK,
|
|
164
|
+
AUDIT_IDENTITY_CHECK,
|
|
165
|
+
];
|
|
166
|
+
/** The model the coverage rule measures against: the core default vision model. */
|
|
167
|
+
export const DEFAULT_VISION_MODEL = defaultRoutes.vision.model;
|
|
168
|
+
const SHA256 = /^[0-9a-f]{64}$/;
|
|
169
|
+
function isCount(value) {
|
|
170
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
171
|
+
}
|
|
172
|
+
function isEntry(value) {
|
|
173
|
+
const e = value;
|
|
174
|
+
return (e !== null &&
|
|
175
|
+
typeof e === "object" &&
|
|
176
|
+
typeof e["checkId"] === "string" &&
|
|
177
|
+
typeof e["version"] === "string" &&
|
|
178
|
+
typeof e["model"] === "string" &&
|
|
179
|
+
isCount(e["cases"]) &&
|
|
180
|
+
isCount(e["passCases"]) &&
|
|
181
|
+
isCount(e["failCases"]) &&
|
|
182
|
+
isCount(e["falsePasses"]) &&
|
|
183
|
+
isCount(e["falseFails"]) &&
|
|
184
|
+
typeof e["repeats"] === "number" &&
|
|
185
|
+
typeof e["agreement"] === "number" &&
|
|
186
|
+
typeof e["measuredAt"] === "string" &&
|
|
187
|
+
typeof e["measuredBy"] === "string" &&
|
|
188
|
+
e["measuredBy"].trim() !== "" &&
|
|
189
|
+
typeof e["labelledSetSha256"] === "string" &&
|
|
190
|
+
SHA256.test(e["labelledSetSha256"]));
|
|
191
|
+
}
|
|
192
|
+
/** Validates the entries of a stability file; throws on any malformed one. */
|
|
193
|
+
export function parseStability(value) {
|
|
194
|
+
if (!Array.isArray(value))
|
|
195
|
+
throw new Error("stability entries must be a JSON array");
|
|
196
|
+
for (const [i, entry] of value.entries()) {
|
|
197
|
+
const e = entry;
|
|
198
|
+
if (e !== null && typeof e === "object") {
|
|
199
|
+
if (typeof e["measuredBy"] !== "string" || e["measuredBy"].trim() === "")
|
|
200
|
+
throw new Error(`stability entry ${i + 1} has no measuredBy: an entry names who or what measured it`);
|
|
201
|
+
if (typeof e["labelledSetSha256"] !== "string" || !SHA256.test(e["labelledSetSha256"]))
|
|
202
|
+
throw new Error(`stability entry ${i + 1} has no labelledSetSha256: an entry names the sha256 (64 lower-case hex) of the labelled set it was measured on`);
|
|
203
|
+
}
|
|
204
|
+
if (!isEntry(entry)) {
|
|
205
|
+
throw new Error(`stability entry ${i + 1} needs checkId, version, model, measuredAt, measuredBy (strings), labelledSetSha256 (the labelled set's sha256, 64 lower-case hex), cases, passCases, failCases, falsePasses, falseFails (counts) and repeats, agreement (numbers)`);
|
|
206
|
+
}
|
|
207
|
+
if (entry.cases !== entry.passCases + entry.failCases ||
|
|
208
|
+
entry.falsePasses > entry.failCases ||
|
|
209
|
+
entry.falseFails > entry.passCases) {
|
|
210
|
+
throw new Error(`stability entry ${i + 1} is inconsistent: cases must be passCases + failCases, and wrong answers cannot exceed their class`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return value;
|
|
214
|
+
}
|
|
215
|
+
/** The measured entries shipped in src/qa/stability.json. */
|
|
216
|
+
export const STABILITY = parseStability(shipped);
|
|
217
|
+
/** An entry's error rates against its labels; a class with no labelled cases has none (`undefined`). */
|
|
218
|
+
export function errorRates(entry) {
|
|
219
|
+
return {
|
|
220
|
+
falsePassRate: entry.failCases > 0 ? entry.falsePasses / entry.failCases : undefined,
|
|
221
|
+
falseFailRate: entry.passCases > 0 ? entry.falseFails / entry.passCases : undefined,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
/** Whether an entry is enough for a check to filter: stable, and right often enough against labels. */
|
|
225
|
+
export function qualifies(entry) {
|
|
226
|
+
const { falsePassRate, falseFailRate } = errorRates(entry);
|
|
227
|
+
return (entry.repeats >= MIN_REPEATS &&
|
|
228
|
+
entry.agreement >= MIN_AGREEMENT &&
|
|
229
|
+
entry.passCases >= MIN_CLASS_CASES &&
|
|
230
|
+
entry.failCases >= MIN_CLASS_CASES &&
|
|
231
|
+
falsePassRate !== undefined &&
|
|
232
|
+
falsePassRate <= MAX_FALSE_PASS_RATE &&
|
|
233
|
+
falseFailRate !== undefined &&
|
|
234
|
+
falseFailRate <= MAX_FALSE_FAIL_RATE);
|
|
235
|
+
}
|
|
236
|
+
/** Whether a check filters on `model`, and why not when it does not. */
|
|
237
|
+
export function filteringState(check, model, entries = STABILITY) {
|
|
238
|
+
if (!check.modelBacked)
|
|
239
|
+
return { check: check.id, state: "filtering" };
|
|
240
|
+
const qualifying = entries.filter((e) => e.checkId === check.id && e.version === check.version && qualifies(e));
|
|
241
|
+
if (model !== undefined && qualifying.some((e) => e.model === model)) {
|
|
242
|
+
return { check: check.id, state: "filtering" };
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
check: check.id,
|
|
246
|
+
state: "advisory",
|
|
247
|
+
cause: qualifying.length > 0 ? "model-differs" : "no-entry",
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
/** Whether a declaration covers a check id: the same id, or a family's prefix. */
|
|
251
|
+
function covers(check, id) {
|
|
252
|
+
return check.family ? id.startsWith(check.id.slice(0, -1)) : check.id === id;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* The declaration a reason falls under, if any: one whose id (or family) and source cover it.
|
|
256
|
+
* Where several do, a model-backed one wins, so redeclaring a model-backed check never makes its
|
|
257
|
+
* reasons filter.
|
|
258
|
+
*/
|
|
259
|
+
export function checkOf(reason, checks = QA_CHECKS) {
|
|
260
|
+
const found = checks.filter((c) => covers(c, reason.check) && (c.source === undefined || c.source === reason.source));
|
|
261
|
+
return found.find((c) => c.modelBacked) ?? found[0];
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Applies stability to a candidate's reasons: each model-backed check without a qualifying entry
|
|
265
|
+
* for the model its route resolves to in `routes` has its reasons marked `shadow`. With
|
|
266
|
+
* `undeclared: "advisory"`, a reason no declaration in `checks` covers is marked `shadow` too, its
|
|
267
|
+
* state `advisory` with cause `undeclared`. Returns the reasons, whether every filtering reason
|
|
268
|
+
* passed, and one `filtering` state per model-backed or undeclared check among them.
|
|
269
|
+
*/
|
|
270
|
+
export function applyStability(reasons, routes, options = {}) {
|
|
271
|
+
const states = new Map();
|
|
272
|
+
const out = reasons.map((reason) => {
|
|
273
|
+
const check = checkOf(reason, options.checks);
|
|
274
|
+
if (check === undefined && options.undeclared === "advisory") {
|
|
275
|
+
states.set(reason.check, { check: reason.check, state: "advisory", cause: "undeclared" });
|
|
276
|
+
return reason.shadow ? reason : { ...reason, shadow: true };
|
|
277
|
+
}
|
|
278
|
+
if (!check?.modelBacked)
|
|
279
|
+
return reason;
|
|
280
|
+
const model = check.operation === undefined ? undefined : routes[check.operation]?.model;
|
|
281
|
+
const state = { ...filteringState(check, model, options.entries), check: reason.check };
|
|
282
|
+
states.set(reason.check, state);
|
|
283
|
+
return state.state === "advisory" && !reason.shadow
|
|
284
|
+
? { ...reason, shadow: true }
|
|
285
|
+
: reason;
|
|
286
|
+
});
|
|
287
|
+
const counted = out.filter((r) => !r.shadow);
|
|
288
|
+
return {
|
|
289
|
+
reasons: out,
|
|
290
|
+
passed: counted.length > 0 && counted.every((r) => r.passed),
|
|
291
|
+
filtering: [...states.values()],
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
/** A declaration as a `QaCheck`: `model` is model-backed; `exact` and `gated` are not. */
|
|
295
|
+
export function qaCheckOf(declaration) {
|
|
296
|
+
return {
|
|
297
|
+
id: declaration.name,
|
|
298
|
+
version: declaration.version ?? "1",
|
|
299
|
+
modelBacked: declaration.mode === "model",
|
|
300
|
+
...(declaration.source !== undefined && { source: declaration.source }),
|
|
301
|
+
...(declaration.operation !== undefined && { operation: declaration.operation }),
|
|
302
|
+
...(declaration.name.endsWith("*") && { family: true }),
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
/** A core `QaCheck` as a kind's declaration, so core's kinds register through the same field. */
|
|
306
|
+
export function declarationOf(check) {
|
|
307
|
+
return {
|
|
308
|
+
name: check.id,
|
|
309
|
+
mode: check.modelBacked ? "model" : "exact",
|
|
310
|
+
version: check.version,
|
|
311
|
+
...(check.source !== undefined && { source: check.source }),
|
|
312
|
+
...(check.operation !== undefined && { operation: check.operation }),
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* The registry of the loaded kinds (core's among them): every check each declares, and the
|
|
317
|
+
* entries core ships (`entries`, src/qa/stability.json by default) with those each kind ships.
|
|
318
|
+
*/
|
|
319
|
+
export function qaRegistry(kinds, entries = STABILITY) {
|
|
320
|
+
return {
|
|
321
|
+
checks: kinds.flatMap((k) => (k.checks ?? []).map(qaCheckOf)),
|
|
322
|
+
entries: [...entries, ...kinds.flatMap((k) => k.stability ?? [])],
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
/** Whether two declarations cover a common check id: the same id, or a family over the other. */
|
|
326
|
+
export function overlaps(a, b) {
|
|
327
|
+
if (a.family && b.family) {
|
|
328
|
+
const pa = a.id.slice(0, -1);
|
|
329
|
+
const pb = b.id.slice(0, -1);
|
|
330
|
+
return pa.startsWith(pb) || pb.startsWith(pa);
|
|
331
|
+
}
|
|
332
|
+
return covers(a, b.id) || covers(b, a.id);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* The registry one kind's reasons are judged by: core's kinds' checks and the entries core ships
|
|
336
|
+
* (`entries`), with the kind's own declarations and entries. A pack kind's declaration that
|
|
337
|
+
* overlaps a check core declares, or its entry for a check id core declares, is left out, so no
|
|
338
|
+
* pack changes how core's checks filter, and one pack's declarations and entries never reach
|
|
339
|
+
* another kind's reasons. Loading a pack refuses both (src/extensions/registry.ts); this holds
|
|
340
|
+
* for kinds handed to `stage` directly too.
|
|
341
|
+
*/
|
|
342
|
+
export function kindQaRegistry(kind, core, entries = STABILITY) {
|
|
343
|
+
const base = qaRegistry(core, entries);
|
|
344
|
+
if (core.includes(kind))
|
|
345
|
+
return base;
|
|
346
|
+
const own = (kind.checks ?? [])
|
|
347
|
+
.map(qaCheckOf)
|
|
348
|
+
.filter((c) => !base.checks.some((b) => overlaps(b, c)));
|
|
349
|
+
const ownEntries = (kind.stability ?? []).filter((e) => !base.checks.some((b) => covers(b, e.checkId)));
|
|
350
|
+
return { checks: [...base.checks, ...own], entries: [...base.entries, ...ownEntries] };
|
|
351
|
+
}
|
|
352
|
+
/** Merges filtering states across candidates: one per check, advisory over filtering. */
|
|
353
|
+
export function mergeFiltering(...groups) {
|
|
354
|
+
const merged = new Map();
|
|
355
|
+
for (const s of groups.flat()) {
|
|
356
|
+
const had = merged.get(s.check);
|
|
357
|
+
if (!had || (had.state === "filtering" && s.state === "advisory"))
|
|
358
|
+
merged.set(s.check, s);
|
|
359
|
+
}
|
|
360
|
+
return [...merged.values()];
|
|
361
|
+
}
|
|
362
|
+
/** The heading in docs/decisions.md whose one fenced JSON block lists the advisory checks. */
|
|
363
|
+
export const ADVISORY_HEADING = "## Model-backed checks advisory at 0.1";
|
|
364
|
+
/** The check ids in the fenced JSON block under `ADVISORY_HEADING` of docs/decisions.md. */
|
|
365
|
+
export function advisoryList(decisionsMarkdown) {
|
|
366
|
+
const start = decisionsMarkdown.indexOf(`${ADVISORY_HEADING}\n`);
|
|
367
|
+
if (start < 0)
|
|
368
|
+
throw new Error(`docs/decisions.md has no "${ADVISORY_HEADING}" section`);
|
|
369
|
+
const rest = decisionsMarkdown.slice(start + ADVISORY_HEADING.length);
|
|
370
|
+
const next = rest.search(/\n## /);
|
|
371
|
+
const section = next < 0 ? rest : rest.slice(0, next);
|
|
372
|
+
const blocks = [...section.matchAll(/```json\n([\s\S]*?)\n```/g)];
|
|
373
|
+
if (blocks.length !== 1) {
|
|
374
|
+
throw new Error(`"${ADVISORY_HEADING}" must hold exactly one fenced JSON block`);
|
|
375
|
+
}
|
|
376
|
+
const list = JSON.parse(blocks[0][1]);
|
|
377
|
+
if (!Array.isArray(list) || !list.every((id) => typeof id === "string")) {
|
|
378
|
+
throw new Error("the advisory list must be a JSON array of check ids");
|
|
379
|
+
}
|
|
380
|
+
return list;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Model-backed checks with neither a qualifying entry on `model` (the core default vision model)
|
|
384
|
+
* nor a place in the advisory list: each one is a gap the coverage test fails on.
|
|
385
|
+
*/
|
|
386
|
+
export function coverageGaps(advisory, options = {}) {
|
|
387
|
+
const model = options.model ?? DEFAULT_VISION_MODEL;
|
|
388
|
+
const listed = new Set(advisory);
|
|
389
|
+
const gaps = (options.checks ?? QA_CHECKS).filter((c) => c.modelBacked &&
|
|
390
|
+
!listed.has(c.id) &&
|
|
391
|
+
filteringState(c, model, options.entries).state !== "filtering");
|
|
392
|
+
return [...new Set(gaps.map((c) => c.id))];
|
|
393
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"checkId": "turnaround:not-subject",
|
|
4
|
+
"version": "2",
|
|
5
|
+
"model": "perplexity/pplx-decider-v1.2",
|
|
6
|
+
"cases": 50,
|
|
7
|
+
"passCases": 24,
|
|
8
|
+
"failCases": 26,
|
|
9
|
+
"falsePasses": 0,
|
|
10
|
+
"falseFails": 0,
|
|
11
|
+
"repeats": 3,
|
|
12
|
+
"agreement": 1,
|
|
13
|
+
"measuredAt": "2026-11-29T22:16:41.042Z",
|
|
14
|
+
"measuredBy": "scripts/turnaround-subject-set.ts",
|
|
15
|
+
"labelledSetSha256": "d4bc8f8a4a9a23b59592f418b7565362cbe8a0e34689861d60af4870f32f8816"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"checkId": "prop-facing",
|
|
19
|
+
"version": "1",
|
|
20
|
+
"model": "perplexity/pplx-decider-v1.2",
|
|
21
|
+
"cases": 36,
|
|
22
|
+
"passCases": 18,
|
|
23
|
+
"failCases": 18,
|
|
24
|
+
"falsePasses": 0,
|
|
25
|
+
"falseFails": 0,
|
|
26
|
+
"repeats": 3,
|
|
27
|
+
"agreement": 1,
|
|
28
|
+
"measuredAt": "2026-11-30T02:13:44.194Z",
|
|
29
|
+
"measuredBy": "scripts/prop-facing-set.ts",
|
|
30
|
+
"labelledSetSha256": "887932db7048505445f311102b851dad44a85965e63ab2ca59a8d45db471cd13"
|
|
31
|
+
}
|
|
32
|
+
]
|
package/dist/qa.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Raster } from "./image/raster.ts";
|
|
2
|
+
import type { QaResult, Reason, Size } from "./types.ts";
|
|
3
|
+
export interface SpecExpectation {
|
|
4
|
+
frame: Size;
|
|
5
|
+
frameCount: number;
|
|
6
|
+
/** Allowed colours as "#rrggbb". */
|
|
7
|
+
palette: string[];
|
|
8
|
+
/** Default true. */
|
|
9
|
+
requireTransparentPixel?: boolean;
|
|
10
|
+
/** Absent means binary with today's wording, as generated candidates are checked. */
|
|
11
|
+
alpha?: "binary" | "soft";
|
|
12
|
+
}
|
|
13
|
+
export declare function deterministicChecks(strip: Raster, expected: SpecExpectation): Reason[];
|
|
14
|
+
/**
|
|
15
|
+
* The checks of the vision verdict. Each is model-backed (declared in src/qa/stability.ts), so it
|
|
16
|
+
* filters only where it is measured stable on the run's vision model.
|
|
17
|
+
*/
|
|
18
|
+
export declare const VISION_CHECKS: readonly ["transparency", "frame-count", "identity", "perspective"];
|
|
19
|
+
export interface VisionPromptInput {
|
|
20
|
+
subject: string;
|
|
21
|
+
subjectDescription?: string;
|
|
22
|
+
frameCount: number;
|
|
23
|
+
frame: Size;
|
|
24
|
+
animationFamily?: string;
|
|
25
|
+
/** The style bible's description of the expected perspective, when it gives one. */
|
|
26
|
+
perspectiveDescription?: string;
|
|
27
|
+
/** Roles of the reference images, in the order attached after the candidate. */
|
|
28
|
+
referenceRoles: string[];
|
|
29
|
+
}
|
|
30
|
+
export declare function buildVisionPrompt(input: VisionPromptInput): string;
|
|
31
|
+
export declare function parseVisionVerdict(text: string): Reason[];
|
|
32
|
+
/**
|
|
33
|
+
* The verdict of a candidate's reasons: passes when every reason that filters passed. A `shadow`
|
|
34
|
+
* reason (an advisory model-backed check, src/qa/stability.ts) is recorded but never filters.
|
|
35
|
+
*/
|
|
36
|
+
export declare function combineQa(...groups: Reason[][]): QaResult;
|
package/dist/qa.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { getPixel, toHex } from "./image/raster.js";
|
|
2
|
+
import { SUMMARY_REQUEST } from "./library/summary.js";
|
|
3
|
+
function det(check, passed, reason) {
|
|
4
|
+
return { check, passed, reason, source: "deterministic" };
|
|
5
|
+
}
|
|
6
|
+
export function deterministicChecks(strip, expected) {
|
|
7
|
+
const { frame, frameCount } = expected;
|
|
8
|
+
const total = strip.width * strip.height;
|
|
9
|
+
let transparent = 0;
|
|
10
|
+
let soft = 0;
|
|
11
|
+
for (let i = 0; i < total; i++) {
|
|
12
|
+
const a = strip.data[i * 4 + 3] ?? 0;
|
|
13
|
+
if (a === 0)
|
|
14
|
+
transparent++;
|
|
15
|
+
else if (a !== 255)
|
|
16
|
+
soft++;
|
|
17
|
+
}
|
|
18
|
+
const needTransparent = expected.requireTransparentPixel ?? true;
|
|
19
|
+
let transparency;
|
|
20
|
+
if (soft > 0 && expected.alpha === undefined) {
|
|
21
|
+
transparency = det("transparency", false, `${soft} of ${total} pixels have partial alpha`);
|
|
22
|
+
}
|
|
23
|
+
else if (soft > 0 && expected.alpha === "binary") {
|
|
24
|
+
transparency = det("transparency", false, `${soft} of ${total} pixels have partial alpha; the asset's style allows only alpha 0 or 255 (alpha mode binary)`);
|
|
25
|
+
}
|
|
26
|
+
else if (needTransparent && transparent === 0) {
|
|
27
|
+
transparency = det("transparency", false, "no pixel is transparent");
|
|
28
|
+
}
|
|
29
|
+
else if (soft > 0) {
|
|
30
|
+
transparency = det("transparency", true, `${soft} of ${total} pixels have partial alpha, which the asset's style allows (alpha mode soft); ${transparent} transparent`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
transparency = det("transparency", true, `all ${total} pixels have alpha 0 or 255; ${transparent} transparent`);
|
|
34
|
+
}
|
|
35
|
+
const wantWidth = frame.width * frameCount;
|
|
36
|
+
let frames;
|
|
37
|
+
if (strip.width !== wantWidth || strip.height !== frame.height) {
|
|
38
|
+
frames = det("frame-count", false, `strip is ${strip.width}x${strip.height}, expected ${wantWidth}x${frame.height} (${frameCount} frames of ${frame.width}x${frame.height})`);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
let empty = 0;
|
|
42
|
+
for (let f = 0; f < frameCount && empty === 0; f++) {
|
|
43
|
+
let any = false;
|
|
44
|
+
for (let y = 0; y < frame.height && !any; y++) {
|
|
45
|
+
for (let x = 0; x < frame.width; x++) {
|
|
46
|
+
if (getPixel(strip, f * frame.width + x, y)[3] > 0) {
|
|
47
|
+
any = true;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (!any)
|
|
53
|
+
empty = f + 1;
|
|
54
|
+
}
|
|
55
|
+
frames =
|
|
56
|
+
empty > 0
|
|
57
|
+
? det("frame-count", false, `frame ${empty} of ${frameCount} is empty`)
|
|
58
|
+
: det("frame-count", true, `${frameCount} frames of ${frame.width}x${frame.height}, none empty`);
|
|
59
|
+
}
|
|
60
|
+
const allowed = new Set(expected.palette.map((c) => c.trim().toLowerCase()));
|
|
61
|
+
const used = new Set();
|
|
62
|
+
const bad = new Set();
|
|
63
|
+
for (let y = 0; y < strip.height; y++) {
|
|
64
|
+
for (let x = 0; x < strip.width; x++) {
|
|
65
|
+
const [r, g, b, a] = getPixel(strip, x, y);
|
|
66
|
+
if (a === 0)
|
|
67
|
+
continue;
|
|
68
|
+
const hex = toHex([r, g, b]);
|
|
69
|
+
used.add(hex);
|
|
70
|
+
if (!allowed.has(hex))
|
|
71
|
+
bad.add(hex);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const palette = bad.size > 0
|
|
75
|
+
? det("palette", false, `${bad.size} colours outside the palette, for example ${[...bad].slice(0, 3).join(", ")}`)
|
|
76
|
+
: det("palette", true, `all ${used.size} opaque colours are in the palette`);
|
|
77
|
+
return [transparency, frames, palette];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The checks of the vision verdict. Each is model-backed (declared in src/qa/stability.ts), so it
|
|
81
|
+
* filters only where it is measured stable on the run's vision model.
|
|
82
|
+
*/
|
|
83
|
+
export const VISION_CHECKS = ["transparency", "frame-count", "identity", "perspective"];
|
|
84
|
+
export function buildVisionPrompt(input) {
|
|
85
|
+
const { frame, frameCount } = input;
|
|
86
|
+
const lines = [
|
|
87
|
+
`You are reviewing a candidate sprite strip of "${input.subject}".`,
|
|
88
|
+
...(input.subjectDescription ? [`Subject: ${input.subjectDescription}`] : []),
|
|
89
|
+
...(input.animationFamily ? [`Animation: ${input.animationFamily}`] : []),
|
|
90
|
+
`Image 1 is the candidate: a strip of ${frameCount} frames side by side, each ${frame.width} x ${frame.height} pixels, on a transparent background.`,
|
|
91
|
+
...input.referenceRoles.map((role, i) => `Image ${i + 2} is a reference with role "${role}".`),
|
|
92
|
+
"Judge each check:",
|
|
93
|
+
"- transparency: the background is fully transparent, with no halo, fringe or solid backdrop.",
|
|
94
|
+
`- frame-count: the strip shows exactly ${frameCount} distinct frames, each fully inside its ${frame.width} x ${frame.height} cell.`,
|
|
95
|
+
"- identity: the candidate shows the same character or object as the references.",
|
|
96
|
+
input.perspectiveDescription
|
|
97
|
+
? `- perspective: the candidate matches the perspective of the perspective sample (${input.perspectiveDescription}).`
|
|
98
|
+
: "- perspective: the candidate matches the perspective of the perspective sample.",
|
|
99
|
+
`Also include ${SUMMARY_REQUEST}, describing image 1 only.`,
|
|
100
|
+
'Reply with ONLY a JSON object, no other text: {"checks":[{"check":"identity","passed":true,"reason":"..."}, ...]} with one entry for each of: ' +
|
|
101
|
+
VISION_CHECKS.join(", ") +
|
|
102
|
+
". Give a short, specific reason for each.",
|
|
103
|
+
];
|
|
104
|
+
return lines.join("\n");
|
|
105
|
+
}
|
|
106
|
+
export function parseVisionVerdict(text) {
|
|
107
|
+
const found = new Map();
|
|
108
|
+
try {
|
|
109
|
+
const start = text.indexOf("{");
|
|
110
|
+
const end = text.lastIndexOf("}");
|
|
111
|
+
const parsed = JSON.parse(text.slice(start, end + 1));
|
|
112
|
+
const checks = parsed?.checks;
|
|
113
|
+
if (Array.isArray(checks)) {
|
|
114
|
+
for (const item of checks) {
|
|
115
|
+
const c = item;
|
|
116
|
+
if (c && typeof c.check === "string" && typeof c.passed === "boolean") {
|
|
117
|
+
found.set(c.check, {
|
|
118
|
+
passed: c.passed,
|
|
119
|
+
reason: typeof c.reason === "string" && c.reason ? c.reason : "no reason given",
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// unreadable text leaves every check missing
|
|
127
|
+
}
|
|
128
|
+
return VISION_CHECKS.map((check) => {
|
|
129
|
+
const v = found.get(check);
|
|
130
|
+
return v
|
|
131
|
+
? { check, passed: v.passed, reason: v.reason, source: "vision" }
|
|
132
|
+
: {
|
|
133
|
+
check,
|
|
134
|
+
passed: false,
|
|
135
|
+
reason: "the vision verdict was missing or unreadable for this check",
|
|
136
|
+
source: "vision",
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The verdict of a candidate's reasons: passes when every reason that filters passed. A `shadow`
|
|
142
|
+
* reason (an advisory model-backed check, src/qa/stability.ts) is recorded but never filters.
|
|
143
|
+
*/
|
|
144
|
+
export function combineQa(...groups) {
|
|
145
|
+
const reasons = groups.flat();
|
|
146
|
+
const filtering = reasons.filter((r) => !r.shadow);
|
|
147
|
+
return { passed: filtering.length > 0 && filtering.every((r) => r.passed), reasons };
|
|
148
|
+
}
|