@nodetool-ai/protocol 0.7.0-rc.23 → 0.8.1
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/README.md +56 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/ai-video-production.d.ts +249 -0
- package/dist/ai-video-production.d.ts.map +1 -0
- package/dist/ai-video-production.js +131 -0
- package/dist/ai-video-production.js.map +1 -0
- package/dist/api-schemas/agent-access.d.ts +134 -0
- package/dist/api-schemas/agent-access.d.ts.map +1 -0
- package/dist/api-schemas/agent-access.js +93 -0
- package/dist/api-schemas/agent-access.js.map +1 -0
- package/dist/api-schemas/api-error-code.d.ts +11 -1
- package/dist/api-schemas/api-error-code.d.ts.map +1 -1
- package/dist/api-schemas/api-error-code.js +10 -0
- package/dist/api-schemas/api-error-code.js.map +1 -1
- package/dist/api-schemas/applications.d.ts +1411 -0
- package/dist/api-schemas/applications.d.ts.map +1 -0
- package/dist/api-schemas/applications.js +333 -0
- package/dist/api-schemas/applications.js.map +1 -0
- package/dist/api-schemas/assets.d.ts +230 -0
- package/dist/api-schemas/assets.d.ts.map +1 -1
- package/dist/api-schemas/assets.js +131 -5
- package/dist/api-schemas/assets.js.map +1 -1
- package/dist/api-schemas/code-gen.d.ts +176 -0
- package/dist/api-schemas/code-gen.d.ts.map +1 -0
- package/dist/api-schemas/code-gen.js +205 -0
- package/dist/api-schemas/code-gen.js.map +1 -0
- package/dist/api-schemas/collections.d.ts.map +1 -1
- package/dist/api-schemas/collections.js +3 -4
- package/dist/api-schemas/collections.js.map +1 -1
- package/dist/api-schemas/costs.d.ts +179 -0
- package/dist/api-schemas/costs.d.ts.map +1 -1
- package/dist/api-schemas/costs.js +100 -4
- package/dist/api-schemas/costs.js.map +1 -1
- package/dist/api-schemas/credits.d.ts +42 -0
- package/dist/api-schemas/credits.d.ts.map +1 -0
- package/dist/api-schemas/credits.js +43 -0
- package/dist/api-schemas/credits.js.map +1 -0
- package/dist/api-schemas/documents.d.ts +163 -0
- package/dist/api-schemas/documents.d.ts.map +1 -0
- package/dist/api-schemas/documents.js +75 -0
- package/dist/api-schemas/documents.js.map +1 -0
- package/dist/api-schemas/files.d.ts +13 -0
- package/dist/api-schemas/files.d.ts.map +1 -1
- package/dist/api-schemas/files.js +8 -0
- package/dist/api-schemas/files.js.map +1 -1
- package/dist/api-schemas/fonts.d.ts +17 -1
- package/dist/api-schemas/fonts.d.ts.map +1 -1
- package/dist/api-schemas/fonts.js +19 -3
- package/dist/api-schemas/fonts.js.map +1 -1
- package/dist/api-schemas/index.d.ts +23 -1
- package/dist/api-schemas/index.d.ts.map +1 -1
- package/dist/api-schemas/index.js +23 -1
- package/dist/api-schemas/index.js.map +1 -1
- package/dist/api-schemas/jobs.d.ts +12 -0
- package/dist/api-schemas/jobs.d.ts.map +1 -1
- package/dist/api-schemas/jobs.js +12 -2
- package/dist/api-schemas/jobs.js.map +1 -1
- package/dist/api-schemas/js-scripts.d.ts +364 -0
- package/dist/api-schemas/js-scripts.d.ts.map +1 -0
- package/dist/api-schemas/js-scripts.js +333 -0
- package/dist/api-schemas/js-scripts.js.map +1 -0
- package/dist/api-schemas/mcp-config.d.ts.map +1 -1
- package/dist/api-schemas/mcp-config.js +3 -1
- package/dist/api-schemas/mcp-config.js.map +1 -1
- package/dist/api-schemas/memories.d.ts +84 -0
- package/dist/api-schemas/memories.d.ts.map +1 -0
- package/dist/api-schemas/memories.js +54 -0
- package/dist/api-schemas/memories.js.map +1 -0
- package/dist/api-schemas/messages.d.ts +1 -0
- package/dist/api-schemas/messages.d.ts.map +1 -1
- package/dist/api-schemas/messages.js +4 -4
- package/dist/api-schemas/messages.js.map +1 -1
- package/dist/api-schemas/models.d.ts +156 -0
- package/dist/api-schemas/models.d.ts.map +1 -1
- package/dist/api-schemas/models.js +51 -6
- package/dist/api-schemas/models.js.map +1 -1
- package/dist/api-schemas/nodes.d.ts +97 -0
- package/dist/api-schemas/nodes.d.ts.map +1 -1
- package/dist/api-schemas/nodes.js +89 -0
- package/dist/api-schemas/nodes.js.map +1 -1
- package/dist/api-schemas/projects.d.ts +427 -0
- package/dist/api-schemas/projects.d.ts.map +1 -0
- package/dist/api-schemas/projects.js +224 -0
- package/dist/api-schemas/projects.js.map +1 -0
- package/dist/api-schemas/recipes.d.ts +172 -0
- package/dist/api-schemas/recipes.d.ts.map +1 -0
- package/dist/api-schemas/recipes.js +144 -0
- package/dist/api-schemas/recipes.js.map +1 -0
- package/dist/api-schemas/resources.d.ts +112 -0
- package/dist/api-schemas/resources.d.ts.map +1 -0
- package/dist/api-schemas/resources.js +44 -0
- package/dist/api-schemas/resources.js.map +1 -0
- package/dist/api-schemas/scripts.d.ts +1571 -0
- package/dist/api-schemas/scripts.d.ts.map +1 -0
- package/dist/api-schemas/scripts.js +153 -0
- package/dist/api-schemas/scripts.js.map +1 -0
- package/dist/api-schemas/sdk-execution-v1.d.ts +467 -0
- package/dist/api-schemas/sdk-execution-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-execution-v1.js +115 -0
- package/dist/api-schemas/sdk-execution-v1.js.map +1 -0
- package/dist/api-schemas/sdk-lifecycle-v1.d.ts +217 -0
- package/dist/api-schemas/sdk-lifecycle-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-lifecycle-v1.js +117 -0
- package/dist/api-schemas/sdk-lifecycle-v1.js.map +1 -0
- package/dist/api-schemas/sdk-models-v1.d.ts +181 -0
- package/dist/api-schemas/sdk-models-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-models-v1.js +108 -0
- package/dist/api-schemas/sdk-models-v1.js.map +1 -0
- package/dist/api-schemas/sdk-v1-http-operations.d.ts +941 -0
- package/dist/api-schemas/sdk-v1-http-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-http-operations.js +465 -0
- package/dist/api-schemas/sdk-v1-http-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1-operations.d.ts +151 -0
- package/dist/api-schemas/sdk-v1-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-operations.js +97 -0
- package/dist/api-schemas/sdk-v1-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.d.ts +97 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.js +96 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1.d.ts +15 -0
- package/dist/api-schemas/sdk-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1.js +22 -0
- package/dist/api-schemas/sdk-v1.js.map +1 -0
- package/dist/api-schemas/segmentation.d.ts +75 -0
- package/dist/api-schemas/segmentation.d.ts.map +1 -0
- package/dist/api-schemas/segmentation.js +54 -0
- package/dist/api-schemas/segmentation.js.map +1 -0
- package/dist/api-schemas/settings.d.ts +159 -0
- package/dist/api-schemas/settings.d.ts.map +1 -1
- package/dist/api-schemas/settings.js +70 -0
- package/dist/api-schemas/settings.js.map +1 -1
- package/dist/api-schemas/sketch.d.ts +847 -0
- package/dist/api-schemas/sketch.d.ts.map +1 -0
- package/dist/api-schemas/sketch.js +544 -0
- package/dist/api-schemas/sketch.js.map +1 -0
- package/dist/api-schemas/skills.d.ts +27 -14
- package/dist/api-schemas/skills.d.ts.map +1 -1
- package/dist/api-schemas/skills.js +64 -11
- package/dist/api-schemas/skills.js.map +1 -1
- package/dist/api-schemas/storage.d.ts +8 -0
- package/dist/api-schemas/storage.d.ts.map +1 -1
- package/dist/api-schemas/storage.js +7 -0
- package/dist/api-schemas/storage.js.map +1 -1
- package/dist/api-schemas/storyboards.d.ts +7026 -0
- package/dist/api-schemas/storyboards.d.ts.map +1 -0
- package/dist/api-schemas/storyboards.js +393 -0
- package/dist/api-schemas/storyboards.js.map +1 -0
- package/dist/api-schemas/threads.d.ts +12 -4
- package/dist/api-schemas/threads.d.ts.map +1 -1
- package/dist/api-schemas/threads.js +12 -4
- package/dist/api-schemas/threads.js.map +1 -1
- package/dist/api-schemas/timeline-tool-contracts.d.ts +1650 -0
- package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -0
- package/dist/api-schemas/timeline-tool-contracts.js +725 -0
- package/dist/api-schemas/timeline-tool-contracts.js.map +1 -0
- package/dist/api-schemas/timeline-tool-params.d.ts +1237 -0
- package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -0
- package/dist/api-schemas/timeline-tool-params.js +1518 -0
- package/dist/api-schemas/timeline-tool-params.js.map +1 -0
- package/dist/api-schemas/timeline.d.ts +12803 -0
- package/dist/api-schemas/timeline.d.ts.map +1 -0
- package/dist/api-schemas/timeline.js +1838 -0
- package/dist/api-schemas/timeline.js.map +1 -0
- package/dist/api-schemas/ui-tool-contract.d.ts +35 -0
- package/dist/api-schemas/ui-tool-contract.d.ts.map +1 -0
- package/dist/api-schemas/ui-tool-contract.js +31 -0
- package/dist/api-schemas/ui-tool-contract.js.map +1 -0
- package/dist/api-schemas/workflows.d.ts +852 -18
- package/dist/api-schemas/workflows.d.ts.map +1 -1
- package/dist/api-schemas/workflows.js +484 -6
- package/dist/api-schemas/workflows.js.map +1 -1
- package/dist/api-schemas/workspace.d.ts +45 -0
- package/dist/api-schemas/workspace.d.ts.map +1 -1
- package/dist/api-schemas/workspace.js +47 -1
- package/dist/api-schemas/workspace.js.map +1 -1
- package/dist/api-types.d.ts +621 -27
- package/dist/api-types.d.ts.map +1 -1
- package/dist/api-types.js +246 -1
- package/dist/api-types.js.map +1 -1
- package/dist/app-deployment.d.ts +37 -0
- package/dist/app-deployment.d.ts.map +1 -0
- package/dist/app-deployment.js +42 -0
- package/dist/app-deployment.js.map +1 -0
- package/dist/asset-generation.d.ts +58 -0
- package/dist/asset-generation.d.ts.map +1 -0
- package/dist/asset-generation.js +147 -0
- package/dist/asset-generation.js.map +1 -0
- package/dist/blend-modes.d.ts +20 -0
- package/dist/blend-modes.d.ts.map +1 -0
- package/dist/blend-modes.js +33 -0
- package/dist/blend-modes.js.map +1 -0
- package/dist/bridge-frames.d.ts +654 -0
- package/dist/bridge-frames.d.ts.map +1 -0
- package/dist/bridge-frames.js +448 -0
- package/dist/bridge-frames.js.map +1 -0
- package/dist/bridge-frames.schema.json +862 -0
- package/dist/bridge-protocol.d.ts +57 -20
- package/dist/bridge-protocol.d.ts.map +1 -1
- package/dist/bridge-protocol.js +57 -20
- package/dist/bridge-protocol.js.map +1 -1
- package/dist/builtin-packs.d.ts +45 -0
- package/dist/builtin-packs.d.ts.map +1 -0
- package/dist/builtin-packs.js +115 -0
- package/dist/builtin-packs.js.map +1 -0
- package/dist/caption-word.d.ts +15 -0
- package/dist/caption-word.d.ts.map +1 -0
- package/dist/caption-word.js +10 -0
- package/dist/caption-word.js.map +1 -0
- package/dist/cloud-profile.d.ts +187 -0
- package/dist/cloud-profile.d.ts.map +1 -0
- package/dist/cloud-profile.js +281 -0
- package/dist/cloud-profile.js.map +1 -0
- package/dist/creative.d.ts +486 -0
- package/dist/creative.d.ts.map +1 -0
- package/dist/creative.js +269 -0
- package/dist/creative.js.map +1 -0
- package/dist/custom-providers.d.ts +70 -0
- package/dist/custom-providers.d.ts.map +1 -0
- package/dist/custom-providers.js +125 -0
- package/dist/custom-providers.js.map +1 -0
- package/dist/document-ops.d.ts +15 -0
- package/dist/document-ops.d.ts.map +1 -0
- package/dist/document-ops.js +2 -0
- package/dist/document-ops.js.map +1 -0
- package/dist/game-assets.d.ts +344 -0
- package/dist/game-assets.d.ts.map +1 -0
- package/dist/game-assets.js +297 -0
- package/dist/game-assets.js.map +1 -0
- package/dist/game-design.d.ts +90 -0
- package/dist/game-design.d.ts.map +1 -0
- package/dist/game-design.js +417 -0
- package/dist/game-design.js.map +1 -0
- package/dist/game-flow-prompt.d.ts +68 -0
- package/dist/game-flow-prompt.d.ts.map +1 -0
- package/dist/game-flow-prompt.js +121 -0
- package/dist/game-flow-prompt.js.map +1 -0
- package/dist/game-graph.d.ts +96 -0
- package/dist/game-graph.d.ts.map +1 -0
- package/dist/game-graph.js +481 -0
- package/dist/game-graph.js.map +1 -0
- package/dist/game-migration.d.ts +4 -0
- package/dist/game-migration.d.ts.map +1 -0
- package/dist/game-migration.js +6 -0
- package/dist/game-migration.js.map +1 -0
- package/dist/game-slot-prompt.d.ts +90 -0
- package/dist/game-slot-prompt.d.ts.map +1 -0
- package/dist/game-slot-prompt.js +237 -0
- package/dist/game-slot-prompt.js.map +1 -0
- package/dist/game.d.ts +1663 -0
- package/dist/game.d.ts.map +1 -0
- package/dist/game.js +228 -0
- package/dist/game.js.map +1 -0
- package/dist/graph.d.ts +191 -5
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +497 -0
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +47 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -2
- package/dist/index.js.map +1 -1
- package/dist/loop.d.ts +38 -0
- package/dist/loop.d.ts.map +1 -0
- package/dist/loop.js +69 -0
- package/dist/loop.js.map +1 -0
- package/dist/mcp-server-config.d.ts +113 -0
- package/dist/mcp-server-config.d.ts.map +1 -0
- package/dist/mcp-server-config.js +147 -0
- package/dist/mcp-server-config.js.map +1 -0
- package/dist/messages.d.ts +1565 -243
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +709 -22
- package/dist/messages.js.map +1 -1
- package/dist/model-selection.d.ts +20 -0
- package/dist/model-selection.d.ts.map +1 -0
- package/dist/model-selection.js +27 -0
- package/dist/model-selection.js.map +1 -0
- package/dist/nodetool-models.d.ts +71 -0
- package/dist/nodetool-models.d.ts.map +1 -0
- package/dist/nodetool-models.js +138 -0
- package/dist/nodetool-models.js.map +1 -0
- package/dist/package-assets.d.ts +39 -0
- package/dist/package-assets.d.ts.map +1 -0
- package/dist/package-assets.js +63 -0
- package/dist/package-assets.js.map +1 -0
- package/dist/platform.d.ts +66 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +68 -0
- package/dist/platform.js.map +1 -0
- package/dist/predicates.d.ts +43 -0
- package/dist/predicates.d.ts.map +1 -0
- package/dist/predicates.js +65 -0
- package/dist/predicates.js.map +1 -0
- package/dist/processing-messages.schema.json +2525 -0
- package/dist/production-authoring.d.ts +757 -0
- package/dist/production-authoring.d.ts.map +1 -0
- package/dist/production-authoring.js +736 -0
- package/dist/production-authoring.js.map +1 -0
- package/dist/render-record.d.ts +86 -0
- package/dist/render-record.d.ts.map +1 -0
- package/dist/render-record.js +133 -0
- package/dist/render-record.js.map +1 -0
- package/dist/resource-id.d.ts +22 -0
- package/dist/resource-id.d.ts.map +1 -0
- package/dist/resource-id.js +32 -0
- package/dist/resource-id.js.map +1 -0
- package/dist/resource-uri.d.ts +15 -0
- package/dist/resource-uri.d.ts.map +1 -0
- package/dist/resource-uri.js +88 -0
- package/dist/resource-uri.js.map +1 -0
- package/dist/sandbox-capability.d.ts +86 -0
- package/dist/sandbox-capability.d.ts.map +1 -0
- package/dist/sandbox-capability.js +106 -0
- package/dist/sandbox-capability.js.map +1 -0
- package/dist/sandbox-host.d.ts +98 -0
- package/dist/sandbox-host.d.ts.map +1 -0
- package/dist/sandbox-host.js +311 -0
- package/dist/sandbox-host.js.map +1 -0
- package/dist/sandbox-package.d.ts +674 -0
- package/dist/sandbox-package.d.ts.map +1 -0
- package/dist/sandbox-package.js +622 -0
- package/dist/sandbox-package.js.map +1 -0
- package/dist/sandbox-wasm.d.ts +84 -0
- package/dist/sandbox-wasm.d.ts.map +1 -0
- package/dist/sandbox-wasm.js +139 -0
- package/dist/sandbox-wasm.js.map +1 -0
- package/dist/screenplay-authoring.d.ts +69 -0
- package/dist/screenplay-authoring.d.ts.map +1 -0
- package/dist/screenplay-authoring.js +351 -0
- package/dist/screenplay-authoring.js.map +1 -0
- package/dist/script-authoring.d.ts +161 -0
- package/dist/script-authoring.d.ts.map +1 -0
- package/dist/script-authoring.js +503 -0
- package/dist/script-authoring.js.map +1 -0
- package/dist/script-fill.d.ts +39 -0
- package/dist/script-fill.d.ts.map +1 -0
- package/dist/script-fill.js +67 -0
- package/dist/script-fill.js.map +1 -0
- package/dist/script-link.d.ts +110 -0
- package/dist/script-link.d.ts.map +1 -0
- package/dist/script-link.js +252 -0
- package/dist/script-link.js.map +1 -0
- package/dist/sha256.d.ts +11 -0
- package/dist/sha256.d.ts.map +1 -0
- package/dist/sha256.js +110 -0
- package/dist/sha256.js.map +1 -0
- package/dist/shot-prompt.d.ts +78 -0
- package/dist/shot-prompt.d.ts.map +1 -0
- package/dist/shot-prompt.js +120 -0
- package/dist/shot-prompt.js.map +1 -0
- package/dist/skill-document.d.ts +36 -0
- package/dist/skill-document.d.ts.map +1 -0
- package/dist/skill-document.js +137 -0
- package/dist/skill-document.js.map +1 -0
- package/dist/style-presets.d.ts +73 -0
- package/dist/style-presets.d.ts.map +1 -0
- package/dist/style-presets.js +147 -0
- package/dist/style-presets.js.map +1 -0
- package/dist/supervisor.d.ts +227 -0
- package/dist/supervisor.d.ts.map +1 -0
- package/dist/supervisor.js +116 -0
- package/dist/supervisor.js.map +1 -0
- package/dist/token-providers.d.ts +31 -0
- package/dist/token-providers.d.ts.map +1 -0
- package/dist/token-providers.js +52 -0
- package/dist/token-providers.js.map +1 -0
- package/dist/toolSchemas.d.ts +10 -14
- package/dist/toolSchemas.d.ts.map +1 -1
- package/dist/toolSchemas.js +13 -23
- package/dist/toolSchemas.js.map +1 -1
- package/dist/triggers.d.ts +41 -0
- package/dist/triggers.d.ts.map +1 -0
- package/dist/triggers.js +50 -0
- package/dist/triggers.js.map +1 -0
- package/dist/trpc-policy.d.ts +3 -0
- package/dist/trpc-policy.d.ts.map +1 -0
- package/dist/trpc-policy.js +3 -0
- package/dist/trpc-policy.js.map +1 -0
- package/dist/type-metadata.d.ts +5 -0
- package/dist/type-metadata.d.ts.map +1 -1
- package/dist/type-metadata.js +17 -8
- package/dist/type-metadata.js.map +1 -1
- package/dist/typecheck.d.ts.map +1 -1
- package/dist/typecheck.js +5 -4
- package/dist/typecheck.js.map +1 -1
- package/dist/wasm-binary.d.ts +61 -0
- package/dist/wasm-binary.d.ts.map +1 -0
- package/dist/wasm-binary.js +215 -0
- package/dist/wasm-binary.js.map +1 -0
- package/dist/workflow-plan.d.ts +197 -0
- package/dist/workflow-plan.d.ts.map +1 -0
- package/dist/workflow-plan.js +438 -0
- package/dist/workflow-plan.js.map +1 -0
- package/dist/wrap-primitives.d.ts +0 -11
- package/dist/wrap-primitives.d.ts.map +1 -1
- package/dist/wrap-primitives.js +3 -9
- package/dist/wrap-primitives.js.map +1 -1
- package/dist/ws-commands.d.ts +665 -0
- package/dist/ws-commands.d.ts.map +1 -0
- package/dist/ws-commands.js +610 -0
- package/dist/ws-commands.js.map +1 -0
- package/dist/zod-schema.d.ts +20 -0
- package/dist/zod-schema.d.ts.map +1 -0
- package/dist/zod-schema.js +298 -0
- package/dist/zod-schema.js.map +1 -0
- package/package.json +84 -7
- package/schema/sdk-v1.asyncapi.implemented.json +65 -0
- package/schema/sdk-v1.asyncapi.json +65 -0
- package/schema/sdk-v1.discovery.schema.json +1218 -0
- package/schema/sdk-v1.execution.schema.json +2792 -0
- package/schema/sdk-v1.lifecycle.schema.json +1031 -0
- package/schema/sdk-v1.manifest.json +71 -0
- package/schema/sdk-v1.openapi.implemented.json +730 -0
- package/schema/sdk-v1.openapi.json +730 -0
- package/schema/sdk-v1.operations.json +732 -0
- package/dist/agent-protocol.d.ts +0 -217
- package/dist/agent-protocol.d.ts.map +0 -1
- package/dist/agent-protocol.js +0 -85
- package/dist/agent-protocol.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Game flow's designer contract (game-prd § 5.2).
|
|
3
|
+
*
|
|
4
|
+
* The designer writes text and nothing else: a title, a premise, the loop, the
|
|
5
|
+
* cast, and one subject line per asset slot. It places no node and starts no
|
|
6
|
+
* job, which is what makes acceptance criterion 3 assertable — the creator
|
|
7
|
+
* reads and edits the whole design before a single pixel is paid for.
|
|
8
|
+
*
|
|
9
|
+
* Three pieces, all pure:
|
|
10
|
+
*
|
|
11
|
+
* - {@link buildGameDesignSchema} pins the manifest's slot ids into the
|
|
12
|
+
* structured-output schema as enums, so a model cannot invent a slot the
|
|
13
|
+
* template has no place for;
|
|
14
|
+
* - {@link parseGameDesign} reads an answer back, fills anything the model
|
|
15
|
+
* skipped from the manifest's own prompts, and reports what it filled;
|
|
16
|
+
* - {@link GAME_INSPIRATION_CHIPS} carries one pinned design per shipped
|
|
17
|
+
* template, so a keyless install walks the whole flow and the harness has
|
|
18
|
+
* something to build against.
|
|
19
|
+
*
|
|
20
|
+
* The slot ids in the chips are written out rather than read from a template
|
|
21
|
+
* package: protocol sits below game nodes in the dependency order.
|
|
22
|
+
* `game-design.test.ts` reads the fixture manifests off disk
|
|
23
|
+
* and fails when a chip stops covering one.
|
|
24
|
+
*/
|
|
25
|
+
import { type GameDesign, type GameSetupStage } from "./api-schemas/workflows.js";
|
|
26
|
+
import type { GameAssetManifest } from "./game-assets.js";
|
|
27
|
+
export declare const GAME_DESIGN_TOOL_NAME = "game_design";
|
|
28
|
+
export declare const GAME_DESIGN_TOOL_DESCRIPTION = "The written design for one game: its premise, loop, cast, enemies and level, plus the subject of every asset the chosen template needs.";
|
|
29
|
+
export declare const GAME_DESIGNER_SYSTEM_PROMPT: string;
|
|
30
|
+
/** Slots the designer must write an enemy for: the ones the template names so. */
|
|
31
|
+
export declare const GAME_ENEMY_SLOT_PREFIX = "enemy";
|
|
32
|
+
/**
|
|
33
|
+
* The structured-output schema the designer asks for, with this template's
|
|
34
|
+
* slot ids pinned as enums.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildGameDesignSchema(manifest: GameAssetManifest): Record<string, unknown>;
|
|
37
|
+
export interface ParsedGameDesign {
|
|
38
|
+
design: GameDesign;
|
|
39
|
+
/**
|
|
40
|
+
* Slot ids the parser had to fill from the manifest, as
|
|
41
|
+
* `slot_prompts.<id>` and `cast.<id>`. The review step shows these so the
|
|
42
|
+
* creator knows which lines are the template's words and not the designer's.
|
|
43
|
+
*/
|
|
44
|
+
filled: string[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Read a designer answer into a design.
|
|
48
|
+
*
|
|
49
|
+
* Returns null when the answer is not a design shape at all, so the caller
|
|
50
|
+
* reports a refused run rather than opening an empty review.
|
|
51
|
+
*
|
|
52
|
+
* A slot the model skipped — or answered with whitespace — is filled from the
|
|
53
|
+
* manifest's own prompt, and a spritesheet slot with no cast entry gets the
|
|
54
|
+
* slot id as its name and the manifest prompt as its descriptor. Both are
|
|
55
|
+
* reported in `filled`: the flow shows placeholder text as placeholder text
|
|
56
|
+
* instead of shipping it as the designer's work. Entries for a slot id the
|
|
57
|
+
* manifest does not have are dropped — the schema pins the ids, so one only
|
|
58
|
+
* arrives from a model that ignored it, and keeping it would place a chain for
|
|
59
|
+
* a slot the export node has no input for.
|
|
60
|
+
*/
|
|
61
|
+
export declare function parseGameDesign(raw: unknown, manifest: GameAssetManifest): ParsedGameDesign | null;
|
|
62
|
+
/**
|
|
63
|
+
* What a stored design was written from, so the template step can tell "keep
|
|
64
|
+
* it" from "re-design". Mirrors the Workflow flow's plan source key: template
|
|
65
|
+
* first, then the brief, so changing either invalidates the design.
|
|
66
|
+
*/
|
|
67
|
+
export declare function designSourceOf(template: string, brief: string): string;
|
|
68
|
+
/** The stage a fresh design lands on. */
|
|
69
|
+
export declare const GAME_DESIGN_STAGE: GameSetupStage;
|
|
70
|
+
export interface GameInspirationChip {
|
|
71
|
+
id: string;
|
|
72
|
+
/** The chip's label, which is also the brief it writes. */
|
|
73
|
+
brief: string;
|
|
74
|
+
/** Manifest template id the chip picks. */
|
|
75
|
+
template: string;
|
|
76
|
+
/** The design pressing it produces with no model call. */
|
|
77
|
+
design: GameDesign;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The three starting points step 1 offers.
|
|
81
|
+
*
|
|
82
|
+
* Pinned rather than generated for the same reason the Workflow flow pins its
|
|
83
|
+
* plans: criterion 5 builds each one against the live registry and grades the
|
|
84
|
+
* graph, so a chip that stops covering its template fails there instead of in
|
|
85
|
+
* front of a creator. Pressing a chip still re-designs from the brief when a
|
|
86
|
+
* language provider is configured; the pinned design is the fallback and the
|
|
87
|
+
* thing the harness grades.
|
|
88
|
+
*/
|
|
89
|
+
export declare const GAME_INSPIRATION_CHIPS: readonly GameInspirationChip[];
|
|
90
|
+
//# sourceMappingURL=game-design.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-design.d.ts","sourceRoot":"","sources":["../src/game-design.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,kBAAkB,CAAC;AAIxE,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAEnD,eAAO,MAAM,4BAA4B,4IACkG,CAAC;AAE5I,eAAO,MAAM,2BAA2B,QAyB5B,CAAC;AAQb,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAK9C;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,iBAAiB,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsEzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,CAAC;IACnB;;;;OAIG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAKD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,iBAAiB,GAC1B,gBAAgB,GAAG,IAAI,CAwEzB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,yCAAyC;AACzC,eAAO,MAAM,iBAAiB,EAAE,cAAyB,CAAC;AAI1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,MAAM,EAAE,UAAU,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,mBAAmB,EAkNhE,CAAC"}
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Game flow's designer contract (game-prd § 5.2).
|
|
3
|
+
*
|
|
4
|
+
* The designer writes text and nothing else: a title, a premise, the loop, the
|
|
5
|
+
* cast, and one subject line per asset slot. It places no node and starts no
|
|
6
|
+
* job, which is what makes acceptance criterion 3 assertable — the creator
|
|
7
|
+
* reads and edits the whole design before a single pixel is paid for.
|
|
8
|
+
*
|
|
9
|
+
* Three pieces, all pure:
|
|
10
|
+
*
|
|
11
|
+
* - {@link buildGameDesignSchema} pins the manifest's slot ids into the
|
|
12
|
+
* structured-output schema as enums, so a model cannot invent a slot the
|
|
13
|
+
* template has no place for;
|
|
14
|
+
* - {@link parseGameDesign} reads an answer back, fills anything the model
|
|
15
|
+
* skipped from the manifest's own prompts, and reports what it filled;
|
|
16
|
+
* - {@link GAME_INSPIRATION_CHIPS} carries one pinned design per shipped
|
|
17
|
+
* template, so a keyless install walks the whole flow and the harness has
|
|
18
|
+
* something to build against.
|
|
19
|
+
*
|
|
20
|
+
* The slot ids in the chips are written out rather than read from a template
|
|
21
|
+
* package: protocol sits below game nodes in the dependency order.
|
|
22
|
+
* `game-design.test.ts` reads the fixture manifests off disk
|
|
23
|
+
* and fails when a chip stops covering one.
|
|
24
|
+
*/
|
|
25
|
+
import { isRecord, isString } from "./predicates.js";
|
|
26
|
+
import { gameDesign } from "./api-schemas/workflows.js";
|
|
27
|
+
// ── The designer's contract ─────────────────────────────────────────────────
|
|
28
|
+
export const GAME_DESIGN_TOOL_NAME = "game_design";
|
|
29
|
+
export const GAME_DESIGN_TOOL_DESCRIPTION = "The written design for one game: its premise, loop, cast, enemies and level, plus the subject of every asset the chosen template needs.";
|
|
30
|
+
export const GAME_DESIGNER_SYSTEM_PROMPT = [
|
|
31
|
+
"You design small 2D games for a native game template. You write text; you",
|
|
32
|
+
"build nothing.",
|
|
33
|
+
"",
|
|
34
|
+
"You are given the template's asset manifest — every slot it needs, that",
|
|
35
|
+
"slot's kind, its pixel cell size, and the placeholder prompt the template",
|
|
36
|
+
"ships with — and one sentence from the creator. Return a design that fits",
|
|
37
|
+
"that template exactly.",
|
|
38
|
+
"",
|
|
39
|
+
"Rules:",
|
|
40
|
+
"- One cast entry per spritesheet slot, keyed by that slot's id. A cast",
|
|
41
|
+
" descriptor is silhouette, colours and proportions — never a pose, never a",
|
|
42
|
+
" camera angle, never a style word. It is pasted into every frame of that",
|
|
43
|
+
" character's sheet, so it has to hold across all of them.",
|
|
44
|
+
"- One enemy entry per slot whose id starts with `enemy`, naming what it does",
|
|
45
|
+
" in the loop, not what it looks like.",
|
|
46
|
+
"- One prompt per slot in the manifest, keyed by the slot id.",
|
|
47
|
+
"- A slot prompt is the SUBJECT ONLY. No style words, no palette, no pixel",
|
|
48
|
+
" size, no frame counts, no words like `sprite sheet`, `tileset` or",
|
|
49
|
+
" `seamless`. The graph adds all of that from the slot spec and the chosen",
|
|
50
|
+
" style. A prompt that carries its own style fights the style the creator",
|
|
51
|
+
" picked and the game stops reading as one game.",
|
|
52
|
+
"- Keep the premise to two or three sentences and the core loop to what the",
|
|
53
|
+
" player does every ten seconds.",
|
|
54
|
+
"- Win and lose are one line each."
|
|
55
|
+
].join("\n");
|
|
56
|
+
const slotIdsOf = (manifest) => manifest.slots.map((slot) => slot.id);
|
|
57
|
+
const spritesheetSlotsOf = (manifest) => manifest.slots.filter((slot) => slot.kind === "spritesheet");
|
|
58
|
+
/** Slots the designer must write an enemy for: the ones the template names so. */
|
|
59
|
+
export const GAME_ENEMY_SLOT_PREFIX = "enemy";
|
|
60
|
+
const enemySlotsOf = (manifest) => manifest.slots.filter((slot) => slot.id.startsWith(GAME_ENEMY_SLOT_PREFIX));
|
|
61
|
+
/**
|
|
62
|
+
* The structured-output schema the designer asks for, with this template's
|
|
63
|
+
* slot ids pinned as enums.
|
|
64
|
+
*/
|
|
65
|
+
export function buildGameDesignSchema(manifest) {
|
|
66
|
+
const slotIds = slotIdsOf(manifest);
|
|
67
|
+
const castIds = spritesheetSlotsOf(manifest).map((slot) => slot.id);
|
|
68
|
+
const enemyIds = enemySlotsOf(manifest).map((slot) => slot.id);
|
|
69
|
+
return {
|
|
70
|
+
type: "object",
|
|
71
|
+
additionalProperties: false,
|
|
72
|
+
required: [
|
|
73
|
+
"title",
|
|
74
|
+
"premise",
|
|
75
|
+
"core_loop",
|
|
76
|
+
"player_verbs",
|
|
77
|
+
"enemies",
|
|
78
|
+
"level",
|
|
79
|
+
"win",
|
|
80
|
+
"lose",
|
|
81
|
+
"cast",
|
|
82
|
+
"slot_prompts"
|
|
83
|
+
],
|
|
84
|
+
properties: {
|
|
85
|
+
title: { type: "string" },
|
|
86
|
+
premise: { type: "string" },
|
|
87
|
+
core_loop: { type: "string" },
|
|
88
|
+
player_verbs: { type: "array", items: { type: "string" } },
|
|
89
|
+
enemies: {
|
|
90
|
+
type: "array",
|
|
91
|
+
minItems: enemyIds.length,
|
|
92
|
+
items: {
|
|
93
|
+
type: "object",
|
|
94
|
+
additionalProperties: false,
|
|
95
|
+
required: ["slot_id", "name", "behaviour"],
|
|
96
|
+
properties: {
|
|
97
|
+
slot_id: { type: "string", enum: enemyIds },
|
|
98
|
+
name: { type: "string" },
|
|
99
|
+
behaviour: { type: "string" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
level: { type: "string" },
|
|
104
|
+
win: { type: "string" },
|
|
105
|
+
lose: { type: "string" },
|
|
106
|
+
cast: {
|
|
107
|
+
type: "array",
|
|
108
|
+
minItems: castIds.length,
|
|
109
|
+
items: {
|
|
110
|
+
type: "object",
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
required: ["slot_id", "name", "descriptor"],
|
|
113
|
+
properties: {
|
|
114
|
+
slot_id: { type: "string", enum: castIds },
|
|
115
|
+
name: { type: "string" },
|
|
116
|
+
descriptor: { type: "string" }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
slot_prompts: {
|
|
121
|
+
type: "array",
|
|
122
|
+
minItems: slotIds.length,
|
|
123
|
+
items: {
|
|
124
|
+
type: "object",
|
|
125
|
+
additionalProperties: false,
|
|
126
|
+
required: ["slot_id", "prompt"],
|
|
127
|
+
properties: {
|
|
128
|
+
slot_id: { type: "string", enum: slotIds },
|
|
129
|
+
prompt: { type: "string" }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
const nonEmpty = (value) => isString(value) && value.trim().length > 0 ? value : null;
|
|
137
|
+
/**
|
|
138
|
+
* Read a designer answer into a design.
|
|
139
|
+
*
|
|
140
|
+
* Returns null when the answer is not a design shape at all, so the caller
|
|
141
|
+
* reports a refused run rather than opening an empty review.
|
|
142
|
+
*
|
|
143
|
+
* A slot the model skipped — or answered with whitespace — is filled from the
|
|
144
|
+
* manifest's own prompt, and a spritesheet slot with no cast entry gets the
|
|
145
|
+
* slot id as its name and the manifest prompt as its descriptor. Both are
|
|
146
|
+
* reported in `filled`: the flow shows placeholder text as placeholder text
|
|
147
|
+
* instead of shipping it as the designer's work. Entries for a slot id the
|
|
148
|
+
* manifest does not have are dropped — the schema pins the ids, so one only
|
|
149
|
+
* arrives from a model that ignored it, and keeping it would place a chain for
|
|
150
|
+
* a slot the export node has no input for.
|
|
151
|
+
*/
|
|
152
|
+
export function parseGameDesign(raw, manifest) {
|
|
153
|
+
if (!isRecord(raw)) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const known = new Map(manifest.slots.map((slot) => [slot.id, slot]));
|
|
157
|
+
const filled = [];
|
|
158
|
+
const rawPrompts = Array.isArray(raw["slot_prompts"]) ? raw["slot_prompts"] : [];
|
|
159
|
+
const prompts = new Map();
|
|
160
|
+
for (const entry of rawPrompts) {
|
|
161
|
+
if (!isRecord(entry)) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
const id = nonEmpty(entry["slot_id"]);
|
|
165
|
+
const prompt = nonEmpty(entry["prompt"]);
|
|
166
|
+
if (id === null || prompt === null || !known.has(id) || prompts.has(id)) {
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
prompts.set(id, prompt);
|
|
170
|
+
}
|
|
171
|
+
const rawCast = Array.isArray(raw["cast"]) ? raw["cast"] : [];
|
|
172
|
+
const cast = new Map();
|
|
173
|
+
for (const entry of rawCast) {
|
|
174
|
+
if (!isRecord(entry)) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
const id = nonEmpty(entry["slot_id"]);
|
|
178
|
+
const name = nonEmpty(entry["name"]);
|
|
179
|
+
const descriptor = nonEmpty(entry["descriptor"]);
|
|
180
|
+
if (id === null || name === null || descriptor === null) {
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
if (known.get(id)?.kind !== "spritesheet" || cast.has(id)) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
cast.set(id, { name, descriptor });
|
|
187
|
+
}
|
|
188
|
+
const rawEnemies = Array.isArray(raw["enemies"]) ? raw["enemies"] : [];
|
|
189
|
+
const enemies = rawEnemies.filter((entry) => {
|
|
190
|
+
if (!isRecord(entry)) {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
const id = nonEmpty(entry["slot_id"]);
|
|
194
|
+
return id !== null && known.has(id);
|
|
195
|
+
});
|
|
196
|
+
for (const slot of manifest.slots) {
|
|
197
|
+
const fallback = nonEmpty(slot.prompt) ?? slot.id;
|
|
198
|
+
if (!prompts.has(slot.id)) {
|
|
199
|
+
prompts.set(slot.id, fallback);
|
|
200
|
+
filled.push(`slot_prompts.${slot.id}`);
|
|
201
|
+
}
|
|
202
|
+
if (slot.kind === "spritesheet" && !cast.has(slot.id)) {
|
|
203
|
+
cast.set(slot.id, { name: slot.id, descriptor: fallback });
|
|
204
|
+
filled.push(`cast.${slot.id}`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
const parsed = gameDesign.safeParse({
|
|
208
|
+
...raw,
|
|
209
|
+
enemies,
|
|
210
|
+
cast: manifest.slots
|
|
211
|
+
.filter((slot) => cast.has(slot.id))
|
|
212
|
+
.map((slot) => ({ slot_id: slot.id, ...cast.get(slot.id) })),
|
|
213
|
+
slot_prompts: manifest.slots.map((slot) => ({
|
|
214
|
+
slot_id: slot.id,
|
|
215
|
+
prompt: prompts.get(slot.id)
|
|
216
|
+
}))
|
|
217
|
+
});
|
|
218
|
+
return parsed.success ? { design: parsed.data, filled } : null;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* What a stored design was written from, so the template step can tell "keep
|
|
222
|
+
* it" from "re-design". Mirrors the Workflow flow's plan source key: template
|
|
223
|
+
* first, then the brief, so changing either invalidates the design.
|
|
224
|
+
*/
|
|
225
|
+
export function designSourceOf(template, brief) {
|
|
226
|
+
return `${template}\n${brief}`;
|
|
227
|
+
}
|
|
228
|
+
/** The stage a fresh design lands on. */
|
|
229
|
+
export const GAME_DESIGN_STAGE = "review";
|
|
230
|
+
/**
|
|
231
|
+
* The three starting points step 1 offers.
|
|
232
|
+
*
|
|
233
|
+
* Pinned rather than generated for the same reason the Workflow flow pins its
|
|
234
|
+
* plans: criterion 5 builds each one against the live registry and grades the
|
|
235
|
+
* graph, so a chip that stops covering its template fails there instead of in
|
|
236
|
+
* front of a creator. Pressing a chip still re-designs from the brief when a
|
|
237
|
+
* language provider is configured; the pinned design is the fallback and the
|
|
238
|
+
* thing the harness grades.
|
|
239
|
+
*/
|
|
240
|
+
export const GAME_INSPIRATION_CHIPS = [
|
|
241
|
+
{
|
|
242
|
+
id: "fox-platformer",
|
|
243
|
+
brief: "A fox platformer through an autumn forest",
|
|
244
|
+
template: "platformer",
|
|
245
|
+
design: {
|
|
246
|
+
title: "Ember Run",
|
|
247
|
+
premise: "A young fox wakes to find the forest's last warm wind dying out and the leaves already going grey. She runs east along the ridge to reach the ember tree before the cold does. The forest floor is waking up too, and not everything on it wants her to get there.",
|
|
248
|
+
core_loop: "Run right along broken platforms, jump the gaps, and stomp or dodge the beetles patrolling them; a missed jump costs height and a hit costs a life, so the player is always trading speed for a safe landing.",
|
|
249
|
+
player_verbs: ["run", "jump", "stomp", "fall"],
|
|
250
|
+
enemies: [
|
|
251
|
+
{
|
|
252
|
+
slot_id: "enemy.walker",
|
|
253
|
+
name: "Husk beetle",
|
|
254
|
+
behaviour: "Walks a fixed platform back and forth at half the fox's speed, turning at the edge. Harmless from above, damaging from the side, so it forces the player to commit to a jump rather than run through."
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
level: "A ridge in three beats. The first stretch is unbroken grass-topped ground so the player learns the run and the jump. The second breaks into floating platforms two and three tiles wide with a beetle on the widest of them. The third narrows to single tiles over a drop, with the ember tree lit on the far right against the distant hills.",
|
|
258
|
+
win: "Reach the ember tree at the right edge of the ridge.",
|
|
259
|
+
lose: "Take three hits, or fall off the bottom of the screen.",
|
|
260
|
+
cast: [
|
|
261
|
+
{
|
|
262
|
+
slot_id: "player",
|
|
263
|
+
name: "Ember",
|
|
264
|
+
descriptor: "A slim young fox, rust-orange with a cream chest and a black-tipped tail longer than her body, small rounded ears, a short grey scarf, standing about three heads tall."
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
slot_id: "enemy.walker",
|
|
268
|
+
name: "Husk beetle",
|
|
269
|
+
descriptor: "A squat beetle the width of the fox and half her height, dark brown shell split down the middle, six stubby legs, two short antennae, a band of dry leaf-yellow across the back."
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
slot_prompts: [
|
|
273
|
+
{
|
|
274
|
+
slot_id: "player",
|
|
275
|
+
prompt: "Ember the fox seen from the side facing right: standing and breathing, running at full stride, leaping with her tail streamed behind her, and recoiling from a hit."
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
slot_id: "enemy.walker",
|
|
279
|
+
prompt: "A husk beetle seen from the side facing left: crawling forward on its six legs, then flipped onto its back with its legs curling in."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
slot_id: "tiles.ground",
|
|
283
|
+
prompt: "Autumn forest ground: grass-topped soil with fallen orange leaves on the surface, packed dirt with small stones underneath, left and right edge pieces, and inner and outer corners."
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
slot_id: "bg.far",
|
|
287
|
+
prompt: "The far ridge behind the level: rows of bare and half-turned trees fading into blue haze, a low sun behind them, an empty amber sky."
|
|
288
|
+
},
|
|
289
|
+
{ slot_id: "sfx.jump", prompt: "A soft quick hop off leaf litter." },
|
|
290
|
+
{ slot_id: "sfx.hurt", prompt: "A short startled animal yelp." },
|
|
291
|
+
{
|
|
292
|
+
slot_id: "music.level",
|
|
293
|
+
prompt: "A warm autumn woodland theme on plucked strings and a light hand drum, wistful but moving forward at a walking pace."
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
slot_id: "title",
|
|
297
|
+
prompt: "Ember the fox standing on the ridge at sunset looking east toward a single glowing tree, leaves in the air around her."
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
id: "slime-dungeon",
|
|
304
|
+
brief: "A top-down dungeon crawl with slimes and a locked door",
|
|
305
|
+
template: "topdown",
|
|
306
|
+
design: {
|
|
307
|
+
title: "The Green Key",
|
|
308
|
+
premise: "A cellar under an abandoned chapel has flooded with something that moves. A lamp-carrying scavenger goes down for the iron key her sister left behind, and finds the slimes have swallowed it. She has to get it out of one of them.",
|
|
309
|
+
core_loop: "Walk room to room, pull slimes into open floor where they can be circled, and strike them one at a time; every hit taken is a step back toward the entrance, so the player is choosing between clearing a room and slipping past it.",
|
|
310
|
+
player_verbs: ["walk", "strike", "dodge", "unlock"],
|
|
311
|
+
enemies: [
|
|
312
|
+
{
|
|
313
|
+
slot_id: "enemy.chaser",
|
|
314
|
+
name: "Cellar slime",
|
|
315
|
+
behaviour: "Sits still until the player crosses its room, then follows in a straight line at slightly under walking speed, never turning back. Two of them in one corridor pin the player against a wall, which is what makes the open rooms worth fighting in."
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
level: "Four rooms around a central corridor. The first is empty and lit, teaching the walk. The two side rooms each hold two slimes on open floor, and the western one drops the key. The northern room is the locked door: a heavy iron door in a wall of dressed stone that opens only once the key is carried to it.",
|
|
319
|
+
win: "Carry the iron key to the locked door in the north room.",
|
|
320
|
+
lose: "Take four hits before the door is open.",
|
|
321
|
+
cast: [
|
|
322
|
+
{
|
|
323
|
+
slot_id: "player",
|
|
324
|
+
name: "Wren",
|
|
325
|
+
descriptor: "A short wiry woman in a dark green hooded cloak over a grey tunic, a small lit oil lamp in her left hand and a short knife in her right, brown boots, pale face barely visible under the hood."
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
slot_id: "enemy.chaser",
|
|
329
|
+
name: "Cellar slime",
|
|
330
|
+
descriptor: "A rounded blob two thirds of Wren's height, translucent moss green with a darker green core, a wet highlight on the upper left, no limbs and no face beyond two small dark eye dots."
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
slot_prompts: [
|
|
334
|
+
{
|
|
335
|
+
slot_id: "player",
|
|
336
|
+
prompt: "Wren seen from a top-down three-quarter angle facing toward the viewer: standing with her lamp raised, walking forward, and flinching back with the lamp swinging."
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
slot_id: "enemy.chaser",
|
|
340
|
+
prompt: "A cellar slime seen from a top-down three-quarter angle: squashing and stretching as it hauls itself forward, then collapsing into a flat spreading puddle."
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
slot_id: "tiles.floor",
|
|
344
|
+
prompt: "A chapel cellar: four worn flagstone floor variants, one with a drain and one with moss, then dressed stone wall faces seen from above, wall edges, and inner and outer wall corners."
|
|
345
|
+
},
|
|
346
|
+
{ slot_id: "sfx.hit", prompt: "A wet slap against cloth." },
|
|
347
|
+
{ slot_id: "sfx.step", prompt: "A single boot step on damp stone." },
|
|
348
|
+
{
|
|
349
|
+
slot_id: "music.level",
|
|
350
|
+
prompt: "A slow, low dungeon theme on bowed strings and a distant dripping pulse, tense and patient, no melody in the foreground."
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
slot_id: "title",
|
|
354
|
+
prompt: "Wren at the bottom of a cellar stair, lamp held up, green shapes waiting at the edge of the light, an iron door behind them."
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
id: "neon-shmup",
|
|
361
|
+
brief: "A neon shoot-em-up over a rain-soaked city",
|
|
362
|
+
template: "shmup",
|
|
363
|
+
design: {
|
|
364
|
+
title: "Downpour",
|
|
365
|
+
premise: "The rain over the city has not stopped in nine years and the drone swarms use it for cover. One interceptor flies low over the towers, under the cloud deck, to cut a corridor through them before the night shift launches.",
|
|
366
|
+
core_loop: "Fly up the scrolling city holding fire, weave between drone streams, and read each wave's opening before it closes; every drone destroyed thins the next wave, so hesitating costs more than shooting.",
|
|
367
|
+
player_verbs: ["fly", "bank", "shoot", "dodge"],
|
|
368
|
+
enemies: [
|
|
369
|
+
{
|
|
370
|
+
slot_id: "enemy.drone",
|
|
371
|
+
name: "Wasp drone",
|
|
372
|
+
behaviour: "Drops in from the top edge in a shallow arc, fires once as it crosses the player's column, and keeps going off the bottom. Waves overlap so their arcs cross, which is what closes the gap the player is aiming for."
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
level: "A single vertical run over the city, opening on low warehouse roofs with two thin drone waves. It builds through the tower district where the waves cross, and ends over the flooded canal at the north edge with a dense final wave lit from below by the water.",
|
|
376
|
+
win: "Survive the run to the canal at the north edge of the city.",
|
|
377
|
+
lose: "Take three hits from a drone or its shot.",
|
|
378
|
+
cast: [
|
|
379
|
+
{
|
|
380
|
+
slot_id: "player",
|
|
381
|
+
name: "Interceptor",
|
|
382
|
+
descriptor: "A narrow single-seat craft with swept-back wings, gunmetal grey plating, a magenta glow strip down each wing edge and a cyan engine flare at the tail, canopy tinted dark, nose slightly longer than the body."
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
slot_id: "enemy.drone",
|
|
386
|
+
name: "Wasp drone",
|
|
387
|
+
descriptor: "A small four-rotor drone half the interceptor's width, matte black frame with a single amber eye at the front, thin yellow warning stripes along the arms, no canopy."
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
slot_prompts: [
|
|
391
|
+
{
|
|
392
|
+
slot_id: "player",
|
|
393
|
+
prompt: "The interceptor seen from directly above with its nose pointing up: flying level, tipped hard to the left, and tipped hard to the right."
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
slot_id: "enemy.drone",
|
|
397
|
+
prompt: "A wasp drone seen from directly above with its nose pointing down: rotors spinning as it descends, then breaking apart into fragments and sparks."
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
slot_id: "bg.space",
|
|
401
|
+
prompt: "The city from directly above at night in heavy rain: tower roofs and lit streets in a grid, wet reflections in magenta and cyan, low cloud drifting over it."
|
|
402
|
+
},
|
|
403
|
+
{ slot_id: "sfx.shoot", prompt: "A tight electric pulse shot." },
|
|
404
|
+
{ slot_id: "sfx.explode", prompt: "A small hard burst with a metallic rattle." },
|
|
405
|
+
{
|
|
406
|
+
slot_id: "music.level",
|
|
407
|
+
prompt: "A driving synthwave chase theme with an arpeggiated bass, a four-on-the-floor kick and a high lead over it, urgent throughout."
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
slot_id: "title",
|
|
411
|
+
prompt: "The interceptor climbing between two neon-lit towers in the rain, drone silhouettes above it against the cloud deck."
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
];
|
|
417
|
+
//# sourceMappingURL=game-design.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-design.js","sourceRoot":"","sources":["../src/game-design.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,UAAU,EAGX,MAAM,4BAA4B,CAAC;AAGpC,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAEnD,MAAM,CAAC,MAAM,4BAA4B,GACvC,yIAAyI,CAAC;AAE5I,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,2EAA2E;IAC3E,gBAAgB;IAChB,EAAE;IACF,yEAAyE;IACzE,2EAA2E;IAC3E,2EAA2E;IAC3E,wBAAwB;IACxB,EAAE;IACF,QAAQ;IACR,wEAAwE;IACxE,6EAA6E;IAC7E,2EAA2E;IAC3E,4DAA4D;IAC5D,8EAA8E;IAC9E,wCAAwC;IACxC,8DAA8D;IAC9D,2EAA2E;IAC3E,qEAAqE;IACrE,4EAA4E;IAC5E,2EAA2E;IAC3E,kDAAkD;IAClD,4EAA4E;IAC5E,kCAAkC;IAClC,mCAAmC;CACpC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,SAAS,GAAG,CAAC,QAA2B,EAAY,EAAE,CAC1D,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAExC,MAAM,kBAAkB,GAAG,CAAC,QAA2B,EAAkB,EAAE,CACzE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC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AAY;oBAClB,UAAU,EACR,uKAAuK;iBAC1K;aACF;YACD,YAAY,EAAE;gBACZ;oBACE,OAAO,EAAE,QAAQ;oBACjB,MAAM,EACJ,0IAA0I;iBAC7I;gBACD;oBACE,OAAO,EAAE,aAAa;oBACtB,MAAM,EACJ,mJAAmJ;iBACtJ;gBACD;oBACE,OAAO,EAAE,UAAU;oBACnB,MAAM,EACJ,8JAA8J;iBACjK;gBACD,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,8BAA8B,EAAE;gBAChE,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,4CAA4C,EAAE;gBAChF;oBACE,OAAO,EAAE,aAAa;oBACtB,MAAM,EACJ,gIAAgI;iBACnI;gBACD;oBACE,OAAO,EAAE,OAAO;oBAChB,MAAM,EACJ,sHAAsH;iBACzH;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One asset slot → one generator prompt, one exact pixel size and the aspect
|
|
3
|
+
* ratio to ask for (game-prd § 5.3).
|
|
4
|
+
*
|
|
5
|
+
* The wording, the canvas and the entity block are {@link slotPrompt}'s, so a
|
|
6
|
+
* slot filled by the guided flow and one filled by the `nodetool.game.SlotPrompt`
|
|
7
|
+
* node read the same. What this module adds is what the flow needs and the node
|
|
8
|
+
* does not: the designer's reviewed subject in place of the template's generic
|
|
9
|
+
* one, the style preset and cast member as inline entities, and the generator's
|
|
10
|
+
* aspect ratio — the closest of `nodetool.image.TextToImage`'s own list, so the
|
|
11
|
+
* resize step only scales and never crops.
|
|
12
|
+
*
|
|
13
|
+
* Pure, so the browser flow's preview and the graph builder read the same string.
|
|
14
|
+
*/
|
|
15
|
+
import type { GameSlotSpec } from "./game-assets.js";
|
|
16
|
+
/**
|
|
17
|
+
* The aspect ratios `nodetool.image.TextToImage` accepts, in its own order.
|
|
18
|
+
*
|
|
19
|
+
* Duplicated rather than imported: `@nodetool-ai/protocol` sits below
|
|
20
|
+
* `@nodetool-ai/image-nodes` in the package graph. `game-flow-prompt.test.ts`
|
|
21
|
+
* reads the node's source and fails when the two lists drift.
|
|
22
|
+
*/
|
|
23
|
+
export declare const GAME_IMAGE_ASPECT_RATIOS: Readonly<Record<string, number>>;
|
|
24
|
+
/**
|
|
25
|
+
* The aspect ratio the generator is asked for: the closest of the node's own
|
|
26
|
+
* list to the slot's real shape. Distance is measured in log space — 21:9 is as
|
|
27
|
+
* far from 16:9 as 9:21 is from 9:16 — and the first entry wins a tie, which
|
|
28
|
+
* keeps the answer stable when the table gains a ratio.
|
|
29
|
+
*/
|
|
30
|
+
export declare function closestGameAspectRatio(width: number, height: number): string;
|
|
31
|
+
/** The style the whole game reads in. Its descriptor is pasted verbatim. */
|
|
32
|
+
export interface GameStyleChoice {
|
|
33
|
+
name?: string;
|
|
34
|
+
descriptor: string;
|
|
35
|
+
}
|
|
36
|
+
/** One cast member, as the design stores it. */
|
|
37
|
+
export interface GameCastEntry {
|
|
38
|
+
slot_id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
descriptor: string;
|
|
41
|
+
}
|
|
42
|
+
export interface GameSlotPromptResult {
|
|
43
|
+
/** The whole prompt the generator node gets. */
|
|
44
|
+
prompt: string;
|
|
45
|
+
/**
|
|
46
|
+
* Exact pixel size the checker will demand. Absent for `sfx` and `music`,
|
|
47
|
+
* which have no size — a caller that wires a resize node must skip them.
|
|
48
|
+
*/
|
|
49
|
+
width?: number;
|
|
50
|
+
height?: number;
|
|
51
|
+
/** The generator's aspect ratio. Absent for `sfx` and `music`. */
|
|
52
|
+
aspectRatio?: string;
|
|
53
|
+
/** Sheet grid, for the kinds that have one. */
|
|
54
|
+
columns?: number;
|
|
55
|
+
rows?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Build the generator prompt and target size for one slot.
|
|
59
|
+
*
|
|
60
|
+
* `subject` is the reviewed slot prompt from the design; it replaces the
|
|
61
|
+
* template's own generic subject, and an empty one leaves the template's.
|
|
62
|
+
* `style` is the chosen preset; its descriptor is pasted verbatim so every
|
|
63
|
+
* asset of a game reads as one game. `cast` is the whole cast — only the
|
|
64
|
+
* member whose `slot_id` matches this slot is injected, so a two-character
|
|
65
|
+
* sheet never inherits the other character's colours.
|
|
66
|
+
*/
|
|
67
|
+
export declare function gameSlotPrompt(slot: GameSlotSpec, subject: string, style: GameStyleChoice | null, cast: readonly GameCastEntry[]): GameSlotPromptResult;
|
|
68
|
+
//# sourceMappingURL=game-flow-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-flow-prompt.d.ts","sourceRoot":"","sources":["../src/game-flow-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAarE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAY5E;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAiBD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,eAAe,GAAG,IAAI,EAC7B,IAAI,EAAE,SAAS,aAAa,EAAE,GAC7B,oBAAoB,CA4CtB"}
|