Commit Graph

7169 Commits

Author SHA1 Message Date
Peter Steinberger
9660cb705b fix(memory): preserve KNN filter limits (#69680) (thanks @aalekh-sarvam) 2026-04-23 04:01:47 +01:00
Peter Steinberger
1c91f3f09f fix: route btw provider streams by workspace (#70413) (thanks @suboss87) 2026-04-23 03:59:11 +01:00
Peter Steinberger
da8621df0d fix(openai-completions): enable local streaming usage compat (#68711) (thanks @gaineyllc) 2026-04-23 03:57:04 +01:00
Peter Steinberger
6b765f58d3 docs(changelog): clarify realtime stt entries 2026-04-23 03:53:14 +01:00
Peter Steinberger
90a34cc242 docs: credit openai-completions repair PR (#70294) (thanks @MonkeyLeeT) 2026-04-23 03:49:04 +01:00
Ted Li
49c7319ea5 fix(agents): repair malformed tool-call args on openai-completions 2026-04-23 03:49:04 +01:00
Peter Steinberger
e54d0634c5 fix: harden removed Codex auth choice guidance (#70390) (thanks @pashpashpash) 2026-04-23 03:45:01 +01:00
Ayaan Zaidi
95ecb0526e docs(gateway): document restart acknowledgement default 2026-04-23 08:07:53 +05:30
Peter Steinberger
0e7bcf7588 feat(plugin-sdk): share realtime transcription websocket sessions 2026-04-23 03:35:32 +01:00
Peter Steinberger
b09aed8271 fix: cap long SDK retry waits (#68474) (thanks @jetd1) 2026-04-23 03:32:35 +01:00
Peter Steinberger
aa27a9474f fix(outbound): centralize active delivery claims 2026-04-23 03:23:38 +01:00
Neerav Makwana
c94a8702c7 fix(outbound): hold active-delivery claim so reconnect drain skips live sends
Reconnect drain (drainPendingDeliveries) matches fresh pending entries by
design to preserve crash-replay, but the live delivery path in
deliverOutboundPayloads held no in-memory claim while the send was running.
A reconnect firing mid-send therefore re-drove the same queue entry and
produced duplicate outbound messages (e.g. WhatsApp cron sends going out
7-12x when the 30-minute inbound-silence watchdog fired during delivery).

Claim the queueId against the existing entriesInProgress set right after
enqueueDelivery and release it in the finally branch around ack/fail. Drain
already skips claimed ids via claimRecoveryEntry, so no drain-side change is
needed. The claim is process-local on purpose: a crashed owner leaves no
claim behind, so startup recovery still reclaims orphaned entries.

Fixes #70386.

Made-with: Cursor
2026-04-23 03:23:38 +01:00
Peter Steinberger
bae057fd77 fix: accept Codex MCP approval elicitations (#68807) 2026-04-23 03:11:26 +01:00
Peter Steinberger
51ed22e608 feat(providers): add streaming stt providers 2026-04-23 03:05:53 +01:00
Peter Steinberger
1489febee9 test: cover docker MCP cleanup for subagents 2026-04-23 02:46:13 +01:00
Peter Steinberger
2e90a2247e fix: harden Slack stream fallback delivery (#70370) (thanks @mvanhorn) 2026-04-23 02:42:48 +01:00
Peter Steinberger
5461195035 docs: document session mailbox discovery (#69839) 2026-04-23 02:33:55 +01:00
Peter Steinberger
4ff720a837 fix(openai): harden realtime stt 2026-04-23 02:22:17 +01:00
Peter Steinberger
71ae0d737a fix: override vulnerable uuid dependency 2026-04-23 01:56:14 +01:00
dulingxiao
c4dea58712 fix(moonshot): preserve native Kimi tool_call IDs in openai-completions replay 2026-04-23 01:52:58 +01:00
Gustavo Madeira Santana
28818f9140 Improve gateway diagnostics export for support reports (#70324)
Merged via squash.

Prepared head SHA: 3d6ee85993
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-22 20:47:14 -04:00
Peter Steinberger
6b41ef311f fix: isolate external direct-message runtime policy 2026-04-23 01:39:56 +01:00
Peter Steinberger
67f09ea87a feat: add xai realtime transcription 2026-04-23 01:38:11 +01:00
Peter Steinberger
87a64a33f1 fix(plugins): clarify installed plugin replacement 2026-04-23 01:25:29 +01:00
Peter Steinberger
fa43cbfcba fix: drop invalid Codex app-server service tiers 2026-04-23 01:24:25 +01:00
Peter Steinberger
0946e37523 fix(plugins): skip unchanged npm updates 2026-04-23 01:23:03 +01:00
Peter Steinberger
012841816d feat: add xai speech-to-text support 2026-04-23 01:06:07 +01:00
Peter Steinberger
4177b27e24 docs: note codex dynamic tool fingerprint fix (#69976) 2026-04-23 01:01:33 +01:00
Peter Steinberger
dbab0f7aad fix: restore codex permission approval targets (#70340) (thanks @Lucenx9) 2026-04-23 00:52:32 +01:00
Peter Steinberger
5a5aa3a178 fix(config): tolerate missing channel metadata during auto-enable 2026-04-23 00:50:34 +01:00
Peter Steinberger
53e822f407 fix: keep cli reply runs streaming 2026-04-23 00:49:43 +01:00
Peter Steinberger
c4e5ca8625 fix(agents): expose configured MCP tools in Pi profiles 2026-04-23 00:47:37 +01:00
Peter Steinberger
f437d96ae2 fix(config): avoid false reload restarts 2026-04-23 00:44:54 +01:00
pashpashpash
ff02563c7c feat(codex): add guardian app-server mode (#70090)
Reworks the Codex app-server Guardian change into the final landing shape:

- keep YOLO as the default local app-server mode
- add explicit `appServer.mode: "guardian"`
- remove the legacy `OPENCLAW_CODEX_APP_SERVER_GUARDIAN` shortcut
- document Guardian configuration and behavior
- add Guardian event projection and Docker live probes for approved/ask-back decisions

Co-authored-by: pashpashpash <nik@vault77.ai>
2026-04-23 00:25:43 +01:00
Vincent Koc
34e45ecfcc feat(codex): add llm lifecycle hooks (#70312)
* feat(codex): add llm lifecycle hooks

* fix(codex): close llm hook lifecycle gaps

* fix(codex): dedupe llm hook context

* fix(codex): preserve abort and error hook state
2026-04-22 16:19:59 -07:00
Vincent Koc
a5128777ee feat(codex): add tool hook parity (#70307)
* feat(codex): add tool hook parity

* fix(codex): stabilize tool hook parity

* fix(codex): tighten transcript hook typing

* fix(codex): preserve mirrored transcript idempotency

* fix(codex): normalize tool hook context
2026-04-22 16:18:10 -07:00
Vincent Koc
44965bf63c fix(diffs): refresh live tool config 2026-04-22 16:14:23 -07:00
Vincent Koc
d686e6f876 fix(hooks): avoid stale active-memory startup fallback 2026-04-22 16:10:01 -07:00
wirjo
18507ed85f feat(amazon-bedrock-mantle): add Claude Opus 4.7 via per-model Anthropic Messages API override (#68730)
* feat(amazon-bedrock-mantle): add Claude Opus 4.7 via Anthropic auth

* fix(amazon-bedrock-mantle): keep Opus 4.7 transport-safe

* fix(amazon-bedrock-mantle): restore anthropic base url helper

* fix(auto-reply): apply runtime auth to conversation labels

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-22 16:09:39 -07:00
KateWilkins
f342da5fcc feat: add xai media providers
Add xAI image generation and text-to-speech provider support with docs, live tests, and guarded provider HTTP handling.\n\nThanks @KateWilkins.
2026-04-23 00:07:39 +01:00
Vincent Koc
386a0884d7 fix(hooks): avoid stale lancedb startup fallback 2026-04-22 16:06:55 -07:00
Peter Steinberger
ed0ffa472b docs: clarify codex compaction docs (#69612) (thanks @91wan) 2026-04-23 00:05:47 +01:00
Peter Steinberger
9b1f1036ac fix(channels): isolate bundled load failures 2026-04-22 23:56:14 +01:00
Vincent Koc
e8b56a9928 feat(codex): add prompt and compaction hooks (#70313)
* feat(codex): add prompt and compaction hooks

* fix(codex): clean prompt and compaction hook tests
2026-04-22 15:56:08 -07:00
Peter Steinberger
ac8495adaa fix(config): write through single-file includes 2026-04-22 23:53:56 +01:00
wirjo
2a15a3bb53 fix(amazon-bedrock): add known model context windows to discovery (#65952)
* fix(amazon-bedrock): add known model context windows to discovery

Bedrock's ListFoundationModels API does not expose token limits. Discovery
was hardcoding contextWindow: 32000 for every model, causing Claude (1M),
Nova (300K), and other models to hit premature 'Context limit exceeded'
errors and unnecessary session resets.

Adds a lookup table of known context windows for Bedrock models:
- Anthropic Claude: 200K-1M
- Amazon Nova: 128K-1M
- Meta Llama: 128K
- Mistral: 32K-128K
- DeepSeek: 128K
- Cohere: 128K
- AI21 Jamba: 256K

Inference profile prefixes (us., eu., ap., global.) are stripped before
lookup, so us.anthropic.claude-opus-4-6-v1 correctly resolves to 1M.

Also raises the default fallback from 32K to 128K for unknown models —
most modern models have at least 128K context.

Single file change, no type system modifications.

Complementary to #65030 (provenance flag for warning on unknown models).

Fixes #64919
Related: #64250

* add KNOWN_MAX_TOKENS map and expand model coverage

- Add KNOWN_MAX_TOKENS lookup table with Bedrock-optimized values that
  balance response quality against quota burndown (5x rate for Claude 3.7+)
- Add missing models to KNOWN_CONTEXT_WINDOWS: Opus 4.7 (1M), Opus 4.1/4.5,
  Sonnet 4, Claude 3/3.5 Haiku, DeepSeek V3/V3.2, Google Gemma 3
- Refactor prefix-stripping into shared resolveKnownValue() helper
- Fix: use !== undefined instead of truthy check for table lookups
- Wire resolveKnownMaxTokens into toModelDefinition and resolveInferenceProfiles

Quota burndown context: Bedrock reserves input_tokens + max_tokens from
TPM at request start. For Claude 3.7+, output burns at 5x. The values
in KNOWN_MAX_TOKENS are intentionally conservative (8-16K for Claude)
to maximize concurrent throughput while still allowing useful responses.
Thinking budget is added separately by the runtime.

* remove KNOWN_MAX_TOKENS — maxTokens should be handled upstream

Remove the KNOWN_MAX_TOKENS map. Hardcoding maxTokens values in
discovery is the wrong layer to solve this — any explicit value
still gets reserved against Bedrock's TPM quota at request start.

The correct fix is upstream in pi's Bedrock provider: omit maxTokens
from inferenceConfig when not explicitly set, letting the model use
its internal default. This avoids quota waste entirely.

See: badlogic/pi-mono#3399 and badlogic/pi-mono#3400

Keep the expanded KNOWN_CONTEXT_WINDOWS (context windows ARE the
right thing to set in discovery — they affect compaction thresholds
and session management, not API-level quota reservation).

* docs: clarify why hardcoded context windows are needed

Bedrock's ListFoundationModels and GetFoundationModel APIs return no
token limit information — there is no Bedrock API to discover context
windows or max output tokens programmatically. Note that this table
should become a fallback if AWS adds token metadata in the future.

* fix: add au and apac to inference profile prefix regex

Add missing geo prefixes discovered by querying inference profiles
across multiple regions:
- au. (Australia/NZ, used in ap-southeast-2/4/6)
- apac. (Asia-Pacific, used for older models in ap-northeast-1)

Both resolveKnownContextWindow and resolveBaseModelId now handle
all known prefixes: us, eu, ap, apac, au, jp, global.

* test: port au. prefix test from #65449 by @alickgithub2, add apac. coverage

Port the Australia/NZ inference profile test from PR #65449
(credit: @alickgithub2) and extend it to also cover the apac.
prefix discovered in ap-northeast-1.

* expand model coverage: Llama 4, MiniMax, NVIDIA, Mistral 3, GLM, Qwen

Cross-referenced KNOWN_CONTEXT_WINDOWS against live
list-foundation-models API. Added missing models:
- Llama 4 Maverick (1M) and Scout (512K)
- MiniMax M2/M2.1/M2.5 (1M)
- NVIDIA Nemotron Super/Nano variants (128K)
- Mistral Large 3 675B (128K)
- GLM 4.7/4.7-flash/5 (128K)
- Qwen3 Coder/32B/VL (128-256K)

Removed deprecated deepseek.v3-v1:0 and claude-opus-4-20250514
(not in active foundation models list).

* raise default context window from 128K to 200K

200K matches the floor for all current Claude models (the most
popular on Bedrock). Every other active model with a lower actual
limit is already in the explicit table. This ensures new Claude
models get a correct default without requiring a table update.

* test: update discovery test expectations for known context window values

* test: fix remaining contextWindow expectation (default 200K)

* fix(amazon-bedrock): keep conservative context fallback

* docs(changelog): note Bedrock context window fix

* fix(amazon-bedrock): normalize known context fallback

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-22 15:53:41 -07:00
wirjo
420c96e7aa fix(amazon-bedrock-mantle): refresh IAM bearer token via resolveConfigApiKey cache lookup (#68903)
* fix(amazon-bedrock-mantle): refresh IAM bearer token via resolveConfigApiKey cache lookup

The Mantle plugin generates a bearer token from IAM credentials at discovery
time and bakes it as a static string into the provider config. After the
token's cache TTL expires (~1hr), requests fail because resolveConfigApiKey
only handled the explicit AWS_BEARER_TOKEN_BEDROCK env var case.

Fix: expose getCachedIamToken() as a sync read from the existing iamTokenCache,
and wire it into resolveConfigApiKey as a fallback when no explicit env var is
set. The catalog.run still generates/refreshes the token on discovery; this
change ensures the cached token is served at auth resolution time.

Fixes #68900

* fix(amazon-bedrock-mantle): refresh runtime IAM bearer auth

* docs(changelog): note Mantle IAM refresh

* fix(agents): apply runtime auth in simple completion

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-22 15:52:24 -07:00
Devin Robison
2321d67263 fix(gateway): require auth for control ui bootstrap config (#70247)
* fix(gateway): require auth for control ui bootstrap config

* fix(ui): send auth on bootstrap fetch

* fix(ui): keep bootstrap auth same-origin

* fix(ui): refresh bootstrap after auth hello

* docs(changelog): note control ui bootstrap auth

* fix(ui): retry bootstrap auth with alternate shared secret on 401
2026-04-22 16:52:08 -06:00
Peter Steinberger
c87c9742ed fix(telegram): isolate direct chat sandbox sessions 2026-04-22 23:46:34 +01:00
Devin Robison
95119017c8 fix(openshell): pin sandbox file reads (#69798)
* fix(openshell): pin sandbox file reads against parent symlink swaps

* docs(changelog): note openshell sandbox read pinning (#69798)

* fix(openshell): containment-check against literal root and self-contain file-identity helper

* test(openshell): spy on fsPromises.open for swap races, skip dev=0 test on win32

* fix(openshell): single-syscall fallback identity check + tighten sameFileIdentity types

* fix(openshell): re-fstat pinned handle after identity check for defense-in-depth

* fix(openshell): lstat leaf on platforms without O_NOFOLLOW to close windows symlink gap

* fix(openshell): expose test seam for O_NOFOLLOW availability instead of patching native constants
2026-04-22 16:44:25 -06:00