Commit Graph

62 Commits

Author SHA1 Message Date
Abhimanyu Saharan
eba090a3d3 fix(governor): satisfy backend CI checks
Align the cherry-picked governor code with the repository's lint and\ntype-check expectations. This fixes import ordering, formats the new\nservice, tightens session and heartbeat typing, and removes stale\nannotations so the backend CI job passes on current master.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-08 00:34:24 +05:30
DevBot
2a3b1022c2 feat: auto heartbeat governor (elastic backoff)
(cherry picked from commit 2d1d691879)
2026-03-08 00:21:55 +05:30
Hugh Brown
62d2378bdc chore: simplify and harden security review changes
- Add prompt-injection fencing to _webhook_memory_content (was missing
  the --- BEGIN/END EXTERNAL DATA --- fence applied elsewhere)
- Wrap Content-Length parsing in try/except to avoid 500 on malformed
  header values
- Move _to_gateway_read below imports (was incorrectly placed between
  import blocks) and tighten transformer types
- Replace list-rebuild with deque.popleft in rate limiter for O(expired)
  amortized pruning instead of O(n) per call
- Make organization_id required in send_session_message to prevent
  fail-open cross-tenant check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Hugh Brown
66da278673 security: require org-admin for gateway session message endpoint
send_gateway_session_message only required basic auth (AUTH_DEP) while
all other gateway endpoints required ORG_ADMIN_DEP. Any authenticated
user could send messages to any gateway session. Now requires org-admin
and verifies the board belongs to the caller's organization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:35:10 +05:30
Abhimanyu Saharan
532fbf1dc5 feat(config): make BASE_URL a required field and update related documentation 2026-03-05 01:36:07 +05:30
Abhimanyu Saharan
bdc9fc3f01 redesigned dashboard page 2026-03-04 16:01:56 +05:30
Abhimanyu Saharan
d4f9831ecb fix(agent): refine agent update retry logic to handle creation race conditions #193 2026-03-03 03:19:11 +05:30
Abhimanyu Saharan
94ae59d6aa refactor(gateway): update gateway parameters to use None as default #169 2026-03-03 01:51:52 +05:30
Viktor
026da96e8c fix: auto-configure tools.exec.host and handle agents.update race
Three related provisioning fixes:

1. **tools.exec.host auto-configuration**: Add `_tools_exec_host_patch()`
   that ensures `tools.exec.host` is set to `"gateway"` during
   `patch_agent_heartbeats()`. Without this, heartbeat-driven agents
   cannot execute `curl`, `bash`, or any shell command — making
   HEARTBEAT.md instructions unexecutable. The function is idempotent
   and respects existing user configuration.

2. **agents.update hot-reload race**: After `agents.create` writes to
   disk, the gateway triggers a ~500ms debounced hot-reload. If
   `agents.update` arrives before the reload completes, it returns
   "agent not found". Fix: add a 750ms delay after create + exponential
   backoff retry (5 attempts, 0.5s → 4s) on the update call.

3. **Skip no-op config.patch**: When `patch_agent_heartbeats()` detects
   no changes to agents, channels, or tools config, skip the
   `config.patch` RPC entirely. Each unnecessary patch triggers a
   gateway SIGUSR1 restart that rotates agent tokens and breaks active
   sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 16:40:44 +00:00
