@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,83 @@
|
|
|
1
|
+
import type { ProjectArea } from '../areas/consts.js';
|
|
2
|
+
import type { SubProject } from '../slot/consts.js';
|
|
3
|
+
/**
|
|
4
|
+
* How a target's workspace packages are ARRANGED — which of them exist, what role each plays and
|
|
5
|
+
* which compile against which.
|
|
6
|
+
*
|
|
7
|
+
* The layout tables this replaces ({@link LAYOUTS}, {@link ROLE_DIRS}) were two hand-written
|
|
8
|
+
* records keyed by a closed `TargetLayout` enum, so "the target has five packages named
|
|
9
|
+
* common/backend/api/web/worker" was not a fact ABOUT a project but a constant of the platform.
|
|
10
|
+
* Everything the pipeline could ever generate had to fit those five names.
|
|
11
|
+
*
|
|
12
|
+
* A topology is that same information as DATA: a project carries one, the two shipped layouts are
|
|
13
|
+
* just the two the platform writes by default, and the tables are derived from them rather than
|
|
14
|
+
* spelled beside them. That is what lets a target grow a second web application, a library package
|
|
15
|
+
* nobody planned, or the package a GitHub pull brought in.
|
|
16
|
+
*
|
|
17
|
+
* It is deliberately a DESCRIPTION and never a plan. Nothing here says a directory exists — a
|
|
18
|
+
* caller that acts on a package still checks the disk, exactly as `workerPath` always has.
|
|
19
|
+
*/
|
|
20
|
+
export interface TargetPackageDescriptor {
|
|
21
|
+
/**
|
|
22
|
+
* The package's directory name under {@link TopologyDescriptor.dir}, and the tail of its npm
|
|
23
|
+
* name (`<slug>-<name>`). Unique within a topology.
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* What this package IS, in the role vocabulary the wire already speaks.
|
|
28
|
+
*
|
|
29
|
+
* A list rather than a single value because one package may answer to more than one role in a
|
|
30
|
+
* smaller arrangement — a target that serves its browser app from the same process that serves
|
|
31
|
+
* its API is one package holding both `Api` and `Web`. The default topology gives every package
|
|
32
|
+
* exactly one role.
|
|
33
|
+
*/
|
|
34
|
+
roles: SubProject[];
|
|
35
|
+
/**
|
|
36
|
+
* `library` builds with `tsc -b` and is consumed through its `build/` output at RUN time;
|
|
37
|
+
* `bundle` bundles itself and keeps every dependency external.
|
|
38
|
+
*
|
|
39
|
+
* The distinction is load-bearing rather than descriptive: a bundle resolves its libraries from
|
|
40
|
+
* `node_modules` when the process starts, so a library that nothing built makes the bundle exit
|
|
41
|
+
* with a message naming a missing dependency rather than a missing build.
|
|
42
|
+
*/
|
|
43
|
+
kind: TargetPackageKind;
|
|
44
|
+
/** Sibling package NAMES this one compiles against. The build order is this graph, sorted. */
|
|
45
|
+
dependsOn: string[];
|
|
46
|
+
/**
|
|
47
|
+
* For a package holding the `Web` role: which audiences it serves.
|
|
48
|
+
*
|
|
49
|
+
* Absent means all four. A topology that splits the areas across two browser applications is
|
|
50
|
+
* the reason this exists; nothing generates one yet.
|
|
51
|
+
*/
|
|
52
|
+
areas?: ProjectArea[];
|
|
53
|
+
/** For a package holding the `Worker` role: which queues this process consumes. */
|
|
54
|
+
queues?: string[];
|
|
55
|
+
}
|
|
56
|
+
export type TargetPackageKind = 'library' | 'bundle';
|
|
57
|
+
/**
|
|
58
|
+
* One arrangement, named.
|
|
59
|
+
*
|
|
60
|
+
* `id` is what a project records; it is compared, never parsed.
|
|
61
|
+
*/
|
|
62
|
+
export interface TopologyDescriptor {
|
|
63
|
+
id: string;
|
|
64
|
+
/** The directory holding the workspace packages — `sources`, or `packages` for a legacy tree. */
|
|
65
|
+
dir: string;
|
|
66
|
+
packages: TargetPackageDescriptor[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A topology read back from a project, with the resolutions every consumer would otherwise redo.
|
|
70
|
+
*
|
|
71
|
+
* `build` and `libraries` are DERIVED — a topological sort of `dependsOn` — rather than declared,
|
|
72
|
+
* because the two lists disagreeing with the graph is a whole class of outage (a library built
|
|
73
|
+
* after the bundle that imports it) that nobody can see by reading either one.
|
|
74
|
+
*/
|
|
75
|
+
export interface ResolvedTopology extends TopologyDescriptor {
|
|
76
|
+
/** Every package, in dependency order. */
|
|
77
|
+
build: string[];
|
|
78
|
+
/** The `library`-kind packages, in dependency order. */
|
|
79
|
+
libraries: string[];
|
|
80
|
+
/** Role → the packages holding it, in topology order. */
|
|
81
|
+
byRole: Partial<Record<SubProject, TargetPackageDescriptor[]>>;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/topology/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;OAOG;IACH,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB;;;;;;;OAOG;IACH,IAAI,EAAE,iBAAiB,CAAA;IACvB,8FAA8F;IAC9F,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,CAAA;IACrB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEpD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,iGAAiG;IACjG,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,uBAAuB,EAAE,CAAA;CACpC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,0CAA0C;IAC1C,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,wDAAwD;IACxD,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAA;CAC/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/topology/types.ts"],"names":[],"mappings":""}
|
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface SlotMetadata extends SlotConstMetadata, SlotSecretMetadata, SlotListMetadata, CustomSecretMetadata {
|
|
2
|
+
}
|
|
3
|
+
export interface SlotConstMetadata {
|
|
4
|
+
projectName: string;
|
|
5
|
+
oidcClientId: string;
|
|
6
|
+
oidcRealm: string;
|
|
7
|
+
/**
|
|
8
|
+
* Fully-qualified PUBLIC OIDC issuer URL the integrated viable IAM serves this client from
|
|
9
|
+
* (`{host}/oidc`). Populated when the production IAM client is provisioned; the canonical
|
|
10
|
+
* single value a standalone self-hosted deployment of the exported target uses. Empty until
|
|
11
|
+
* provisioned.
|
|
12
|
+
*/
|
|
13
|
+
oidcIssuerUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* What the project's owner says about themselves, delivered to the generated application.
|
|
16
|
+
*
|
|
17
|
+
* Scalars rather than an object because metadata is scalar — the store is one row per key, and
|
|
18
|
+
* a nested value would have to be serialized at the boundary anyway.
|
|
19
|
+
*
|
|
20
|
+
* `brandingCredit` is the EFFECTIVE value, not the owner's intent: `''` hides the platform
|
|
21
|
+
* credit and anything else shows it. Absent means shown, so a push that never happened, or one
|
|
22
|
+
* that lost the value, keeps the credit rather than silently giving away a paid capability.
|
|
23
|
+
*/
|
|
24
|
+
brandingCopyright: string;
|
|
25
|
+
brandingOrganization: string;
|
|
26
|
+
brandingTermsUrl: string;
|
|
27
|
+
brandingPrivacyUrl: string;
|
|
28
|
+
brandingCredit: string;
|
|
29
|
+
brandingHideCreditIntent: string;
|
|
30
|
+
}
|
|
31
|
+
export interface SlotSecretMetadata {
|
|
32
|
+
oidcClientSecret: string;
|
|
33
|
+
/**
|
|
34
|
+
* The application role's password — the one database credential the generated app legitimately
|
|
35
|
+
* holds, and the one it already carries inside `DATABASE_URL`.
|
|
36
|
+
*
|
|
37
|
+
* The sidecar's SUPERUSER password is deliberately absent from this interface. Everything in
|
|
38
|
+
* `SlotMetadata` is pushed into the slot as `sandbox-meta.json`, which is a world-readable file
|
|
39
|
+
* in the untrusted application's own directory; the admin credential is kept platform-side and
|
|
40
|
+
* reaches the pod only as a Kubernetes Secret mounted into the Postgres container.
|
|
41
|
+
*/
|
|
42
|
+
dbAppPassword?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Password of the queue store's `app` ACL user — the whole of what the slot is given for its
|
|
45
|
+
* Valkey sidecar, and what it already carries inside `VALKEY_URL`.
|
|
46
|
+
*
|
|
47
|
+
* The store's `ops` user is deliberately absent for the same reason the Postgres superuser is:
|
|
48
|
+
* it holds the administrative surface, and everything in `SlotMetadata` lands in the untrusted
|
|
49
|
+
* application's own directory. Its password lives only in the ACL Secret.
|
|
50
|
+
*/
|
|
51
|
+
valkeyPassword?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface SlotListMetadata {
|
|
54
|
+
permissions: string[];
|
|
55
|
+
backendEnvVars: string[];
|
|
56
|
+
frontendEnvVars: string[];
|
|
57
|
+
/**
|
|
58
|
+
* Owner-registered allowed OIDC redirect URIs for the production (standalone) client.
|
|
59
|
+
* Each entry is a full callback URL of a self-hosted deployment of the exported target
|
|
60
|
+
* project. Combined with the production hosts (generated + custom domain) when the
|
|
61
|
+
* production IAM client is (re)provisioned.
|
|
62
|
+
*/
|
|
63
|
+
oidcRedirectUris: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Origins the target's own API accepts browser requests from.
|
|
66
|
+
*
|
|
67
|
+
* The redirect URIs say where a login may RETURN to; these say who may call the API afterwards.
|
|
68
|
+
* They are separate lists because they answer different questions and are wrong in different
|
|
69
|
+
* ways: an unregistered redirect URI is a login that cannot complete, an unlisted origin is an
|
|
70
|
+
* app that loads and then fails every request it makes.
|
|
71
|
+
*
|
|
72
|
+
* Set by the owner for a deployment the platform does not host — a target published on their own
|
|
73
|
+
* domain, or run on a developer's machine on a port the platform never chose. The platform's own
|
|
74
|
+
* hosts are always accepted and are never in this list.
|
|
75
|
+
*/
|
|
76
|
+
allowedOrigins: string[];
|
|
77
|
+
}
|
|
78
|
+
export interface CustomSecretMetadata {
|
|
79
|
+
backendSecrets: Record<string, string>;
|
|
80
|
+
frontendSecrets: Record<string, string>;
|
|
81
|
+
}
|
|
82
|
+
export interface NonSecretScalarSlotMetadata extends SlotConstMetadata {
|
|
83
|
+
}
|
|
84
|
+
export interface ScalarSlotMetadata extends SlotConstMetadata, SlotSecretMetadata {
|
|
85
|
+
}
|
|
86
|
+
export interface ConfigSlotMetadata extends SlotConstMetadata, SlotListMetadata {
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAa,SAC5B,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;;;;;;;;OASG;IACH,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,gBAAgB,EAAE,MAAM,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,wBAAwB,EAAE,MAAM,CAAA;CACjC;AAED,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAA;IACxB;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B;;;;;;;;;;;OAWG;IACH,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACxC;AAED,MAAM,WAAW,2BAA4B,SAC3C,iBAAiB;CAClB;AAED,MAAM,WAAW,kBAAmB,SAClC,iBAAiB,EACjB,kBAAkB;CACnB;AAED,MAAM,WAAW,kBAAmB,SAClC,iBAAiB,EACjB,gBAAgB;CACjB"}
|
package/build/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/ux/consts.ts"],"names":[],"mappings":"AACA,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/ux/consts.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;AACzB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ux/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ux/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JSONSchemaType } from "ajv";
|
|
2
|
+
import type { UXScreenList, UXComponentList, UXScreenToComponent, UXTransition, UXTransitionList } from "./types.js";
|
|
3
|
+
export declare const UXScreenListSchema: JSONSchemaType<UXScreenList>;
|
|
4
|
+
export declare const UXComponentListSchema: JSONSchemaType<UXComponentList>;
|
|
5
|
+
export declare const UXScreenToComponentSchema: JSONSchemaType<UXScreenToComponent>;
|
|
6
|
+
export declare const UXTransitionSchema: JSONSchemaType<UXTransition>;
|
|
7
|
+
export declare const UXTransitionListSchema: JSONSchemaType<UXTransitionList>;
|
|
8
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/ux/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGpH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CAgB3D,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,eAAe,CAgBjE,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,mBAAmB,CAUzE,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CA6B3D,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,gBAAgB,CAanE,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { UXTransitionType } from "./consts.js";
|
|
2
|
+
export const UXScreenListSchema = {
|
|
3
|
+
type: "object",
|
|
4
|
+
title: "UXScreenList",
|
|
5
|
+
description: "Object with screen list",
|
|
6
|
+
properties: {
|
|
7
|
+
screens: {
|
|
8
|
+
type: "array",
|
|
9
|
+
items: {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "Technical screen name, no spaces, kebab-case notation with slashes allowed"
|
|
12
|
+
},
|
|
13
|
+
description: "List of screens"
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
required: ["screens"],
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
};
|
|
19
|
+
export const UXComponentListSchema = {
|
|
20
|
+
type: "object",
|
|
21
|
+
title: "UXComponentList",
|
|
22
|
+
description: "Object with component list",
|
|
23
|
+
properties: {
|
|
24
|
+
components: {
|
|
25
|
+
type: "array",
|
|
26
|
+
items: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Technical component name, no spaces, kebab-case notation with slashes allowed"
|
|
29
|
+
},
|
|
30
|
+
description: "List of components"
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
required: ["components"],
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
};
|
|
36
|
+
export const UXScreenToComponentSchema = {
|
|
37
|
+
type: "object",
|
|
38
|
+
properties: {},
|
|
39
|
+
additionalProperties: {
|
|
40
|
+
type: "array",
|
|
41
|
+
items: {
|
|
42
|
+
type: "string",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: []
|
|
46
|
+
};
|
|
47
|
+
export const UXTransitionSchema = {
|
|
48
|
+
type: "object",
|
|
49
|
+
title: "UXTransition",
|
|
50
|
+
description: "Transition between screens or components during interaction",
|
|
51
|
+
properties: {
|
|
52
|
+
from: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "Initial screen or component"
|
|
55
|
+
},
|
|
56
|
+
to: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "Final screen or component"
|
|
59
|
+
},
|
|
60
|
+
initiator: {
|
|
61
|
+
type: "string",
|
|
62
|
+
description: "Component that initiated the transition"
|
|
63
|
+
},
|
|
64
|
+
action: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "Action that triggered the transition"
|
|
67
|
+
},
|
|
68
|
+
type: {
|
|
69
|
+
type: "string",
|
|
70
|
+
enum: Object.values(UXTransitionType),
|
|
71
|
+
description: "Transition happens between (type level of transition)"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
required: ["from", "to", "initiator", "action", "type"],
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
};
|
|
77
|
+
export const UXTransitionListSchema = {
|
|
78
|
+
type: "object",
|
|
79
|
+
title: "UXTransitionList",
|
|
80
|
+
description: "Object with transition list",
|
|
81
|
+
properties: {
|
|
82
|
+
transitions: {
|
|
83
|
+
type: "array",
|
|
84
|
+
items: UXTransitionSchema,
|
|
85
|
+
description: "Transitions"
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
required: ["transitions"],
|
|
89
|
+
additionalProperties: false,
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/ux/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,CAAC,MAAM,kBAAkB,GAAiC;IAC9D,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,yBAAyB;IACtC,UAAU,EAAE;QACV,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4EAA4E;aAC1F;YACD,WAAW,EAAE,iBAAiB;SAC/B;KACF;IACD,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAoC;IACpE,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,4BAA4B;IACzC,UAAU,EAAE;QACV,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+EAA+E;aAC7F;YACD,WAAW,EAAE,oBAAoB;SAClC;KACF;IACD,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAwC;IAC5E,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,EAAE;IACd,oBAAoB,EAAE;QACpB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;SACf;KACF;IACD,QAAQ,EAAE,EAAE;CACb,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAiC;IAC9D,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,6DAA6D;IAC1E,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6BAA6B;SAC3C;QACD,EAAE,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,2BAA2B;SACzC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yCAAyC;SACvD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,sCAAsC;SACpD;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;YACrC,WAAW,EAAE,uDAAuD;SACrE;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;IACvD,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAqC;IACtE,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,6BAA6B;IAC1C,UAAU,EAAE;QACV,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,aAAa;SAC3B;KACF;IACD,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { UXTransitionType } from "./consts.js";
|
|
2
|
+
export interface UXScreenList {
|
|
3
|
+
screens: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface UXComponentList {
|
|
6
|
+
components: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface UXScreenToComponent {
|
|
9
|
+
[screen: string]: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface UXTransition {
|
|
12
|
+
from: string;
|
|
13
|
+
to: string;
|
|
14
|
+
initiator: string;
|
|
15
|
+
action: string;
|
|
16
|
+
type: UXTransitionType;
|
|
17
|
+
}
|
|
18
|
+
export interface UXTransitionList {
|
|
19
|
+
transitions: UXTransition[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ux/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,gBAAgB,CAAA;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,YAAY,EAAE,CAAA;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ux/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@owlmeans/viable-common",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Runtime-free contracts of the OwlMeans Viable platform — the analysis, design and metadata shapes of a generated project, its target-shape manifest, the slot command vocabulary, the connector protocol and the conversion vocabulary.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc -b",
|
|
9
|
+
"dev": "nodemon -e ts,tsx,json --watch src --exec \"tsc -p ./tsconfig.json\"",
|
|
10
|
+
"watch": "tsc -b -w --preserveWatchOutput --pretty",
|
|
11
|
+
"test": "bun test ./tests"
|
|
12
|
+
},
|
|
13
|
+
"main": "build/index.js",
|
|
14
|
+
"module": "build/index.js",
|
|
15
|
+
"types": "build/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./build/index.js",
|
|
19
|
+
"require": "./build/index.js",
|
|
20
|
+
"default": "./build/index.js",
|
|
21
|
+
"module": "./build/index.js",
|
|
22
|
+
"types": "./build/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./slot": {
|
|
25
|
+
"import": "./build/slot/index.js",
|
|
26
|
+
"require": "./build/slot/index.js",
|
|
27
|
+
"default": "./build/slot/index.js",
|
|
28
|
+
"module": "./build/slot/index.js",
|
|
29
|
+
"types": "./build/slot/index.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./connect": {
|
|
32
|
+
"import": "./build/connect/index.js",
|
|
33
|
+
"require": "./build/connect/index.js",
|
|
34
|
+
"default": "./build/connect/index.js",
|
|
35
|
+
"module": "./build/connect/index.js",
|
|
36
|
+
"types": "./build/connect/index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./convert": {
|
|
39
|
+
"import": "./build/convert/index.js",
|
|
40
|
+
"require": "./build/convert/index.js",
|
|
41
|
+
"default": "./build/convert/index.js",
|
|
42
|
+
"module": "./build/convert/index.js",
|
|
43
|
+
"types": "./build/convert/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./integrity": {
|
|
46
|
+
"import": "./build/integrity/index.js",
|
|
47
|
+
"require": "./build/integrity/index.js",
|
|
48
|
+
"default": "./build/integrity/index.js",
|
|
49
|
+
"module": "./build/integrity/index.js",
|
|
50
|
+
"types": "./build/integrity/index.d.ts"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@langchain/core": "^1.2.9",
|
|
55
|
+
"@owlmeans/dep-config": "workspace:*",
|
|
56
|
+
"ajv": "^8.17.1",
|
|
57
|
+
"ajv-formats": "^3.0.1",
|
|
58
|
+
"nodemon": "^3.1.14",
|
|
59
|
+
"typescript": "^7.0.2"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@owlmeans/agent-common": "^0.1.18-rc.17",
|
|
63
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.12",
|
|
64
|
+
"@owlmeans/error": "^0.1.18-rc.9",
|
|
65
|
+
"@owlmeans/llm-common": "^0.1.18-rc.13",
|
|
66
|
+
"@owlmeans/route": "^0.1.18-rc.10"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent-memory contracts, re-exported under viable's own name.
|
|
3
|
+
*
|
|
4
|
+
* The platform reaches `@owlmeans/agent-common` through here rather than importing it directly,
|
|
5
|
+
* for the same reason it reaches the LLM contracts through this package: the platform pins one
|
|
6
|
+
* version of the agent library, and a direct import would bind it to a second copy of the same
|
|
7
|
+
* types. Serializable contracts only — the runtime is `@owlmeans/agent`, re-exported by
|
|
8
|
+
* `@owlmeans/viable`.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export { AgentRunStatus, conversationFor, truncateAt } from '@owlmeans/agent-common'
|
|
12
|
+
|
|
13
|
+
export type {
|
|
14
|
+
ConversationRef, ConversationEvent, ConversationEventInput,
|
|
15
|
+
MemoryNode, MemoryEvent, MemoryEventInput,
|
|
16
|
+
} from '@owlmeans/agent-common'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
/** Viable's concrete instance of the open `kind` field on a spectator entry. */
|
|
3
|
+
export enum SpectatorEntryKind {
|
|
4
|
+
Coder = 'coder',
|
|
5
|
+
Fixer = 'fixer',
|
|
6
|
+
General = 'general'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Owned by `@owlmeans/llm-common` — re-exported so consumers need one import only. */
|
|
10
|
+
export { SpectatorContentType } from '@owlmeans/llm-common'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SpectatorEntry as LlmSpectatorEntry } from '@owlmeans/llm-common'
|
|
2
|
+
import type { SpectatorEntryKind } from './consts.js'
|
|
3
|
+
import type { PurposeMetadata } from '../types.js'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The spectator record contracts are owned by `@owlmeans/llm-common`; viable narrows
|
|
7
|
+
* `kind` and `purpose` to its own enums on {@link SpectatorEntry}.
|
|
8
|
+
*/
|
|
9
|
+
export type { SpectatorArgument, SpectatorEntryMessage } from '@owlmeans/llm-common'
|
|
10
|
+
|
|
11
|
+
export interface SpectatorEntry extends LlmSpectatorEntry {
|
|
12
|
+
kind: SpectatorEntryKind
|
|
13
|
+
purpose: PurposeMetadata
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LlmPurpose } from '@owlmeans/llm-common'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Observability metadata attached to every model call. Extends the generic
|
|
5
|
+
* `@owlmeans/llm-common` purpose (`type`, `dedication`) with viable's attribution fields.
|
|
6
|
+
*/
|
|
7
|
+
export interface PurposeMetadata extends LlmPurpose {
|
|
8
|
+
viableAgent?: string
|
|
9
|
+
viableHelper?: string
|
|
10
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { AccessLevel } from '../dev/consts.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The audiences a generated application serves.
|
|
5
|
+
*
|
|
6
|
+
* Every application has these four and only these four. A product's own roles are not new
|
|
7
|
+
* areas — they fall into one of these: anyone acting on the product's business process from
|
|
8
|
+
* the inside is an OPERATOR, anyone consuming the product's value as an end user is a USER.
|
|
9
|
+
* The set is closed so that navigation, access and preview all key off the same vocabulary;
|
|
10
|
+
* an application that needs a fifth audience needs a permission, not an area.
|
|
11
|
+
*/
|
|
12
|
+
export enum ProjectArea {
|
|
13
|
+
/** Unauthenticated. The public face of the application. */
|
|
14
|
+
Guest = 'guest',
|
|
15
|
+
/** Signed-in end users — the front office. */
|
|
16
|
+
User = 'user',
|
|
17
|
+
/** The owner. Holds {@link ADMIN_PERMISSION} and passes every gate. */
|
|
18
|
+
Admin = 'admin',
|
|
19
|
+
/** Staff running the business process — the back office. */
|
|
20
|
+
Operator = 'operator',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Where each area lives in the URL. One frontend, four prefixes — never four applications.
|
|
25
|
+
*
|
|
26
|
+
* The guest area owns `/` because it is the only area an anonymous visitor can reach, so it
|
|
27
|
+
* has to be what a bare hostname serves.
|
|
28
|
+
*/
|
|
29
|
+
export const AREA_PATHS: Record<ProjectArea, string> = {
|
|
30
|
+
[ProjectArea.Guest]: '/',
|
|
31
|
+
[ProjectArea.User]: '/frontoffice',
|
|
32
|
+
[ProjectArea.Admin]: '/admin',
|
|
33
|
+
[ProjectArea.Operator]: '/backoffice',
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Areas in menu/footer order — guest first, then the authenticated ones. */
|
|
37
|
+
export const PROJECT_AREAS: ProjectArea[] = [
|
|
38
|
+
ProjectArea.Guest, ProjectArea.User, ProjectArea.Admin, ProjectArea.Operator
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The prefix of an AREA entrypoint — the parent every screen of that area hangs under.
|
|
43
|
+
*
|
|
44
|
+
* An area is addressed like a screen and rendered by the same router, so it has to be
|
|
45
|
+
* excluded explicitly wherever "the entrypoint of this screen" is being resolved — exactly
|
|
46
|
+
* as {@link ALIAS_PREFIX_WEB_LAYOUT} was.
|
|
47
|
+
*/
|
|
48
|
+
export const ALIAS_PREFIX_WEB_AREA = 'web:area:'
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The owner's marker permission.
|
|
52
|
+
*
|
|
53
|
+
* It is a MARKER, not a scope: holding it means passing every gate, because the owner of a
|
|
54
|
+
* project is not a role inside it. A "limited admin" is therefore not this — it is an
|
|
55
|
+
* ordinary user holding some of the project's own permissions.
|
|
56
|
+
*
|
|
57
|
+
* Spelled as `<resource>--<action>` like every generated permission, on a resource name no
|
|
58
|
+
* domain entity can take.
|
|
59
|
+
*/
|
|
60
|
+
export const ADMIN_PERMISSION = 'project--admin'
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The back office's marker permission.
|
|
64
|
+
*
|
|
65
|
+
* The operator area is where an organization's own staff work, and until this existed it was
|
|
66
|
+
* declared `guard(DEFAULT_GUARD)` alone — any signed-in person, which for a generated application
|
|
67
|
+
* means any visitor who typed an email address. The per-screen gates story development adds narrow
|
|
68
|
+
* particular screens; they cannot narrow the area, and a project with nothing developed yet has
|
|
69
|
+
* none of them at all, so the whole back office stood open by construction.
|
|
70
|
+
*
|
|
71
|
+
* It is a MARKER like {@link ADMIN_PERMISSION}, but it is NOT a bypass: it says a person belongs in
|
|
72
|
+
* the back office, and each screen's own permission still decides what they may do there. That AND
|
|
73
|
+
* is expressed by the area declaring the marker and the screen declaring its own — never by adding
|
|
74
|
+
* the marker to a screen's gate, where the OR between gate params would make it sufficient on its
|
|
75
|
+
* own and the screen's permission would stop meaning anything.
|
|
76
|
+
*
|
|
77
|
+
* Granted by the platform to the owning organization's people, exactly as the owner marker is, and
|
|
78
|
+
* to nobody else by default: a customer of the generated app is not staff.
|
|
79
|
+
*/
|
|
80
|
+
export const OPERATOR_PERMISSION = 'project--operator'
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The access an area implies for the screens under it.
|
|
84
|
+
*
|
|
85
|
+
* Screens INHERIT this from the area declaration and never restate it. Only the operator
|
|
86
|
+
* area needs anything per screen — its gate names which permission that particular screen
|
|
87
|
+
* demands, which is the one thing an area cannot know.
|
|
88
|
+
*/
|
|
89
|
+
export const AREA_ACCESS: Record<ProjectArea, AccessLevel> = {
|
|
90
|
+
[ProjectArea.Guest]: AccessLevel.Guest,
|
|
91
|
+
[ProjectArea.User]: AccessLevel.User,
|
|
92
|
+
[ProjectArea.Admin]: AccessLevel.Admin,
|
|
93
|
+
[ProjectArea.Operator]: AccessLevel.Permissioned,
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The grouping tag a story's area gives the permissions it declares.
|
|
98
|
+
*
|
|
99
|
+
* A TAG on the permission definition, never a segment of the permission's name. The gate treats a
|
|
100
|
+
* name as one opaque string, so putting a tier inside it would buy nothing at request time while
|
|
101
|
+
* making every existing permission a different permission — orphaning every grant already made
|
|
102
|
+
* against it, with no way to migrate the grant across.
|
|
103
|
+
*
|
|
104
|
+
* Two areas declare nothing. Guest is public and needs no permission. Admin's whole rule is
|
|
105
|
+
* {@link ADMIN_PERMISSION}, which the platform grants and no story ever registers.
|
|
106
|
+
*/
|
|
107
|
+
export const AREA_TIER: Record<ProjectArea, string | null> = {
|
|
108
|
+
[ProjectArea.Guest]: null,
|
|
109
|
+
[ProjectArea.User]: ProjectArea.User,
|
|
110
|
+
[ProjectArea.Admin]: null,
|
|
111
|
+
[ProjectArea.Operator]: ProjectArea.Operator,
|
|
112
|
+
}
|