Tests that read ../../../mesh-catalog or ../../../mesh-host gave a verdict that depended on what sat beside the checkout: a stale or dirty sibling failed them on a desktop, and a missing one skipped them unseen. They now read the clone the build seat puts in MESH_CHECK_BESIDE, failing when it is absent there, and elsewhere a copy captured at a named commit. The skip had hidden that the builder test read a module retired by ADR 0190. The systemd reading test no longer counts the machine's own environment.d.
111 lines
5.3 KiB
Plaintext
111 lines
5.3 KiB
Plaintext
{
|
|
"module": "zsh",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"package-manager"
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "node-login-shell",
|
|
"scope": "node",
|
|
"serves": [
|
|
"execute"
|
|
]
|
|
}
|
|
],
|
|
"tools": [
|
|
"zsh_config"
|
|
],
|
|
"settings": {
|
|
"execute": {
|
|
"kind": "preference",
|
|
"default": "serve",
|
|
"why": "execute runs any command as the operator account, which can become root without a person; a machine whose layer says withhold does not offer it (hq ADR 0268): the control-node, until a call to it needs a person's approval"
|
|
}
|
|
},
|
|
"environment": {
|
|
"variables": {
|
|
"EDITOR": "vim",
|
|
"VISUAL": "vim",
|
|
"XDG_CONFIG_HOME": "${machine:account-home}/.config"
|
|
},
|
|
"path": [
|
|
{
|
|
"entry": "${machine:account-home}/.local/bin",
|
|
"at": "start"
|
|
},
|
|
{
|
|
"entry": "${machine:account-home}/scripts",
|
|
"at": "start"
|
|
},
|
|
{
|
|
"entry": "${machine:account-home}/scripts/bin",
|
|
"at": "start"
|
|
}
|
|
]
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "package",
|
|
"type": "package",
|
|
"package": "zsh"
|
|
},
|
|
{
|
|
"id": "env",
|
|
"type": "file",
|
|
"path": "${machine:account-home}/.zshenv",
|
|
"owner": "${machine:account}",
|
|
"mode": "0644",
|
|
"into": "block",
|
|
"at": "start",
|
|
"content": "# The mesh's block (module zsh, novox/hq ADR 0203, ADR 0204): the account's environment, read by\n# every zsh — a login, a script, and node-login-shell's execute. Replaced at every push; everything\n# outside it is yours.\n# PATH keeps each directory once, wherever it was added: the session, a nested shell or a\n# sourced file. Without it every nested shell prepended the same entries again.\ntypeset -U path PATH\nif [[ -r \"${machine:account-home}/.config/mesh/environment.sh\" ]]; then\n source \"${machine:account-home}/.config/mesh/environment.sh\"\nfi\n"
|
|
},
|
|
{
|
|
"id": "rc",
|
|
"type": "file",
|
|
"path": "${machine:account-home}/.zshrc",
|
|
"owner": "${machine:account}",
|
|
"mode": "0644",
|
|
"into": "block",
|
|
"at": "start",
|
|
"content": "# The mesh's block (module zsh, novox/hq ADR 0204): the defaults every machine shares, and the code\n# other modules contribute in three slots. It is replaced at every push. Everything below it is\n# yours, kept as you wrote it, and runs after it, so your lines win.\n${shell:zsh:first}\n# History, kept across sessions and shared between open shells. Without these zsh saves none:\n# SAVEHIST defaults to 0 (novox/hq to-be 41, found on review 2026-10-04).\nHISTFILE=\"$HOME/.zsh_history\"\nHISTSIZE=100000\nSAVEHIST=100000\nsetopt EXTENDED_HISTORY SHARE_HISTORY HIST_IGNORE_DUPS HIST_IGNORE_SPACE HIST_REDUCE_BLANKS\n\n# The completion system. Nothing initialised it, so only zsh's basic completion ran. Its cache\n# goes under ~/.cache rather than beside ~/.zshrc.\n[[ -d \"$HOME/.cache/zsh\" ]] || mkdir -p \"$HOME/.cache/zsh\"\nautoload -Uz compinit && compinit -d \"$HOME/.cache/zsh/zcompdump\"\nzstyle ':completion:*' menu select\n\n# Terminal title: host, directory, git branch\nfunction set_terminal_title() {\n local git_branch=\"\"\n if git rev-parse --is-inside-work-tree &>/dev/null; then\n git_branch=\" ($(git branch --show-current 2>/dev/null))\"\n fi\n print -Pn \"\\e]2;%m: %~${git_branch}\\a\"\n}\nprecmd_functions+=(set_terminal_title)\n\n# Keybindings\nbindkey \"^[[H\" beginning-of-line # Home\nbindkey \"^[OH\" beginning-of-line # Home\nbindkey \"^A\" beginning-of-line # Ctrl + A\nbindkey \"^[[F\" end-of-line # End\nbindkey \"^[OF\" end-of-line # End\nbindkey \"^E\" end-of-line # Ctrl + E\nbindkey \"^[[3~\" delete-char # Del\n\n# Colour support of ls and friends\nif [ -x /usr/bin/dircolors ]; then\n test -r $HOME/.dircolors && eval \"$(dircolors -b $HOME/.dircolors)\" || eval \"$(dircolors -b)\"\n alias ls='ls --color=auto'\n alias dir='dir --color=auto'\n alias vdir='vdir --color=auto'\n alias grep='grep --color=auto'\n alias fgrep='fgrep --color=auto'\n alias egrep='egrep --color=auto'\nfi\nalias ll='ls -alhF'\nalias la='ls -Ah'\nalias l='ls -CFh'\n\n# A throwaway container, and what takes the space under a directory\nalias drun='docker run -it --rm'\ndisksize() {\n du -h --max-depth=1 \"${1:-.}\" | sort -h\n}\nsudo-disksize() {\n sudo du -h --max-depth=1 \"${1:-.}\" | sort -h\n}\n\n${shell:zsh:normal}${shell:zsh:last}\n"
|
|
},
|
|
{
|
|
"id": "login",
|
|
"type": "user",
|
|
"name": "${machine:account}",
|
|
"shell": "/usr/bin/zsh"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"place": ".",
|
|
"owner": "root",
|
|
"mode": "0755"
|
|
},
|
|
{
|
|
"id": "tools-conf",
|
|
"type": "file",
|
|
"path": "${dir:state}/tools.conf",
|
|
"owner": "root",
|
|
"mode": "0644",
|
|
"content": "# Written by the mesh (module zsh, hq ADR 0268) from this machine's setting execute: serve or withhold.\n# Read by the zsh tools bundle when the runtime starts it; change the setting, not this.\nexecute=${setting:execute}\n"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "typescript",
|
|
"entrypoints": [
|
|
"tools/index.js"
|
|
],
|
|
"env": {
|
|
"ZSH_TOOLS_CONF": "${dir:state}/tools.conf"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|