Abhimanyu Saharan
6b21ea6f99 feat(boards): add 'comment_required_for_review' rule and update related logic 2026-02-26 00:31:47 +05:30
Abhimanyu Saharan
842a0770a8 Update backend/app/services/openclaw/provisioning.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-25 03:37:05 +05:30
Abhimanyu Saharan
3f158940cd Merge branch 'master' into docs/backend-doc-pass 2026-02-25 03:32:14 +05:30
Abhimanyu Saharan
0795f78eff feat: implement unified agent lifecycle orchestration and metadata tracking 2026-02-25 00:34:04 +05:30
Abhimanyu Saharan
2d3c3ee3e4 feat: add config fallback for gateway version compatibility check 2026-02-23 01:23:09 +05:30
Abhimanyu Saharan
6b09f124e6 refactor: rename compatibility check function and update version extraction logic #159 2026-02-22 22:05:39 +05:30
Abhimanyu Saharan
f1f3fbb766 docs: enhance docstring for SSL context creation with insecure TLS 2026-02-22 21:04:31 +05:30
Abhimanyu Saharan
56f4964332 feat: add support for allowing self-signed TLS certificates in gateway configuration 2026-02-22 20:20:19 +05:30
Abhimanyu Saharan
374d5a0c37 Merge branch 'master' into copilot/feature-allow-self-signed-tls
# Conflicts:
#	backend/app/api/gateways.py
#	backend/app/schemas/gateways.py
#	backend/app/services/openclaw/admin_service.py
#	backend/app/services/openclaw/gateway_resolver.py
#	backend/app/services/openclaw/gateway_rpc.py
#	backend/app/services/openclaw/provisioning.py
#	backend/app/services/openclaw/provisioning_db.py
#	frontend/src/api/generated/model/gatewayCreate.ts
#	frontend/src/api/generated/model/gatewayRead.ts
#	frontend/src/api/generated/model/gatewayUpdate.ts
2026-02-22 19:51:27 +05:30
Abhimanyu Saharan
cdced8e07c refactor: improve code formatting and readability in tests and components 2026-02-22 19:45:18 +05:30
Abhimanyu Saharan
3dfb70cd90 feat: add disable_device_pairing option to gateway configuration 2026-02-22 19:19:26 +05:30
Abhimanyu Saharan
e39b2069fb feat: add openclaw_connect_metadata function and update compatibility check logic, fixes #156 2026-02-22 13:37:01 +05:30
copilot-swe-agent[bot]
217f98afcc fix: Address code review feedback
- Fix docstring formatting in _create_ssl_context
- Break long line in provisioning.py for better readability

Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-02-22 05:30:29 +00:00
copilot-swe-agent[bot]
520e128777 feat: Add allow_insecure_tls field to gateway model and UI
- Added allow_insecure_tls boolean field to Gateway model and schemas
- Created database migration for the new field
- Updated GatewayConfig to include allow_insecure_tls parameter
- Modified openclaw_call to create SSL context that disables verification when allow_insecure_tls is true
- Updated all GatewayConfig instantiations throughout the backend
- Added checkbox to frontend gateway form (create and edit pages)
- Updated API endpoints to handle the new field

Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-02-22 05:28:37 +00:00
copilot-swe-agent[bot]
07190dca04 fix: add operator.read scope to gateway connection scopes
Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-02-21 02:54:17 +00:00
Abhimanyu Saharan
7a3a2366da feat: update wakeup text to include reading BOOTSTRAP.md before AGENTS.md 2026-02-16 01:45:02 +05:30
Abhimanyu Saharan
cd68446c42 feat: add BoardWebhook updates on agent deletion 2026-02-16 00:21:21 +05:30
Abhimanyu Saharan
b702ade0cc fix: update HTTP status code from UNPROCESSABLE_ENTITY to UNPROCESSABLE_CONTENT 2026-02-15 16:06:06 +05:30
Abhimanyu Saharan
24731667d4 feat: add gateway runtime compatibility checks and minimum version enforcement 2026-02-15 15:59:55 +05:30
Abhimanyu Saharan
f1d8da7008 refactor: enhance user context handling and update template mappings 2026-02-15 14:21:49 +05:30
Abhimanyu Saharan
1996e21695 refactor: add overwrite option to various services and update documentation 2026-02-15 13:55:47 +05:30
Abhimanyu Saharan
0ac22dbd7a feat(heartbeat): change default target to 'last' and remove target option from UI 2026-02-15 01:37:12 +05:30
Abhimanyu Saharan
6f465d32fa feat(gateway): add lead_only option for syncing board lead agents 2026-02-15 01:23:36 +05:30
Abhimanyu Saharan
a55664810c refactor(constants): initialize LEAD_TEMPLATE_MAP as an empty dictionary
refactor(page): clean up import statements for better readability
fix(tests): update assertions for clarity and consistency
2026-02-15 00:53:27 +05:30
Abhimanyu Saharan
2084405593 feat(board): introduce new board agent templates and restructure existing files 2026-02-15 00:45:28 +05:30
Abhimanyu Saharan
313ce874f9 feat(memory): update MEMORY.md structure and consolidate identity preferences 2026-02-14 23:55:45 +05:30
Abhimanyu Saharan
ae711909ff feat(boards): add max_agents field to board models and enforce limits 2026-02-14 19:43:16 +05:30
Abhimanyu Saharan
68b6029ac3 feat: add GATEWAY_OPERATOR_SCOPES and update connection parameters for operator role 2026-02-13 23:37:10 +05:30
Abhimanyu Saharan
9a5964a31c refactor: reorganize import statements and improve code formatting across multiple files 2026-02-13 16:22:06 +05:30
Abhimanyu Saharan
8db9f25db2 feat: add tag assignment deletion and improve agent error handling in provisioning 2026-02-13 02:35:52 +05:30
Abhimanyu Saharan
a3148baca9 feat: enhance agent and board APIs with role-based tags and improved documentation 2026-02-13 02:08:33 +05:30
Abhimanyu Saharan
b7ad378655 docs(provisioning): document workspace paths and config patching 2026-02-12 14:18:23 +00:00
Abhimanyu Saharan
bd1e599ae5 feat: add endpoint to delete board agents and implement related service logic 2026-02-12 02:55:00 +05:30
Abhimanyu Saharan
8d0b2939a6 feat: enhance logging configuration and add request logging context 2026-02-11 16:49:43 +05:30
Abhimanyu Saharan
c3490630a4 refactor: clean up imports and improve session key assertion formatting 2026-02-11 10:47:32 +05:30
Abhimanyu Saharan
c09116b8f0 refactor: update gateway agent prefix and maintain backwards compatibility for session keys 2026-02-11 02:47:08 +05:30
Abhimanyu Saharan
77347534fd refactor: centralize session key generation with new helper functions 2026-02-11 01:56:16 +05:30
Abhimanyu Saharan
275cc6f473 refactor: centralize gateway resolution logic with new helper functions 2026-02-11 01:47:24 +05:30
Abhimanyu Saharan
f1038acf44 refactor: streamline agent lifecycle management with new DB service helpers 2026-02-11 01:13:10 +05:30
Abhimanyu Saharan
f4161494d9 refactor: update internal helpers and improve slugify function usage 2026-02-11 00:27:44 +05:30
Abhimanyu Saharan
b038d0df4c refactor: update imports to use provisioning_db and gateway_rpc modules 2026-02-11 00:00:19 +05:30