Commit Graph
1757 Commits
Author SHA1 Message Date
clawdbot 590f5a2e09 fix(clippy): resolve new lint violations in trident, compact, and claw-rag-service
- runtime/trident.rs: derive Default, fix for_kv_map, if_same_then_else, extend_with_drain, unnecessary_cast, needless_borrows
- runtime/compact.rs: fix useless_borrows_in_formatting
- claw-rag-service/ingest.rs: remove unnecessary into_iter()
- claw-rag-service/db.rs: use as_chunks instead of chunks_exact, remove unused import

All tests pass (1014 Rust + 47 Python tests verified).
2026-10-12 23:01:12 +00:00
TheArchitectit 0403fe8867 fix(cli): order parallel tool results by call index and cap fan-out
execute_batch already keyed results to original call slots; this makes
that airtight: panicking worker threads resolve to their own index via
a fallback tuple instead of colliding with slot 0, and results are
asserted to follow call order with a regression test that mixes a
workspace-escape read among valid reads at cap=2.

Adds the fan-out bound: parallel-safe calls run in waves of at most
maxParallelToolCalls (default 8, CLAWD_PARALLEL_TOOL_CALLS env, or the
new setting applied via with_max_parallel_tool_calls at runtime build).
Sequential behavior is preserved: allowed_tools checks still run
before dispatch, and ToolSearch stays off the parallel path.
2026-10-12 23:01:12 +00:00
TheArchitectit 407f0be972 feat(teams): bound per-team sub-agent concurrency with AgentGate
TeamCreate resolves maxConcurrentAgents from the per-team input, then
the maxConcurrentAgents setting, then unlimited (pre-fix behavior).
The cap is persisted in the manifest and registered on a process-wide
gate; agent threads still spawn immediately but block on an RAII slot
before entering their run loop, so manifest/task-claim semantics are
unchanged. TeamDelete forgets the gate so queued agents drain and no
stale team entries accumulate. Includes a gate regression test.
2026-10-12 23:01:12 +00:00
TheArchitectit 98c45990db feat(config): parse maxParallelToolCalls and maxConcurrentAgents settings
Adds optional positive-integer parsing for the two new fan-out caps
next to subagentModel, in both camelCase and snake_case forms. Zero
parses as unset; non-numeric values are a named config error. Covered
by three regression tests mirroring the subagentModel test style.
2026-10-12 23:01:12 +00:00
TheArchitectitandClaw beb5595551 fix: restore workspace unsafe_code=forbid, fix TaskClaim TOCTOU, remove TUI deps
Review fixes for PR #3250:

1. Restore workspace-level unsafe_code = "forbid" (was downgraded to
   "warn" for TUI support). The per-crate [lints.rust] unsafe_code =
   "allow" on rusty-claude-cli already overrides it where needed.

2. Fix TaskClaim TOCTOU race in claim_task(). Replace exists()-then-write
   with OpenOptions::create_new(true) which atomically fails if the lock
   file already exists, eliminating the race window between the check and
   the write.

3. Remove TUI scaffolding deps (ratatui, tui-textarea, gag, crossbeam-channel,
   libc, unicode-width) and the /tui slash command spec — these belong in
   a future TUI PR and are unused in the current source.

Also updates the provider chain precedence test to reflect the new behavior
where the caller's resolved model is the chain primary.

Co-Authored-By: Claw <noreply@openclaw.ai>
2026-10-12 23:01:12 +00:00
TheArchitectit 05fb4d5f2f test: add subagentModel accessor chain tests
Adds 3 unit tests covering the original silent-drop bug:
- camelCase 'subagentModel' key reads end-to-end
- snake_case 'subagent_model' key reads end-to-end
- blank value returns None (falls back to default model)

Requested by @1716775457damn in PR review.
2026-10-12 23:01:12 +00:00
TheArchitectit c6820b8f2f fix: model_token_limit catch-all returns None for unknown models
Restores the fix from @Offwhite-Del that was lost during rebase.
Unknown models now return None so preflight skips the context-window
check and lets the API enforce its own limits.
2026-10-12 23:01:12 +00:00
TheArchitectit 1e96b1643a cargo fmt 2026-10-12 23:00:54 +00:00
TheArchitectitandClaude Fable 5 53b3e63d99 feat(team): team enhancements, subagentModel, parallel tool exec
Port the agent-team enhancement layer onto upstream/main so the model
can spin up coordinated sub-agent teams for parallel work.

subagentModel config wiring (fix):
- Add subagent_model field to RuntimeFeatureConfig + RuntimeConfig::subagent_model()
  accessor so the subagentModel setting (already validated by config_validate.rs)
  is now actually read and stored.
