@owlmeans/viable-common 0.0.42 → 0.0.44
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 +1 -1
- package/agent-meta/skills/viable-common/SKILL.md +33 -15
- 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 +1 -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.d.ts +2 -86
- package/build/agent/presentation.d.ts.map +1 -1
- package/build/agent/presentation.js +2 -104
- 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 +2 -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/tenancy.d.ts +1 -36
- package/build/areas/tenancy.d.ts.map +1 -1
- package/build/areas/tenancy.js +1 -5
- 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/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 +2 -50
- 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/consts.d.ts +0 -10
- package/build/connect/consts.d.ts.map +1 -1
- package/build/connect/consts.js +0 -23
- package/build/connect/consts.js.map +1 -1
- package/build/connect/entrypoints.d.ts +49 -86
- 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.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 +1 -0
- 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/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 +2 -1
- package/build/connect/schemas.d.ts.map +1 -1
- package/build/connect/schemas.js +9 -0
- package/build/connect/schemas.js.map +1 -1
- package/build/connect/types.d.ts +214 -1
- package/build/connect/types.d.ts.map +1 -1
- package/build/connect/types.local.d.ts +4 -0
- package/build/connect/types.local.d.ts.map +1 -0
- package/build/connect/types.local.js +2 -0
- package/build/connect/types.local.js.map +1 -0
- package/build/connect/utils.d.ts +12 -0
- package/build/connect/utils.d.ts.map +1 -0
- package/build/connect/utils.js +25 -0
- package/build/connect/utils.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/consts.d.ts +0 -12
- package/build/convert/consts.d.ts.map +1 -1
- package/build/convert/consts.js +0 -3
- package/build/convert/consts.js.map +1 -1
- package/build/convert/consts.local.d.ts +55 -0
- package/build/convert/consts.local.d.ts.map +1 -0
- package/build/convert/consts.local.js +104 -0
- package/build/convert/consts.local.js.map +1 -0
- package/build/convert/helpers.d.ts.map +1 -1
- package/build/convert/helpers.js +1 -102
- package/build/convert/helpers.js.map +1 -1
- package/build/convert/index.d.ts +1 -0
- package/build/convert/index.d.ts.map +1 -1
- package/build/convert/index.js +1 -0
- package/build/convert/index.js.map +1 -1
- package/build/convert/types.d.ts +10 -1
- package/build/convert/types.d.ts.map +1 -1
- package/build/convert/utils.d.ts +4 -0
- package/build/convert/utils.d.ts.map +1 -0
- package/build/convert/utils.js +5 -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/runtime.d.ts +2 -103
- package/build/design/runtime.d.ts.map +1 -1
- package/build/design/runtime.js +1 -44
- 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/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 +4 -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 +1 -0
- package/build/integrity/index.d.ts.map +1 -1
- package/build/integrity/index.js +1 -0
- package/build/integrity/index.js.map +1 -1
- package/build/integrity/types.d.ts +33 -1
- package/build/integrity/types.d.ts.map +1 -1
- package/build/integrity/utils.d.ts +88 -0
- package/build/integrity/utils.d.ts.map +1 -0
- package/build/integrity/utils.js +280 -0
- package/build/integrity/utils.js.map +1 -0
- package/build/integrity/verify.d.ts.map +1 -1
- package/build/integrity/verify.js +2 -1
- package/build/integrity/verify.js.map +1 -1
- package/build/intent/consts.local.d.ts +4 -0
- package/build/intent/consts.local.d.ts.map +1 -0
- package/build/intent/consts.local.js +3 -0
- package/build/intent/consts.local.js.map +1 -0
- package/build/intent/entrypoints.d.ts +0 -1
- package/build/intent/entrypoints.d.ts.map +1 -1
- package/build/intent/flow.d.ts.map +1 -1
- package/build/intent/flow.js +2 -2
- package/build/intent/flow.js.map +1 -1
- package/build/intent/types.d.ts +2 -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/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/index.d.ts +0 -1
- package/build/planning/index.d.ts.map +1 -1
- package/build/planning/index.js +0 -1
- package/build/planning/index.js.map +1 -1
- package/build/planning/landing.d.ts +0 -12
- package/build/planning/landing.d.ts.map +1 -1
- package/build/planning/landing.js +1 -13
- package/build/planning/landing.js.map +1 -1
- package/build/planning/schemas.d.ts +37 -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/types.d.ts +2 -2
- 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/helpers.d.ts +1 -14
- package/build/scaffold/helpers.d.ts.map +1 -1
- package/build/scaffold/helpers.js +11 -0
- package/build/scaffold/helpers.js.map +1 -1
- package/build/scaffold/types.d.ts +2 -0
- package/build/scaffold/types.d.ts.map +1 -1
- 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 +1 -6
- package/build/slot/helpers.d.ts.map +1 -1
- package/build/slot/helpers.js.map +1 -1
- package/build/slot/index.d.ts +1 -0
- package/build/slot/index.d.ts.map +1 -1
- package/build/slot/index.js +1 -0
- package/build/slot/index.js.map +1 -1
- package/build/slot/layout.d.ts +1 -57
- package/build/slot/layout.d.ts.map +1 -1
- package/build/slot/layout.js +0 -12
- package/build/slot/layout.js.map +1 -1
- package/build/slot/types.d.ts +55 -1
- package/build/slot/types.d.ts.map +1 -1
- package/build/slot/utils.d.ts +18 -0
- package/build/slot/utils.d.ts.map +1 -0
- package/build/slot/utils.js +41 -0
- package/build/slot/utils.js.map +1 -0
- package/build/topology/card.d.ts +1 -6
- package/build/topology/card.d.ts.map +1 -1
- package/build/topology/card.js +1 -3
- 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/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 +1 -0
- package/src/agent/presentation.ts +4 -147
- package/src/agent/types.local.ts +1 -0
- package/src/agent/types.ts +40 -0
- package/src/areas/consts.ts +7 -0
- package/src/areas/tenancy.ts +2 -38
- package/src/areas/types.ts +31 -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 +2 -72
- package/src/blueprint/utils.ts +20 -0
- package/src/branding.ts +0 -17
- package/src/connect/consts.ts +0 -22
- package/src/connect/entrypoints.ts +7 -35
- package/src/connect/errors.ts +75 -0
- package/src/connect/index.ts +1 -0
- package/src/connect/references.ts +4 -75
- package/src/connect/schemas.ts +11 -0
- package/src/connect/types.local.ts +5 -0
- package/src/connect/types.ts +124 -1
- package/src/connect/utils.ts +23 -0
- package/src/consts.ts +17 -0
- package/src/convert/consts.local.ts +120 -0
- package/src/convert/consts.ts +0 -14
- package/src/convert/helpers.ts +1 -119
- package/src/convert/index.ts +1 -0
- package/src/convert/types.ts +11 -5
- package/src/convert/utils.ts +8 -0
- package/src/design/consts.ts +48 -0
- package/src/design/runtime.ts +2 -115
- package/src/design/schemas.ts +2 -10
- 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 +1 -0
- package/src/integrity/types.ts +34 -1
- package/src/integrity/utils.ts +320 -0
- package/src/integrity/verify.ts +2 -4
- package/src/intent/consts.local.ts +3 -0
- package/src/intent/entrypoints.ts +0 -1
- package/src/intent/flow.ts +2 -3
- package/src/intent/types.ts +3 -0
- package/src/metadata/consts.ts +37 -0
- package/src/metadata/types.ts +1 -37
- package/src/planning/consts.ts +15 -2
- package/src/planning/index.ts +0 -1
- package/src/planning/landing.ts +1 -14
- package/src/planning/schemas.ts +191 -4
- package/src/planning/types.ts +2 -2
- package/src/preview/consts.ts +2 -0
- package/src/preview/types.ts +19 -0
- package/src/scaffold/helpers.ts +1 -4
- package/src/scaffold/types.ts +3 -0
- package/src/slot/consts.ts +11 -40
- package/src/slot/helpers.ts +1 -6
- package/src/slot/index.ts +1 -0
- package/src/slot/layout.ts +1 -62
- package/src/slot/types.ts +57 -1
- package/src/slot/utils.ts +45 -0
- package/src/topology/card.ts +2 -9
- package/src/topology/consts.local.ts +6 -0
- package/src/topology/types.ts +6 -0
- 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 +2 -3
- package/tests/error-status.spec.ts +7 -1
- package/tests/planning.spec.ts +3 -18
- package/tests/presentation.spec.ts +2 -4
- 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/src/planning/flows.ts +0 -204
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { HARNESS_PROTECTED, ROOT_PROTECTED } from './consts.local.js'
|
|
2
|
+
import { TARGET_BUNDLED_PACKAGES, TARGET_CURRENT_LAYOUT, TARGET_LEGACY_BUNDLED_PACKAGES, TARGET_LEGACY_PACKAGES, TARGET_LEGACY_PACKAGES_DIR, TARGET_PACKAGES_DIR, TargetLayout, TargetLegacyPackage, TargetPackage } from './consts.js'
|
|
3
|
+
import type { TargetLayoutManifest } from './types.js'
|
|
4
|
+
|
|
5
|
+
const fileIn = (dir: string, pkg: string, path: string): string => `${dir}/${pkg}/${path}`
|
|
6
|
+
|
|
7
|
+
const protectedOf = (
|
|
8
|
+
dir: string, packages: readonly string[], bundled: readonly string[]
|
|
9
|
+
): readonly string[] => [
|
|
10
|
+
...ROOT_PROTECTED,
|
|
11
|
+
...HARNESS_PROTECTED,
|
|
12
|
+
...packages.flatMap(pkg => [fileIn(dir, pkg, 'package.json'), fileIn(dir, pkg, 'tsconfig.json')]),
|
|
13
|
+
...bundled.flatMap(pkg =>
|
|
14
|
+
[fileIn(dir, pkg, 'rollup.config.js'), fileIn(dir, pkg, 'rollup.build.mjs')]),
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
const v2 = (pkg: TargetPackage, path: string): string =>
|
|
18
|
+
fileIn(TARGET_PACKAGES_DIR, pkg, path)
|
|
19
|
+
|
|
20
|
+
const v1 = (pkg: TargetLegacyPackage, path: string): string =>
|
|
21
|
+
fileIn(TARGET_LEGACY_PACKAGES_DIR, pkg, path)
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The current layout: five workspace packages under `sources/`.
|
|
25
|
+
*
|
|
26
|
+
* `common` and `backend` are libraries the other three import, so they emit declarations with
|
|
27
|
+
* `tsc -b` rather than a bundle; `api`, `web` and `worker` each bundle themselves.
|
|
28
|
+
*/
|
|
29
|
+
const V2_MANIFEST: TargetLayoutManifest = {
|
|
30
|
+
layout: TargetLayout.V2,
|
|
31
|
+
dir: TARGET_PACKAGES_DIR,
|
|
32
|
+
packages: Object.values(TargetPackage),
|
|
33
|
+
// The same file the publisher's own filesystem detection probes for (`sources/api`), so the
|
|
34
|
+
// two answers about one volume cannot disagree.
|
|
35
|
+
probe: v2(TargetPackage.Api, 'package.json'),
|
|
36
|
+
files: [
|
|
37
|
+
'package.json',
|
|
38
|
+
'bunfig.toml',
|
|
39
|
+
v2(TargetPackage.Common, 'package.json'),
|
|
40
|
+
v2(TargetPackage.Common, 'tsconfig.json'),
|
|
41
|
+
v2(TargetPackage.Common, 'src/index.ts'),
|
|
42
|
+
v2(TargetPackage.Common, 'src/entrypoints.ts'),
|
|
43
|
+
v2(TargetPackage.Backend, 'package.json'),
|
|
44
|
+
v2(TargetPackage.Backend, 'tsconfig.json'),
|
|
45
|
+
v2(TargetPackage.Backend, 'src/index.ts'),
|
|
46
|
+
v2(TargetPackage.Backend, 'src/context.ts'),
|
|
47
|
+
v2(TargetPackage.Backend, 'src/config.ts'),
|
|
48
|
+
v2(TargetPackage.Api, 'package.json'),
|
|
49
|
+
v2(TargetPackage.Api, 'tsconfig.json'),
|
|
50
|
+
v2(TargetPackage.Api, 'rollup.config.js'),
|
|
51
|
+
v2(TargetPackage.Api, 'rollup.build.mjs'),
|
|
52
|
+
v2(TargetPackage.Api, 'src/index.ts'),
|
|
53
|
+
v2(TargetPackage.Api, 'src/owlmeans.ts'),
|
|
54
|
+
v2(TargetPackage.Api, 'src/config.ts'),
|
|
55
|
+
v2(TargetPackage.Api, 'src/entrypoints.ts'),
|
|
56
|
+
v2(TargetPackage.Web, 'package.json'),
|
|
57
|
+
v2(TargetPackage.Web, 'tsconfig.json'),
|
|
58
|
+
v2(TargetPackage.Web, 'rollup.config.js'),
|
|
59
|
+
v2(TargetPackage.Web, 'rollup.build.mjs'),
|
|
60
|
+
v2(TargetPackage.Web, 'src/index.tsx'),
|
|
61
|
+
v2(TargetPackage.Web, 'src/owlmeans.ts'),
|
|
62
|
+
v2(TargetPackage.Web, 'src/config.ts'),
|
|
63
|
+
v2(TargetPackage.Web, 'src/entrypoints.ts'),
|
|
64
|
+
v2(TargetPackage.Worker, 'package.json'),
|
|
65
|
+
v2(TargetPackage.Worker, 'tsconfig.json'),
|
|
66
|
+
v2(TargetPackage.Worker, 'rollup.config.js'),
|
|
67
|
+
v2(TargetPackage.Worker, 'rollup.build.mjs'),
|
|
68
|
+
v2(TargetPackage.Worker, 'src/index.ts'),
|
|
69
|
+
v2(TargetPackage.Worker, 'src/owlmeans.ts'),
|
|
70
|
+
v2(TargetPackage.Worker, 'src/config.ts'),
|
|
71
|
+
v2(TargetPackage.Worker, 'src/entrypoints.ts'),
|
|
72
|
+
],
|
|
73
|
+
protectedFiles: protectedOf(
|
|
74
|
+
TARGET_PACKAGES_DIR, Object.values(TargetPackage), TARGET_BUNDLED_PACKAGES),
|
|
75
|
+
buildScripts: {
|
|
76
|
+
[TargetPackage.Common]: 'tsc -b',
|
|
77
|
+
[TargetPackage.Backend]: 'tsc -b',
|
|
78
|
+
[TargetPackage.Api]: 'bun ./rollup.build.mjs',
|
|
79
|
+
[TargetPackage.Web]: 'bun ./rollup.build.mjs',
|
|
80
|
+
[TargetPackage.Worker]: 'bun ./rollup.build.mjs',
|
|
81
|
+
},
|
|
82
|
+
requiredDeps: {
|
|
83
|
+
[TargetPackage.Common]: ['@owlmeans/context', '@owlmeans/entrypoint'],
|
|
84
|
+
[TargetPackage.Backend]: ['@owlmeans/context', '@owlmeans/postgres-resource'],
|
|
85
|
+
[TargetPackage.Api]: ['@owlmeans/server-app'],
|
|
86
|
+
[TargetPackage.Web]: ['@owlmeans/web-client'],
|
|
87
|
+
[TargetPackage.Worker]: ['@owlmeans/queue', '@owlmeans/redis-queue'],
|
|
88
|
+
},
|
|
89
|
+
// `api` and `worker` both reach the database through `backend`, which is the whole reason
|
|
90
|
+
// `backend` is a library: two runtimes, one context factory, one set of resources. A `worker`
|
|
91
|
+
// that stopped depending on `backend` is processing jobs against something else.
|
|
92
|
+
workspaceDeps: {
|
|
93
|
+
[TargetPackage.Common]: [],
|
|
94
|
+
[TargetPackage.Backend]: [TargetPackage.Common],
|
|
95
|
+
[TargetPackage.Api]: [TargetPackage.Common, TargetPackage.Backend],
|
|
96
|
+
[TargetPackage.Web]: [TargetPackage.Common],
|
|
97
|
+
[TargetPackage.Worker]: [TargetPackage.Backend],
|
|
98
|
+
},
|
|
99
|
+
workspaceGlob: `${TARGET_PACKAGES_DIR}/*`,
|
|
100
|
+
workspaceEntries: Object.values(TargetPackage).map(pkg => `${TARGET_PACKAGES_DIR}/${pkg}`),
|
|
101
|
+
markers: {
|
|
102
|
+
[v2(TargetPackage.Common, 'src/index.ts')]: ['./entrypoints.js'],
|
|
103
|
+
[v2(TargetPackage.Backend, 'src/index.ts')]: ['./context.js'],
|
|
104
|
+
[v2(TargetPackage.Backend, 'src/context.ts')]: ['@owlmeans/context', 'makeContext'],
|
|
105
|
+
[v2(TargetPackage.Api, 'src/index.ts')]: ['./owlmeans.js', 'initOwlMeans'],
|
|
106
|
+
[v2(TargetPackage.Api, 'src/owlmeans.ts')]: ['@owlmeans/server-app', 'makeContext'],
|
|
107
|
+
[v2(TargetPackage.Web, 'src/index.tsx')]: ['@owlmeans/web-client', 'renderApp', './owlmeans'],
|
|
108
|
+
[v2(TargetPackage.Web, 'src/owlmeans.ts')]: ['makeContext', 'owlCtx'],
|
|
109
|
+
// The worker binds nothing but its health port; what makes it a worker is that it listens.
|
|
110
|
+
[v2(TargetPackage.Worker, 'src/index.ts')]: ['./owlmeans.js', 'initOwlMeans'],
|
|
111
|
+
[v2(TargetPackage.Worker, 'src/owlmeans.ts')]: ['@owlmeans/queue', 'makeContext'],
|
|
112
|
+
// The build configuration itself: what it reads and what it emits. These are the paths the
|
|
113
|
+
// publisher spawns and serves, so a config that redirects either one is a different program.
|
|
114
|
+
// Matched loosely enough to survive the `path.resolve(srcDir, …)` the template writes them
|
|
115
|
+
// with, and strictly enough that an input or an output somewhere else fails.
|
|
116
|
+
[v2(TargetPackage.Api, 'rollup.config.js')]: ['input:', 'index.ts', 'dist', 'index.js'],
|
|
117
|
+
[v2(TargetPackage.Web, 'rollup.config.js')]: ['input:', 'index.tsx', 'dist', 'bundle.js'],
|
|
118
|
+
[v2(TargetPackage.Worker, 'rollup.config.js')]: ['input:', 'index.ts', 'dist', 'index.js'],
|
|
119
|
+
},
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The legacy layout: three workspace packages under `packages/`.
|
|
124
|
+
*
|
|
125
|
+
* Frozen — nothing generates one any more, and every rule here is stated against the trees that
|
|
126
|
+
* exist rather than against a template this repository still ships (it does not). `backend` is
|
|
127
|
+
* the HTTP server AND the data layer, which is why it carries both `@owlmeans/server-app` and
|
|
128
|
+
* `@owlmeans/postgres-resource`; `common` is the only library.
|
|
129
|
+
*/
|
|
130
|
+
const V1_MANIFEST: TargetLayoutManifest = {
|
|
131
|
+
layout: TargetLayout.V1,
|
|
132
|
+
dir: TARGET_LEGACY_PACKAGES_DIR,
|
|
133
|
+
packages: TARGET_LEGACY_PACKAGES,
|
|
134
|
+
// `packages/backend` again — the publisher's own marker for this layout.
|
|
135
|
+
probe: v1(TargetLegacyPackage.Backend, 'package.json'),
|
|
136
|
+
files: [
|
|
137
|
+
'package.json',
|
|
138
|
+
'bunfig.toml',
|
|
139
|
+
v1(TargetLegacyPackage.Common, 'package.json'),
|
|
140
|
+
v1(TargetLegacyPackage.Common, 'tsconfig.json'),
|
|
141
|
+
v1(TargetLegacyPackage.Common, 'src/index.ts'),
|
|
142
|
+
v1(TargetLegacyPackage.Common, 'src/entrypoints.ts'),
|
|
143
|
+
v1(TargetLegacyPackage.Backend, 'package.json'),
|
|
144
|
+
v1(TargetLegacyPackage.Backend, 'tsconfig.json'),
|
|
145
|
+
v1(TargetLegacyPackage.Backend, 'rollup.config.js'),
|
|
146
|
+
v1(TargetLegacyPackage.Backend, 'rollup.build.mjs'),
|
|
147
|
+
v1(TargetLegacyPackage.Backend, 'src/index.ts'),
|
|
148
|
+
v1(TargetLegacyPackage.Backend, 'src/owlmeans.ts'),
|
|
149
|
+
v1(TargetLegacyPackage.Backend, 'src/config.ts'),
|
|
150
|
+
v1(TargetLegacyPackage.Backend, 'src/entrypoints.ts'),
|
|
151
|
+
v1(TargetLegacyPackage.Frontend, 'package.json'),
|
|
152
|
+
v1(TargetLegacyPackage.Frontend, 'tsconfig.json'),
|
|
153
|
+
v1(TargetLegacyPackage.Frontend, 'rollup.config.js'),
|
|
154
|
+
v1(TargetLegacyPackage.Frontend, 'rollup.build.mjs'),
|
|
155
|
+
v1(TargetLegacyPackage.Frontend, 'src/index.tsx'),
|
|
156
|
+
v1(TargetLegacyPackage.Frontend, 'src/owlmeans.ts'),
|
|
157
|
+
v1(TargetLegacyPackage.Frontend, 'src/config.ts'),
|
|
158
|
+
v1(TargetLegacyPackage.Frontend, 'src/entrypoints.ts'),
|
|
159
|
+
],
|
|
160
|
+
protectedFiles: protectedOf(
|
|
161
|
+
TARGET_LEGACY_PACKAGES_DIR, TARGET_LEGACY_PACKAGES, TARGET_LEGACY_BUNDLED_PACKAGES),
|
|
162
|
+
buildScripts: {
|
|
163
|
+
[TargetLegacyPackage.Common]: 'tsc -b',
|
|
164
|
+
[TargetLegacyPackage.Backend]: 'bun ./rollup.build.mjs',
|
|
165
|
+
[TargetLegacyPackage.Frontend]: 'bun ./rollup.build.mjs',
|
|
166
|
+
},
|
|
167
|
+
requiredDeps: {
|
|
168
|
+
[TargetLegacyPackage.Common]: ['@owlmeans/context', '@owlmeans/entrypoint'],
|
|
169
|
+
[TargetLegacyPackage.Backend]: ['@owlmeans/server-app', '@owlmeans/postgres-resource'],
|
|
170
|
+
[TargetLegacyPackage.Frontend]: ['@owlmeans/web-client'],
|
|
171
|
+
},
|
|
172
|
+
workspaceDeps: {
|
|
173
|
+
[TargetLegacyPackage.Common]: [],
|
|
174
|
+
[TargetLegacyPackage.Backend]: [TargetLegacyPackage.Common],
|
|
175
|
+
[TargetLegacyPackage.Frontend]: [TargetLegacyPackage.Common],
|
|
176
|
+
},
|
|
177
|
+
workspaceGlob: `${TARGET_LEGACY_PACKAGES_DIR}/*`,
|
|
178
|
+
workspaceEntries: TARGET_LEGACY_PACKAGES.map(pkg => `${TARGET_LEGACY_PACKAGES_DIR}/${pkg}`),
|
|
179
|
+
markers: {
|
|
180
|
+
[v1(TargetLegacyPackage.Common, 'src/index.ts')]: ['./entrypoints.js'],
|
|
181
|
+
[v1(TargetLegacyPackage.Backend, 'src/index.ts')]: ['./owlmeans.js', 'initOwlMeans'],
|
|
182
|
+
[v1(TargetLegacyPackage.Backend, 'src/owlmeans.ts')]: ['@owlmeans/server-app', 'makeContext'],
|
|
183
|
+
[v1(TargetLegacyPackage.Frontend, 'src/index.tsx')]:
|
|
184
|
+
['@owlmeans/web-client', 'renderApp', './owlmeans'],
|
|
185
|
+
[v1(TargetLegacyPackage.Frontend, 'src/owlmeans.ts')]: ['makeContext', 'owlCtx'],
|
|
186
|
+
[v1(TargetLegacyPackage.Backend, 'rollup.config.js')]:
|
|
187
|
+
['input:', 'index.ts', 'dist', 'index.js'],
|
|
188
|
+
[v1(TargetLegacyPackage.Frontend, 'rollup.config.js')]:
|
|
189
|
+
['input:', 'index.tsx', 'dist', 'bundle.js'],
|
|
190
|
+
},
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Every layout the platform is willing to run, keyed by its own name.
|
|
195
|
+
*
|
|
196
|
+
* Declared current-first, and the order is load-bearing: detection walks it and takes the first
|
|
197
|
+
* probe it finds, so a half-migrated tree carrying both is verified against the layout the
|
|
198
|
+
* platform generates today rather than against the frozen one.
|
|
199
|
+
*/
|
|
200
|
+
export const TARGET_LAYOUTS: Readonly<Record<TargetLayout, TargetLayoutManifest>> = {
|
|
201
|
+
[TargetLayout.V2]: V2_MANIFEST,
|
|
202
|
+
[TargetLayout.V1]: V1_MANIFEST,
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** What one layout asserts. */
|
|
206
|
+
export const targetManifest = (layout: TargetLayout): TargetLayoutManifest =>
|
|
207
|
+
TARGET_LAYOUTS[layout]
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Whether a tree of this layout can still be GENERATED INTO.
|
|
211
|
+
*
|
|
212
|
+
* A legacy target is served, built and run exactly like any other — that is the whole point of
|
|
213
|
+
* verifying it against its own manifest. What no longer works on it is code generation: every
|
|
214
|
+
* path builder, every stamped import specifier and the whole `docs/` metadata tree name the
|
|
215
|
+
* current layout's packages, so a story implemented into a legacy tree writes files into
|
|
216
|
+
* directories its workspace does not contain. That fails silently — the build succeeds, the
|
|
217
|
+
* story completes and the application does not change — which is why the platform refuses
|
|
218
|
+
* instead, and names re-initialization as the one cure.
|
|
219
|
+
*
|
|
220
|
+
* `undefined` reads as current: a publisher that predates layout reporting omits it, and reading
|
|
221
|
+
* that silence as legacy would refuse development for every slot already in the cluster.
|
|
222
|
+
*/
|
|
223
|
+
export const isLegacyLayout = (layout: TargetLayout | string | undefined | null): boolean =>
|
|
224
|
+
layout != null && layout !== TARGET_CURRENT_LAYOUT
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The files whose presence tells the layouts apart.
|
|
228
|
+
*
|
|
229
|
+
* Each layout's probe is a path the other cannot have. They are members of their own layout's
|
|
230
|
+
* file list too, so a caller that reads {@link TARGET_INTEGRITY_FILES} always has both in hand —
|
|
231
|
+
* which is the whole reason detection works at all. It did not before: the probe for the legacy
|
|
232
|
+
* layout was declared but never read, so `detectTargetLayout` could only ever answer `V2`.
|
|
233
|
+
*/
|
|
234
|
+
export const TARGET_LAYOUT_PROBE_FILES: readonly string[] =
|
|
235
|
+
Object.values(TARGET_LAYOUTS).map(manifest => manifest.probe)
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Which layout a tree is in, from its files alone — IO-free, like everything else here.
|
|
239
|
+
*
|
|
240
|
+
* A tree that shows neither probe is reported as the current layout: it is not a target at all,
|
|
241
|
+
* and the integrity report is what has to say so, in the vocabulary of the layout the platform
|
|
242
|
+
* generates today.
|
|
243
|
+
*/
|
|
244
|
+
export const detectTargetLayout = (files: Record<string, string | null>): TargetLayout => {
|
|
245
|
+
for (const manifest of Object.values(TARGET_LAYOUTS)) {
|
|
246
|
+
if (files[manifest.probe] != null) {
|
|
247
|
+
return manifest.layout
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return TARGET_CURRENT_LAYOUT
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Files a caller must read and hand to `verifyTargetShape`.
|
|
256
|
+
*
|
|
257
|
+
* The UNION over every layout, because a caller reads before it knows which layout it is holding
|
|
258
|
+
* and the probes are what settle that. The verifier reports only the files its selected layout
|
|
259
|
+
* actually requires, so the extra reads cost a `stat` each and never a violation.
|
|
260
|
+
*
|
|
261
|
+
* The verifier is pure and does no IO of its own — the publisher reads these from the PVC, and
|
|
262
|
+
* a test reads them from the template tree. A path that does not exist is passed as `null`,
|
|
263
|
+
* which the verifier reports rather than skipping: absence is a violation for everything here.
|
|
264
|
+
*/
|
|
265
|
+
export const TARGET_INTEGRITY_FILES: readonly string[] = [
|
|
266
|
+
...new Set(Object.values(TARGET_LAYOUTS).flatMap(manifest => manifest.files)),
|
|
267
|
+
]
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Files no user-facing write may touch, through any path — the union over every layout.
|
|
271
|
+
*
|
|
272
|
+
* These are the ones that decide what gets EXECUTED — the build scripts, the package manifests
|
|
273
|
+
* that name them, the compiler configuration that resolves them, and the install configuration.
|
|
274
|
+
* The agent harness is here for the same reason: `.claude/settings.json` declares a
|
|
275
|
+
* `SessionStart` hook and `.agents/scripts/link-skills.sh` is the command it spawns, so a write
|
|
276
|
+
* to either runs code in the slot the next time an agent session opens, with no build and no
|
|
277
|
+
* request involved. The agent's own generator already refuses the wiring sources
|
|
278
|
+
* (`WIRING_SOURCES`), but that guard is LLM-scoped: it never saw a manual editor save and never
|
|
279
|
+
* saw a git merge.
|
|
280
|
+
*
|
|
281
|
+
* The union rather than the current layout's list, because this is a path-shaped refusal with
|
|
282
|
+
* nothing to gain from being narrow: a v2 path cannot exist in a v1 tree, so covering both costs
|
|
283
|
+
* nothing and covers the legacy slots that were left writable.
|
|
284
|
+
*/
|
|
285
|
+
export const TARGET_PROTECTED_FILES: readonly string[] = [
|
|
286
|
+
...new Set(Object.values(TARGET_LAYOUTS).flatMap(manifest => manifest.protectedFiles)),
|
|
287
|
+
]
|
|
288
|
+
|
|
289
|
+
/** `<slug>-<package>` — the only way a workspace package is ever named, in either layout. */
|
|
290
|
+
export const targetPackageName = (slug: string, pkg: string): string => `${slug}-${pkg}`
|
|
291
|
+
|
|
292
|
+
/** Everything one package must declare, once the root manifest has named the slug. */
|
|
293
|
+
export const targetRequiredDeps = (
|
|
294
|
+
slug: string, pkg: string, layout: TargetLayout = TARGET_CURRENT_LAYOUT
|
|
295
|
+
): string[] => {
|
|
296
|
+
const manifest = targetManifest(layout)
|
|
297
|
+
|
|
298
|
+
return [
|
|
299
|
+
...(manifest.requiredDeps[pkg] ?? []),
|
|
300
|
+
...(manifest.workspaceDeps[pkg] ?? []).map(dep => targetPackageName(slug, dep)),
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The current layout's own rules, kept as named constants because consumers outside the verifier
|
|
306
|
+
* ask about the tree the platform generates today — never about a frozen one.
|
|
307
|
+
*/
|
|
308
|
+
export const TARGET_BUILD_SCRIPTS: Readonly<Record<string, string>> = V2_MANIFEST.buildScripts
|
|
309
|
+
|
|
310
|
+
export const TARGET_REQUIRED_DEPS: Readonly<Record<string, readonly string[]>> =
|
|
311
|
+
V2_MANIFEST.requiredDeps
|
|
312
|
+
|
|
313
|
+
export const TARGET_WORKSPACE_DEPS: Readonly<Record<string, readonly string[]>> =
|
|
314
|
+
V2_MANIFEST.workspaceDeps
|
|
315
|
+
|
|
316
|
+
export const TARGET_ENTRY_MARKERS: Readonly<Record<string, readonly string[]>> = V2_MANIFEST.markers
|
|
317
|
+
|
|
318
|
+
export const TARGET_WORKSPACE_GLOB = V2_MANIFEST.workspaceGlob
|
|
319
|
+
|
|
320
|
+
export const TARGET_WORKSPACE_ENTRIES: readonly string[] = V2_MANIFEST.workspaceEntries
|
package/src/integrity/verify.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
targetManifest, targetPackageName, targetRequiredDeps
|
|
4
|
-
} from './consts.js'
|
|
1
|
+
import { IntegrityRule, TARGET_FORBIDDEN_SCRIPTS, TARGET_SLUG_PATTERN } from './consts.js'
|
|
2
|
+
import { detectTargetLayout, targetManifest, targetPackageName, targetRequiredDeps } from './utils.js'
|
|
5
3
|
import type { IntegrityViolation, TargetFileMap, TargetIntegrityReport } from './types.js'
|
|
6
4
|
|
|
7
5
|
/**
|
package/src/intent/flow.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DISPATCHER } from '@owlmeans/auth'
|
|
2
2
|
import { HOME } from '@owlmeans/context'
|
|
3
3
|
import type { ShallowFlow } from '@owlmeans/flow'
|
|
4
|
-
import { INTENT_FLOW,
|
|
5
|
-
|
|
6
|
-
const payloadMap = { [INTENT_PAYLOAD_REF]: 0 }
|
|
4
|
+
import { INTENT_FLOW, intent, IntentFlowStep } from './consts.js'
|
|
5
|
+
import { payloadMap } from './consts.local.js'
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* The hand-off flow both sides walk.
|
package/src/intent/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ResourceRecord } from '@owlmeans/resource'
|
|
2
|
+
import { makeIntentProtocols } from './entrypoints.js'
|
|
2
3
|
|
|
3
4
|
/** What the public site sends: the prompt and the person's confirmation of its processing. */
|
|
4
5
|
export interface IntentStashBody {
|
|
@@ -43,3 +44,5 @@ export interface IntentProtocolOptions {
|
|
|
43
44
|
/** Path of the landing screen; defaults to `/start`. */
|
|
44
45
|
landing?: string
|
|
45
46
|
}
|
|
47
|
+
|
|
48
|
+
export type IntentProtocols = ReturnType<typeof makeIntentProtocols>
|
package/src/metadata/consts.ts
CHANGED
|
@@ -116,3 +116,40 @@ export const METADATA_SUFFIXES = [SPEC_SUFFIX, UX_SUFFIX, UI_SUFFIX]
|
|
|
116
116
|
|
|
117
117
|
/** The trees the pipeline writes into — excluded wholesale when source files are enumerated. */
|
|
118
118
|
export const METADATA_DIRS = [HARNESS_DIR, DOCS_DIR]
|
|
119
|
+
|
|
120
|
+
export enum MetadataKind {
|
|
121
|
+
Project = 'project',
|
|
122
|
+
Story = 'story',
|
|
123
|
+
Source = 'source',
|
|
124
|
+
History = 'history',
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export enum MetadataListKind {
|
|
128
|
+
Stories = 'stories',
|
|
129
|
+
Meta = 'meta',
|
|
130
|
+
// All metadata: the docs/ and .agents/ trees + co-located *.spec/.ux/.ui.md beside sources
|
|
131
|
+
All = 'all',
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* What a registry entry names.
|
|
136
|
+
*
|
|
137
|
+
* One entry per artifact the pipeline can generate, so that "where does this live" and "what is
|
|
138
|
+
* it called" have exactly one answer for the whole life of the project.
|
|
139
|
+
*/
|
|
140
|
+
export enum RegistryKind {
|
|
141
|
+
/** The single directory segment an entity owns across models/, resources/ and backend models/ */
|
|
142
|
+
EntityDir = 'entity-dir',
|
|
143
|
+
ModelType = 'model-type',
|
|
144
|
+
Resource = 'resource',
|
|
145
|
+
BackendModel = 'backend-model',
|
|
146
|
+
ApiHandlers = 'api-handlers',
|
|
147
|
+
Service = 'service',
|
|
148
|
+
Layout = 'layout',
|
|
149
|
+
Screen = 'screen',
|
|
150
|
+
Component = 'component',
|
|
151
|
+
ViewModel = 'view-model',
|
|
152
|
+
State = 'state',
|
|
153
|
+
/** Alias-only entry for one endpoint — carries no source path of its own */
|
|
154
|
+
ApiEntrypoint = 'api-entrypoint',
|
|
155
|
+
}
|
package/src/metadata/types.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import type { SpecCategory } from '../ba/consts.js'
|
|
3
|
+
import { MetadataKind, MetadataListKind, RegistryKind } from './consts.js'
|
|
3
4
|
|
|
4
5
|
export interface MetadataFile<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
5
6
|
path: string
|
|
@@ -12,20 +13,6 @@ export interface MetadataWriteInput<T extends Record<string, unknown> = Record<s
|
|
|
12
13
|
body: string
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export enum MetadataKind {
|
|
16
|
-
Project = 'project',
|
|
17
|
-
Story = 'story',
|
|
18
|
-
Source = 'source',
|
|
19
|
-
History = 'history',
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export enum MetadataListKind {
|
|
23
|
-
Stories = 'stories',
|
|
24
|
-
Meta = 'meta',
|
|
25
|
-
// All metadata: the docs/ and .agents/ trees + co-located *.spec/.ux/.ui.md beside sources
|
|
26
|
-
All = 'all',
|
|
27
|
-
}
|
|
28
|
-
|
|
29
16
|
/**
|
|
30
17
|
* Identifies a single metadata document to read:
|
|
31
18
|
* - Project: kind=Project, no ref/category needed
|
|
@@ -181,29 +168,6 @@ export interface StoryWriteInput {
|
|
|
181
168
|
|
|
182
169
|
// ─── Name registry (.agents/memory/registry.md) ───────────────────────────────────────
|
|
183
170
|
|
|
184
|
-
/**
|
|
185
|
-
* What a registry entry names.
|
|
186
|
-
*
|
|
187
|
-
* One entry per artifact the pipeline can generate, so that "where does this live" and "what is
|
|
188
|
-
* it called" have exactly one answer for the whole life of the project.
|
|
189
|
-
*/
|
|
190
|
-
export enum RegistryKind {
|
|
191
|
-
/** The single directory segment an entity owns across models/, resources/ and backend models/ */
|
|
192
|
-
EntityDir = 'entity-dir',
|
|
193
|
-
ModelType = 'model-type',
|
|
194
|
-
Resource = 'resource',
|
|
195
|
-
BackendModel = 'backend-model',
|
|
196
|
-
ApiHandlers = 'api-handlers',
|
|
197
|
-
Service = 'service',
|
|
198
|
-
Layout = 'layout',
|
|
199
|
-
Screen = 'screen',
|
|
200
|
-
Component = 'component',
|
|
201
|
-
ViewModel = 'view-model',
|
|
202
|
-
State = 'state',
|
|
203
|
-
/** Alias-only entry for one endpoint — carries no source path of its own */
|
|
204
|
-
ApiEntrypoint = 'api-entrypoint',
|
|
205
|
-
}
|
|
206
|
-
|
|
207
171
|
/**
|
|
208
172
|
* One allocated name.
|
|
209
173
|
*
|
package/src/planning/consts.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { CodeScope, CodeStyle } from '@owlmeans/planning'
|
|
2
|
-
import type { CodePolicy } from '@owlmeans/planning'
|
|
1
|
+
import { CodeScope, CodeStyle, type CodePolicy } from '@owlmeans/planning'
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* The OwlMeans Viable vocabulary over `@owlmeans/planning`.
|
|
@@ -180,3 +179,17 @@ export const VIABLE_IMPROVEMENT_CODE: CodePolicy = Object.freeze({
|
|
|
180
179
|
export const VIABLE_REQUIREMENT_CODE: CodePolicy = Object.freeze({
|
|
181
180
|
...VIABLE_STORY_CODE, prefix: VIABLE_REQUIREMENT_CODE_PREFIX,
|
|
182
181
|
})
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The sentence a landing story's narrative carries — what a person reading the board sees.
|
|
185
|
+
*
|
|
186
|
+
* The AUTHORITY is the card's `fields.landing` flag, never this text: the design and development
|
|
187
|
+
* stages key on the flag, and a person may reword the narrative at any time. The sentence exists so
|
|
188
|
+
* the board says in plain words why this story is different, and so the analyst and the designer,
|
|
189
|
+
* who read the narrative, write a screen that continues what the guest started.
|
|
190
|
+
*
|
|
191
|
+
* A constant, byte for byte, because {@link hasLandingSentence} is how a resumed decision step
|
|
192
|
+
* knows it already appended it.
|
|
193
|
+
*/
|
|
194
|
+
export const LANDING_STORY_SENTENCE = 'A visitor can start this on the landing page without an account;'
|
|
195
|
+
+ ' after signing in they continue here with their choices carried over.'
|
package/src/planning/index.ts
CHANGED
package/src/planning/landing.ts
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { TITLE_MAX } from '@owlmeans/planning'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The sentence a landing story's narrative carries — what a person reading the board sees.
|
|
5
|
-
*
|
|
6
|
-
* The AUTHORITY is the card's `fields.landing` flag, never this text: the design and development
|
|
7
|
-
* stages key on the flag, and a person may reword the narrative at any time. The sentence exists so
|
|
8
|
-
* the board says in plain words why this story is different, and so the analyst and the designer,
|
|
9
|
-
* who read the narrative, write a screen that continues what the guest started.
|
|
10
|
-
*
|
|
11
|
-
* A constant, byte for byte, because {@link hasLandingSentence} is how a resumed decision step
|
|
12
|
-
* knows it already appended it.
|
|
13
|
-
*/
|
|
14
|
-
export const LANDING_STORY_SENTENCE = 'A visitor can start this on the landing page without an account;'
|
|
15
|
-
+ ' after signing in they continue here with their choices carried over.'
|
|
2
|
+
import { LANDING_STORY_SENTENCE } from './consts.js'
|
|
16
3
|
|
|
17
4
|
const normalized = (text: string): string => text.replace(/\s+/g, ' ')
|
|
18
5
|
|