v0.3.3 — doctor --fix expand + multi-profile
What's New
doctor --fix auto-repair expansion (P47-B2)
- Config auto-create:
aegis doctor --fixnow creates a minimalconfig.tomlwhen missing (mainnet backend + new api_key_id + default key path) - Key auto-gen: Missing private key → Ed25519 keypair generated inline via
generate_keypair() - MCP Queue check: New diagnostic scans
~/.aegis/mcp_queue_*.jsonl, distinguishes live-PID (own) from dead-PID (orphan) queues - Orphan adoption:
--fixmerges orphan queues intomcp_queue_recovered.jsonl(0o600, O_APPEND), removes originals
Multi-Profile support (P47-B3)
- TOML overlay:
[profiles.<name>.client]+[profiles.<name>.signing]sections overlay on top-level config - Env var activation: Set
AEGIS_PROFILE=stagingto activate a profile - Kwarg priority:
load_config(profile="staging")takes precedence over env var - New CLI command:
aegis profiles [--active]lists profiles and marks active;--activeprints only the active name (CI-friendly) - Non-destructive overlay: unspecified profile keys inherit from top-level
Example config.toml with profiles
[client]
canister_id = "toqqq-lqaaa-aaaae-afc2a-cai"
api_key_id = "ak_main"
[profiles.staging.client]
canister_id = "uxrrr-q7777-77774-qaaaq-cai"
api_key_id = "ak_staging"
[profiles.staging.signing]
default_scheme = "ed25519"Then: AEGIS_PROFILE=staging aegis test
Tests
- 25 new tests (TestDoctorFix 4 + TestDoctorMcpQueue 3 + TestMultiProfile 12 + TestCliProfiles 6)
- 1200 collected total (1126 unit + 74 live E2E), all passing
Install
pip install aegis-ledger-sdk==0.3.3