Take the catalogue's composition rules into the node-engine
ADR 0593 §7: the composer with its refusals leaves mesh-sdk, so mesh-sdk carries no composition rule. The catalogue functions only the node-engine's composition reaches (Resolve, Resolution's Compose, Declaration, DataItems, LeftOut, Rules and the rest, the settings, placeholder and template refusals, the rendering helpers) are copied with their tests into internal/compose/resolution; a method of a mesh-sdk shape becomes a function taking it first. The composition calls its own copies, and the captured catalogue its tests read lives here now, shared by mesh-compose's tests. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# The mesh's region (module ssh-client, novox/hq research 027/03). It comes first because ssh
|
||||
# takes the first value it finds for each option. It brings in ~/.ssh/config.d/ in name order:
|
||||
# 00-mesh, the mesh's Host per machine, then each file another module places there. Replaced at
|
||||
# every push. Everything below it is yours, kept as you wrote it, and applies to every host the
|
||||
# files above leave unsettled.
|
||||
Include ~/.ssh/config.d/*
|
||||
@@ -0,0 +1,7 @@
|
||||
Host ${bound:forge-account:ssh_alias}
|
||||
HostName ${bound:forge-account:ssh_host}
|
||||
Port ${bound:forge-account:ssh_port}
|
||||
HostKeyAlias ${bound:forge-account:ssh_alias}
|
||||
User git
|
||||
IdentityFile ~/.ssh/mesh_ed25519
|
||||
IdentitiesOnly yes
|
||||
@@ -0,0 +1,2 @@
|
||||
[url "ssh://${bound:forge-account:ssh_alias}/"]
|
||||
insteadOf = ${bound:forge-account:https_base}
|
||||
@@ -0,0 +1 @@
|
||||
${bound:forge-account:ssh_alias} ${bound:forge-account:host_key}
|
||||
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"module": "ssh-client",
|
||||
"version": "1",
|
||||
"moved": true,
|
||||
"tools": [
|
||||
"ssh_client_hosts",
|
||||
"ssh_client_resolve",
|
||||
"ssh_client_check",
|
||||
"ssh_client_keys",
|
||||
"ssh_client_authorized",
|
||||
"ssh_client_revoke",
|
||||
"ssh_client_known_host",
|
||||
"ssh_client_test"
|
||||
],
|
||||
"requires": [
|
||||
"forge-account"
|
||||
],
|
||||
"state": [
|
||||
"keys"
|
||||
],
|
||||
"data": {
|
||||
"own": [
|
||||
{
|
||||
"id": "ssh",
|
||||
"path": "${dir:ssh-dir}",
|
||||
"class": "valuable",
|
||||
"why": "the operator's keys and known hosts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"id": "ssh-dir",
|
||||
"type": "directory",
|
||||
"path": "${machine:account-home}/.ssh",
|
||||
"owner": "${machine:account}",
|
||||
"mode": "0700",
|
||||
"unknown": "module"
|
||||
},
|
||||
{
|
||||
"id": "config-d",
|
||||
"type": "directory",
|
||||
"path": "${machine:account-home}/.ssh/config.d",
|
||||
"owner": "${machine:account}",
|
||||
"mode": "0700",
|
||||
"unknown": "module"
|
||||
},
|
||||
{
|
||||
"id": "config",
|
||||
"type": "file",
|
||||
"path": "${machine:account-home}/.ssh/config",
|
||||
"owner": "${machine:account}",
|
||||
"mode": "0600",
|
||||
"into": "block",
|
||||
"at": "start",
|
||||
"template": "files/config"
|
||||
},
|
||||
{
|
||||
"id": "known-hosts",
|
||||
"type": "file",
|
||||
"path": "${machine:account-home}/.ssh/known_hosts",
|
||||
"owner": "${machine:account}",
|
||||
"mode": "0644",
|
||||
"into": "block",
|
||||
"template": "files/known_hosts"
|
||||
},
|
||||
{
|
||||
"id": "forge-host",
|
||||
"type": "file",
|
||||
"path": "${machine:account-home}/.ssh/config.d/10-forge",
|
||||
"owner": "${machine:account}",
|
||||
"mode": "0600",
|
||||
"template": "files/forge"
|
||||
},
|
||||
{
|
||||
"id": "git-config",
|
||||
"type": "file",
|
||||
"path": "${machine:account-home}/.config/git/config",
|
||||
"owner": "${machine:account}",
|
||||
"mode": "0644",
|
||||
"into": "block",
|
||||
"template": "files/gitconfig"
|
||||
}
|
||||
],
|
||||
"facts": {
|
||||
"mesh-hosts": {
|
||||
"path": ".ssh/config.d/00-mesh",
|
||||
"home": true,
|
||||
"template": "# Generated by the mesh. Do not edit — module ssh-client writes this file whenever a machine\n# joins, leaves or is renamed. ~/.ssh/config includes it first, so these hosts win over every\n# later line; a host of your own goes below the mesh's region in ~/.ssh/config.\n{{range .Machines}}{{if ne .Name $.Node}}\nHost {{.Name}} {{.FQDN}}\n HostName {{.FQDN}}\n{{if .Account}} User {{.Account}}\n{{end}}{{end}}{{end}}"
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
"name": "tools",
|
||||
"kind": "bundle",
|
||||
"language": "go",
|
||||
"system": "arch",
|
||||
"from": "cmd/ssh-client-tools",
|
||||
"binary": "ssh-client-tools",
|
||||
"loads": [
|
||||
"ssh-client-tools"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "files",
|
||||
"kind": "archive",
|
||||
"from": "files"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user