Repository navigation
refactor(openshell-provider): serve the gateway installation types - #13187
Merged
Merged
Conversation
…-provider The gateway installation code used openshell-provider only for observe_with_wait and a re-export of EnvironmentSecrets. Move observe_with_wait into nemoclaw-openshell and use nemoclaw-backend's EnvironmentSecrets, so the openshell provider can serve the gateway installation types without a dependency cycle. Tests that compare rules across providers keep openshell-provider as a dev-dependency.
The nemoclaw provider served the types that install an OpenShell
gateway while the openshell provider reached it. The openshell provider
now serves them as openshell_podman_gateway, openshell_gateway_storage,
openshell_kubernetes_{storage,auth,gateway}, and the
openshell_docker_gateway_{readiness,runtime} data sources, with
unchanged schemas.
nemoclaw-provider keeps the implementation, shared with the Ollama and
vLLM containers, and exposes it as GatewayInstallation; the openshell
binary serves it behind a default installation feature that the fabric
provider turns off. The Kubernetes platform stage keeps the openshell
provider, contract tests move with the types, and state from before the
rename is rejected with a recovery message.
Contributor
cv
added a commit
that referenced
this pull request
Oct 14, 2026
v1's tree equals this branch's base (49555c0), so the merge keeps this branch's tree.
This was referenced Oct 14, 2026
Merged
cv
added a commit
that referenced
this pull request
Oct 14, 2026
…sources (#13167) Closes #13144. Part of #13131. #13160 has merged; this targets `v1`. ## Failure `fabric_agent_configuration` took the whole Fabric agent document as one opaque `config_json` string. OpenTofu could not type-check it, plans showed one JSON blob, and the sandbox it configured was a set of loose identity strings. Nothing checked the document against the harness until the bridge applied it. ## Decision `fabric_agent` replaces it: - **References:** it takes `sandbox = openshell_sandbox.<name>.ref`, `harness = data.fabric_harness.<name>.ref`, and `gateway`. - **Inputs:** `name` and `description` are Fabric's `metadata`, and `settings` is `harness.settings`. Every section of Fabric's agent configuration (`instructions`, `models`, `runtime`, `tools`, `skills`, `mcp`, `workflow`, `environment`, `discovery`, `relay`, `telemetry`) is a typed input derived from Fabric's published schema (`SchemaName::Agent`). A unit test fails if Fabric adds a section that isn't an input. - **Planning:** plans reject a document Fabric cannot parse, naming the field but not its value. They also reject one the harness catalog does not accept, such as `mode = "append"` with Pi, using the adapter's catalog records now carried in the `fabric_harness` ref. Once the sandbox is known, plans refuse an agent name or harness the sandbox does not launch. - **Changes:** changing the sandbox, harness, or name replaces the agent; any other change reconfigures it without replacing the sandbox. Removal still releases the binding without stopping the agent; stopping it needs a bridge operation (follow-up). - **Old state:** state recorded before typed Fabric agents (record version 10, which still binds `fabric_agent_configuration`) is rejected with the recovery message; the record version is now 11. To map Fabric's schema, `nemoclaw-tofu` now: - maps nullable types to their optional type, and unions of one scalar type, such as string enums, to that type; - writes objects and values the schema leaves open as JSON text (`jsonencode`), because tf-provider cannot decode OpenTofu's dynamic values; - keeps undeclared properties of objects that allow them, such as a model's `api`, in an `extensions` JSON-text attribute, so a document crosses OpenTofu without loss; - accepts maps and lists of objects as top-level typed inputs (labeled blocks such as `models "default" {}`), and adds a `validate_inputs` hook that checks related inputs while others are still unknown. The SDK compiles each sandbox's document into these inputs, with a `data.fabric_harness` read named after the sandbox, so adding a sandbox changes no existing agent. Readiness, state recovery, plan reporting, and export use the same shared compose and split functions (`nemoclaw_fabric::agent`). Diagnostics still name the sandbox, not the agent. Not in this change: - skills and MCP servers by ref (#13150, #13151); - harness fields other than `settings`; - merging the two image reads per sandbox (`fabric_harnesses` for compatibility, `fabric_harness` for the ref). ## Validation - After merging `v1` (with #13187 and #13160), `cargo ci --full` passes locally (138 contract and system tests). - `cargo ci` passes locally (1495 unit, 138 contract and system tests). - New unit tests cover the schema mapping rules, lossless round trips of a full document (including `api` extensions), the reference and flatten rules, and plan-time harness rejection. - The Fabric contract test runs `fabric_agent` through pinned OpenTofu against the fake gateway: plan-time rejection without echoing values, a harness-unsupported field rejected at plan, apply, unchanged re-plan, update without sandbox replacement, drift repair, a lost reply, and teardown.
cv
added a commit
that referenced
this pull request
Oct 14, 2026
…ateway_prerequisites (#13191) Closes #13146. Part of #13131. Follows #13187, which moved the gateway installation types into the `openshell` provider. ## Failure `nemoclaw_engine_capabilities` did two jobs. It reported the engine's facts (version, platform, CPUs, memory), which other discovery reads. It also judged whether the engine could host a managed OpenShell gateway with a compute driver: the Podman driver needs a Podman engine socket, and rootless Podman needs pasta networking. That judgement is the OpenShell provider's: since #13187, its gateway installation types already enforce the same check when they plan and apply. ## Decision - New `data "openshell_gateway_prerequisites"` (`engine`, `compute_driver`) reports whether the engine can host the gateway: `status`, `available`, and `observation_json` with the reason. The `openshell` provider serves it with the other installation types. - `nemoclaw_engine_capabilities` takes only `engine` and reports facts. That is the shape #13148 needs for `host_engine`. - For a managed gateway, the discovery graph reads both. The postcondition "The selected engine does not meet gateway prerequisites" moves to the prerequisite read, so an unmet prerequisite still stops planning early. - Plan reports fold the two reads into the existing engine observation; its status is the less available of the two. Onboarding and authoring see the same observation as before, and keep reporting an unmet prerequisite before anything is installed. Until the prerequisite read completes, the engine is reported as unresolved. - In-process discovery (`nemoclaw-discovery`) gains `observe_engine_facts` and `observe_gateway_prerequisites`. `observe_engine` keeps its combined behavior. ## Validation - `cargo ci --full` passes locally (unit tests, plus 139 contract and system tests). The later merge of `v1` left the tree unchanged. - New tests, each observed failing first: - Discovery library: the facts read touches only `/info`; prerequisites reject a non-Podman engine and rootless Podman without pasta. - Reporting: unmet prerequisites make the engine unavailable, and an unread prerequisite leaves it unresolved. - Compile: the graph emits both reads, with the postcondition on the prerequisite read. - Contract, through pinned OpenTofu: a Docker engine is available for the Docker driver and unavailable for the Podman driver, with the reason. - The pinned discovery graph snapshots change exactly as intended: `compute_driver` and the postcondition move from the engine read to the prerequisite read, and the discovery output gains `gateway_prerequisites`. - The schema snapshots show `compute_driver` leaving `nemoclaw_engine_capabilities` and the new data source in `openshell`.
cv
added a commit
that referenced
this pull request
Oct 14, 2026
The standalone cache test's HCL declared only the nemoclaw provider for vllm_credential_storage, so OpenTofu searched for hashicorp/vllm. It now declares the vllm provider. The retained-storage qualification test also declares openshell, which has served openshell_gateway_storage since #13187.
Closed
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #13146. Part of #13131.
Based on
v1; it depends only on #13142, which has merged.Failure
The
nemoclawprovider served the types that install an OpenShell gateway: the Podman gateway, gateway storage, Kubernetes storage, authentication, and gateway types, and the Docker gateway readiness and launch reads. Theopenshellprovider reaches the same gateway, so gateway ownership was split across two providers.Decision
The
openshellprovider now serves them, renamed, with unchanged schemas and behavior:nemoclaw_managed_gatewayopenshell_podman_gatewaynemoclaw_gateway_storageopenshell_gateway_storagenemoclaw_kubernetes_storage,_auth,_gatewayopenshell_kubernetes_storage,_auth,_gatewaynemoclaw_gateway_readinessopenshell_docker_gateway_readinessnemoclaw_gateway_runtimeopenshell_docker_gateway_runtimenemoclaw-provider, because the managed-container backend it uses is shared with Ollama and vLLM.nemoclaw-providerexposes it asGatewayInstallation, and theopenshellbinary serves it behind a defaultinstallationfeature.fabric-providerturns that feature off, so the Fabric binary doesn't pull in installers.nemoclaw-providerno longer depends onopenshell-provider(first commit):observe_with_waitmoves tonemoclaw-openshell, andEnvironmentSecretscomes fromnemoclaw-backend.nemoclaw-openshell. They deliberately have notype_name, because they install a gateway rather than reach one, so they take no gatewayref.openshellprovider and drops onlyfabric: since Gateway refs replace provider-level gateway settings #13142 theopenshellprovider takes onlydestroy.openshell-provider, so they run against theopenshellbinary Cargo built. The Docker gateway launch test now reads the computed launch from plan outputs, without the Docker provider. Theopenshellharness gains a check that every served type has a contract test.Still to do for #13146: moving the gateway prerequisite check out of
nemoclaw_engine_capabilitiesinto these types. That is a behavior change, so it gets its own PR.Validation
cargo ci --fullpasses locally (unit tests, plus 138 contract and system tests).nemoclaw, and the same 104 arrive inopenshellunder the new names.