- Add oauth2_m2m auth type to mcp_loader.py (client_secret in record, not SSM) - Remove _get_factcloud_token(), FACTCLOUD_* config, factcloud_clients from main.py - Seed Daniel's factcloud connection into enrolled_services.mcp_connections - factcloud now loaded dynamically via mcp_loader at session start
28 lines
937 B
Python
28 lines
937 B
Python
"""Config loader — fetches model IDs and service URLs from SSM Parameter Store at cold start."""
|
|
|
|
import boto3
|
|
|
|
_DEFAULTS = {
|
|
'/agent-claw/model-id': 'us.anthropic.claude-sonnet-4-6',
|
|
'/agent-claw/config/compaction_model_id': 'us.anthropic.claude-3-5-haiku-20241022-v1:0',
|
|
'/agent-claw/aws-mcp-url': 'https://aws-mcp.us-east-1.api.aws/mcp',
|
|
}
|
|
|
|
|
|
def _load():
|
|
ssm = boto3.client('ssm', region_name='us-east-1')
|
|
names = list(_DEFAULTS.keys())
|
|
try:
|
|
resp = ssm.get_parameters(Names=names, WithDecryption=True)
|
|
found = {p['Name']: p['Value'] for p in resp['Parameters']}
|
|
except Exception:
|
|
found = {}
|
|
return {name: found.get(name, default) for name, default in _DEFAULTS.items()}
|
|
|
|
|
|
_params = _load()
|
|
|
|
AGENT_MODEL_ID: str = _params['/agent-claw/model-id']
|
|
COMPACTION_MODEL_ID: str = _params['/agent-claw/config/compaction_model_id']
|
|
AWS_MCP_URL: str = _params['/agent-claw/aws-mcp-url']
|