@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 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/convert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EACV,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,EAC5E,qBAAqB,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAChG,WAAW,EAAE,qBAAqB,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EACjG,MAAM,aAAa,CAAA;AAIpB;;;;;;;GAOG;AAEH,+FAA+F;AAC/F,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,SAAS,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,IAAI,EAAE,OAAO,CAAA;CACd;AAED,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAA;IAChB,kGAAkG;IAClG,IAAI,EAAE,aAAa,GAAG,QAAQ,CAAA;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE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,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;IACtB,IAAI,EAAE,gBAAgB,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/convert/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The design shape's own version.
|
|
3
|
+
*
|
|
4
|
+
* A mismatch REFUSES; it never adapts. A design is read back days after it was written, by code
|
|
5
|
+
* that has since changed — and a reader that "adapted" an older shape would be guessing which of
|
|
6
|
+
* the fields it is missing were absent because they had not been designed and which because the
|
|
7
|
+
* shape did not have them yet. Those are different questions with different answers.
|
|
8
|
+
*/
|
|
9
|
+
export declare const STORY_DESIGN_VERSION = 1;
|
|
10
|
+
/** The code a scaffold plan is filed under, since it belongs to a project rather than a story. */
|
|
11
|
+
export declare const SCAFFOLD_CODE = "scaffold";
|
|
12
|
+
/** How far a design may drift from the project it was written against before it is stale. */
|
|
13
|
+
export declare enum DesignStaleness {
|
|
14
|
+
/** Usable as it stands. */
|
|
15
|
+
Fresh = "fresh",
|
|
16
|
+
/** Written under another shape version. Refuse. */
|
|
17
|
+
Version = "version",
|
|
18
|
+
/** The story's own narrative changed. Re-design. */
|
|
19
|
+
Narrative = "narrative",
|
|
20
|
+
/** The project's specification, vision or design system changed. Warn and continue. */
|
|
21
|
+
Project = "project",
|
|
22
|
+
/** The generated tree moved under it. Re-run the stages that read the tree. */
|
|
23
|
+
Tree = "tree"
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/design/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAA;AAErC,kGAAkG;AAClG,eAAO,MAAM,aAAa,aAAa,CAAA;AAEvC,6FAA6F;AAC7F,oBAAY,eAAe;IACzB,2BAA2B;IAC3B,KAAK,UAAU;IACf,mDAAmD;IACnD,OAAO,YAAY;IACnB,oDAAoD;IACpD,SAAS,cAAc;IACvB,uFAAuF;IACvF,OAAO,YAAY;IACnB,+EAA+E;IAC/E,IAAI,SAAS;CACd"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The design shape's own version.
|
|
3
|
+
*
|
|
4
|
+
* A mismatch REFUSES; it never adapts. A design is read back days after it was written, by code
|
|
5
|
+
* that has since changed — and a reader that "adapted" an older shape would be guessing which of
|
|
6
|
+
* the fields it is missing were absent because they had not been designed and which because the
|
|
7
|
+
* shape did not have them yet. Those are different questions with different answers.
|
|
8
|
+
*/
|
|
9
|
+
export const STORY_DESIGN_VERSION = 1;
|
|
10
|
+
/** The code a scaffold plan is filed under, since it belongs to a project rather than a story. */
|
|
11
|
+
export const SCAFFOLD_CODE = 'scaffold';
|
|
12
|
+
/** How far a design may drift from the project it was written against before it is stale. */
|
|
13
|
+
export var DesignStaleness;
|
|
14
|
+
(function (DesignStaleness) {
|
|
15
|
+
/** Usable as it stands. */
|
|
16
|
+
DesignStaleness["Fresh"] = "fresh";
|
|
17
|
+
/** Written under another shape version. Refuse. */
|
|
18
|
+
DesignStaleness["Version"] = "version";
|
|
19
|
+
/** The story's own narrative changed. Re-design. */
|
|
20
|
+
DesignStaleness["Narrative"] = "narrative";
|
|
21
|
+
/** The project's specification, vision or design system changed. Warn and continue. */
|
|
22
|
+
DesignStaleness["Project"] = "project";
|
|
23
|
+
/** The generated tree moved under it. Re-run the stages that read the tree. */
|
|
24
|
+
DesignStaleness["Tree"] = "tree";
|
|
25
|
+
})(DesignStaleness || (DesignStaleness = {}));
|
|
26
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/design/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,kGAAkG;AAClG,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAA;AAEvC,6FAA6F;AAC7F,MAAM,CAAN,IAAY,eAWX;AAXD,WAAY,eAAe;IACzB,2BAA2B;IAC3B,kCAAe,CAAA;IACf,mDAAmD;IACnD,sCAAmB,CAAA;IACnB,oDAAoD;IACpD,0CAAuB,CAAA;IACvB,uFAAuF;IACvF,sCAAmB,CAAA;IACnB,+EAA+E;IAC/E,gCAAa,CAAA;AACf,CAAC,EAXW,eAAe,KAAf,eAAe,QAW1B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { UserStory } from '../ba/types.js';
|
|
2
|
+
import { DesignStaleness } from './consts.js';
|
|
3
|
+
import type { StoryDesign } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* The in-memory aggregate the coders take, derived from the design.
|
|
6
|
+
*
|
|
7
|
+
* Derived rather than stored, and derived HERE rather than at the platform: the aggregate is what
|
|
8
|
+
* every generation helper reads, and a second place that assembles it is a second place that can
|
|
9
|
+
* assemble it differently. The `code` in particular is load-bearing - the scaffold stamps every
|
|
10
|
+
* placeholder it draws with it, so a run keyed by anything else cannot recognise its own
|
|
11
|
+
* reservation.
|
|
12
|
+
*/
|
|
13
|
+
export declare const userStoryOf: (design: StoryDesign) => UserStory;
|
|
14
|
+
/** Screen name to component names - the shape every UX and UI prompt takes. */
|
|
15
|
+
export declare const screenMapOf: (design: StoryDesign) => Record<string, string[]>;
|
|
16
|
+
/** Every path the design names, in the order the implementation stage visits them. */
|
|
17
|
+
export declare const designPaths: (design: StoryDesign) => string[];
|
|
18
|
+
/**
|
|
19
|
+
* How far the world has moved since the design was written.
|
|
20
|
+
*
|
|
21
|
+
* Ordered by severity, and each answer has one correct reaction: a version mismatch REFUSES, a
|
|
22
|
+
* changed narrative re-designs, a changed project warns and continues, a moved tree re-runs only
|
|
23
|
+
* the stages that read the tree. Collapsing them into a boolean would make every one of those the
|
|
24
|
+
* most expensive of the four.
|
|
25
|
+
*/
|
|
26
|
+
export declare const designStaleness: (design: StoryDesign, now: {
|
|
27
|
+
narrativeHash: string;
|
|
28
|
+
projectHash: string;
|
|
29
|
+
registryHash: string;
|
|
30
|
+
}) => DesignStaleness;
|
|
31
|
+
/**
|
|
32
|
+
* A stable, dependency-free hash of arbitrary text.
|
|
33
|
+
*
|
|
34
|
+
* FNV-1a, because what is being detected is "did this change", not "is this authentic" - and a
|
|
35
|
+
* design record must be readable by a browser bundle, a worker and a test with no crypto import
|
|
36
|
+
* between them.
|
|
37
|
+
*/
|
|
38
|
+
export declare const designHash: (...parts: Array<string | undefined>) => string;
|
|
39
|
+
/** An empty design, so every stage can fill its own slice without inventing the shape. */
|
|
40
|
+
export declare const emptyStoryDesign: (input: Pick<StoryDesign, 'code' | 'narrative' | 'area'> & Partial<StoryDesign>) => StoryDesign;
|
|
41
|
+
/**
|
|
42
|
+
* The design, small enough to hand a model, complete enough to act on.
|
|
43
|
+
*
|
|
44
|
+
* What a free-flight agent needs is names and counts: which screens exist, what is on them, which
|
|
45
|
+
* types and endpoints the story implies. The UX and UI prose is the bulk of a design and none of
|
|
46
|
+
* it helps an agent decide what to do next, so it is deliberately left out.
|
|
47
|
+
*/
|
|
48
|
+
export declare const designDigest: (design: StoryDesign) => string;
|
|
49
|
+
/**
|
|
50
|
+
* Apply a patch to a design, refusing anything that would rename an allocated artifact.
|
|
51
|
+
*
|
|
52
|
+
* A path or an alias is registry-owned. Changing one behind the registry's back leaves two
|
|
53
|
+
* spellings of the same thing in a project, and no number of fix attempts repairs that — the
|
|
54
|
+
* compiler sees a missing module and the fixer, reasonably, renames the reference to match
|
|
55
|
+
* whichever spelling it found first.
|
|
56
|
+
*
|
|
57
|
+
* Returns the reason as a STRING when it refuses, so a model can read it and take the other route.
|
|
58
|
+
*/
|
|
59
|
+
export declare const amendStoryDesign: (design: StoryDesign, patch: Record<string, unknown>) => StoryDesign | string;
|
|
60
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/design/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuC,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACpF,OAAO,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,WAAY,WAAW,KAAG,SA2CjD,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,WAAW,WAAY,WAAW,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAKjE,CAAA;AAER,sFAAsF;AACtF,eAAO,MAAM,WAAW,WAAY,WAAW,KAAG,MAAM,EAQvD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,WAClB,WAAW,OACd;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,KACxE,eAeF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,aAAc,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,KAAG,MAShE,CAAA;AAED,0FAA0F;AAC1F,eAAO,MAAM,gBAAgB,UACpB,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,KAC7E,WAqBD,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,WAAY,WAAW,KAAG,MAqDlD,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,WACnB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAClD,WAAW,GAAG,MA8BhB,CAAA"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { SpecCategory } from '../ba/consts.js';
|
|
2
|
+
import { DesignStaleness, STORY_DESIGN_VERSION } from './consts.js';
|
|
3
|
+
/**
|
|
4
|
+
* The in-memory aggregate the coders take, derived from the design.
|
|
5
|
+
*
|
|
6
|
+
* Derived rather than stored, and derived HERE rather than at the platform: the aggregate is what
|
|
7
|
+
* every generation helper reads, and a second place that assembles it is a second place that can
|
|
8
|
+
* assemble it differently. The `code` in particular is load-bearing - the scaffold stamps every
|
|
9
|
+
* placeholder it draws with it, so a run keyed by anything else cannot recognise its own
|
|
10
|
+
* reservation.
|
|
11
|
+
*/
|
|
12
|
+
export const userStoryOf = (design) => {
|
|
13
|
+
const componentOf = (name) => {
|
|
14
|
+
const component = design.components.find(entry => entry.name === name);
|
|
15
|
+
if (component == null) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
name: component.name,
|
|
20
|
+
description: '',
|
|
21
|
+
specs: {
|
|
22
|
+
[SpecCategory.UX]: component.specs.ux,
|
|
23
|
+
[SpecCategory.UI]: component.specs.ui,
|
|
24
|
+
},
|
|
25
|
+
entities: component.entities.map(entity => ({
|
|
26
|
+
name: entity, description: '', attributes: [],
|
|
27
|
+
})),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const screens = design.screens.map(screen => ({
|
|
31
|
+
name: screen.name,
|
|
32
|
+
description: '',
|
|
33
|
+
...(screen.section != null ? { section: screen.section } : {}),
|
|
34
|
+
specs: {
|
|
35
|
+
[SpecCategory.UX]: screen.specs.ux,
|
|
36
|
+
[SpecCategory.UI]: screen.specs.ui,
|
|
37
|
+
},
|
|
38
|
+
components: screen.components
|
|
39
|
+
.map(componentOf)
|
|
40
|
+
.filter((component) => component != null),
|
|
41
|
+
}));
|
|
42
|
+
return {
|
|
43
|
+
story: design.narrative,
|
|
44
|
+
code: design.code,
|
|
45
|
+
area: design.area,
|
|
46
|
+
entity: null,
|
|
47
|
+
entities: design.entities.map(entity => ({
|
|
48
|
+
name: entity.name, description: entity.description, attributes: [],
|
|
49
|
+
})),
|
|
50
|
+
screens,
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/** Screen name to component names - the shape every UX and UI prompt takes. */
|
|
54
|
+
export const screenMapOf = (design) => design.screens.reduce((map, screen) => {
|
|
55
|
+
map[screen.name] = [...screen.components];
|
|
56
|
+
return map;
|
|
57
|
+
}, {});
|
|
58
|
+
/** Every path the design names, in the order the implementation stage visits them. */
|
|
59
|
+
export const designPaths = (design) => [
|
|
60
|
+
...design.types.map(entry => entry.path),
|
|
61
|
+
...design.resources.map(entry => entry.path),
|
|
62
|
+
...design.models.map(entry => entry.path),
|
|
63
|
+
...design.api.map(entry => entry.path),
|
|
64
|
+
...design.stores.map(entry => entry.path),
|
|
65
|
+
...design.components.flatMap(entry => [entry.viewModelPath, entry.path]),
|
|
66
|
+
...design.screens.map(entry => entry.path),
|
|
67
|
+
];
|
|
68
|
+
/**
|
|
69
|
+
* How far the world has moved since the design was written.
|
|
70
|
+
*
|
|
71
|
+
* Ordered by severity, and each answer has one correct reaction: a version mismatch REFUSES, a
|
|
72
|
+
* changed narrative re-designs, a changed project warns and continues, a moved tree re-runs only
|
|
73
|
+
* the stages that read the tree. Collapsing them into a boolean would make every one of those the
|
|
74
|
+
* most expensive of the four.
|
|
75
|
+
*/
|
|
76
|
+
export const designStaleness = (design, now) => {
|
|
77
|
+
if (design.version !== STORY_DESIGN_VERSION) {
|
|
78
|
+
return DesignStaleness.Version;
|
|
79
|
+
}
|
|
80
|
+
if (design.provenance.narrativeHash !== now.narrativeHash) {
|
|
81
|
+
return DesignStaleness.Narrative;
|
|
82
|
+
}
|
|
83
|
+
if (design.provenance.projectHash !== now.projectHash) {
|
|
84
|
+
return DesignStaleness.Project;
|
|
85
|
+
}
|
|
86
|
+
if (design.provenance.registryHash !== now.registryHash) {
|
|
87
|
+
return DesignStaleness.Tree;
|
|
88
|
+
}
|
|
89
|
+
return DesignStaleness.Fresh;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* A stable, dependency-free hash of arbitrary text.
|
|
93
|
+
*
|
|
94
|
+
* FNV-1a, because what is being detected is "did this change", not "is this authentic" - and a
|
|
95
|
+
* design record must be readable by a browser bundle, a worker and a test with no crypto import
|
|
96
|
+
* between them.
|
|
97
|
+
*/
|
|
98
|
+
export const designHash = (...parts) => {
|
|
99
|
+
const text = parts.filter(part => part != null).join(' ');
|
|
100
|
+
let hash = 0x811c9dc5;
|
|
101
|
+
for (let at = 0; at < text.length; at += 1) {
|
|
102
|
+
hash ^= text.charCodeAt(at);
|
|
103
|
+
hash = Math.imul(hash, 0x01000193) >>> 0;
|
|
104
|
+
}
|
|
105
|
+
return hash.toString(16).padStart(8, '0');
|
|
106
|
+
};
|
|
107
|
+
/** An empty design, so every stage can fill its own slice without inventing the shape. */
|
|
108
|
+
export const emptyStoryDesign = (input) => ({
|
|
109
|
+
version: STORY_DESIGN_VERSION,
|
|
110
|
+
reserved: {},
|
|
111
|
+
entities: [],
|
|
112
|
+
screens: [],
|
|
113
|
+
components: [],
|
|
114
|
+
types: [],
|
|
115
|
+
resources: [],
|
|
116
|
+
models: [],
|
|
117
|
+
api: [],
|
|
118
|
+
stores: [],
|
|
119
|
+
transitions: [],
|
|
120
|
+
access: { list: {}, resolvedAt: {} },
|
|
121
|
+
provenance: {
|
|
122
|
+
designedAt: new Date().toISOString(),
|
|
123
|
+
narrativeHash: '',
|
|
124
|
+
projectHash: '',
|
|
125
|
+
registryHash: '',
|
|
126
|
+
paths: [],
|
|
127
|
+
},
|
|
128
|
+
...input,
|
|
129
|
+
});
|
|
130
|
+
/**
|
|
131
|
+
* The design, small enough to hand a model, complete enough to act on.
|
|
132
|
+
*
|
|
133
|
+
* What a free-flight agent needs is names and counts: which screens exist, what is on them, which
|
|
134
|
+
* types and endpoints the story implies. The UX and UI prose is the bulk of a design and none of
|
|
135
|
+
* it helps an agent decide what to do next, so it is deliberately left out.
|
|
136
|
+
*/
|
|
137
|
+
export const designDigest = (design) => {
|
|
138
|
+
const lines = [
|
|
139
|
+
`Story ${design.code} (${design.area}): ${design.narrative}`,
|
|
140
|
+
];
|
|
141
|
+
if (design.reserved.section != null || design.reserved.screen != null) {
|
|
142
|
+
lines.push(`Reserved: section=${design.reserved.section ?? '-'} screen=${design.reserved.screen ?? '-'}`);
|
|
143
|
+
}
|
|
144
|
+
lines.push('', 'Screens:');
|
|
145
|
+
for (const screen of design.screens) {
|
|
146
|
+
lines.push(`- ${screen.name} -> ${screen.path} (alias ${screen.alias}`
|
|
147
|
+
+ `${screen.section != null ? `, section ${screen.section}` : ''}`
|
|
148
|
+
+ `${screen.adopted ? ', existing' : ''}) renders ${screen.components.join(', ') || '-'}`);
|
|
149
|
+
}
|
|
150
|
+
lines.push('', 'Components:');
|
|
151
|
+
for (const component of design.components) {
|
|
152
|
+
lines.push(`- ${component.name} -> ${component.path} (+ ${component.viewModelPath})`
|
|
153
|
+
+ `${component.entities.length > 0 ? ` about ${component.entities.join(', ')}` : ''}`);
|
|
154
|
+
}
|
|
155
|
+
lines.push('', 'Data layer:');
|
|
156
|
+
for (const type of design.types) {
|
|
157
|
+
lines.push(`- type ${type.path} (${type.entity})`);
|
|
158
|
+
}
|
|
159
|
+
for (const resource of design.resources) {
|
|
160
|
+
lines.push(`- resource ${resource.path} (${resource.entity})`);
|
|
161
|
+
}
|
|
162
|
+
for (const model of design.models) {
|
|
163
|
+
lines.push(`- model ${model.path} (${model.entities.join(', ')})`);
|
|
164
|
+
}
|
|
165
|
+
for (const api of design.api) {
|
|
166
|
+
lines.push(`- api ${api.path} (${api.entity})`
|
|
167
|
+
+ `${api.endpoints.length > 0 ? `: ${api.endpoints.map(e => e.alias).join(', ')}` : ''}`);
|
|
168
|
+
}
|
|
169
|
+
for (const store of design.stores) {
|
|
170
|
+
lines.push(`- store ${store.path} (${store.entity})`);
|
|
171
|
+
}
|
|
172
|
+
if (design.transitions.length > 0) {
|
|
173
|
+
lines.push('', 'Transitions:');
|
|
174
|
+
for (const transition of design.transitions) {
|
|
175
|
+
lines.push(`- ${transition.from} -> ${transition.to} (${transition.action})`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const guarded = Object.keys(design.access.list);
|
|
179
|
+
if (guarded.length > 0) {
|
|
180
|
+
lines.push('', `Access declared on: ${guarded.join(', ')}`);
|
|
181
|
+
}
|
|
182
|
+
return lines.join('\n');
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Apply a patch to a design, refusing anything that would rename an allocated artifact.
|
|
186
|
+
*
|
|
187
|
+
* A path or an alias is registry-owned. Changing one behind the registry's back leaves two
|
|
188
|
+
* spellings of the same thing in a project, and no number of fix attempts repairs that — the
|
|
189
|
+
* compiler sees a missing module and the fixer, reasonably, renames the reference to match
|
|
190
|
+
* whichever spelling it found first.
|
|
191
|
+
*
|
|
192
|
+
* Returns the reason as a STRING when it refuses, so a model can read it and take the other route.
|
|
193
|
+
*/
|
|
194
|
+
export const amendStoryDesign = (design, patch) => {
|
|
195
|
+
const forbidden = [];
|
|
196
|
+
const checkList = (key, current, next) => {
|
|
197
|
+
if (!Array.isArray(next))
|
|
198
|
+
return;
|
|
199
|
+
for (const entry of next) {
|
|
200
|
+
const known = current.find(item => item.name === entry.name);
|
|
201
|
+
if (known == null)
|
|
202
|
+
continue;
|
|
203
|
+
if (entry.path != null && known.path != null && entry.path !== known.path) {
|
|
204
|
+
forbidden.push(`${key}.${String(entry.name)}.path`);
|
|
205
|
+
}
|
|
206
|
+
if (entry.alias != null && known.alias != null && entry.alias !== known.alias) {
|
|
207
|
+
forbidden.push(`${key}.${String(entry.name)}.alias`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
checkList('screens', design.screens, patch.screens);
|
|
212
|
+
checkList('components', design.components, patch.components);
|
|
213
|
+
if (forbidden.length > 0) {
|
|
214
|
+
return `Refused: ${forbidden.join(', ')} name artifacts the project's registry allocated. `
|
|
215
|
+
+ 'A design may change what a screen or a component DOES - its UX, its UI, its section, its '
|
|
216
|
+
+ 'endpoints - but never where it lives or what it is called. Rename through the registry, '
|
|
217
|
+
+ 'or leave the name alone and change the behaviour.';
|
|
218
|
+
}
|
|
219
|
+
return { ...design, ...patch };
|
|
220
|
+
};
|
|
221
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/design/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGnE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAmB,EAAa,EAAE;IAC5D,MAAM,WAAW,GAAG,CAAC,IAAY,EAAyB,EAAE;QAC1D,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;QACtE,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;YACtB,OAAO,IAAI,CAAA;QACb,CAAC;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,GAAG,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACtD,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IAED,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACnD,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;IAE5D,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,YAAY,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,oDAAoD;cACvF,2FAA2F;cAC3F,0FAA0F;cAC1F,mDAAmD,CAAA;IACzD,CAAC;IAED,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,EAAiB,CAAA;AAC/C,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/design/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/design/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAE5B,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a story needs BEYOND a screen, an endpoint and a table — and the standing answer is
|
|
3
|
+
* "nothing".
|
|
4
|
+
*
|
|
5
|
+
* A generated application has a worker process, a broker and the packages to run LLM agents inside
|
|
6
|
+
* it, and every one of those is a real cost paid by a real user: a queue turns one request into
|
|
7
|
+
* two processes and a message that can be delivered twice, and an agent turns a click into a bill.
|
|
8
|
+
* The template ships all three, so the question a design stage has to answer is not "can it" but
|
|
9
|
+
* "does this story genuinely require it". The default of every field here is the answer that costs
|
|
10
|
+
* nothing.
|
|
11
|
+
*
|
|
12
|
+
* This block is the whole vocabulary. The implementation steps that write jobs, worker processors
|
|
13
|
+
* and agents are gated on it and skip entirely when it is absent, so a story that needs none of it
|
|
14
|
+
* emits exactly the tree it emitted before any of this existed.
|
|
15
|
+
*/
|
|
16
|
+
/** Who acts in a story. */
|
|
17
|
+
export declare enum StoryActor {
|
|
18
|
+
/** A person, in one of the four areas. Every story until something says otherwise. */
|
|
19
|
+
Human = "human",
|
|
20
|
+
/**
|
|
21
|
+
* The application's own LLM agent.
|
|
22
|
+
*
|
|
23
|
+
* An EPHEMERAL role: it holds no permissions and has no area of its own, because there is nobody
|
|
24
|
+
* to sign in as it. A story belongs to it when the work is the agent's — the human half is a
|
|
25
|
+
* separate, paired story that starts the work and watches it.
|
|
26
|
+
*/
|
|
27
|
+
Agent = "agent",
|
|
28
|
+
/** A queue consumer. Ephemeral in exactly the same sense. */
|
|
29
|
+
Worker = "worker"
|
|
30
|
+
}
|
|
31
|
+
/** The ephemeral actors — those a permission may never be granted to. */
|
|
32
|
+
export declare const EPHEMERAL_ACTORS: StoryActor[];
|
|
33
|
+
export declare const isEphemeralActor: (actor?: StoryActor) => boolean;
|
|
34
|
+
/** One queued unit of work. */
|
|
35
|
+
export interface StoryDesignJob {
|
|
36
|
+
/** The queue it is enqueued onto. */
|
|
37
|
+
queue: string;
|
|
38
|
+
/** The job name, which IS its entrypoint alias — `app.job.<name>`. */
|
|
39
|
+
name: string;
|
|
40
|
+
/** The processor module, relative to the worker package's `src`. */
|
|
41
|
+
path: string;
|
|
42
|
+
/** What it does, in one sentence, for the coder that writes the processor. */
|
|
43
|
+
purpose: string;
|
|
44
|
+
/**
|
|
45
|
+
* Why it may not run on the request path.
|
|
46
|
+
*
|
|
47
|
+
* Recorded because it is the thing a later run has to be able to disagree with. "It might be
|
|
48
|
+
* slow" is not a reason; "it calls a model" and "it walks every row of a table the user owns"
|
|
49
|
+
* are.
|
|
50
|
+
*/
|
|
51
|
+
reason: string;
|
|
52
|
+
/**
|
|
53
|
+
* Whether running it twice is safe, and how it was made so.
|
|
54
|
+
*
|
|
55
|
+
* A worker can die mid-job; the lock expires and the step re-runs. There is no way to make that
|
|
56
|
+
* automatic, so the answer is written down where the processor's author has to read it.
|
|
57
|
+
*/
|
|
58
|
+
idempotency: string;
|
|
59
|
+
}
|
|
60
|
+
/** An LLM agent or pipeline generated INTO the target. */
|
|
61
|
+
export interface StoryDesignAgent {
|
|
62
|
+
/** Its alias in the target's own agent registry. */
|
|
63
|
+
alias: string;
|
|
64
|
+
/** The module, relative to the shared backend package's `src`. */
|
|
65
|
+
path: string;
|
|
66
|
+
/** What it is for. */
|
|
67
|
+
purpose: string;
|
|
68
|
+
/** Which of the three shapes this is — a call, a pipeline, or a tool-using agent. */
|
|
69
|
+
kind: StoryAgentKind;
|
|
70
|
+
/** The job that runs it — an agent is never invoked on the request path. */
|
|
71
|
+
job?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The three shapes that can perform work with a model, cheapest first.
|
|
75
|
+
*
|
|
76
|
+
* They are not interchangeable and the difference is who decides the order. A CALL is one prompt
|
|
77
|
+
* and one answer; a PIPELINE runs steps this application named in advance; an AGENT is handed
|
|
78
|
+
* tools and works out its own path. Each step up buys capability with latency, money and a
|
|
79
|
+
* failure mode, so the right answer is the simplest shape that does the job — and for most work
|
|
80
|
+
* that asks for a model at all, it is a call.
|
|
81
|
+
*/
|
|
82
|
+
export declare enum StoryAgentKind {
|
|
83
|
+
/** One prompt, one answer, optionally schema-shaped. The default. */
|
|
84
|
+
Call = "call",
|
|
85
|
+
/** Ordered steps decided by the application, not by the model. */
|
|
86
|
+
Pipeline = "pipeline",
|
|
87
|
+
/** The model chooses its own path through the tools it was given. */
|
|
88
|
+
Agent = "agent"
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The gate, as the design stage recorded it.
|
|
92
|
+
*
|
|
93
|
+
* Absent on a design written before this existed, and read as "none of it" everywhere — which is
|
|
94
|
+
* both the safe answer and the true one for every story developed until now.
|
|
95
|
+
*/
|
|
96
|
+
export interface StoryDesignRuntime {
|
|
97
|
+
actor: StoryActor;
|
|
98
|
+
/** Whether this story puts work on the queue at all. */
|
|
99
|
+
worker: boolean;
|
|
100
|
+
jobs: StoryDesignJob[];
|
|
101
|
+
agents: StoryDesignAgent[];
|
|
102
|
+
/**
|
|
103
|
+
* Whether this story's data belongs in the key/value store rather than in Postgres.
|
|
104
|
+
*
|
|
105
|
+
* Postgres is the default and being wrong with it is cheap. This is true only for data with an
|
|
106
|
+
* expiry, a lock, a counter or a fan-out, and a bounded, namespaced key set.
|
|
107
|
+
*/
|
|
108
|
+
kv: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Which HUMAN story shows the progress of this story's queued work.
|
|
111
|
+
*
|
|
112
|
+
* An ephemeral actor cannot report to anybody: there is no screen it owns and no session it runs
|
|
113
|
+
* in. A story that enqueues work therefore names the story whose screen carries the job feed, and
|
|
114
|
+
* the permission to enqueue and to watch is granted to that area's role.
|
|
115
|
+
*/
|
|
116
|
+
feedback?: string;
|
|
117
|
+
}
|
|
118
|
+
/** What a design carries when nobody has asked the question — and when the answer was "no". */
|
|
119
|
+
export declare const NO_RUNTIME: StoryDesignRuntime;
|
|
120
|
+
/** Read the gate off a design, total over a design that predates it. */
|
|
121
|
+
export declare const runtimeOf: (design?: {
|
|
122
|
+
runtime?: StoryDesignRuntime;
|
|
123
|
+
}) => StoryDesignRuntime;
|
|
124
|
+
/** Whether anything at all was asked for — the one check every new step is gated on. */
|
|
125
|
+
export declare const needsRuntime: (runtime: StoryDesignRuntime) => boolean;
|
|
126
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../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AAA;IAC1B;;;;;OAKG;IACH,EAAE,EAAE,OAAO,CAAA;IACX;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,+FAA+F;AAC/F,eAAO,MAAM,UAAU,EAAE,kBAMxB,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,SAAS,YAAa;IAAE,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAAE,KAAG,kBACvC,CAAA;AAE/B,wFAAwF;AACxF,eAAO,MAAM,YAAY,YAAa,kBAAkB,KAAG,OACa,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a story needs BEYOND a screen, an endpoint and a table — and the standing answer is
|
|
3
|
+
* "nothing".
|
|
4
|
+
*
|
|
5
|
+
* A generated application has a worker process, a broker and the packages to run LLM agents inside
|
|
6
|
+
* it, and every one of those is a real cost paid by a real user: a queue turns one request into
|
|
7
|
+
* two processes and a message that can be delivered twice, and an agent turns a click into a bill.
|
|
8
|
+
* The template ships all three, so the question a design stage has to answer is not "can it" but
|
|
9
|
+
* "does this story genuinely require it". The default of every field here is the answer that costs
|
|
10
|
+
* nothing.
|
|
11
|
+
*
|
|
12
|
+
* This block is the whole vocabulary. The implementation steps that write jobs, worker processors
|
|
13
|
+
* and agents are gated on it and skip entirely when it is absent, so a story that needs none of it
|
|
14
|
+
* emits exactly the tree it emitted before any of this existed.
|
|
15
|
+
*/
|
|
16
|
+
/** Who acts in a story. */
|
|
17
|
+
export var StoryActor;
|
|
18
|
+
(function (StoryActor) {
|
|
19
|
+
/** A person, in one of the four areas. Every story until something says otherwise. */
|
|
20
|
+
StoryActor["Human"] = "human";
|
|
21
|
+
/**
|
|
22
|
+
* The application's own LLM agent.
|
|
23
|
+
*
|
|
24
|
+
* An EPHEMERAL role: it holds no permissions and has no area of its own, because there is nobody
|
|
25
|
+
* to sign in as it. A story belongs to it when the work is the agent's — the human half is a
|
|
26
|
+
* separate, paired story that starts the work and watches it.
|
|
27
|
+
*/
|
|
28
|
+
StoryActor["Agent"] = "agent";
|
|
29
|
+
/** A queue consumer. Ephemeral in exactly the same sense. */
|
|
30
|
+
StoryActor["Worker"] = "worker";
|
|
31
|
+
})(StoryActor || (StoryActor = {}));
|
|
32
|
+
/** The ephemeral actors — those a permission may never be granted to. */
|
|
33
|
+
export const EPHEMERAL_ACTORS = [StoryActor.Agent, StoryActor.Worker];
|
|
34
|
+
export const isEphemeralActor = (actor) => actor != null && EPHEMERAL_ACTORS.includes(actor);
|
|
35
|
+
/**
|
|
36
|
+
* The three shapes that can perform work with a model, cheapest first.
|
|
37
|
+
*
|
|
38
|
+
* They are not interchangeable and the difference is who decides the order. A CALL is one prompt
|
|
39
|
+
* and one answer; a PIPELINE runs steps this application named in advance; an AGENT is handed
|
|
40
|
+
* tools and works out its own path. Each step up buys capability with latency, money and a
|
|
41
|
+
* failure mode, so the right answer is the simplest shape that does the job — and for most work
|
|
42
|
+
* that asks for a model at all, it is a call.
|
|
43
|
+
*/
|
|
44
|
+
export var StoryAgentKind;
|
|
45
|
+
(function (StoryAgentKind) {
|
|
46
|
+
/** One prompt, one answer, optionally schema-shaped. The default. */
|
|
47
|
+
StoryAgentKind["Call"] = "call";
|
|
48
|
+
/** Ordered steps decided by the application, not by the model. */
|
|
49
|
+
StoryAgentKind["Pipeline"] = "pipeline";
|
|
50
|
+
/** The model chooses its own path through the tools it was given. */
|
|
51
|
+
StoryAgentKind["Agent"] = "agent";
|
|
52
|
+
})(StoryAgentKind || (StoryAgentKind = {}));
|
|
53
|
+
/** What a design carries when nobody has asked the question — and when the answer was "no". */
|
|
54
|
+
export const NO_RUNTIME = {
|
|
55
|
+
actor: StoryActor.Human,
|
|
56
|
+
worker: false,
|
|
57
|
+
jobs: [],
|
|
58
|
+
agents: [],
|
|
59
|
+
kv: false,
|
|
60
|
+
};
|
|
61
|
+
/** Read the gate off a design, total over a design that predates it. */
|
|
62
|
+
export const runtimeOf = (design) => design?.runtime ?? NO_RUNTIME;
|
|
63
|
+
/** Whether anything at all was asked for — the one check every new step is gated on. */
|
|
64
|
+
export const needsRuntime = (runtime) => runtime.worker || runtime.jobs.length > 0 || runtime.agents.length > 0;
|
|
65
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/design/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,2BAA2B;AAC3B,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB,sFAAsF;IACtF,6BAAe,CAAA;IACf;;;;;;OAMG;IACH,6BAAe,CAAA;IACf,6DAA6D;IAC7D,+BAAiB,CAAA;AACnB,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAED,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAiB,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;AAEnF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAkB,EAAW,EAAE,CAC9D,KAAK,IAAI,IAAI,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AA2CnD;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,qEAAqE;IACrE,+BAAa,CAAA;IACb,kEAAkE;IAClE,uCAAqB,CAAA;IACrB,qEAAqE;IACrE,iCAAe,CAAA;AACjB,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AA+BD,+FAA+F;AAC/F,MAAM,CAAC,MAAM,UAAU,GAAuB;IAC5C,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,EAAE;IACV,EAAE,EAAE,KAAK;CACV,CAAA;AAED,wEAAwE;AACxE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAyC,EAAsB,EAAE,C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