{"record":{"id":"4a50f96d85215288","repo":"tinyhumansai/openhuman","slug":"unknown-namespace-namespace-run-openhuman","errorCode":null,"errorMessage":"unknown namespace '{namespace}'. Run `openhuman --help` to see available namespaces.","messagePattern":"unknown namespace '(.+?)'\\. Run `openhuman --help` to see available namespaces\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":543,"sourceCode":"    args: &[String],\n    grouped: &BTreeMap<String, Vec<ControllerSchema>>,\n) -> Result<()> {\n    let Some(schemas) = grouped.get(namespace) else {\n        // Reachable only when `grouped` really was filtered — i.e. under\n        // `run`/`serve`/TUI, which build a `CoreContext`. On a plain CLI\n        // invocation there is no ambient context, so nothing is filtered and a\n        // gated namespace is still present; the per-function gate below is what\n        // fires there. Consult the UNFILTERED registry before reporting a typo:\n        // silence reads as a mistyped command and sends the user off debugging\n        // their own command line, which is exactly what `docs/specs/kernel.md`\n        // §3.3 carves the CLI out of. Same reasoning as the retained `mcp` and\n        // `tui` arms above. A namespace that does not exist at all yields `None`\n        // and still reports unknown.\n        crate::core::cli_capability::ensure_capability_blocking(\n            all::sole_capability_for_namespace(namespace),\n            &format!(\"openhuman {namespace}\"),\n        )?;\n        return Err(anyhow::anyhow!(\n            \"unknown namespace '{namespace}'. Run `openhuman --help` to see available namespaces.\"\n        ));\n    };\n\n    if args.is_empty() || is_help(&args[0]) {\n        // If there's a domain-specific CLI handler for this namespace, use it as the default.\n        if let Some(cli_handler) = all::cli_handler_for_namespace(namespace) {\n            return cli_handler(args);\n        }\n        print_namespace_help(namespace, schemas);\n        return Ok(());\n    }\n\n    let function = args[0].as_str();\n\n    // Gate BEFORE resolving the schema, not in the not-found arm below.\n    //\n    // `grouped` comes from `all_controller_schemas()`, which filters through the","sourceCodeStart":525,"sourceCodeEnd":561,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/cli.rs#L525-L561","documentation":"Namespace resolution against the controller registry found no match for the first positional token. Per the source comments, a plain CLI invocation has no ambient CoreContext, so runtime DomainSet gating does NOT hide namespaces here — the per-function capability gate fires later instead. This error therefore means the namespace is absent from this binary's compiled registry: a typo, or its cargo feature gate was compiled out (e.g. `flows` off means the `flows` namespace genuinely does not exist). The retained `mcp`/`tui` arms report build facts separately; everything else is a real unknown.","triggerScenarios":"`openhuman flow list` (typo for `flows`); `openhuman flows ...` on a build with the `flows` feature off; `openhuman mem ...` (abbreviated namespace); namespaces renamed between versions.","commonSituations":"Scripts written against a full product build run on a slim/contrib build; typos and abbreviations; version drift after a namespace rename (RPC namespaces are string literals, not module paths, so renames are possible).","solutions":["Run `openhuman --help` to list the namespaces this binary actually registered","Fix typos/abbreviations (e.g. `flows`, not `flow` or `mem`)","If the namespace is cargo-feature-gated in this build, rebuild with that feature (e.g. `--features flows`)"],"exampleFix":"# before\nopenhuman flow list\n# -> unknown namespace 'flow'\n# after\nopenhuman flows list","handlingStrategy":"validation","validationCode":"# bash: check the namespace against this binary's own help before dispatch\nopenhuman --help 2>/dev/null | grep -qw \"$NS\" \\\n  || { echo \"unknown namespace '$NS' (typo, or feature-gated out of this build)\" >&2; exit 2; }\nopenhuman \"$NS\" \"$@\"","typeGuard":null,"tryCatchPattern":"if ! out=$(openhuman \"$ns\" \"$fn\" 2>&1); then\n  case \"$out\" in\n    *\"unknown namespace\"*) echo \"typo or gated build: $ns\" >&2 ;;\n    *\"unknown function\"*) echo \"check '$openhuman $ns --help'\" >&2 ;;\n    *) printf '%s\\n' \"$out\" >&2 ;;\n  esac\n  exit 1\nfi","preventionTips":["Remember CLI namespace lookup is unfiltered by runtime DomainSet — unknown here means typo or compiled-out by a cargo feature, not runtime-disabled","List what this binary actually has with `openhuman --help` before scripting namespaces","Run scripts against the same feature set they were written for (slim vs product builds differ)"],"tags":["cli","dispatch","feature-gate","json-rpc"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}