Repository navigation
feat(config): add an integration for key-authenticated HTTP APIs - #13403
Merged
Merged
Conversation
An api integration names an endpoint, a credential reference, and optionally how the key is sent, and compiles to openshell_api for each image scope the attaching sandboxes use.
cv
enabled auto-merge (squash)
October 18, 2026 02:53
Contributor
This was referenced Oct 18, 2026
cv
added a commit
that referenced
this pull request
Oct 18, 2026
) Closes #13399. Part of #13394. Stacked on #13405. ## Failure The multi-agent travel team existed only as hand-written HCL (#13393). Expressing it in YAML exposed gaps that #13400, #13401, #13402, #13403 and #13405 closed, but there was no YAML version showing that the team now fits. ## Decision `examples/travel-team.yaml` declares the HCL example's six agents: - **Researchers:** a managed Ollama Nemotron Nano, web search with Hermes's key name (`sandboxEnv`), the `web` toolset, at temperature 0.2. - **Scheduler:** a hosted Nemotron Super at temperature 0.3, with the `delegation` toolset. - **Buyer:** - the hosted model at temperature 0; - the booking service as an `api` integration and an MCP server, with only its toolset; - a network grant limiting the service to setup, discovery, `get_quote` and `book_option`. - **All roles:** isolated sandboxes, Hermes's `custom` provider (reasoning off), and the HCL example's token and turn limits. The YAML has no templating, so instructions are written out per agent and shorter than the HCL's, and they describe each hand-off format instead of embedding the JSON Schemas. The HCL README links the YAML version and says when to use each. ## Validation - A new SDK test compiles the example and checks each sandbox against the HCL example's settings: Fabric model provider, temperature, token and turn limits, toolsets, instructions, attached registrations, and the buyer's tool-restricted grant. - `cargo ci` passes locally: 1552 unit tests and 153 lifecycle tests. - Not run against a live gateway; the HCL version ran on a DGX Spark in #13393.
gaveezy
added a commit
that referenced
this pull request
Oct 19, 2026
Bring the branch up to date with 108 v1 commits, including the provider reorganization (#13131), the key-authenticated HTTP API integration (#13403), and the web search sandbox variable (#13401). Resolutions: - config/integrations.rs: keep v1's API integration and web search sandboxEnv. The API key, the web search key, and the resolved web search key are SecretRef, because each holds the credential itself. - config/validation.rs: validate the API integration key as a SecretRef; the credential() helper it called no longer exists. - config/schema/validation.rs: keep v1's sandboxEnv rule for webSearch variants beside the SecretRef and FileRef env rules. - kubernetes/mod.rs: keep v1's boxed ManagedKubernetes; its kubeconfig is a FileRef. - nemoclaw-e2e deployment.rs: take v1's removal of the two inference credential tests. #13373 folded them into the export_observations.rs test, which now builds its reference as a SecretRef. - config_kubernetes.rs: keep the new tests from both sides, and add the API integration key to the reference-kind test as a secret. - Regenerate the JSON Schema and the configuration reference. No other v1 field used Credential; the Fabric model provider and driver configuration changes add none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
cv
pushed a commit
that referenced
this pull request
Oct 19, 2026
…eRef (#13222) ## Summary Splits the configuration's one `Credential` type into `SecretRef`, whose environment variable holds a bearer or API credential, and `FileRef`, whose variable holds the path of a local file. Existing references keep their `{env: NAME}` YAML; the managed Kubernetes OIDC token moves from `tokenEnv: NAME` to `token: {env: NAME}`. This is shape change 2 of #13080. ## Why One type held both kinds of reference, so the schema, the generated reference, and editors could not say whether a variable must contain a secret or a path ([types.rs](https://github.com/NVIDIA/NemoClaw/blob/9a90ce7e7/crates/nemoclaw-sdk/src/config/types.rs#L76-L84)). | Field | Runtime use of the variable's value | Type | |---|---|---| | `gateway.credential` (external) | Bearer token for the gateway connection | `SecretRef` | | `inferenceProviders[].credential`, inline route providers | Registered provider credential | `SecretRef` | | Web-search `integrations.<name>.credential` | Search provider API key | `SecretRef` | | API `integrations.<name>.credential` (#13403) | Key OpenShell injects into requests to the API endpoint | `SecretRef` | | `gateway.kubernetes.authentication.token` (#13414; was `tokenEnv`) | Bearer token NemoClaw sends to a managed gateway with the OIDC profile | `SecretRef` | | `gateway.tls.ca`, `certificate`, `key` | Read as files | `FileRef` | | `gateway.kubernetes.kubeconfig` | Made absolute and passed as the kubeconfig path | `FileRef` | | `sandboxes[].image.metadata` | Absolute path of an OCI metadata bundle, read as a file | `FileRef` | ## Change - `SecretRef` and `FileRef` replace `Credential` in the Rust types, the schema, and the reference. There is no alias, so a misclassified reference is a compile error. - Both keep the existing `env` rules: the variable-name pattern and the reserved `NEMOCLAW_KUBERNETES_STATE`, `NEMOCLAW_MANAGED_K8S_`, `HELM_`, and `KUBE_` names. The kubeconfig and `environment` rules are unchanged. A rejected name now reports `secret reference …` or `file reference …`. - As cv's review asked, there is no `file` form for secrets and no `kubernetesSecret` form: reading secrets from files changes the credential model, and OpenShell cannot bind a Secret by reference yet. Adding either later is additive. - The OIDC token was the one secret reference held as a bare string (`tokenEnv`). It is now a `SecretRef` under `token`. Its property keeps the kubeconfig reference's reserved names, which `tokenEnv` also excluded, because the token reaches OpenTofu beside the kubeconfig. A reserved SDK prefix reports `secret reference …`; a kubeconfig-reserved name reports `token environment reference …`. Breaking for Rust SDK callers that name `Credential` or `KubernetesAuthentication::token_env`, and for documents using the OIDC profile, which must replace `tokenEnv: NAME` with `token: {env: NAME}`. Other authored documents are unchanged. Retained state is unchanged except for OIDC deployments made since #13414: the `openshell_kubernetes_auth` resource's `oidc` attribute is the serialized settings, so state that holds `tokenEnv` now fails as an invalid managed Kubernetes attribute and is not adopted. Development-profile state stores no settings and is unaffected. ## Validation - New test `config_kubernetes::a_reserved_reference_name_states_whether_the_reference_holds_a_secret_or_a_file_path` failed before the change with the shared credential message. It checks each `SecretRef` and `FileRef` field, including the API integration key from #13403 and the OIDC token, along with the schema location and the message, and that the name is not echoed. - `config_kubernetes::an_oidc_profile_requires_its_issuer_and_development_takes_no_oidc_settings` and the reference-kind test failed on `token` as an unknown field before the token change. The OIDC test now also rejects `tokenEnv` and a bare string `token`. - Settings that hold `tokenEnv` fail to deserialize into `KubernetesAuthentication` with an unknown-field error, which `Spec::from_row` maps to the invalid-attribute error. This was checked with a temporary test that is not committed. - `cargo ci` at `64cfa22e5` (linux_arm64; `v1` at `1802b0611` merged in): every step passed (`tools`, `fmt`, `clippy`, `build`, `test`, `schema`, `bundle`, and `lifecycle`). `test`: 1,601 tests, 19.2 s wall against a 45 s budget. `lifecycle`: 150 tests, 106.9 s wall against 300 s. Contract binaries summed 8.4 s of 25 s (fabric-provider), 42.0 s of 45 s (nemoclaw-provider), and 101.6 s of 105 s (openshell-provider). `nemoclaw-build docs --check` also passed. - `5ecebeb63` merges `v1` at `d33d50647` (#13460), which changes only build tooling. After the merge, `cargo fmt --check`, the `nemoclaw-build` tests, `schema --check`, and `docs --check` passed. - Not run: the live TLS, `kubernetes_live`, and `kubernetes_oidc` suites, which need live clusters and an issuer. They compile under clippy. Part of #13080. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Hai Nguyen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Closes #13397. Part of #13394.
Failure
The
openshell_apiresource registers a key-authenticated HTTP API with OpenShell, such as the travel team's booking service over MCP. The YAML had no matching integration, so a YAML deployment couldn't reach such a service with a gateway-held key.Decision
api, hasendpoint,credential, and an optionalauthStyle(bearerorheader) andheaderName. Those mirroropenshell_api's settings, and NemoClaw's existing rules validate them.apicompiles to oneopenshell_apiper definition and image scope. Its executables come from the sandbox's harness, as for web search, and the sandbox attaches and waits for its registration.sandboxEnv, proposed in the issue, is left out:openshell_apihas no such input.Validation
unknown variant) and pass after. They cover the compiled resource and attachment, header authentication, and that an unattached definition creates nothing.apiintegration through the SDK and the bundle's CLI against the fixture gateway, exports it, re-applies unchanged, and destroys it.cargo cipasses locally: 1545 unit tests and 151 lifecycle tests.docs/agents.mddocuments the kind.