Commit Graph

1431 Commits

Author SHA1 Message Date
argenis de la rosa
c4458a3d5d fix(migration): harden openclaw onboarding and tool safety 2026-02-28 19:01:50 -05:00
Chummy
39daa626b4 fix(ci): align telegram/channel fixtures and strict-delta blockers 2026-02-28 19:01:50 -05:00
Chummy
d9d9bedf3e feat(migration): ship merge-first openclaw onboarding + agent tool 2026-02-28 19:01:50 -05:00
argenis de la rosa
df82a0ce64 fix(config): enforce ZEROCLAW_API_KEY precedence over regional aliases 2026-02-28 18:58:04 -05:00
Ignas Baranauskas
02e50f3b39 fix(config): prevent generic API_KEY env var from overriding configured api_key
The generic `API_KEY` environment variable unconditionally overwrote the
api_key loaded from config.toml, even when a valid key was already
configured. Since `API_KEY` is a very common env var name set by many
unrelated tools, this caused silent auth failures when the unrelated
value was sent to the configured provider.

Change the precedence so that `ZEROCLAW_API_KEY` always wins (explicit
intent), while `API_KEY` is only used as a fallback when the config has
no api_key set.
2026-02-28 18:58:04 -05:00
xj
09119d46ec
Merge pull request #2271 from maxtongwang/feat/channel-bluebubbles
feat(channel): add BlueBubbles iMessage channel
2026-02-28 15:56:36 -08:00
bevis
812c2f62f8 fix(channels): bound dingtalk rich text recursion 2026-02-28 18:50:59 -05:00
bevis
c2b361d093 fix(channels): accept richer dingtalk callback text payloads 2026-02-28 18:50:59 -05:00
argenis de la rosa
7d6d90174f feat(channel): use DingTalk Open API for sending messages
- Switch from sessionWebhook to /v1.0/robot/oToMessages/batchSend API
- Add access_token caching with automatic refresh (60s buffer)
- Enable cron job delivery to DingTalk (no user interaction required)

This change allows DingTalk to actively send messages (e.g., cron
reminders) without requiring the user to send a message first.
2026-02-28 18:41:51 -05:00
ZeroClaw Bot
979b5fa791 fix(skills): harden tool_handler security per CodeRabbit review
- Validate Integer/Boolean parameter types before shell substitution
- Add SecurityPolicy checks (rate limit, command validation, action recording)
- Redact rendered command from debug logs (log template only)

Made-with: Cursor
2026-02-28 18:33:49 -05:00
ZeroClaw Bot
7672ca9044 feat(skills): add native tool handler for SKILL.toml-based skills
Add SkillToolHandler that converts SKILL.toml definitions into native
tool schemas, enabling skills to be invoked as standard tools through
the agent's tool-use protocol.

Made-with: Cursor
2026-02-28 18:33:49 -05:00
argenis de la rosa
4f32820cde fix(deps): align wasmtime/wasmtime-wasi 36.0.6 and update WASI pipe path 2026-02-28 18:33:48 -05:00
ZeroClaw Bot
630a52b397 fix(auth): harden OAuth UX per CodeRabbit review
- Replace brittle split("state=") with parse_query_params utility
- Use const PROFILE_MISMATCH_PREFIX with starts_with instead of fragile contains

Made-with: Cursor
2026-02-28 18:33:17 -05:00
ZeroClaw Bot
fd1a9b7a07 fix(auth): address CodeRabbit review feedback on OAuth UX
Made-with: Cursor
2026-02-28 18:33:17 -05:00
ZeroClaw Bot
2d5c0142d2 feat(auth): improve OAuth UX for server environments
Add stale pending login detection (auto-cleanup after 24h), improved
device-code flow error messages with Cloudflare/403 detection, shared
OAuth helpers, and Box::pin fixes for large async futures.

Made-with: Cursor
2026-02-28 18:33:17 -05:00
argenis de la rosa
7058b15cc4 fix(security): harden git config readonly checks 2026-02-28 18:23:37 -05:00
argenis de la rosa
4ce4ec5f34 feat(security): allow read-only git config operations
Previously, `is_args_safe()` blocked ALL `git config`, `git alias`,
and `git -c` subcommands unconditionally. This forced administrators
to pre-create `.gitconfig` files outside ZeroClaw.