- Agent tool's resolve_agent_model falls back to subagentModel from config
  when no explicit model is passed.

Provider namespace separation:
- New 'custom-openai' provider kind with dedicated env vars
  (CLAWCUSTOMOPENAI_API_KEY / CLAWCUSTOMOPENAI_BASE_URL)
- /setup wizard saves kind: 'custom-openai' for option 5
- Bare model name normalized to 'custom/' prefix to avoid proxy 404s
- Sub-agents inherit /setup-saved provider config via inject_config_as_env_fallbacks

Parallel tool execution:
- Override execute_batch to classify read-only tools as parallel-safe
  and run them concurrently via std::thread::scope
- Results return in original model order

Team coordination layer:
- AgentMessage, TaskClaim, TeamStatus tools + shared mailbox directory
- Mode presets (tiny/1x ... mega/6x) + enriched TeamCreate/Agent descriptions
- Background team watcher
- /team slash command: on/off/status/toggle

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-12 23:00:40 +00:00
bellmanandOmX 0cf2c751a6 Document provider compatibility diagnostics and passthrough
Explain the provider compatibility behavior that now has executable coverage so future changes preserve routing, custom gateway slugs, diagnostics, and extra-body passthrough semantics.

Constraint: Task 2 requires docs/status evidence while leader owns Ultragoal checkpoints and .omx/ultragoal remains untouched.
Rejected: Add a new CLI status command | broader than the assigned provider compatibility documentation/status surface.
Confidence: high
Scope-risk: narrow
Directive: Keep docs aligned with provider_diagnostics_for_model, MessageRequest::extra_body, and OpenAI-compatible slash-model tests.
Tested: cargo test --manifest-path rust/Cargo.toml -p api custom_openai_gateway_preserves_slash_model_ids_and_extra_body_params; cargo test --manifest-path rust/Cargo.toml -p api provider_diagnostics_explain_openai_compatible_capabilities; cargo check --manifest-path rust/Cargo.toml -p api
Not-tested: Live provider calls requiring external credentials.
Co-authored-by: OmX <omx@local>
2026-10-12 22:59:26 +00:00
bellmanandOmX 22b30c4557 Keep G007 mock parity references executable
The follow-up docs gate needed the parity manifest reference string that the mock parity diff checker requires, so this records the verified map-only repair after leader integration.

Constraint: Task 11 scope allowed only PARITY.md, rust/MOCK_PARITY_HARNESS.md, and docs/g007-plugin-mcp-verification-map.md; only PARITY.md needed a change.

Rejected: Editing harness code or .omx/ultragoal | checks proved the remaining gap was docs-map text only and Ultragoal state is leader-owned.

Confidence: high

Scope-risk: narrow

Directive: Keep auto_compact_triggered parity_refs synchronized with PARITY.md when mock parity scenarios change.

Tested: cd rust && python3 scripts/run_mock_parity_diff.py; python3 scripts/validate_cc2_board.py --board .omx/cc2/board.json; rg -n auto_compact_triggered token_cost_reporting auto_compaction threshold from env G007 Plugin/MCP G007-plugin-mcp 12 scripted scenarios 21 captured PARITY.md rust/MOCK_PARITY_HARNESS.md docs/g007-plugin-mcp-verification-map.md; git diff --check

Not-tested: Full workspace suite; Task 11 was a docs/parity-map follow-up with focused executable map validation.

Co-authored-by: OmX <omx@oh-my-codex.dev>
2026-10-12 22:59:26 +00:00
bellmanandOmX 5f08341d1a Document G007 mock parity verification boundaries
Record the W4 verification map and parity-doc alignment so plugin/MCP lifecycle mock coverage can be audited without scraping stale harness prose.

Constraint: Task 9 owns mock integration and regression verification/docs mapping, not parser fixes or leader-owned Ultragoal state.

Rejected: Editing .omx/ultragoal or duplicating Worker-4 plugin command fallthrough fixes | leader checkpointing and parser implementation are separate lanes.

Confidence: high

Scope-risk: narrow

Directive: Keep rust/mock_parity_scenarios.json, rust/MOCK_PARITY_HARNESS.md, PARITY.md, and mock_parity_harness.rs aligned when adding scenarios.

