diff --git a/modules/mesh-cli/cmd/mesh-cli/commands.go b/modules/mesh-cli/cmd/mesh-cli/commands.go index 53fa35720..b9ebdb13d 100644 --- a/modules/mesh-cli/cmd/mesh-cli/commands.go +++ b/modules/mesh-cli/cmd/mesh-cli/commands.go @@ -387,15 +387,16 @@ var commands = []command{ {words: []string{"licence"}, instead: "anthropic-licence-manager.adopt takes an API key from a file on the manager's node; nox licence list|use|refresh|key"}, {words: []string{"module", "list"}, does: "every module the indexer holds", build: fixed("mesh-delivery-view.indexer_modules")}, {words: []string{"module", "show"}, usage: "", does: "what the indexer holds of one module", build: needArg("mesh-delivery-view.indexer_module", "module")}, - {words: []string{"module", "moved"}, usage: " --why ", does: "take a registered module in now", allowed: []string{"why"}, + {words: []string{"head", "take"}, usage: " --why ", does: "take a held head in by hand (design 47 H §742, H-A-105)", allowed: []string{"why"}, build: func(l line) (call, error) { - if len(l.pos) < 1 { - return call{}, usageErr("give the module") + if len(l.pos) != 2 { + return call{}, usageErr("give the repository and the branch") } - return call{"mesh-delivery-indexer.indexer_take_in", map[string]any{"module": l.pos[0], "why": l.flags["why"]}}, nil + return call{"mesh-delivery-gate.gate_head_take", map[string]any{"repository": l.pos[0], "branch": l.pos[1], "why": l.flags["why"]}}, nil }}, - {words: []string{"module"}, instead: "the indexer takes modules in from their repositories; nox module list|show|moved, and nothing forgets one by hand yet"}, - {words: []string{"register"}, instead: "no seat registers a module from another repository yet (novox/hq ADR 0501 §4); nox module moved takes a registered one in"}, + {words: []string{"head", "list"}, does: "every untaken head the gate holds", build: fixed("mesh-delivery-gate.gate_heads")}, + {words: []string{"module"}, instead: "the indexer takes modules in from their repositories; nox module list|show, nox head take for a held head, and nothing forgets one by hand yet"}, + {words: []string{"register"}, instead: "no seat registers a module from another repository yet (novox/hq ADR 0501 §4); nox head take takes a held head in"}, {words: []string{"account", "issue"}, usage: "", does: "mint one bus account the grants part wants, now", build: needArg("mesh-vault.issue-account", "user")}, // Issues and records. diff --git a/modules/mesh-cli/cmd/mesh-cli/main_test.go b/modules/mesh-cli/cmd/mesh-cli/main_test.go index 7939ec0f2..59e5664fc 100644 --- a/modules/mesh-cli/cmd/mesh-cli/main_test.go +++ b/modules/mesh-cli/cmd/mesh-cli/main_test.go @@ -88,6 +88,8 @@ func TestEachLineCallsItsOwner(t *testing.T) { args string }{ {"node show ace", "mesh-module-assigner.assignments", `{"node":"ace"}`}, + {"head take novox/x main --why moved", "mesh-delivery-gate.gate_head_take", `{"branch":"main","repository":"novox/x","why":"moved"}`}, + {"head list", "mesh-delivery-gate.gate_heads", `{}`}, {"node public-domain ace", "mesh-module-assigner.assignments", `{"node":"ace"}`}, {"node public-domain ace example.org --why moved", "mesh-module-assigner.propose", `{"changes":[{"field":"public-domain","node":"ace","op":"decide","value":"example.org"}],"why":"moved"}`}, {"plan ace", "mesh-delivery-view.assigner_wants", `{"node":"ace"}`},