@owlmeans/viable-common 0.0.4
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 +68 -0
- package/agent-meta/manifest.json +16 -0
- package/agent-meta/skills/viable-common/SKILL.md +179 -0
- package/build/agent/index.d.ts +4 -0
- package/build/agent/index.d.ts.map +1 -0
- package/build/agent/index.js +3 -0
- package/build/agent/index.js.map +1 -0
- package/build/agent/memory.d.ts +12 -0
- package/build/agent/memory.d.ts.map +1 -0
- package/build/agent/memory.js +11 -0
- package/build/agent/memory.js.map +1 -0
- package/build/agent/spectator/consts.d.ts +9 -0
- package/build/agent/spectator/consts.d.ts.map +1 -0
- package/build/agent/spectator/consts.js +10 -0
- package/build/agent/spectator/consts.js.map +1 -0
- package/build/agent/spectator/index.d.ts +3 -0
- package/build/agent/spectator/index.d.ts.map +1 -0
- package/build/agent/spectator/index.js +2 -0
- package/build/agent/spectator/index.js.map +1 -0
- package/build/agent/spectator/types.d.ts +13 -0
- package/build/agent/spectator/types.d.ts.map +1 -0
- package/build/agent/spectator/types.js +2 -0
- package/build/agent/spectator/types.js.map +1 -0
- package/build/agent/types.d.ts +10 -0
- package/build/agent/types.d.ts.map +1 -0
- package/build/agent/types.js +2 -0
- package/build/agent/types.js.map +1 -0
- package/build/areas/consts.d.ts +88 -0
- package/build/areas/consts.d.ts.map +1 -0
- package/build/areas/consts.js +106 -0
- package/build/areas/consts.js.map +1 -0
- package/build/areas/index.d.ts +3 -0
- package/build/areas/index.d.ts.map +1 -0
- package/build/areas/index.js +2 -0
- package/build/areas/index.js.map +1 -0
- package/build/areas/types.d.ts +28 -0
- package/build/areas/types.d.ts.map +1 -0
- package/build/areas/types.js +2 -0
- package/build/areas/types.js.map +1 -0
- package/build/ba/consts.d.ts +38 -0
- package/build/ba/consts.d.ts.map +1 -0
- package/build/ba/consts.js +41 -0
- package/build/ba/consts.js.map +1 -0
- package/build/ba/helpers.d.ts +41 -0
- package/build/ba/helpers.d.ts.map +1 -0
- package/build/ba/helpers.js +79 -0
- package/build/ba/helpers.js.map +1 -0
- package/build/ba/index.d.ts +5 -0
- package/build/ba/index.d.ts.map +1 -0
- package/build/ba/index.js +4 -0
- package/build/ba/index.js.map +1 -0
- package/build/ba/schemas.d.ts +13 -0
- package/build/ba/schemas.d.ts.map +1 -0
- package/build/ba/schemas.js +181 -0
- package/build/ba/schemas.js.map +1 -0
- package/build/ba/types.d.ts +113 -0
- package/build/ba/types.d.ts.map +1 -0
- package/build/ba/types.js +2 -0
- package/build/ba/types.js.map +1 -0
- package/build/blueprint/case.d.ts +73 -0
- package/build/blueprint/case.d.ts.map +1 -0
- package/build/blueprint/case.js +244 -0
- package/build/blueprint/case.js.map +1 -0
- package/build/blueprint/consts.d.ts +11 -0
- package/build/blueprint/consts.d.ts.map +1 -0
- package/build/blueprint/consts.js +11 -0
- package/build/blueprint/consts.js.map +1 -0
- package/build/blueprint/index.d.ts +6 -0
- package/build/blueprint/index.d.ts.map +1 -0
- package/build/blueprint/index.js +6 -0
- package/build/blueprint/index.js.map +1 -0
- package/build/blueprint/resolve.d.ts +51 -0
- package/build/blueprint/resolve.d.ts.map +1 -0
- package/build/blueprint/resolve.js +108 -0
- package/build/blueprint/resolve.js.map +1 -0
- package/build/blueprint/schemas.d.ts +41 -0
- package/build/blueprint/schemas.d.ts.map +1 -0
- package/build/blueprint/schemas.js +27 -0
- package/build/blueprint/schemas.js.map +1 -0
- package/build/blueprint/types.d.ts +186 -0
- package/build/blueprint/types.d.ts.map +1 -0
- package/build/blueprint/types.js +32 -0
- package/build/blueprint/types.js.map +1 -0
- package/build/branding.d.ts +19 -0
- package/build/branding.d.ts.map +1 -0
- package/build/branding.js +32 -0
- package/build/branding.js.map +1 -0
- package/build/connect/consts.d.ts +378 -0
- package/build/connect/consts.d.ts.map +1 -0
- package/build/connect/consts.js +425 -0
- package/build/connect/consts.js.map +1 -0
- package/build/connect/entrypoints.d.ts +41 -0
- package/build/connect/entrypoints.d.ts.map +1 -0
- package/build/connect/entrypoints.js +141 -0
- package/build/connect/entrypoints.js.map +1 -0
- package/build/connect/errors.d.ts +50 -0
- package/build/connect/errors.d.ts.map +1 -0
- package/build/connect/errors.js +77 -0
- package/build/connect/errors.js.map +1 -0
- package/build/connect/index.d.ts +8 -0
- package/build/connect/index.d.ts.map +1 -0
- package/build/connect/index.js +6 -0
- package/build/connect/index.js.map +1 -0
- package/build/connect/ops.d.ts +192 -0
- package/build/connect/ops.d.ts.map +1 -0
- package/build/connect/ops.js +2 -0
- package/build/connect/ops.js.map +1 -0
- package/build/connect/references.d.ts +194 -0
- package/build/connect/references.d.ts.map +1 -0
- package/build/connect/references.js +62 -0
- package/build/connect/references.js.map +1 -0
- package/build/connect/schemas.d.ts +59 -0
- package/build/connect/schemas.d.ts.map +1 -0
- package/build/connect/schemas.js +346 -0
- package/build/connect/schemas.js.map +1 -0
- package/build/connect/types.d.ts +428 -0
- package/build/connect/types.d.ts.map +1 -0
- package/build/connect/types.js +2 -0
- package/build/connect/types.js.map +1 -0
- package/build/consts.d.ts +9 -0
- package/build/consts.d.ts.map +1 -0
- package/build/consts.js +31 -0
- package/build/consts.js.map +1 -0
- package/build/convert/consts.d.ts +539 -0
- package/build/convert/consts.d.ts.map +1 -0
- package/build/convert/consts.js +630 -0
- package/build/convert/consts.js.map +1 -0
- package/build/convert/helpers.d.ts +91 -0
- package/build/convert/helpers.d.ts.map +1 -0
- package/build/convert/helpers.js +301 -0
- package/build/convert/helpers.js.map +1 -0
- package/build/convert/index.d.ts +11 -0
- package/build/convert/index.d.ts.map +1 -0
- package/build/convert/index.js +4 -0
- package/build/convert/index.js.map +1 -0
- package/build/convert/schemas.d.ts +62 -0
- package/build/convert/schemas.d.ts.map +1 -0
- package/build/convert/schemas.js +626 -0
- package/build/convert/schemas.js.map +1 -0
- package/build/convert/types.d.ts +683 -0
- package/build/convert/types.d.ts.map +1 -0
- package/build/convert/types.js +2 -0
- package/build/convert/types.js.map +1 -0
- package/build/design/consts.d.ts +25 -0
- package/build/design/consts.d.ts.map +1 -0
- package/build/design/consts.js +26 -0
- package/build/design/consts.js.map +1 -0
- package/build/design/helpers.d.ts +60 -0
- package/build/design/helpers.d.ts.map +1 -0
- package/build/design/helpers.js +221 -0
- package/build/design/helpers.js.map +1 -0
- package/build/design/index.d.ts +6 -0
- package/build/design/index.d.ts.map +1 -0
- package/build/design/index.js +5 -0
- package/build/design/index.js.map +1 -0
- package/build/design/runtime.d.ts +126 -0
- package/build/design/runtime.d.ts.map +1 -0
- package/build/design/runtime.js +65 -0
- package/build/design/runtime.js.map +1 -0
- package/build/design/schemas.d.ts +21 -0
- package/build/design/schemas.d.ts.map +1 -0
- package/build/design/schemas.js +369 -0
- package/build/design/schemas.js.map +1 -0
- package/build/design/types.d.ts +199 -0
- package/build/design/types.d.ts.map +1 -0
- package/build/design/types.js +2 -0
- package/build/design/types.js.map +1 -0
- package/build/dev/consts.d.ts +32 -0
- package/build/dev/consts.d.ts.map +1 -0
- package/build/dev/consts.js +33 -0
- package/build/dev/consts.js.map +1 -0
- package/build/dev/index.d.ts +4 -0
- package/build/dev/index.d.ts.map +1 -0
- package/build/dev/index.js +3 -0
- package/build/dev/index.js.map +1 -0
- package/build/dev/schemas.d.ts +15 -0
- package/build/dev/schemas.d.ts.map +1 -0
- package/build/dev/schemas.js +116 -0
- package/build/dev/schemas.js.map +1 -0
- package/build/dev/types.d.ts +42 -0
- package/build/dev/types.d.ts.map +1 -0
- package/build/dev/types.js +2 -0
- package/build/dev/types.js.map +1 -0
- package/build/execution/consts.d.ts +36 -0
- package/build/execution/consts.d.ts.map +1 -0
- package/build/execution/consts.js +37 -0
- package/build/execution/consts.js.map +1 -0
- package/build/execution/index.d.ts +3 -0
- package/build/execution/index.d.ts.map +1 -0
- package/build/execution/index.js +2 -0
- package/build/execution/index.js.map +1 -0
- package/build/execution/types.d.ts +50 -0
- package/build/execution/types.d.ts.map +1 -0
- package/build/execution/types.js +2 -0
- package/build/execution/types.js.map +1 -0
- package/build/index.d.ts +22 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +21 -0
- package/build/index.js.map +1 -0
- package/build/integrity/consts.d.ts +226 -0
- package/build/integrity/consts.d.ts.map +1 -0
- package/build/integrity/consts.js +401 -0
- package/build/integrity/consts.js.map +1 -0
- package/build/integrity/index.d.ts +4 -0
- package/build/integrity/index.d.ts.map +1 -0
- package/build/integrity/index.js +3 -0
- package/build/integrity/index.js.map +1 -0
- package/build/integrity/types.d.ts +35 -0
- package/build/integrity/types.d.ts.map +1 -0
- package/build/integrity/types.js +2 -0
- package/build/integrity/types.js.map +1 -0
- package/build/integrity/verify.d.ts +23 -0
- package/build/integrity/verify.d.ts.map +1 -0
- package/build/integrity/verify.js +198 -0
- package/build/integrity/verify.js.map +1 -0
- package/build/metadata/consts.d.ts +101 -0
- package/build/metadata/consts.d.ts.map +1 -0
- package/build/metadata/consts.js +104 -0
- package/build/metadata/consts.js.map +1 -0
- package/build/metadata/index.d.ts +3 -0
- package/build/metadata/index.d.ts.map +1 -0
- package/build/metadata/index.js +3 -0
- package/build/metadata/index.js.map +1 -0
- package/build/metadata/types.d.ts +286 -0
- package/build/metadata/types.d.ts.map +1 -0
- package/build/metadata/types.js +39 -0
- package/build/metadata/types.js.map +1 -0
- package/build/moderation/consts.d.ts +58 -0
- package/build/moderation/consts.d.ts.map +1 -0
- package/build/moderation/consts.js +60 -0
- package/build/moderation/consts.js.map +1 -0
- package/build/moderation/index.d.ts +5 -0
- package/build/moderation/index.d.ts.map +1 -0
- package/build/moderation/index.js +4 -0
- package/build/moderation/index.js.map +1 -0
- package/build/moderation/schemas.d.ts +19 -0
- package/build/moderation/schemas.d.ts.map +1 -0
- package/build/moderation/schemas.js +26 -0
- package/build/moderation/schemas.js.map +1 -0
- package/build/moderation/types.d.ts +64 -0
- package/build/moderation/types.d.ts.map +1 -0
- package/build/moderation/types.js +2 -0
- package/build/moderation/types.js.map +1 -0
- package/build/moderation/utils.d.ts +21 -0
- package/build/moderation/utils.d.ts.map +1 -0
- package/build/moderation/utils.js +31 -0
- package/build/moderation/utils.js.map +1 -0
- package/build/preview/consts.d.ts +10 -0
- package/build/preview/consts.d.ts.map +1 -0
- package/build/preview/consts.js +11 -0
- package/build/preview/consts.js.map +1 -0
- package/build/preview/index.d.ts +3 -0
- package/build/preview/index.d.ts.map +1 -0
- package/build/preview/index.js +2 -0
- package/build/preview/index.js.map +1 -0
- package/build/preview/types.d.ts +60 -0
- package/build/preview/types.d.ts.map +1 -0
- package/build/preview/types.js +2 -0
- package/build/preview/types.js.map +1 -0
- package/build/scaffold/consts.d.ts +25 -0
- package/build/scaffold/consts.d.ts.map +1 -0
- package/build/scaffold/consts.js +26 -0
- package/build/scaffold/consts.js.map +1 -0
- package/build/scaffold/helpers.d.ts +35 -0
- package/build/scaffold/helpers.d.ts.map +1 -0
- package/build/scaffold/helpers.js +54 -0
- package/build/scaffold/helpers.js.map +1 -0
- package/build/scaffold/index.d.ts +5 -0
- package/build/scaffold/index.d.ts.map +1 -0
- package/build/scaffold/index.js +4 -0
- package/build/scaffold/index.js.map +1 -0
- package/build/scaffold/schemas.d.ts +5 -0
- package/build/scaffold/schemas.d.ts.map +1 -0
- package/build/scaffold/schemas.js +273 -0
- package/build/scaffold/schemas.js.map +1 -0
- package/build/scaffold/types.d.ts +144 -0
- package/build/scaffold/types.d.ts.map +1 -0
- package/build/scaffold/types.js +2 -0
- package/build/scaffold/types.js.map +1 -0
- package/build/skills/catalogue.d.ts +47 -0
- package/build/skills/catalogue.d.ts.map +1 -0
- package/build/skills/catalogue.js +1566 -0
- package/build/skills/catalogue.js.map +1 -0
- package/build/skills/consts.d.ts +104 -0
- package/build/skills/consts.d.ts.map +1 -0
- package/build/skills/consts.js +170 -0
- package/build/skills/consts.js.map +1 -0
- package/build/skills/index.d.ts +4 -0
- package/build/skills/index.d.ts.map +1 -0
- package/build/skills/index.js +4 -0
- package/build/skills/index.js.map +1 -0
- package/build/skills/roles.d.ts +52 -0
- package/build/skills/roles.d.ts.map +1 -0
- package/build/skills/roles.js +256 -0
- package/build/skills/roles.js.map +1 -0
- package/build/slot/consts.d.ts +305 -0
- package/build/slot/consts.d.ts.map +1 -0
- package/build/slot/consts.js +376 -0
- package/build/slot/consts.js.map +1 -0
- package/build/slot/helpers.d.ts +25 -0
- package/build/slot/helpers.d.ts.map +1 -0
- package/build/slot/helpers.js +27 -0
- package/build/slot/helpers.js.map +1 -0
- package/build/slot/index.d.ts +6 -0
- package/build/slot/index.d.ts.map +1 -0
- package/build/slot/index.js +5 -0
- package/build/slot/index.js.map +1 -0
- package/build/slot/layout.d.ts +72 -0
- package/build/slot/layout.d.ts.map +1 -0
- package/build/slot/layout.js +82 -0
- package/build/slot/layout.js.map +1 -0
- package/build/slot/schemas.d.ts +12 -0
- package/build/slot/schemas.d.ts.map +1 -0
- package/build/slot/schemas.js +43 -0
- package/build/slot/schemas.js.map +1 -0
- package/build/slot/types.d.ts +147 -0
- package/build/slot/types.d.ts.map +1 -0
- package/build/slot/types.js +2 -0
- package/build/slot/types.js.map +1 -0
- package/build/topology/card.d.ts +23 -0
- package/build/topology/card.d.ts.map +1 -0
- package/build/topology/card.js +95 -0
- package/build/topology/card.js.map +1 -0
- package/build/topology/consts.d.ts +32 -0
- package/build/topology/consts.d.ts.map +1 -0
- package/build/topology/consts.js +55 -0
- package/build/topology/consts.js.map +1 -0
- package/build/topology/helpers.d.ts +44 -0
- package/build/topology/helpers.d.ts.map +1 -0
- package/build/topology/helpers.js +112 -0
- package/build/topology/helpers.js.map +1 -0
- package/build/topology/index.d.ts +5 -0
- package/build/topology/index.d.ts.map +1 -0
- package/build/topology/index.js +4 -0
- package/build/topology/index.js.map +1 -0
- package/build/topology/types.d.ts +83 -0
- package/build/topology/types.d.ts.map +1 -0
- package/build/topology/types.js +2 -0
- package/build/topology/types.js.map +1 -0
- package/build/types.d.ts +88 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/build/ux/consts.d.ts +5 -0
- package/build/ux/consts.d.ts.map +1 -0
- package/build/ux/consts.js +6 -0
- package/build/ux/consts.js.map +1 -0
- package/build/ux/index.d.ts +4 -0
- package/build/ux/index.d.ts.map +1 -0
- package/build/ux/index.js +3 -0
- package/build/ux/index.js.map +1 -0
- package/build/ux/schemas.d.ts +8 -0
- package/build/ux/schemas.d.ts.map +1 -0
- package/build/ux/schemas.js +91 -0
- package/build/ux/schemas.js.map +1 -0
- package/build/ux/types.d.ts +21 -0
- package/build/ux/types.d.ts.map +1 -0
- package/build/ux/types.js +2 -0
- package/build/ux/types.js.map +1 -0
- package/package.json +71 -0
- package/src/agent/index.ts +4 -0
- package/src/agent/memory.ts +16 -0
- package/src/agent/spectator/consts.ts +10 -0
- package/src/agent/spectator/index.ts +3 -0
- package/src/agent/spectator/types.ts +14 -0
- package/src/agent/types.ts +10 -0
- package/src/areas/consts.ts +112 -0
- package/src/areas/index.ts +3 -0
- package/src/areas/types.ts +29 -0
- package/src/ba/consts.ts +40 -0
- package/src/ba/helpers.ts +93 -0
- package/src/ba/index.ts +5 -0
- package/src/ba/schemas.ts +196 -0
- package/src/ba/types.ts +125 -0
- package/src/blueprint/case.ts +272 -0
- package/src/blueprint/consts.ts +11 -0
- package/src/blueprint/index.ts +6 -0
- package/src/blueprint/resolve.ts +133 -0
- package/src/blueprint/schemas.ts +44 -0
- package/src/blueprint/types.ts +204 -0
- package/src/branding.ts +34 -0
- package/src/connect/consts.ts +441 -0
- package/src/connect/entrypoints.ts +291 -0
- package/src/connect/errors.ts +91 -0
- package/src/connect/index.ts +7 -0
- package/src/connect/ops.ts +208 -0
- package/src/connect/references.ts +89 -0
- package/src/connect/schemas.ts +384 -0
- package/src/connect/types.ts +456 -0
- package/src/consts.ts +34 -0
- package/src/convert/consts.ts +672 -0
- package/src/convert/helpers.ts +340 -0
- package/src/convert/index.ts +10 -0
- package/src/convert/schemas.ts +663 -0
- package/src/convert/types.ts +741 -0
- package/src/design/consts.ts +26 -0
- package/src/design/helpers.ts +255 -0
- package/src/design/index.ts +5 -0
- package/src/design/runtime.ts +142 -0
- package/src/design/schemas.ts +384 -0
- package/src/design/types.ts +191 -0
- package/src/dev/consts.ts +35 -0
- package/src/dev/index.ts +4 -0
- package/src/dev/schemas.ts +124 -0
- package/src/dev/types.ts +47 -0
- package/src/execution/consts.ts +37 -0
- package/src/execution/index.ts +3 -0
- package/src/execution/types.ts +55 -0
- package/src/index.ts +22 -0
- package/src/integrity/consts.ts +477 -0
- package/src/integrity/index.ts +3 -0
- package/src/integrity/types.ts +37 -0
- package/src/integrity/verify.ts +221 -0
- package/src/metadata/consts.ts +118 -0
- package/src/metadata/index.ts +3 -0
- package/src/metadata/types.ts +310 -0
- package/src/moderation/consts.ts +59 -0
- package/src/moderation/index.ts +4 -0
- package/src/moderation/schemas.ts +28 -0
- package/src/moderation/types.ts +68 -0
- package/src/moderation/utils.ts +35 -0
- package/src/preview/consts.ts +9 -0
- package/src/preview/index.ts +3 -0
- package/src/preview/types.ts +79 -0
- package/src/scaffold/consts.ts +26 -0
- package/src/scaffold/helpers.ts +84 -0
- package/src/scaffold/index.ts +4 -0
- package/src/scaffold/schemas.ts +283 -0
- package/src/scaffold/types.ts +118 -0
- package/src/skills/catalogue.ts +1617 -0
- package/src/skills/consts.ts +183 -0
- package/src/skills/index.ts +4 -0
- package/src/skills/roles.ts +299 -0
- package/src/slot/consts.ts +393 -0
- package/src/slot/helpers.ts +34 -0
- package/src/slot/index.ts +5 -0
- package/src/slot/layout.ts +141 -0
- package/src/slot/schemas.ts +46 -0
- package/src/slot/types.ts +164 -0
- package/src/topology/card.ts +106 -0
- package/src/topology/consts.ts +59 -0
- package/src/topology/helpers.ts +138 -0
- package/src/topology/index.ts +5 -0
- package/src/topology/types.ts +86 -0
- package/src/types.ts +104 -0
- package/src/ux/consts.ts +5 -0
- package/src/ux/index.ts +4 -0
- package/src/ux/schemas.ts +97 -0
- package/src/ux/types.ts +25 -0
- package/tests/connect-convert.spec.ts +161 -0
- package/tests/convert.spec.ts +318 -0
- package/tests/design.spec.ts +136 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { BlueprintPatch } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* WHICH KIND of product is being built on a blueprint.
|
|
4
|
+
*
|
|
5
|
+
* A blueprint says what the STACK is — the language, the framework, the topology, the seeds. A
|
|
6
|
+
* case says what is being built ON it, and that is a different question with different consumers:
|
|
7
|
+
* the analyst framing the brief, the architect deciding whether a story needs a queue, the coder
|
|
8
|
+
* choosing which packages it may import.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately NOT a second blueprint. Everything a case has to say is already a blueprint field,
|
|
11
|
+
* so a case is a PATCH and the resolution order stays base → case → per-run overrides. That is
|
|
12
|
+
* also why adding one is a data change: nothing reads `BlueprintCase` except the table below and
|
|
13
|
+
* the prompt that classifies a project into it.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum BlueprintCase {
|
|
16
|
+
/** A web application whose every feature fits inside a request. No queue, no worker, no agents. */
|
|
17
|
+
Web = "web",
|
|
18
|
+
/** A web application with work that genuinely belongs off the request path. */
|
|
19
|
+
Scalable = "scalable",
|
|
20
|
+
/** The product's value comes from ordered, deterministic model-driven steps. */
|
|
21
|
+
AiPipeline = "ai-pipeline",
|
|
22
|
+
/** The product's value comes from an agent that decides its own path through tools. */
|
|
23
|
+
AiAgent = "ai-agent",
|
|
24
|
+
/** A browser game: a three.js scene with an ordinary React interface over it. */
|
|
25
|
+
Game = "game"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* How a game is played, which decides who owns its state.
|
|
29
|
+
*
|
|
30
|
+
* Recorded beside the case rather than folded into it, because it changes nothing about the
|
|
31
|
+
* dependencies and everything about where the logic goes. `OnlineTurn` is the default for
|
|
32
|
+
* anything multiplayer unless the brief plainly asks for live play — it is the shape that
|
|
33
|
+
* actually builds, and it needs no socket, no tick loop and no reconciliation.
|
|
34
|
+
*/
|
|
35
|
+
export declare enum GameKind {
|
|
36
|
+
Casual = "casual",
|
|
37
|
+
OnlineTurn = "online-turn",
|
|
38
|
+
OnlineLive = "online-live"
|
|
39
|
+
}
|
|
40
|
+
export interface BlueprintCaseDefinition {
|
|
41
|
+
id: BlueprintCase;
|
|
42
|
+
title: string;
|
|
43
|
+
/**
|
|
44
|
+
* What this case is FOR, as the classifier prompt reads it.
|
|
45
|
+
*
|
|
46
|
+
* A pure constant, like every skill body: it lands in a cached prompt region, and one
|
|
47
|
+
* interpolated byte invalidates the prefix for every project classified after it.
|
|
48
|
+
*/
|
|
49
|
+
when: string;
|
|
50
|
+
/** Applied between the base blueprint and the run's own overrides. A case is nothing else. */
|
|
51
|
+
patch: BlueprintPatch;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The cases the platform ships.
|
|
55
|
+
*
|
|
56
|
+
* Read as a table: the left column is what a prompt has to look like, the right column is what
|
|
57
|
+
* that costs the generated application. Nothing here turns a capability on without also
|
|
58
|
+
* installing what makes it real — a blueprint that promises `agents` over a manifest with no
|
|
59
|
+
* `@owlmeans/agent` in it produces a story that reports success and a library that will not
|
|
60
|
+
* compile.
|
|
61
|
+
*/
|
|
62
|
+
export declare const BLUEPRINT_CASES: Record<BlueprintCase, BlueprintCaseDefinition>;
|
|
63
|
+
/**
|
|
64
|
+
* The case a reference names, or `undefined`.
|
|
65
|
+
*
|
|
66
|
+
* Total over anything: an unknown name, a name from a deploy this one does not have, and an
|
|
67
|
+
* absent one all read the same way — no patch, which is the base blueprint. That is the only
|
|
68
|
+
* answer that cannot take a capability away from a project that already has it.
|
|
69
|
+
*/
|
|
70
|
+
export declare const blueprintCaseOf: (name?: string) => BlueprintCaseDefinition | undefined;
|
|
71
|
+
/** Every case the platform ships, in the order a classifier should weigh them. */
|
|
72
|
+
export declare const BLUEPRINT_CASE_ORDER: BlueprintCase[];
|
|
73
|
+
//# sourceMappingURL=case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../src/blueprint/case.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;;;;GAYG;AACH,oBAAY,aAAa;IACvB,mGAAmG;IACnG,GAAG,QAAQ;IACX,+EAA+E;IAC/E,QAAQ,aAAa;IACrB,gFAAgF;IAChF,UAAU,gBAAgB;IAC1B,uFAAuF;IACvF,OAAO,aAAa;IACpB,iFAAiF;IACjF,IAAI,SAAS;CACd;AAED;;;;;;;GAOG;AACH,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,aAAa,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,8FAA8F;IAC9F,KAAK,EAAE,cAAc,CAAA;CACtB;AA0ED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE,uBAAuB,CA+G1E,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,uBAAuB,GAAG,SACqB,CAAA;AAE/F,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,EAAE,aAAa,EAM/C,CAAA"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { SubProject } from '../slot/consts.js';
|
|
2
|
+
import { ViableSkill } from '../skills/consts.js';
|
|
3
|
+
import { ViablePersona } from '../skills/roles.js';
|
|
4
|
+
import { aiLibraryList, gameLibraryList } from '../skills/catalogue.js';
|
|
5
|
+
/**
|
|
6
|
+
* WHICH KIND of product is being built on a blueprint.
|
|
7
|
+
*
|
|
8
|
+
* A blueprint says what the STACK is — the language, the framework, the topology, the seeds. A
|
|
9
|
+
* case says what is being built ON it, and that is a different question with different consumers:
|
|
10
|
+
* the analyst framing the brief, the architect deciding whether a story needs a queue, the coder
|
|
11
|
+
* choosing which packages it may import.
|
|
12
|
+
*
|
|
13
|
+
* Deliberately NOT a second blueprint. Everything a case has to say is already a blueprint field,
|
|
14
|
+
* so a case is a PATCH and the resolution order stays base → case → per-run overrides. That is
|
|
15
|
+
* also why adding one is a data change: nothing reads `BlueprintCase` except the table below and
|
|
16
|
+
* the prompt that classifies a project into it.
|
|
17
|
+
*/
|
|
18
|
+
export var BlueprintCase;
|
|
19
|
+
(function (BlueprintCase) {
|
|
20
|
+
/** A web application whose every feature fits inside a request. No queue, no worker, no agents. */
|
|
21
|
+
BlueprintCase["Web"] = "web";
|
|
22
|
+
/** A web application with work that genuinely belongs off the request path. */
|
|
23
|
+
BlueprintCase["Scalable"] = "scalable";
|
|
24
|
+
/** The product's value comes from ordered, deterministic model-driven steps. */
|
|
25
|
+
BlueprintCase["AiPipeline"] = "ai-pipeline";
|
|
26
|
+
/** The product's value comes from an agent that decides its own path through tools. */
|
|
27
|
+
BlueprintCase["AiAgent"] = "ai-agent";
|
|
28
|
+
/** A browser game: a three.js scene with an ordinary React interface over it. */
|
|
29
|
+
BlueprintCase["Game"] = "game";
|
|
30
|
+
})(BlueprintCase || (BlueprintCase = {}));
|
|
31
|
+
/**
|
|
32
|
+
* How a game is played, which decides who owns its state.
|
|
33
|
+
*
|
|
34
|
+
* Recorded beside the case rather than folded into it, because it changes nothing about the
|
|
35
|
+
* dependencies and everything about where the logic goes. `OnlineTurn` is the default for
|
|
36
|
+
* anything multiplayer unless the brief plainly asks for live play — it is the shape that
|
|
37
|
+
* actually builds, and it needs no socket, no tick loop and no reconciliation.
|
|
38
|
+
*/
|
|
39
|
+
export var GameKind;
|
|
40
|
+
(function (GameKind) {
|
|
41
|
+
GameKind["Casual"] = "casual";
|
|
42
|
+
GameKind["OnlineTurn"] = "online-turn";
|
|
43
|
+
GameKind["OnlineLive"] = "online-live";
|
|
44
|
+
})(GameKind || (GameKind = {}));
|
|
45
|
+
/** What every AI case installs. The langchain peers are declared here, at ONE range. */
|
|
46
|
+
const AI_DEPS = {
|
|
47
|
+
[SubProject.Backend]: {
|
|
48
|
+
'@owlmeans/llm': '^0.1.18-rc.13',
|
|
49
|
+
'@owlmeans/agent': '^0.1.18-rc.16',
|
|
50
|
+
'@langchain/core': '^1.2.9',
|
|
51
|
+
'@langchain/anthropic': '^1.5.8',
|
|
52
|
+
'@langchain/openai': '^1.5.10',
|
|
53
|
+
'@langchain/langgraph': '^1.4.13',
|
|
54
|
+
'@langchain/langgraph-checkpoint': '^1.1.5',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
/** The library allow-list a backend persona gets once the AI packages are installed. */
|
|
58
|
+
const AI_LIBRARIES = {
|
|
59
|
+
[SubProject.Backend]: aiLibraryList,
|
|
60
|
+
[SubProject.Api]: aiLibraryList,
|
|
61
|
+
[SubProject.Worker]: aiLibraryList,
|
|
62
|
+
};
|
|
63
|
+
/** Skills every AI case adds on top of the blueprint's own. */
|
|
64
|
+
const AI_SKILLS = [
|
|
65
|
+
ViableSkill.AgenticChoice,
|
|
66
|
+
ViableSkill.TargetLlm,
|
|
67
|
+
ViableSkill.LibrariesAi,
|
|
68
|
+
];
|
|
69
|
+
/**
|
|
70
|
+
* What the analysis stage is told about a product whose value is a model.
|
|
71
|
+
*
|
|
72
|
+
* The pairing rule is the load-bearing one: an agent holds no permissions and owns no screen, so
|
|
73
|
+
* a story that is the AGENT's work is invisible unless a human story starts it and watches it.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* What the API side is told once a project may have a queue.
|
|
77
|
+
*
|
|
78
|
+
* The endpoint that starts slow work is the PRODUCER, and it is generated by a persona that
|
|
79
|
+
* otherwise has no reason to know a broker exists. Its job alias is declared before it runs
|
|
80
|
+
* (`runtime-declare`), so by the time this coder writes the handler there is something to enqueue
|
|
81
|
+
* onto — and this is what tells it to, instead of doing the work inline behind a request the user
|
|
82
|
+
* is waiting on.
|
|
83
|
+
*/
|
|
84
|
+
const PRODUCER_PERSONA_SKILLS = {
|
|
85
|
+
[ViablePersona.ApiArchitect]: [ViableSkill.QueueDiscipline, ViableSkill.WorkerJobs],
|
|
86
|
+
[ViablePersona.ApiCoder]: [ViableSkill.WorkerJobs],
|
|
87
|
+
};
|
|
88
|
+
const AI_PERSONA_SKILLS = {
|
|
89
|
+
...PRODUCER_PERSONA_SKILLS,
|
|
90
|
+
[ViablePersona.BusinessAnalyst]: [ViableSkill.AgenticChoice],
|
|
91
|
+
[ViablePersona.UxDesigner]: [ViableSkill.AgenticChoice],
|
|
92
|
+
[ViablePersona.RuntimeArchitect]: [ViableSkill.AgenticChoice, ViableSkill.TargetLlm],
|
|
93
|
+
[ViablePersona.WorkerCoder]: [
|
|
94
|
+
ViableSkill.AgenticChoice, ViableSkill.TargetLlm, ViableSkill.LibrariesAi,
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
const GAME_PERSONA_SKILLS = {
|
|
98
|
+
[ViablePersona.BusinessAnalyst]: [ViableSkill.GameDesign],
|
|
99
|
+
[ViablePersona.UxDesigner]: [ViableSkill.GameDesign, ViableSkill.GameUi],
|
|
100
|
+
[ViablePersona.VisualDesigner]: [ViableSkill.GameUi],
|
|
101
|
+
[ViablePersona.ComponentArchitect]: [ViableSkill.GameScene, ViableSkill.GameUi],
|
|
102
|
+
[ViablePersona.LayoutArchitect]: [ViableSkill.GameScene, ViableSkill.GameUi],
|
|
103
|
+
[ViablePersona.UiViewCoder]: [
|
|
104
|
+
ViableSkill.GameScene, ViableSkill.GameUi, ViableSkill.LibrariesGame,
|
|
105
|
+
],
|
|
106
|
+
[ViablePersona.RuntimeArchitect]: [ViableSkill.GameNetworking],
|
|
107
|
+
[ViablePersona.WorkerCoder]: [ViableSkill.GameNetworking],
|
|
108
|
+
[ViablePersona.ApiArchitect]: [ViableSkill.GameNetworking],
|
|
109
|
+
[ViablePersona.ApiCoder]: [ViableSkill.GameNetworking],
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* The cases the platform ships.
|
|
113
|
+
*
|
|
114
|
+
* Read as a table: the left column is what a prompt has to look like, the right column is what
|
|
115
|
+
* that costs the generated application. Nothing here turns a capability on without also
|
|
116
|
+
* installing what makes it real — a blueprint that promises `agents` over a manifest with no
|
|
117
|
+
* `@owlmeans/agent` in it produces a story that reports success and a library that will not
|
|
118
|
+
* compile.
|
|
119
|
+
*/
|
|
120
|
+
export const BLUEPRINT_CASES = {
|
|
121
|
+
[BlueprintCase.Web]: {
|
|
122
|
+
id: BlueprintCase.Web,
|
|
123
|
+
title: 'Web application',
|
|
124
|
+
when: `
|
|
125
|
+
Everything the product does fits inside a request: forms, lists, records, search, reports a
|
|
126
|
+
person waits a second for. Nothing has to survive the tab closing, nothing calls a slow third
|
|
127
|
+
party, nothing walks an unbounded set, nothing is scheduled. Most products are this.
|
|
128
|
+
`.trim(),
|
|
129
|
+
patch: {
|
|
130
|
+
packages: {
|
|
131
|
+
capabilities: { postgres: true, kv: false, queue: false, worker: false, agents: false, validation: true },
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
[BlueprintCase.Scalable]: {
|
|
136
|
+
id: BlueprintCase.Scalable,
|
|
137
|
+
title: 'Web application with background work',
|
|
138
|
+
when: `
|
|
139
|
+
Like a web application, except that some named part of it genuinely cannot run inside a request:
|
|
140
|
+
it walks every row a user owns, talks to a slow or rate-limited third party, is scheduled or
|
|
141
|
+
repeated, must survive the tab closing, or must be retried without the user doing anything.
|
|
142
|
+
Choose this only when you can NAME that part; "it might get slow" is not it.
|
|
143
|
+
|
|
144
|
+
NOT this when the slow part is a MODEL. Background work whose content comes out of a language
|
|
145
|
+
model is one of the two AI kinds below, and choosing this one for it leaves the application unable
|
|
146
|
+
to call a model at all.
|
|
147
|
+
`.trim(),
|
|
148
|
+
patch: {
|
|
149
|
+
packages: {
|
|
150
|
+
capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: false, validation: true },
|
|
151
|
+
personaSkills: PRODUCER_PERSONA_SKILLS,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
[BlueprintCase.AiPipeline]: {
|
|
156
|
+
id: BlueprintCase.AiPipeline,
|
|
157
|
+
title: 'AI pipeline',
|
|
158
|
+
when: `
|
|
159
|
+
The product's value comes from a language model, and the work it does is a KNOWN sequence:
|
|
160
|
+
transcribe then summarise then file; extract then validate then store; draft then check then send.
|
|
161
|
+
You can name the steps before it runs. The application decides the order; the model performs each
|
|
162
|
+
step.
|
|
163
|
+
|
|
164
|
+
Any product whose OUTPUT is written by a model is this kind or the one below — never a plain web
|
|
165
|
+
application, and never merely a scalable one.
|
|
166
|
+
`.trim(),
|
|
167
|
+
patch: {
|
|
168
|
+
packages: {
|
|
169
|
+
capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: true, validation: true },
|
|
170
|
+
deps: AI_DEPS,
|
|
171
|
+
libraries: AI_LIBRARIES,
|
|
172
|
+
skills: AI_SKILLS,
|
|
173
|
+
personaSkills: AI_PERSONA_SKILLS,
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
[BlueprintCase.AiAgent]: {
|
|
178
|
+
id: BlueprintCase.AiAgent,
|
|
179
|
+
title: 'AI agent',
|
|
180
|
+
when: `
|
|
181
|
+
The product's value comes from a model that decides its own path: how many steps the work takes
|
|
182
|
+
cannot be predicted, and which tool to reach for next is a judgement rather than a rule anyone
|
|
183
|
+
could write down. Choose this over an AI pipeline only when the order genuinely cannot be fixed
|
|
184
|
+
in advance.
|
|
185
|
+
`.trim(),
|
|
186
|
+
patch: {
|
|
187
|
+
packages: {
|
|
188
|
+
capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: true, validation: true },
|
|
189
|
+
deps: {
|
|
190
|
+
[SubProject.Backend]: {
|
|
191
|
+
...AI_DEPS[SubProject.Backend],
|
|
192
|
+
'@owlmeans/agent-skills': '^0.1.18-rc.12',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
libraries: AI_LIBRARIES,
|
|
196
|
+
skills: [...AI_SKILLS, ViableSkill.TargetAgentTools],
|
|
197
|
+
personaSkills: {
|
|
198
|
+
...AI_PERSONA_SKILLS,
|
|
199
|
+
[ViablePersona.WorkerCoder]: [
|
|
200
|
+
...AI_PERSONA_SKILLS[ViablePersona.WorkerCoder], ViableSkill.TargetAgentTools,
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
[BlueprintCase.Game]: {
|
|
207
|
+
id: BlueprintCase.Game,
|
|
208
|
+
title: 'Browser game',
|
|
209
|
+
when: `
|
|
210
|
+
The person asked for a GAME, in those words or unmistakably — something played rather than used,
|
|
211
|
+
with a loop, a score or a win condition. Never infer this from "gamified", "playful", "fun" or a
|
|
212
|
+
leaderboard attached to an ordinary product. If the prompt does not plainly ask for a game, this
|
|
213
|
+
is not it.
|
|
214
|
+
`.trim(),
|
|
215
|
+
patch: {
|
|
216
|
+
packages: {
|
|
217
|
+
capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: false, validation: true },
|
|
218
|
+
deps: {
|
|
219
|
+
[SubProject.Web]: { three: '^0.186.0', '@types/three': '^0.185.4' },
|
|
220
|
+
},
|
|
221
|
+
libraries: { [SubProject.Web]: gameLibraryList, 'ui-state': gameLibraryList },
|
|
222
|
+
skills: [ViableSkill.GameScene, ViableSkill.GameUi, ViableSkill.LibrariesGame],
|
|
223
|
+
personaSkills: { ...PRODUCER_PERSONA_SKILLS, ...GAME_PERSONA_SKILLS },
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* The case a reference names, or `undefined`.
|
|
230
|
+
*
|
|
231
|
+
* Total over anything: an unknown name, a name from a deploy this one does not have, and an
|
|
232
|
+
* absent one all read the same way — no patch, which is the base blueprint. That is the only
|
|
233
|
+
* answer that cannot take a capability away from a project that already has it.
|
|
234
|
+
*/
|
|
235
|
+
export const blueprintCaseOf = (name) => name == null ? undefined : BLUEPRINT_CASES[name];
|
|
236
|
+
/** Every case the platform ships, in the order a classifier should weigh them. */
|
|
237
|
+
export const BLUEPRINT_CASE_ORDER = [
|
|
238
|
+
BlueprintCase.Web,
|
|
239
|
+
BlueprintCase.Scalable,
|
|
240
|
+
BlueprintCase.AiPipeline,
|
|
241
|
+
BlueprintCase.AiAgent,
|
|
242
|
+
BlueprintCase.Game,
|
|
243
|
+
];
|
|
244
|
+
//# sourceMappingURL=case.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.js","sourceRoot":"","sources":["../../src/blueprint/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAGvE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,aAWX;AAXD,WAAY,aAAa;IACvB,mGAAmG;IACnG,4BAAW,CAAA;IACX,+EAA+E;IAC/E,sCAAqB,CAAA;IACrB,gFAAgF;IAChF,2CAA0B,CAAA;IAC1B,uFAAuF;IACvF,qCAAoB,CAAA;IACpB,iFAAiF;IACjF,8BAAa,CAAA;AACf,CAAC,EAXW,aAAa,KAAb,aAAa,QAWxB;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,sCAA0B,CAAA;IAC1B,sCAA0B,CAAA;AAC5B,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAgBD,wFAAwF;AACxF,MAAM,OAAO,GAAG;IACd,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QACpB,eAAe,EAAE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ACF;CACF,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAa,EAAuC,EAAE,CACpF,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,eAA2D,CAAC,IAAI,CAAC,CAAA;AAE/F,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAoB;IACnD,aAAa,CAAC,GAAG;IACjB,aAAa,CAAC,QAAQ;IACtB,aAAa,CAAC,UAAU;IACxB,aAAa,CAAC,OAAO;IACrB,aAAa,CAAC,IAAI;CACnB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The blueprint the platform ships and every project uses until something says otherwise.
|
|
3
|
+
*
|
|
4
|
+
* A string rather than an enum: a blueprint may be registered by a consumer, and an enum would
|
|
5
|
+
* make the platform's own list the closed set of everything that can exist — which is the shape
|
|
6
|
+
* this whole abstraction was introduced to remove.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_BLUEPRINT_ID = "owlmeans-fullstack-ts";
|
|
9
|
+
/** Recorded on a project so a later run knows which blueprint drew it. */
|
|
10
|
+
export declare const BLUEPRINT_META_KEY = "blueprint";
|
|
11
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/blueprint/consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,0BAA0B,CAAA;AAE3D,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,cAAc,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The blueprint the platform ships and every project uses until something says otherwise.
|
|
3
|
+
*
|
|
4
|
+
* A string rather than an enum: a blueprint may be registered by a consumer, and an enum would
|
|
5
|
+
* make the platform's own list the closed set of everything that can exist — which is the shape
|
|
6
|
+
* this whole abstraction was introduced to remove.
|
|
7
|
+
*/
|
|
8
|
+
export const DEFAULT_BLUEPRINT_ID = 'owlmeans-fullstack-ts';
|
|
9
|
+
/** Recorded on a project so a later run knows which blueprint drew it. */
|
|
10
|
+
export const BLUEPRINT_META_KEY = 'blueprint';
|
|
11
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/blueprint/consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAA;AAE3D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blueprint/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAE1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/blueprint/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAE1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ViablePersona } from '../skills/roles.js';
|
|
2
|
+
import type { ViableSkill } from '../skills/consts.js';
|
|
3
|
+
import type { Blueprint, BlueprintPatch } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Merge one layer's override over a resolved value.
|
|
6
|
+
*
|
|
7
|
+
* Objects merge key by key; ARRAYS REPLACE. That asymmetry is deliberate and is the difference
|
|
8
|
+
* between an override and an addition: a blueprint that narrows a library allow-list to three
|
|
9
|
+
* entries means those three, and a concatenating merge would hand the coder back the very imports
|
|
10
|
+
* the override existed to forbid. A layer that wants to add spreads the base itself.
|
|
11
|
+
*/
|
|
12
|
+
export declare const mergeBlueprintValue: <T>(base: T, patch: unknown) => T;
|
|
13
|
+
/**
|
|
14
|
+
* Apply an override patch to a blueprint, layer by layer.
|
|
15
|
+
*
|
|
16
|
+
* Frozen on the way out — shallowly at each layer, which is enough to make the accidental
|
|
17
|
+
* `blueprint.packages.capabilities.worker = true` a visible failure rather than a change every
|
|
18
|
+
* later helper silently inherits.
|
|
19
|
+
*/
|
|
20
|
+
export declare const applyBlueprintPatch: (base: Blueprint, patch?: BlueprintPatch) => Blueprint;
|
|
21
|
+
export declare const freezeBlueprint: (blueprint: Blueprint) => Blueprint;
|
|
22
|
+
/** Every skill the blueprint asks for, stack first, deduped, order preserved. */
|
|
23
|
+
export declare const blueprintSkills: (blueprint: Blueprint) => Blueprint['stack']['skills'];
|
|
24
|
+
/**
|
|
25
|
+
* Apply a CASE to a blueprint — which kind of product is being built on this stack.
|
|
26
|
+
*
|
|
27
|
+
* A case is an ordinary {@link BlueprintPatch} and follows every rule an override does, with two
|
|
28
|
+
* deliberate exceptions: `skills` and `personaSkills` are UNIONED with the base rather than
|
|
29
|
+
* replacing it.
|
|
30
|
+
*
|
|
31
|
+
* The asymmetry is the difference between the two things a patch can be. An override is written
|
|
32
|
+
* by somebody looking at the resolved value and narrowing it — "these three libraries and no
|
|
33
|
+
* others" — and a concatenating merge would hand back the very imports it existed to forbid. A
|
|
34
|
+
* case is written once, in a table, by somebody who cannot see the blueprint it will be applied
|
|
35
|
+
* to; it says what this KIND of product needs IN ADDITION, and replacing there would silently
|
|
36
|
+
* drop every rule the stack itself established. A case that genuinely needs to take a skill away
|
|
37
|
+
* does it by narrowing a capability, which is what stops the prompt being asked at all.
|
|
38
|
+
*
|
|
39
|
+
* Unknown, absent and unregistered case names all resolve to the blueprint unchanged. A project
|
|
40
|
+
* records the case it was drawn with, that record outlives the deploy that knew the name, and
|
|
41
|
+
* "built against the stack as it stands" is a far better answer than a project that cannot open.
|
|
42
|
+
*/
|
|
43
|
+
export declare const applyBlueprintCase: (base: Blueprint, name?: string) => Blueprint;
|
|
44
|
+
/**
|
|
45
|
+
* The skills ONE persona gets from the blueprint, beyond its own.
|
|
46
|
+
*
|
|
47
|
+
* Total, and empty for every persona a blueprint says nothing about — which is every one of them
|
|
48
|
+
* on the blueprint the platform ships. `withPersona` unions this into the policy it composes.
|
|
49
|
+
*/
|
|
50
|
+
export declare const personaSkillsOf: (blueprint: Blueprint, persona: ViablePersona) => ViableSkill[];
|
|
51
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/blueprint/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAK3D;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,QAAQ,CAAC,SAAS,OAAO,KAAG,CAWhE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,SAAU,SAAS,UAAU,cAAc,KAAG,SAQ7E,CAAA;AAED,eAAO,MAAM,eAAe,cAAe,SAAS,KAAG,SAUrD,CAAA;AAEF,iFAAiF;AACjF,eAAO,MAAM,eAAe,cAAe,SAAS,KAAG,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CACT,CAAA;AAMzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,kBAAkB,SAAU,SAAS,SAAS,MAAM,KAAG,SAwBnE,CAAA;AAeD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,cACf,SAAS,WAAW,aAAa,KAC3C,WAAW,EAAuD,CAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { blueprintCaseOf } from './case.js';
|
|
2
|
+
const isPlainObject = (value) => value != null && typeof value === 'object' && !Array.isArray(value);
|
|
3
|
+
/**
|
|
4
|
+
* Merge one layer's override over a resolved value.
|
|
5
|
+
*
|
|
6
|
+
* Objects merge key by key; ARRAYS REPLACE. That asymmetry is deliberate and is the difference
|
|
7
|
+
* between an override and an addition: a blueprint that narrows a library allow-list to three
|
|
8
|
+
* entries means those three, and a concatenating merge would hand the coder back the very imports
|
|
9
|
+
* the override existed to forbid. A layer that wants to add spreads the base itself.
|
|
10
|
+
*/
|
|
11
|
+
export const mergeBlueprintValue = (base, patch) => {
|
|
12
|
+
if (patch === undefined)
|
|
13
|
+
return base;
|
|
14
|
+
if (!isPlainObject(base) || !isPlainObject(patch))
|
|
15
|
+
return patch;
|
|
16
|
+
const out = { ...base };
|
|
17
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
18
|
+
if (value === undefined)
|
|
19
|
+
continue;
|
|
20
|
+
out[key] = mergeBlueprintValue(out[key], value);
|
|
21
|
+
}
|
|
22
|
+
return out;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Apply an override patch to a blueprint, layer by layer.
|
|
26
|
+
*
|
|
27
|
+
* Frozen on the way out — shallowly at each layer, which is enough to make the accidental
|
|
28
|
+
* `blueprint.packages.capabilities.worker = true` a visible failure rather than a change every
|
|
29
|
+
* later helper silently inherits.
|
|
30
|
+
*/
|
|
31
|
+
export const applyBlueprintPatch = (base, patch) => {
|
|
32
|
+
if (patch == null)
|
|
33
|
+
return base;
|
|
34
|
+
const merged = mergeBlueprintValue(base, patch);
|
|
35
|
+
return freezeBlueprint(merged);
|
|
36
|
+
};
|
|
37
|
+
export const freezeBlueprint = (blueprint) => Object.freeze({
|
|
38
|
+
...blueprint,
|
|
39
|
+
technology: Object.freeze({ ...blueprint.technology }),
|
|
40
|
+
stack: Object.freeze({ ...blueprint.stack }),
|
|
41
|
+
template: Object.freeze({ ...blueprint.template }),
|
|
42
|
+
createApp: Object.freeze({ ...blueprint.createApp }),
|
|
43
|
+
packages: Object.freeze({
|
|
44
|
+
...blueprint.packages,
|
|
45
|
+
capabilities: Object.freeze({ ...blueprint.packages.capabilities }),
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
48
|
+
/** Every skill the blueprint asks for, stack first, deduped, order preserved. */
|
|
49
|
+
export const blueprintSkills = (blueprint) => [...new Set([...blueprint.stack.skills, ...blueprint.packages.skills])];
|
|
50
|
+
const union = (base = [], extra = []) => [...new Set([...base, ...extra])];
|
|
51
|
+
/**
|
|
52
|
+
* Apply a CASE to a blueprint — which kind of product is being built on this stack.
|
|
53
|
+
*
|
|
54
|
+
* A case is an ordinary {@link BlueprintPatch} and follows every rule an override does, with two
|
|
55
|
+
* deliberate exceptions: `skills` and `personaSkills` are UNIONED with the base rather than
|
|
56
|
+
* replacing it.
|
|
57
|
+
*
|
|
58
|
+
* The asymmetry is the difference between the two things a patch can be. An override is written
|
|
59
|
+
* by somebody looking at the resolved value and narrowing it — "these three libraries and no
|
|
60
|
+
* others" — and a concatenating merge would hand back the very imports it existed to forbid. A
|
|
61
|
+
* case is written once, in a table, by somebody who cannot see the blueprint it will be applied
|
|
62
|
+
* to; it says what this KIND of product needs IN ADDITION, and replacing there would silently
|
|
63
|
+
* drop every rule the stack itself established. A case that genuinely needs to take a skill away
|
|
64
|
+
* does it by narrowing a capability, which is what stops the prompt being asked at all.
|
|
65
|
+
*
|
|
66
|
+
* Unknown, absent and unregistered case names all resolve to the blueprint unchanged. A project
|
|
67
|
+
* records the case it was drawn with, that record outlives the deploy that knew the name, and
|
|
68
|
+
* "built against the stack as it stands" is a far better answer than a project that cannot open.
|
|
69
|
+
*/
|
|
70
|
+
export const applyBlueprintCase = (base, name) => {
|
|
71
|
+
const cased = blueprintCaseOf(name);
|
|
72
|
+
if (cased == null)
|
|
73
|
+
return base;
|
|
74
|
+
const merged = applyBlueprintPatch(base, cased.patch);
|
|
75
|
+
const patch = cased.patch;
|
|
76
|
+
const personaSkills = patch.packages?.personaSkills;
|
|
77
|
+
const stackSkills = patch.stack?.skills;
|
|
78
|
+
const packageSkills = patch.packages?.skills;
|
|
79
|
+
return freezeBlueprint({
|
|
80
|
+
...merged,
|
|
81
|
+
stack: { ...merged.stack, skills: union(base.stack.skills, stackSkills) },
|
|
82
|
+
packages: {
|
|
83
|
+
...merged.packages,
|
|
84
|
+
skills: union(base.packages.skills, packageSkills),
|
|
85
|
+
...(personaSkills != null || base.packages.personaSkills != null
|
|
86
|
+
? {
|
|
87
|
+
personaSkills: mergePersonaSkills(base.packages.personaSkills, personaSkills),
|
|
88
|
+
}
|
|
89
|
+
: {}),
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const mergePersonaSkills = (base, extra) => {
|
|
94
|
+
const out = { ...base };
|
|
95
|
+
for (const [persona, skills] of Object.entries(extra ?? {})) {
|
|
96
|
+
const key = persona;
|
|
97
|
+
out[key] = union(out[key], skills);
|
|
98
|
+
}
|
|
99
|
+
return out;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* The skills ONE persona gets from the blueprint, beyond its own.
|
|
103
|
+
*
|
|
104
|
+
* Total, and empty for every persona a blueprint says nothing about — which is every one of them
|
|
105
|
+
* on the blueprint the platform ships. `withPersona` unions this into the policy it composes.
|
|
106
|
+
*/
|
|
107
|
+
export const personaSkillsOf = (blueprint, persona) => blueprint.packages.personaSkills?.[persona] ?? [];
|
|
108
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/blueprint/resolve.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,MAAM,aAAa,GAAG,CAAC,KAAc,EAAoC,EAAE,CACzE,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KA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AAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BlueprintCase, GameKind } from './case.js';
|
|
2
|
+
/**
|
|
3
|
+
* What kind of product a prompt describes.
|
|
4
|
+
*
|
|
5
|
+
* A schema rather than a free answer because the value is a KEY: it is written onto the project
|
|
6
|
+
* record, resolved into a blueprint patch on every run afterwards, and decides which dependencies
|
|
7
|
+
* the tree is staged with. A model that answered "an AI-powered agent app" in prose would leave
|
|
8
|
+
* the caller matching strings, and a miss there is silent — the project simply builds as the
|
|
9
|
+
* default and nobody can say why.
|
|
10
|
+
*/
|
|
11
|
+
export interface BlueprintCaseChoice {
|
|
12
|
+
case: BlueprintCase;
|
|
13
|
+
/** Only meaningful for the game case; ignored everywhere else. */
|
|
14
|
+
gameKind?: GameKind;
|
|
15
|
+
/** One sentence, from the prompt. Recorded so a later run can disagree with it. */
|
|
16
|
+
rationale: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const BlueprintCaseChoiceSchema: {
|
|
19
|
+
readonly type: 'object';
|
|
20
|
+
readonly title: 'BlueprintCaseChoice';
|
|
21
|
+
readonly description: 'Which kind of application the described product is';
|
|
22
|
+
readonly properties: {
|
|
23
|
+
readonly case: {
|
|
24
|
+
readonly type: 'string';
|
|
25
|
+
readonly enum: BlueprintCase[];
|
|
26
|
+
readonly description: 'The least capable kind that can deliver what was asked for.';
|
|
27
|
+
};
|
|
28
|
+
readonly gameKind: {
|
|
29
|
+
readonly type: 'string';
|
|
30
|
+
readonly enum: GameKind[];
|
|
31
|
+
readonly description: string;
|
|
32
|
+
};
|
|
33
|
+
readonly rationale: {
|
|
34
|
+
readonly type: 'string';
|
|
35
|
+
readonly description: 'One sentence naming what in the prompt decided it.';
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly required: readonly ['case', 'rationale'];
|
|
39
|
+
readonly additionalProperties: false;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/blueprint/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEnD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAA;IACnB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,yBAAyB;aACpC,IAAI,EAAE,QAAQ;aACd,KAAK,EAAE,qBAAqB;aAC5B,WAAW,EAAE,oDAAoD;aACjE,UAAU;iBACR,IAAI;qBACF,IAAI,EAAE,QAAQ;qBACd,IAAI;qBACJ,WAAW,EAAE,6DAA6D;;iBAE5E,QAAQ;qBACN,IAAI,EAAE,QAAQ;qBACd,IAAI;qBACJ,WAAW;;iBAIb,SAAS;qBACP,IAAI,EAAE,QAAQ;qBACd,WAAW,EAAE,oDAAoD;;;aAGrE,QAAQ,YAAG,MAAM,EAAE,WAAW;aAC9B,oBAAoB;CACZ,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BlueprintCase, GameKind } from './case.js';
|
|
2
|
+
export const BlueprintCaseChoiceSchema = {
|
|
3
|
+
type: 'object',
|
|
4
|
+
title: 'BlueprintCaseChoice',
|
|
5
|
+
description: 'Which kind of application the described product is',
|
|
6
|
+
properties: {
|
|
7
|
+
case: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
enum: Object.values(BlueprintCase),
|
|
10
|
+
description: 'The least capable kind that can deliver what was asked for.',
|
|
11
|
+
},
|
|
12
|
+
gameKind: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
enum: Object.values(GameKind),
|
|
15
|
+
description: 'Only when the case is `game`. `casual` for one player in one browser, '
|
|
16
|
+
+ '`online-turn` for players acting one after another, `online-live` only when the brief '
|
|
17
|
+
+ 'plainly asks for players acting at the same moment.',
|
|
18
|
+
},
|
|
19
|
+
rationale: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'One sentence naming what in the prompt decided it.',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
required: ['case', 'rationale'],
|
|
25
|
+
additionalProperties: false,
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/blueprint/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAmBnD,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,oDAAoD;IACjE,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;YAClC,WAAW,EAAE,6DAA6D;SAC3E;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,wEAAwE;kBACjF,wFAAwF;kBACxF,qDAAqD;SAC1D;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oDAAoD;SAClE;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;IAC/B,oBAAoB,EAAE,KAAK;CACnB,CAAA"}
|