@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
package/src/convert/consts.ts
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* things at each hop.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { StoryKind } from '../ba/consts.js'
|
|
18
17
|
import { HISTORY_FILE, METADATA_DIRS } from '../metadata/consts.js'
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -359,15 +358,6 @@ export enum EstimateSlice {
|
|
|
359
358
|
Fixed = 'fixed',
|
|
360
359
|
}
|
|
361
360
|
|
|
362
|
-
/**
|
|
363
|
-
* What KIND of story a conversion produced.
|
|
364
|
-
*
|
|
365
|
-
* The analysis half of a conversion produces exactly the two kinds an ordinary initialization
|
|
366
|
-
* does; a conversion adds one more — a `coverage` story, written so an area the origin serves but
|
|
367
|
-
* the flow never reaches still has something in it.
|
|
368
|
-
*/
|
|
369
|
-
export type ConversionStoryKind = StoryKind | 'coverage'
|
|
370
|
-
|
|
371
361
|
/**
|
|
372
362
|
* Where the origin's own sources live inside the target's volume.
|
|
373
363
|
*
|
|
@@ -454,10 +444,6 @@ export const CONVERSION_SEED_DIR = `${CONVERSION_DIR}/seed`
|
|
|
454
444
|
/** The carried seed data itself, beside its description. */
|
|
455
445
|
export const CONVERSION_SEED_DATA_DIR = `${CONVERSION_SEED_DIR}/data`
|
|
456
446
|
|
|
457
|
-
export const conversionStoryDoc = (code: string): string => `${CONVERSION_STORY_DIR}/${code}.md`
|
|
458
|
-
export const conversionSeedDoc = (name: string): string => `${CONVERSION_SEED_DIR}/${name}.md`
|
|
459
|
-
export const conversionSeedData = (name: string, ext: string): string =>
|
|
460
|
-
`${CONVERSION_SEED_DATA_DIR}/${name}.${ext}`
|
|
461
447
|
|
|
462
448
|
/**
|
|
463
449
|
* The two agent-memory nodes a conversion writes into the TARGET's own harness.
|
package/src/convert/helpers.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
SIZE_CLASS_BOUNDS
|
|
5
5
|
} from './consts.js'
|
|
6
6
|
import type { OriginCard, StoryProof } from './types.js'
|
|
7
|
+
import { BINARY_EXTENSIONS, BULK_HINTS, DATA_AMBIGUOUS_EXT, DATA_OVERRIDABLE, EXT_CLASS, GENERATED_SEGMENTS, LOCK_NAMES, MANIFEST_NAMES, SEED_HINTS, TEST_SEGMENTS, TEXT_EXTENSIONS } from './consts.local.js'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Pure, deterministic derivations over the conversion vocabulary.
|
|
@@ -24,99 +25,11 @@ export const sizeClassOf = (bytes: number): SizeClass => {
|
|
|
24
25
|
return SizeClass.Huge
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
/**
|
|
28
|
-
* Extension → class, for the extensions that decide a file on their own.
|
|
29
|
-
*
|
|
30
|
-
* Deliberately not exhaustive: a path rule below overrides it wherever the location says more than
|
|
31
|
-
* the tail does (a `.ts` under `tests/` is a test, a `.json` under `seed/` is data).
|
|
32
|
-
*/
|
|
33
|
-
const EXT_CLASS: Record<string, FileClass> = {
|
|
34
|
-
ts: FileClass.Source, tsx: FileClass.Source, js: FileClass.Source, jsx: FileClass.Source,
|
|
35
|
-
mjs: FileClass.Source, cjs: FileClass.Source, mts: FileClass.Source, cts: FileClass.Source,
|
|
36
|
-
vue: FileClass.Source, svelte: FileClass.Source, java: FileClass.Source, kt: FileClass.Source,
|
|
37
|
-
kts: FileClass.Source, go: FileClass.Source, py: FileClass.Source, rb: FileClass.Source,
|
|
38
|
-
php: FileClass.Source, cs: FileClass.Source, ex: FileClass.Source, exs: FileClass.Source,
|
|
39
|
-
rs: FileClass.Source, sql: FileClass.Source, sh: FileClass.Source,
|
|
40
|
-
|
|
41
|
-
css: FileClass.Style, scss: FileClass.Style, sass: FileClass.Style, less: FileClass.Style,
|
|
42
|
-
styl: FileClass.Style,
|
|
43
|
-
|
|
44
|
-
md: FileClass.Doc, mdx: FileClass.Doc, rst: FileClass.Doc, adoc: FileClass.Doc,
|
|
45
|
-
txt: FileClass.Doc,
|
|
46
|
-
|
|
47
|
-
json: FileClass.Config, yaml: FileClass.Config, yml: FileClass.Config, toml: FileClass.Config,
|
|
48
|
-
ini: FileClass.Config, env: FileClass.Config, properties: FileClass.Config,
|
|
49
|
-
xml: FileClass.Config, conf: FileClass.Config,
|
|
50
|
-
|
|
51
|
-
html: FileClass.Template, htm: FileClass.Template, hbs: FileClass.Template,
|
|
52
|
-
ejs: FileClass.Template, pug: FileClass.Template, twig: FileClass.Template,
|
|
53
|
-
erb: FileClass.Template, jinja: FileClass.Template, j2: FileClass.Template,
|
|
54
|
-
|
|
55
|
-
csv: FileClass.Data, tsv: FileClass.Data, ndjson: FileClass.Data, jsonl: FileClass.Data,
|
|
56
|
-
parquet: FileClass.Data, dump: FileClass.Data,
|
|
57
|
-
|
|
58
|
-
png: FileClass.Binary, jpg: FileClass.Binary, jpeg: FileClass.Binary, gif: FileClass.Binary,
|
|
59
|
-
webp: FileClass.Binary, ico: FileClass.Binary, pdf: FileClass.Binary, zip: FileClass.Binary,
|
|
60
|
-
gz: FileClass.Binary, tar: FileClass.Binary, woff: FileClass.Binary, woff2: FileClass.Binary,
|
|
61
|
-
ttf: FileClass.Binary, otf: FileClass.Binary, mp4: FileClass.Binary, mp3: FileClass.Binary,
|
|
62
|
-
wasm: FileClass.Binary, jar: FileClass.Binary, so: FileClass.Binary, dll: FileClass.Binary,
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/** Exact basenames that are a package manifest whatever their extension says. */
|
|
66
|
-
const MANIFEST_NAMES = [
|
|
67
|
-
'package.json', 'deno.json', 'pom.xml', 'build.gradle', 'build.gradle.kts',
|
|
68
|
-
'settings.gradle', 'settings.gradle.kts', 'go.mod', 'cargo.toml', 'pyproject.toml',
|
|
69
|
-
'requirements.txt', 'pipfile', 'composer.json', 'gemfile', 'mix.exs',
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
/** Exact basenames that are a lockfile — never read, never counted as source. */
|
|
73
|
-
const LOCK_NAMES = [
|
|
74
|
-
'bun.lock', 'bun.lockb', 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'go.sum',
|
|
75
|
-
'cargo.lock', 'composer.lock', 'gemfile.lock', 'poetry.lock', 'pipfile.lock', 'mix.lock',
|
|
76
|
-
]
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Path segments whose contents are produced by a build and say nothing about the application.
|
|
80
|
-
*
|
|
81
|
-
* `bin` is deliberately absent though `obj` is here: it is .NET/Java output in two of the nine
|
|
82
|
-
* ecosystems the converter reads and a real entrypoint directory in the rest (`bin/cli.ts`,
|
|
83
|
-
* `bin/console`, `bin/rails`), and this function is handed one path with no tree around it to
|
|
84
|
-
* tell the two apart. Dropping those entrypoints out of every source listing is the worse error.
|
|
85
|
-
*/
|
|
86
|
-
const GENERATED_SEGMENTS = [
|
|
87
|
-
'node_modules', 'dist', 'build', 'out', 'target', 'vendor', '.next', '.nuxt', '.svelte-kit',
|
|
88
|
-
'.turbo', '.gradle', '__pycache__', 'coverage', '.venv', 'obj',
|
|
89
|
-
]
|
|
90
|
-
|
|
91
|
-
/** Path segments that make a file a test wherever its extension would have said otherwise. */
|
|
92
|
-
const TEST_SEGMENTS = ['test', 'tests', '__tests__', 'spec', 'specs', 'e2e']
|
|
93
|
-
|
|
94
28
|
const segmentsOf = (path: string): string[] => path.split('/').filter(part => part !== '')
|
|
95
29
|
|
|
96
30
|
const hasSegment = (path: string, of: string[]): boolean =>
|
|
97
31
|
segmentsOf(path).some(part => of.includes(part.toLowerCase()))
|
|
98
32
|
|
|
99
|
-
/**
|
|
100
|
-
* The classes a seed or dump LOCATION is allowed to override.
|
|
101
|
-
*
|
|
102
|
-
* A seed directory says what a file holds, not what language it is written in — so it reclassifies
|
|
103
|
-
* a payload and never a program. `seed/users.json` is data; `src/seedUsers.ts` is the code that
|
|
104
|
-
* loads it, and `src/exportReport.ts` is a screen, and pushing either into the data budget takes
|
|
105
|
-
* real source out of the census's reach.
|
|
106
|
-
*/
|
|
107
|
-
const DATA_OVERRIDABLE: FileClass[] = [
|
|
108
|
-
FileClass.Data, FileClass.Config, FileClass.Binary, FileClass.Unknown,
|
|
109
|
-
]
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* The extensions that are as often a dump as they are a program.
|
|
113
|
-
*
|
|
114
|
-
* A `.sql` under `migrations/` is schema somebody wrote and a coder has to reproduce; the same
|
|
115
|
-
* tail under `dumps/` is an export nothing should read into a prompt. The location is the only
|
|
116
|
-
* thing that separates them, so it outranks the tail for these and for no other language.
|
|
117
|
-
*/
|
|
118
|
-
const DATA_AMBIGUOUS_EXT = ['sql']
|
|
119
|
-
|
|
120
33
|
/**
|
|
121
34
|
* What one file of the origin is.
|
|
122
35
|
*
|
|
@@ -150,31 +63,6 @@ export const fileClassOf = (path: string, ext: string): FileClass => {
|
|
|
150
63
|
return byExt
|
|
151
64
|
}
|
|
152
65
|
|
|
153
|
-
/**
|
|
154
|
-
* Extensions whose tail already answers the binary question, either way.
|
|
155
|
-
*
|
|
156
|
-
* Deliberately two lists and not one with a default: an extension the census has never seen must
|
|
157
|
-
* be READ rather than guessed at, because a repository nobody here wrote carries tails nobody
|
|
158
|
-
* here chose. Nothing in either list is a guess about content — a `.ts` holding a NUL byte is a
|
|
159
|
-
* corrupt file, and a `.png` that is not binary is not a `.png`.
|
|
160
|
-
*/
|
|
161
|
-
const TEXT_EXTENSIONS: readonly string[] = [
|
|
162
|
-
'.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs', '.mts', '.cts', '.json', '.jsonc',
|
|
163
|
-
'.md', '.mdx', '.txt', '.css', '.scss', '.sass', '.less', '.html', '.htm', '.xml', '.svg',
|
|
164
|
-
'.yml', '.yaml', '.toml', '.ini', '.env', '.sh', '.bash', '.zsh', '.sql', '.graphql', '.gql',
|
|
165
|
-
'.py', '.rb', '.go', '.rs', '.java', '.kt', '.php', '.cs', '.c', '.h', '.cpp', '.hpp', '.swift',
|
|
166
|
-
'.vue', '.svelte', '.astro', '.lock', '.csv',
|
|
167
|
-
]
|
|
168
|
-
|
|
169
|
-
const BINARY_EXTENSIONS: readonly string[] = [
|
|
170
|
-
'.png', '.jpg', '.jpeg', '.gif', '.webp', '.avif', '.bmp', '.ico', '.icns', '.tiff',
|
|
171
|
-
'.mp3', '.mp4', '.wav', '.ogg', '.webm', '.mov', '.avi',
|
|
172
|
-
'.woff', '.woff2', '.ttf', '.otf', '.eot',
|
|
173
|
-
'.pdf', '.zip', '.gz', '.tgz', '.bz2', '.xz', '.7z', '.rar', '.tar',
|
|
174
|
-
'.wasm', '.node', '.so', '.dylib', '.dll', '.exe', '.bin', '.class', '.jar',
|
|
175
|
-
'.db', '.sqlite', '.sqlite3',
|
|
176
|
-
]
|
|
177
|
-
|
|
178
66
|
/**
|
|
179
67
|
* The binary verdict a path already carries, or `null` for a file that has to be probed.
|
|
180
68
|
*
|
|
@@ -228,12 +116,6 @@ export const entropyClassOf = (head: string): EntropyClass => {
|
|
|
228
116
|
return EntropyClass.Text
|
|
229
117
|
}
|
|
230
118
|
|
|
231
|
-
/** Path segments and name fragments that mark bulk data — an export, not the app's own data. */
|
|
232
|
-
const BULK_HINTS = ['dump', 'dumps', 'export', 'exports', 'backup', 'backups', 'snapshot', 'archive']
|
|
233
|
-
|
|
234
|
-
/** Path segments that mark seed data — what the application needs in order to make sense. */
|
|
235
|
-
const SEED_HINTS = ['seed', 'seeds', 'fixture', 'fixtures', 'sample', 'samples', 'demo-data']
|
|
236
|
-
|
|
237
119
|
const matchesHint = (path: string, hints: string[]): boolean => {
|
|
238
120
|
const lower = path.toLowerCase()
|
|
239
121
|
if (hasSegment(lower, hints)) return true
|
package/src/convert/index.ts
CHANGED
package/src/convert/types.ts
CHANGED
|
@@ -2,11 +2,8 @@ import type { ProjectArea } from '../areas/consts.js'
|
|
|
2
2
|
import type { ConnectLlm } from '../connect/consts.js'
|
|
3
3
|
import type { ModelRole } from '../execution/consts.js'
|
|
4
4
|
import type { TargetLayout } from '../integrity/consts.js'
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
ConvertibilityVerdict, DumpKind, EntropyClass, EstimateSlice, FileClass, OriginKind, OriginShape,
|
|
8
|
-
OriginState, PurposeEvidenceSource, SizeClass, StackFamily, StackId, TaxonomyKind, WorkspaceKind
|
|
9
|
-
} from './consts.js'
|
|
5
|
+
import type { ArchitectureCase, ConversionStage, ConvertibilityReason, ConvertibilityVerdict, DumpKind, EntropyClass, EstimateSlice, FileClass, OriginKind, OriginShape, OriginState, PurposeEvidenceSource, SizeClass, StackFamily, StackId, TaxonomyKind, WorkspaceKind } from './consts.js'
|
|
6
|
+
import type { StoryKind } from '../ba/consts.js'
|
|
10
7
|
|
|
11
8
|
// --- inventory ------------------------------------------------------------------------------
|
|
12
9
|
|
|
@@ -742,3 +739,12 @@ export interface ConversionMemoryMeta {
|
|
|
742
739
|
purged: boolean
|
|
743
740
|
updatedAt: string
|
|
744
741
|
}
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* What KIND of story a conversion produced.
|
|
745
|
+
*
|
|
746
|
+
* The analysis half of a conversion produces exactly the two kinds an ordinary initialization
|
|
747
|
+
* does; a conversion adds one more — a `coverage` story, written so an area the origin serves but
|
|
748
|
+
* the flow never reaches still has something in it.
|
|
749
|
+
*/
|
|
750
|
+
export type ConversionStoryKind = StoryKind | 'coverage'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CONVERSION_SEED_DATA_DIR, CONVERSION_SEED_DIR, CONVERSION_STORY_DIR } from './consts.js'
|
|
2
|
+
|
|
3
|
+
export const conversionStoryDoc = (code: string): string => `${CONVERSION_STORY_DIR}/${code}.md`
|
|
4
|
+
|
|
5
|
+
export const conversionSeedDoc = (name: string): string => `${CONVERSION_SEED_DIR}/${name}.md`
|
|
6
|
+
|
|
7
|
+
export const conversionSeedData = (name: string, ext: string): string =>
|
|
8
|
+
`${CONVERSION_SEED_DATA_DIR}/${name}.${ext}`
|
package/src/design/consts.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* the fields it is missing were absent because they had not been designed and which because the
|
|
7
7
|
* shape did not have them yet. Those are different questions with different answers.
|
|
8
8
|
*/
|
|
9
|
+
import type { StoryDesignRuntime } from './types.js'
|
|
10
|
+
|
|
9
11
|
export const STORY_DESIGN_VERSION = 1
|
|
10
12
|
|
|
11
13
|
/** How far a design may drift from the project it was written against before it is stale. */
|
|
@@ -21,3 +23,49 @@ export enum DesignStaleness {
|
|
|
21
23
|
/** The generated tree moved under it. Re-run the stages that read the tree. */
|
|
22
24
|
Tree = 'tree',
|
|
23
25
|
}
|
|
26
|
+
|
|
27
|
+
/** Who acts in a story. */
|
|
28
|
+
export enum StoryActor {
|
|
29
|
+
/** A person, in one of the four areas. Every story until something says otherwise. */
|
|
30
|
+
Human = 'human',
|
|
31
|
+
/**
|
|
32
|
+
* The application's own LLM agent.
|
|
33
|
+
*
|
|
34
|
+
* An EPHEMERAL role: it holds no permissions and has no area of its own, because there is nobody
|
|
35
|
+
* to sign in as it. A story belongs to it when the work is the agent's — the human half is a
|
|
36
|
+
* separate, paired story that starts the work and watches it.
|
|
37
|
+
*/
|
|
38
|
+
Agent = 'agent',
|
|
39
|
+
/** A queue consumer. Ephemeral in exactly the same sense. */
|
|
40
|
+
Worker = 'worker',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** The ephemeral actors — those a permission may never be granted to. */
|
|
44
|
+
export const EPHEMERAL_ACTORS: StoryActor[] = [StoryActor.Agent, StoryActor.Worker]
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The three shapes that can perform work with a model, cheapest first.
|
|
48
|
+
*
|
|
49
|
+
* They are not interchangeable and the difference is who decides the order. A CALL is one prompt
|
|
50
|
+
* and one answer; a PIPELINE runs steps this application named in advance; an AGENT is handed
|
|
51
|
+
* tools and works out its own path. Each step up buys capability with latency, money and a
|
|
52
|
+
* failure mode, so the right answer is the simplest shape that does the job — and for most work
|
|
53
|
+
* that asks for a model at all, it is a call.
|
|
54
|
+
*/
|
|
55
|
+
export enum StoryAgentKind {
|
|
56
|
+
/** One prompt, one answer, optionally schema-shaped. The default. */
|
|
57
|
+
Call = 'call',
|
|
58
|
+
/** Ordered steps decided by the application, not by the model. */
|
|
59
|
+
Pipeline = 'pipeline',
|
|
60
|
+
/** The model chooses its own path through the tools it was given. */
|
|
61
|
+
Agent = 'agent',
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** What a design carries when nobody has asked the question — and when the answer was "no". */
|
|
65
|
+
export const NO_RUNTIME: StoryDesignRuntime = {
|
|
66
|
+
actor: StoryActor.Human,
|
|
67
|
+
worker: false,
|
|
68
|
+
jobs: [],
|
|
69
|
+
agents: [],
|
|
70
|
+
kv: false,
|
|
71
|
+
}
|
package/src/design/runtime.ts
CHANGED
|
@@ -14,125 +14,12 @@
|
|
|
14
14
|
* emits exactly the tree it emitted before any of this existed.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/** A person, in one of the four areas. Every story until something says otherwise. */
|
|
20
|
-
Human = 'human',
|
|
21
|
-
/**
|
|
22
|
-
* The application's own LLM agent.
|
|
23
|
-
*
|
|
24
|
-
* An EPHEMERAL role: it holds no permissions and has no area of its own, because there is nobody
|
|
25
|
-
* to sign in as it. A story belongs to it when the work is the agent's — the human half is a
|
|
26
|
-
* separate, paired story that starts the work and watches it.
|
|
27
|
-
*/
|
|
28
|
-
Agent = 'agent',
|
|
29
|
-
/** A queue consumer. Ephemeral in exactly the same sense. */
|
|
30
|
-
Worker = 'worker',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** The ephemeral actors — those a permission may never be granted to. */
|
|
34
|
-
export const EPHEMERAL_ACTORS: StoryActor[] = [StoryActor.Agent, StoryActor.Worker]
|
|
17
|
+
import { EPHEMERAL_ACTORS, NO_RUNTIME, StoryActor } from './consts.js'
|
|
18
|
+
import type { StoryDesignRuntime } from './types.js'
|
|
35
19
|
|
|
36
20
|
export const isEphemeralActor = (actor?: StoryActor): boolean =>
|
|
37
21
|
actor != null && EPHEMERAL_ACTORS.includes(actor)
|
|
38
22
|
|
|
39
|
-
/** One queued unit of work. */
|
|
40
|
-
export interface StoryDesignJob {
|
|
41
|
-
/** The queue it is enqueued onto. */
|
|
42
|
-
queue: string
|
|
43
|
-
/** The job name, which becomes the backend-only `job:<name>` protocol alias. */
|
|
44
|
-
name: string
|
|
45
|
-
/** The processor module, relative to the worker package's `src`. */
|
|
46
|
-
path: string
|
|
47
|
-
/** What it does, in one sentence, for the coder that writes the processor. */
|
|
48
|
-
purpose: string
|
|
49
|
-
/**
|
|
50
|
-
* Why it may not run on the request path.
|
|
51
|
-
*
|
|
52
|
-
* Recorded because it is the thing a later run has to be able to disagree with. "It might be
|
|
53
|
-
* slow" is not a reason; "it calls a model" and "it walks every row of a table the user owns"
|
|
54
|
-
* are.
|
|
55
|
-
*/
|
|
56
|
-
reason: string
|
|
57
|
-
/**
|
|
58
|
-
* Whether running it twice is safe, and how it was made so.
|
|
59
|
-
*
|
|
60
|
-
* A worker can die mid-job; the lock expires and the step re-runs. There is no way to make that
|
|
61
|
-
* automatic, so the answer is written down where the processor's author has to read it.
|
|
62
|
-
*/
|
|
63
|
-
idempotency: string
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/** An LLM agent or pipeline generated INTO the target. */
|
|
67
|
-
export interface StoryDesignAgent {
|
|
68
|
-
/** Its alias in the target's own agent registry. */
|
|
69
|
-
alias: string
|
|
70
|
-
/** The module, relative to the shared backend package's `src`. */
|
|
71
|
-
path: string
|
|
72
|
-
/** What it is for. */
|
|
73
|
-
purpose: string
|
|
74
|
-
/** Which of the three shapes this is — a call, a pipeline, or a tool-using agent. */
|
|
75
|
-
kind: StoryAgentKind
|
|
76
|
-
/** The job that runs it — an agent is never invoked on the request path. */
|
|
77
|
-
job?: string
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The three shapes that can perform work with a model, cheapest first.
|
|
82
|
-
*
|
|
83
|
-
* They are not interchangeable and the difference is who decides the order. A CALL is one prompt
|
|
84
|
-
* and one answer; a PIPELINE runs steps this application named in advance; an AGENT is handed
|
|
85
|
-
* tools and works out its own path. Each step up buys capability with latency, money and a
|
|
86
|
-
* failure mode, so the right answer is the simplest shape that does the job — and for most work
|
|
87
|
-
* that asks for a model at all, it is a call.
|
|
88
|
-
*/
|
|
89
|
-
export enum StoryAgentKind {
|
|
90
|
-
/** One prompt, one answer, optionally schema-shaped. The default. */
|
|
91
|
-
Call = 'call',
|
|
92
|
-
/** Ordered steps decided by the application, not by the model. */
|
|
93
|
-
Pipeline = 'pipeline',
|
|
94
|
-
/** The model chooses its own path through the tools it was given. */
|
|
95
|
-
Agent = 'agent',
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* The gate, as the design stage recorded it.
|
|
100
|
-
*
|
|
101
|
-
* Absent on a design written before this existed, and read as "none of it" everywhere — which is
|
|
102
|
-
* both the safe answer and the true one for every story developed until now.
|
|
103
|
-
*/
|
|
104
|
-
export interface StoryDesignRuntime {
|
|
105
|
-
actor: StoryActor
|
|
106
|
-
/** Whether this story puts work on the queue at all. */
|
|
107
|
-
worker: boolean
|
|
108
|
-
jobs: StoryDesignJob[]
|
|
109
|
-
agents: StoryDesignAgent[]
|
|
110
|
-
/**
|
|
111
|
-
* Whether this story's data belongs in the key/value store rather than in Postgres.
|
|
112
|
-
*
|
|
113
|
-
* Postgres is the default and being wrong with it is cheap. This is true only for data with an
|
|
114
|
-
* expiry, a lock, a counter or a fan-out, and a bounded, namespaced key set.
|
|
115
|
-
*/
|
|
116
|
-
kv: boolean
|
|
117
|
-
/**
|
|
118
|
-
* Which HUMAN story shows the progress of this story's queued work.
|
|
119
|
-
*
|
|
120
|
-
* An ephemeral actor cannot report to anybody: there is no screen it owns and no session it runs
|
|
121
|
-
* in. A story that enqueues work therefore names the story whose screen carries the job feed, and
|
|
122
|
-
* the permission to enqueue and to watch is granted to that area's role.
|
|
123
|
-
*/
|
|
124
|
-
feedback?: string
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/** What a design carries when nobody has asked the question — and when the answer was "no". */
|
|
128
|
-
export const NO_RUNTIME: StoryDesignRuntime = {
|
|
129
|
-
actor: StoryActor.Human,
|
|
130
|
-
worker: false,
|
|
131
|
-
jobs: [],
|
|
132
|
-
agents: [],
|
|
133
|
-
kv: false,
|
|
134
|
-
}
|
|
135
|
-
|
|
136
23
|
/** Read the gate off a design, total over a design that predates it. */
|
|
137
24
|
export const runtimeOf = (design?: { runtime?: StoryDesignRuntime }): StoryDesignRuntime =>
|
|
138
25
|
design?.runtime ?? NO_RUNTIME
|
package/src/design/schemas.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { JSONSchemaType } from 'ajv'
|
|
2
2
|
|
|
3
3
|
import { ProjectArea } from '../areas/consts.js'
|
|
4
|
-
import { StoryActor, StoryAgentKind } from './
|
|
5
|
-
import type {
|
|
6
|
-
import type { StoryDesign } from './types.js'
|
|
4
|
+
import { StoryActor, StoryAgentKind } from './consts.js'
|
|
5
|
+
import type { StoryDesign, RuntimeDecision } from './types.js'
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* The design shape, validated where the shape is DEFINED.
|
|
@@ -375,10 +374,3 @@ export const RuntimeDecisionSchema = {
|
|
|
375
374
|
// is that they are usually empty.
|
|
376
375
|
} as unknown as JSONSchemaType<RuntimeDecision>
|
|
377
376
|
|
|
378
|
-
/** What the gate answers with — the model's half of {@link StoryDesignRuntime}. */
|
|
379
|
-
export interface RuntimeDecision {
|
|
380
|
-
kv: boolean
|
|
381
|
-
feedback: string
|
|
382
|
-
jobs: StoryDesignJob[]
|
|
383
|
-
agents: StoryDesignAgent[]
|
|
384
|
-
}
|
package/src/design/types.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ProjectArea } from '../areas/consts.js'
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import type { AccessList } from '../dev/types.js'
|
|
4
4
|
import type { UXTransition } from '../ux/types.js'
|
|
5
5
|
|
|
6
|
+
import { StoryActor, StoryAgentKind } from './consts.js'
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* One screen, as the design decided it.
|
|
8
10
|
*
|
|
@@ -190,3 +192,81 @@ export interface StoryDesignPort {
|
|
|
190
192
|
/** Write a design as the card's next revision and answer the revision number it received. */
|
|
191
193
|
put: (cardId: string, design: StoryDesign, opts?: StoryDesignPutOptions) => Promise<number>
|
|
192
194
|
}
|
|
195
|
+
|
|
196
|
+
/** One queued unit of work. */
|
|
197
|
+
export interface StoryDesignJob {
|
|
198
|
+
/** The queue it is enqueued onto. */
|
|
199
|
+
queue: string
|
|
200
|
+
/** The job name, which becomes the backend-only `job:<name>` protocol alias. */
|
|
201
|
+
name: string
|
|
202
|
+
/** The processor module, relative to the worker package's `src`. */
|
|
203
|
+
path: string
|
|
204
|
+
/** What it does, in one sentence, for the coder that writes the processor. */
|
|
205
|
+
purpose: string
|
|
206
|
+
/**
|
|
207
|
+
* Why it may not run on the request path.
|
|
208
|
+
*
|
|
209
|
+
* Recorded because it is the thing a later run has to be able to disagree with. "It might be
|
|
210
|
+
* slow" is not a reason; "it calls a model" and "it walks every row of a table the user owns"
|
|
211
|
+
* are.
|
|
212
|
+
*/
|
|
213
|
+
reason: string
|
|
214
|
+
/**
|
|
215
|
+
* Whether running it twice is safe, and how it was made so.
|
|
216
|
+
*
|
|
217
|
+
* A worker can die mid-job; the lock expires and the step re-runs. There is no way to make that
|
|
218
|
+
* automatic, so the answer is written down where the processor's author has to read it.
|
|
219
|
+
*/
|
|
220
|
+
idempotency: string
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** An LLM agent or pipeline generated INTO the target. */
|
|
224
|
+
export interface StoryDesignAgent {
|
|
225
|
+
/** Its alias in the target's own agent registry. */
|
|
226
|
+
alias: string
|
|
227
|
+
/** The module, relative to the shared backend package's `src`. */
|
|
228
|
+
path: string
|
|
229
|
+
/** What it is for. */
|
|
230
|
+
purpose: string
|
|
231
|
+
/** Which of the three shapes this is — a call, a pipeline, or a tool-using agent. */
|
|
232
|
+
kind: StoryAgentKind
|
|
233
|
+
/** The job that runs it — an agent is never invoked on the request path. */
|
|
234
|
+
job?: string
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The gate, as the design stage recorded it.
|
|
239
|
+
*
|
|
240
|
+
* Absent on a design written before this existed, and read as "none of it" everywhere — which is
|
|
241
|
+
* both the safe answer and the true one for every story developed until now.
|
|
242
|
+
*/
|
|
243
|
+
export interface StoryDesignRuntime {
|
|
244
|
+
actor: StoryActor
|
|
245
|
+
/** Whether this story puts work on the queue at all. */
|
|
246
|
+
worker: boolean
|
|
247
|
+
jobs: StoryDesignJob[]
|
|
248
|
+
agents: StoryDesignAgent[]
|
|
249
|
+
/**
|
|
250
|
+
* Whether this story's data belongs in the key/value store rather than in Postgres.
|
|
251
|
+
*
|
|
252
|
+
* Postgres is the default and being wrong with it is cheap. This is true only for data with an
|
|
253
|
+
* expiry, a lock, a counter or a fan-out, and a bounded, namespaced key set.
|
|
254
|
+
*/
|
|
255
|
+
kv: boolean
|
|
256
|
+
/**
|
|
257
|
+
* Which HUMAN story shows the progress of this story's queued work.
|
|
258
|
+
*
|
|
259
|
+
* An ephemeral actor cannot report to anybody: there is no screen it owns and no session it runs
|
|
260
|
+
* in. A story that enqueues work therefore names the story whose screen carries the job feed, and
|
|
261
|
+
* the permission to enqueue and to watch is granted to that area's role.
|
|
262
|
+
*/
|
|
263
|
+
feedback?: string
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** What the gate answers with — the model's half of {@link StoryDesignRuntime}. */
|
|
267
|
+
export interface RuntimeDecision {
|
|
268
|
+
kv: boolean
|
|
269
|
+
feedback: string
|
|
270
|
+
jobs: StoryDesignJob[]
|
|
271
|
+
agents: StoryDesignAgent[]
|
|
272
|
+
}
|
package/src/dev/schemas.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { JSONSchemaType } from "ajv"
|
|
2
2
|
import type { FileBlock, AccessList, AccessBlock, EntrypointRef } from "./types.js"
|
|
3
3
|
import { AccessLevel } from "./consts.js"
|
|
4
|
+
import type { ModelAccessBlock } from './types.local.js'
|
|
4
5
|
|
|
5
6
|
export const FileBlockSchema: JSONSchemaType<FileBlock> = {
|
|
6
7
|
type: "object",
|
|
@@ -80,9 +81,6 @@ export const EntrypointRefListSchema: JSONSchemaType<{entries: EntrypointRef[]}>
|
|
|
80
81
|
additionalProperties: false
|
|
81
82
|
}
|
|
82
83
|
|
|
83
|
-
/** The part of an {@link AccessBlock} a model is asked for. */
|
|
84
|
-
type ModelAccessBlock = Omit<AccessBlock, 'defaults' | 'entityScoped'>
|
|
85
|
-
|
|
86
84
|
const ModelAccessBlockSchema: JSONSchemaType<ModelAccessBlock> = {
|
|
87
85
|
type: "object",
|
|
88
86
|
title: "AccessBlock",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Root-level files protected in every layout. */
|
|
2
|
+
export const ROOT_PROTECTED = ['package.json', 'bunfig.toml', 'bun.lock', 'index.js'] as const
|
|
3
|
+
|
|
4
|
+
/** The harness files, protected in every layout — see {@link TARGET_PROTECTED_FILES}. */
|
|
5
|
+
export const HARNESS_PROTECTED = ['.claude/settings.json', '.agents/scripts/link-skills.sh'] as const
|