fix(grid-agent): move setup into YAML preferences (#135)
This commit is contained in:
@@ -11,24 +11,20 @@ adapters. The `live-grid` feature exposes the owner for the existing
|
||||
client's native `NetworkManager` for login, event-queue readiness, disconnect
|
||||
notifications, and logout instead of adding a protocol client.
|
||||
|
||||
The LLM connection identity has exactly two resolved fields:
|
||||
`llm.endpoint_url` and `llm.api_key`. The endpoint is used exactly as supplied;
|
||||
The LLM connection identity has an exact `llm.endpoint_url`, `llm.api_key`, and
|
||||
optional `llm.model`. The endpoint is used exactly as supplied;
|
||||
there are no providers, presets, base-URL rewrites, model catalogs, discovery,
|
||||
or provider SDKs. `Debug`/`Display` output removes API keys, grid passwords, URL
|
||||
user information, and URL query values. Secret wrappers are not serializable.
|
||||
|
||||
Configuration precedence, from lowest to highest, is built-in defaults, an
|
||||
optional JSON file, its referenced secret files, then environment values (an
|
||||
environment-referenced secret file is below a direct environment secret).
|
||||
Supported secret environment variables are
|
||||
`METACRATE_AGENT_LLM_API_KEY[_FILE]` and
|
||||
`METACRATE_AGENT_GRID_PASSWORD[_FILE]`. Split control uses the separate
|
||||
`METACRATE_AGENT_CONTROL_OPERATOR_TOKEN[_FILE]` and optional
|
||||
`METACRATE_AGENT_CONTROL_OBSERVER_TOKEN[_FILE]`, plus
|
||||
`METACRATE_AGENT_CONTROL_LISTEN`. Secret files must be bounded regular,
|
||||
non-symlink UTF-8 files containing one line. Operators must restrict their OS
|
||||
ACLs to the service identity; the core uses only portable `std::fs` checks and
|
||||
does not assume Unix permission bits.
|
||||
Persistent setup lives in the platform `config.yml` (normally
|
||||
`~/.config/metacrate/config.yml` on Linux). The file contains grid/AI
|
||||
connectivity and the exact privileged avatar UUID list; it is written with mode
|
||||
0600 on Unix. `--preferences` opens the setup panel without starting the
|
||||
service. `--import-env .env` performs a one-time import of the legacy
|
||||
`GRID_*`/`OPENAPI_*` values; runtime configuration does not read `.env` or
|
||||
connection environment variables. JSON files and referenced secret files are
|
||||
accepted only as a legacy migration input.
|
||||
|
||||
Run the focused offline gate with:
|
||||
|
||||
@@ -36,9 +32,9 @@ Run the focused offline gate with:
|
||||
cargo test --locked -p metacrate-grid-agent
|
||||
cargo clippy --locked -p metacrate-grid-agent --all-targets -- -D warnings
|
||||
cargo run --locked -p metacrate-grid-agent -- \
|
||||
--config config/grid-agent.example.json --check-config
|
||||
--config config/grid-agent.example.yml --check-config
|
||||
cargo run --locked -p metacrate-grid-agent -- \
|
||||
--config config/grid-agent.example.json --run-once
|
||||
--config config/grid-agent.example.yml --run-once
|
||||
```
|
||||
|
||||
See [`../../docs/grid-agent-architecture.md`](../../docs/grid-agent-architecture.md)
|
||||
@@ -68,6 +64,6 @@ The complete quick start, platform paths, systemd/Windows service operation,
|
||||
secret rotation, backup/upgrade/rollback, failure playbooks, resource defaults,
|
||||
and unsupported-operation list are in
|
||||
[`../../docs/grid-agent-operations.md`](../../docs/grid-agent-operations.md).
|
||||
Milestone acceptance, resource budgets, evidence, and opt-in live validation
|
||||
Milestone acceptance, resource budgets, evidence, and live-grid validation
|
||||
are defined in
|
||||
[`../../docs/grid-agent-acceptance.md`](../../docs/grid-agent-acceptance.md).
|
||||
|
||||
Reference in New Issue
Block a user