Commit Graph

3874 Commits

Author SHA1 Message Date
Nimrod Gutman edb5123f26
fix(sandbox): honor sandbox alsoAllow and explicit re-allows (#54492)
* fix(sandbox): honor effective sandbox alsoAllow policy

* fix(sandbox): prefer resolved sandbox context policy

* fix: honor sandbox alsoAllow policy (#54492) (thanks @ngutman)
2026-03-25 16:51:13 +02:00
Peter Steinberger c92002e1de
fix(media): align outbound media access with fs policy 2026-03-25 05:50:21 -07:00
Peter Steinberger d363af8c13
refactor(auth): separate profile ids from email metadata 2026-03-25 04:24:46 -07:00
Liu Yuan 419824729a
fix: fail loud when PTY cursor mode is unknown (#51490) (thanks @liuy)
* fix(process): auto-detect PTY cursor key mode for send-keys

When a PTY session sends smkx (\x1b[?1h) or rmkx (\x1b[?1l) to switch
cursor key mode, send-keys now detects this and encodes cursor keys
accordingly.

- smkx/rmkx detection in handleStdout before sanitizeBinaryOutput
- cursorKeyMode stored in ProcessSession
- encodeKeySequence accepts cursorKeyMode parameter
- DECCKM_SS3_KEYS for application mode (arrows + home/end)
- CSI sequences for normal mode
- Modified keys (including alt) always use xterm modifier scheme
- Extract detectCursorKeyMode for unit testing
- Use lastIndexOf to find last toggle in chunk (later one wins)

Fixes #51488

* fix: fail loud when PTY cursor mode is unknown (#51490) (thanks @liuy)

* style: format process send-keys guard (#51490) (thanks @liuy)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 15:51:27 +05:30
w-sss 247f82119c
fix: improve Telegram 403 membership delivery errors (#53635) (thanks @w-sss)
* fix(telegram): improve error messages for 403 bot not member errors

- Detect 403 'bot is not a member' errors specifically
- Provide actionable guidance for users to fix the issue
- Fixes #48273 where outbound sendMessage fails with 403

Root cause:
When a Telegram bot tries to send a message to a channel/group it's not
a member of, the API returns 403 'bot is not a member of the channel chat'.
The error message was not clear about how to fix this.

Fix:
1. Detect 403 errors in wrapTelegramChatNotFoundError
2. Provide clear error message explaining the issue
3. Suggest adding the bot to the channel/group

* fix(telegram): fix regex precedence for 403 error detection

- Group alternatives correctly: /403.*(bot.*not.*member|bot was blocked)/i
- Require 403 for both alternatives (previously bot.*blocked matched any error)
- Update error message to cover both scenarios
- Fixes Greptile review feedback

* fix(telegram): correct regex alternation precedence for 403 errors

- Fix: /403.*(bot.*not.*member|bot was blocked)/ → /403.*(bot.*not.*member|bot.*blocked)/
- Ensures 403 requirement applies to both alternatives
- Fixes Greptile review comment on PR #48650

* fix(telegram): add 'bot was kicked' to 403 error regex and message

* fix(telegram): preserve membership delivery errors

* fix: improve Telegram 403 membership delivery errors (#53635) (thanks @w-sss)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 10:59:29 +05:30
Josh Avant 10161c2d79
Plugins: enforce terminal hook decision semantics for tool/message guards (#54241)
* Plugins: enforce terminal hook decision policies

* Tests: assert terminal hook behavior in integration paths

* Docs: clarify terminal hook decision semantics

* Docs: add hook guard semantics to plugin guides

* Tests: isolate outbound format label expectations

* changelog

Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>

---------

Signed-off-by: joshavant <830519+joshavant@users.noreply.github.com>
2026-03-25 00:11:13 -05:00
dongdong 5a5c5d4cde
fix: refresh DeepSeek pricing to current V3.2 rates (#54143) (thanks @arkyu2077)
* fix: add actual DeepSeek API pricing to model catalog

Replace zero-cost placeholder with real pricing from DeepSeek docs:
- deepseek-chat (V3): /bin/bash.27/1M input, .10/1M output, /bin/bash.07 cache read
- deepseek-reasoner (R1): /bin/bash.55/1M input, .19/1M output, /bin/bash.14 cache read

Fixes #54134

* fix: refresh DeepSeek pricing to current V3.2 rates

* fix: refresh DeepSeek pricing to current V3.2 rates (#54143) (thanks @arkyu2077)

---------

Co-authored-by: Jasmine Zhang <jasminezhang@192.168.1.75>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 10:34:03 +05:30
kevinten10 c00372e559 fix(agents): correct ClawHub URL in system prompt
Change clawhub.com to clawhub.ai in agent system prompt.
The .com domain is incorrect and doesn't point to the real ClawHub.

Fixes #54154
2026-03-25 10:10:37 +05:30
Tak Hoffman df58b4f5fb
fix: prefer deterministic session id resume targets 2026-03-24 21:18:40 -05:00
Tak Hoffman 9c7823350b
feat: add /tools runtime availability view (#54088)
* test(memory): lock qmd status counts regression

* feat: make /tools show what the agent can use right now

* fix: sync web ui slash commands with the shared registry

* feat: add profile and unavailable counts to /tools

* refine: keep /tools focused on available tools

* fix: resolve /tools review regressions

* fix: honor model compat in /tools inventory

* fix: sync generated protocol models for /tools

* fix: restore canonical slash command names

* fix: avoid ci lint drift in google helper exports

* perf: stop computing unused /tools unavailable counts

* docs: clarify /tools runtime behavior
2026-03-24 21:09:51 -05:00
Tak Hoffman fb04801ed7
fix: enforce sandbox visibility for session_status ids 2026-03-24 21:05:25 -05:00
Tak Hoffman 2c1d16e261
fix: drop spawned visibility list caps 2026-03-24 20:52:05 -05:00
Tak Hoffman 6651511e90
fix: verify exact spawned session visibility 2026-03-24 20:39:00 -05:00
Vincent Koc 2069e124a9 chore(agents): normalize pi embedded runner imports 2026-03-24 18:06:24 -07:00
Vincent Koc d10669629d feat(gateway): make openai compatibility agent-first 2026-03-24 18:06:24 -07:00
Tak Hoffman 6eaff70b55
fix: ignore moved child rows in subagent announces 2026-03-24 19:47:36 -05:00
Tak Hoffman e6db1dde45
fix: hide moved subagents from stale command targets 2026-03-24 19:15:47 -05:00
Peter Steinberger f6205de73a
refactor: split feishu helpers and tests 2026-03-24 17:12:25 -07:00
Peter Steinberger 5cdb50abe6
refactor: unify Google Generative AI normalization 2026-03-24 17:09:11 -07:00
Peter Steinberger 561acd1675
test: tighten shared card schema coverage 2026-03-24 17:04:07 -07:00
Tak Hoffman 639706f298
fix: ignore moved child rows in subagent status 2026-03-24 18:57:42 -05:00
Peter Steinberger d4fda79ff7 fix: add merged message tool schema guardrail (#53715) (thanks @lndyzwdxhs) 2026-03-24 16:53:56 -07:00
Tak Hoffman e48a0b80a8
fix: ignore moved subagent children on stale parents 2026-03-24 18:46:37 -05:00
Aria 63b0036248 fix: normalize baseUrl for custom Google Generative AI providers
Custom providers using `api: "google-generative-ai"` (e.g. a paid
Google tier) resolved in the model picker but failed at runtime with
HTTP 404 because the base URL lacked the required `/v1beta` path
segment and provider normalization was gated on the provider key
being exactly `"google"`.

Two targeted fixes, both keyed on the semantic `api` field rather
than provider name strings:

1. `models-config.providers.ts` — change the normalization gate from
   `normalizedKey === "google"` to
   `normalizedProvider?.api === "google-generative-ai"` and add
   `normalizeGoogleBaseUrl()` to ensure the canonical `/v1beta` suffix.

2. `pi-embedded-runner/model.ts` — apply
   `normalizeGoogleGenerativeAiBaseUrl()` in three resolution paths
   (`applyConfiguredProviderOverrides`, `buildInlineProviderModels`,
   fallback model construction) so the base URL is corrected at
   runtime regardless of how the model was discovered.

No changes to name-only call sites (`model-selection`,
`live-model-filter`, `model-forward-compat`); those paths are not
required for custom provider resolution and broadening their provider
checks would incorrectly capture unrelated providers like
`google-antigravity`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 16:42:56 -07:00
Peter Steinberger 6f6468027a refactor: dedupe test and runtime seams 2026-03-24 23:33:30 +00:00
Tak Hoffman 907b5254f6
fix: ignore stale rows in subagent kill cascade 2026-03-24 18:12:48 -05:00
Tak Hoffman a03bbca4df
fix: cascade bulk subagent kills past stale rows 2026-03-24 17:43:21 -05:00
Tak Hoffman b6031a98e7
fix: ignore stale rows in subagent steer 2026-03-24 17:38:38 -05:00
Tak Hoffman fee9d4cf37
fix: dedupe stale child completion announces 2026-03-24 17:25:14 -05:00
Tak Hoffman 2c5c5acb1b
fix: ignore stale rows in subagent admin kill 2026-03-24 17:25:14 -05:00
Tak Hoffman c90ae1ee7f
fix: prefer latest subagent rows for session control 2026-03-24 17:25:14 -05:00
Tak Hoffman b8a0258618
fix: ignore stale rows in subagent activity checks 2026-03-24 17:25:14 -05:00
Vincent Koc e28b516fb5
fix(slack): trim DM reply overhead and restore Codex auto transport (#53957)
* perf(slack): instrument runtime and trim DM overhead

* perf(slack): lazy-init draft previews

* perf(slack): add turn summary diagnostics

* perf(core): trim repeated runtime setup noise

* perf(core): preselect default web search providers

* perf(agent): restore OpenAI auto transport defaults

* refactor(slack): drop temporary perf wiring

* fix(slack): address follow-up review notes

* fix(security): tighten slack and runtime defaults

* style(web-search): fix import ordering

* style(agent): remove useless spread fallback

* docs(changelog): note slack runtime hardening
2026-03-24 15:03:40 -07:00
Tak Hoffman c541cde0f6
fix: dedupe restarted descendant session counts 2026-03-24 16:52:50 -05:00
Tak Hoffman e24704d5eb
fix: dedupe active child session counts 2026-03-24 16:52:50 -05:00
Peter Steinberger 23a4ae4759 refactor: dedupe test helpers and harnesses 2026-03-24 21:41:46 +00:00
Tak Hoffman 51e59983a1
fix: report deduped subagent totals 2026-03-24 16:13:25 -05:00
Tak Hoffman 69d6e95c2a
fix: dedupe stale subagent rows in reply views 2026-03-24 16:07:19 -05:00
Peter Steinberger bcd61f0a38 refactor: dedupe helpers and source seams 2026-03-24 21:00:36 +00:00
Tak Hoffman caa718a554
fix: steer ended subagent orchestrators with live descendants 2026-03-24 15:27:19 -05:00
Tak Hoffman e99c270684
fix: allow follow-up sends to finished subagents 2026-03-24 15:20:39 -05:00
Tak Hoffman f6a0cdc25a
fix: let subagent kill cascade through ended parents 2026-03-24 15:15:01 -05:00
Vincent Koc aaf2d6359e fix(test): satisfy cli backend config typing 2026-03-24 13:06:20 -07:00
Devin Robison c2fb7f1948
Adjust CLI backend environment handling before spawn (#53921)
security(agents): sanitize CLI backend env overrides before spawn
2026-03-24 12:58:10 -07:00
Tak Hoffman 231d62582f
fix: prefer current subagent targets over stale rows 2026-03-24 14:38:34 -05:00
Peter Steinberger 4029ce738c test: speed up targeted unit suites 2026-03-24 19:36:08 +00:00
Tak Hoffman 91b1e41132
fix: ignore stale bulk subagent kill targets 2026-03-24 14:17:28 -05:00
Peter Steinberger a4327ad544 refactor: dedupe tests and harden suite isolation 2026-03-24 19:16:19 +00:00
Tak Hoffman 870c52aac7
fix: ignore stale subagent send targets 2026-03-24 14:05:00 -05:00
Tak Hoffman 627ab895e2
fix: ignore stale subagent kill targets 2026-03-24 13:57:03 -05:00