* feat(llm): add Anthropic prompt caching and cache token tracking
- Inject cache_control via additional_params for Claude models in rig_adapter
- Add cache_read_input_tokens and cache_creation_input_tokens to
CompletionResponse and ToolCompletionResponse
- Extract cached_input_tokens from rig-core unified Usage
- Add is_anthropic_model() detection helper with provider prefix support
- Log prompt cache hits at debug level (consistent with response_cache)
- Add 7 unit tests for cache injection and model detection
- Update all mock providers and test fixtures with new fields
* feat(cost): apply 90% cache discount to prompt-cached tokens in CostGuard
- Add cache_read_input_tokens to TokenUsage so cache counts flow from
CompletionResponse through the reasoning layer to the dispatcher
- Update CostGuard::record_llm_call() to accept cache_read_input_tokens:
cached tokens are billed at 10% of the normal input rate
- Thread cache_read_input_tokens from dispatcher into CostGuard
- Add test_cache_discount_reduces_cost verifying exact savings match
90% of input cost for fully-cached requests
- Update all existing test callers with zero-cache parameter
* refactor(cache): scope cache_control to Anthropic backend and validate model support
- Replace model-name-based is_anthropic_model() with explicit
enable_prompt_cache flag on RigAdapter, set only for the direct
Anthropic backend via with_prompt_cache(true)
- Add supports_prompt_cache() to validate model names per Anthropic
docs: only Claude 3+ models support caching; claude-2 and
claude-instant are excluded to prevent 400 errors
- Warn when caching is enabled but model does not support it
- Replace is_anthropic_model tests with flag-based and model
validation tests
* fix(cache): validate model at construction and propagate cache metrics through proxy
- Move supports_prompt_cache() check into with_prompt_cache() so
unsupported models are detected once at construction, not per request
- Add cache_read_input_tokens and cache_creation_input_tokens to
ProxyCompletionResponse and ProxyToolCompletionResponse with
serde(default) for backward compatibility
- Pass cache metrics through orchestrator proxy instead of zeroing
- Use claude-opus-4-6 in cache discount test to match Anthropic
semantics
* feat(llm): add configurable cache retention with write surcharge
- Add CacheRetention enum (none/short/long) to AnthropicDirectConfig
- Parse ANTHROPIC_CACHE_RETENTION env var (default: short)
- Inject TTL-aware cache_control (short=5m ephemeral, long=1h)
- Extract cache_creation_input_tokens from raw Anthropic response
- Add cache_write_multiplier() to LlmProvider trait (1.25x short, 2.0x long)
- Pipe dynamic write multiplier through dispatcher to CostGuard
- Add TokenUsage.cache_creation_input_tokens field
- Add tests for Long TTL injection, 5m and 1h write surcharges
- Document ANTHROPIC_CACHE_RETENTION in .env.example
* docs: fix stale cache_retention field comment
* fix: resolve CI failures after upstream merge
- Add missing cost_per_token arg to cache test callsites
- Apply cargo fmt to long lines in tests and tracing macros
* fix: address Copilot review feedback
- Use saturating_add for cache token sum to prevent u32 overflow
- Tighten supports_prompt_cache to explicitly match claude-3+/claude-4+
and named families (claude-sonnet/claude-opus/claude-haiku)
* fix: adapt prompt caching to registry architecture and add missing cache fields
- Resolve merge conflicts: adapt CacheRetention and cache injection to
the declarative provider registry (RegistryProviderConfig replaces
AnthropicDirectConfig)
- Parse ANTHROPIC_CACHE_RETENTION env var in create_anthropic_from_registry()
- Use Anthropic automatic caching via top-level cache_control in
additional_params (rig-core #[serde(flatten)] places it at request root)
- Add cache_read/creation_input_tokens fields to all mock LlmProviders
added on main after PR #291 branched (response_cache, dispatcher,
provider_chaos, trace_llm)
- Suppress clippy::too_many_arguments on record_llm_call and
build_rig_request
- Add regression tests for cache injection (short/long/none) and
cache_write_multiplier values
Co-Authored-By: Canvinus <[email protected]>
* fix: delegate cache_write_multiplier through provider wrappers and make cache_read_discount configurable
The 6 decorator providers (Retry, CircuitBreaker, Failover, SmartRouting,
CachedProvider, RecordingLlm) did not delegate cache_write_multiplier()
to their inner provider, causing it to always return 1.0 instead of the
actual 1.25x/2.0x from RigAdapter. This fix adds delegation for both
cache_write_multiplier() and the new cache_read_discount() method.
Also makes the cache read discount per-provider instead of hardcoding
Anthropic's 90% discount (÷10). OpenAI uses 50% (÷2), so the discount
is now returned by each provider via the LlmProvider trait.
Addresses review feedback on PR #660.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* style: cargo fmt
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* test: add CacheRetention FromStr/Display unit tests
Tests cover primary values, aliases (off/disabled/5m/ephemeral/1h),
case-insensitivity, invalid input error, and Display round-trip.
Addresses Copilot review feedback on PR #660.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Andrey <[email protected]>
Co-authored-by: Andrey Gruzdev <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
* feat(channels): add native Signal channel via signal-cli HTTP daemon
Implement a native Rust Signal channel that connects to a running
signal-cli daemon's HTTP endpoint, enabling Signal messaging without
WASM overhead.
Architecture:
- SSE listener at /api/v1/events for receiving messages with automatic
reconnection and exponential backoff
- JSON-RPC client at /api/v1/rpc for sending messages and typing
indicators
- Reply target tracking via Arc<RwLock<HashMap>> to route responses
back to the correct DM or group conversation
Features:
- User allowlisting supporting E.164 phone numbers, bare UUIDs, and
uuid:-prefixed identifiers (matching OpenClaw's format)
- Group allowlisting with wildcard (*) support
- Configurable story and attachment-only message filtering
- Health check via signal-cli /api/v1/check
- Broadcast support to all tracked reply targets
Configuration via environment variables:
- SIGNAL_HTTP_URL, SIGNAL_ACCOUNT (required)
- SIGNAL_ALLOWED_USERS, SIGNAL_ALLOWED_GROUPS
- SIGNAL_IGNORE_ATTACHMENTS (default: false)
- SIGNAL_IGNORE_STORIES (default: true)
Includes unit tests covering allowlist logic, envelope parsing,
recipient targeting, SSE deserialization, and edge cases.
* refactor(signal): remove expect|unwrap calls
- Change SignalChannel::new to return Result<Self, ChannelError>
- Replace .expect() on reqwest client build with proper error handling
- Replace .expect() on NonZeroUsize with compile-time const using unsafe new_unchecked
- Propagate errors through test helpers to avoid unwraps in tests
* fix(signal): prevent OOM from chunked response without Content-Length
Use bytes_stream() to check response size during download rather than
buffering entire body first. This closes the OOM vector where a
malicious signal-cli daemon could send unbounded chunked data.
* fix(signal): align is_e164 minimum digits with setup wizard
Both now require 7-15 digits after '+', preventing environment
variable bypass of the stricter onboarding validation.
* refactor(signal): extract from_parts constructor
Extract SignalChannel::from_parts() used by both new() and
sse_listener() to ensure consistent object construction.
* chore: remove redundant unused var
* refactor(signal): rename allowed_users to allow_from and add dm_policy/group_policy
- Rename allowed_users -> allow_from for consistency with other channels
- Rename allowed_groups -> allow_from_groups
- Add dm_policy field: 'open', 'allowlist', or 'pairing' (default: 'pairing')
- Add group_policy field: 'allowlist', 'open', or 'disabled' (default: 'allowlist')
- Add group_allow_from field that inherits from allow_from if empty
- Implement dm_policy and group_policy logic in message processing
- Add environment variable resolution: SIGNAL_ALLOW_FROM, SIGNAL_ALLOW_FROM_GROUPS,
SIGNAL_DM_POLICY, SIGNAL_GROUP_POLICY, SIGNAL_GROUP_ALLOW_FROM
- Add setup wizard prompts for new policy options
- Note: full pairing flow (PairingStore integration) marked as pending for future PR
* feat(signal): implement DM pairing workflow for unapproved senders
- Add PairingStore integration to check approved senders
- Handle pairing requests for unknown senders with dm_policy=pairing
- Send pairing reply message with approval instructions
- Update FEATURE_PARITY.md to reflect DM pairing support
* chore(ci): fix clippy warnings
- Add docs/LLM_PROVIDERS.md with setup instructions for all supported providers
- Expand .env.example with Together AI and Fireworks AI example configs
- Add "Alternative LLM Providers" section to README with quickstart snippet
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: firat.sertgoz <[email protected]>
Add LLM_EXTRA_HEADERS env var (format: Key:Value,Key2:Value2) to inject
custom HTTP headers into every request to OpenAI-compatible endpoints.
This enables OpenRouter attribution headers (HTTP-Referer, X-Title)
and other service-specific headers without code changes.
Closes#179
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Illia Polosukhin <[email protected]>
* fix: strip reasoning from LLM responses and persist assistant messages reliably
- Filter out `type: "reasoning"` output items from NEAR AI Responses API
parsing so chain-of-thought never reaches the UI (nearai.rs)
- Rewrite clean_response with regex-based tag stripping that is
code-aware (preserves tags inside fenced blocks and inline backticks),
supports 9+ tag names (think, thought, reasoning, reflection, etc.),
handles <final> extraction, pipe-delimited tags, and case/whitespace
tolerance (reasoning.rs)
- Add Reasoning::complete() helper so all non-agentic LLM call sites
(summarize, suggest, heartbeat, compaction) get automatic response
cleaning; thread SafetyLayer through to those callers
- Change persist_turn from fire-and-forget tokio::spawn to awaited async
so both user and assistant messages are written before returning,
preventing data loss on shutdown/restart
- Pass input_count through seed_response_chain so response chaining
delta calculation is accurate after thread hydration on restart
- Make NearAiResponse.usage optional and preserve response_id in alt
response path for chaining continuity
- Persist session token to DB during onboarding wizard so runtime
loads it without legacy-key fallback; suppress spurious warning on
fresh installs
- Fix dev tool double-registration when builder already registers them
- Load dotenv/ironclaw env for doctor and status subcommands
- Reduce startup log noise (demote info→debug for skills, remove
redundant info lines)
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Nudge to not loop over tools continuesly
* refactor: remove Responses API, consolidate NEAR AI to Chat Completions only
The Responses API provider (nearai.rs, 1278 lines) added significant complexity
(response chaining state machine, delta message calculation, previous_response_id
persistence) for marginal benefit. This consolidates to the Chat Completions API
only, upgrading NearAiChatProvider with dual auth (session token + API key) and
401 retry for session token renewal.
- Delete src/llm/nearai.rs (Responses API provider)
- Upgrade nearai_chat.rs with SessionManager, dual auth, flexible list_models
- Remove response_id from CompletionResponse and ToolCompletionResponse
- Remove seed_response_chain/get_response_chain_id from LlmProvider trait
- Remove response chain persistence from agent (thread_ops, session)
- Remove NearAiApiMode enum and NEARAI_API_MODE config
- Clean up all wrapper providers (retry, circuit_breaker, failover, cache)
- Update documentation (CLAUDE.md, .env.example)
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* feat: runtime log level control via gateway UI and URL parameter
Add server-side log level switching using tracing_subscriber::reload::Layer
so the EnvFilter can be swapped at runtime without restarting. Expose via
GET/PUT /api/logs/level endpoints, a "Server: LEVEL" dropdown in the logs
toolbar, and a ?log_level=debug URL parameter for one-click activation.
Also applies cargo fmt to pre-existing files (llm/, tests/).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* fix: incremental settings persistence and remote server auth (#185, #186)
Persist settings after each wizard step so failures don't lose prior
progress. Load existing settings on re-run to recover from partial
onboarding. Add manual token paste option for remote/headless servers
where browser OAuth is unreachable, and support IRONCLAW_OAUTH_CALLBACK_URL
for custom callback URLs. Color prompt output (green/red/blue prefixes).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: replace session token paste with API key entry, address PR review
Replace option 4 in NEAR AI auth menu from session token paste to NEAR
AI Cloud API key entry (cloud.near.ai). Also address all PR review
feedback: restrict .env file permissions to 0o600, mask API key input
with secret_input, fix libsql loaded flag in try_load_existing_settings,
add ENV_MUTEX to oauth_defaults tests, and add NEARAI_API_KEY to secrets
injection.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: deduplicate keys in upsert_bootstrap_var
When the .env file contains duplicate keys (e.g. from manual editing),
only write the replacement once and skip subsequent duplicates.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: NEARAI_SESSION_TOKEN env var takes precedence over file-based tokens
Hosting providers inject session tokens via env var and expect them to
be used directly. Previously the env var was only picked up when no
session file existed and was treated as a legacy migration. Now the env
var always wins, without persisting to disk.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* docs: distinguish NEAR AI Chat and NEAR AI Cloud providers
Split documentation into two clearly named modes:
- NEAR AI Chat: Responses API at private.near.ai, session token auth
- NEAR AI Cloud: Chat Completions API at cloud-api.near.ai, API key auth
Update default base URLs so each mode points to its correct endpoint.
Update .env.example, deploy/env.example, CLAUDE.md, setup spec, and
code comments across config/llm.rs, nearai.rs, nearai_chat.rs, mod.rs.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: wizard recovery ordering — load DB before persist, fresh choices win
Previously, persist_after_step() ran after Step 1 but before
try_load_existing_settings(), bulk-upserting defaults that clobbered
prior settings. Additionally, merge_from gave stale DB values
precedence over fresh Step 1 choices.
Fix: snapshot Step 1 settings, load DB, then re-apply the snapshot.
This ensures prior progress (steps 2-7) is recovered while fresh
Step 1 choices override stale DB values.
Add two tests verifying wizard recovery merge ordering.
Addresses PR review comments from Copilot on wizard.rs:150,
wizard.rs:1607, and wizard.rs:1626.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* style: fix rustfmt formatting in config/llm.rs
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* style: collapse nested if per clippy collapsible_if lint
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: use print_success for API key confirmation, fix menu spacing
- Use print_success() for colored output consistency in api_key_login
- Fix box-drawing alignment: options 1-2 had an extra trailing space
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* feat: wire memory hygiene into heartbeat loop (#166)
* refactor: address PR review comments for hygiene wiring
* style: fix fmt import ordering and clippy too_many_arguments warning
* fix: update heartbeat integration test to pass HygieneConfig argument
HeartbeatRunner::new() now requires a HygieneConfig as its second
argument after the hygiene wiring refactor. Pass the default config
in the integration test.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Illia Polosukhin <[email protected]>
* feat: Add PR review tools, job monitor, and channel injection for E2E sandbox workflows
Adds JobEventsTool and JobPromptTool so the main agent can read container
event logs and send follow-up prompts to running Claude Code sessions.
A background JobMonitor forwards container assistant messages into the
agent loop via a new inject channel on ChannelManager.
CreateJobTool now accepts a project_dir parameter for mounting existing
cloned repos into containers, and spawns the monitor automatically for
async jobs.
Also: Dockerfile bumped to Rust 1.88 (rig-core needs let chains),
GITHUB_TOKEN forwarded into containers for gh CLI auth, and truncate()
fixed for multi-byte char boundary panics.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: Address PR #57 review comments (IDOR, Dockerfile, truncate, logging)
- Add ownership checks to JobEventsTool and JobPromptTool via ContextManager
to prevent users from accessing other users' jobs (IDOR)
- Combine Dockerfile gh CLI install into single apt-get layer
- Handle truncate() edge case when max falls inside first multi-byte char
- Log actual count of registered job management tools
- Document fire-and-forget job monitor lifecycle
- Add tests for ownership rejection and schema validation
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* feat: Replace hardcoded GITHUB_TOKEN with on-demand credential delivery
Containers now fetch credentials via authenticated GET /worker/{id}/credentials
endpoint instead of receiving them baked into env vars at creation time. Secrets
are decrypted from SecretsStore on demand, scoped per-job via CredentialGrant,
and revoked automatically when the job completes.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: Address sandbox audit findings (CONNECT tunnel, readonly_rootfs, type consolidation)
- Implement real CONNECT tunnel with bidirectional TCP piping via hyper upgrade
- Fix readonly_rootfs to apply for both ReadOnly and WorkspaceWrite policies
- Consolidate duplicate CredentialMapping/CredentialLocation into secrets::types
- Share reqwest::Client across proxy requests instead of per-request allocation
- Store Docker connection and reuse across executions
- Remove .unwrap() from proxy response builders with safe fallbacks
- Add output truncation to direct (non-container) execution (64KB limit)
- Delete dead src/tools/sandbox.rs (ToolSandbox never used)
- Fix connect_docker error message to list all attempted socket paths
- Update proxy credential injection to handle all CredentialLocation variants
- Use glob-based host_patterns matching for credential lookup in proxy policy
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: Address PR #57 review comments (IDOR, Dockerfile, truncate, logging)
- Dockerfile: install curl+ca-certificates before fetching GitHub CLI GPG key
- JobEventsTool/JobPromptTool: reject missing context (prevents IDOR bypass)
- parse_credentials: validate env var names against denylist and pattern
- resolve_project_dir: require explicit paths to exist before validation
- Credential serving: lower log level from info to debug
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: Address orchestrator audit findings (constant-time auth, error handling, tests)
- auth: constant-time token comparison via subtle::ConstantTimeEq
- auth: replace hand-rolled hex_encode with std::fmt::Write fold
- api: report_status now updates ContainerHandle (was a no-op)
- api: log complete_job errors instead of silently discarding
- job_manager: log Docker cleanup errors in stop_job/complete_job
- job_manager: extract validate_bind_mount_path with proper error on
missing home_dir and mandatory base dir creation before canonicalize
- job_manager: cache Docker connection across operations
- error: remove dead OrchestratorError::AuthFailed and ContainerTimeout
- Add 13 new tests (prompt queue, credentials, events, status, paths)
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: use floor_char_boundary in sandbox manager truncate to prevent multi-byte panics
String::truncate() panics when the index falls mid-way through a
multi-byte UTF-8 character. Use the same floor_char_boundary utility
already used in worker/runtime.rs and tools/builtin/shell.rs.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: default base_url to private.near.ai for Responses API mode
Session tokens only authenticate against private.near.ai, not
cloud-api.near.ai. The default base_url now matches the api_mode:
- Responses (session token): https://private.near.ai
- ChatCompletions (API key): https://cloud-api.near.ai
This broke when the multi-provider merge introduced cloud-api.near.ai
as the unconditional default.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: use private.near.ai as default base URL for all API modes
private.near.ai now supports both Responses and ChatCompletions
endpoints, so there is no reason to route through cloud-api.near.ai.
This also fixes session token auth which only works against
private.near.ai.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: harden libSQL concurrency, fix Claude Code Docker auth and permissions
Three fixes for the sandbox/Claude Code pipeline:
1. SQLite "database is locked": set WAL journal mode in migrations and
PRAGMA busy_timeout=5000 on every connection across LibSqlBackend,
LibSqlSecretsStore, and LibSqlWasmToolStore (~83 async call sites).
2. Claude Code container auth: extract OAuth token from macOS Keychain
(or Linux ~/.claude/.credentials.json) at startup and inject via
CLAUDE_CODE_OAUTH_TOKEN env var. Removes the broken bind-mount
approach that failed on uid mismatch.
3. Claude Code tool permissions: wire CLAUDE_CODE_ALLOWED_TOOLS env var
through to the worker binary (was hardcoded to empty vec), and expand
defaults to include all standard tools (Read, Write, Edit, Glob, Grep,
NotebookEdit, Bash, Task, WebFetch, WebSearch).
Also adds --verbose flag to claude CLI (required with stream-json + -p),
failover provider model switching, and nearai models endpoint fix.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: stream event parsing, job ID prefix resolution, session renewal in list_models
Three fixes for the Docker/gateway pipeline:
1. Claude Code stream event parsing (claude_bridge.rs): Rewrite
ClaudeStreamEvent to match actual NDJSON format where content blocks
are nested under message.content[], not at the top level. Add handler
for "user" events (tool_result blocks) and emit result text as a
"message" event so reviews appear in gateway activity view.
2. Job ID prefix resolution (job.rs): Add resolve_job_id() that accepts
short hex prefixes (like git short SHAs) in addition to full UUIDs.
The LLM sees truncated IDs in job monitor messages like "[Job f2854dd8]"
and can now use them directly with job_status/cancel/events/prompt tools.
3. Session renewal in list_models (nearai.rs): list_models() now retries
with OAuth renewal on 401, matching send_request()'s existing behavior.
Previously it returned SessionExpired immediately, causing the setup
wizard to fall back to defaults instead of prompting re-authentication.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: /model command now lists available models
Previously /model with no args only showed the current model name.
Now it fetches and displays all available models from the provider,
marking the active one, so users can see what's available before
switching with /model <name>.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: address PR #57 review findings (set_var UB, tunnel timeout, restart creds)
- Replace unsafe `std::env::set_var` in worker runtime and Claude bridge
with `Command::envs()` injection via a new `extra_env` field on
`JobContext`, avoiding undefined behavior in the multi-threaded tokio
runtime.
- Add 30-minute timeout to CONNECT tunnel `copy_bidirectional` in the
sandbox proxy to prevent stuck connections from leaking spawned tasks.
- Persist credential grants (as JSON in the description column) on
`SandboxJobRecord` so `jobs_restart_handler` can restore them instead
of passing `vec![]`, which caused restarted containers to lose access
to their original secrets.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: address second round of PR #57 review comments
- Normalize host_patterns to lowercase in proxy policy matching
- Push LIMIT into SQL for list_job_events (Database trait + both backends)
- Remove unused was_explicit binding in job tool
- Return 500 instead of 200 in make_response fallback path
- Update copy_auth_from_mount docstring for env-var default
- Use entry.file_type() instead of is_dir() to avoid following symlinks
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: address third round of PR #57 review comments
- Restore glob patterns in default_claude_code_allowed_tools (Bash -> Bash(*))
- Add tracing::warn for credential grant serialize/deserialize failures
- Wrap extra_env in Arc<HashMap> to avoid deep cloning per tool call
- Document unsupported credential locations (AuthorizationBasic, UrlPath)
- Document TOCTOU window in validate_bind_mount_path
- Expand doc comments on JobEventsTool and JobPromptTool
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: address fourth round of PR #57 review comments
- Document CONNECT tunnel task lifecycle (timeout is the cleanup mechanism)
- Remove secret names from error-level credential logs to prevent leaking
- Expand DANGEROUS_ENV_VARS denylist with language runtime hijack vectors
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: address fifth round of PR #57 review comments
- Promote job monitor startup log to info level for observability
- Require minimum 4-char prefix in resolve_job_id to limit enumeration
- Cap credential grants at 20 per job to bound column storage
- Clamp job events limit to 1..1000 to prevent memory abuse
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: add missing closing brace for SkillsConfig impl block
The merge resolution dropped the closing `}` for `impl SkillsConfig`,
causing a compilation error in CI.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
- Add HeartbeatConfig for proactive periodic execution with channel notifications
- Add use_planning option to Worker for ActionPlan generation before tool execution
- Implement tool failure tracking in database (V3 migration)
- Add auto-repair via Builder for broken WASM tools in self_repair.rs
- Record tool failures in Worker for self-repair tracking
- Update .env.example with new configuration options
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Consolidate all migrations into V1__initial.sql
- Replace DocType enum with flexible path-based file storage
- Add list_workspace_files SQL function for directory listing
- Update memory tools for path-based API (memory_read, memory_write,
memory_search, memory_list)
- Remove unused OpenAI/Anthropic providers (NEAR AI only)
- Simplify config to remove multi-provider support
- Update CLAUDE.md documentation
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Adds NearAiProvider that uses the NEAR AI unified API at
api.near.ai/v1/responses with session token authentication.
This provides access to multiple models (OpenAI, Anthropic, etc.)
through a single endpoint with user auth and usage tracking.
- Add src/llm/nearai.rs with complete provider implementation
- Add NearAiConfig to config.rs with session_token, model, base_url
- Add NearAi variant to LlmProvider enum (accepts nearai/near-ai/near_ai)
- Change default provider from OpenAi to NearAi
- Update .env.example with NEAR AI configuration
- Update CLAUDE.md documentation
Co-Authored-By: Claude Opus 4.5 <[email protected]>