Commit Graph

1740 Commits

Author SHA1 Message Date
Argenis
6ca4690e89
fix(channels): surface visible warning when whatsapp-web feature is missing (#3629)
The WhatsApp Web QR code was not shown during onboarding channel launch
because the wizard allowed configuring WhatsApp Web mode even when the
binary was built without the `whatsapp-web` feature flag. At runtime,
the channel was silently skipped with only a tracing::warn that most
users never see.

- Add compile-time warning in the onboarding wizard when WhatsApp Web
  mode is selected but the feature is not compiled in
- Add eprintln! in collect_configured_channels so users see a visible
  terminal warning when the feature is missing at startup

Closes #3577
2026-03-24 15:16:05 +03:00
Giulio V
429e2bc71e
feat(hands): add autonomous knowledge-accumulating agent packages (#3603)
Introduce the Hands system — autonomous agent packages that run on
schedules and accumulate knowledge over time. Each Hand maintains a
rolling context of findings across runs so the agent grows smarter
with every execution.

This PR adds:
- Hand definition type (TOML-deserializable, reuses cron Schedule)
- HandRun / HandRunStatus for execution records
- HandContext for rolling cross-run knowledge accumulation
- File-based persistence (load/save context as JSON)
- Directory-based Hand loading from ~/.zeroclaw/hands/*.toml
- 20 unit tests covering deserialization, persistence roundtrip,
  history capping, fact deduplication, and error handling

Execution integration with the agent loop is deferred to a follow-up.
2026-03-24 15:16:05 +03:00
argenis de la rosa
573db4df26
chore: bump version to v0.3.4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:05 +03:00
Alix-007
6b260802cb
fix(python): point docs URL at master branch (#3334)
Co-authored-by: Alix-007 <Alix-007@users.noreply.github.com>
2026-03-24 15:16:05 +03:00
argenis de la rosa
25f261501a
feat(swarm): multi-agent swarm orchestration, Mistral tool fix, restore --interactive
- Add SwarmTool with sequential (pipeline), parallel (fan-out/fan-in),
  and router (LLM-selected) strategies for multi-agent workflows
- Add SwarmConfig and SwarmStrategy to config schema
- Fix Mistral 422 error by adding skip_serializing_if to ToolCall
  compat fields (name, arguments, parameters, kind) — Fixes #3572
- Restore `zeroclaw onboard --interactive` flag with run_wizard
  routing and mutual-exclusion validation — Fixes #3573
- 20 new swarm tests, 2 serialization tests, 1 CLI test, config tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:05 +03:00
simianastronaut
f9f9cc6b4a
fix(provider): use incremental SSE stream reading for openai-codex responses
Replace full-body buffering (`response.text().await`) in
`decode_responses_body()` with incremental `bytes_stream()` chunk
processing.  The previous approach held the HTTP connection open until
every byte had arrived; on high-latency links the long-lived connection
would frequently drop mid-read, producing the "error decoding response
body" failure on the first attempt (succeeding only after retry).

Reading chunks incrementally lets each network segment complete within
its own timeout window, eliminating the systematic first-attempt failure.

Closes #3544

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:16:05 +03:00
simianastronaut
09ca915927
fix(security): let explicit allowed_commands bypass high-risk block
When `block_high_risk_commands = true`, commands like `curl` and `wget`
were unconditionally blocked even if explicitly listed in
`allowed_commands`. This made it impossible to use legitimate API calls
in full autonomy mode.

Now, if a command is explicitly named in `allowed_commands` (not via
the wildcard `*`), it is exempt from the `block_high_risk_commands`
gate. The wildcard entry intentionally does NOT grant this exemption,
preserving the safety net for broad allowlists.

Other security gates (supervised-mode approval, rate limiting, path
policy, argument validation) remain fully enforced.

Closes #3567

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:16:04 +03:00
simianastronaut
cdec7c8310
fix(channels): use canonical IMAGE marker in Matrix channel
Matrix image messages used lowercase `[image: ...]` format instead of
the canonical `[IMAGE:...]` marker used by all other channels (Telegram,
Slack, Discord, QQ, LinQ). This caused Matrix image attachments to
bypass the multimodal vision pipeline which looks for `[IMAGE:...]`.

Closes #3486

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:16:04 +03:00
simianastronaut
0f4a878b7e
fix(agent): use char-boundary-safe slicing to prevent CJK text panic
Replace unsafe byte-index string slicing (`&text[..N]`) with
char-boundary-safe alternatives in memory consolidation and security
redaction to prevent panics when multi-byte UTF-8 characters (e.g.
Chinese/Japanese/Korean) span the slice boundary.

Fixes the same class of bug as the prior fix in `execute_one_tool`
(commit 8fcbb6eb), applied to two remaining instances:
- `src/memory/consolidation.rs`: truncation at byte 4000 and 200
- `src/security/mod.rs`: `redact()` prefix at byte 4

Adds regression tests with CJK input for both locations.

Closes #3533

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:16:04 +03:00
simianastronaut
8e204b1f9b
fix(cron): add --agent flag to CLI cron commands to bypass shell security validation
The CLI `cron add` command always routed the second positional argument
through shell security policy validation, which blocked natural language
prompts like "Check server health: disk space, memory, CPU load". This
adds an `--agent` flag to `cron add`, `cron add-at`, `cron add-every`,
and `cron once` so that natural language prompts are correctly stored as
agent jobs without shell command validation.

Closes #3563

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:16:04 +03:00
simianastronaut
53144beeea
feat(tool): add allow_private_hosts option to http_request tool (#3568)
The http_request tool unconditionally blocked all private/LAN hosts with
no opt-out, preventing legitimate use cases like calling a local Home
Assistant instance or internal APIs. This adds an `allow_private_hosts`
config flag (default: false) under `[http_request]` that, when set to
true, skips the private-host SSRF check while still enforcing the domain
allowlist.

Closes #3568

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:16:04 +03:00
argenis de la rosa
17f8238d5a
chore: bump version to v0.3.3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:04 +03:00
Argenis
ed305dc395
feat(context): token-based compaction, persistent sessions, and LLM consolidation (#3574)
Comprehensive long-running context upgrades:

- Token-based compaction: replace message-count trigger with token
  estimation (~4 chars/token). Compaction fires when estimated tokens
  exceed max_context_tokens (default 32K) OR message count exceeds
  max_history_messages. Cuts at user-turn boundaries only.

- Persistent sessions: JSONL append-only session files per channel
  sender in {workspace}/sessions/. Sessions survive daemon restarts.
  Hydrates in-memory history from disk on startup.

- LLM-driven memory consolidation: two-phase extraction after each
  conversation turn. Phase 1 writes a timestamped history entry (Daily).
  Phase 2 extracts new facts/preferences to Core memory (if any).
  Replaces raw message auto-save with semantic extraction.

- New config fields: agent.max_context_tokens (32000),
  channels_config.session_persistence (true).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:03 +03:00
Argenis
00087633cc
chore: bump version to v0.3.2 (#3564)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:03 +03:00
Argenis
5bf509c5c9
feat(heartbeat): two-phase execution, structured tasks, and auto-routing (#3562)
Upgrade heartbeat system with 4 key improvements:

- Two-phase heartbeat: Phase 1 asks LLM "skip or run?" to save API cost
  on quiet periods. Phase 2 executes only selected tasks.
- Structured task format: `- [priority|status] task text` with
  high/medium/low priority and active/paused/completed status.
- Decision intelligence: LLM-driven smart filtering via structured prompt
  at temperature 0.0 for deterministic decisions.
- Delivery routing: auto-detect best configured channel when no explicit
  target is set (telegram > discord > slack > mattermost).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:03 +03:00
argenis de la rosa
ce78f16e68
chore: add .wrangler/ to gitignore and clean up stale files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:03 +03:00
argenis de la rosa
5bb20ba0bf
test: add Termux release validation script
Validates the aarch64-linux-android release artifact: download, archive
integrity, ELF format, architecture, checksum, and install.sh detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:03 +03:00
Argenis
787d0df2b6
chore(ci): remove sync-readme workflow and script (#3535)
The auto-generated What's New and Recent Contributors README sections
have been removed, so the sync-readme workflow and its backing script
are no longer needed.
2026-03-24 15:16:03 +03:00
Argenis
c8f04ec0e7
docs(readme): remove stale What's New and Contributors sections (#3534)
Clear auto-generated sections so they repopulate correctly on the next
release via sync-readme workflow.
2026-03-24 15:16:03 +03:00
Argenis
af53de71df
fix(install): clean up stale cargo tracking from old package name (#3532)
When the crate was renamed from `zeroclaw` to `zeroclawlabs`, users who
installed via install.sh (which uses `cargo install --path`) had the
binary tracked under the old package name. Later running
`cargo install zeroclawlabs` from crates.io fails with:

  error: binary `zeroclaw` already exists as part of `zeroclaw v0.1.9`

The installer now detects and removes stale tracking for the old
`zeroclaw` package name before installing, so both install.sh and
`cargo install zeroclawlabs` work cleanly for upgrades.
2026-03-24 15:16:02 +03:00
Argenis
dbfe347c44
fix(ci): sync tweet and README after all release artifacts are published (#3531)
The tweet was firing on `release: published` immediately when the GitHub
Release was created, but Docker push, crates.io publish, and website
redeploy were still in-flight. This meant users saw the tweet before
they could actually pull the new Docker image or install from crates.io.

Convert tweet-release.yml and sync-readme.yml to reusable workflows
(workflow_call) and call them as the final jobs in both release
pipelines, gated on completion of docker, crates-io, and
redeploy-website jobs.

Before: gh release create → tweet fires immediately (race condition)
After:  gh release create → docker + crates + website → tweet + readme
2026-03-24 15:16:02 +03:00
ZeroClaw Bot
92a373e0c0
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:16:02 +03:00
ZeroClaw Bot
ba005d8c40
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:16:02 +03:00
argenis de la rosa
9388132750
chore: bump version to v0.3.1
Patch release for Termux/Android support. Corrects from v0.4.0 to v0.3.1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:02 +03:00
argenis de la rosa
a472c0edee
chore: bump version to v0.4.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:02 +03:00
argenis de la rosa
423b45e87c
feat(ci): add Termux (aarch64-linux-android) release target
Add prebuilt binary support for Termux/Android devices:
- Add aarch64-linux-android to stable and beta release matrices with NDK setup
- Detect Termux in install.sh and map to the correct android target
- Add Termux pkg manager support for system dependency installation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:01 +03:00
ZeroClaw Bot
343bf5af88
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:16:01 +03:00
ZeroClaw Bot
583c3e6514
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:16:01 +03:00
Argenis
ef46ee8d22
fix(docs): remove stale onboarding flags after CLI changes (#3516)
Remove references to --interactive, --security-level, and --onboard
flags that no longer exist in the CLI. Update examples to use current
supported flags.

Closes #3484
2026-03-24 15:16:01 +03:00
Argenis
c7036d70ef
fix(provider): skip empty text content blocks in Anthropic API requests (#3515)
Filter out empty/whitespace-only text content blocks from assistant,
tool, and user messages before sending to the Anthropic API.

Closes #3483
2026-03-24 15:16:01 +03:00
Argenis
7eb86be726
fix(install): avoid /dev/stdin file redirect in guided installer (#3514)
Probe /dev/stdin readability before selecting it, and add /proc/self/fd/0
as a fallback for constrained containers where /dev/stdin is inaccessible.

Closes #3482
2026-03-24 15:16:01 +03:00
ZeroClaw Bot
9a634e64eb
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:16:00 +03:00
ZeroClaw Bot
8fdd5239ea
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:16:00 +03:00
Argenis
c9cc3236c9
fix: increase recursion limit for matrix-sdk 0.16 on Rust 1.94+ (#3512)
matrix-sdk 0.16 generates deeply nested types that exceed the default
recursion limit (128) on newer Rust compilers. Bump to 256.

Closes #3468
2026-03-24 15:16:00 +03:00
Argenis
8c0b491f33
fix: wire Signal channel into scheduled announcement delivery (#3511)
Add SignalChannel import and match arm in deliver_announcement() so
cron jobs with delivery.channel = "signal" are handled instead of
rejected as unsupported.

Closes #3476
2026-03-24 15:16:00 +03:00
Argenis
d42bd26fe7
fix: resolve web dashboard 404 on static assets and SPA fallback (#3510)
* fix: resolve web dashboard 404 on static assets and SPA fallback

Strip leading slash from asset paths after prefix removal so rust-embed
can find the files. Return 503 with a helpful build hint when index.html
is missing instead of a generic 404.

Closes #3508

* fix: return concrete Response type to fix match arm type mismatch
2026-03-24 15:16:00 +03:00
ZeroClaw Bot
43a959ea18
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:16:00 +03:00
Argenis
a8a3b42837
chore: bump version to v0.3.0 (#3509)
Milestone release covering:
- Comprehensive channel matrix test suite (50 tests across 16 platforms)
- Auto-synced README What's New and Contributors across 31 locales
- Anthropic consecutive message merging fix
- Nextcloud Talk Create event support
- Tweet content-hash dedup
- CI/CD stability improvements (Docker timeout, release token, tweet URLs)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:00 +03:00
ZeroClaw Bot
c4e909f357
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:15:59 +03:00
Argenis
3f7e4208f4
feat(channels): comprehensive channel matrix tests + v0.2.2 (#3507)
* feat(channels): add comprehensive channel matrix tests and bump to v0.2.2

Add 50 integration tests covering the full Channel trait contract across
all 16 platforms: identity semantics, threading, draft lifecycle, reactions,
pinning, concurrency, edge cases, and cross-channel routing. Bump version
to 0.2.2.

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

* style: fix rustfmt formatting in channel matrix tests

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

* fix(lint): remove empty line after doc comment in channel matrix tests

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:15:59 +03:00
ZeroClaw Bot
1a8694d291
docs(readme): auto-sync What's New and Contributors 2026-03-24 15:15:59 +03:00
Argenis
f0b4702fd9
feat(ci): auto-sync README What's New and Contributors on release (#3505)
* feat(ci): auto-sync README What's New and Contributors on release

Replace hardcoded What's New (v0.1.9b) and Recent Contributors sections
with marker-based auto-sync powered by a new GitHub Actions workflow.
The sync-readme workflow runs on each release and updates both sections
from git history.

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

* feat(ci): auto-sync What's New and Contributors across all 31 READMEs

Add marker comments to all 30 translated README files and update the
sync script to process all README*.md files on each release. Fix regex
to handle empty markers on first run.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:15:59 +03:00
Argenis
26ecb5a2a2
fix(anthropic): merge consecutive same-role messages to prevent 500 errors (#3501)
When multiple tool calls execute in a single turn, each tool result was
emitted as a separate role="user" message. Anthropic's API rejects
adjacent messages with the same role, and newer models like
claude-sonnet-4-6 respond with 500 Internal Server Error instead of a
descriptive 400.

Merge consecutive same-role messages in convert_messages() so that
multiple tool_result blocks are combined into one user message, and
consecutive user/assistant messages are also properly coalesced.

Fixes #3493
2026-03-24 15:15:59 +03:00
argenis de la rosa
c97ed375bf
fix(ci): bump Docker timeout to 60m and skip duplicate crates.io publish
Multi-platform Docker builds (linux/amd64 + linux/arm64) with fat LTO
and codegen-units=1 consistently exceed 30 minutes. Bump to 60m.

Also skip crates.io publish when the version already exists (the
auto-sync workflow may have published it before the stable release
runs).
2026-03-24 15:15:59 +03:00
Argenis
2880ad5a69
fix(nextcloud_talk): accept "Create" event type for new messages (#3500)
Nextcloud Talk bot webhooks send event type "Create" for new chat
messages, but the parser only accepted "message". This caused all
valid messages to be skipped with "skipping non-message event: Create".

Accept both "message" and "Create" as valid event types.

Closes #3491
2026-03-24 15:15:58 +03:00
Argenis
b69efd1577
fix(tweet): add content-hash dedup to prevent duplicate tweets (#3499)
Uses GitHub Actions cache with SHA-256 hash of tweet content. If the
exact same tweet text was already posted in a previous run, the tweet
is skipped with a warning. Works for both auto-release and manual
dispatch tweets.

Three-layer dedup:
1. feat() commit check — skip if no new features since last release
2. Content hash — skip if identical tweet already posted (cache hit)
3. Beta-to-beta diff — only new features since previous release tag

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:15:58 +03:00
argenis de la rosa
f2d55f8e3b
fix(ci): preserve release URL in tweets instead of truncating it
The 280-char truncation was blindly chopping the tweet text, cutting
off the GitHub release URL. Now we extract the URL first, truncate
only the body text to fit (accounting for X's 23-char t.co counting),
then re-append the full URL so it always renders correctly.
2026-03-24 15:15:58 +03:00
argenis de la rosa
b058d77a6a
fix(ci): use RELEASE_TOKEN for stable release creation
GITHUB_TOKEN lacks permission to create tags, causing 'Published
releases must have a valid tag' errors. Use RELEASE_TOKEN (same PAT
the beta workflow uses successfully).
2026-03-24 15:15:58 +03:00
argenis de la rosa
c877259727
fix: add dummy src/lib.rs in Dockerfile for dep caching stage 2026-03-24 15:15:58 +03:00
argenis de la rosa
43b0615f16
feat: auto-sync crates.io on version bump
Triggers on push to master when Cargo.toml changes. Detects version
bumps by comparing current vs previous commit, checks crates.io to
avoid duplicate publishes, then publishes automatically.
2026-03-24 15:15:58 +03:00