22 Commits

Author SHA1 Message Date
daniel
bdd334b6fb feat: add user-configurable MCP connections
- manage_mcp_connection tool: add/remove/enable/disable/list MCP servers
- mcp_loader: dynamic connection with OAuth/bearer/none auth, token caching
- Secrets stored in SSM, never in DynamoDB
- MCP clients loaded per-session and cleaned up in finally block
2026-05-13 21:55:01 -05:00
daniel
74f74ef877 refactor: migrate Secrets Manager secrets to SSM Parameter Store (free tier) 2026-05-13 12:55:16 -05:00
daniel
3cc90550b5 feat: add Telegram file attachment support (inbound + outbound)
Inbound:
- tg-ingest detects document/photo/audio/video/voice attachments
- Downloads files via Telegram Bot API (getFile + download)
- Inlines small text files (<50KB) directly in the prompt
- Stores binary/large files to S3 (attachments/{chat_id}/{update_id}/{filename})
- agent-runner appends file context to the AgentCore prompt

Outbound:
- New send_file tool for the agent to send documents back to users
- TelegramAdapter.send_document uses multipart/form-data POST
- CDK grants tg-ingest S3 write access and passes bucket name env var
2026-05-13 05:34:33 -05:00
daniel
eba4f7db25 fix: align run_code with AWS docs pattern (invoke+executeCode, not execute_code wrapper) 2026-05-12 15:26:01 -05:00
daniel
c317d948b1 Migrate primary to labeled path, remove all flat-path fallback logic 2026-05-09 14:20:24 -05:00
daniel
bf89f7255a Fix: always load flat secret as primary regardless of labeled secrets 2026-05-09 14:14:38 -05:00
daniel
38d828ef74 Multi-account Google support with user labels 2026-05-09 11:21:37 -05:00
daniel
eddbd98153 Fix: use build(credentials=creds) instead of creds.authorize() for google-auth compatibility; add traceback logging 2026-05-08 19:57:35 -05:00
daniel
9b56aa83df Fix Google OAuth: explicit IAM policy + strip OIDC scopes from credentials 2026-05-08 16:57:40 -05:00
daniel
633ad03db0 Fix naive/aware datetime comparison: strip tz from expiry for google-auth 2026-05-08 16:05:45 -05:00
daniel
8a25eb2d5a Fix: pass expiry to Credentials so auto-refresh fires when token expired 2026-05-08 16:03:09 -05:00
daniel
9d21d5d2e5 Fix: import main in _actor_id() causes app.run() hang — use module-level var instead 2026-05-08 11:32:21 -05:00
daniel
f4444cbd22 Fix: pass only authorized http to build(), not credentials, so timeout applies to API calls 2026-05-08 11:17:38 -05:00
daniel
350ce231a4 embed workspace-mcp as direct dependency, simplify google credential loading
- Add workspace-mcp >= 1.20.0 to pyproject.toml (pulls google-api-python-client etc. transitively)
- Remove redundant google-api-python-client/google-auth/google-auth-httplib2 direct deps
- Rewrite google_workspace.py: single Secrets Manager call per tool (client_id/client_secret
  are already in the credentials secret stored by oauth-handler, no separate oauth-client secret needed)
- Mirror workspace-mcp output format for list_calendars and get_calendar_events
- Add body_format param to get_gmail_message (text/html/raw) matching workspace-mcp API
- Update uv.lock
2026-05-08 11:12:06 -05:00
daniel
245c2d64f5 Add debug logging to google_workspace tools 2026-05-08 10:56:29 -05:00
daniel
6d0464ea07 Add httplib2 15s timeout + cache_discovery=False to prevent hangs 2026-05-08 10:53:19 -05:00
daniel
ad594f6797 Add direct Google Calendar/Gmail tools, remove workspace_mcp 2026-05-08 10:37:31 -05:00
daniel
4e90440011 Hardcode scheduler Lambda ARN fallback (env var not propagating) 2026-05-07 23:31:11 -05:00
daniel
58ed60f7b7 Add EventBridge scheduling: schedule_reminder, list_reminders, cancel_reminder 2026-05-07 23:24:48 -05:00
daniel
0951d2be31 Fix workspace bucket fallback + typing error logging 2026-05-07 09:35:09 -05:00
daniel
92c87222e8 multi-tenant phase 3: per-user Home Assistant + enrolled services
- tools/home_assistant.py: remove hardcoded URL/token; read from per-user
  config injected via set_ha_config() at invocation time; return helpful
  enrollment prompt when HA not configured
- main.py: inject HA config from user_profile.services at startup; add
  manage_service tool (enroll/remove/list) that persists to DynamoDB;
  show enrolled services in user context; add USERS_TABLE_NAME env var
- agent-runner/handler.py: pass services dict from DDB user record in
  user_profile payload; initialize services={} for new users
- cdk/lib/agent-claw-stack.ts: grant usersTable read/write to runtime1Role
  so manage_service tool can update user records
- agentclaw/agentcore/agentcore.json: add USERS_TABLE_NAME env var
2026-05-07 09:10:39 -05:00
daniel
732b00fb66 agent-claw: automated task changes 2026-05-06 18:55:16 -05:00