From 0e58578a183ea6bad7498bba1013a80bf76f1c82 Mon Sep 17 00:00:00 2001 From: "andrea.difonzo" Date: Tue, 17 Nov 2026 13:24:08 +0100 Subject: [PATCH] Test e schemi: schema config rigenerato, test exec e dominio MDM allineati (B/A) Co-Authored-By: Claude Sonnet 5.5 --- akode-rs/core/config.schema.json | 105 +----------------- .../core/src/config/config_loader_tests.rs | 4 +- akode-rs/core/src/config/config_tests.rs | 2 +- .../exec/tests/suite/no_model_provider.rs | 2 +- 4 files changed, 8 insertions(+), 105 deletions(-) diff --git a/akode-rs/core/config.schema.json b/akode-rs/core/config.schema.json index 088732c4..c8542b1d 100644 --- a/akode-rs/core/config.schema.json +++ b/akode-rs/core/config.schema.json @@ -3033,10 +3033,6 @@ "description": "Whether hosted web search may access the live web.", "type": "boolean" }, - "hosted_web_search": { - "description": "Whether the server executes the hosted `web_search` tool itself (off by default; local servers usually do not). aKode's own `[web_search]` backend is separate.", - "type": "boolean" - }, "remote_compaction": { "allOf": [ { @@ -3052,14 +3048,6 @@ "additionalProperties": false, "description": "Serializable representation of a provider definition.", "properties": { - "api_key": { - "allOf": [ - { - "$ref": "#/definitions/ProviderApiKeySource" - } - ], - "description": "Where to read this provider's API key from. `\"keyring\"` reads the key stored with `akode login --provider --with-api-key`: in the system keyring, or in a private file in AKODE_HOME when `provider_api_key_store` selects (or falls back to) file storage." - }, "auth": { "allOf": [ { @@ -3114,10 +3102,6 @@ "description": "Additional HTTP headers to include in requests to this provider where the (key, value) pairs are the header name and value.", "type": "object" }, - "merge_system_messages": { - "description": "Merge the base instructions and the leading system/developer messages into one leading system block; later system/developer messages stay in place as user messages. Many local chat templates reject multiple or non-leading system messages. Defaults to true.", - "type": "boolean" - }, "model_catalog_url": { "description": "Optional full URL for a Codex-native model catalog (Codex catalog format, not the public `/v1/models` API). When unset, models are listed from `GET {base_url}/models`.\n\nCatalog requests use the provider's credentials. Only configure an endpoint you trust with those credentials.", "type": "string" @@ -3142,11 +3126,11 @@ }, "requires_openai_auth": { "default": false, - "description": "Use the API key stored with `akode login --with-api-key` (in `auth.json` or the credentials store selected by `cli_auth_credentials_store`) for this provider. `use_stored_api_key` is accepted as a clearer alias. When false (the default), the key comes from `api_key`, `env_key`, or `auth`, if any.", + "description": "Use the API key stored with `akode login --with-api-key` (in `auth.json` or the credentials store selected by `cli_auth_credentials_store`) for this provider. When false (the default), the key comes from `env_key` or `auth`, if any.", "type": "boolean" }, "stream_idle_timeout_ms": { - "description": "Idle timeout (in milliseconds) to wait for activity on a streaming response before treating the connection as lost.", + "description": "Idle timeout (in milliseconds) to wait for activity on a streaming response before treating the connection as lost. It also bounds the wait for the first response (headers). Any bytes count as activity, including SSE comments and progress events. Defaults to 5 minutes, or 30 minutes for local servers.", "format": "uint64", "minimum": 0.0, "type": "integer" @@ -3967,18 +3951,6 @@ }, "type": "object" }, - "ProviderApiKeySource": { - "description": "Source of a provider API key configured through `api_key`.", - "oneOf": [ - { - "description": "Read the key from the system keyring (service `aKode`, account `model-provider:`).", - "enum": [ - "keyring" - ], - "type": "string" - } - ] - }, "ProxySecretSource": { "description": "A credential source in the trusted proxy process, never in the executor environment.", "oneOf": [ @@ -7277,18 +7249,6 @@ ], "type": "string" }, - "WebSearchBackendKind": { - "description": "Client-side web search backends (`[web_search] backend = ...`).", - "oneOf": [ - { - "description": "A SearXNG instance with the JSON output format enabled.", - "enum": [ - "searxng" - ], - "type": "string" - } - ] - }, "WebSearchContextSize": { "enum": [ "low", @@ -7332,54 +7292,6 @@ ], "type": "string" }, - "WebSearchSetting": { - "anyOf": [ - { - "$ref": "#/definitions/WebSearchMode" - }, - { - "$ref": "#/definitions/WebSearchTable" - } - ], - "description": "`web_search` accepts either a mode string or a `[web_search]` table." - }, - "WebSearchTable": { - "additionalProperties": false, - "description": "`[web_search]` table form: a client-side backend plus the optional mode.", - "properties": { - "backend": { - "allOf": [ - { - "$ref": "#/definitions/WebSearchBackendKind" - } - ], - "description": "Client-side backend. When unset, no web tools are exposed." - }, - "fetch": { - "description": "Expose the `web_fetch` tool (default true).", - "type": "boolean" - }, - "max_results": { - "description": "Number of results returned by `web_search` (default 8).", - "format": "uint", - "minimum": 0.0, - "type": "integer" - }, - "mode": { - "allOf": [ - { - "$ref": "#/definitions/WebSearchMode" - } - ], - "description": "Same values as the string form (`web_search = \"live\"`); `disabled` turns tools off." - }, - "url": { - "description": "Base URL of the backend, for example `http://192.168.40.57:8080`.", - "type": "string" - } - }, - "type": "object" - }, "WebSearchToolConfig": { "additionalProperties": false, "properties": { @@ -8630,15 +8542,6 @@ }, "type": "object" }, - "provider_api_key_store": { - "allOf": [ - { - "$ref": "#/definitions/AuthCredentialsStoreMode" - } - ], - "default": null, - "description": "Where per-provider API keys (`api_key = \"keyring\"`) are stored. auto (default): the system keyring if available, otherwise `AKODE_HOME/provider_api_keys.json` (owner-only permissions). keyring: the system keyring only. file: the file only. ephemeral: memory only." - }, "realtime": { "allOf": [ { @@ -8758,10 +8661,10 @@ "web_search": { "allOf": [ { - "$ref": "#/definitions/WebSearchSetting" + "$ref": "#/definitions/WebSearchMode" } ], - "description": "Web search: a mode string (disabled, cached, indexed, live) or a `[web_search]` table selecting a client-side backend, e.g. `backend = \"searxng\"`, `url = \"...\"`." + "description": "Controls the web search tool mode: disabled, cached, indexed, or live." }, "windows": { "allOf": [ diff --git a/akode-rs/core/src/config/config_loader_tests.rs b/akode-rs/core/src/config/config_loader_tests.rs index 9dfb36f8..51bde38b 100644 --- a/akode-rs/core/src/config/config_loader_tests.rs +++ b/akode-rs/core/src/config/config_loader_tests.rs @@ -62,7 +62,7 @@ fn config_error_from_io(err: &std::io::Error) -> &ConfigError { fn mdm_requirement_source() -> RequirementSource { RequirementSource::MdmManagedPreferences { - domain: "com.openai.codex".to_string(), + domain: "net.difonzo.akode".to_string(), key: "requirements_toml_base64".to_string(), } } @@ -1568,7 +1568,7 @@ allowed_approval_policies = ["on-request"] candidate: "Never".into(), allowed: "[OnRequest]".into(), requirement_source: RequirementSource::MdmManagedPreferences { - domain: "com.openai.codex".to_string(), + domain: "net.difonzo.akode".to_string(), key: "requirements_toml_base64".to_string(), }, }) diff --git a/akode-rs/core/src/config/config_tests.rs b/akode-rs/core/src/config/config_tests.rs index b180dcc2..f45c84df 100644 --- a/akode-rs/core/src/config/config_tests.rs +++ b/akode-rs/core/src/config/config_tests.rs @@ -11708,7 +11708,7 @@ fn retired_feature_requirements_do_not_pin_configured_values( ..Default::default() }, RequirementSource::MdmManagedPreferences { - domain: "com.openai.codex".to_string(), + domain: "net.difonzo.akode".to_string(), key: "requirements_toml_base64".to_string(), }, ); diff --git a/akode-rs/exec/tests/suite/no_model_provider.rs b/akode-rs/exec/tests/suite/no_model_provider.rs index 67f390d2..54de7e87 100644 --- a/akode-rs/exec/tests/suite/no_model_provider.rs +++ b/akode-rs/exec/tests/suite/no_model_provider.rs @@ -15,5 +15,5 @@ fn exec_without_model_provider_explains_how_to_configure_one() { .failure() .stderr(contains("No model provider is configured")) .stderr(contains("[model_providers.local]")) - .stderr(contains("akode login --provider local --with-api-key")); + .stderr(contains("env_key")); }