@owlmeans/viable-common 0.0.43 → 0.0.45
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 +3 -3
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/agent-presentation/SKILL.md +4 -4
- package/agent-meta/skills/viable-common/SKILL.md +59 -36
- package/build/agent/consts.d.ts +58 -0
- package/build/agent/consts.d.ts.map +1 -0
- package/build/agent/consts.js +63 -0
- package/build/agent/consts.js.map +1 -0
- package/build/agent/consts.local.d.ts +21 -0
- package/build/agent/consts.local.d.ts.map +1 -0
- package/build/agent/consts.local.js +44 -0
- package/build/agent/consts.local.js.map +1 -0
- package/build/agent/index.d.ts +2 -0
- package/build/agent/index.d.ts.map +1 -1
- package/build/agent/index.js +1 -0
- package/build/agent/index.js.map +1 -1
- package/build/agent/presentation/types.d.ts +21 -0
- package/build/agent/presentation/types.d.ts.map +1 -0
- package/build/agent/presentation/types.js.map +1 -0
- package/build/agent/presentation.d.ts +12 -94
- package/build/agent/presentation.d.ts.map +1 -1
- package/build/agent/presentation.js +218 -299
- package/build/agent/presentation.js.map +1 -1
- package/build/agent/types.d.ts +30 -0
- package/build/agent/types.d.ts.map +1 -1
- package/build/agent/types.local.d.ts +4 -0
- package/build/agent/types.local.d.ts.map +1 -0
- package/build/agent/types.local.js +2 -0
- package/build/agent/types.local.js.map +1 -0
- package/build/areas/consts.d.ts +5 -0
- package/build/areas/consts.d.ts.map +1 -1
- package/build/areas/consts.js +4 -0
- package/build/areas/consts.js.map +1 -1
- package/build/areas/index.d.ts +1 -0
- package/build/areas/index.d.ts.map +1 -1
- package/build/areas/index.js.map +1 -1
- package/build/areas/tenancy/types.d.ts +23 -0
- package/build/areas/tenancy/types.d.ts.map +1 -0
- package/build/areas/tenancy/types.js +2 -0
- package/build/areas/tenancy/types.js.map +1 -0
- package/build/areas/tenancy.d.ts +6 -50
- package/build/areas/tenancy.d.ts.map +1 -1
- package/build/areas/tenancy.js +21 -31
- package/build/areas/tenancy.js.map +1 -1
- package/build/areas/types.d.ts +32 -0
- package/build/areas/types.d.ts.map +1 -1
- package/build/ba/connecting/types.d.ts +45 -0
- package/build/ba/connecting/types.d.ts.map +1 -0
- package/build/ba/connecting/types.js +2 -0
- package/build/ba/connecting/types.js.map +1 -0
- package/build/ba/connecting.d.ts +4 -0
- package/build/ba/connecting.d.ts.map +1 -0
- package/build/ba/connecting.js +47 -0
- package/build/ba/connecting.js.map +1 -0
- package/build/ba/helpers.d.ts +4 -39
- package/build/ba/helpers.d.ts.map +1 -1
- package/build/ba/helpers.js +5 -79
- package/build/ba/helpers.js.map +1 -1
- package/build/ba/index.d.ts +2 -0
- package/build/ba/index.d.ts.map +1 -1
- package/build/ba/index.js +1 -0
- package/build/ba/index.js.map +1 -1
- package/build/ba/types.d.ts +1 -1
- package/build/ba/types.d.ts.map +1 -1
- package/build/blueprint/consts.d.ts +41 -0
- package/build/blueprint/consts.d.ts.map +1 -1
- package/build/blueprint/consts.js +51 -0
- package/build/blueprint/consts.js.map +1 -1
- package/build/blueprint/consts.local.d.ts +2 -0
- package/build/blueprint/consts.local.d.ts.map +1 -0
- package/build/blueprint/consts.local.js +3 -0
- package/build/blueprint/consts.local.js.map +1 -0
- package/build/blueprint/index.d.ts +1 -0
- package/build/blueprint/index.d.ts.map +1 -1
- package/build/blueprint/index.js +1 -0
- package/build/blueprint/index.js.map +1 -1
- package/build/blueprint/types.d.ts +3 -52
- package/build/blueprint/types.d.ts.map +1 -1
- package/build/blueprint/types.js +1 -65
- package/build/blueprint/types.js.map +1 -1
- package/build/blueprint/utils.d.ts +11 -0
- package/build/blueprint/utils.d.ts.map +1 -0
- package/build/blueprint/utils.js +16 -0
- package/build/blueprint/utils.js.map +1 -0
- package/build/branding.d.ts +0 -8
- package/build/branding.d.ts.map +1 -1
- package/build/branding.js +0 -16
- package/build/branding.js.map +1 -1
- package/build/connect/branding/types.d.ts +28 -0
- package/build/connect/branding/types.d.ts.map +1 -0
- package/build/connect/branding/types.js +2 -0
- package/build/connect/branding/types.js.map +1 -0
- package/build/connect/consts.d.ts +2 -10
- package/build/connect/consts.d.ts.map +1 -1
- package/build/connect/consts.js +2 -23
- package/build/connect/consts.js.map +1 -1
- package/build/connect/conversion/types.d.ts +93 -0
- package/build/connect/conversion/types.d.ts.map +1 -0
- package/build/connect/conversion/types.js +2 -0
- package/build/connect/conversion/types.js.map +1 -0
- package/build/connect/entrypoints/types.d.ts +30 -0
- package/build/connect/entrypoints/types.d.ts.map +1 -0
- package/build/connect/entrypoints/types.js +2 -0
- package/build/connect/entrypoints/types.js.map +1 -0
- package/build/connect/entrypoints.d.ts +61 -92
- package/build/connect/entrypoints.d.ts.map +1 -1
- package/build/connect/entrypoints.js +5 -2
- package/build/connect/entrypoints.js.map +1 -1
- package/build/connect/errors/types.d.ts +20 -0
- package/build/connect/errors/types.d.ts.map +1 -0
- package/build/connect/errors/types.js +2 -0
- package/build/connect/errors/types.js.map +1 -0
- package/build/connect/errors.d.ts +32 -0
- package/build/connect/errors.d.ts.map +1 -1
- package/build/connect/errors.js +65 -0
- package/build/connect/errors.js.map +1 -1
- package/build/connect/index.d.ts +13 -2
- package/build/connect/index.d.ts.map +1 -1
- package/build/connect/index.js +1 -0
- package/build/connect/index.js.map +1 -1
- package/build/connect/kit/types.d.ts +52 -0
- package/build/connect/kit/types.d.ts.map +1 -0
- package/build/connect/kit/types.js +2 -0
- package/build/connect/{types.js.map → kit/types.js.map} +1 -1
- package/build/connect/model-tier/types.d.ts +16 -0
- package/build/connect/model-tier/types.d.ts.map +1 -0
- package/build/connect/model-tier/types.js +2 -0
- package/build/connect/model-tier/types.js.map +1 -0
- package/build/connect/model-tier.d.ts +4 -0
- package/build/connect/model-tier.d.ts.map +1 -0
- package/build/connect/model-tier.js +21 -0
- package/build/connect/model-tier.js.map +1 -0
- package/build/connect/{ops.d.ts → ops/types.d.ts} +13 -4
- package/build/connect/ops/types.d.ts.map +1 -0
- package/build/connect/ops/types.js +2 -0
- package/build/connect/ops/types.js.map +1 -0
- package/build/connect/pipeline/types.d.ts +39 -0
- package/build/connect/pipeline/types.d.ts.map +1 -0
- package/build/connect/pipeline/types.js +2 -0
- package/build/connect/pipeline/types.js.map +1 -0
- package/build/connect/project/types.d.ts +127 -0
- package/build/connect/project/types.d.ts.map +1 -0
- package/build/connect/project/types.js +2 -0
- package/build/connect/project/types.js.map +1 -0
- package/build/connect/references/types.d.ts +157 -0
- package/build/connect/references/types.d.ts.map +1 -0
- package/build/connect/references/types.js +2 -0
- package/build/connect/references/types.js.map +1 -0
- package/build/connect/references/types.local.d.ts +5 -0
- package/build/connect/references/types.local.d.ts.map +1 -0
- package/build/connect/references/types.local.js +2 -0
- package/build/connect/references/types.local.js.map +1 -0
- package/build/connect/references.d.ts +1 -153
- package/build/connect/references.d.ts.map +1 -1
- package/build/connect/references.js.map +1 -1
- package/build/connect/schemas.d.ts +9 -5
- package/build/connect/schemas.d.ts.map +1 -1
- package/build/connect/schemas.js +10 -3
- package/build/connect/schemas.js.map +1 -1
- package/build/connect/session/types.d.ts +73 -0
- package/build/connect/session/types.d.ts.map +1 -0
- package/build/connect/session/types.js +2 -0
- package/build/connect/session/types.js.map +1 -0
- package/build/connect/settings/types.d.ts +48 -0
- package/build/connect/settings/types.d.ts.map +1 -0
- package/build/connect/settings/types.js +2 -0
- package/build/connect/settings/types.js.map +1 -0
- package/build/consts.d.ts +8 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +16 -0
- package/build/consts.js.map +1 -1
- package/build/convert/analysis/types.d.ts +93 -0
- package/build/convert/analysis/types.d.ts.map +1 -0
- package/build/convert/analysis/types.js +2 -0
- package/build/convert/analysis/types.js.map +1 -0
- package/build/convert/census/consts.local.d.ts +55 -0
- package/build/convert/census/consts.local.d.ts.map +1 -0
- package/build/convert/census/consts.local.js +104 -0
- package/build/convert/census/consts.local.js.map +1 -0
- package/build/convert/census/types.d.ts +176 -0
- package/build/convert/census/types.d.ts.map +1 -0
- package/build/convert/census/types.js +2 -0
- package/build/convert/census/types.js.map +1 -0
- package/build/convert/census.d.ts +4 -0
- package/build/convert/census.d.ts.map +1 -0
- package/build/convert/census.js +83 -0
- package/build/convert/census.js.map +1 -0
- package/build/convert/consts.d.ts +4 -12
- package/build/convert/consts.d.ts.map +1 -1
- package/build/convert/consts.js +4 -3
- package/build/convert/consts.js.map +1 -1
- package/build/convert/detection/types.d.ts +67 -0
- package/build/convert/detection/types.d.ts.map +1 -0
- package/build/convert/detection/types.js +2 -0
- package/build/convert/detection/types.js.map +1 -0
- package/build/convert/docs/types.d.ts +129 -0
- package/build/convert/docs/types.d.ts.map +1 -0
- package/build/convert/docs/types.js +2 -0
- package/build/convert/docs/types.js.map +1 -0
- package/build/convert/docs.d.ts +4 -0
- package/build/convert/docs.d.ts.map +1 -0
- package/build/convert/docs.js +9 -0
- package/build/convert/docs.js.map +1 -0
- package/build/convert/estimate/types.d.ts +77 -0
- package/build/convert/estimate/types.d.ts.map +1 -0
- package/build/convert/estimate/types.js +2 -0
- package/build/convert/estimate/types.js.map +1 -0
- package/build/convert/estimate.d.ts +11 -0
- package/build/convert/estimate.d.ts.map +1 -0
- package/build/convert/estimate.js +18 -0
- package/build/convert/estimate.js.map +1 -0
- package/build/convert/helpers.d.ts +14 -78
- package/build/convert/helpers.d.ts.map +1 -1
- package/build/convert/helpers.js +27 -300
- package/build/convert/helpers.js.map +1 -1
- package/build/convert/index.d.ts +15 -0
- package/build/convert/index.d.ts.map +1 -1
- package/build/convert/index.js +6 -0
- package/build/convert/index.js.map +1 -1
- package/build/convert/origin/types.d.ts +41 -0
- package/build/convert/origin/types.d.ts.map +1 -0
- package/build/convert/origin/types.js +2 -0
- package/build/convert/origin/types.js.map +1 -0
- package/build/convert/origin.d.ts +4 -0
- package/build/convert/origin.d.ts.map +1 -0
- package/build/convert/origin.js +25 -0
- package/build/convert/origin.js.map +1 -0
- package/build/convert/record/types.d.ts +98 -0
- package/build/convert/record/types.d.ts.map +1 -0
- package/build/convert/record/types.js +2 -0
- package/build/convert/record/types.js.map +1 -0
- package/build/convert/schemas.d.ts +7 -6
- package/build/convert/schemas.d.ts.map +1 -1
- package/build/convert/schemas.js +1 -5
- package/build/convert/schemas.js.map +1 -1
- package/build/convert/stage/types.d.ts +27 -0
- package/build/convert/stage/types.d.ts.map +1 -0
- package/build/convert/stage/types.js +2 -0
- package/build/convert/stage/types.js.map +1 -0
- package/build/convert/stage.d.ts +4 -0
- package/build/convert/stage.d.ts.map +1 -0
- package/build/convert/stage.js +25 -0
- package/build/convert/stage.js.map +1 -0
- package/build/convert/taxonomy/types.d.ts +71 -0
- package/build/convert/taxonomy/types.d.ts.map +1 -0
- package/build/convert/taxonomy/types.js +2 -0
- package/build/convert/taxonomy/types.js.map +1 -0
- package/build/convert/types.d.ts +1 -648
- package/build/convert/types.d.ts.map +1 -1
- package/build/convert/utils.d.ts +5 -0
- package/build/convert/utils.d.ts.map +1 -0
- package/build/convert/utils.js +6 -0
- package/build/convert/utils.js.map +1 -0
- package/build/design/consts.d.ts +37 -0
- package/build/design/consts.d.ts.map +1 -1
- package/build/design/consts.js +44 -8
- package/build/design/consts.js.map +1 -1
- package/build/design/helpers.d.ts +9 -49
- package/build/design/helpers.d.ts.map +1 -1
- package/build/design/helpers.js +17 -224
- package/build/design/helpers.js.map +1 -1
- package/build/design/index.d.ts +3 -0
- package/build/design/index.d.ts.map +1 -1
- package/build/design/index.js +1 -0
- package/build/design/index.js.map +1 -1
- package/build/design/runtime/types.d.ts +16 -0
- package/build/design/runtime/types.d.ts.map +1 -0
- package/build/design/runtime/types.js +2 -0
- package/build/design/runtime/types.js.map +1 -0
- package/build/design/runtime.d.ts +8 -105
- package/build/design/runtime.d.ts.map +1 -1
- package/build/design/runtime.js +13 -48
- package/build/design/runtime.js.map +1 -1
- package/build/design/schemas.d.ts +1 -9
- package/build/design/schemas.d.ts.map +1 -1
- package/build/design/schemas.js +1 -1
- package/build/design/schemas.js.map +1 -1
- package/build/design/story/types.d.ts +67 -0
- package/build/design/story/types.d.ts.map +1 -0
- package/build/design/story/types.js +2 -0
- package/build/design/story/types.js.map +1 -0
- package/build/design/story.d.ts +4 -0
- package/build/design/story.d.ts.map +1 -0
- package/build/design/story.js +184 -0
- package/build/design/story.js.map +1 -0
- package/build/design/types.d.ts +75 -1
- package/build/design/types.d.ts.map +1 -1
- package/build/dev/schemas.d.ts.map +1 -1
- package/build/dev/schemas.js.map +1 -1
- package/build/dev/types.local.d.ts +5 -0
- package/build/dev/types.local.d.ts.map +1 -0
- package/build/dev/types.local.js +2 -0
- package/build/dev/types.local.js.map +1 -0
- package/build/integrity/consts.d.ts +0 -117
- package/build/integrity/consts.d.ts.map +1 -1
- package/build/integrity/consts.js +0 -281
- package/build/integrity/consts.js.map +1 -1
- package/build/integrity/consts.local.d.ts +5 -0
- package/build/integrity/consts.local.d.ts.map +1 -0
- package/build/integrity/consts.local.js +5 -0
- package/build/integrity/consts.local.js.map +1 -0
- package/build/integrity/index.d.ts +5 -0
- package/build/integrity/index.d.ts.map +1 -1
- package/build/integrity/index.js +3 -0
- package/build/integrity/index.js.map +1 -1
- package/build/integrity/layout/consts.d.ts +59 -0
- package/build/integrity/layout/consts.d.ts.map +1 -0
- package/build/integrity/layout/consts.js +66 -0
- package/build/integrity/layout/consts.js.map +1 -0
- package/build/integrity/layout/consts.local.d.ts +18 -0
- package/build/integrity/layout/consts.local.d.ts.map +1 -0
- package/build/integrity/layout/consts.local.js +176 -0
- package/build/integrity/layout/consts.local.js.map +1 -0
- package/build/integrity/layout/types.d.ts +35 -0
- package/build/integrity/layout/types.d.ts.map +1 -0
- package/build/integrity/layout/types.js +2 -0
- package/build/integrity/layout/types.js.map +1 -0
- package/build/integrity/layout.d.ts +4 -0
- package/build/integrity/layout.d.ts.map +1 -0
- package/build/integrity/layout.js +25 -0
- package/build/integrity/layout.js.map +1 -0
- package/build/integrity/types.d.ts +36 -2
- package/build/integrity/types.d.ts.map +1 -1
- package/build/integrity/utils.d.ts +13 -0
- package/build/integrity/utils.d.ts.map +1 -0
- package/build/integrity/utils.js +12 -0
- package/build/integrity/utils.js.map +1 -0
- package/build/integrity/verify/types.d.ts +26 -0
- package/build/integrity/verify/types.d.ts.map +1 -0
- package/build/integrity/verify/types.js +2 -0
- package/build/integrity/verify/types.js.map +1 -0
- package/build/integrity/verify.d.ts +5 -19
- package/build/integrity/verify.d.ts.map +1 -1
- package/build/integrity/verify.js +165 -175
- package/build/integrity/verify.js.map +1 -1
- package/build/intent/consts.d.ts +16 -0
- package/build/intent/consts.d.ts.map +1 -1
- package/build/intent/consts.js +63 -0
- package/build/intent/consts.js.map +1 -1
- package/build/intent/entrypoints.d.ts +2 -12
- package/build/intent/entrypoints.d.ts.map +1 -1
- package/build/intent/entrypoints.js.map +1 -1
- package/build/intent/index.d.ts +0 -1
- package/build/intent/index.d.ts.map +1 -1
- package/build/intent/index.js +0 -1
- package/build/intent/index.js.map +1 -1
- package/build/intent/types.d.ts +13 -0
- package/build/intent/types.d.ts.map +1 -1
- package/build/metadata/consts.d.ts +33 -0
- package/build/metadata/consts.d.ts.map +1 -1
- package/build/metadata/consts.js +37 -0
- package/build/metadata/consts.js.map +1 -1
- package/build/metadata/types.d.ts +1 -33
- package/build/metadata/types.d.ts.map +1 -1
- package/build/metadata/types.js +1 -38
- package/build/metadata/types.js.map +1 -1
- package/build/moderation/index.d.ts +2 -0
- package/build/moderation/index.d.ts.map +1 -1
- package/build/moderation/index.js +1 -0
- package/build/moderation/index.js.map +1 -1
- package/build/moderation/utils.d.ts +3 -15
- package/build/moderation/utils.d.ts.map +1 -1
- package/build/moderation/utils.js +5 -30
- package/build/moderation/utils.js.map +1 -1
- package/build/moderation/verdict/types.d.ts +24 -0
- package/build/moderation/verdict/types.d.ts.map +1 -0
- package/build/moderation/verdict/types.js +2 -0
- package/build/moderation/verdict/types.js.map +1 -0
- package/build/moderation/verdict.d.ts +4 -0
- package/build/moderation/verdict.d.ts.map +1 -0
- package/build/moderation/verdict.js +21 -0
- package/build/moderation/verdict.js.map +1 -0
- package/build/planning/card/types.d.ts +42 -0
- package/build/planning/card/types.d.ts.map +1 -0
- package/build/planning/card/types.js +2 -0
- package/build/planning/card/types.js.map +1 -0
- package/build/planning/card.d.ts +4 -0
- package/build/planning/card.d.ts.map +1 -0
- package/build/planning/card.js +51 -0
- package/build/planning/card.js.map +1 -0
- package/build/planning/consts.d.ts +13 -1
- package/build/planning/consts.d.ts.map +1 -1
- package/build/planning/consts.js +13 -0
- package/build/planning/consts.js.map +1 -1
- package/build/planning/helpers.d.ts +11 -37
- package/build/planning/helpers.d.ts.map +1 -1
- package/build/planning/helpers.js +24 -103
- package/build/planning/helpers.js.map +1 -1
- package/build/planning/index.d.ts +5 -1
- package/build/planning/index.d.ts.map +1 -1
- package/build/planning/index.js +2 -1
- package/build/planning/index.js.map +1 -1
- package/build/planning/landing/types.d.ts +16 -0
- package/build/planning/landing/types.d.ts.map +1 -0
- package/build/planning/landing/types.js +2 -0
- package/build/planning/landing/types.js.map +1 -0
- package/build/planning/landing.d.ts +5 -22
- package/build/planning/landing.d.ts.map +1 -1
- package/build/planning/landing.js +21 -35
- package/build/planning/landing.js.map +1 -1
- package/build/planning/schemas.d.ts +33 -0
- package/build/planning/schemas.d.ts.map +1 -1
- package/build/planning/schemas.js +173 -4
- package/build/planning/schemas.js.map +1 -1
- package/build/planning/spec/types.d.ts +22 -0
- package/build/planning/spec/types.d.ts.map +1 -0
- package/build/planning/spec/types.js +2 -0
- package/build/planning/spec/types.js.map +1 -0
- package/build/planning/spec.d.ts +4 -0
- package/build/planning/spec.d.ts.map +1 -0
- package/build/planning/spec.js +30 -0
- package/build/planning/spec.js.map +1 -0
- package/build/planning/types.d.ts +6 -5
- package/build/planning/types.d.ts.map +1 -1
- package/build/preview/consts.d.ts +3 -1
- package/build/preview/consts.d.ts.map +1 -1
- package/build/preview/consts.js +2 -0
- package/build/preview/consts.js.map +1 -1
- package/build/preview/types.d.ts +17 -2
- package/build/preview/types.d.ts.map +1 -1
- package/build/scaffold/consts.d.ts +40 -1
- package/build/scaffold/consts.d.ts.map +1 -1
- package/build/scaffold/consts.js +52 -0
- package/build/scaffold/consts.js.map +1 -1
- package/build/scaffold/helpers.d.ts +5 -30
- package/build/scaffold/helpers.d.ts.map +1 -1
- package/build/scaffold/helpers.js +9 -53
- package/build/scaffold/helpers.js.map +1 -1
- package/build/scaffold/index.d.ts +4 -0
- package/build/scaffold/index.d.ts.map +1 -1
- package/build/scaffold/index.js +2 -0
- package/build/scaffold/index.js.map +1 -1
- package/build/scaffold/landing/types.d.ts +48 -0
- package/build/scaffold/landing/types.d.ts.map +1 -0
- package/build/scaffold/landing/types.js +2 -0
- package/build/scaffold/landing/types.js.map +1 -0
- package/build/scaffold/landing.d.ts +4 -0
- package/build/scaffold/landing.d.ts.map +1 -0
- package/build/scaffold/landing.js +95 -0
- package/build/scaffold/landing.js.map +1 -0
- package/build/scaffold/schemas.d.ts +3 -2
- package/build/scaffold/schemas.d.ts.map +1 -1
- package/build/scaffold/schemas.js +177 -7
- package/build/scaffold/schemas.js.map +1 -1
- package/build/scaffold/share/types.d.ts +35 -0
- package/build/scaffold/share/types.d.ts.map +1 -0
- package/build/scaffold/share/types.js +2 -0
- package/build/scaffold/share/types.js.map +1 -0
- package/build/scaffold/share.d.ts +4 -0
- package/build/scaffold/share.d.ts.map +1 -0
- package/build/scaffold/share.js +42 -0
- package/build/scaffold/share.js.map +1 -0
- package/build/scaffold/types.d.ts +114 -2
- package/build/scaffold/types.d.ts.map +1 -1
- package/build/skills/consts.d.ts +42 -0
- package/build/skills/consts.d.ts.map +1 -1
- package/build/skills/consts.js +43 -0
- package/build/skills/consts.js.map +1 -1
- package/build/skills/index.d.ts +0 -1
- package/build/skills/index.d.ts.map +1 -1
- package/build/skills/index.js +0 -1
- package/build/skills/index.js.map +1 -1
- package/build/slot/command/types.d.ts +21 -0
- package/build/slot/command/types.d.ts.map +1 -0
- package/build/slot/command/types.js +2 -0
- package/build/slot/command/types.js.map +1 -0
- package/build/slot/command.d.ts +4 -0
- package/build/slot/command.d.ts.map +1 -0
- package/build/slot/command.js +31 -0
- package/build/slot/command.js.map +1 -0
- package/build/slot/consts.d.ts +7 -13
- package/build/slot/consts.d.ts.map +1 -1
- package/build/slot/consts.js +10 -36
- package/build/slot/consts.js.map +1 -1
- package/build/slot/helpers.d.ts +3 -22
- package/build/slot/helpers.d.ts.map +1 -1
- package/build/slot/helpers.js +5 -26
- package/build/slot/helpers.js.map +1 -1
- package/build/slot/index.d.ts +6 -0
- package/build/slot/index.d.ts.map +1 -1
- package/build/slot/index.js +3 -0
- package/build/slot/index.js.map +1 -1
- package/build/slot/layout/types.d.ts +17 -0
- package/build/slot/layout/types.d.ts.map +1 -0
- package/build/slot/layout/types.js +2 -0
- package/build/slot/layout/types.js.map +1 -0
- package/build/slot/layout.d.ts +5 -66
- package/build/slot/layout.d.ts.map +1 -1
- package/build/slot/layout.js +13 -27
- package/build/slot/layout.js.map +1 -1
- package/build/slot/origin/types.d.ts +23 -0
- package/build/slot/origin/types.d.ts.map +1 -0
- package/build/slot/origin/types.js +2 -0
- package/build/slot/origin/types.js.map +1 -0
- package/build/slot/origin.d.ts +4 -0
- package/build/slot/origin.d.ts.map +1 -0
- package/build/slot/origin.js +15 -0
- package/build/slot/origin.js.map +1 -0
- package/build/slot/types.d.ts +55 -1
- package/build/slot/types.d.ts.map +1 -1
- package/build/slot/utils.d.ts +6 -0
- package/build/slot/utils.d.ts.map +1 -0
- package/build/slot/utils.js +6 -0
- package/build/slot/utils.js.map +1 -0
- package/build/topology/card/types.d.ts +21 -0
- package/build/topology/card/types.d.ts.map +1 -0
- package/build/topology/card/types.js +2 -0
- package/build/topology/card/types.js.map +1 -0
- package/build/topology/card.d.ts +7 -19
- package/build/topology/card.d.ts.map +1 -1
- package/build/topology/card.js +84 -89
- package/build/topology/card.js.map +1 -1
- package/build/topology/consts.local.d.ts +4 -0
- package/build/topology/consts.local.d.ts.map +1 -0
- package/build/topology/consts.local.js +4 -0
- package/build/topology/consts.local.js.map +1 -0
- package/build/topology/helpers.d.ts +7 -33
- package/build/topology/helpers.d.ts.map +1 -1
- package/build/topology/helpers.js +15 -111
- package/build/topology/helpers.js.map +1 -1
- package/build/topology/index.d.ts +3 -0
- package/build/topology/index.d.ts.map +1 -1
- package/build/topology/index.js +1 -0
- package/build/topology/index.js.map +1 -1
- package/build/topology/resolve/types.d.ts +47 -0
- package/build/topology/resolve/types.d.ts.map +1 -0
- package/build/topology/resolve/types.js +2 -0
- package/build/topology/resolve/types.js.map +1 -0
- package/build/topology/resolve.d.ts +4 -0
- package/build/topology/resolve.d.ts.map +1 -0
- package/build/topology/resolve.js +89 -0
- package/build/topology/resolve.js.map +1 -0
- package/build/topology/types.d.ts +5 -0
- package/build/topology/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/agent/consts.local.ts +47 -0
- package/src/agent/consts.ts +61 -0
- package/src/agent/index.ts +2 -0
- package/src/agent/presentation/types.ts +21 -0
- package/src/agent/presentation.ts +200 -309
- package/src/agent/types.local.ts +3 -0
- package/src/agent/types.ts +40 -0
- package/src/areas/consts.ts +7 -0
- package/src/areas/index.ts +1 -0
- package/src/areas/tenancy/types.ts +23 -0
- package/src/areas/tenancy.ts +26 -61
- package/src/areas/types.ts +31 -0
- package/src/ba/connecting/types.ts +45 -0
- package/src/ba/connecting.ts +64 -0
- package/src/ba/helpers.ts +8 -92
- package/src/ba/index.ts +2 -0
- package/src/ba/types.ts +1 -1
- package/src/blueprint/consts.local.ts +3 -0
- package/src/blueprint/consts.ts +52 -0
- package/src/blueprint/index.ts +1 -0
- package/src/blueprint/types.ts +4 -74
- package/src/blueprint/utils.ts +20 -0
- package/src/branding.ts +0 -17
- package/src/connect/branding/types.ts +29 -0
- package/src/connect/consts.ts +3 -22
- package/src/connect/conversion/types.ts +96 -0
- package/src/connect/entrypoints/types.ts +25 -0
- package/src/connect/entrypoints.ts +18 -35
- package/src/connect/errors/types.ts +22 -0
- package/src/connect/errors.ts +75 -0
- package/src/connect/index.ts +13 -2
- package/src/connect/kit/types.ts +56 -0
- package/src/connect/model-tier/types.ts +16 -0
- package/src/connect/model-tier.ts +22 -0
- package/src/connect/{ops.ts → ops/types.ts} +13 -3
- package/src/connect/pipeline/types.ts +41 -0
- package/src/connect/project/types.ts +127 -0
- package/src/connect/references/types.local.ts +5 -0
- package/src/connect/references/types.ts +73 -0
- package/src/connect/references.ts +15 -75
- package/src/connect/schemas.ts +19 -12
- package/src/connect/session/types.ts +81 -0
- package/src/connect/settings/types.ts +52 -0
- package/src/consts.ts +17 -0
- package/src/convert/analysis/types.ts +89 -0
- package/src/convert/census/consts.local.ts +120 -0
- package/src/convert/census/types.ts +181 -0
- package/src/convert/census.ts +95 -0
- package/src/convert/consts.ts +5 -14
- package/src/convert/detection/types.ts +74 -0
- package/src/convert/docs/types.ts +151 -0
- package/src/convert/docs.ts +15 -0
- package/src/convert/estimate/types.ts +75 -0
- package/src/convert/estimate.ts +19 -0
- package/src/convert/helpers.ts +29 -328
- package/src/convert/index.ts +15 -0
- package/src/convert/origin/types.ts +43 -0
- package/src/convert/origin.ts +33 -0
- package/src/convert/record/types.ts +105 -0
- package/src/convert/schemas.ts +13 -12
- package/src/convert/stage/types.ts +27 -0
- package/src/convert/stage.ts +31 -0
- package/src/convert/taxonomy/types.ts +74 -0
- package/src/convert/types.ts +5 -703
- package/src/convert/utils.ts +7 -0
- package/src/design/consts.ts +48 -0
- package/src/design/helpers.ts +20 -245
- package/src/design/index.ts +3 -0
- package/src/design/runtime/types.ts +14 -0
- package/src/design/runtime.ts +18 -116
- package/src/design/schemas.ts +2 -10
- package/src/design/story/types.ts +67 -0
- package/src/design/story.ts +221 -0
- package/src/design/types.ts +81 -1
- package/src/dev/schemas.ts +1 -3
- package/src/dev/types.local.ts +4 -0
- package/src/integrity/consts.local.ts +5 -0
- package/src/integrity/consts.ts +0 -348
- package/src/integrity/index.ts +5 -0
- package/src/integrity/layout/consts.local.ts +188 -0
- package/src/integrity/layout/consts.ts +79 -0
- package/src/integrity/layout/types.ts +35 -0
- package/src/integrity/layout.ts +39 -0
- package/src/integrity/types.ts +37 -2
- package/src/integrity/utils.ts +21 -0
- package/src/integrity/verify/types.ts +26 -0
- package/src/integrity/verify.ts +178 -184
- package/src/intent/consts.ts +67 -0
- package/src/intent/entrypoints.ts +2 -3
- package/src/intent/index.ts +0 -1
- package/src/intent/types.ts +10 -0
- package/src/metadata/consts.ts +37 -0
- package/src/metadata/types.ts +1 -37
- package/src/moderation/index.ts +2 -0
- package/src/moderation/utils.ts +7 -30
- package/src/moderation/verdict/types.ts +22 -0
- package/src/moderation/verdict.ts +28 -0
- package/src/planning/card/types.ts +44 -0
- package/src/planning/card.ts +77 -0
- package/src/planning/consts.ts +15 -2
- package/src/planning/helpers.ts +28 -116
- package/src/planning/index.ts +5 -1
- package/src/planning/landing/types.ts +15 -0
- package/src/planning/landing.ts +28 -38
- package/src/planning/schemas.ts +191 -4
- package/src/planning/spec/types.ts +22 -0
- package/src/planning/spec.ts +41 -0
- package/src/planning/types.ts +6 -6
- package/src/preview/consts.ts +2 -0
- package/src/preview/types.ts +19 -0
- package/src/scaffold/consts.ts +65 -1
- package/src/scaffold/helpers.ts +14 -80
- package/src/scaffold/index.ts +4 -0
- package/src/scaffold/landing/types.ts +48 -0
- package/src/scaffold/landing.ts +120 -0
- package/src/scaffold/schemas.ts +183 -7
- package/src/scaffold/share/types.ts +35 -0
- package/src/scaffold/share.ts +60 -0
- package/src/scaffold/types.ts +123 -1
- package/src/skills/consts.ts +46 -0
- package/src/skills/index.ts +0 -1
- package/src/slot/command/types.ts +21 -0
- package/src/slot/command.ts +38 -0
- package/src/slot/consts.ts +11 -40
- package/src/slot/helpers.ts +6 -31
- package/src/slot/index.ts +6 -0
- package/src/slot/layout/types.ts +17 -0
- package/src/slot/layout.ts +19 -77
- package/src/slot/origin/types.ts +23 -0
- package/src/slot/origin.ts +20 -0
- package/src/slot/types.ts +58 -1
- package/src/slot/utils.ts +10 -0
- package/src/topology/card/types.ts +21 -0
- package/src/topology/card.ts +85 -90
- package/src/topology/consts.local.ts +6 -0
- package/src/topology/helpers.ts +20 -125
- package/src/topology/index.ts +3 -0
- package/src/topology/resolve/types.ts +47 -0
- package/src/topology/resolve.ts +118 -0
- package/src/topology/types.ts +6 -0
- package/tests/blueprint.spec.ts +1 -2
- package/tests/branding.spec.ts +2 -2
- package/tests/connect-convert.spec.ts +21 -1
- package/tests/connect-errors.spec.ts +34 -1
- package/tests/convert.spec.ts +51 -52
- package/tests/design.spec.ts +13 -16
- package/tests/error-status.spec.ts +7 -1
- package/tests/planning.spec.ts +58 -75
- package/tests/presentation.spec.ts +21 -23
- package/tests/scaffold.spec.ts +286 -6
- package/tests/tenancy.spec.ts +21 -21
- package/build/connect/ops.d.ts.map +0 -1
- package/build/connect/ops.js +0 -2
- package/build/connect/ops.js.map +0 -1
- package/build/connect/types.d.ts +0 -437
- package/build/connect/types.d.ts.map +0 -1
- package/build/intent/flow.d.ts +0 -17
- package/build/intent/flow.d.ts.map +0 -1
- package/build/intent/flow.js +0 -65
- package/build/intent/flow.js.map +0 -1
- package/build/planning/flows.d.ts +0 -34
- package/build/planning/flows.d.ts.map +0 -1
- package/build/planning/flows.js +0 -174
- package/build/planning/flows.js.map +0 -1
- package/build/skills/roles.d.ts +0 -43
- package/build/skills/roles.d.ts.map +0 -1
- package/build/skills/roles.js +0 -44
- package/build/skills/roles.js.map +0 -1
- package/src/connect/types.ts +0 -466
- package/src/intent/flow.ts +0 -67
- package/src/planning/flows.ts +0 -204
- package/src/skills/roles.ts +0 -46
- /package/build/{connect → agent/presentation}/types.js +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test'
|
|
2
2
|
import { ResilientError } from '@owlmeans/error'
|
|
3
|
-
import { ConnectConsentRequired, ConnectOutOfCredits } from '../src/connect/errors.js'
|
|
3
|
+
import { ConnectConfirmationRequired, ConnectConsentRequired, ConnectOutOfCredits } from '../src/connect/errors.js'
|
|
4
|
+
import type { ConnectConfirmation } from '../src/connect/errors/types.js'
|
|
4
5
|
|
|
5
6
|
describe('@owlmeans/viable-common — ConnectOutOfCredits', () => {
|
|
6
7
|
test('carries its fields fresh, and survives a marshal/unmarshal round trip', () => {
|
|
@@ -50,3 +51,35 @@ describe('@owlmeans/viable-common — ConnectConsentRequired', () => {
|
|
|
50
51
|
expect((ResilientError.ensure(fresh.marshal()) as ConnectConsentRequired).deadline).toBeUndefined()
|
|
51
52
|
})
|
|
52
53
|
})
|
|
54
|
+
|
|
55
|
+
describe('@owlmeans/viable-common — ConnectConfirmationRequired', () => {
|
|
56
|
+
const fields: ConnectConfirmation = {
|
|
57
|
+
action: 'convert-proceed', cap: 1_000_000, spent: 420_000, estimate: 850_000, fromAllowance: 580_000,
|
|
58
|
+
fromCreditLimits: 150_000, moneyUsd: 2.4,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
test('packs the action, the conversion limit and the stage split, and answers 428', () => {
|
|
62
|
+
const fresh = new ConnectConfirmationRequired(ConnectConfirmationRequired.encode(fields))
|
|
63
|
+
|
|
64
|
+
expect(fresh.message).toBe('viable-connect:confirmation-required:convert-proceed:1000000:420000:850000:580000:150000:2.4')
|
|
65
|
+
expect(fresh).toEqual(expect.objectContaining(fields))
|
|
66
|
+
expect((fresh.constructor as { httpStatus?: number }).httpStatus).toBe(428)
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
test('survives a marshal/unmarshal round trip — only type and message cross a hop', () => {
|
|
70
|
+
const restored = ResilientError.ensure(
|
|
71
|
+
new ConnectConfirmationRequired(ConnectConfirmationRequired.encode({ ...fields, action: 'convert-start' })).marshal()
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
expect(restored).toBeInstanceOf(ConnectConfirmationRequired)
|
|
75
|
+
expect(restored).toEqual(expect.objectContaining({ ...fields, action: 'convert-start' }))
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
test('decode is encode\'s inverse; an unreadable number reads back as 0, never NaN', () => {
|
|
79
|
+
expect(ConnectConfirmationRequired.decode(ConnectConfirmationRequired.encode(fields))).toEqual(fields)
|
|
80
|
+
expect(ConnectConfirmationRequired.encode({ ...fields, moneyUsd: Number.NaN })).toEndWith(':0')
|
|
81
|
+
expect(ConnectConfirmationRequired.decode('convert-start:x')).toEqual({
|
|
82
|
+
action: 'convert-start', cap: 0, spent: 0, estimate: 0, fromAllowance: 0, fromCreditLimits: 0, moneyUsd: 0,
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
})
|
package/tests/convert.spec.ts
CHANGED
|
@@ -7,14 +7,13 @@ import {
|
|
|
7
7
|
CONVERSION_ARTIFACTS, CONVERSION_DIR, CONVERSION_DOCS, CONVERSION_MEMORY, ConversionStage,
|
|
8
8
|
EntropyClass, FileClass, SizeClass, STACK_FAMILY, StackId, TAXONOMY_ORDER, TaxonomyKind
|
|
9
9
|
} from '../src/convert/index.js'
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from '../src/convert/
|
|
10
|
+
import { censusHelper } from '../src/convert/census.js'
|
|
11
|
+
import { conversionStageHelper } from '../src/convert/stage.js'
|
|
12
|
+
import { storyComplexity } from '../src/convert/estimate.js'
|
|
13
|
+
import { conversionOriginHelper } from '../src/convert/origin.js'
|
|
14
14
|
import { HISTORY_FILE } from '../src/metadata/consts.js'
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
} from '../src/convert/consts.js'
|
|
15
|
+
import { CONVERTED_ORIGIN_DIR, ConversionDecision } from '../src/convert/consts.js'
|
|
16
|
+
import { conversionDocHelper } from '../src/convert/docs.js'
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* Every `*Schema` a module exports.
|
|
@@ -177,26 +176,26 @@ describe('viable-common - the conversion contracts', () => {
|
|
|
177
176
|
})
|
|
178
177
|
|
|
179
178
|
test('canEnter allows a retry and the next stage, and refuses a skip', () => {
|
|
180
|
-
expect(canEnter(ConversionStage.Intake, ConversionStage.Intake)).toBe(true)
|
|
181
|
-
expect(canEnter(ConversionStage.Intake, ConversionStage.Analysis)).toBe(true)
|
|
179
|
+
expect(conversionStageHelper.canEnter(ConversionStage.Intake, ConversionStage.Intake)).toBe(true)
|
|
180
|
+
expect(conversionStageHelper.canEnter(ConversionStage.Intake, ConversionStage.Analysis)).toBe(true)
|
|
182
181
|
// Extraction reads the documents analysis wrote; entering it from intake runs it against
|
|
183
182
|
// documents that were never produced.
|
|
184
|
-
expect(canEnter(ConversionStage.Intake, ConversionStage.Extraction)).toBe(false)
|
|
185
|
-
expect(canEnter(ConversionStage.Extraction, ConversionStage.Analysis)).toBe(false)
|
|
183
|
+
expect(conversionStageHelper.canEnter(ConversionStage.Intake, ConversionStage.Extraction)).toBe(false)
|
|
184
|
+
expect(conversionStageHelper.canEnter(ConversionStage.Extraction, ConversionStage.Analysis)).toBe(false)
|
|
186
185
|
})
|
|
187
186
|
|
|
188
187
|
test('the stage ladder ends at implementation rather than falling off it', () => {
|
|
189
|
-
expect(stageAfter(ConversionStage.Intake)).toBe(ConversionStage.Analysis)
|
|
190
|
-
expect(stageAfter(ConversionStage.Implementation)).toBe(ConversionStage.Implementation)
|
|
191
|
-
expect(decisionFor(ConversionStage.Extraction)).toBe(ConversionDecision.Implement)
|
|
192
|
-
expect(decisionFor(ConversionStage.Implementation)).toBe(ConversionDecision.Leave)
|
|
188
|
+
expect(conversionStageHelper.stageAfter(ConversionStage.Intake)).toBe(ConversionStage.Analysis)
|
|
189
|
+
expect(conversionStageHelper.stageAfter(ConversionStage.Implementation)).toBe(ConversionStage.Implementation)
|
|
190
|
+
expect(conversionStageHelper.decisionFor(ConversionStage.Extraction)).toBe(ConversionDecision.Implement)
|
|
191
|
+
expect(conversionStageHelper.decisionFor(ConversionStage.Implementation)).toBe(ConversionDecision.Leave)
|
|
193
192
|
})
|
|
194
193
|
|
|
195
194
|
test('every conversion document lives under the conversion directory', () => {
|
|
196
195
|
for (const doc of CONVERSION_DOCS) {
|
|
197
196
|
expect(doc.startsWith(`${CONVERSION_DIR}/`), doc).toBe(true)
|
|
198
197
|
}
|
|
199
|
-
expect(conversionStoryDoc('US-ABC12').startsWith(`${CONVERSION_DIR}/`)).toBe(true)
|
|
198
|
+
expect(conversionDocHelper.conversionStoryDoc('US-ABC12').startsWith(`${CONVERSION_DIR}/`)).toBe(true)
|
|
200
199
|
for (const node of CONVERSION_MEMORY) {
|
|
201
200
|
expect(node.startsWith('.agents/memory/'), node).toBe(true)
|
|
202
201
|
}
|
|
@@ -210,54 +209,54 @@ describe('viable-common - the conversion contracts', () => {
|
|
|
210
209
|
})
|
|
211
210
|
|
|
212
211
|
test('origin paths round-trip and never nest', () => {
|
|
213
|
-
expect(originPath('src/index.ts')).toBe(`${CONVERTED_ORIGIN_DIR}/src/index.ts`)
|
|
214
|
-
expect(isOriginPath(originPath('src/index.ts'))).toBe(true)
|
|
215
|
-
expect(isOriginPath(CONVERTED_ORIGIN_DIR)).toBe(true)
|
|
216
|
-
expect(isOriginPath('sources/web/src/index.ts')).toBe(false)
|
|
212
|
+
expect(conversionOriginHelper.originPath('src/index.ts')).toBe(`${CONVERTED_ORIGIN_DIR}/src/index.ts`)
|
|
213
|
+
expect(conversionOriginHelper.isOriginPath(conversionOriginHelper.originPath('src/index.ts'))).toBe(true)
|
|
214
|
+
expect(conversionOriginHelper.isOriginPath(CONVERTED_ORIGIN_DIR)).toBe(true)
|
|
215
|
+
expect(conversionOriginHelper.isOriginPath('sources/web/src/index.ts')).toBe(false)
|
|
217
216
|
// A caller that has lost track of which side of the move it holds must not be able to produce
|
|
218
217
|
// `__viable_converted/__viable_converted/`.
|
|
219
|
-
expect(originPath(originPath('src/index.ts'))).toBe(`${CONVERTED_ORIGIN_DIR}/src/index.ts`)
|
|
218
|
+
expect(conversionOriginHelper.originPath(conversionOriginHelper.originPath('src/index.ts'))).toBe(`${CONVERTED_ORIGIN_DIR}/src/index.ts`)
|
|
220
219
|
})
|
|
221
220
|
|
|
222
221
|
test('sizeClassOf splits on the declared bounds', () => {
|
|
223
|
-
expect(sizeClassOf(0)).toBe(SizeClass.Tiny)
|
|
224
|
-
expect(sizeClassOf(2_047)).toBe(SizeClass.Tiny)
|
|
225
|
-
expect(sizeClassOf(2_048)).toBe(SizeClass.Small)
|
|
226
|
-
expect(sizeClassOf(32_767)).toBe(SizeClass.Small)
|
|
227
|
-
expect(sizeClassOf(32_768)).toBe(SizeClass.Medium)
|
|
228
|
-
expect(sizeClassOf(262_144)).toBe(SizeClass.Large)
|
|
229
|
-
expect(sizeClassOf(2_097_152)).toBe(SizeClass.Huge)
|
|
222
|
+
expect(censusHelper.sizeClassOf(0)).toBe(SizeClass.Tiny)
|
|
223
|
+
expect(censusHelper.sizeClassOf(2_047)).toBe(SizeClass.Tiny)
|
|
224
|
+
expect(censusHelper.sizeClassOf(2_048)).toBe(SizeClass.Small)
|
|
225
|
+
expect(censusHelper.sizeClassOf(32_767)).toBe(SizeClass.Small)
|
|
226
|
+
expect(censusHelper.sizeClassOf(32_768)).toBe(SizeClass.Medium)
|
|
227
|
+
expect(censusHelper.sizeClassOf(262_144)).toBe(SizeClass.Large)
|
|
228
|
+
expect(censusHelper.sizeClassOf(2_097_152)).toBe(SizeClass.Huge)
|
|
230
229
|
})
|
|
231
230
|
|
|
232
231
|
test('entropyClassOf tells prose from a minified bundle from binary', () => {
|
|
233
|
-
expect(entropyClassOf('export const answer = 42\nconsole.log(answer)\n'))
|
|
232
|
+
expect(censusHelper.entropyClassOf('export const answer = 42\nconsole.log(answer)\n'))
|
|
234
233
|
.toBe(EntropyClass.Text)
|
|
235
234
|
// Printable throughout, and not something a model can reason over: no line breaks, no indent.
|
|
236
|
-
expect(entropyClassOf(`const a=1,b=2,c=3;${'x'.repeat(400)}`)).toBe(EntropyClass.Dense)
|
|
237
|
-
expect(entropyClassOf(`PNG${'ÿ'.repeat(40)}`))
|
|
235
|
+
expect(censusHelper.entropyClassOf(`const a=1,b=2,c=3;${'x'.repeat(400)}`)).toBe(EntropyClass.Dense)
|
|
236
|
+
expect(censusHelper.entropyClassOf(`PNG${'ÿ'.repeat(40)}`))
|
|
238
237
|
.toBe(EntropyClass.Opaque)
|
|
239
238
|
})
|
|
240
239
|
|
|
241
240
|
test('fileClassOf reads the path before the extension', () => {
|
|
242
|
-
expect(fileClassOf('sources/api/src/index.ts', 'ts')).toBe(FileClass.Source)
|
|
243
|
-
expect(fileClassOf('node_modules/left-pad/index.js', 'js')).toBe(FileClass.Generated)
|
|
244
|
-
expect(fileClassOf('tests/api.spec.ts', 'ts')).toBe(FileClass.Test)
|
|
245
|
-
expect(fileClassOf('seed/users.json', 'json')).toBe(FileClass.Data)
|
|
246
|
-
expect(fileClassOf('package.json', 'json')).toBe(FileClass.Manifest)
|
|
247
|
-
expect(fileClassOf('bun.lock', 'lock')).toBe(FileClass.Lock)
|
|
241
|
+
expect(censusHelper.fileClassOf('sources/api/src/index.ts', 'ts')).toBe(FileClass.Source)
|
|
242
|
+
expect(censusHelper.fileClassOf('node_modules/left-pad/index.js', 'js')).toBe(FileClass.Generated)
|
|
243
|
+
expect(censusHelper.fileClassOf('tests/api.spec.ts', 'ts')).toBe(FileClass.Test)
|
|
244
|
+
expect(censusHelper.fileClassOf('seed/users.json', 'json')).toBe(FileClass.Data)
|
|
245
|
+
expect(censusHelper.fileClassOf('package.json', 'json')).toBe(FileClass.Manifest)
|
|
246
|
+
expect(censusHelper.fileClassOf('bun.lock', 'lock')).toBe(FileClass.Lock)
|
|
248
247
|
})
|
|
249
248
|
|
|
250
249
|
test('a seed or dump location reclassifies a payload and never a program', () => {
|
|
251
250
|
// Asked before the test check and the extension table, the seed/dump rule answered `Data` for
|
|
252
251
|
// all four of these — real source, out of the census's source budget on a word in its path.
|
|
253
|
-
expect(fileClassOf('tests/fixtures/user.ts', 'ts')).toBe(FileClass.Test)
|
|
254
|
-
expect(fileClassOf('src/seedUsers.ts', 'ts')).toBe(FileClass.Source)
|
|
255
|
-
expect(fileClassOf('src/exportReport.ts', 'ts')).toBe(FileClass.Source)
|
|
256
|
-
expect(fileClassOf('bin/cli.ts', 'ts')).toBe(FileClass.Source)
|
|
252
|
+
expect(censusHelper.fileClassOf('tests/fixtures/user.ts', 'ts')).toBe(FileClass.Test)
|
|
253
|
+
expect(censusHelper.fileClassOf('src/seedUsers.ts', 'ts')).toBe(FileClass.Source)
|
|
254
|
+
expect(censusHelper.fileClassOf('src/exportReport.ts', 'ts')).toBe(FileClass.Source)
|
|
255
|
+
expect(censusHelper.fileClassOf('bin/cli.ts', 'ts')).toBe(FileClass.Source)
|
|
257
256
|
// What the rule is for: a payload, and the one language that is a dump as often as it is code.
|
|
258
|
-
expect(fileClassOf('fixtures/orders.csv', 'csv')).toBe(FileClass.Data)
|
|
259
|
-
expect(fileClassOf('db/dumps/2024.sql', 'sql')).toBe(FileClass.Data)
|
|
260
|
-
expect(fileClassOf('db/migrations/0001_init.sql', 'sql')).toBe(FileClass.Source)
|
|
257
|
+
expect(censusHelper.fileClassOf('fixtures/orders.csv', 'csv')).toBe(FileClass.Data)
|
|
258
|
+
expect(censusHelper.fileClassOf('db/dumps/2024.sql', 'sql')).toBe(FileClass.Data)
|
|
259
|
+
expect(censusHelper.fileClassOf('db/migrations/0001_init.sql', 'sql')).toBe(FileClass.Source)
|
|
261
260
|
})
|
|
262
261
|
|
|
263
262
|
test('storyComplexity scales on what the extraction actually found', () => {
|
|
@@ -298,17 +297,17 @@ describe('viable-common - the conversion contracts', () => {
|
|
|
298
297
|
test('binaryByExtension answers a tail it knows and defers on one it does not', () => {
|
|
299
298
|
// The verdict a probe alone gets wrong: a small `.ico` with no NUL in its first bytes reads as
|
|
300
299
|
// text, which is how a census on a laptop and the same census in the slot disagreed.
|
|
301
|
-
expect(binaryByExtension('assets/logo.ico')).toBe(true)
|
|
302
|
-
expect(binaryByExtension('assets/logo.PNG')).toBe(true)
|
|
303
|
-
expect(binaryByExtension('sources/web/src/app.tsx')).toBe(false)
|
|
304
|
-
expect(binaryByExtension('archive.tar.gz')).toBe(true)
|
|
300
|
+
expect(censusHelper.binaryByExtension('assets/logo.ico')).toBe(true)
|
|
301
|
+
expect(censusHelper.binaryByExtension('assets/logo.PNG')).toBe(true)
|
|
302
|
+
expect(censusHelper.binaryByExtension('sources/web/src/app.tsx')).toBe(false)
|
|
303
|
+
expect(censusHelper.binaryByExtension('archive.tar.gz')).toBe(true)
|
|
305
304
|
// Nothing to go on, so the caller has to read it: no tail at all, a dotfile (which
|
|
306
305
|
// `path.extname` also answers nothing for), and a tail neither list carries.
|
|
307
|
-
expect(binaryByExtension('Makefile')).toBeNull()
|
|
308
|
-
expect(binaryByExtension('.env')).toBeNull()
|
|
309
|
-
expect(binaryByExtension('data.parquet')).toBeNull()
|
|
306
|
+
expect(censusHelper.binaryByExtension('Makefile')).toBeNull()
|
|
307
|
+
expect(censusHelper.binaryByExtension('.env')).toBeNull()
|
|
308
|
+
expect(censusHelper.binaryByExtension('data.parquet')).toBeNull()
|
|
310
309
|
// The tail of the last SEGMENT, never of the path.
|
|
311
|
-
expect(binaryByExtension('release.d/manifest')).toBeNull()
|
|
310
|
+
expect(censusHelper.binaryByExtension('release.d/manifest')).toBeNull()
|
|
312
311
|
})
|
|
313
312
|
|
|
314
313
|
test('a head read is bounded, and the binary probe is smaller than the head', () => {
|
package/tests/design.spec.ts
CHANGED
|
@@ -2,13 +2,10 @@ import { describe, expect, test } from 'bun:test'
|
|
|
2
2
|
import Ajv from 'ajv'
|
|
3
3
|
import { ProjectArea } from '../src/areas/consts.js'
|
|
4
4
|
import { SpecCategory } from '../src/ba/consts.js'
|
|
5
|
-
import {
|
|
6
|
-
DesignStaleness, STORY_DESIGN_VERSION, StoryDesignSchema, designHash, designStaleness,
|
|
7
|
-
emptyStoryDesign, screenMapOf, userStoryOfDesign,
|
|
8
|
-
} from '../src/design/index.js'
|
|
5
|
+
import { DesignStaleness, STORY_DESIGN_VERSION, StoryDesignSchema, storyDesignHelper } from '../src/design/index.js'
|
|
9
6
|
import type { StoryDesign } from '../src/design/index.js'
|
|
10
7
|
|
|
11
|
-
const design = (extra: Partial<StoryDesign> = {}): StoryDesign => emptyStoryDesign({
|
|
8
|
+
const design = (extra: Partial<StoryDesign> = {}): StoryDesign => storyDesignHelper.emptyStoryDesign({
|
|
12
9
|
code: 'US-ABC12',
|
|
13
10
|
narrative: 'A visitor books a slot.',
|
|
14
11
|
area: ProjectArea.User,
|
|
@@ -45,7 +42,7 @@ describe('viable-common - the design aggregate', () => {
|
|
|
45
42
|
test('derives the UserStory the coders take, carrying the story code', () => {
|
|
46
43
|
// The scaffold stamps every placeholder it draws with the code, so a run keyed by anything
|
|
47
44
|
// else cannot recognise its own reservation.
|
|
48
|
-
const story = userStoryOfDesign(withScreens())
|
|
45
|
+
const story = storyDesignHelper.userStoryOfDesign(withScreens())
|
|
49
46
|
|
|
50
47
|
expect(story.code).toBe('US-ABC12')
|
|
51
48
|
expect(story.area).toBe(ProjectArea.User)
|
|
@@ -60,11 +57,11 @@ describe('viable-common - the design aggregate', () => {
|
|
|
60
57
|
const broken = withScreens()
|
|
61
58
|
broken.screens[0].components = ['BookingList', 'Ghost']
|
|
62
59
|
|
|
63
|
-
expect(userStoryOfDesign(broken).screens[0].components.map(entry => entry.name)).toEqual(['BookingList'])
|
|
60
|
+
expect(storyDesignHelper.userStoryOfDesign(broken).screens[0].components.map(entry => entry.name)).toEqual(['BookingList'])
|
|
64
61
|
})
|
|
65
62
|
|
|
66
63
|
test('screenMapOf is the shape every UX and UI prompt takes', () => {
|
|
67
|
-
expect(screenMapOf(withScreens())).toEqual({ 'booking/list/overview': ['BookingList'] })
|
|
64
|
+
expect(storyDesignHelper.screenMapOf(withScreens())).toEqual({ 'booking/list/overview': ['BookingList'] })
|
|
68
65
|
})
|
|
69
66
|
})
|
|
70
67
|
|
|
@@ -78,7 +75,7 @@ describe('viable-common - design staleness', () => {
|
|
|
78
75
|
}
|
|
79
76
|
|
|
80
77
|
test('answers fresh when nothing moved', () => {
|
|
81
|
-
expect(designStaleness(fresh(), now)).toBe(DesignStaleness.Fresh)
|
|
78
|
+
expect(storyDesignHelper.designStaleness(fresh(), now)).toBe(DesignStaleness.Fresh)
|
|
82
79
|
})
|
|
83
80
|
|
|
84
81
|
test('ranks by severity: version, then narrative, then project, then tree', () => {
|
|
@@ -86,17 +83,17 @@ describe('viable-common - design staleness', () => {
|
|
|
86
83
|
// them the most expensive of the four.
|
|
87
84
|
const versioned = fresh()
|
|
88
85
|
versioned.version = STORY_DESIGN_VERSION + 1
|
|
89
|
-
expect(designStaleness(versioned, now)).toBe(DesignStaleness.Version)
|
|
86
|
+
expect(storyDesignHelper.designStaleness(versioned, now)).toBe(DesignStaleness.Version)
|
|
90
87
|
|
|
91
|
-
expect(designStaleness(fresh(), { ...now, narrativeHash: 'x' })).toBe(DesignStaleness.Narrative)
|
|
92
|
-
expect(designStaleness(fresh(), { ...now, projectHash: 'x' })).toBe(DesignStaleness.Project)
|
|
93
|
-
expect(designStaleness(fresh(), { ...now, registryHash: 'x' })).toBe(DesignStaleness.Tree)
|
|
88
|
+
expect(storyDesignHelper.designStaleness(fresh(), { ...now, narrativeHash: 'x' })).toBe(DesignStaleness.Narrative)
|
|
89
|
+
expect(storyDesignHelper.designStaleness(fresh(), { ...now, projectHash: 'x' })).toBe(DesignStaleness.Project)
|
|
90
|
+
expect(storyDesignHelper.designStaleness(fresh(), { ...now, registryHash: 'x' })).toBe(DesignStaleness.Tree)
|
|
94
91
|
})
|
|
95
92
|
|
|
96
93
|
test('the hash is stable and distinguishes its inputs', () => {
|
|
97
|
-
expect(designHash('a', 'b')).toBe(designHash('a', 'b'))
|
|
98
|
-
expect(designHash('a', 'b')).not.toBe(designHash('a', 'c'))
|
|
99
|
-
expect(designHash('a', undefined)).toBe(designHash('a'))
|
|
94
|
+
expect(storyDesignHelper.designHash('a', 'b')).toBe(storyDesignHelper.designHash('a', 'b'))
|
|
95
|
+
expect(storyDesignHelper.designHash('a', 'b')).not.toBe(storyDesignHelper.designHash('a', 'c'))
|
|
96
|
+
expect(storyDesignHelper.designHash('a', undefined)).toBe(storyDesignHelper.designHash('a'))
|
|
100
97
|
})
|
|
101
98
|
})
|
|
102
99
|
|
|
@@ -19,6 +19,7 @@ const DECLARED: Record<string, number | undefined> = {
|
|
|
19
19
|
ConnectOpRefused: 422,
|
|
20
20
|
ConnectOutOfCredits: 402,
|
|
21
21
|
ConnectConsentRequired: 428,
|
|
22
|
+
ConnectConfirmationRequired: 428,
|
|
22
23
|
ConnectOpTimeout: undefined,
|
|
23
24
|
ProjectResourceError: undefined,
|
|
24
25
|
ProjectNotFound: 404,
|
|
@@ -41,7 +42,7 @@ describe('viable-common refusals — declared HTTP statuses', () => {
|
|
|
41
42
|
expect(classes.map(([name]) => name).sort()).toEqual(Object.keys(DECLARED).sort())
|
|
42
43
|
})
|
|
43
44
|
|
|
44
|
-
test('balance 402, an absent target 404, a conflicting state 409, refused content 422, a consent only a person gives 428; faults nothing', () => {
|
|
45
|
+
test('balance 402, an absent target 404, a conflicting state 409, refused content 422, a consent or a confirmation only a person gives 428; faults nothing', () => {
|
|
45
46
|
for (const [name, Class] of classes) {
|
|
46
47
|
expect([name, statusOf(new Class('x'))]).toEqual([name, DECLARED[name]])
|
|
47
48
|
}
|
|
@@ -60,5 +61,10 @@ describe('viable-common refusals — declared HTTP statuses', () => {
|
|
|
60
61
|
new connect.ConnectConsentRequired(connect.ConnectConsentRequired.encode('story', 'https://x.test/?consent=1')).marshal()
|
|
61
62
|
)
|
|
62
63
|
expect([statusOf(consent), (consent as connect.ConnectConsentRequired).consentUrl]).toEqual([428, 'https://x.test/?consent=1'])
|
|
64
|
+
const confirmation = ResilientError.ensure(new connect.ConnectConfirmationRequired(connect.ConnectConfirmationRequired.encode({
|
|
65
|
+
action: 'convert-proceed', cap: 1_000_000, spent: 420_000, estimate: 300_000, fromAllowance: 300_000,
|
|
66
|
+
fromCreditLimits: 0, moneyUsd: 0,
|
|
67
|
+
})).marshal())
|
|
68
|
+
expect([statusOf(confirmation), (confirmation as connect.ConnectConfirmationRequired).spent]).toEqual([428, 420_000])
|
|
63
69
|
})
|
|
64
70
|
})
|
package/tests/planning.spec.ts
CHANGED
|
@@ -2,32 +2,15 @@ import { describe, expect, test } from 'bun:test'
|
|
|
2
2
|
import Ajv from 'ajv'
|
|
3
3
|
import addFormats from 'ajv-formats'
|
|
4
4
|
import { ResilientError } from '@owlmeans/error'
|
|
5
|
-
import {
|
|
6
|
-
canTransit, CodeScope, CodeStyle, intrinsicOf, IntrinsicStatus, makeSchemaRegistry,
|
|
7
|
-
SpecificationFormat, TITLE_MAX, transitionsFrom, WorkcardKind,
|
|
8
|
-
} from '@owlmeans/planning'
|
|
9
|
-
import type { Specification } from '@owlmeans/planning'
|
|
5
|
+
import { CodeScope, CodeStyle, IntrinsicStatus, makeSchemaRegistry, SpecificationFormat, TITLE_MAX, WorkcardKind, type Specification, statusHelper } from '@owlmeans/planning'
|
|
10
6
|
import { ProjectArea } from '../src/areas/consts.js'
|
|
11
7
|
import { ConnectingStoryKind, SpecCategory, StoryKind } from '../src/ba/consts.js'
|
|
12
|
-
import {
|
|
13
|
-
import { STORY_DESIGN_VERSION } from '../src/design/consts.js'
|
|
14
|
-
import {
|
|
15
|
-
import { StoryActor } from '../src/design/runtime.js'
|
|
8
|
+
import { connectingStoryHelper } from '../src/ba/connecting.js'
|
|
9
|
+
import { STORY_DESIGN_VERSION, StoryActor } from '../src/design/consts.js'
|
|
10
|
+
import { storyDesignHelper } from '../src/design/story.js'
|
|
16
11
|
import type { StoryDesign } from '../src/design/types.js'
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
} from '../src/index.js'
|
|
20
|
-
import {
|
|
21
|
-
isUserChannel, isViableProject, isViableStory, ProjectAgentOccupied, ProjectNotFound,
|
|
22
|
-
ProjectStoryMissconfigured, projectBriefOf, storyDraftOf, storyWriteInputOf, userStoryOf,
|
|
23
|
-
VIABLE_FLOW_SCHEMAS, VIABLE_PROJECT_FLOW, VIABLE_PROJECT_FLOW_SCHEMA, VIABLE_PROJECT_TYPE,
|
|
24
|
-
VIABLE_PROJECT_TYPE_SCHEMA, VIABLE_RESERVED_TYPE_SCHEMAS, VIABLE_SPEC_TYPE, VIABLE_STORY_FLOW,
|
|
25
|
-
VIABLE_STORY_FLOW_SCHEMA,
|
|
26
|
-
VIABLE_STORY_TYPE, VIABLE_STORY_TYPE_SCHEMA, VIABLE_TYPE_SCHEMAS, ViableChannel,
|
|
27
|
-
ViableProjectFieldsSchema, ViableProjectStatus, ViableProjectTransition, ViableRelationship,
|
|
28
|
-
ViableSpecCategory, ViableStoryFieldsSchema, ViableStoryStatus, ViableStoryTransition,
|
|
29
|
-
} from '../src/planning/index.js'
|
|
30
|
-
import type { ViableProjectCard, ViableStoryCard } from '../src/planning/index.js'
|
|
12
|
+
import { LANDING_STORY_SENTENCE, landingSentenceHelper } from '../src/index.js'
|
|
13
|
+
import { ProjectAgentOccupied, ProjectNotFound, ProjectStoryMissconfigured, VIABLE_FLOW_SCHEMAS, VIABLE_PROJECT_FLOW, VIABLE_PROJECT_FLOW_SCHEMA, VIABLE_PROJECT_TYPE, VIABLE_PROJECT_TYPE_SCHEMA, VIABLE_RESERVED_TYPE_SCHEMAS, VIABLE_SPEC_TYPE, VIABLE_STORY_FLOW, VIABLE_STORY_FLOW_SCHEMA, VIABLE_STORY_TYPE, VIABLE_STORY_TYPE_SCHEMA, VIABLE_TYPE_SCHEMAS, ViableChannel, ViableProjectFieldsSchema, ViableProjectStatus, ViableProjectTransition, ViableRelationship, ViableSpecCategory, ViableStoryFieldsSchema, ViableStoryStatus, ViableStoryTransition, type ViableProjectCard, type ViableStoryCard, viableCardHelper, viableSpecHelper } from '../src/planning/index.js'
|
|
31
14
|
|
|
32
15
|
const at = '2026-09-16T10:00:00.000Z'
|
|
33
16
|
|
|
@@ -91,7 +74,7 @@ const spec = (category: string, body: string, revision?: number): Specification
|
|
|
91
74
|
...(revision != null ? { revision } : {}),
|
|
92
75
|
})
|
|
93
76
|
|
|
94
|
-
const designed = (): StoryDesign => emptyStoryDesign({
|
|
77
|
+
const designed = (): StoryDesign => storyDesignHelper.emptyStoryDesign({
|
|
95
78
|
code: 'US-OLD00',
|
|
96
79
|
narrative: 'The narrative the design was written against.',
|
|
97
80
|
area: ProjectArea.Guest,
|
|
@@ -121,30 +104,30 @@ describe('viable-common - the story flow', () => {
|
|
|
121
104
|
test('maps a failed story onto PLANNED, so done is the closed count and a retry is a start', () => {
|
|
122
105
|
const flow = VIABLE_STORY_FLOW_SCHEMA
|
|
123
106
|
|
|
124
|
-
expect(intrinsicOf(flow, ViableStoryStatus.Planned)).toBe(IntrinsicStatus.Planned)
|
|
125
|
-
expect(intrinsicOf(flow, ViableStoryStatus.InProgress)).toBe(IntrinsicStatus.InProgress)
|
|
126
|
-
expect(intrinsicOf(flow, ViableStoryStatus.Completed)).toBe(IntrinsicStatus.Closed)
|
|
127
|
-
expect(intrinsicOf(flow, ViableStoryStatus.Failed)).toBe(IntrinsicStatus.Planned)
|
|
107
|
+
expect(statusHelper.intrinsicOf(flow, ViableStoryStatus.Planned)).toBe(IntrinsicStatus.Planned)
|
|
108
|
+
expect(statusHelper.intrinsicOf(flow, ViableStoryStatus.InProgress)).toBe(IntrinsicStatus.InProgress)
|
|
109
|
+
expect(statusHelper.intrinsicOf(flow, ViableStoryStatus.Completed)).toBe(IntrinsicStatus.Closed)
|
|
110
|
+
expect(statusHelper.intrinsicOf(flow, ViableStoryStatus.Failed)).toBe(IntrinsicStatus.Planned)
|
|
128
111
|
})
|
|
129
112
|
|
|
130
113
|
test('starts from planned or failed only, and resets from anywhere', () => {
|
|
131
114
|
const flow = VIABLE_STORY_FLOW_SCHEMA
|
|
132
115
|
const { Planned, InProgress, Completed, Failed } = ViableStoryStatus
|
|
133
116
|
|
|
134
|
-
expect(canTransit(flow, ViableStoryTransition.Start, Planned)).toBe(true)
|
|
135
|
-
expect(canTransit(flow, ViableStoryTransition.Start, Failed)).toBe(true)
|
|
136
|
-
expect(canTransit(flow, ViableStoryTransition.Start, InProgress)).toBe(false)
|
|
137
|
-
expect(canTransit(flow, ViableStoryTransition.Start, Completed)).toBe(false)
|
|
138
|
-
expect(canTransit(flow, ViableStoryTransition.Complete, InProgress)).toBe(true)
|
|
139
|
-
expect(canTransit(flow, ViableStoryTransition.Fail, InProgress)).toBe(true)
|
|
140
|
-
expect(canTransit(flow, ViableStoryTransition.Fail, Planned)).toBe(false)
|
|
117
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Start, Planned)).toBe(true)
|
|
118
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Start, Failed)).toBe(true)
|
|
119
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Start, InProgress)).toBe(false)
|
|
120
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Start, Completed)).toBe(false)
|
|
121
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Complete, InProgress)).toBe(true)
|
|
122
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Fail, InProgress)).toBe(true)
|
|
123
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Fail, Planned)).toBe(false)
|
|
141
124
|
for (const status of Object.values(ViableStoryStatus)) {
|
|
142
|
-
expect(canTransit(flow, ViableStoryTransition.Reset, status)).toBe(true)
|
|
125
|
+
expect(statusHelper.canTransit(flow, ViableStoryTransition.Reset, status)).toBe(true)
|
|
143
126
|
}
|
|
144
127
|
})
|
|
145
128
|
|
|
146
129
|
test('offers a completed story nothing but a reset', () => {
|
|
147
|
-
expect(transitionsFrom(VIABLE_STORY_FLOW_SCHEMA, ViableStoryStatus.Completed).map(rule => rule.name))
|
|
130
|
+
expect(statusHelper.transitionsFrom(VIABLE_STORY_FLOW_SCHEMA, ViableStoryStatus.Completed).map(rule => rule.name))
|
|
148
131
|
.toEqual([ViableStoryTransition.Reset])
|
|
149
132
|
})
|
|
150
133
|
})
|
|
@@ -155,15 +138,15 @@ describe('viable-common - the project flow', () => {
|
|
|
155
138
|
const { Draft, Confirmed, Active, Archived } = ViableProjectStatus
|
|
156
139
|
|
|
157
140
|
expect(flow.statuses.find(status => status.initial === true)?.key).toBe(Draft)
|
|
158
|
-
expect(intrinsicOf(flow, Draft)).toBe(IntrinsicStatus.Planned)
|
|
159
|
-
expect(intrinsicOf(flow, Confirmed)).toBe(IntrinsicStatus.InProgress)
|
|
160
|
-
expect(intrinsicOf(flow, Active)).toBe(IntrinsicStatus.InProgress)
|
|
161
|
-
expect(intrinsicOf(flow, Archived)).toBe(IntrinsicStatus.Closed)
|
|
162
|
-
expect(canTransit(flow, ViableProjectTransition.Confirm, Draft)).toBe(true)
|
|
163
|
-
expect(canTransit(flow, ViableProjectTransition.Confirm, Active)).toBe(false)
|
|
164
|
-
expect(canTransit(flow, ViableProjectTransition.Activate, Confirmed)).toBe(true)
|
|
165
|
-
expect(canTransit(flow, ViableProjectTransition.Archive, Active)).toBe(true)
|
|
166
|
-
expect(canTransit(flow, ViableProjectTransition.Reopen, Archived)).toBe(true)
|
|
141
|
+
expect(statusHelper.intrinsicOf(flow, Draft)).toBe(IntrinsicStatus.Planned)
|
|
142
|
+
expect(statusHelper.intrinsicOf(flow, Confirmed)).toBe(IntrinsicStatus.InProgress)
|
|
143
|
+
expect(statusHelper.intrinsicOf(flow, Active)).toBe(IntrinsicStatus.InProgress)
|
|
144
|
+
expect(statusHelper.intrinsicOf(flow, Archived)).toBe(IntrinsicStatus.Closed)
|
|
145
|
+
expect(statusHelper.canTransit(flow, ViableProjectTransition.Confirm, Draft)).toBe(true)
|
|
146
|
+
expect(statusHelper.canTransit(flow, ViableProjectTransition.Confirm, Active)).toBe(false)
|
|
147
|
+
expect(statusHelper.canTransit(flow, ViableProjectTransition.Activate, Confirmed)).toBe(true)
|
|
148
|
+
expect(statusHelper.canTransit(flow, ViableProjectTransition.Archive, Active)).toBe(true)
|
|
149
|
+
expect(statusHelper.canTransit(flow, ViableProjectTransition.Reopen, Archived)).toBe(true)
|
|
167
150
|
})
|
|
168
151
|
})
|
|
169
152
|
|
|
@@ -314,15 +297,15 @@ describe('viable-common - the viable field schemas', () => {
|
|
|
314
297
|
|
|
315
298
|
describe('viable-common - the viable card helpers', () => {
|
|
316
299
|
test('recognises a card by kind AND type', () => {
|
|
317
|
-
expect(isViableStory(storyCard())).toBe(true)
|
|
318
|
-
expect(isViableStory(storyCard({ type: 'notion:task' }))).toBe(false)
|
|
319
|
-
expect(isViableProject(projectCard())).toBe(true)
|
|
320
|
-
expect(isViableProject(storyCard())).toBe(false)
|
|
300
|
+
expect(viableCardHelper.isViableStory(storyCard())).toBe(true)
|
|
301
|
+
expect(viableCardHelper.isViableStory(storyCard({ type: 'notion:task' }))).toBe(false)
|
|
302
|
+
expect(viableCardHelper.isViableProject(projectCard())).toBe(true)
|
|
303
|
+
expect(viableCardHelper.isViableProject(storyCard())).toBe(false)
|
|
321
304
|
})
|
|
322
305
|
|
|
323
306
|
test('userStoryOf lets the card win on narrative, code, area and actor, and takes screens from the design', () => {
|
|
324
307
|
const card = storyCard({ fields: { area: ProjectArea.User, primary: true, actor: StoryActor.Worker } })
|
|
325
|
-
const story = userStoryOf(card, designed())
|
|
308
|
+
const story = viableCardHelper.userStoryOf(card, designed())
|
|
326
309
|
|
|
327
310
|
expect(story.story).toBe(card.title)
|
|
328
311
|
expect(story.code).toBe('US-ABC12')
|
|
@@ -330,12 +313,12 @@ describe('viable-common - the viable card helpers', () => {
|
|
|
330
313
|
expect(story.actor).toBe(StoryActor.Worker)
|
|
331
314
|
expect(story.screens.map(screen => screen.name)).toEqual(['booking/list/overview'])
|
|
332
315
|
expect(story.entities.map(entity => entity.name)).toEqual(['Booking'])
|
|
333
|
-
expect(userStoryOf(card).screens).toEqual([])
|
|
334
|
-
expect(storyDraftOf(card)).toEqual({ story: card.title, area: ProjectArea.User })
|
|
316
|
+
expect(viableCardHelper.userStoryOf(card).screens).toEqual([])
|
|
317
|
+
expect(viableCardHelper.storyDraftOf(card)).toEqual({ story: card.title, area: ProjectArea.User })
|
|
335
318
|
})
|
|
336
319
|
|
|
337
320
|
test('projectBriefOf reads the highest revision per part and answers an unwritten part empty', () => {
|
|
338
|
-
const brief = projectBriefOf(projectCard(), [
|
|
321
|
+
const brief = viableSpecHelper.projectBriefOf(projectCard(), [
|
|
339
322
|
spec(ViableSpecCategory.Specification, 'first', 1),
|
|
340
323
|
spec(ViableSpecCategory.Specification, 'second', 2),
|
|
341
324
|
spec(ViableSpecCategory.Vision, 'the vision'),
|
|
@@ -349,62 +332,62 @@ describe('viable-common - the viable card helpers', () => {
|
|
|
349
332
|
|
|
350
333
|
test('storyWriteInputOf takes code, narrative and primary from the card, and refuses a card with no code', () => {
|
|
351
334
|
const content = {
|
|
352
|
-
userStory: userStoryOf(storyCard()), screenPaths: {}, componentPaths: {}, transitions: [],
|
|
335
|
+
userStory: viableCardHelper.userStoryOf(storyCard()), screenPaths: {}, componentPaths: {}, transitions: [],
|
|
353
336
|
section: 'Booking',
|
|
354
337
|
}
|
|
355
338
|
|
|
356
|
-
expect(storyWriteInputOf(storyCard(), content)).toEqual(expect.objectContaining({
|
|
339
|
+
expect(viableCardHelper.storyWriteInputOf(storyCard(), content)).toEqual(expect.objectContaining({
|
|
357
340
|
code: 'US-ABC12', narrative: 'A member books a slot.', primary: true,
|
|
358
341
|
status: ViableStoryStatus.Planned, section: 'Booking',
|
|
359
342
|
}))
|
|
360
|
-
expect(storyWriteInputOf(storyCard(), { ...content, status: ViableStoryStatus.Completed }).status)
|
|
343
|
+
expect(viableCardHelper.storyWriteInputOf(storyCard(), { ...content, status: ViableStoryStatus.Completed }).status)
|
|
361
344
|
.toBe(ViableStoryStatus.Completed)
|
|
362
|
-
expect(() => storyWriteInputOf(storyCard({ code: undefined }), content))
|
|
345
|
+
expect(() => viableCardHelper.storyWriteInputOf(storyCard({ code: undefined }), content))
|
|
363
346
|
.toThrow(ProjectStoryMissconfigured)
|
|
364
347
|
})
|
|
365
348
|
|
|
366
349
|
test('storyWriteInputOf copies the landing flag from the card, and only when it is set', () => {
|
|
367
350
|
const content = {
|
|
368
|
-
userStory: userStoryOf(storyCard()), screenPaths: {}, componentPaths: {}, transitions: [],
|
|
351
|
+
userStory: viableCardHelper.userStoryOf(storyCard()), screenPaths: {}, componentPaths: {}, transitions: [],
|
|
369
352
|
}
|
|
370
353
|
const landing = storyCard({ fields: { area: ProjectArea.User, primary: false, landing: true } })
|
|
371
354
|
|
|
372
|
-
expect(storyWriteInputOf(landing, content).landing).toBe(true)
|
|
373
|
-
expect('landing' in storyWriteInputOf(storyCard(), content)).toBe(false)
|
|
355
|
+
expect(viableCardHelper.storyWriteInputOf(landing, content).landing).toBe(true)
|
|
356
|
+
expect('landing' in viableCardHelper.storyWriteInputOf(storyCard(), content)).toBe(false)
|
|
374
357
|
})
|
|
375
358
|
|
|
376
359
|
test('only a person writes through the web and connect channels', () => {
|
|
377
|
-
expect(isUserChannel(ViableChannel.Web)).toBe(true)
|
|
378
|
-
expect(isUserChannel(ViableChannel.Connect)).toBe(true)
|
|
379
|
-
expect(isUserChannel(ViableChannel.Pipeline)).toBe(false)
|
|
380
|
-
expect(isUserChannel(undefined)).toBe(false)
|
|
360
|
+
expect(viableCardHelper.isUserChannel(ViableChannel.Web)).toBe(true)
|
|
361
|
+
expect(viableCardHelper.isUserChannel(ViableChannel.Connect)).toBe(true)
|
|
362
|
+
expect(viableCardHelper.isUserChannel(ViableChannel.Pipeline)).toBe(false)
|
|
363
|
+
expect(viableCardHelper.isUserChannel(undefined)).toBe(false)
|
|
381
364
|
})
|
|
382
365
|
})
|
|
383
366
|
|
|
384
367
|
describe('viable-common - the landing sentence', () => {
|
|
385
368
|
test('is appended once, with one space, and a resumed step never adds a second copy', () => {
|
|
386
|
-
const once = withLandingSentence('A member books a slot.')
|
|
369
|
+
const once = landingSentenceHelper.withLandingSentence('A member books a slot.')
|
|
387
370
|
|
|
388
371
|
expect(once).toBe(`A member books a slot. ${LANDING_STORY_SENTENCE}`)
|
|
389
|
-
expect(withLandingSentence(once)).toBe(once)
|
|
390
|
-
expect(hasLandingSentence(once)).toBe(true)
|
|
391
|
-
expect(hasLandingSentence('A member books a slot.')).toBe(false)
|
|
372
|
+
expect(landingSentenceHelper.withLandingSentence(once)).toBe(once)
|
|
373
|
+
expect(landingSentenceHelper.hasLandingSentence(once)).toBe(true)
|
|
374
|
+
expect(landingSentenceHelper.hasLandingSentence('A member books a slot.')).toBe(false)
|
|
392
375
|
})
|
|
393
376
|
|
|
394
377
|
test('is recognised whatever whitespace a person left around it', () => {
|
|
395
378
|
const rewrapped = `A member books a slot.\n${LANDING_STORY_SENTENCE.replace('; after', ';\n after')}`
|
|
396
379
|
|
|
397
|
-
expect(hasLandingSentence(rewrapped)).toBe(true)
|
|
398
|
-
expect(withLandingSentence(rewrapped)).toBe(rewrapped)
|
|
380
|
+
expect(landingSentenceHelper.hasLandingSentence(rewrapped)).toBe(true)
|
|
381
|
+
expect(landingSentenceHelper.withLandingSentence(rewrapped)).toBe(rewrapped)
|
|
399
382
|
})
|
|
400
383
|
|
|
401
384
|
test('never makes a title longer than a card accepts, and never cuts the narrative', () => {
|
|
402
385
|
const long = 'x'.repeat(TITLE_MAX - 10)
|
|
403
386
|
|
|
404
|
-
expect(withLandingSentence(long)).toBe(long)
|
|
405
|
-
expect(withLandingSentence('x'.repeat(TITLE_MAX - LANDING_STORY_SENTENCE.length - 1)).length)
|
|
387
|
+
expect(landingSentenceHelper.withLandingSentence(long)).toBe(long)
|
|
388
|
+
expect(landingSentenceHelper.withLandingSentence('x'.repeat(TITLE_MAX - LANDING_STORY_SENTENCE.length - 1)).length)
|
|
406
389
|
.toBe(TITLE_MAX)
|
|
407
|
-
expect(withLandingSentence(' ')).toBe(LANDING_STORY_SENTENCE)
|
|
390
|
+
expect(landingSentenceHelper.withLandingSentence(' ')).toBe(LANDING_STORY_SENTENCE)
|
|
408
391
|
})
|
|
409
392
|
})
|
|
410
393
|
|
|
@@ -415,7 +398,7 @@ describe('viable-common - the follows anchor', () => {
|
|
|
415
398
|
{ story: 'Two', area: ProjectArea.User },
|
|
416
399
|
{ story: 'Three', area: ProjectArea.Admin },
|
|
417
400
|
]
|
|
418
|
-
const merged = mergeConnectingStories(flow, [
|
|
401
|
+
const merged = connectingStoryHelper.mergeConnectingStories(flow, [
|
|
419
402
|
{ story: 'Queue', area: ProjectArea.Admin, kind: ConnectingStoryKind.Queue, after: 9 },
|
|
420
403
|
{ story: 'Tracker', area: ProjectArea.User, kind: ConnectingStoryKind.Tracker, after: 1 },
|
|
421
404
|
])
|