Commit graph

536 commits

Author SHA1 Message Date
argenis de la rosa
4070131bb8 fix: apply cargo fmt to fix formatting issues
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 05:05:23 -05:00
argenis de la rosa
915ce58a8c fix: add futures dependency and fix stream imports in traits.rs
This commit fixes compilation errors when running tests by:
1. Adding `futures = "0.3"` dependency to Cargo.toml
2. Adding proper import `use futures_util::{stream, StreamExt};`
3. Replacing `futures::stream` with `stream` (using imported module)

The `futures_util` crate already had the `sink` feature but was missing
the stream-related types. Adding the full `futures` crate provides
the complete stream API needed for the streaming chat functionality.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 05:05:23 -05:00
argenis de la rosa
d94e78c621 feat(streaming): add streaming support for LLM responses (fixes #211)
Implement Server-Sent Events (SSE) streaming for OpenAI-compatible providers:

- Add StreamChunk, StreamOptions, and StreamError types to traits module
- Add supports_streaming() and stream_chat_with_system() to Provider trait
- Implement SSE parser for OpenAI streaming responses (data: {...} format)
- Add streaming support to OpenAiCompatibleProvider
- Add streaming support to ReliableProvider with error propagation
- Add futures dependency for async stream support

Features:
- Token-by-token streaming for real-time feedback
- Token counting option (estimated ~4 chars per token)
- Graceful error handling and logging
- Channel-based stream bridging for async compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 05:01:13 -05:00
argenis de la rosa
ccc48824cf security(deps): remove vulnerable xmas-elf dependency via embuild (fixes #399)
Removes the unused "elf" feature from the embuild dependency in
firmware/zeroclaw-esp32/Cargo.toml.

Vulnerability Details:
- Advisory: GHSA-9cc5-2pq7-hfj8
- Package: xmas-elf < 0.10.0
- Severity: Moderate (insufficient bounds checks in HashTable access)

Root Cause:
- The embuild dependency (version < 0.33) relies on xmas-elf ~0.9.1
- The "elf" feature was enabled but not actually used

Fix:
- Removed features = ["elf"] from embuild dependency
- The build.rs only uses embuild::espidf::sysenv, which doesn't require elf
- xmas-elf dependency is now completely eliminated from Cargo.lock

Verification:
- cargo build passes successfully
- grep "xmas-elf" firmware/zeroclaw-esp32/Cargo.lock confirms removal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 05:01:13 -05:00
Chummy
f75f73a50d fix(agent): preserve native tool-call fallbacks and history fidelity 2026-02-17 17:55:38 +08:00
Vernon Stinebaker
f322360248 feat(providers): add native tool-call API support via chat_with_tools
Add chat_with_tools() to the Provider trait with a default fallback to
chat_with_history(). Implement native tool calling in OpenRouterProvider,
reusing existing NativeChatRequest/NativeChatResponse structs. Wire the
agent loop to use native tool calls when the provider supports them,
falling back to XML-based parsing otherwise.

Changes are purely additive to traits.rs and openrouter.rs. The only
deletions (36 lines) are within run_tool_call_loop() in loop_.rs where
the LLM call section was replaced with a branching if/else for native
vs XML tool calling.

Includes 5 new tests covering:
- chat_with_tools error path (missing API key)
- NativeChatResponse deserialization (tool calls only, mixed)
- parse_native_response conversion to ChatResponse
- tools_to_openai_format schema validation
2026-02-17 17:55:38 +08:00
Chummy
a3fc894580 chore(codeowners): co-own ci/cd docs between willsarg and chumyin 2026-02-17 17:50:34 +08:00
Chummy
89d3fcc8f7 chore(codeowners): route security and ci/cd ownership to @willsarg 2026-02-17 17:50:34 +08:00
Chummy
b9e2dae49f feat(doctor): harden provider and workspace diagnostics 2026-02-17 17:20:56 +08:00
stawky
b0d4a1297b feat(doctor): add enhanced diagnostics and config validation
- Expand  with grouped health report output
- Add semantic config checks (provider/model/temp/routes/channels)
- Add workspace checks (existence, write probe, disk availability)
- Preserve daemon/scheduler/channel freshness diagnostics
- Add environment checks (git/curl/shell/home)
- Add unit tests for provider validation and config edge cases

Also fix upstream signature drift to keep build green:
- channels: pass provider_name to agent_turn
- channels: pass workspace_dir to all_tools_with_runtime
- daemon: pass verbose flag to agent::run
2026-02-17 17:20:56 +08:00
Chummy
7ebda43fdd fix(gateway): remove unused prompt bootstrap variables 2026-02-17 17:06:28 +08:00
Chummy
37df8f6b33 style(cron): apply rustfmt ordering for exports 2026-02-17 17:06:28 +08:00
mai1015
0e9852ec06 feat: pass a cloned config to all_tools_with_runtime for improved tool initialization 2026-02-17 17:06:28 +08:00
mai1015
3dc44ae132 feat: add chrono-tz and phf packages for enhanced time zone handling and performance 2026-02-17 17:06:28 +08:00
mai1015
fb2d1cea0b Implement cron job management tools and types
- Added `JobType`, `SessionTarget`, `Schedule`, `DeliveryConfig`, `CronJob`, `CronRun`, and `CronJobPatch` types in `src/cron/types.rs` for cron job configuration and management.
- Introduced `CronAddTool`, `CronListTool`, `CronRemoveTool`, `CronRunTool`, `CronRunsTool`, and `CronUpdateTool` in `src/tools` for adding, listing, removing, running, and updating cron jobs.
- Updated the `run` function in `src/daemon/mod.rs` to conditionally start the scheduler based on the cron configuration.
- Modified command-line argument parsing in `src/lib.rs` and `src/main.rs` to support new cron job commands.
- Enhanced the onboarding wizard in `src/onboard/wizard.rs` to include cron configuration.
- Added tests for cron job tools to ensure functionality and error handling.
2026-02-17 17:06:28 +08:00
Argenis
0ec46ac3d1
feat(build): add release-fast profile for powerful build machines
Added release-fast profile with codegen-units=8 for faster builds on powerful machines.\n\nCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 04:02:52 -05:00
Chummy
3d8ece4c59 test(email): align seen-message tests with HashSet impl 2026-02-17 17:01:05 +08:00
Daniel Willitzer
b38797341b Add comprehensive tests for 16 previously untested modules
- Channels: traits, email_channel (includes lock poisoning fix)
- Tunnel: cloudflare, custom, ngrok, none, tailscale
- Core: doctor, health, integrations, lib, memory/traits
- Providers: openrouter
- Runtime: traits, observability/traits, tools/traits

Test coverage improved from 70/91 (77%) to 86/91 (95%)
All 1272 tests passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:01:05 +08:00
LiWeny16
6a7a914f41 fix: resolve rebase conflicts in config exports 2026-02-17 16:53:56 +08:00
Chummy
abdf99cf8c chore(lint): extend low-risk clippy cleanup batch
- normalize numeric literals (115_200) in hardware/peripheral config paths

- remove test-only useless format! allocations in discord IDs

- simplify closures and auto-deref in browser/http/rag/peripherals

- keep behavior unchanged while reducing warning surface
2026-02-17 16:40:58 +08:00
darwin808
4413790859 chore(lint): remove unused imports, variables, and redundant mut bindings
Eliminate low-risk clippy warnings as part of the strict lint backlog (#409):

- Remove unused `uuid::Uuid` imports from slack and telegram channels
- Remove unnecessary `mut` and redundant rebindings in agent loop
- Prefix unused `channel_id` variable in discord channel
- Remove unused test imports (`ChatResponse`, `ToolCall`, `TempDir`, `Path`)
2026-02-17 16:40:58 +08:00
Chummy
ba287a2ea5 add CLAUDE.md
add CLAUDE.md to better guide users who vibe code with claude code.
2026-02-17 16:19:31 +08:00
Chummy
ffb6a790ef
Merge pull request #495 from zeroclaw-labs/feat/manual-label-governance-dispatch
feat(labels): add manual audit/repair dispatch for managed labels
2026-02-17 16:16:24 +08:00
Chummy
e197cc5b04 fix(onboard,anthropic): stabilize oauth setup-token flow and model defaults
- fix onboard command ownership handling before spawn_blocking

- restore memory helper imports in wizard to resolve build regression

- centralize Anthropic OAuth beta header in apply_auth for all request paths

- correct OpenRouter Anthropic Sonnet 4.5 model ID format

- add regression tests for auth headers and curated model IDs
2026-02-17 16:15:38 +08:00
Pedro
bb6034e765 style(onboard): fix cargo fmt formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:15:38 +08:00
Pedro
045ead628a feat(onboard): add Anthropic OAuth setup-token support and update models
Enable Pro/Max subscription users to authenticate via OAuth setup-tokens
(sk-ant-oat01-*) by sending the required anthropic-beta: oauth-2025-04-20
header alongside Bearer auth. Update curated model list to latest
(Opus 4.6, Sonnet 4.5, Haiku 4.5) and fix Tokio runtime panic in
onboard wizard by wrapping blocking calls in spawn_blocking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:15:38 +08:00
Chummy
86f20818b1 ci(workflows): quote shell vars in update-notice for actionlint 2026-02-17 16:15:04 +08:00
Chummy
271060dcb7 feat(labels): add manual audit/repair dispatch for managed labels 2026-02-17 16:12:52 +08:00
Argenis
2cb02ff946
feat(license): migrate to Apache 2.0 with contributor attribution
Merging Apache 2.0 license migration with contributor attribution.
2026-02-17 02:54:35 -05:00
Chummy
f01d38be35 fix(python): harden zeroclaw-tools CLI and integration ergonomics 2026-02-17 15:52:48 +08:00
ZeroClaw Contributor
e5ef8a3b62 feat(python): add zeroclaw-tools companion package for LangGraph tool calling
- Add Python package with LangGraph-based agent for consistent tool calling
- Provides reliable tool execution for providers with inconsistent native support
- Includes tools: shell, file_read, file_write, web_search, http_request, memory
- Discord bot integration included
- CLI tool for quick interactions
- Works with any OpenAI-compatible provider (Z.AI, OpenRouter, Groq, etc.)

Why: Some LLM providers (e.g., GLM-5/Zhipu) have inconsistent tool calling behavior.
LangGraph's structured approach guarantees reliable tool execution across all providers.
2026-02-17 15:52:48 +08:00
argenis de la rosa
5418f66c0f feat(license): migrate to Apache 2.0 with contributor attribution
- Change license from MIT to Apache 2.0
- Add NOTICE file with full contributor list
- Add automated workflow to keep NOTICE updated weekly
- Update README with Apache 2.0 badge and contributors badge
- Credit author: Argenis Delarosa (theonlyhennygod)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 02:50:06 -05:00
Chummy
bc38994867
Merge pull request #491 from zeroclaw-labs/fix/label-governance-unify
fix(labels): unify issue contributor tiers and label metadata sync
2026-02-17 15:34:27 +08:00
Chummy
26323774e4 fix(labels): unify issue contributor tiers and managed label metadata 2026-02-17 15:32:49 +08:00
Chummy
d7ed5c4187 ci: tighten strict delta matching to changed line ranges 2026-02-17 15:21:55 +08:00
Chummy
b81e4c6c50 ci: add strict delta lint gate for changed rust lines 2026-02-17 15:21:55 +08:00
Chummy
6e855cdcf1 ci: fail docs gate on unclassified markdownlint errors 2026-02-17 15:21:55 +08:00
Chummy
bc3b6c6aee chore(gitignore): ignore python cache artifacts 2026-02-17 15:21:55 +08:00
Chummy
6528613c8d ci: unify rust quality gate and add incremental docs/link checks 2026-02-17 15:21:55 +08:00
Chummy
8a6273b988
Merge pull request #490 from zeroclaw-labs/fix/trusted-contributor-tier
fix(labels): restore trusted contributor tier (>=5)
2026-02-17 15:19:15 +08:00
Chummy
dbb713369c fix(labels): restore trusted contributor tier and keep colors unified 2026-02-17 15:17:49 +08:00
Argenis
d8043f440c
fix(build): reduce codegen-units for low-memory devices
Reduced codegen-units from 8 to 1 in the release profile to prevent OOM compilation failures on low-memory devices like Raspberry Pi 3 (1GB RAM).\n\nCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 02:15:49 -05:00
Chummy
a47c34e3ac
Merge pull request #488 from zeroclaw-labs/fix/unify-contributor-tier-color
fix(labels): unify contributor-tier color to blue
2026-02-17 15:05:37 +08:00
Chummy
de43884e0e fix(labels): unify contributor-tier color to blue across workflows 2026-02-17 15:04:27 +08:00
Will Sarg
aa014ab85b
Devsecops (#481)
* fix(workflows): standardize runner configuration for security jobs

* ci(actionlint): add Blacksmith runner label to config

Add blacksmith-2vcpu-ubuntu-2404 to actionlint self-hosted-runner labels config
to suppress "unknown label" warnings during workflow linting.

This label is used across all workflows after the Blacksmith migration.

* Merge branch 'main' into devsecops

* fix(actionlint): adjust indentation for self-hosted runner labels

* Merge branch 'main' into devsecops

* feat(security): enhance security workflow with CodeQL analysis steps

* Merge branch 'main' into devsecops

* fix(security): update CodeQL action to version 4 for improved analysis

* Merge branch 'main' into devsecops

* fix(security): remove duplicate permissions in security workflow

* fix(security): revert CodeQL action to v3 for stability

The v4 version was causing workflow file validation failures.
Reverting to proven v3 version that is working on main branch.

* fix(security): remove duplicate permissions causing workflow validation failure

The permissions block had duplicate security-events and actions keys,
which caused YAML validation errors and prevented workflow execution.

Fixes: workflow file validation failures on main branch

* Merge remote-tracking branch 'origin/main' into devsecops

* fix(security): remove pull_request trigger to reduce costs

* fix(security): restore PR trigger but skip codeql on PRs

* fix(security): resolve YAML syntax error in security workflow

* refactor(security): split CodeQL into dedicated scheduled workflow

* fix(security): update workflow name to Rust Package Security Audit

* fix(codeql): remove push trigger, keep schedule and on-demand only

* feat(codeql): add CodeQL configuration file to ignore specific paths

* Merge branch 'main' into devsecops

* Merge branch 'main' into devsecops

* Potential fix for code scanning alert no. 39: Hard-coded cryptographic value

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-17 00:16:23 -05:00
Will Sarg
c4564ed4ca
Standardize security workflow and enhance CodeQL analysis (#479)
* fix(workflows): standardize runner configuration for security jobs

* ci(actionlint): add Blacksmith runner label to config

Add blacksmith-2vcpu-ubuntu-2404 to actionlint self-hosted-runner labels config
to suppress "unknown label" warnings during workflow linting.

This label is used across all workflows after the Blacksmith migration.

* fix(actionlint): adjust indentation for self-hosted runner labels

* feat(security): enhance security workflow with CodeQL analysis steps

* fix(security): update CodeQL action to version 4 for improved analysis

* fix(security): remove duplicate permissions in security workflow

* fix(security): revert CodeQL action to v3 for stability

The v4 version was causing workflow file validation failures.
Reverting to proven v3 version that is working on main branch.

* fix(security): remove duplicate permissions causing workflow validation failure

The permissions block had duplicate security-events and actions keys,
which caused YAML validation errors and prevented workflow execution.

Fixes: workflow file validation failures on main branch

* fix(security): remove pull_request trigger to reduce costs

* fix(security): restore PR trigger but skip codeql on PRs

* fix(security): resolve YAML syntax error in security workflow

* refactor(security): split CodeQL into dedicated scheduled workflow

* fix(security): update workflow name to Rust Package Security Audit

* fix(codeql): remove push trigger, keep schedule and on-demand only

* feat(codeql): add CodeQL configuration file to ignore specific paths
2026-02-17 00:10:46 -05:00
Will Sarg
1e6f386a97
Standardize security workflow and enhance CodeQL analysis (#477)
* fix(workflows): standardize runner configuration for security jobs

* ci(actionlint): add Blacksmith runner label to config

Add blacksmith-2vcpu-ubuntu-2404 to actionlint self-hosted-runner labels config
to suppress "unknown label" warnings during workflow linting.

This label is used across all workflows after the Blacksmith migration.

* fix(actionlint): adjust indentation for self-hosted runner labels

* feat(security): enhance security workflow with CodeQL analysis steps

* fix(security): update CodeQL action to version 4 for improved analysis

* fix(security): remove duplicate permissions in security workflow

* fix(security): revert CodeQL action to v3 for stability

The v4 version was causing workflow file validation failures.
Reverting to proven v3 version that is working on main branch.

* fix(security): remove pull_request trigger to reduce costs

* fix(security): restore PR trigger but skip codeql on PRs

* fix(security): resolve YAML syntax error in security workflow

* refactor(security): split CodeQL into dedicated scheduled workflow

* fix(security): update workflow name to Rust Package Security Audit

* fix(codeql): remove push trigger, keep schedule and on-demand only
2026-02-16 23:57:59 -05:00
Will Sarg
6b5307214f
fix(security): remove duplicate permissions causing workflow validation failure (#475)
The permissions block had duplicate security-events and actions keys,
which caused YAML validation errors and prevented workflow execution.

Fixes: workflow file validation failures on main branch
2026-02-16 23:36:00 -05:00
Will Sarg
ccccf3b7ea
Standardize security workflow and enhance CodeQL analysis (#474)
* fix(workflows): standardize runner configuration for security jobs

* ci(actionlint): add Blacksmith runner label to config

Add blacksmith-2vcpu-ubuntu-2404 to actionlint self-hosted-runner labels config
to suppress "unknown label" warnings during workflow linting.

This label is used across all workflows after the Blacksmith migration.

* fix(actionlint): adjust indentation for self-hosted runner labels

* feat(security): enhance security workflow with CodeQL analysis steps

* fix(security): update CodeQL action to version 4 for improved analysis

* fix(security): remove duplicate permissions in security workflow
2026-02-16 23:28:30 -05:00
Will Sarg
6fb64d2022
Standardize security workflow and enhance CodeQL analysis (#473)
* fix(workflows): standardize runner configuration for security jobs

* ci(actionlint): add Blacksmith runner label to config

Add blacksmith-2vcpu-ubuntu-2404 to actionlint self-hosted-runner labels config
to suppress "unknown label" warnings during workflow linting.

This label is used across all workflows after the Blacksmith migration.

* Merge branch 'main' into devsecops

* fix(actionlint): adjust indentation for self-hosted runner labels

* Merge branch 'main' into devsecops

* feat(security): enhance security workflow with CodeQL analysis steps

* Merge branch 'main' into devsecops

* fix(security): update CodeQL action to version 4 for improved analysis

* Merge branch 'main' into devsecops
2026-02-16 23:25:57 -05:00