solutions: Solutions Guide engine (catalog, rules, wizard state, native config, knowledge index, CLI)
New nested module yetano.dev/yetano/core/solutions: loads the catalog in assets/solutions on top of the Big Picture, evaluates questions and conditions, resolves packages/modules/capabilities, generates native configuration from typed fragments with per-value origins, and builds architecture graph, plan, lock file and handbook. Knowledge index with yetano: references, search and lint (incl. manual sections). CLI with yet's conventions (solution, task, knowledge, open), standalone as yetano-solutions. No execution, no network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
586e76889c
commit
2481a0dd27
48 files changed
+10304
No files matched your search
+60
@@ -0,0 +1,60 @@
|
||||
apiVersion: yetano.dev/v1
|
||||
kind: Solution
|
||||
metadata: {id: app-run, version: 1.0.0, category: t, status: supported}
|
||||
spec:
|
||||
bigpicture: story.run-app
|
||||
capabilities: {required: [app.serve], recommended: [backup.files]}
|
||||
packages:
|
||||
- {id: app, profile: base, role: core, when: {size: small}}
|
||||
- {id: app, profile: big, role: core, when: {size: big}}
|
||||
questions:
|
||||
- id: size
|
||||
type: select
|
||||
title: How big?
|
||||
default: small
|
||||
options:
|
||||
- {id: small, title: Small, recommended: true, reason: fits most}
|
||||
- {id: big, title: Big}
|
||||
- {id: hosts, type: list, item: hostname, title: Host names, required: true, instanceSpecific: true, validation: {minItems: 1}}
|
||||
- id: identity
|
||||
type: select
|
||||
title: Users?
|
||||
level: guided
|
||||
default: local
|
||||
options:
|
||||
- {id: local, title: Local}
|
||||
- {id: central, title: Central IdP, requires: {packages: [idp], capabilities: [auth.sso]}}
|
||||
- {id: ghost, title: Ghost, support: not-implemented, supportNote: not built}
|
||||
- {id: realm, type: string, title: Realm, visibleWhen: {identity: central}, required: true}
|
||||
- {id: token, type: secret, level: advanced, title: Token}
|
||||
- {id: owner, type: email, level: guided, title: Owner, default: "admin@${hosts[0]}"}
|
||||
- id: backup
|
||||
type: select
|
||||
title: Backup
|
||||
level: guided
|
||||
default: none
|
||||
options:
|
||||
- {id: none, title: None}
|
||||
- {id: mine, title: My tool, provides: [backup.files]}
|
||||
- {id: bak, title: bak, requires: {packages: [bak]}}
|
||||
- {id: port, type: port, level: advanced, title: Port, default: 8080}
|
||||
rules:
|
||||
- {id: big-warn, when: {size: big}, message: Big needs more memory., severity: warning}
|
||||
- {id: no-x-small, when: {size: small}, excludes: {capabilities: [feature.x]}}
|
||||
configuration:
|
||||
- id: main
|
||||
file: app/app.yaml
|
||||
set: {hosts: "${hosts}", owner: "${owner}", listen: ":${port}", first: "${hosts[0]}", n: "${hosts.count}"}
|
||||
- {id: sso, file: app/app.yaml, when: {identity: central}, set: {sso: {realm: "${realm}"}}}
|
||||
- {id: tok, file: app/app.yaml, when: {token: {set: true}}, set: {token: "${token}"}}
|
||||
- {id: idp, file: idp/idp.yaml, set: {realm: "${realm}"}, when: {identity: central}}
|
||||
- {id: never, file: bak/bak.yaml, set: {x: 1}}
|
||||
steps:
|
||||
- {id: add, title: "Add ${item}", forEach: hosts, run: "app add ${item}", phase: data, mutating: true}
|
||||
- {id: inst, title: "Install ${item}", package: app, forEach: $modules, run: "yet install ${item}", phase: install}
|
||||
requirements:
|
||||
- {id: port, title: Port free, kind: port, params: {port: "${port}"}, local: true}
|
||||
- {id: bigonly, title: Memory, kind: manual, when: {size: big}}
|
||||
architecture:
|
||||
nodes: [{id: users, type: client, title: "Users of ${hosts[0]}"}]
|
||||
edges: [{from: users, to: "mod:app/server", type: connectsTo}]
|
||||
Reference in new issue
Block a user