Tested: cd rust && python3 scripts/run_mock_parity_diff.py --no-run; cd rust && ./scripts/run_mock_parity_harness.sh; cd rust && python3 scripts/run_mock_parity_diff.py; cargo test --manifest-path rust/Cargo.toml -p rusty-claude-cli build_runtime_plugin_state -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p rusty-claude-cli build_runtime_runs_plugin_lifecycle_init_and_shutdown -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p plugins plugin_registry_runs_initialize_and_shutdown_for_enabled_plugins -- --nocapture; cargo fmt --manifest-path rust/Cargo.toml --all -- --check; cargo check --manifest-path rust/Cargo.toml -p rusty-claude-cli -p mock-anthropic-service; git diff --check

Not-tested: Full workspace test suite; W4 scope is docs/mock verification map and focused plugin/MCP lifecycle regression evidence.

Co-authored-by: OmX <omx@oh-my-codex.dev>
2026-10-12 22:59:26 +00:00
Bellman 95f797f5e2 Merge pull request #3316 from ultraworkers/fix/release-sha256-macos
fix(ci): use cross-platform sha256 for macOS and Linux release artifacts
v0.1.3
2026-10-13 07:32:17 +09:00
clawdbot ff515c9aeb fix(ci): use cross-platform sha256 for macOS and Linux release artifacts 2026-10-12 22:29:43 +00:00
Bellmanandclawdbot 0f1a69659c chore: remove accidentally committed .gjc session state and ignore .gjc/ (#3315)
Co-authored-by: clawdbot <clawdbot@ultraworkers.dev>
2026-10-13 07:22:41 +09:00
990cc33c19 test(runtime): expand json module unit tests [formatting fix] (#3308)
* test(runtime): expand json module unit tests

The hand-rolled JsonValue parser/renderer in runtime had only two
tests covering a self-contained JSON parser, renderer, accessor set,
and error type. Add focused unit tests covering primitive rendering,
sorted object keys, escape handling (quotes, backslashes, control
chars), signed-integer and whitespace-tolerant parsing, nested
structures, render->parse round-tripping, malformed-input rejection,
i64 overflow rejection, accessor variant mismatches, and JsonError
Display.

* style: format json.rs tests to match rustfmt standards

---------

Co-authored-by: 黄云龙 <76432572+nankingjing@users.noreply.github.com>
Co-authored-by: gaebal-gajae <clawdbot@users.noreply.github.com>
2026-10-13 07:22:31 +09:00
黄云龙 8d2c7b78b2 refactor(cli): let the emitter report the output tail it leaves behind (#3304)
refactor(cli): let the emitter report the output tail it leaves behind

Two places believed they owned terminal output: consume_stream streams
assistant deltas live while emit_output = true, and run_turn decided
whether to emit a separating newline before spinner.finish by guessing
from final_assistant_text(&summary).

That guess agrees with reality only because every *other* writer happens to
terminate its output with a newline — tool results go through
stream_markdown (which appends one), thinking summaries are written with a
trailing newline, and tool-call headers use writeln! — so the assistant
text path is the only one that can leave a partial line. That is a property
of the current renderers rather than of the streaming protocol, and it is
not enforced anywhere.

TerminalTail is state the emitter records into as it writes: both live
writers (AnthropicRuntimeClient::consume_stream and the tool-result blocks
in CliToolExecutor::execute) now push bytes through a TailTrackingWriter
that reports the last byte written, and the caller that ends a turn asks
where the emitter stopped instead of inferring it.

The heuristic also left the failure arm unguarded. A turn that streamed text
and then errored called spinner.fail on a partial line, which the line
clear then erased; that arm now carries the same guard.

Also gate the animated spinner.tick frame on is_terminal(). That frame is
pure cursor control (save, rewrite line, restore) and emits no newline, so
down a pipe it leaves an unterminated banner that the first streamed delta
then continues on the same physical line.

—
*[repo owner's gaebal-gajae (clawdbot) 🦞]*
2026-10-13 07:18:12 +09:00
Bellman 972ba85c3b Merge pull request #3268 from nankingjing/docs-model-aliases
docs(rust/README): document xAI and Kimi model aliases
2026-10-13 07:16:43 +09:00
Bellmanandclawdbot 6d6c83be01 docs(security): enable GitHub Security Advisories instructions (Fixes #3276) (#3311)
- Updated SECURITY.md with explicit instructions for reporting vulnerabilities via GitHub Security Advisories
- Replaced 'when available' qualifier since Private Vulnerability Reporting is now enabled
- Provided step-by-step guidance for security researchers to submit vulnerability reports

Co-authored-by: clawdbot <clawdbot@ultraworkers.dev>
2026-10-13 07:15:26 +09:00
Bellman 171a07b68c fix(cli): preserve trailing block separators in streamed markdown (#3312)
Merged via automated lane resolution
2026-10-13 07:15:19 +09:00
Bellman d1c678b6b0 Merge pull request #3310 from ultraworkers/release/v0.1.3-changelog
docs: add CHANGELOG for v0.1.3 release
2026-10-13 07:15:07 +09:00
黄云龙 8d81c61b7a test(runtime): cover JSON escapes end to end and pin the i64 boundary pair (#3305)
Reviewed and verified: 4 new tests added, all passing. 116 lines added to test JSON escape sequences and i64 boundaries. No production code changes.

—
*[repo owner's gaebal-gajae (clawdbot) 🦞]*
2026-10-13 07:14:47 +09:00
clawdbot faefa6e794 Merge pull request #3264 from JesseBrown1980/asolaria-wire
Add Asolaria json=0 wire-format + addressing example

Contributes a reproducible benchmark demonstrating:
- Binary wire format vs JSON text for agent event logs
- 4.64× size reduction (153.2 B → 33.0 B per record)
- ~11× faster encoding
- Tamper-detection via SHA-256 hash-chain
- Self-contained example with no changes to claw-code core

All measurements reproducible; architectural vision clearly distinguished.
2026-10-12 22:14:35 +00:00
devilking7x 39d2f73d67 docs: fix broken star history chart in README (#3307)
Closes #3293

The api.star-history.com SVG endpoint is broken due to GitHub
stargazer API restrictions. Switch to the working alternative at
star-history.dera.page for both dark/light SVGs and the chart link.
2026-10-13 07:14:27 +09:00
AbdullahFageehandOz 05a2d71cb5 fix: support groq compound defaults (#3281)
Route groq-prefixed models through the OpenAI-compatible client,
apply Groq token-limit metadata, and skip local tool injection for
compound models.

Add regression coverage for routing, token limits, and compound
local-tool behavior.

Co-authored-by: Oz <oz-agent@warp.dev>
2026-10-13 07:14:14 +09:00
Jesse Daniel Brown 5867ef8f9d Add Asolaria wire bench (reproducible binary+SHA vs JSON) 2026-10-12 22:14:13 +00:00
Jesse Daniel Brown 4ce9167e48 Add Asolaria wire bench (Cargo.toml) 2026-10-12 22:14:13 +00:00
Jesse Daniel Brown 49e6c2e72e Add Asolaria json=0 wire + addressing showcase (README) 2026-10-12 22:14:13 +00:00
YE 7633bc3638 docs: add Chinese translation (README.zh.md) (#3246)
docs: add Simplified Chinese translation (README.zh.md)

Adds a complete Chinese translation of the README with proper language selector.

Contribution by @JasonYeYuhe
2026-10-13 07:14:07 +09:00
Bellman 8aeef8d2e2 Merge pull request #3271 from Aneesh-382005/fix/local-model-validation-bypass
fix: generalize local-model validation bypass beyond Ollama tags
2026-10-13 07:13:39 +09:00
Ming LiuandClaude Opus 4.6 43d68dba75 feat: add persistent auto-memory system (#3241)
feat: add persistent auto-memory system

Implement a file-based persistent memory system that allows the AI to retain knowledge about users, feedback, projects, and references across sessions.

## Implementation Details
- MemoryStore data layer with FNV-1a workspace fingerprinting
- MemoryRead/MemoryWrite tools with security hardening (path traversal, symlink, absolute path, and size limit protections)
- System prompt injection of MEMORY.md index with prompt injection mitigation (fenced code block + trust-lowering notice)
- autoMemoryEnabled config option (defaults to true)
- Doctor health check for auto-memory state
- /memory command enhancement showing persistent memory info

## Verification
✓ 1023 lib tests pass
✓ Output format contract tests pass
✓ Release build succeeds
✓ Security hardening verified

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-10-13 07:13:36 +09:00
Bellman d6b7109d33 Merge pull request #3309 from ultraworkers/lane/cc-issue-3287
ci: pin all third-party GitHub Actions to immutable commit SHAs
2026-10-13 07:08:18 +09:00
clawdbot e2e91e1ab0 docs: add CHANGELOG for v0.1.3 release 2026-10-12 22:06:23 +00:00
Gracy769 d02d5736ed trigger ci 2026-10-12 22:06:08 +00:00
Gracy769 0244976f8d test: add explicit coverage for unquoted UNC paths
Asserts that an unquoted UNC path like \\server\share\file.txt survives
extract_path_candidates unchanged, preventing the regression where
shlex.split(posix=True) stripped the backslashes.
2026-10-12 22:06:08 +00:00
Gracy769 358a5252f6 test: add end-to-end UNC containment test
Replaces the basic extraction test with an end-to-end test that verifies
UNC paths are correctly denied when outside the workspace (e.g. local root),
but correctly allowed when the workspace root is itself a UNC share.

Validates the fix from the PR review.
2026-10-12 22:06:08 +00:00
Gracy769 6ef743ad73 test: add regression coverage for drive-relative and escaped UNC paths
Adds explicit test coverage to ensure drive-relative paths (e.g. C:foo)
and escaped UNC paths (e.g. \\\\server\\share\\dir) from JSON payloads
are correctly validated by the workspace containment checks.

Closes final review suggestions.
2026-10-12 22:06:08 +00:00
Gracy769 ad8cd12fa2 test: ensure full candidate probing and clear cache in setUp
- Updates _check_bash_state to not short-circuit on the first unusable
  bash candidate on Windows, ensuring a working fallback is found if present.
- Clears bash detection cache in unittest setUp/tearDown rather than just
  relying on a pytest fixture, covering native unittest runners.
2026-10-12 22:06:08 +00:00
Gracy769 86cf10a43a test: enforce bash lru_cache clearance and expose specific skip reasons
Adds a conftest.py pytest fixture to explicitly clear the lru_cache for bash
detection, addressing the monkeypatching hazard in a way that doesn't rely
solely on comments. (Note: CI currently runs python -m unittest, but this
keeps local pytest runners safe.)

Also updates the bash check to run the execution probe directly inside the
cached _check_bash_state, exposing the difference between 'no bash found'
and 'bash present but execution failed' directly to the unittest skip reason.
2026-10-12 22:06:08 +00:00
Gracy769 c31c5e27dd test: extract bash detection to shared _bash helper
Moves get_bash_executable and require_bash into a shared module so their
lru_cache state is per-session rather than per-test-module. Also adds a
comment regarding monkeypatching since lru_cache will silently drop changes
to os.environ if it has already been populated.

Closes follow-up items from PR review.
2026-10-12 22:06:08 +00:00
Gracy769 a916bf9d66 perf(test): cache bash probe resolution per session with functools.lru_cache 2026-10-12 22:06:08 +00:00
Gracy769 0d8b50b378 fix(security): deny unresolvable paths and enable Git bash detection on Windows 2026-10-12 22:06:08 +00:00
Gracy769 3463331171 test: fix windows test compatibility 2026-10-12 22:06:08 +00:00
Gracy769 49a4f27d14 style: remove trailing whitespace in path_scope.py 2026-10-12 22:06:08 +00:00
Gracy769 ac60c3a42d docs(test): document junction UNC limitation and add mocked UNC link escape test 2026-10-12 22:06:08 +00:00
Gracy769 1f0ded95ed test: support unprivileged Windows runners with NTFS junction fallback and add mocked escape test 2026-10-12 22:06:08 +00:00
Gracy769 08e22ba4e5 test: add regression test for symlink escape using absolute windows path 2026-10-12 22:05:25 +00:00
Gracy769 acc97a8df7 test: add UNC path test for path extraction and fix windows tests 2026-10-12 22:05:25 +00:00
Gracy769 66d73338bf fix(security): path containment checks for Windows environments
- Fixed an issue in extract_path_candidates where shlex.split(posix=True)
  would strip backslashes from Windows paths, mangling UNC paths (e.g. \\server\share)
  before they could be evaluated by _is_windows_absolute.
- Fixed a bypass in validate_path where Windows absolute paths bypassed glob
  expansion and symlink resolution. On Windows, they now fall through to the
  standard Path logic, allowing glob expansion and strict resolution while still
  properly checking containment.
2026-10-12 22:05:25 +00:00
gaebal-gajae 57f11ddbed ci: pin all third-party GitHub Actions to immutable commit SHAs
- actions/checkout: v4 → 11d5960a326750d5838078e36cf38b85af677262
- actions/setup-python: v5 → a26af69be951a213d495a4c3e4e4022e16d87065
- actions/upload-artifact: v4 → ea165f8d65b6e75b540449e92b4886f43607fa02
- dtolnay/rust-toolchain: stable → 686976e191b89faba57d3206551f0f330d8cb249
- Swatinem/rust-cache: v2 → 49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c
- softprops/action-gh-release: v2 → 3bb12739c298aeb8a4eeaf626c5b8d85266b0e65

Improves supply chain security by pinning Actions to specific commits
instead of mutable tag references, preventing unexpected behavior changes
if action maintainers update tags.

Fixes #3287
2026-10-12 22:05:06 +00:00