@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,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The undo journal of a write that must leave every file as it was when it fails (`library adopt`,
|
|
3
|
+
* docs/library.md): each file is read before it is first written, then written through any
|
|
4
|
+
* symbolic link to its real path, and `restore` puts back each file written: its earlier bytes and
|
|
5
|
+
* permission bits, its removal (with the folders made for it) when it was new, or the dangling
|
|
6
|
+
* symbolic link it was.
|
|
7
|
+
*/
|
|
8
|
+
import { chmod, lstat, readFile, readlink, realpath, rm, rmdir, stat, symlink, } from "node:fs/promises";
|
|
9
|
+
import { basename, dirname, join } from "node:path";
|
|
10
|
+
import { writeAtomic } from "./write.js";
|
|
11
|
+
/** Whether an error says the file is absent, not that it could not be read. */
|
|
12
|
+
function absent(error) {
|
|
13
|
+
const code = error.code;
|
|
14
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
15
|
+
}
|
|
16
|
+
/** The real path of `path`: through every link, or its nearest existing folder's joined with the rest. */
|
|
17
|
+
async function realOf(path) {
|
|
18
|
+
try {
|
|
19
|
+
return await realpath(path);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
if (!absent(error))
|
|
23
|
+
throw error;
|
|
24
|
+
// A dangling link is written at its own path.
|
|
25
|
+
if (await lstat(path).then(() => true, () => false))
|
|
26
|
+
return path;
|
|
27
|
+
const parent = dirname(path);
|
|
28
|
+
return parent === path ? path : join(await realOf(parent), basename(path));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** The folders between `folder` and its nearest existing ancestor, deepest first. */
|
|
32
|
+
async function missingFolders(folder) {
|
|
33
|
+
const made = [];
|
|
34
|
+
for (let at = folder;; at = dirname(at)) {
|
|
35
|
+
try {
|
|
36
|
+
await stat(at);
|
|
37
|
+
return made;
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (!absent(error) || dirname(at) === at)
|
|
41
|
+
return made;
|
|
42
|
+
made.push(at);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** Why a file could not be put back, for the error that names it. */
|
|
47
|
+
function reason(error) {
|
|
48
|
+
const code = error.code;
|
|
49
|
+
return code ?? (error instanceof Error ? error.message : String(error));
|
|
50
|
+
}
|
|
51
|
+
export class WriteJournal {
|
|
52
|
+
snapshots = new Map();
|
|
53
|
+
order = [];
|
|
54
|
+
/**
|
|
55
|
+
* Reads `path` as it is before any write: its bytes and permission bits, or that it is absent.
|
|
56
|
+
* Any other read error (a file that cannot be read, a folder) throws, so nothing is written.
|
|
57
|
+
*/
|
|
58
|
+
async snapshot(path) {
|
|
59
|
+
await this.take(path);
|
|
60
|
+
}
|
|
61
|
+
async take(path) {
|
|
62
|
+
const known = this.snapshots.get(path);
|
|
63
|
+
if (known)
|
|
64
|
+
return known;
|
|
65
|
+
const real = await realOf(path);
|
|
66
|
+
let before;
|
|
67
|
+
try {
|
|
68
|
+
const bytes = new Uint8Array(await readFile(real));
|
|
69
|
+
before = { bytes, mode: (await stat(real)).mode & 0o7777 };
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
if (!absent(error))
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
let link;
|
|
76
|
+
if (before === undefined && real === path) {
|
|
77
|
+
// A dangling link: the write renames a file over it, so its target is kept to remake it.
|
|
78
|
+
link = await lstat(path).then((stats) => (stats.isSymbolicLink() ? readlink(path) : undefined), (error) => {
|
|
79
|
+
if (absent(error))
|
|
80
|
+
return undefined;
|
|
81
|
+
throw error;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const made = before === undefined ? await missingFolders(dirname(real)) : [];
|
|
85
|
+
const snapshot = {
|
|
86
|
+
path,
|
|
87
|
+
real,
|
|
88
|
+
...(before && { before }),
|
|
89
|
+
...(link !== undefined && { link }),
|
|
90
|
+
made,
|
|
91
|
+
written: false,
|
|
92
|
+
};
|
|
93
|
+
this.snapshots.set(path, snapshot);
|
|
94
|
+
return snapshot;
|
|
95
|
+
}
|
|
96
|
+
/** Writes `content` to `path`'s real path (a link stays a link), read first when it was not. */
|
|
97
|
+
async write(path, content) {
|
|
98
|
+
const snapshot = await this.take(path);
|
|
99
|
+
if (!this.order.includes(snapshot))
|
|
100
|
+
this.order.push(snapshot);
|
|
101
|
+
// writeAtomic renames over the file last, so a write that throws left the file as it was.
|
|
102
|
+
await writeAtomic(snapshot.real, content);
|
|
103
|
+
snapshot.written = true;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Puts back every file written, the last first, and goes on past one it cannot put back: each
|
|
107
|
+
* holds its earlier bytes and permission bits again, or is removed with the folders made for it.
|
|
108
|
+
* The paths (with the reason) it could not put back.
|
|
109
|
+
*/
|
|
110
|
+
async restore() {
|
|
111
|
+
const failed = [];
|
|
112
|
+
for (const snapshot of [...this.order].reverse()) {
|
|
113
|
+
try {
|
|
114
|
+
if (snapshot.link !== undefined) {
|
|
115
|
+
if (snapshot.written) {
|
|
116
|
+
await rm(snapshot.real, { force: true });
|
|
117
|
+
await symlink(snapshot.link, snapshot.real);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else if (snapshot.before === undefined) {
|
|
121
|
+
if (snapshot.written)
|
|
122
|
+
await rm(snapshot.real, { force: true });
|
|
123
|
+
for (const folder of snapshot.made) {
|
|
124
|
+
// A folder something else now holds a file in stays.
|
|
125
|
+
await rmdir(folder).catch(() => undefined);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else if (snapshot.written) {
|
|
129
|
+
await writeAtomic(snapshot.real, snapshot.before.bytes);
|
|
130
|
+
if (process.platform !== "win32")
|
|
131
|
+
await chmod(snapshot.real, snapshot.before.mode);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
failed.push(`${snapshot.path} (${reason(error)})`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
this.order.length = 0;
|
|
139
|
+
return failed;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SharedText } from "../request.ts";
|
|
2
|
+
import type { Anchor } from "./extent.ts";
|
|
3
|
+
import type { LibraryState } from "./maintain.ts";
|
|
4
|
+
export interface WorkNote {
|
|
5
|
+
asset: string;
|
|
6
|
+
/** The card's library-relative path, with `/` separators. */
|
|
7
|
+
card: string;
|
|
8
|
+
id: string;
|
|
9
|
+
motivation: string;
|
|
10
|
+
created: string;
|
|
11
|
+
state: "open" | "resolved";
|
|
12
|
+
anchor?: Anchor & {
|
|
13
|
+
frame?: number;
|
|
14
|
+
view?: number;
|
|
15
|
+
};
|
|
16
|
+
source: {
|
|
17
|
+
version: number | null;
|
|
18
|
+
sha256: string;
|
|
19
|
+
link: string | null;
|
|
20
|
+
};
|
|
21
|
+
resolution?: {
|
|
22
|
+
by: "answer";
|
|
23
|
+
version: number;
|
|
24
|
+
sha256: string;
|
|
25
|
+
link: string;
|
|
26
|
+
confirmation?: {
|
|
27
|
+
method: string;
|
|
28
|
+
digest?: string;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
by: "resolve";
|
|
32
|
+
annotation: string;
|
|
33
|
+
created: string;
|
|
34
|
+
link: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare function worklist(state: LibraryState, options: {
|
|
38
|
+
open?: boolean;
|
|
39
|
+
}): {
|
|
40
|
+
notes: WorkNote[];
|
|
41
|
+
text: SharedText[];
|
|
42
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The work list: every review note (an `editing` or `commenting` annotation on a version) with the
|
|
3
|
+
* version it was made on and, when one is recorded, how it was closed. Computed from the review
|
|
4
|
+
* records, which it reads and never writes. Note text is returned apart, as shared text.
|
|
5
|
+
*/
|
|
6
|
+
import { annotationText } from "../commands/review.js";
|
|
7
|
+
import { relative, sep } from "node:path";
|
|
8
|
+
import { formatAddress } from "../tree/address.js";
|
|
9
|
+
import { anchorOf } from "./extent.js";
|
|
10
|
+
import { versionNumber } from "./review.js";
|
|
11
|
+
const NOTE_MOTIVATIONS = new Set(["editing", "commenting"]);
|
|
12
|
+
function resolutionOf(record, note, link) {
|
|
13
|
+
const index = record.versions.findIndex((v) => v.answers?.includes(note.id));
|
|
14
|
+
const answering = record.versions[index];
|
|
15
|
+
if (answering !== undefined) {
|
|
16
|
+
const { method, digest } = answering.confirmation ?? {};
|
|
17
|
+
return {
|
|
18
|
+
by: "answer",
|
|
19
|
+
version: index + 1,
|
|
20
|
+
sha256: answering.sha256,
|
|
21
|
+
link: link("versions", String(index + 1)),
|
|
22
|
+
...(method !== undefined && {
|
|
23
|
+
confirmation: { method, ...(digest !== undefined && { digest }) },
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const resolve = record.annotations.find((a) => a["ag:action"] === "resolve" && a["ag:resolves"] === note.id);
|
|
28
|
+
if (resolve === undefined)
|
|
29
|
+
return undefined;
|
|
30
|
+
return {
|
|
31
|
+
by: "resolve",
|
|
32
|
+
annotation: resolve.id,
|
|
33
|
+
created: resolve.created,
|
|
34
|
+
link: link("review"),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function worklist(state, options) {
|
|
38
|
+
const notes = [];
|
|
39
|
+
const bodies = new Map();
|
|
40
|
+
for (const asset of state.assets) {
|
|
41
|
+
if (asset.review === undefined)
|
|
42
|
+
continue;
|
|
43
|
+
const record = asset.review.record;
|
|
44
|
+
const link = (...segments) => formatAddress(state.config.game, [asset.id, ...segments]);
|
|
45
|
+
const card = relative(state.config.root, asset.cardPath).split(sep).join("/");
|
|
46
|
+
for (const annotation of record.annotations) {
|
|
47
|
+
const target = annotation.target;
|
|
48
|
+
if (!NOTE_MOTIVATIONS.has(annotation.motivation) || typeof target === "string")
|
|
49
|
+
continue;
|
|
50
|
+
const sha256 = target["ag:version"];
|
|
51
|
+
if (sha256 === undefined)
|
|
52
|
+
continue;
|
|
53
|
+
const resolution = resolutionOf(record, annotation, link);
|
|
54
|
+
if (options.open && resolution !== undefined)
|
|
55
|
+
continue;
|
|
56
|
+
const number = versionNumber(record, sha256);
|
|
57
|
+
const base = anchorOf(target);
|
|
58
|
+
const frame = target["ag:frame"];
|
|
59
|
+
const view = target["ag:view"];
|
|
60
|
+
const anchor = {
|
|
61
|
+
...base,
|
|
62
|
+
...(frame !== undefined && { frame }),
|
|
63
|
+
...(view !== undefined && { view }),
|
|
64
|
+
};
|
|
65
|
+
const entry = {
|
|
66
|
+
asset: asset.id,
|
|
67
|
+
card,
|
|
68
|
+
id: annotation.id,
|
|
69
|
+
motivation: annotation.motivation,
|
|
70
|
+
created: annotation.created,
|
|
71
|
+
state: resolution === undefined ? "open" : "resolved",
|
|
72
|
+
...(Object.keys(anchor).length > 0 && { anchor }),
|
|
73
|
+
source: {
|
|
74
|
+
version: number ?? null,
|
|
75
|
+
sha256,
|
|
76
|
+
link: number === undefined ? null : link("versions", String(number)),
|
|
77
|
+
},
|
|
78
|
+
...(resolution !== undefined && { resolution }),
|
|
79
|
+
};
|
|
80
|
+
notes.push(entry);
|
|
81
|
+
bodies.set(entry, annotationText(annotation).map((t) => ({ ...t, source: `${asset.id} ${t.source}` })));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const order = (a, b) => a.asset < b.asset
|
|
85
|
+
? -1
|
|
86
|
+
: a.asset > b.asset
|
|
87
|
+
? 1
|
|
88
|
+
: Date.parse(a.created) - Date.parse(b.created) || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
|
|
89
|
+
notes.sort(order);
|
|
90
|
+
return { notes, text: notes.flatMap((n) => bodies.get(n) ?? []) };
|
|
91
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import type { StorageField } from "../storage.ts";
|
|
2
|
+
import { type ProjectRule, type RuleFinding } from "../project-rules.ts";
|
|
3
|
+
import { InputError } from "../errors.ts";
|
|
4
|
+
import type { AssetSpec, ConfirmationRecord, Provenance, TargetProfile } from "../types.ts";
|
|
5
|
+
import type { WriteJournal } from "./undo.ts";
|
|
6
|
+
import type { Card } from "./card.ts";
|
|
7
|
+
import type { CandidateSummary } from "./summary.ts";
|
|
8
|
+
import type { LogEntry } from "./folder.ts";
|
|
9
|
+
import type { ReviewRecord, VersionStatus } from "./review.ts";
|
|
10
|
+
/** Asset ids the asset tree uses for its own files and views (design section 1). */
|
|
11
|
+
export declare const RESERVED_IDS: readonly ["index", "log", "by-kind", "by-subject", "by-tag", "stale", "runs", "find", "like", "where"];
|
|
12
|
+
/**
|
|
13
|
+
* A refused library write, exit 2: an id reserved (`asset_id_reserved`) or carded at another path
|
|
14
|
+
* (`asset_conflict`); media identical to an older version of the asset (`version_exists`); or a
|
|
15
|
+
* current version other than the one the pick confirmed replacing (`version_changed`).
|
|
16
|
+
*/
|
|
17
|
+
export type AssetIdErrorCode = "asset_id_reserved" | "asset_conflict" | "version_exists" | "version_changed";
|
|
18
|
+
export declare class AssetIdError extends InputError {
|
|
19
|
+
readonly code: AssetIdErrorCode;
|
|
20
|
+
constructor(code: AssetIdErrorCode, message: string);
|
|
21
|
+
}
|
|
22
|
+
export interface LibraryConfig {
|
|
23
|
+
/** The library root, absolute. */
|
|
24
|
+
root: string;
|
|
25
|
+
/** The library root relative to the target, with `/`; empty for the target root. */
|
|
26
|
+
rootRel: string;
|
|
27
|
+
game: string;
|
|
28
|
+
log: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** The directory segments of a layout template before the first one holding a placeholder. */
|
|
31
|
+
export declare function staticPrefix(template: string): string;
|
|
32
|
+
/** A game id from a profile name: lower case, every run of other characters one `-`. */
|
|
33
|
+
export declare function gameSlug(name: string): string;
|
|
34
|
+
export declare function within(root: string, path: string): boolean;
|
|
35
|
+
/** The profile's `library` block with its defaults, for a target directory. */
|
|
36
|
+
export declare function libraryConfig(profile: TargetProfile, targetDir: string): LibraryConfig;
|
|
37
|
+
/** The library id of a hand-off's asset: the spec's id, and its animation family when it names one. */
|
|
38
|
+
export declare function assetIdOf(spec: AssetSpec): string;
|
|
39
|
+
/** A card found in the library. */
|
|
40
|
+
export interface FoundCard {
|
|
41
|
+
/** The folder holding it, absolute. */
|
|
42
|
+
dir: string;
|
|
43
|
+
id: string;
|
|
44
|
+
title: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
bible?: string;
|
|
47
|
+
/** The card's `resource`: the media file name beside it. */
|
|
48
|
+
resource?: string;
|
|
49
|
+
/** The card's `lock.sha256`. */
|
|
50
|
+
sha256?: string;
|
|
51
|
+
/** The card's `kind`, `subject`, `animationFamily`, and the family's `action` and `facing`. */
|
|
52
|
+
kind?: string;
|
|
53
|
+
subject?: string;
|
|
54
|
+
animationFamily?: string;
|
|
55
|
+
action?: string;
|
|
56
|
+
facing?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Every card under the library root: a Markdown file other than `index.md` and `log.md` whose
|
|
60
|
+
* front matter says `type: Game Asset` and parses. Links are not followed, nor dot folders,
|
|
61
|
+
* `node_modules` or `<id>.review` folders.
|
|
62
|
+
*/
|
|
63
|
+
export declare function scanCards(root: string): FoundCard[];
|
|
64
|
+
/**
|
|
65
|
+
* A library file that exists but does not parse, with `library check`'s code for it: a card or
|
|
66
|
+
* review record, whose rows the projections keep as they are, or an `index.md` left unwritten
|
|
67
|
+
* because the rows it holds for an unreadable card could not be read.
|
|
68
|
+
*/
|
|
69
|
+
export interface UnreadableRecord {
|
|
70
|
+
/** The file, absolute. */
|
|
71
|
+
file: string;
|
|
72
|
+
code: "card_invalid" | "review_invalid" | "index_invalid";
|
|
73
|
+
}
|
|
74
|
+
/** Every card under the library root, and the cards there that do not parse. */
|
|
75
|
+
export declare function scanLibrary(root: string): {
|
|
76
|
+
cards: FoundCard[];
|
|
77
|
+
unreadable: UnreadableRecord[];
|
|
78
|
+
};
|
|
79
|
+
/** What a hand-off's library write needs, checked before anything is written. */
|
|
80
|
+
export interface LibraryPlan {
|
|
81
|
+
config: LibraryConfig;
|
|
82
|
+
assetId: string;
|
|
83
|
+
/** The folder of the media, card and review record. */
|
|
84
|
+
dir: string;
|
|
85
|
+
mediaPath: string;
|
|
86
|
+
cardPath: string;
|
|
87
|
+
reviewPath: string;
|
|
88
|
+
/** The provenance file, or the manifest that embeds it, when inside the library root. */
|
|
89
|
+
provenanceSource?: string;
|
|
90
|
+
/** The cards in the library before this write. */
|
|
91
|
+
cards: FoundCard[];
|
|
92
|
+
/**
|
|
93
|
+
* The `lineage` the version records, from the editable source; absent without one. A pick whose
|
|
94
|
+
* media is already the current version records it there in place of that file's earlier entry.
|
|
95
|
+
*/
|
|
96
|
+
lineage?: Array<{
|
|
97
|
+
relation: "derived-from";
|
|
98
|
+
file: string;
|
|
99
|
+
sha256: string;
|
|
100
|
+
}>;
|
|
101
|
+
/** What the write was checked against, checked again under the lock (`recheckLibraryWrite`). */
|
|
102
|
+
expects: VersionExpectations;
|
|
103
|
+
}
|
|
104
|
+
/** What a hand-off expects of the asset's versions when it writes. */
|
|
105
|
+
interface VersionExpectations {
|
|
106
|
+
sha256?: string;
|
|
107
|
+
contentSha256?: string;
|
|
108
|
+
replaces?: string | null;
|
|
109
|
+
answers?: {
|
|
110
|
+
version: string;
|
|
111
|
+
answers: string[];
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Checks the plan's versions again against the review record as it is now; the caller holds the
|
|
116
|
+
* library write lock, so a pick prepared before another committed cannot replace the same version.
|
|
117
|
+
*/
|
|
118
|
+
export declare function recheckLibraryWrite(plan: LibraryPlan): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Checks a hand-off's library write before anything is written: the asset id is not reserved
|
|
121
|
+
* (exit 2 `asset_id_reserved`) and not carded at another path (exit 2 `asset_conflict`), the
|
|
122
|
+
* media lies inside the library root, and the asset's own card and review record, when present,
|
|
123
|
+
* parse and name only paths inside the root.
|
|
124
|
+
*/
|
|
125
|
+
export declare function prepareLibraryWrite(input: {
|
|
126
|
+
profile: TargetProfile;
|
|
127
|
+
spec: AssetSpec;
|
|
128
|
+
targetDir: string;
|
|
129
|
+
mediaPath: string;
|
|
130
|
+
provenancePath?: string;
|
|
131
|
+
manifestPath: string;
|
|
132
|
+
/** The media bytes the hand-off writes: bytes of an older version exit 2 `version_exists`. */
|
|
133
|
+
mediaBytes?: Uint8Array;
|
|
134
|
+
/** The sha256 of the media before C2PA credentials were signed in; an older version's too. */
|
|
135
|
+
contentSha256?: string;
|
|
136
|
+
/**
|
|
137
|
+
* The version the pick confirmed replacing (its sha256, or null for a first pick): another
|
|
138
|
+
* current version exits 2 `version_changed`. Left out, nothing is compared.
|
|
139
|
+
*/
|
|
140
|
+
replaces?: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* The request_change this candidate answers: made on another current version than
|
|
143
|
+
* `version` exits 2 `version_changed`.
|
|
144
|
+
*/
|
|
145
|
+
answers?: {
|
|
146
|
+
version: string;
|
|
147
|
+
answers: string[];
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* The files the version is derived from (an editable source): each must lie inside the library
|
|
151
|
+
* root, else exit 2 before anything is written.
|
|
152
|
+
*/
|
|
153
|
+
sources?: Array<{
|
|
154
|
+
relation: "derived-from";
|
|
155
|
+
path: string;
|
|
156
|
+
sha256: string;
|
|
157
|
+
}>;
|
|
158
|
+
}): Promise<LibraryPlan>;
|
|
159
|
+
/** An editable source's `/`-separated path relative to the profile's library root; exit 2 outside it. */
|
|
160
|
+
export declare function libraryFile(profile: TargetProfile, targetDir: string, path: string): string;
|
|
161
|
+
/** The error for a candidate made on a version that is no longer the asset's current one. */
|
|
162
|
+
export declare function changeVersionChanged(assetId: string, count: number, current: string | undefined, made: string): AssetIdError;
|
|
163
|
+
/** What a pick into an asset replaces: its current version, and whether its file changed outside Assetgrove. */
|
|
164
|
+
export interface CurrentVersion {
|
|
165
|
+
assetId: string;
|
|
166
|
+
/** The current version's sha256 and position; absent before the first pick. */
|
|
167
|
+
sha256?: string;
|
|
168
|
+
version?: number;
|
|
169
|
+
/** The run and candidate the current version was picked from. */
|
|
170
|
+
run?: string;
|
|
171
|
+
candidate?: string;
|
|
172
|
+
/** Whether the working media differs from the card's `lock.sha256`. */
|
|
173
|
+
outsideChange: boolean;
|
|
174
|
+
/** The absolute path of the card's resource, when the card has one. */
|
|
175
|
+
media?: string;
|
|
176
|
+
}
|
|
177
|
+
/** The current version of a spec's asset in a target's library, read without writing. */
|
|
178
|
+
export declare function currentVersion(profile: TargetProfile, spec: AssetSpec, targetDir: string): Promise<CurrentVersion>;
|
|
179
|
+
export declare function readText(path: string): Promise<string | undefined>;
|
|
180
|
+
export declare function readOwnCard(path: string, root: string, dir: string): Promise<Card | undefined>;
|
|
181
|
+
export declare function readOwnReview(path: string, root: string, dir: string, address: string | undefined): Promise<ReviewRecord | undefined>;
|
|
182
|
+
/** Writes `content` to a temporary file in the target's folder, then renames it over the target. */
|
|
183
|
+
export declare function writeAtomic(path: string, content: string | Uint8Array): Promise<void>;
|
|
184
|
+
/**
|
|
185
|
+
* Writes `text` atomically unless the file already holds it, through `journal` when given (so it
|
|
186
|
+
* can be put back); whether it wrote.
|
|
187
|
+
*/
|
|
188
|
+
export declare function writeIfChanged(path: string, text: string, journal?: WriteJournal): Promise<boolean>;
|
|
189
|
+
/** A candidate's review record and the run folder its paths must stay inside. */
|
|
190
|
+
export interface CandidateReview {
|
|
191
|
+
path: string;
|
|
192
|
+
root: string;
|
|
193
|
+
}
|
|
194
|
+
/** The `bible` lines of a log, oldest first. */
|
|
195
|
+
export declare function bibleLines(text: string | undefined): Extract<LogEntry, {
|
|
196
|
+
action: "bible";
|
|
197
|
+
}>[];
|
|
198
|
+
export declare function newer(a: string, b: string): boolean;
|
|
199
|
+
export interface LibraryVersionInput {
|
|
200
|
+
/** The media bytes as written. */
|
|
201
|
+
mediaBytes: Uint8Array;
|
|
202
|
+
provenance: Pick<Provenance, "route" | "bibleVersion" | "license" | "finishedAt">;
|
|
203
|
+
/** The provenance file's bytes, when it is a file of its own. */
|
|
204
|
+
provenanceBytes?: Uint8Array | string;
|
|
205
|
+
/** The sha256 of the media before C2PA credentials were signed in, when they were. */
|
|
206
|
+
contentSha256?: string;
|
|
207
|
+
spec: AssetSpec;
|
|
208
|
+
run: string;
|
|
209
|
+
candidate: string;
|
|
210
|
+
confirmation?: ConfirmationRecord;
|
|
211
|
+
/** The ids of the change requests (editing annotations) the version answers. */
|
|
212
|
+
answers?: string[];
|
|
213
|
+
candidateReview?: CandidateReview;
|
|
214
|
+
now: Date;
|
|
215
|
+
/** The annotation's action for the new version; `pick` or `replace` when absent. */
|
|
216
|
+
action?: "adopt";
|
|
217
|
+
/** The version's digital source type, recorded on an adopted version. */
|
|
218
|
+
digitalSourceType?: string;
|
|
219
|
+
/** The model-written summary of a picked candidate; a person's description or tags win over it. */
|
|
220
|
+
summary?: CandidateSummary;
|
|
221
|
+
/** The Assetgrove version, e.g. "0.2.0". */
|
|
222
|
+
assetgrove: string;
|
|
223
|
+
/** The asset's storage as this hand-off decided it (src/storage.ts). */
|
|
224
|
+
storage?: StorageField;
|
|
225
|
+
}
|
|
226
|
+
export interface LibraryWriteResult {
|
|
227
|
+
assetId: string;
|
|
228
|
+
/** The current version's position in the stack. */
|
|
229
|
+
version: number;
|
|
230
|
+
sha256: string;
|
|
231
|
+
state: VersionStatus;
|
|
232
|
+
/** Whether this write appended the version (false when the record already had it). */
|
|
233
|
+
appended: boolean;
|
|
234
|
+
/** Every library file this write changed, absolute, in write order. */
|
|
235
|
+
files: string[];
|
|
236
|
+
/**
|
|
237
|
+
* Cards and review records that do not parse; their folders' `index.md` and `log.md` were left as
|
|
238
|
+
* they were. Absent when there are none.
|
|
239
|
+
*/
|
|
240
|
+
unreadable?: UnreadableRecord[];
|
|
241
|
+
}
|
|
242
|
+
export declare function checkLibraryRules(plan: LibraryPlan, input: LibraryVersionInput, rules?: ProjectRule[]): Promise<RuleFinding[]>;
|
|
243
|
+
/**
|
|
244
|
+
* Appends the version to the review record (the commit point), then writes the card, each
|
|
245
|
+
* `index.md` from the library root down, and the folder's `log.md` unless the profile turns logs
|
|
246
|
+
* off. The caller holds the library write lock and has written the media and provenance.
|
|
247
|
+
*/
|
|
248
|
+
export declare function commitLibraryWrite(plan: LibraryPlan, input: LibraryVersionInput, journal?: WriteJournal): Promise<LibraryWriteResult>;
|
|
249
|
+
/**
|
|
250
|
+
* The existing library files `commitLibraryWrite` may rewrite for `plan`: the review record, the
|
|
251
|
+
* card, each folder's `index.md` from the library root down to every card and to the asset, and
|
|
252
|
+
* the asset folder's and the root's `log.md` when logs are on. An adopt reads each before its
|
|
253
|
+
* first write, so one it cannot read stops it there.
|
|
254
|
+
*/
|
|
255
|
+
export declare function libraryWritePaths(plan: LibraryPlan): string[];
|
|
256
|
+
/** Writes the library's credits report (`credits.report.json`, `credits.report.md`) from its cards; the files it changed. */
|
|
257
|
+
export declare function writeCredits(config: LibraryConfig, cards: FoundCard[], journal?: WriteJournal): Promise<string[]>;
|
|
258
|
+
/** Writes each `index.md` from the library root down to every card; the files it changed. */
|
|
259
|
+
export declare function writeIndexes(config: LibraryConfig, cards: FoundCard[], unreadable?: UnreadableRecord[], journal?: WriteJournal): Promise<string[]>;
|
|
260
|
+
/** The asset a log write is for: its record as just written, and the bible it was made under. */
|
|
261
|
+
export interface LogSubject {
|
|
262
|
+
dir: string;
|
|
263
|
+
assetId: string;
|
|
264
|
+
title: string;
|
|
265
|
+
record: ReviewRecord;
|
|
266
|
+
/** The time of a `bible` line this write adds. */
|
|
267
|
+
at: string;
|
|
268
|
+
/** The bible version of this write; a newer one than the log's latest adds a `bible` line. */
|
|
269
|
+
bibleVersion?: string;
|
|
270
|
+
/** The cards before this write, for the bible baseline of a log with no `bible` line. */
|
|
271
|
+
before: FoundCard[];
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Writes the asset folder's `log.md` from the review records of the cards in it, and the root log
|
|
275
|
+
* when a `bible` line is added (it keeps its `bible` lines); the files it changed. A card or review
|
|
276
|
+
* record that does not parse keeps the lines the log has for its asset: each review record found
|
|
277
|
+
* unreadable here is added to `unreadable`.
|
|
278
|
+
*/
|
|
279
|
+
export declare function writeLogs(config: LibraryConfig, cards: FoundCard[], subject: LogSubject, unreadable?: UnreadableRecord[], journal?: WriteJournal): Promise<string[]>;
|
|
280
|
+
/** This build's package version, for the card's `generated.by`. */
|
|
281
|
+
export declare function assetgroveVersion(): string;
|
|
282
|
+
export {};
|