43 lines
1.6 KiB
Text
43 lines
1.6 KiB
Text
|
|
# domains/schema.ncl — contract for ontoref domain extension manifests.
|
||
|
|
#
|
||
|
|
# A domain is a self-contained extension loaded by ontoref when the project's
|
||
|
|
# repo_kind matches one of the domain's declared repo_kinds.
|
||
|
|
# Domains live in $ONTOREF_ROOT/domains/{id}/ and provide:
|
||
|
|
# - commands.nu → CLI commands dispatched by the bash wrapper
|
||
|
|
# - domain.ncl → this contract: declared commands, pages, requirements
|
||
|
|
# - repo_kinds.txt → plain-text list of matching repo_kind values (bash-readable)
|
||
|
|
|
||
|
|
let domain_command_type = {
|
||
|
|
id | String, # e.g. "cfp list", "career skills --tier"
|
||
|
|
description | String,
|
||
|
|
usage | String | default = "",
|
||
|
|
examples | Array String | default = [],
|
||
|
|
} in
|
||
|
|
|
||
|
|
let domain_page_type = {
|
||
|
|
id | String, # "cfp", "career"
|
||
|
|
route | String, # "/personal/cfp"
|
||
|
|
title | String,
|
||
|
|
template | String, # filename stem in domain's pages/ dir
|
||
|
|
nav_label | String | default = "",
|
||
|
|
} in
|
||
|
|
|
||
|
|
let domain_type = {
|
||
|
|
id | String,
|
||
|
|
name | String,
|
||
|
|
repo_kinds | Array String, # must match values in manifest.ncl RepoKind enum
|
||
|
|
description | String | default = "",
|
||
|
|
commands | Array domain_command_type | default = [],
|
||
|
|
pages | Array domain_page_type | default = [],
|
||
|
|
# .ontology/*.ncl stems that must exist for commands to work
|
||
|
|
required_extensions | Array String | default = [],
|
||
|
|
commands_script | String | default = "commands.nu",
|
||
|
|
short_alias | String | default = "",
|
||
|
|
} in
|
||
|
|
|
||
|
|
{
|
||
|
|
DomainCommand = domain_command_type,
|
||
|
|
DomainPage = domain_page_type,
|
||
|
|
Domain = domain_type,
|
||
|
|
}
|