@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,90 @@
|
|
|
1
|
+
import { mkdir } from "node:fs/promises";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { comparisonFields, compareRasters, loadView, writeCompareSheet } from "../compare.js";
|
|
4
|
+
import { InputError } from "../errors.js";
|
|
5
|
+
import { parseRegions } from "../regions.js";
|
|
6
|
+
import { defineCommand } from "./types.js";
|
|
7
|
+
export const compareCommand = defineCommand({
|
|
8
|
+
name: "compare",
|
|
9
|
+
tool: "compare",
|
|
10
|
+
summary: "write a numbers-only compare sheet of a candidate against the version before",
|
|
11
|
+
details: `Writes <out>/compare.png: one row with the version before, the candidate and a difference
|
|
12
|
+
map (black where the pixels are equal), region outlines drawn on all three, and numbers only.
|
|
13
|
+
Reports identical, changed (the share of all pixels) and outsideChange: the share of the figure's
|
|
14
|
+
pixels (those not fully transparent in either image and, on an opaque image with a one-colour
|
|
15
|
+
border such as a turntable render, not the border's backdrop colour in both) changed outside every --region (above 0.05
|
|
16
|
+
it adds the advisory reason changed_outside_region). A strip compares the
|
|
17
|
+
frame named by --frame (1-based; --frame-width when frames are not square), a 3D asset (its .glb,
|
|
18
|
+
or the directory of its turntable renders) the view named by --view.
|
|
19
|
+
A region is "<x,y,w,h|mask=PATH> [frame N|view N] [ref PATH]... : <note>", a box in pixels or, with
|
|
20
|
+
% on each value, in percent. A malformed region, or a path outside the project root, exits 2.
|
|
21
|
+
Free: no provider call.`,
|
|
22
|
+
input: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
before: { type: "string", description: "the version before", placeholder: "<before>" },
|
|
26
|
+
candidate: { type: "string", description: "the candidate", placeholder: "<candidate>" },
|
|
27
|
+
region: {
|
|
28
|
+
type: "array",
|
|
29
|
+
items: { type: "string" },
|
|
30
|
+
description: "a region the change is meant for",
|
|
31
|
+
placeholder: "<region>",
|
|
32
|
+
},
|
|
33
|
+
frame: {
|
|
34
|
+
type: "integer",
|
|
35
|
+
minimum: 1,
|
|
36
|
+
description: "the frame of a strip to compare, counted from 1",
|
|
37
|
+
placeholder: "<n>",
|
|
38
|
+
},
|
|
39
|
+
view: {
|
|
40
|
+
type: "integer",
|
|
41
|
+
minimum: 1,
|
|
42
|
+
description: "the view of a 3D asset to compare, counted from 1",
|
|
43
|
+
placeholder: "<n>",
|
|
44
|
+
},
|
|
45
|
+
frameWidth: {
|
|
46
|
+
type: "integer",
|
|
47
|
+
minimum: 1,
|
|
48
|
+
description: "the width of a strip's frames in pixels; its height by default",
|
|
49
|
+
placeholder: "<px>",
|
|
50
|
+
},
|
|
51
|
+
out: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "where compare.png is written",
|
|
54
|
+
default: ".assetgrove/compare",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
required: ["before", "candidate"],
|
|
58
|
+
additionalProperties: false,
|
|
59
|
+
},
|
|
60
|
+
positionals: [{ name: "before" }, { name: "candidate" }],
|
|
61
|
+
effect: { readOnly: false, spends: "never", writes: "out" },
|
|
62
|
+
async run(args) {
|
|
63
|
+
if (args.before === undefined || args.candidate === undefined)
|
|
64
|
+
throw new InputError("compare needs two addresses: the version before and the candidate");
|
|
65
|
+
// Regions are parsed first: a malformed one refuses before anything is read or written.
|
|
66
|
+
const regions = parseRegions(args.region ?? [], { requireNote: false }).filter((r) => (r.frame === undefined || r.frame === args.frame) &&
|
|
67
|
+
(r.view === undefined || r.view === args.view));
|
|
68
|
+
const select = {
|
|
69
|
+
...(args.frame !== undefined && { frame: args.frame }),
|
|
70
|
+
...(args.view !== undefined && { view: args.view }),
|
|
71
|
+
...(args.frameWidth !== undefined && { frameWidth: args.frameWidth }),
|
|
72
|
+
};
|
|
73
|
+
const comparison = await compareRasters(await loadView(args.before, select), await loadView(args.candidate, select), regions);
|
|
74
|
+
const dir = resolve(args.out ?? ".assetgrove/compare");
|
|
75
|
+
await mkdir(dir, { recursive: true });
|
|
76
|
+
const sheet = await writeCompareSheet(dir, [{ number: 1, comparison }]);
|
|
77
|
+
const numbers = comparisonFields(comparison);
|
|
78
|
+
return {
|
|
79
|
+
exitCode: 0,
|
|
80
|
+
fields: { compareSheet: sheet, rows: [{ number: 1, candidate: args.candidate, ...numbers }] },
|
|
81
|
+
human: [
|
|
82
|
+
`wrote ${sheet}`,
|
|
83
|
+
numbers.identical
|
|
84
|
+
? "pixel-identical"
|
|
85
|
+
: `changed ${numbers.changed}, outside the regions ${numbers.outsideChange}`,
|
|
86
|
+
...numbers.reasons.map((r) => `advisory ${r.check}: ${r.reason}`),
|
|
87
|
+
].join("\n"),
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const confirmCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { approvalPath, verifiedIdentity, writeApproval } from "../approvals.js";
|
|
2
|
+
import { confirmationPath, recordOf, verifiedRequest, writeConfirmation, } from "../confirm/index.js";
|
|
3
|
+
import { readPending, removePending } from "../confirm/pending.js";
|
|
4
|
+
import { describeRequest, namedBatch } from "../confirm/prompt.js";
|
|
5
|
+
import { policyRequest, spendShown } from "../runs/execute.js";
|
|
6
|
+
import { pickRequest } from "./pick.js";
|
|
7
|
+
import { batchEntries, pickBatchRequest } from "./pick-batch.js";
|
|
8
|
+
import { rebuildApproveRequest } from "./review.js";
|
|
9
|
+
import { applySettingsChange, rebuiltSettingsRequest } from "../settings-write.js";
|
|
10
|
+
import { refusal } from "./result.js";
|
|
11
|
+
import { defineCommand } from "./types.js";
|
|
12
|
+
import { writeRequest } from "./write-families.js";
|
|
13
|
+
import { rebuildAcceptRequest } from "../library/suggestions.js";
|
|
14
|
+
import { rebuildAdoptRequest } from "../library/adopt.js";
|
|
15
|
+
/**
|
|
16
|
+
* A pending spend, pick or write request as a person is shown it, rebuilt from what its id hashes
|
|
17
|
+
* and never from the saved summary, details or choices: a spend's from its verified body; a
|
|
18
|
+
* pick's and a write's by making the request again from its body (the run's candidates, the
|
|
19
|
+
* import and the grouping; an approve's or adopt's card) and requiring the same id. A pick that
|
|
20
|
+
* replaces an asset lists its known usage again (`usage`), as the pick itself showed it. Undefined
|
|
21
|
+
* when the request does not hold.
|
|
22
|
+
*/
|
|
23
|
+
async function shownRequest(request, usage, loudness) {
|
|
24
|
+
if (!verifiedRequest(request))
|
|
25
|
+
return undefined;
|
|
26
|
+
const { body } = request;
|
|
27
|
+
const text = (value) => (typeof value === "string" ? value : undefined);
|
|
28
|
+
// The target profile a pick named or used, as its body records it (#659).
|
|
29
|
+
const profileOf = (value) => value !== null && typeof value === "object" && !Array.isArray(value)
|
|
30
|
+
? text(value["path"])
|
|
31
|
+
: undefined;
|
|
32
|
+
try {
|
|
33
|
+
if (request.kind === "spend") {
|
|
34
|
+
const command = text(body["command"]);
|
|
35
|
+
const { jobs, forecastUsd, capUsd } = body;
|
|
36
|
+
if (command === undefined ||
|
|
37
|
+
!Array.isArray(jobs) ||
|
|
38
|
+
typeof forecastUsd !== "number" ||
|
|
39
|
+
typeof capUsd !== "number")
|
|
40
|
+
return undefined;
|
|
41
|
+
const shown = spendShown(request.id, {
|
|
42
|
+
command,
|
|
43
|
+
jobs: jobs,
|
|
44
|
+
forecastUsd,
|
|
45
|
+
capUsd,
|
|
46
|
+
...(typeof body["options"] === "object" &&
|
|
47
|
+
body["options"] !== null && { options: body["options"] }),
|
|
48
|
+
});
|
|
49
|
+
return { kind: "spend", id: request.id, body, ...shown };
|
|
50
|
+
}
|
|
51
|
+
if (request.kind === "policy") {
|
|
52
|
+
const command = text(body["command"]);
|
|
53
|
+
const digest = text(body["digest"]);
|
|
54
|
+
const policyTextSha256 = text(body["policyTextSha256"]);
|
|
55
|
+
const model = text(body["model"]);
|
|
56
|
+
const probability = body["probability"];
|
|
57
|
+
if (command === undefined ||
|
|
58
|
+
digest === undefined ||
|
|
59
|
+
policyTextSha256 === undefined ||
|
|
60
|
+
model === undefined ||
|
|
61
|
+
typeof probability !== "number")
|
|
62
|
+
return undefined;
|
|
63
|
+
const shown = policyRequest(command, { digest, policyTextSha256 }, { model, probability });
|
|
64
|
+
return shown.id === request.id ? shown : undefined;
|
|
65
|
+
}
|
|
66
|
+
let rebuilt;
|
|
67
|
+
if (request.kind === "pick" &&
|
|
68
|
+
(body["command"] === "approve" ||
|
|
69
|
+
body["command"] === "library adopt" ||
|
|
70
|
+
body["command"] === "card accept")) {
|
|
71
|
+
const again = body["command"] === "approve"
|
|
72
|
+
? await rebuildApproveRequest(body)
|
|
73
|
+
: body["command"] === "card accept"
|
|
74
|
+
? await rebuildAcceptRequest(body)
|
|
75
|
+
: await rebuildAdoptRequest(body);
|
|
76
|
+
if (again === undefined)
|
|
77
|
+
return undefined;
|
|
78
|
+
rebuilt = again;
|
|
79
|
+
}
|
|
80
|
+
else if (request.kind === "pick" && body["command"] === "pick_batch") {
|
|
81
|
+
// A batch is made again from each entry's run, candidate and target.
|
|
82
|
+
if (!Array.isArray(body["entries"]))
|
|
83
|
+
return undefined;
|
|
84
|
+
const entries = body["entries"].map((entry) => {
|
|
85
|
+
const run = text(entry["run"]) ?? "";
|
|
86
|
+
const candidate = text(entry["candidate"]);
|
|
87
|
+
const target = text(entry["target"]);
|
|
88
|
+
const profile = profileOf(entry["profile"]);
|
|
89
|
+
return {
|
|
90
|
+
run,
|
|
91
|
+
...(candidate !== undefined && { candidate }),
|
|
92
|
+
...(target !== undefined && { target }),
|
|
93
|
+
...(profile !== undefined && { profile }),
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
rebuilt = (await pickBatchRequest(batchEntries(entries), usage, loudness)).request;
|
|
97
|
+
}
|
|
98
|
+
else if (request.kind === "pick") {
|
|
99
|
+
const run = text(body["run"]);
|
|
100
|
+
const target = text(body["target"]);
|
|
101
|
+
const candidate = text(body["candidate"]);
|
|
102
|
+
const duplicate = text(body["duplicate"]);
|
|
103
|
+
if (duplicate !== undefined &&
|
|
104
|
+
duplicate !== "existing-version" &&
|
|
105
|
+
duplicate !== "keep-separate" &&
|
|
106
|
+
duplicate !== "exit")
|
|
107
|
+
return undefined;
|
|
108
|
+
const existingVersion = text(body["existingVersion"]);
|
|
109
|
+
const profile = profileOf(body["profile"]);
|
|
110
|
+
if (run === undefined)
|
|
111
|
+
return undefined;
|
|
112
|
+
// A turnaround pick names its bible and has no target.
|
|
113
|
+
if (target === undefined && text(body["bible"]) === undefined)
|
|
114
|
+
return undefined;
|
|
115
|
+
rebuilt = await pickRequest({
|
|
116
|
+
run,
|
|
117
|
+
...(target !== undefined && { target }),
|
|
118
|
+
...(candidate !== undefined && { candidate }),
|
|
119
|
+
...(duplicate !== undefined && { duplicate }),
|
|
120
|
+
...(existingVersion !== undefined && { existingVersion }),
|
|
121
|
+
...(profile !== undefined && { profile }),
|
|
122
|
+
}, usage, loudness);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
const importDir = text(body["import"]);
|
|
126
|
+
const targetDir = text(body["target"]);
|
|
127
|
+
const jitterBoundPx = body["jitterBound"];
|
|
128
|
+
if (importDir === undefined || targetDir === undefined || typeof jitterBoundPx !== "number")
|
|
129
|
+
return undefined;
|
|
130
|
+
rebuilt = await writeRequest({
|
|
131
|
+
importDir,
|
|
132
|
+
grouping: request.grouping,
|
|
133
|
+
targetDir,
|
|
134
|
+
jitterBoundPx,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return rebuilt.id === request.id ? rebuilt : undefined;
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
export const confirmCommand = defineCommand({
|
|
144
|
+
name: "confirm",
|
|
145
|
+
tool: null,
|
|
146
|
+
summary: "confirm a pending spend, pick, write, policy, command or settings request at a terminal",
|
|
147
|
+
details: `Shows the request a command saved to <stateDir>/pending/<id>.json when it exited 8
|
|
148
|
+
confirmation_required, and asks at the terminal. A spend, pick, write or policy request (id its digest)
|
|
149
|
+
writes <configDir>/confirmations/<id>.json (method terminal); a pick that names no candidate asks
|
|
150
|
+
which one (or none), and a batch pick asks for each entry that names none. It shows what the id hashes, rebuilt from the saved body (a spend) or by
|
|
151
|
+
making the pick or write request again from its run, import and grouping. A policy request is a
|
|
152
|
+
borderline prompt-policy answer (from the route's confirmAt up to its refuseAt): it shows the
|
|
153
|
+
command, the request digest, the policy text hash, the deciding model and its probability, and
|
|
154
|
+
only a person clears it. A command a file names (kind command, id its hash) writes
|
|
155
|
+
<configDir>/approvals/<id>.json. A settings change (kind settings, id its digest) writes its fields
|
|
156
|
+
and their confirmedBy entries (method terminal) into the settings file it names. The request runs on the next try. CLI only; exits 2 without a TTY
|
|
157
|
+
on stdin and stderr, with no pending request of that id, or when the saved request (or its run,
|
|
158
|
+
import or grouping) no longer makes that id. Declining exits 8 confirmation_declined.`,
|
|
159
|
+
input: {
|
|
160
|
+
type: "object",
|
|
161
|
+
properties: {
|
|
162
|
+
id: {
|
|
163
|
+
type: "string",
|
|
164
|
+
description: "the confirmation id (a request digest or command hash) from error.confirmation.id",
|
|
165
|
+
placeholder: "<hex>",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
required: ["id"],
|
|
169
|
+
additionalProperties: false,
|
|
170
|
+
},
|
|
171
|
+
positionals: [{ name: "id" }],
|
|
172
|
+
effect: { readOnly: false, spends: "never", writes: "settings" },
|
|
173
|
+
async run(args, ctx) {
|
|
174
|
+
if (!ctx.prompt) {
|
|
175
|
+
return refusal("invalid_input", "assetgrove confirm asks a person: run it at a terminal (stdin and stderr a TTY)", { id: args.id }, "");
|
|
176
|
+
}
|
|
177
|
+
const { stateDir, configDir } = ctx.settings;
|
|
178
|
+
const pending = await readPending(stateDir, args.id);
|
|
179
|
+
const decline = (request, fields) => refusal("confirmation_declined", `confirmation ${request.id} was declined`, fields, describeRequest(request));
|
|
180
|
+
if (pending.kind === "settings") {
|
|
181
|
+
const request = rebuiltSettingsRequest(pending);
|
|
182
|
+
if (request === undefined) {
|
|
183
|
+
return refusal("invalid_input", `pending request ${args.id} does not describe the settings change its id hashes; rerun settings change to save it again`, { id: pending.id, kind: pending.kind }, "");
|
|
184
|
+
}
|
|
185
|
+
if (request.body.settings !== ctx.settings.path) {
|
|
186
|
+
return refusal("invalid_input", `pending settings change ${args.id} is for ${request.body.settings}, but the settings loaded are ${ctx.settings.path}`, { id: request.id, kind: request.kind }, "");
|
|
187
|
+
}
|
|
188
|
+
const fields = { id: request.id, kind: request.kind, request: request.details };
|
|
189
|
+
if (!(await ctx.prompt.confirm(request)))
|
|
190
|
+
return decline(request, fields);
|
|
191
|
+
const result = await applySettingsChange(ctx.settings, request.body.change, {
|
|
192
|
+
method: "terminal",
|
|
193
|
+
});
|
|
194
|
+
await removePending(stateDir, request.id);
|
|
195
|
+
return {
|
|
196
|
+
exitCode: 0,
|
|
197
|
+
fields: { ...fields, confirmed: true, method: "terminal", ...result },
|
|
198
|
+
human: `confirmed ${request.id}: wrote ${result.written.join(", ") || "nothing"} to ${result.path}`,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
if (pending.kind !== "command") {
|
|
202
|
+
const request = await shownRequest(pending, {
|
|
203
|
+
...(ctx.extensions && { registry: ctx.extensions }),
|
|
204
|
+
stateDir,
|
|
205
|
+
configDir,
|
|
206
|
+
}, ctx.settings.audio?.loudness);
|
|
207
|
+
if (request === undefined) {
|
|
208
|
+
return refusal("invalid_input", `pending request ${args.id} does not describe the request its id hashes; rerun the command to save it again`, { id: pending.id, kind: pending.kind }, "");
|
|
209
|
+
}
|
|
210
|
+
const fields = { id: request.id, kind: request.kind, request: request.details };
|
|
211
|
+
let choice;
|
|
212
|
+
let choices;
|
|
213
|
+
if (request.entries !== undefined && namedBatch(request) === undefined) {
|
|
214
|
+
if (!ctx.prompt.chooseBatch)
|
|
215
|
+
return refusal("invalid_input", "this terminal cannot choose a candidate", fields, "");
|
|
216
|
+
choices = await ctx.prompt.chooseBatch(request);
|
|
217
|
+
if (choices === undefined)
|
|
218
|
+
return decline(request, fields);
|
|
219
|
+
}
|
|
220
|
+
else if (request.entries !== undefined) {
|
|
221
|
+
if (!(await ctx.prompt.confirm(request)))
|
|
222
|
+
return decline(request, fields);
|
|
223
|
+
}
|
|
224
|
+
else if (request.kind === "pick" && typeof request.body["candidate"] !== "string") {
|
|
225
|
+
if (!ctx.prompt.choose)
|
|
226
|
+
return refusal("invalid_input", "this terminal cannot choose a candidate", fields, "");
|
|
227
|
+
choice = await ctx.prompt.choose(request);
|
|
228
|
+
if (choice === undefined || choice === "none")
|
|
229
|
+
return decline(request, fields);
|
|
230
|
+
}
|
|
231
|
+
else if (!(await ctx.prompt.confirm(request)))
|
|
232
|
+
return decline(request, fields);
|
|
233
|
+
const record = recordOf(request, "terminal", {
|
|
234
|
+
...(choice !== undefined && { choice }),
|
|
235
|
+
...(choices !== undefined && { choices }),
|
|
236
|
+
});
|
|
237
|
+
const path = await writeConfirmation(configDir, record);
|
|
238
|
+
await removePending(stateDir, request.id);
|
|
239
|
+
return {
|
|
240
|
+
exitCode: 0,
|
|
241
|
+
fields: {
|
|
242
|
+
...fields,
|
|
243
|
+
confirmed: true,
|
|
244
|
+
method: "terminal",
|
|
245
|
+
record: path,
|
|
246
|
+
confirmation: record,
|
|
247
|
+
},
|
|
248
|
+
human: `confirmed ${request.id}: wrote ${confirmationPath(configDir, request.id)}`,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
const request = pending;
|
|
252
|
+
const fields = { id: request.id, kind: request.kind, request: request.details };
|
|
253
|
+
const identity = verifiedIdentity(request.details, request.id);
|
|
254
|
+
if (identity === undefined) {
|
|
255
|
+
return refusal("invalid_input", `pending request ${args.id} does not describe the command its id hashes; rerun the command to save it again`, { id: request.id, kind: request.kind }, "");
|
|
256
|
+
}
|
|
257
|
+
if (!(await ctx.prompt.confirm(request)))
|
|
258
|
+
return decline(request, fields);
|
|
259
|
+
const path = await writeApproval(configDir, identity, "terminal");
|
|
260
|
+
await removePending(stateDir, request.id);
|
|
261
|
+
return {
|
|
262
|
+
exitCode: 0,
|
|
263
|
+
fields: { ...fields, approved: true, method: "terminal", approval: path },
|
|
264
|
+
human: `approved ${request.id}: wrote ${approvalPath(configDir, request.id)}`,
|
|
265
|
+
};
|
|
266
|
+
},
|
|
267
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Env } from "../env.ts";
|
|
2
|
+
import type { ConfirmPort } from "../confirm/prompt.ts";
|
|
3
|
+
import type { CommandSpec, RunContext } from "./types.ts";
|
|
4
|
+
export interface ContextOptions {
|
|
5
|
+
log: (message: string) => void;
|
|
6
|
+
/** The environment settings are found from; the process environment when absent. */
|
|
7
|
+
env?: Env;
|
|
8
|
+
/** The working directory whose Git top level the settings file may not be inside. */
|
|
9
|
+
cwd?: string;
|
|
10
|
+
/** The command's `--target`, whose project the settings file may not be inside either. */
|
|
11
|
+
target?: string;
|
|
12
|
+
/** The command's input files, whose projects the settings file may not be inside either. */
|
|
13
|
+
inputs?: readonly string[];
|
|
14
|
+
/** The server's --provider-script, given to every tool call that takes one. */
|
|
15
|
+
providerScript?: string;
|
|
16
|
+
/** The server's --work-item, given to every tool call that names none. */
|
|
17
|
+
workItem?: string;
|
|
18
|
+
/** The CLI's inline prompt, given when a person at a TTY (stdin and stderr) can be asked. */
|
|
19
|
+
prompt?: ConfirmPort;
|
|
20
|
+
/** Where each pack's `context.log` writes its lines; this process's stderr when absent. */
|
|
21
|
+
packLog?: (line: string) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The paths of a command's arguments whose projects the settings file may not be inside (design
|
|
25
|
+
* section 2): its target and every input file.
|
|
26
|
+
*/
|
|
27
|
+
export declare function settingsScope(args: Record<string, unknown>): Pick<ContextOptions, "target" | "inputs">;
|
|
28
|
+
/**
|
|
29
|
+
* Loads the developer settings and the extensions they list, and builds the context one command
|
|
30
|
+
* runs in. The CLI builds it once per command and the MCP server once per tool call, so a change
|
|
31
|
+
* to the settings file holds from the next call on.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createRunContext(options: ContextOptions): Promise<RunContext>;
|
|
34
|
+
/** Whether a command can spend; the environment is checked before every such command. */
|
|
35
|
+
export declare function isPaid(spec: CommandSpec): boolean;
|
|
36
|
+
/** Whether a command can spend under these settings (its `spendsWith`, else `isPaid`). */
|
|
37
|
+
export declare function canSpend(spec: CommandSpec, ctx: RunContext): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Throws `settings_invalid` (exit 2) when a variable that can redirect or unwrap TLS is set and
|
|
40
|
+
* the settings' `environment.allow` does not list it. Run at server start and before every command
|
|
41
|
+
* that can send a key (src/commands/runner.ts).
|
|
42
|
+
*/
|
|
43
|
+
export declare function checkContextEnvironment(ctx: RunContext): void;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one RunContext the CLI and the MCP server build: developer settings loaded fresh for each
|
|
3
|
+
* CLI command and each tool call, the log, and the provider options the server was started with.
|
|
4
|
+
*/
|
|
5
|
+
import { checkEnvironment, envUses } from "../env.js";
|
|
6
|
+
import { loadExtensions } from "../extensions/registry.js";
|
|
7
|
+
import { createProviders } from "../providers/adapter.js";
|
|
8
|
+
import { registerKeyEnv } from "../redact.js";
|
|
9
|
+
import { loadSettings } from "../settings.js";
|
|
10
|
+
/**
|
|
11
|
+
* The arguments that name a directory a command writes into or reads from as a whole: `--target`
|
|
12
|
+
* (pick, write-families) and init's directory.
|
|
13
|
+
*/
|
|
14
|
+
const TARGET_PROPERTIES = ["target", "directory"];
|
|
15
|
+
/** The arguments that name a file or directory a command reads. */
|
|
16
|
+
const INPUT_PROPERTIES = [
|
|
17
|
+
"albedo",
|
|
18
|
+
"bible",
|
|
19
|
+
"brief",
|
|
20
|
+
"cases",
|
|
21
|
+
"derivation",
|
|
22
|
+
"file",
|
|
23
|
+
"grouping",
|
|
24
|
+
"import",
|
|
25
|
+
"imports",
|
|
26
|
+
"inputs",
|
|
27
|
+
"keyPose",
|
|
28
|
+
"lockBible",
|
|
29
|
+
"model",
|
|
30
|
+
"plan",
|
|
31
|
+
"profile",
|
|
32
|
+
"provenance",
|
|
33
|
+
"providerScript",
|
|
34
|
+
"recipe",
|
|
35
|
+
"recipes",
|
|
36
|
+
"source",
|
|
37
|
+
"sourceProvenance",
|
|
38
|
+
"run",
|
|
39
|
+
"runOptions",
|
|
40
|
+
"selection",
|
|
41
|
+
"sheet",
|
|
42
|
+
"spec",
|
|
43
|
+
"strip",
|
|
44
|
+
"template",
|
|
45
|
+
];
|
|
46
|
+
/**
|
|
47
|
+
* The paths of a command's arguments whose projects the settings file may not be inside (design
|
|
48
|
+
* section 2): its target and every input file.
|
|
49
|
+
*/
|
|
50
|
+
export function settingsScope(args) {
|
|
51
|
+
const strings = (name) => {
|
|
52
|
+
const value = args[name];
|
|
53
|
+
if (typeof value === "string" && value !== "")
|
|
54
|
+
return [value];
|
|
55
|
+
if (Array.isArray(value))
|
|
56
|
+
return value.filter((v) => typeof v === "string" && v !== "");
|
|
57
|
+
return [];
|
|
58
|
+
};
|
|
59
|
+
const target = TARGET_PROPERTIES.flatMap(strings)[0];
|
|
60
|
+
const inputs = INPUT_PROPERTIES.flatMap(strings);
|
|
61
|
+
return { ...(target !== undefined && { target }), ...(inputs.length > 0 && { inputs }) };
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Loads the developer settings and the extensions they list, and builds the context one command
|
|
65
|
+
* runs in. The CLI builds it once per command and the MCP server once per tool call, so a change
|
|
66
|
+
* to the settings file holds from the next call on.
|
|
67
|
+
*/
|
|
68
|
+
export async function createRunContext(options) {
|
|
69
|
+
const settings = loadSettings({
|
|
70
|
+
...(options.env && { env: options.env }),
|
|
71
|
+
...(options.cwd && { cwd: options.cwd }),
|
|
72
|
+
...(options.target !== undefined && { target: options.target }),
|
|
73
|
+
...(options.inputs && { inputs: options.inputs }),
|
|
74
|
+
});
|
|
75
|
+
// Extensions first: a listed package that cannot load refuses (exit 2) before anything else.
|
|
76
|
+
const extensions = await loadExtensions(settings, options.cwd ?? process.cwd(), options.packLog);
|
|
77
|
+
// Each provider is made by its adapter now, so an adapter-aware refusal (an unknown adapter, a
|
|
78
|
+
// baseURL the adapter does not take) exits 2 settings_invalid before any command runs.
|
|
79
|
+
const configured = createProviders(settings, {
|
|
80
|
+
...(options.env && { env: options.env }),
|
|
81
|
+
adapters: extensions.adapters,
|
|
82
|
+
});
|
|
83
|
+
// Every key variable in play is redacted from here on, whether or not a guard runs: each
|
|
84
|
+
// provider's and each adapter's default.
|
|
85
|
+
registerKeyEnv([
|
|
86
|
+
...configured.flatMap((c) => (c.keyEnv !== undefined ? [c.keyEnv] : [])),
|
|
87
|
+
...extensions.adapters.flatMap((a) => (a.defaultKeyEnv !== undefined ? [a.defaultKeyEnv] : [])),
|
|
88
|
+
]);
|
|
89
|
+
const prompt = options.prompt;
|
|
90
|
+
return {
|
|
91
|
+
settings,
|
|
92
|
+
extensions,
|
|
93
|
+
log: options.log,
|
|
94
|
+
...(prompt && { prompt }),
|
|
95
|
+
...(options.providerScript !== undefined && { providerScript: options.providerScript }),
|
|
96
|
+
...(options.workItem !== undefined && { workItem: options.workItem }),
|
|
97
|
+
...(options.env && { env: options.env }),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Whether a command can spend; the environment is checked before every such command. */
|
|
101
|
+
export function isPaid(spec) {
|
|
102
|
+
return spec.effect.spends !== "never";
|
|
103
|
+
}
|
|
104
|
+
/** Whether a command can spend under these settings (its `spendsWith`, else `isPaid`). */
|
|
105
|
+
export function canSpend(spec, ctx) {
|
|
106
|
+
return isPaid(spec) && (spec.spendsWith?.(ctx) ?? true);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Throws `settings_invalid` (exit 2) when a variable that can redirect or unwrap TLS is set and
|
|
110
|
+
* the settings' `environment.allow` does not list it. Run at server start and before every command
|
|
111
|
+
* that can send a key (src/commands/runner.ts).
|
|
112
|
+
*/
|
|
113
|
+
export function checkContextEnvironment(ctx) {
|
|
114
|
+
checkEnvironment(ctx.settings.environment.allow, ctx.env, envUses(ctx.settings));
|
|
115
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const deliverCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { planDelivery } from "../delivery.js";
|
|
2
|
+
import { EXIT } from "../errors.js";
|
|
3
|
+
import { loadProfile, profileContext } from "../inputs.js";
|
|
4
|
+
import { defineCommand } from "./types.js";
|
|
5
|
+
export const deliverCommand = defineCommand({
|
|
6
|
+
name: "deliver",
|
|
7
|
+
tool: "deliver",
|
|
8
|
+
summary: "deliver an explicit set of exact library versions through project recipes",
|
|
9
|
+
details: "Reads a selection file naming asset versions, recipes and destinations, resolves each version's exact mezzanine bytes from the library media or the local Git LFS store (never fetched), and builds the renditions under <out> with a delivery.json manifest. Missing objects and output collisions are reported before anything is written, exit 2. A release delivery also refuses a selected placeholder version and, when the --profile's release policy asks, an unapproved version or a licence outside its window, naming the asset, version and evidence. --preview is the dry run and --draft writes a draft delivery: both report the same release findings without refusing on them, and neither is a release. Available through MCP too. Never adds a version, approves one or changes the current pick.",
|
|
10
|
+
input: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
selection: { type: "string", description: "delivery selection JSON file" },
|
|
14
|
+
out: { type: "string", description: "delivery root directory" },
|
|
15
|
+
profile: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "target profile supplying style, frame size and the release policy",
|
|
18
|
+
},
|
|
19
|
+
preview: {
|
|
20
|
+
type: "boolean",
|
|
21
|
+
description: "dry run: resolve content hashes and destination paths without writes",
|
|
22
|
+
},
|
|
23
|
+
draft: {
|
|
24
|
+
type: "boolean",
|
|
25
|
+
description: "write a draft delivery: report release findings without refusing on them",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
required: ["selection", "out"],
|
|
29
|
+
additionalProperties: false,
|
|
30
|
+
},
|
|
31
|
+
effect: { readOnly: false, spends: "never", writes: "out" },
|
|
32
|
+
async run(args) {
|
|
33
|
+
const policy = args.profile === undefined ? undefined : (await loadProfile(args.profile)).value.release;
|
|
34
|
+
const result = await planDelivery({
|
|
35
|
+
selection: args.selection,
|
|
36
|
+
out: args.out,
|
|
37
|
+
...(args.preview !== undefined && { preview: args.preview }),
|
|
38
|
+
...(args.draft !== undefined && { draft: args.draft }),
|
|
39
|
+
...(policy !== undefined && { policy }),
|
|
40
|
+
...(await profileContext(args.profile)),
|
|
41
|
+
});
|
|
42
|
+
const fields = {
|
|
43
|
+
preview: result.preview,
|
|
44
|
+
draft: result.draft,
|
|
45
|
+
release: result.release,
|
|
46
|
+
policy: result.policy,
|
|
47
|
+
written: result.written,
|
|
48
|
+
out: result.out,
|
|
49
|
+
manifestPath: result.manifestPath,
|
|
50
|
+
manifest: result.manifest,
|
|
51
|
+
items: result.items,
|
|
52
|
+
problems: result.problems,
|
|
53
|
+
};
|
|
54
|
+
const planned = result.manifest.items.flatMap((item) => item.outputs.map((o) => `${result.written ? "wrote" : "planned"} ${o.path} sha256 ${o.sha256}`));
|
|
55
|
+
const failed = result.policy.filter((f) => f.status === "failed");
|
|
56
|
+
const findings = failed.map((f) => ` item ${f.item + 1}: ${f.check}: ${f.message}`);
|
|
57
|
+
if (result.problems.length === 0) {
|
|
58
|
+
const mode = result.preview ? "preview" : "draft delivery";
|
|
59
|
+
const verdict = result.release
|
|
60
|
+
? [`release delivery: every release check passed`]
|
|
61
|
+
: failed.length > 0
|
|
62
|
+
? [
|
|
63
|
+
`${mode}, not a release: ${failed.length} release check(s) failed, which a release delivery refuses`,
|
|
64
|
+
...findings,
|
|
65
|
+
]
|
|
66
|
+
: [`${mode}, not a release: every release check passed`];
|
|
67
|
+
return {
|
|
68
|
+
exitCode: 0,
|
|
69
|
+
fields,
|
|
70
|
+
human: [...planned, `manifest ${result.manifestPath}`, ...verdict].join("\n"),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const where = (p) => p.file ?? `item ${p.item + 1}`;
|
|
74
|
+
return {
|
|
75
|
+
exitCode: EXIT.invalid_input,
|
|
76
|
+
fields,
|
|
77
|
+
human: [
|
|
78
|
+
...planned,
|
|
79
|
+
`delivery refused: ${result.problems.length} problem(s), nothing written`,
|
|
80
|
+
...result.problems.map((p) => ` item ${p.item + 1}: ${p.code}: ${p.message}`),
|
|
81
|
+
...((result.preview || result.draft) && failed.length > 0
|
|
82
|
+
? [
|
|
83
|
+
`${failed.length} release check(s) failed, which a release delivery refuses:`,
|
|
84
|
+
...findings,
|
|
85
|
+
]
|
|
86
|
+
: []),
|
|
87
|
+
].join("\n"),
|
|
88
|
+
error: {
|
|
89
|
+
code: "invalid_input",
|
|
90
|
+
message: `delivery refused: ${result.problems.length} problem(s): ${result.problems.map((p) => `${where(p)} ${p.code}: ${p.message}`).join("; ")}`,
|
|
91
|
+
problems: result.problems.map((p) => ({
|
|
92
|
+
file: where(p),
|
|
93
|
+
code: p.code,
|
|
94
|
+
problem: p.message,
|
|
95
|
+
})),
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const disclosureCommand: import("./types.ts").CommandSpec<Record<string, unknown>>;
|