@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
package/dist/env.js
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where settings and the refusal rule read the environment: settings location, config and state homes, and the
|
|
3
|
+
* variables that can redirect or unwrap the TLS carrying a key.
|
|
4
|
+
*/
|
|
5
|
+
import { homedir } from "node:os";
|
|
6
|
+
import { isAbsolute, join } from "node:path";
|
|
7
|
+
import { SettingsError } from "./errors.js";
|
|
8
|
+
export { SettingsError };
|
|
9
|
+
/** The key variable each adapter reads by default; settings may name more with `keyEnv`. */
|
|
10
|
+
export const DEFAULT_KEY_ENV = [
|
|
11
|
+
"AI_GATEWAY_API_KEY",
|
|
12
|
+
"ANTHROPIC_API_KEY",
|
|
13
|
+
"OPENAI_API_KEY",
|
|
14
|
+
"TRIPO_API_KEY",
|
|
15
|
+
];
|
|
16
|
+
/** The one spend variable read: the work item when `--work-item` names none. */
|
|
17
|
+
export const WORK_ITEM_ENV = "ASSETGROVE_WORK_ITEM";
|
|
18
|
+
/** The value of the key variable `name` as set, untrimmed; undefined when unset. */
|
|
19
|
+
export function keyValue(name, env = process.env) {
|
|
20
|
+
return env[name];
|
|
21
|
+
}
|
|
22
|
+
/** `$ASSETGROVE_WORK_ITEM` as set, untrimmed; undefined when unset. */
|
|
23
|
+
export function workItemEnv(env = process.env) {
|
|
24
|
+
return env["ASSETGROVE_WORK_ITEM"];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sets `CBOR_NATIVE_ACCELERATION_DISABLED` to `true` unless it is set, so cbor-x (which
|
|
28
|
+
* `@auth0/cose` uses) never loads the optional `cbor-extract` native addon (src/pure-cbor.ts).
|
|
29
|
+
*/
|
|
30
|
+
export function disableNativeCbor(env = process.env) {
|
|
31
|
+
env["CBOR_NATIVE_ACCELERATION_DISABLED"] ??= "true";
|
|
32
|
+
}
|
|
33
|
+
/** Whether `$GIT_DIR` is set to a non-empty value. */
|
|
34
|
+
export function gitDirSet(env = process.env) {
|
|
35
|
+
return Boolean(env["GIT_DIR"]);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The Windows search path: `PATH` and `PATHEXT` as set, each found case-insensitively since the
|
|
39
|
+
* Windows environment is; undefined when unset.
|
|
40
|
+
*/
|
|
41
|
+
export function windowsSearchPath(env = process.env) {
|
|
42
|
+
const lookup = (name) => {
|
|
43
|
+
const key = Object.keys(env).find((k) => k.toUpperCase() === name);
|
|
44
|
+
return key === undefined ? undefined : env[key];
|
|
45
|
+
};
|
|
46
|
+
return { path: lookup("PATH"), pathext: lookup("PATHEXT") };
|
|
47
|
+
}
|
|
48
|
+
/** Variables that redirect or unwrap the TLS carrying a key; refused whatever is configured. */
|
|
49
|
+
export const TLS_PROXY_VARIABLES = [
|
|
50
|
+
"NODE_EXTRA_CA_CERTS",
|
|
51
|
+
"NODE_USE_SYSTEM_CA",
|
|
52
|
+
"NODE_TLS_REJECT_UNAUTHORIZED",
|
|
53
|
+
"NODE_USE_ENV_PROXY",
|
|
54
|
+
"HTTP_PROXY",
|
|
55
|
+
"HTTPS_PROXY",
|
|
56
|
+
"ALL_PROXY",
|
|
57
|
+
];
|
|
58
|
+
/** The AWS variables Lance's object store reads; refused when the search store is s3://. */
|
|
59
|
+
export const AWS_STORE_VARIABLES = [
|
|
60
|
+
"AWS_ENDPOINT_URL",
|
|
61
|
+
"AWS_ENDPOINT_URL_S3",
|
|
62
|
+
"AWS_REGION",
|
|
63
|
+
"AWS_DEFAULT_REGION",
|
|
64
|
+
"AWS_ACCESS_KEY_ID",
|
|
65
|
+
"AWS_SECRET_ACCESS_KEY",
|
|
66
|
+
"AWS_SESSION_TOKEN",
|
|
67
|
+
"AWS_PROFILE",
|
|
68
|
+
"AWS_CONFIG_FILE",
|
|
69
|
+
"AWS_SHARED_CREDENTIALS_FILE",
|
|
70
|
+
"AWS_ALLOW_HTTP",
|
|
71
|
+
];
|
|
72
|
+
/** The Anthropic SDK's endpoint variable; refused when an anthropic adapter is configured. */
|
|
73
|
+
export const ANTHROPIC_BASE_URL_VARIABLE = "ANTHROPIC_BASE_URL";
|
|
74
|
+
/** The OpenAI SDK's endpoint variable; refused when an openai adapter is configured. */
|
|
75
|
+
export const OPENAI_BASE_URL_VARIABLE = "OPENAI_BASE_URL";
|
|
76
|
+
/**
|
|
77
|
+
* Every variable that can redirect or unwrap the TLS carrying a key, or redirect search index data
|
|
78
|
+
* (design section 7.2); each is refused in either case unless allowed, and the conditional ones
|
|
79
|
+
* only when the configuration uses what reads them.
|
|
80
|
+
*/
|
|
81
|
+
export const REFUSED_VARIABLES = [
|
|
82
|
+
...TLS_PROXY_VARIABLES,
|
|
83
|
+
ANTHROPIC_BASE_URL_VARIABLE,
|
|
84
|
+
OPENAI_BASE_URL_VARIABLE,
|
|
85
|
+
...AWS_STORE_VARIABLES,
|
|
86
|
+
];
|
|
87
|
+
/** The uses of `settings`: an s3:// search store, and each provider's adapter (`adapter`, else its id). */
|
|
88
|
+
export function envUses(settings) {
|
|
89
|
+
return {
|
|
90
|
+
s3Store: settings.search?.store?.uri.startsWith("s3://") ?? false,
|
|
91
|
+
adapters: Object.entries(settings.providers).map(([id, entry]) => entry.adapter ?? id),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function inUse(name, uses) {
|
|
95
|
+
if (uses === undefined)
|
|
96
|
+
return true;
|
|
97
|
+
if (AWS_STORE_VARIABLES.includes(name))
|
|
98
|
+
return uses.s3Store;
|
|
99
|
+
if (name === ANTHROPIC_BASE_URL_VARIABLE)
|
|
100
|
+
return uses.adapters.includes("anthropic");
|
|
101
|
+
if (name === OPENAI_BASE_URL_VARIABLE)
|
|
102
|
+
return uses.adapters.includes("openai");
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The set variables `checkEnvironment` would refuse, by the name they are set under. Without
|
|
107
|
+
* `uses`, every variable is refused.
|
|
108
|
+
*/
|
|
109
|
+
export function refusedVariables(allow = [], env = process.env, uses) {
|
|
110
|
+
const allowed = new Set(allow.map((name) => name.toUpperCase()));
|
|
111
|
+
const refused = [];
|
|
112
|
+
for (const name of REFUSED_VARIABLES) {
|
|
113
|
+
if (allowed.has(name) || !inUse(name, uses))
|
|
114
|
+
continue;
|
|
115
|
+
// One report per variable: on Windows the environment is case-insensitive, so both spellings
|
|
116
|
+
// read the same value.
|
|
117
|
+
const set = [name, name.toLowerCase()].find((variant) => env[variant]);
|
|
118
|
+
if (set !== undefined)
|
|
119
|
+
refused.push(set);
|
|
120
|
+
}
|
|
121
|
+
return refused;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Throws `settings_invalid` when a refused variable is set and `environment.allow` does not list
|
|
125
|
+
* it. Run at server start and before every command that sends a key.
|
|
126
|
+
*/
|
|
127
|
+
export function checkEnvironment(allow = [], env = process.env, uses) {
|
|
128
|
+
const refused = refusedVariables(allow, env, uses);
|
|
129
|
+
if (refused.length === 0)
|
|
130
|
+
return;
|
|
131
|
+
throw new SettingsError(`${refused.join(", ")} ${refused.length === 1 ? "is" : "are"} set; each can redirect a key or index data, or unwrap the TLS that carries a key. Unset ${refused.length === 1 ? "it" : "them"}, or list ${refused.length === 1 ? "it" : "them"} in the settings file's environment.allow.`);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The environment without the variables `names`, matched case-insensitively (the Windows
|
|
135
|
+
* environment is case-insensitive): what a command a developer wrote is started with, so it never
|
|
136
|
+
* holds a key.
|
|
137
|
+
*/
|
|
138
|
+
export function withoutVariables(names, env = process.env) {
|
|
139
|
+
const removed = new Set([...names].map((name) => name.toUpperCase()));
|
|
140
|
+
return Object.fromEntries(Object.entries(env).filter(([name]) => !removed.has(name.toUpperCase())));
|
|
141
|
+
}
|
|
142
|
+
/** The environment with Git told to take no optional lock, so a read such as `ls-files` writes nothing in `.git`. */
|
|
143
|
+
export function gitReadOnlyEnv(env = process.env) {
|
|
144
|
+
return { ...env, GIT_OPTIONAL_LOCKS: "0" };
|
|
145
|
+
}
|
|
146
|
+
/** `$ASSETGROVE_CONFIG` when set (empty counts as unset). */
|
|
147
|
+
export function configOverride(env = process.env) {
|
|
148
|
+
return env["ASSETGROVE_CONFIG"] || undefined;
|
|
149
|
+
}
|
|
150
|
+
/** The environment with `$ASSETGROVE_CONFIG` set to `path`, to load a settings file in trial. */
|
|
151
|
+
export function withConfigOverride(path, env = process.env) {
|
|
152
|
+
return { ...env, ASSETGROVE_CONFIG: path };
|
|
153
|
+
}
|
|
154
|
+
/** `$XDG_CONFIG_HOME` or `~/.config`; `%APPDATA%` on Windows. */
|
|
155
|
+
export function configHome(env = process.env, platform = process.platform) {
|
|
156
|
+
if (platform === "win32" && env["APPDATA"] && isAbsolute(env["APPDATA"]))
|
|
157
|
+
return env["APPDATA"];
|
|
158
|
+
const xdg = env["XDG_CONFIG_HOME"];
|
|
159
|
+
if (platform !== "win32" && xdg && isAbsolute(xdg))
|
|
160
|
+
return xdg;
|
|
161
|
+
return join(homeDir(env), platform === "win32" ? join("AppData", "Roaming") : ".config");
|
|
162
|
+
}
|
|
163
|
+
/** `$XDG_STATE_HOME` or `~/.local/state`; `%LOCALAPPDATA%` on Windows. */
|
|
164
|
+
export function stateHome(env = process.env, platform = process.platform) {
|
|
165
|
+
if (platform === "win32" && env["LOCALAPPDATA"] && isAbsolute(env["LOCALAPPDATA"])) {
|
|
166
|
+
return env["LOCALAPPDATA"];
|
|
167
|
+
}
|
|
168
|
+
const xdg = env["XDG_STATE_HOME"];
|
|
169
|
+
if (platform !== "win32" && xdg && isAbsolute(xdg))
|
|
170
|
+
return xdg;
|
|
171
|
+
return join(homeDir(env), platform === "win32" ? join("AppData", "Local") : join(".local", "state"));
|
|
172
|
+
}
|
|
173
|
+
/** The user's home directory: `$HOME`, else `%USERPROFILE%`, else the system's answer. */
|
|
174
|
+
export function homeDir(env = process.env) {
|
|
175
|
+
const home = env["HOME"] || env["USERPROFILE"];
|
|
176
|
+
return home && isAbsolute(home) ? home : homedir();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Points `$ASSETGROVE_CONFIG` at `settingsPath` and unsets `$ASSETGROVE_WORK_ITEM` and every
|
|
180
|
+
* refused variable (in either spelling), so a command run in this process reads only that settings
|
|
181
|
+
* file; returns a function that puts back what each held. The test kit's temporary project
|
|
182
|
+
* (src/testing/project.ts) holds the environment so while it is open.
|
|
183
|
+
*/
|
|
184
|
+
export function isolateForSettings(settingsPath, env = process.env) {
|
|
185
|
+
const saved = {
|
|
186
|
+
config: env["ASSETGROVE_CONFIG"],
|
|
187
|
+
workItem: env["ASSETGROVE_WORK_ITEM"],
|
|
188
|
+
refused: new Map(),
|
|
189
|
+
};
|
|
190
|
+
env["ASSETGROVE_CONFIG"] = settingsPath;
|
|
191
|
+
delete env["ASSETGROVE_WORK_ITEM"];
|
|
192
|
+
for (const name of REFUSED_VARIABLES)
|
|
193
|
+
for (const variant of [name, name.toLowerCase()]) {
|
|
194
|
+
if (!saved.refused.has(variant))
|
|
195
|
+
saved.refused.set(variant, env[variant]);
|
|
196
|
+
delete env[variant];
|
|
197
|
+
}
|
|
198
|
+
return () => {
|
|
199
|
+
if (saved.config === undefined)
|
|
200
|
+
delete env["ASSETGROVE_CONFIG"];
|
|
201
|
+
else
|
|
202
|
+
env["ASSETGROVE_CONFIG"] = saved.config;
|
|
203
|
+
if (saved.workItem === undefined)
|
|
204
|
+
delete env["ASSETGROVE_WORK_ITEM"];
|
|
205
|
+
else
|
|
206
|
+
env["ASSETGROVE_WORK_ITEM"] = saved.workItem;
|
|
207
|
+
for (const [variant, value] of saved.refused) {
|
|
208
|
+
if (value === undefined)
|
|
209
|
+
delete env[variant];
|
|
210
|
+
else
|
|
211
|
+
env[variant] = value;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Replaces the variables of `env` (the process environment) with `next`'s, in place, or keeps them
|
|
217
|
+
* when `next` is absent; returns a function that puts back what `env` held before. The test kit's
|
|
218
|
+
* `cli()` (src/testing/cli.ts) runs one command line in process so.
|
|
219
|
+
*/
|
|
220
|
+
export function replaceEnv(next, env = process.env) {
|
|
221
|
+
const saved = { ...env };
|
|
222
|
+
const assign = (values) => {
|
|
223
|
+
for (const name of Object.keys(env))
|
|
224
|
+
if (!(name in values))
|
|
225
|
+
delete env[name];
|
|
226
|
+
for (const [name, value] of Object.entries(values)) {
|
|
227
|
+
if (value === undefined)
|
|
228
|
+
delete env[name];
|
|
229
|
+
else
|
|
230
|
+
env[name] = value;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
if (next !== undefined)
|
|
234
|
+
assign({ ...next });
|
|
235
|
+
return () => assign(saved);
|
|
236
|
+
}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Each exit code with what it means. Exit 0 is success and has no error code. */
|
|
2
|
+
export declare const EXIT_MEANING: {
|
|
3
|
+
readonly 0: "success";
|
|
4
|
+
readonly 1: "internal error";
|
|
5
|
+
readonly 2: "invalid input";
|
|
6
|
+
readonly 3: "spend refused";
|
|
7
|
+
readonly 4: "provider error";
|
|
8
|
+
readonly 5: "QA found nothing";
|
|
9
|
+
readonly 6: "written output rejected";
|
|
10
|
+
readonly 7: "licence refused";
|
|
11
|
+
readonly 8: "a person must confirm";
|
|
12
|
+
readonly 9: "prompt refused";
|
|
13
|
+
};
|
|
14
|
+
/** Every error code and its exit. */
|
|
15
|
+
export declare const EXIT: {
|
|
16
|
+
readonly internal_error: 1;
|
|
17
|
+
readonly invalid_input: 2;
|
|
18
|
+
readonly settings_invalid: 2;
|
|
19
|
+
readonly key_tracked: 2;
|
|
20
|
+
readonly git_required: 2;
|
|
21
|
+
readonly lfs_required: 2;
|
|
22
|
+
readonly format_unsupported: 2;
|
|
23
|
+
readonly extension_unavailable: 2;
|
|
24
|
+
readonly extension_refused: 2;
|
|
25
|
+
readonly extension_conflict: 2;
|
|
26
|
+
readonly route_unavailable: 2;
|
|
27
|
+
readonly embedder_changed: 2;
|
|
28
|
+
readonly plan_changed: 2;
|
|
29
|
+
readonly run_in_progress: 2;
|
|
30
|
+
readonly command_refused: 2;
|
|
31
|
+
readonly asset_id_reserved: 2;
|
|
32
|
+
readonly asset_conflict: 2;
|
|
33
|
+
readonly version_exists: 2;
|
|
34
|
+
readonly version_changed: 2;
|
|
35
|
+
readonly card_field_owned: 2;
|
|
36
|
+
readonly provenance_mismatch: 2;
|
|
37
|
+
readonly restricted_media_public: 2;
|
|
38
|
+
readonly storage_level_looser: 2;
|
|
39
|
+
readonly storage_unset: 2;
|
|
40
|
+
readonly storage_failed: 2;
|
|
41
|
+
readonly storage_path_unsafe: 2;
|
|
42
|
+
readonly cap_refused: 3;
|
|
43
|
+
readonly provider_limit_undeclared: 3;
|
|
44
|
+
readonly provider_limit_mismatch: 3;
|
|
45
|
+
readonly spend_hold: 3;
|
|
46
|
+
readonly provider_error: 4;
|
|
47
|
+
readonly qa_found_nothing: 5;
|
|
48
|
+
readonly validator_rejected: 6;
|
|
49
|
+
readonly handoff_check_failed: 6;
|
|
50
|
+
readonly library_check_failed: 6;
|
|
51
|
+
readonly storage_checksum: 6;
|
|
52
|
+
readonly storage_missing: 6;
|
|
53
|
+
readonly license_refused: 7;
|
|
54
|
+
readonly confirmation_required: 8;
|
|
55
|
+
readonly confirmation_declined: 8;
|
|
56
|
+
readonly prompt_refused: 9;
|
|
57
|
+
};
|
|
58
|
+
export type ErrorCode = keyof typeof EXIT;
|
|
59
|
+
/** The caller's input is unusable: a bad spec, file, option or state. Nothing was spent. */
|
|
60
|
+
export declare class InputError extends Error {
|
|
61
|
+
constructor(message: string, options?: ErrorOptions);
|
|
62
|
+
}
|
|
63
|
+
/** A refusal of settings or the environment they allow, with the code `settings_invalid`. */
|
|
64
|
+
export declare class SettingsError extends InputError {
|
|
65
|
+
readonly code = "settings_invalid";
|
|
66
|
+
constructor(message: string, options?: ErrorOptions);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A model provider call failed or returned nothing usable. Its message is redacted. When the
|
|
70
|
+
* provider answered, `status` is its HTTP status and `providerCode` its error code, so callers
|
|
71
|
+
* decide on those rather than on the message.
|
|
72
|
+
*/
|
|
73
|
+
export declare class ProviderError extends Error {
|
|
74
|
+
readonly status: number | undefined;
|
|
75
|
+
readonly providerCode: string | undefined;
|
|
76
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
77
|
+
status?: number;
|
|
78
|
+
providerCode?: string;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A queued job's call stopped with the job journaled and its reservation open (design section 9):
|
|
83
|
+
* the deadline, an `unknown` status, a submit that may have reached the provider, or a person must
|
|
84
|
+
* look. Exit 4 `provider_error`. It is not a `ProviderError`, so a loop that goes on past one failed
|
|
85
|
+
* candidate stops on it rather than pay for new work while the journaled job waits to be collected.
|
|
86
|
+
*/
|
|
87
|
+
export declare class JobStoppedError extends Error {
|
|
88
|
+
readonly code = "provider_error";
|
|
89
|
+
constructor(message: string, options?: ErrorOptions);
|
|
90
|
+
}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exit and error-code table (design section 5): every refusal names one error code, and each
|
|
3
|
+
* code maps to one exit. InputError and ProviderError are the typed failures most code throws.
|
|
4
|
+
*/
|
|
5
|
+
import { redact } from "./redact.js";
|
|
6
|
+
/** Each exit code with what it means. Exit 0 is success and has no error code. */
|
|
7
|
+
export const EXIT_MEANING = {
|
|
8
|
+
0: "success",
|
|
9
|
+
1: "internal error",
|
|
10
|
+
2: "invalid input",
|
|
11
|
+
3: "spend refused",
|
|
12
|
+
4: "provider error",
|
|
13
|
+
5: "QA found nothing",
|
|
14
|
+
6: "written output rejected",
|
|
15
|
+
7: "licence refused",
|
|
16
|
+
8: "a person must confirm",
|
|
17
|
+
9: "prompt refused",
|
|
18
|
+
};
|
|
19
|
+
/** Every error code and its exit. */
|
|
20
|
+
export const EXIT = {
|
|
21
|
+
internal_error: 1,
|
|
22
|
+
invalid_input: 2,
|
|
23
|
+
settings_invalid: 2,
|
|
24
|
+
key_tracked: 2,
|
|
25
|
+
git_required: 2,
|
|
26
|
+
lfs_required: 2,
|
|
27
|
+
format_unsupported: 2,
|
|
28
|
+
extension_unavailable: 2,
|
|
29
|
+
extension_refused: 2,
|
|
30
|
+
extension_conflict: 2,
|
|
31
|
+
route_unavailable: 2,
|
|
32
|
+
embedder_changed: 2,
|
|
33
|
+
plan_changed: 2,
|
|
34
|
+
run_in_progress: 2,
|
|
35
|
+
command_refused: 2,
|
|
36
|
+
asset_id_reserved: 2,
|
|
37
|
+
asset_conflict: 2,
|
|
38
|
+
version_exists: 2,
|
|
39
|
+
version_changed: 2,
|
|
40
|
+
card_field_owned: 2,
|
|
41
|
+
provenance_mismatch: 2,
|
|
42
|
+
restricted_media_public: 2,
|
|
43
|
+
storage_level_looser: 2,
|
|
44
|
+
storage_unset: 2,
|
|
45
|
+
storage_failed: 2,
|
|
46
|
+
storage_path_unsafe: 2,
|
|
47
|
+
cap_refused: 3,
|
|
48
|
+
provider_limit_undeclared: 3,
|
|
49
|
+
provider_limit_mismatch: 3,
|
|
50
|
+
spend_hold: 3,
|
|
51
|
+
provider_error: 4,
|
|
52
|
+
qa_found_nothing: 5,
|
|
53
|
+
validator_rejected: 6,
|
|
54
|
+
handoff_check_failed: 6,
|
|
55
|
+
library_check_failed: 6,
|
|
56
|
+
storage_checksum: 6,
|
|
57
|
+
storage_missing: 6,
|
|
58
|
+
license_refused: 7,
|
|
59
|
+
confirmation_required: 8,
|
|
60
|
+
confirmation_declined: 8,
|
|
61
|
+
prompt_refused: 9,
|
|
62
|
+
};
|
|
63
|
+
/** The caller's input is unusable: a bad spec, file, option or state. Nothing was spent. */
|
|
64
|
+
export class InputError extends Error {
|
|
65
|
+
constructor(message, options) {
|
|
66
|
+
super(message, options);
|
|
67
|
+
this.name = "InputError";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** A refusal of settings or the environment they allow, with the code `settings_invalid`. */
|
|
71
|
+
export class SettingsError extends InputError {
|
|
72
|
+
code = "settings_invalid";
|
|
73
|
+
constructor(message, options) {
|
|
74
|
+
super(message, options);
|
|
75
|
+
this.name = "SettingsError";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A model provider call failed or returned nothing usable. Its message is redacted. When the
|
|
80
|
+
* provider answered, `status` is its HTTP status and `providerCode` its error code, so callers
|
|
81
|
+
* decide on those rather than on the message.
|
|
82
|
+
*/
|
|
83
|
+
export class ProviderError extends Error {
|
|
84
|
+
status;
|
|
85
|
+
providerCode;
|
|
86
|
+
constructor(message, options) {
|
|
87
|
+
super(redact(message), options);
|
|
88
|
+
this.name = "ProviderError";
|
|
89
|
+
this.status = options?.status;
|
|
90
|
+
this.providerCode = options?.providerCode;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A queued job's call stopped with the job journaled and its reservation open (design section 9):
|
|
95
|
+
* the deadline, an `unknown` status, a submit that may have reached the provider, or a person must
|
|
96
|
+
* look. Exit 4 `provider_error`. It is not a `ProviderError`, so a loop that goes on past one failed
|
|
97
|
+
* candidate stops on it rather than pay for new work while the journaled job waits to be collected.
|
|
98
|
+
*/
|
|
99
|
+
export class JobStoppedError extends Error {
|
|
100
|
+
code = "provider_error";
|
|
101
|
+
constructor(message, options) {
|
|
102
|
+
super(redact(message), options);
|
|
103
|
+
this.name = "JobStoppedError";
|
|
104
|
+
}
|
|
105
|
+
}
|