Now allow read-only git config operations:
- `git config --get <key>` - read single value
- `git config --list` / `git config -l` - list all config
- `git config --get-all <key>` - get all values for key
- `git config --get-regexp <pattern>` - list matching keys
- `git config --get-urlmatch <pattern>` - URL matching

Write operations remain blocked:
- `git config user.name "value"` (plain write)
- `git config --unset <key>`
- `git config --add <key> <value>`
- `git config --global <key> <value>` (scoped write)
- `git config -e` / `--edit` (opens editor)
- `git alias.*` and `git -c` remain fully blocked

Security impact: Read operations have no side effects and cannot
be used for code execution. The dangerous keys (core.editor,
credential.helper, alias.*) remain protected since we only allow
explicitly read-only operations.

Fixes #1398

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:23:37 -05:00
argenis de la rosa
728782d369 fix(agent): close run() wrapper calls in replayed hook wiring 2026-02-28 18:19:48 -05:00
argenis de la rosa
408616b34e feat(agent): expose hooks parameter in public run() entry point
Add `hooks: Option<&crate::hooks::HookRunner>` as the last parameter
to the public `agent::run()` (re-exported from `loop_::run`).

This enables library consumers to inject custom HookHandler
implementations (before_tool_call, on_after_tool_call) without
patching the crate. The hooks are threaded through to
`run_tool_call_loop` which already accepts and dispatches them.

All existing call sites pass `None`, preserving backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:19:48 -05:00
argenis de la rosa
fe688d6b1a fix(agent): remove stale loop session imports 2026-02-28 18:18:43 -05:00
argenis de la rosa
b0a3fbd338 test(security): assert /mnt in default forbidden path checks 2026-02-28 18:09:35 -05:00
Antigravity Agent
28b9d81464 security: add /mnt to default forbidden_paths 2026-02-28 18:09:35 -05:00
xj
da54f8f85f fix(config): redact BlueBubbles server_url userinfo in Debug 2026-02-28 14:59:41 -08:00
argenis de la rosa
9ffe9c381b fix(tools): register bg_run tools in runtime registry 2026-02-28 17:54:22 -05:00
Daniel Willitzer
d943f9c28c feat(tools): add bg_run — background tool execution with security hardening
Adds async background tool execution with auto-injection of completed results:
- BgRunTool: Dispatches any tool in background, returns job_id immediately
- BgStatusTool: Queries job status by ID or lists all jobs
- BgJobStore: In-memory job tracking per session
- Auto-injection: Completed jobs appear as <bg_result> XML in agent history

Security hardening (Track C):
- MAX_CONCURRENT_JOBS=5 prevents resource exhaustion
- XML escaping prevents injection attacks in format_bg_result_for_injection
- Recursion guard blocks bg_run spawning itself or bg_status
- Hard 600s timeout per job guaranteed
- One-time delivery prevents duplicate injection
- 5-minute auto-expiry bounds memory growth

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:54:22 -05:00
xj
f2c7498345 Merge remote-tracking branch 'upstream/main' into feat/channel-bluebubbles
# Conflicts:
#	src/channels/mod.rs
2026-02-28 14:52:34 -08:00
Shadman Hossain
d5cea40fed fix(bedrock): auto-refresh AWS credentials before STS token expiry
Add CachedCredentials with 50-minute TTL that transparently refreshes
from the ECS container credential endpoint, env vars, or EC2 IMDS.

