Commit Graph

508 Commits

Author SHA1 Message Date
Abhimanyu Saharan
77870b0fc7 fix(agent): improve error handling for get_agent_soul method 2026-03-03 03:09:29 +05:30
Abhimanyu Saharan
0fe61e3e08 refactor(env): update NEXT_PUBLIC_API_URL to use 'auto' for better flexibility 2026-03-03 02:40:28 +05:30
Abhimanyu Saharan
2031f8dcd8 fix: increase GIT_CLONE_TIMEOUT_SECONDS to 600 for better performance #173 2026-03-03 02:16:19 +05:30
Abhimanyu Saharan
94ae59d6aa refactor(gateway): update gateway parameters to use None as default #169 2026-03-03 01:51:52 +05:30
copilot-swe-agent[bot]
7f5aaa7412 fix: add git to backend Docker image for skill pack sync
Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-03-02 19:41:25 +00:00
Abhimanyu Saharan
bfa067fde4 Merge pull request #190 from crazyclaw85-source/fix/provisioning-exec-host-and-update-race
fix: auto-configure tools.exec.host and handle agents.update race
2026-03-03 00:17:35 +05:30
copilot-swe-agent[bot]
35b3829da0 refactor: use custom worker script instead of standard RQ CLI
- Add scripts/rq-docker for Docker container compatibility
- Update Dockerfile to copy scripts directory
- Replace standard rq worker command with custom worker script
- Custom worker includes built-in scheduling via _drain_ready_scheduled_tasks

Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-03-02 14:57:00 +00:00
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
Hanush H Nair
4c35cb03ad fix(backend): Return None instead of 401 when agent not found in get_agent_auth_context_optional 2026-02-27 23:19:40 +05:30
Abhimanyu Saharan
c0eb1a14fd Merge branch 'master' into fix/agent-auth-accept-bearer-in-optional-dep 2026-02-27 01:49:45 +05:30
Adam Grenier
3b20e799e2 fix: accept Authorization: Bearer in agent_auth_context_optional
The optional variant of get_agent_auth_context had accept_authorization=False,
which prevented agents using Authorization: Bearer from passing through the
ACTOR_DEP / BOARD_READ_DEP / TASK_DEP dependency chain.

This caused 401 on any agent route that resolves a board or task via the shared
ACTOR_DEP (e.g. PATCH /agent/boards/{id}/tasks/{id} and
POST /agent/boards/{id}/tasks/{id}/comments), even though the same token worked
fine on routes that use AGENT_CTX_DEP directly (accept_authorization=True).

Fix: set accept_authorization=True in get_agent_auth_context_optional so both
X-Agent-Token and Authorization: Bearer are accepted consistently.

Verified: PATCH and POST /comments now resolve board/task correctly when
Authorization: Bearer is used. No security regression — agent_token_hash
comparison rejects any non-agent bearer tokens.
2026-02-26 11:51:45 -08:00
Abhimanyu Saharan
348b0515ac feat(boards): implement lead notification on board updates with detailed change messages 2026-02-26 01:58:55 +05:30
Abhimanyu Saharan
bc71d5ba38 refactor(page): improve code formatting for better readability in event handlers 2026-02-26 00:36:33 +05:30
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
adad72373c feat(tasks): add notification messages for task assignment and rework 2026-02-25 18:29:59 +05:30
Abhimanyu Saharan
5b0ddcc7cd refactor(tests): format code for better readability in test files 2026-02-25 03:41:03 +05:30
Abhimanyu Saharan
58db8be117 fix(security): update security header names to lowercase and add tests 2026-02-25 03:39:49 +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
87784d88ab Merge branch 'master' into master 2026-02-25 03:23:25 +05:30
Abhimanyu Saharan
e3404d8590 feat: implement local authentication flow and update related tests 2026-02-25 02:24:51 +05:30
Abhimanyu Saharan
2e3b455582 Merge branch 'master' into master 2026-02-25 00:50:37 +05:30
Abhimanyu Saharan
1d50e48609 chore: update CI configuration and improve README instructions 2026-02-25 00:49:35 +05:30
Abhimanyu Saharan
d9af5d3bc7 Merge branch 'master' into master 2026-02-25 00:42:48 +05:30
Abhimanyu Saharan
0795f78eff feat: implement unified agent lifecycle orchestration and metadata tracking 2026-02-25 00:34:04 +05:30
Simone
3fd5fe5f8c fix: make security headers configurable and add tests 2026-02-24 17:36:44 +01:00
copilot-swe-agent[bot]
2c5dd30bd8 feat: upgrade to FastAPI 0.131.0 and remove orjson dependency
FastAPI 0.131.0 includes Pydantic's Rust-based JSON serialization by default (PR #14962), making ORJSONResponse unnecessary. The new default serialization is 2x faster than the previous approach and eliminates the need for explicit orjson configuration.

Changes:
- Upgrade FastAPI from 0.130.0 to 0.131.0
- Remove orjson dependency (deprecated in 0.131.0)
- Remove ORJSONResponse import and configuration
- Use FastAPI's new default Pydantic-based serialization

Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-02-23 16:24:23 +00:00
copilot-swe-agent[bot]
1967e9583d feat: upgrade FastAPI to 0.130.0 and implement ORJSONResponse for performance
Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-02-22 22:13:52 +00:00
Simone
93161d3800 fix: add Redis healthcheck and security response headers
- Add healthcheck to Redis service in compose.yml and upgrade
  depends_on from service_started to service_healthy so backend
  and webhook-worker wait for Redis readiness.
- Add HTTP security headers middleware (X-Content-Type-Options,
  X-Frame-Options, Referrer-Policy, Permissions-Policy) to the
  FastAPI backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:20:53 +01:00
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
62e3c267b5 feat: add allow_insecure_tls parameter to agent configuration 2026-02-22 20:24:41 +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
d37f230eb3 feat: add allow_insecure_tls column to gateways 2026-02-22 20:07:30 +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
ab7a3c66ce feat: add disable_device_pairing parameter to agent configuration 2026-02-22 19:41:26 +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]
42a6a42902 test: Add tests for SSL context configuration
Co-authored-by: abhi1693 <5083532+abhi1693@users.noreply.github.com>
2026-02-22 05:29:32 +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
1c8a531f6a feat: update JSON key access syntax in BOARD_HEARTBEAT.md.j2 and BOARD_TOOLS.md.j2 2026-02-16 23:42:38 +05:30
Abhimanyu Saharan
6c3c9913db feat: update agent heartbeat endpoint to require no request payload 2026-02-16 01:46:06 +05:30
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
5912048b85 feat: add validation for gateway main agent requirement on board mutations 2026-02-16 01:25:44 +05:30
Abhimanyu Saharan
1d8039e760 feat: update documentation to use template variables for BASE_URL and AUTH_TOKEN 2026-02-16 01:25:39 +05:30
Abhimanyu Saharan
47dfc1b52f feat: ensure deletion of custom fields and values when a board is deleted 2026-02-16 00:44:40 +05:30