- Add from_ecs() to credential resolve chain for ECS/Fargate support
- Move streaming credential fetch into async context for TTL validation
- Remove sync credential fallback (all paths now use TTL-aware cache)
- Double-checked locking prevents thundering herd on refresh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:51:57 -05:00
argenis de la rosa
61d538b6d6 feat(slack): support listening on multiple configured channel IDs 2026-02-28 17:48:20 -05:00
argenis de la rosa
7f645e1a5c Merge remote-tracking branch 'origin/main' into pr2093-mainmerge 2026-02-28 17:43:48 -05:00
argenis de la rosa
c07314bd92 merge(main): resolve #2093 conflicts and restore session build/test parity 2026-02-28 17:42:37 -05:00
argenis de la rosa
e663ad274e fix(acp): harden process lifecycle and health validation 2026-02-28 17:36:39 -05:00
argenis de la rosa
1b8d747e1f fix(acp): stabilize send path, remove unreachable arms, and fix docs tables 2026-02-28 17:36:39 -05:00
feishiheng
579f0f3d9a feat(channels): add comprehensive ACP channel tests and fix implementation bugs (conflict resolution)
- Add 14 test functions for ACP channel (allowlist logic and JSON-RPC structures)
- Fix mutex guard across await in send() method using take() pattern
- Add acp: None default fields to ChannelsConfig in schema.rs
- Integrate ACP channel into channels/mod.rs and collect_configured_channels()
- Update channels-reference.md documentation
- Resolve merge conflicts with upstream/dev

All 17 ACP tests pass successfully.
2026-02-28 17:36:39 -05:00
argenis de la rosa
f7de9cda3a Merge remote-tracking branch 'origin/main' into pr2093-mainmerge 2026-02-28 17:33:17 -05:00
argenis de la rosa
17921f24fc fix(cron): require recurring opt-in for agent cron schedules 2026-02-28 17:25:22 -05:00
argenis de la rosa
9a6d7e03c4 fix(cron): require explicit opt-in for recurring agent jobs 2026-02-28 17:25:22 -05:00
argenis de la rosa
af314611af test(memory): verify cortex bridge failure preserves local sqlite writes 2026-02-28 17:25:03 -05:00
argenis de la rosa
f4d06a3a73 feat(memory): add optional cortex-mem backend profile and bridge 2026-02-28 17:25:03 -05:00
argenis de la rosa
9b9c36e84d test(channels): lock assistant autosave key namespace 2026-02-28 17:24:31 -05:00
argenis de la rosa
6a24f25f91 fix(memory): auto-save assistant responses alongside user messages 2026-02-28 17:24:31 -05:00
maxtongwang
e057e17de5 fix(channel/bluebubbles): register service key + fix pre-existing fmt
- add "channel.bluebubbles" to SUPPORTED_PROXY_SERVICE_KEYS so proxy
  scope = "services" can target BlueBubbles via exact service key
  (addresses final CodeRabbit finding on PR #2271)
- apply cargo fmt to auth_profile.rs and quota_tools.rs (pre-existing
  formatting drift that would block cargo fmt --check in CI)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 13:37:18 -08:00
Preventnetworkhacking
d89e7ab415 fix(utf8): prevent panic on CJK text truncation [CDV-27]
Fix UTF-8 boundary panics in two locations not covered by PR #2154:

1. telegram.rs:3112 - OTP/approval message preview truncation
   - Changed from byte-based `&raw_args[..260]` to char-based truncation
   - Uses existing `truncate_with_ellipsis` utility

2. detection.rs:222 - Tool output hash prefix
   - Changed from `&output[..4096]` to UTF-8-safe boundary
   - Uses existing `floor_utf8_char_boundary` utility

Added test: hash_output_utf8_boundary_safe() verifies no panic on CJK text.

Fixes #2276
2026-02-28 16:35:09 -05:00
argenis de la rosa
df9ebcb3d2 fix(model): resolve provider-aware fallback model IDs 2026-02-28 16:33:04 -05:00
argenis de la rosa
5d248bf6bf fix(build): restore gateway and cursor compile compatibility 2026-02-28 16:32:38 -05:00
argenis de la rosa
9e4ecc0ee6 fix(slack): resolve sender display names with cache 2026-02-28 16:23:45 -05:00
argenis de la rosa
bd0a12ad3c fix(gateway): persist ws chat history by session 2026-02-28 16:23:15 -05:00
argenis de la rosa
a30869112e fix(lark,config): complete feishu dedupe and profile config compatibility 2026-02-28 16:17:24 -05:00
argenis de la rosa
4f32b6d8e4 fix(lark): dedupe ws and webhook events by event key 2026-02-28 16:17:24 -05:00
argenis de la rosa
991955ddce fix(gateway): pass optional session id in github webhook path 2026-02-28 16:01:42 -05:00
argenis de la rosa
4af196ab04 fix(routing): normalize hint whitespace for default_model routes 2026-02-28 16:01:42 -05:00
argenis de la rosa
12018b4a03 fix(provider): include quota metadata in cursor chat response 2026-02-28 16:01:42 -05:00
argenis de la rosa
2d91536f92 feat(routing): support hint default_model during startup 2026-02-28 16:01:42 -05:00
xj
11e68485e9
fix(fmt): correct remaining rustfmt violations on main (#2282)
Fixes formatting in auth_profile.rs and quota_tools.rs missed by #2280.

Co-authored-by: xj <gh-xj@users.noreply.github.com>
2026-02-28 13:01:21 -08:00
maxtongwang
32150c85fb fix(channel/bluebubbles): address CodeRabbit review findings
- typing_handle → typing_handles: per-recipient HashMap to prevent
  concurrent conversations from cancelling each other's typing loops
- add is_sender_ignored() method; enforce ignore_senders before allowlist
  evaluation in parse_webhook_payload (precedence: ignore > allow)
- wire BlueBubblesConfig.password and .webhook_secret into
  decrypt_channel_secrets / encrypt_channel_secrets in config/schema.rs
- add 3 unit tests covering is_sender_ignored edge cases
2026-02-28 12:20:47 -08:00
maxtongwang
e37a53c690
fix(web-fetch): remove dead feature gates and add noise stripping (#2262)
* fix(web-fetch): remove dead feature gates, add noise stripping, add docstrings

The nanohtml2text and fast_html2md providers were both guarded by
cfg(feature) checks for features (web-fetch-plaintext, web-fetch-html2md)
that are never declared in Cargo.toml. This caused every web_fetch call
to silently return an error instead of fetching content.

Changes:
- Add strip_noise_elements() which removes <script>, <style>, <nav>,
  <header>, <footer>, <aside>, <noscript>, <form>, <button> blocks
  before text extraction, eliminating menu/ad/boilerplate noise.
- Fix fast_html2md path: when web-fetch-html2md feature is not compiled
  in, fall through to nanohtml2text rather than returning an error.
- Fix nanohtml2text path: remove dead cfg(feature = "web-fetch-plaintext")
  gate; nanohtml2text is a direct dependency and needs no feature flag.
- Both previously gated tests (html_to_markdown_conversion_preserves_structure,
  html_to_plaintext_conversion_removes_html_tags) are now always-on.
  Added strip_noise_removes_nav_scripts_footer test.
- Add docstrings to all public/private methods to meet coverage threshold.

Tavily and firecrawl providers are unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web-fetch): align default provider to nanohtml2text, remove dead feature

- Change empty-provider default from deprecated 'fast_html2md' to
  'nanohtml2text' to match WEB_FETCH_PROVIDER_HELP and PR description.
- Remove dead 'web-fetch-plaintext' feature from Cargo.toml (no code
  references it after the feature-gate removal).
- Apply cargo fmt to strip_noise_elements array formatting.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: xj <gh-xj@users.noreply.github.com>
2026-02-28 12:19:40 -08:00
maxtongwang
4d195be713 feat(channel): add BlueBubbles iMessage channel
Adds a BlueBubbles channel so ZeroClaw can send and receive iMessages
via a locally-running BlueBubbles server on macOS.

What changed:
- src/channels/bluebubbles.rs — new BlueBubblesChannel implementing Channel
  - Webhook-based ingestion (push, no polling)
  - Allowlist + ignore_senders filtering
  - Rich text via iMessage Private API (attributedBody bold/italic/underline)
  - Typing indicator (start_typing / stop_typing) while LLM processes
  - Message effects ([EFFECT:confetti], [EFFECT:slam], etc.)
  - 500-entry fromMe FIFO cache for reply-context resolution
  - Attachment placeholder format matching OpenClaw (<media:image>)
  - 38 unit tests covering parsing, filtering, timestamps, effects
- src/config/schema.rs — BlueBubblesConfig struct + ChannelsConfig field
  - Fields: server_url, password, allowed_senders, webhook_secret, ignore_senders
  - Debug impl redacts password and webhook_secret
- src/gateway/mod.rs — POST /bluebubbles route + handler
  - Bearer token auth if webhook_secret is set
  - Typing indicator around LLM call
  - Memory auto-save on incoming messages
- src/channels/mod.rs — module + re-export + iMessage delivery instructions
- src/providers/cursor.rs — fix pre-existing missing quota_metadata field

Non-goals: BlueBubbles Private API pairing, polling mode, contact management.

Closes #2268
2026-02-28 12:08:24 -08:00
argenis de la rosa
3825eca3dc fix(memory): thread session IDs through runtime paths 2026-02-28 15:00:27 -05:00
argenis de la rosa
352adb5a82 fix(agent): avoid orphan tool messages after compaction 2026-02-28 14:41:13 -05:00
argenis de la rosa
9784e3bfc1 feat(channel): add github native channel MVP 2026-02-28 14:03:10 -05:00
argenis de la rosa
5aac1af065 feat(channel): support onebot aliases for napcat config 2026-02-28 14:00:35 -05:00
argenis de la rosa
aa319e71b0 test(cli): add coverage for config show/get/set 2026-02-28 14:00:35 -05:00
argenis de la rosa
20ed60d2a0 feat(config): add show/get/set subcommands for runtime config inspection and modification 2026-02-28 14:00:35 -05:00
dexter
f6278373cb
feat: add cursor headless cli support (#2195)
* Initial plan

* feat(providers): add Cursor headless CLI provider

Co-authored-by: langhuihui <3647405+langhuihui@users.noreply.github.com>

* fix(cursor): harden headless CLI invocation and safety guards

* chore(pr): retrigger intake after template and linear updates

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: langhuihui <3647405+langhuihui@users.noreply.github.com>
Co-authored-by: argenis de la rosa <theonlyhennygod@gmail.com>
2026-02-28 13:41:56 -05:00
argenis de la rosa
3f70cbbf9b feat(gateway): add paired devices API and dashboard tab 2026-02-28 13:34:33 -05:00
argenis de la rosa
0253752bc9 feat(memory): add observation memory tool 2026-02-28 13:32:13 -05:00
argenis de la rosa
e3e648eea7 fix(tools): harden pptx_read ordering and extraction limits 2026-02-28 13:29:05 -05:00
argenis de la rosa
5cc482ebe1 fix(pptx_read): handle empty a:t tags safely 2026-02-28 13:29:05 -05:00
reidliu41
cb1cd14cbb feat(tools): add pptx_read tool for PowerPoint text extraction
- Problem: Agent cannot read PPTX files — file_read returns garbled binary, making presentations inaccessible
  - Why it matters: PPTX is the last major Office format gap after pdf_read and docx_read; presentations are ubiquitous in
  business and education workflows
  - What changed: Added pptx_read tool using existing zip + quick-xml to extract plain text from all slides in order
  - What did not change: No changes to existing tools, agent loop, security policy, config schema, or dependencies

  Label Snapshot (required)

  - Risk label: risk: low
  - Size label: size: S
  - Scope labels: tool
  - Module labels: tool: pptx_read

  Change Metadata

  - Change type: feature
  - Primary scope: tool

  Linked Issue

  - Closes #

  Validation Evidence (required)

  cargo fmt --all -- --check   # pass
  cargo clippy --all-targets -- -D warnings   # pass (zero new warnings)
  cargo test pptx_read   # 14/14 passed

  - Evidence provided: test results

  Security Impact (required)

  - New permissions/capabilities? No
  - New external network calls? No
  - Secrets/tokens handling changed? No
  - File system access scope changed? No

  Privacy and Data Hygiene (required)

  - Data-hygiene status: pass
  - Redaction/anonymization notes: Test fixtures use neutral content ("Hello PPTX", "Slide One", "Slide Two")
  - Neutral wording confirmation: Yes

  Compatibility / Migration

  - Backward compatible? Yes
  - Config/env changes? No
  - Migration needed? No

  i18n Follow-Through

  - i18n follow-through triggered? No

  Human Verification (required)

  - Verified scenarios: Multi-slide extraction produces correct ordered text
  - Edge cases checked: invalid ZIP, missing slides, symlink escape, path traversal, rate limiting, truncation
  - What was not verified: encrypted PPTX (out of scope), speaker notes

  Side Effects / Blast Radius (required)

  - Affected subsystems/workflows: Tool registry only
  - Potential unintended effects: None — additive only
  - Guardrails/monitoring: Identical security chain as pdf_read/docx_read

  Rollback Plan (required)

  - Fast rollback command/path: git revert <commit>
  - Feature flags or config toggles: None needed
  - Observable failure symptoms: pptx_read tool missing from tool list

  Risks and Mitigations

  - Risk: None — zero new dependencies, follows established pattern exactly
    - Mitigation: N/A
2026-02-28 13:29:05 -05:00
argenis de la rosa
83f7399c72 fix(copilot): preserve first text while merging split tool calls 2026-02-28 13:29:04 -05:00
Tim Stewart
8b7b0b0776 fix(copilot): merge tool_calls from all response choices
The Copilot API proxy for Claude models (Opus 4.6, Opus 4.6-1m) splits
text content and tool_calls into separate choices. Previously only
choices[0] was read, causing all tool calls to be silently dropped
when they appeared in choices[1].

Merge text and tool_calls from all choices so tool calling works
regardless of how the proxy splits the response.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 13:29:04 -05:00
Argenis
a25ca6524f
feat(skills): support front-matter metadata and always-inject skills (#2248)
* feat(skills): support front matter always injection in compact mode

* chore(pr): retrigger intake after template and linear updates
2026-02-28 13:11:57 -05:00
argenis de la rosa
6500f048bc feat(email): add IMAP ID extension support 2026-02-28 13:05:49 -05:00
argenis de la rosa
cc0bc49b2f feat(channel): add napcat support for qq protocol 2026-02-28 13:02:55 -05:00
Chummy
6e444e0311 fix(zip): adapt test zip writers for zip 8.1 2026-02-28 12:33:32 -05:00
Argenis
db16188c74
Merge pull request #2241 from zeroclaw-labs/supersede-pr-1923-v2-20260228
fix(channel:discord): robust inbound image marker detection
2026-02-28 12:10:41 -05:00
argenis de la rosa
376d965088 Merge remote-tracking branch 'origin/main' into supersede-pr-1923-mergefix 2026-02-28 12:05:28 -05:00
Argenis
2f1380a03f
Merge pull request #2064 from peitschie/fix/cron-matrix-delivery
RMN-218: feat(channels): add matrix integration for sovereign communication
2026-02-28 12:05:26 -05:00
weykon
9ecb8dffa6 feat(memory): add sqlite_journal_mode config for shared filesystem support
SQLite WAL mode requires shared-memory (mmap/shm) which is unavailable
on many network and virtual shared filesystems (NFS, SMB/CIFS,
UTM/VirtioFS, VirtualBox shared folders), causing xShmMap I/O errors
at startup.

Add `sqlite_journal_mode` config option under `[memory]` that accepts
"wal" (default) or "delete". When set to "delete", SQLite uses the
legacy DELETE journal mode and disables mmap, allowing ZeroClaw to run
with workspaces on shared/network filesystems.

Usage:
  [memory]
  sqlite_journal_mode = "delete"

Changes:
- config/schema.rs: Add sqlite_journal_mode field to MemoryConfig
- memory/sqlite.rs: Add with_options() supporting journal mode selection
- memory/mod.rs: Pass journal_mode from config to SqliteMemory
- onboard/wizard.rs: Include new field in default MemoryConfig
2026-02-28 12:04:46 -05:00
loydccc
2044e828de fix(channel): mark discord inbound image attachments as [IMAGE]
# Conflicts:
#	src/channels/discord.rs
2026-02-28 11:57:17 -05:00
argenis de la rosa
b287b2420a fix(cron): avoid merge conflict in matrix scheduler tests 2026-02-28 11:48:22 -05:00
Chummy
3aa1eb1fd5 chore(fmt): normalize rustfmt output to satisfy quality gate 2026-03-01 00:45:18 +08:00
argenis de la rosa
74c8cae95d fix(quota): wire provider quota modules on main replay 2026-02-28 11:45:02 -05:00
ZeroClaw Bot
5ac9c3e955 fix(quota): address CodeRabbit review feedback
- Fix low-quota warning format string readability (parenthesized percentage)
- Add QuotaFormat enum for CLI --format validation (fail-fast on invalid input)
- Fix backoff eviction strategy comments (soonest-to-expire, not LRU)
- Custom Default for ProviderUsageMetrics (last_reset_at = Utc::now())
- Fix fail_count==0 always-fail case in stress test
- Add providers-quota to commands-reference.md
- Document fresh ProviderHealthTracker intent in quota_tools.rs

Made-with: Cursor
2026-02-28 11:45:02 -05:00
ZeroClaw Bot
d5fe47acff feat(tools): wire auth_profile + quota tools into agent loop and persist switch_provider
- Register 4 new tools (ManageAuthProfileTool, CheckProviderQuotaTool,
  SwitchProviderTool, EstimateQuotaCostTool) in all_tools_with_runtime
- SwitchProviderTool now loads config from disk and calls save() to
  persist default_provider/default_model to config.toml
- Inject Provider & Budget Context section into system prompt when
  Config is available
- Remove emoji from tool output for cleaner parsing
- Replace format! push_str with std::fmt::Write for consistency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:45:02 -05:00
ZeroClaw Bot
8c0be20422 feat(providers): add quota_metadata to ChatResponse across all providers
Wire QuotaMetadata into ChatResponse for all provider implementations,
enabling quota tracking data to flow from API responses through the
agent loop to quota monitoring tools.

Depends on: circuit breaker (#1842) + quota monitoring (#1904)

Made-with: Cursor
2026-02-28 11:45:02 -05:00
ZeroClaw Bot
247d89e39e feat(providers): implement quota monitoring system with CLI and agent tools
Add comprehensive quota monitoring: QuotaMetadata types, quota-aware
agent loop with proactive warnings, CLI providers-quota command, and
3 built-in tools (check_provider_quota, switch_provider,
estimate_quota_cost).

Depends on: circuit breaker + provider health (#1842)

Made-with: Cursor
2026-02-28 11:45:02 -05:00
argenis de la rosa
e854238a39 fix(channels): resolve main drift for matrix cron delivery 2026-02-28 11:44:21 -05:00
Chummy
cf59171937 test: align channel context defaults and de-flake proxy assertion 2026-02-28 23:01:53 +08:00
Chummy
a89f5c25be fix: resolve rebase drift in channel approval runtime 2026-02-28 23:01:53 +08:00
Chummy
42471f4d3e fix: restore ws query-token fallback and telegram test fixtures 2026-02-28 23:01:53 +08:00
Chummy
be8f7efe82 test: stabilize flaky threshold assertions 2026-02-28 23:01:53 +08:00
Chummy
5ee6024914 Fix channel turn persistence and low-sensitivity leak detection 2026-02-28 23:01:53 +08:00
argenis de la rosa
4cc156611c fix(channel:discord): robust image marker detection for inbound attachments 2026-02-28 09:56:35 -05:00
Tim Stewart
f1adc79f38 fix(browser): add return before snapshot IIFE in rust_native backend
WebDriver's execute() wraps the script as a function body. The snapshot
script used an IIFE without a top-level return, so the IIFE's return
value was discarded and the WebDriver function returned undefined (null).

All other execute() calls in the file (scroll, scrollIntoView, click)
correctly use explicit return statements.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 09:27:42 -05:00
argenis de la rosa
b9d9798774 fix: resolve compilation errors in channels, tools, and gateway modules 2026-02-28 09:18:30 -05:00
argenis de la rosa
bb25e5fbf6 fix(tests): align channel runtime fixtures for main compatibility 2026-02-28 09:17:35 -05:00
Chummy
5cced82e3f fix(channels): import ApprovalResponse for runtime approval handling 2026-02-28 21:58:52 +08:00
argenis de la rosa
57fd23c381 fix: resolve 3 compilation errors 2026-02-28 08:54:29 -05:00
argenis de la rosa
a029c720a6 feat(security): add safety heartbeat reinjection with cadence fixes 2026-02-28 08:52:16 -05:00
Chummy
3341608d52 fix(channels): remove duplicate perplexity snapshot helper 2026-02-28 21:49:11 +08:00