Commit Graph

3054 Commits

Author SHA1 Message Date
Peter Steinberger 72ddf22b93 fix(qa): recover repeated gateway restarts through channel ingress (#124746)
* fix(qa): repair repeated gateway restart recovery

* test(qa): satisfy restart recovery checks

* fix(audit): rekey repeated recovery identity

* fix(plugin-sdk): expose authored context cap

* test(android): synchronize process tree readiness
2026-08-16 15:47:31 -07:00
Peter Steinberger 33f3b72a19 refactor(plugin-sdk): extract stream and SecretRef primitives (#124835) 2026-08-16 14:30:11 -07:00
Peter Steinberger 313fcf1dba fix(channels): route direct DM replies to sender (#124837)
Default direct-message reply context to the authenticated sender address so targetless Reef and Nostr replies do not resolve to the local recipient.
2026-08-16 14:24:30 -07:00
Peter Steinberger 5a27ebee67 fix(gateway): surface failed node event delivery (#124798)
* fix(gateway): surface failed node event delivery

* fix(plugin-sdk): preserve authored context cap
2026-08-16 13:57:19 -07:00
Peter Steinberger 541f373bc0 refactor(validation): type producers and drop internal re-validation — pilot lane C (#124808) 2026-08-16 13:38:17 -07:00
Peter Steinberger 4d4ee7bc86 refactor(plugin-sdk): consolidate session catalog families (#124801) 2026-08-16 13:25:11 -07:00
Peter Steinberger a0f4d5462a refactor(channels): carry typed approval-prompt bindings through signal/imessage send seams (#124742)
The Signal and iMessage channel plugins inferred approval prompts by
regex-sniffing rendered message text (header matching like 'Exec approval
required', /approve command parsing), violating the transport-only channel
doctrine: approval actions must stay typed until channel encoding.

The typed envelope already existed (channelData.execApproval with
approvalId/approvalKind/allowedDecisions) and every payload-level delivery
path consumed it; the regex paths were redundant re-derivation at the raw
send seam plus restart recovery for in-memory iMessage poll state.

- Signal: delete send-level prompt sniffing entirely; all approval sends
  already flow through typed structured-payload or native-handler paths.
- iMessage: sendMessageIMessage takes a typed approvalPrompt binding
  (id/kind/decisions) from the native approval handler instead of an
  approvalKind flag plus text re-parsing.
- iMessage poller: persist pending poll targets in the plugin keyed store
  so restart recovery no longer regex-scans chat history; typed recent-chat
  discovery for handle-only DM targets stays. Split poll-target ownership
  into approval-reaction-poll-targets.ts (max-lines).
- Plugin SDK: remove extractApprovalReactionPromptBinding — beta-only
  surface, never in a stable release, so no deprecation window applies;
  AGENTS.md now records that rule.

Accepted tradeoff: approval prompts delivered by a pre-upgrade process are
not rediscovered from chat text after restart (<=24h transient state;
persisted reaction bindings and event-driven tapbacks still work).
2026-08-16 12:57:34 -07:00
Peter Steinberger 22dd3d4ed0 fix(qa): preserve effective fast mode (#124762)
Amp-Thread-ID: https://ampcode.com/threads/T-01a00b6b-e4e9-74af-bb31-30363fae6c89

Co-authored-by: Amp <amp@ampcode.com>
2026-08-16 12:16:48 -07:00
Peter Steinberger 568b920b21 feat(lint): enforce import ordering and deduplication (#124730)
* refactor(imports): dedupe and hoist imports

* feat(lint): enforce import/no-duplicates and import/first
2026-08-16 11:44:52 -07:00
Peter Steinberger eb77ce5690 refactor(infra): split device pairing lifecycle modules (#124734) 2026-08-16 11:40:55 -07:00
Peter Steinberger aeff737da9 fix(agents): prevent invalid names from targeting the default agent (#124670)
* fix(agents): reject unrepresentable agent ids

* refactor(system-agent): split model selection setup

* chore: shrink assertion safety baseline

* docs: record strict agent id validation proof

* style: format strict agent id report

* chore: drop stray unrelated report artifact

* chore: restore REPORT.md to main state
2026-08-16 10:37:06 -07:00
Peter Steinberger 63401b730b fix: keep doctor security conditions as single findings (#124666)
* fix(doctor): record security finding severity

* refactor(security): keep audit severity internal

* fix(security): preserve channel finding severity
2026-08-16 10:24:40 -07:00
Peter Steinberger 715c379fd9 refactor(config): consolidate context budget to one per-model knob (#124665)
* refactor(config): consolidate context budget settings

* test(config): type legacy context fixtures

* test(config): align context budget fixtures

* fix(status): honor runtime context discovery

* docs(config): clarify context budget fallbacks

* fix(ci): resolve context budget lint failures

* test(ci): align context budget shard fixtures

* fix(models): preserve catalog context metadata

* fix(config): surface context migration diagnostics

* test(plugin-sdk): keep live catalog coverage focused
2026-08-16 10:05:01 -07:00
Peter Steinberger d258c6651a refactor: make dense test fixtures type-safe (#124625)
* test: replace assertion chains with typed fixture builders

* test: avoid generic mock lint suppressions

* test: preserve Telegram API mock signatures
2026-08-16 09:22:27 -07:00
Marvinthebored 2404d41de2 fix(codex): preserve delegation when image generation is denied (#124598)
Forward exact audited tool denies into agent harnesses so Codex can disable native image generation without dropping delegation. Fail closed when managed policy forces image generation and rotate retained threads when effective native config changes.

Co-authored-by: Marvinthebored <262704729+Marvinthebored@users.noreply.github.com>
2026-08-16 21:42:38 +05:30
Peter Steinberger 61a3d3e7d9 perf(plugins): memoize failed facade module resolutions (#124664)
resolveFacadeModuleLocation only cached successful locations, so every
lookup for a plugin that is not installed re-walked the bundled-plugins
dir and registry on every request — request-time freshness polling of
process-stable install topology, which the architecture doctrine forbids.

Cache null results too. Install/reload/doctor flows already clear this
cache through registerPluginMetadataProcessMemoLifecycleClear, so a
newly installed plugin becomes visible exactly when the lifecycle owner
says so — the retry-on-appear test now pins that contract instead of
accidental per-call refresh.
2026-08-16 08:33:23 -07:00
Peter Steinberger 82ffcdd0d8 feat(lint): enable verified-clean rules and import checks (#124610)
* fix: add symbol descriptions, enum initializers, and Error rejections

* feat(lint): enable verified-clean rule tranche and activate import plugin

* test(lint): cover deferred import rules

* fix(lint): preserve Error rejection identity
2026-08-16 07:28:21 -07:00
Peter Steinberger 99bda3d8cd refactor: make transport stream writer types honest (#124587)
* refactor(ai): give transport streams an honest writer type

* test(ai): use canonical transport stream fixtures

* fix(ai): preserve partial-less stream deltas
2026-08-16 07:03:36 -07:00
SunnyShu 16cde04136 fix(agents): allow required-preflight native Codex compaction (#120197)
* fix(agents): allow required-preflight native Codex compaction

Required reply-preflight compaction on a Codex app-server-backed session
returns the intentional `ok: true, compacted: false` "codex app-server owns
automatic compaction" no-op because the preflight caller never passes
`allowNonManualNativeRequest`. The reply/preflight path then misclassifies
that successful skip as a failure and throws, dropping the user's turn with
"Context is too large and auto-compaction could not recover this turn." The
equivalent CLI path was fixed by #88207; this is the second, unpatched caller.

Route required-preflight through the existing private
`compactAfterContextEngine` harness capability (which already passes
`allowNonManualNativeRequest: true`) by adding a typed
`nativeCompactionRequest: "required_preflight" | "after_context_engine"`
origin on `maybeCompactAgentHarnessSession` and the Codex compact bridge.
The non-manual skip guard is bypassed for preflight, so Codex actually
compacts the thread.

A binding change between the initial read and the native request is a
stale-binding race, not a benign skip. For `required_preflight` (and the
non-manual CLI path) it now surfaces as the canonical recoverable
`stale_thread_binding` failure so the queued harness falls back to the
context engine instead of treating an uncompacted `ok: true` result as a
completed turn. A genuine post-context-engine request may still skip,
because the context engine has already compacted. Required-preflight is also
the one scoped exception to the model-locked terminal rule: missing or stale
Codex thread bindings recover via the shared context-engine fallback while
the persisted harness lock stays intact; other locked failures remain
terminal.

Rebased onto main after #120740 restructured the guarded native compaction
block; the recoverable-binding semantics are reintroduced on the new
structure and scoped by `nativeCompactionRequest` so #120740's
post-context-engine skip behavior is preserved.

Closes #119971.

* test(evidence): commit inspectable required-preflight live proof scripts for #119971

Adds the two live codex app-server proof scripts (binding-race +
locked-preflight) so the redacted terminal traces in the PR body are
inspectable on the exact head. Both drive the real codex binary and real
maybeCompactCodexAppServerSession with nativeCompactionRequest:
"required_preflight"; neither runs in CI (no codex binary).

* fix(agents): scope locked-preflight compaction fallback to Codex

Restrict the required-preflight model-lock exception to the Codex harness
so missing/stale thread bindings in other locked native harnesses (e.g.
Copilot) stay terminal instead of escaping the persisted model-lock
boundary via context-engine fallback. Add a model-locked Copilot
required-preflight regression covering both missing and stale thread
bindings.

* fix(codex): require native preflight compaction

* chore(plugin-sdk): account for native compaction exports

* test(codex): use complete cron authority fixtures

* chore(lint): shrink compaction assertion baseline

* fix(lint): honor root boundary timeout

* fix(lint): extend package boundary timeout

* fix(plugins): verify native compaction owner

---------

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
2026-08-16 08:00:38 -06:00
Peter Steinberger 0d9a424d81 refactor: dedupe session-catalog cursor paging and sleep helper clones (#124569)
* refactor(plugin-sdk): dedupe session-catalog cursor paging into session-catalog-runtime

The acpx Pi and opencode session catalogs carried byte-identical
boundedLimit/encodeCursor/decodeCursor/optionalRawCursor/transcriptPage
scaffolding (~114 duplicated lines each). Move one canonical copy into the
private-local session-catalog-runtime SDK subpath both plugins already may
import, and keep the plugin-named cursor guards as direct aliases.

Net -87 production LOC; no behavior change (error strings, cursor canonical
form, and byte budgets are unchanged).

* refactor(core): replace private sleep() clones with canonical sleep helpers

managed-linux readiness polling now uses @openclaw/retry sleepWithAbort with
ref:false (preserving the clone's timer.unref behavior), and the embedded
agent runner's async-task wait uses src/utils/sleep.ts. Both clones matched
canonical semantics on real inputs (positive integer poll intervals).

The update-managed-service-handoff copy stays: it lives inside a serialized
standalone handoff script (String.raw template) that cannot import repo
modules.
2026-08-16 05:57:42 -07:00
Peter Steinberger f43544f752 refactor: remove vestigial runtime indirection (#124554)
* refactor: remove vestigial indirection

* test: update Slack runtime API guard
2026-08-16 05:31:36 -07:00
Jason (Json) bccbb8a0c7 fix(memory): make persistence promises receipt-backed (#120989)
* fix: require memory persistence receipts

* fix(memory): bind persistence failures to tool owners

* fix(memory): preserve Codex persistence ownership

* test(plugin-sdk): account for owner metadata export

* test(codex): split owner timeout regression

* fix(memory): cover durable deletes across runtimes

* test(codex): type dynamic mutation fixtures

* fix(agents): fail closed ambiguous side-effect owners

* fix(memory): fail zero-row delete receipts
2026-08-16 00:50:10 -06:00
Peter Steinberger 6aa27d6ecd refactor: retire August compat windows (embedding API, pi aliases, target parser, spawning hook, setup exports, WhatsApp inbound aliases) (#124416)
* refactor(plugin-sdk): retire embedded Pi aliases

* refactor(channels): retire explicit target compatibility

* refactor(plugins): retire subagent spawning hook

* refactor(plugin-sdk): retire shipped channel setup exports

* refactor(whatsapp): retire inbound callback aliases

Proof: focused build and WhatsApp E2E green; broad WhatsApp suite 188/189 files green. extensions/whatsapp/src/monitor-inbox.policy.test.ts flakes only in the parallel batch and passes isolated (10/10).

* refactor(plugin-sdk): retire memory embedding registrar

Migrate every bundled provider and manifest to registerEmbeddingProvider and contracts.embeddingProviders. Preserve memory-specific batching, local-service acquisition, index identity, and auto-selection through the canonical generic registry adapter, then remove the parallel registrar, registry, diagnostics, contracts, tests, and docs.

* chore(plugin-sdk): tighten retired surface budgets

Pin the post-retirement public SDK surface to 144 entrypoints, 4,312 exports, 2,564 callable exports, and 1,133 deprecated exports; agent-harness-runtime now permits exactly nine deprecated exports.
2026-08-15 22:43:47 -07:00
Jason (Json) 5f1bbed42d fix(doctor): report missing managed local embedding setup (#123575)
* fix(gateway): expose startup blockers before cutover

* fix(gateway): include session blockers in preflight

* fix(gateway): keep preflight finding type private

* fix(gateway): preflight startup auth blockers

* fix(gateway): complete startup preflight readiness

* fix(llama-cpp): keep preflight remediation private

* fix(gateway): keep preflight passive and activation-aware

* fix(gateway): apply startup guard in preflight

* fix(gateway): align auth mode preflight

* fix(gateway): keep preflight state reads isolated

Share the read-only inspection snapshot scope across duplicated runtime chunks so blocked gateway preflight remains non-mutating when bundled provider artifacts read canonical state.

* fix(gateway): keep startup preflight passive

* fix(gateway): ignore inactive embedding owner shadows

* fix(gateway): preserve startup preflight parity

* fix(llama-cpp): keep cache inspection types private

* fix(gateway): close startup preflight parity gaps

* fix(gateway): handle uninitialized memory databases

* test(gateway): observe shell fallback portably

* fix(llama-cpp): normalize embedding model paths

* refactor(gateway): drop broad startup preflight surface

* fix(doctor): report missing managed local embedding setup

* style(memory): simplify setup enablement check

* fix(memory): keep diagnostic result type private

* fix(memory): inspect local setup with remote secret refs

* fix(memory): keep doctor index inspection immutable

* fix(memory): make readiness inspection owner-aware

* fix(doctor): mirror memory slot allowlist policy

* test(doctor): use canonical memory slot id

* fix(doctor): normalize memory provider ids

* fix(doctor): resolve external embedding readiness owner

* fix(plugins): keep embedding inspection result internal

* fix(doctor): isolate plugin state during lint

* fix(doctor): route lint metadata through snapshot

* fix(cli): keep doctor lint startup source-only

* fix(cli): keep doctor lint compile-cache free

* fix(doctor): keep local embedding readiness opt-in

* test(doctor): preserve plugin artifact roots during lint

* fix(doctor): refresh memory readiness registration

* test(doctor): type nullable provider policy mock

* fix(doctor): scope lint state snapshot to provider check

* fix(doctor): isolate selected plugin state checks

* test(doctor): restore only scoped environment

* fix(doctor): defer readiness state inspection

* fix(doctor): keep deferred config reads isolated

* fix(doctor): keep plugin state mode internal

* fix(config): preserve default plugin validation
2026-08-15 20:15:06 -06:00
Pavan Kumar Gondhi 8668aeb969 fix(discord): bind transcript capture to source account [AI] (#118579)
* fix(discord): bind transcript capture to source account

* style(agents): keep transcript tool wiring compact

* fix(transcripts): declare account binding channels

* fix(transcripts): report effective capture account

* fix(transcripts): enforce account lifecycle ownership

* fix(transcripts): preserve cross-surface control

* fix(copilot): preserve transcript channel context

* fix(transcripts): fail closed for legacy channel owners

* fix(transcripts): add trusted legacy recovery

* fix(transcripts): preserve auto-start cleanup ownership

* fix(transcripts): reject untrusted account starts

* fix(transcripts): keep persisted ownership authoritative

* fix(transcripts): harden legacy recovery

* fix(transcripts): preserve agent ownership boundary

* fix(transcripts): scope account binding to source channel

* fix(transcripts): preserve unattributed owner isolation

* fix(transcripts): own configured captures by account

* docs(plugins): clarify transcript auto-start ownership

* test(transcripts): cover account-less recovery

* docs(transcripts): scope legacy recovery by provider

* fix(discord): reuse eligible account ordering for transcripts

* test(discord): use neutral transcript account fixtures

* fix(transcripts): keep accountless recovery local

* fix(discord): resolve transcript accounts by voice capability

* fix(transcripts): bound account resolution failures

* fix(transcripts): bound account tool output

* fix(transcripts): honor unresolved provider accounts

* fix(transcripts): preserve binding when providers are missing

* fix(transcripts): fail closed on unknown binding provenance

* fix(transcripts): qualify account lifecycle capability

* fix(transcripts): normalize provable legacy owners

* fix(transcripts): bind scheduled capture to caller authority

* fix(transcripts): preserve scheduled caller identity tuple

* fix(transcripts): preserve channel-less scheduled authority

* fix(plugin-sdk): publish transcript provider types

* fix(transcripts): use exact lifecycle ownership tokens

* fix(transcripts): preserve local ownerless lifecycle access

* fix(transcripts): allow local configured capture control

* fix(transcripts): preserve scheduled caller channel

* fix(transcripts): retain named-agent legacy recovery

* fix(transcripts): deny unrelated remote channels

* fix(doctor): validate transcript owner inference

* fix(transcripts): restrict legacy remote recovery

* fix(ci): align transcript Doctor checks

* fix(transcripts): require Doctor-owned legacy metadata

* fix(transcripts): reject unowned remote capture starts

* fix(transcripts): reject unbound Discord lifecycle calls

* fix(transcripts): distinguish legacy owner rows

* test(discord): keep unavailable account fixture typed

* fix(transcripts): mark current imports for Doctor

* fix(transcripts): complete account ownership validation

* fix(discord): restore transcript package boundary

* fix(discord): preserve bundled transcript entry boundary

* docs(transcripts): clarify Discord auto-start account

* fix(transcripts): bind account-owned imports

* fix: preserve transcript and cron policy state

* fix(cron): preserve scheduled transcript authority

* fix(discord): keep legacy transcript rows local

* fix(transcripts): narrow account ownership boundary

* fix(transcripts): preserve trusted caller ownership

* fix(discord): enforce transcript source authorization

* fix(ci): bound Control UI gzip build variance

* test(qa): align transcript scenario contracts

* fix(agents): repair rebased caller context

* fix(discord): restore rebased account ownership

* test(discord): restore voice account fixtures

---------

Co-authored-by: joshavant <830519+joshavant@users.noreply.github.com>
2026-08-15 12:10:43 -07:00
Peter Steinberger aaa509b26e refactor(types): remove chained type assertions in core and ui (#124073)
* refactor(types): remove chained assertions in core and ui

* fix(types): preserve legacy cron migration identity

* fix(types): preserve settings patch key types
2026-08-15 01:32:04 -07:00
Peter Steinberger c83c3bc3a9 fix(plugin-sdk): keep published pre-split plugin imports loading after upgrade (#124086)
* fix(plugin-sdk): keep published pre-split plugin imports loading after upgrade

Same bug class as #124041: published plugin artifacts import SDK names at
module top level, so removing them from the barrel makes the installed
plugin fail to load (voice-call/matrix doctor contracts silently never run
their migrations; whatsapp and slack channels fail outright) after a core
upgrade. Verified against the actual npm tarballs (2026.7.2-beta.7):

- openclaw/plugin-sdk/runtime-doctor: voice-call + matrix doctor contracts
  import repair names (archiveLegacyStateSource, detect/repair state DB
  schema, plugin install-path repair, removePluginFromConfig,
  createPluginStateSyncKeyedStore) that moved to doctor-repair-runtime.
- openclaw/plugin-sdk/channel-feedback: whatsapp imports
  shouldAckReactionForWhatsApp (owner policy moved in-plugin by #121257).
- openclaw/plugin-sdk/channel-outbound: slack imports
  resolveChannelProgressDraftRender (render key retired by #122927).

Adds deprecated load-only bridges with named removal windows, bumps the
SDK surface budgets with comments, and locks behavior with unit tests
plus a loader fixture that fails without the bridges.

* test(plugin-sdk): cover the repair bridge in the runtime-doctor facade surface lock
2026-08-15 01:05:08 -07:00
Peter Steinberger 250b1e68be refactor(channels): centralize ingress lifecycle fan-out (#124096) 2026-08-15 01:03:16 -07:00
Jason (Json) a02ed2cfda fix(plugin-sdk): installed llama providers fail to load after upgrade (#124041)
* fix(plugin-sdk): let installed llama providers load after upgrade

* test(tooling): include new memory race importer
2026-08-14 23:57:24 -06:00
Peter Steinberger af76425d87 fix(channels): preserve legacy ingress failure settlement (#124016) 2026-08-14 21:59:16 -07:00
TUARAN d30c036b68 fix(channels): bound errored ingress settlements (#120104)
Route error-bearing fan-in abandonment through the existing failure policy so deterministic pre-adoption failures cannot exceed retry limits and starve same-lane messages.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-14 21:17:17 -07:00
Peter Steinberger d7d059c7e6 perf(test): move direct import smoke to test fixtures (#123923) 2026-08-14 19:07:48 -07:00
Peter Steinberger fd8741b4d8 perf(test): narrow plugin registration contract imports (#123902)
* perf(test): narrow plugin registration contract imports

* fix(test): preserve plugin registration contract boundary
2026-08-14 18:25:49 -07:00
Pavan Kumar Gondhi d5e89de906 fix(synology-chat): deliver attachments without forwarding source URLs [AI] (#119941)
* fix(synology-chat): host outbound attachments

* fix(synology-chat): isolate hosted media routes

* fix(synology-chat): harden hosted media limits

* fix(synology-chat): inspect hosted media content

* fix(synology-chat): reject ambiguous media routes

* fix(synology-chat): retain indeterminate media capabilities

* fix(synology-chat): mask public callback URLs

* fix(synology-chat): align callback sensitivity metadata

* fix(synology-chat): reserve media capability query keys

* fix(synology-chat): release rejected staged media

* fix(synology-chat): preserve ambiguous media handoffs

* fix(synology-chat): scan complete active media preamble

* fix(synology-chat): report validated attachment readiness

* fix(synology-chat): bound public media capability probes

* fix(synology-chat): bound hosted media responses

* test(synology-chat): model response headers read-only

* fix(synology-chat): bound hosted media reads

* fix(synology-chat): bound hosted media delivery

* fix(synology-chat): retain media through active serves

* fix(plugin-sdk): lease hosted media readers atomically

* fix(synology-chat): close hosted media review gaps

* test(synology-chat): clean up hosted media state

* fix(system-agent): canonicalize sensitive config paths

* fix(system-agent): honor runtime config sensitivity hints

* fix(config): inherit sensitive metadata

* fix(synology-chat): close latest review findings

* test(system-agent): keep config recovery checks lint-clean

* fix(system-agent): redact structured config secrets

* fix(synology-chat): harden active-content sniffing

* fix(security): close hosted media review gaps

* fix(security): close remaining hosted media review findings

* fix(system-agent): narrow dynamic owner ids safely

* fix(system-agent): narrow dynamic channel ids safely

* test(channels): isolate hosted media proofs

* fix(security): close config and hosted media review gaps

* test(plugin-sdk): split outbound media retention coverage

* test(plugin-sdk): isolate capacity store fixtures

* test(system-agent): assert config secrecy invariant
2026-08-14 17:05:20 -05:00
Dallin Romney 83d53044a4 fix(channels): route commentary through one progress owner (#121009)
* fix(slack): keep commentary progress on draft lane

* fix(channels): route commentary through one progress owner

Keep non-verbose commentary in Slack and Discord draft lanes while preserving one durable commentary payload when verbose progress makes those drafts yield. Freeze that owner decision for the turn so session changes apply on the next turn.

Co-authored-by: Dallin Romney <dallinromney@gmail.com>

Punchcard-Session: amber-workshop-workshop-36

* fix(channels): refresh queued commentary owner

Recompute the frozen draft-versus-durable commentary owner for every queued follow-up turn and carry that decision into final payload projection.

Punchcard-Session: amber-workshop-workshop-36

* fix(channels): clarify commentary owner opt-in

* fix(channels): preserve queued draft preambles

* fix(channels): require explicit queued progress ownership

* refactor(channels): record commentary progress owner

* fix(telegram): tolerate unscoped queued updates

* test(discord): use canonical draft fixture after rebase

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-14 22:15:53 +08:00
Josh Avant 97a53a9b35 feat: audit admitted channel participant identity (#122863)
* feat: audit admitted channel participant identity

* fix: preserve Telegram identity through thread recovery

* fix: signal held gateway process groups

* fix: keep audit evidence passive in collect routing

* fix: validate copied channel participant evidence

* fix: bind channel participant evidence to host ingress

* fix: honor Telegram proof credential roles

* fix: restart held Telegram proof through gateway

* fix: repair channel identity CI regressions

* test(matrix): bind thread routing owner

* fix: preserve direct DM SDK compatibility

* fix: bind channel provenance at host runtime

* test(feishu): provide channel context builder

* fix: defer record-bound channel runtime resolution

* fix: keep channel admission evidence core-private

* fix(audit): bind channel admission to plugin lifecycle

* fix(audit): bind ingress provenance to final context

* refactor(audit): split admission scope keys

* test(queue): cover combined metadata carriers

* refactor(audit): keep lifecycle helpers private

* fix(queue): preserve combined turn authority

* test(channels): provide ingress context builders

* test(channels): align integrated CI fixtures

* test(clickclack): resolve model-loop ingress

* docs: preserve channel participant evidence invariant
2026-08-14 08:57:01 -05:00
Peter Steinberger ad6bc6d3ae fix(delivery): keep failed queue rows payload-free (#123642)
* refactor(delivery): collapse failed-row lifecycle

Replace the unshipped failure-operations platform with payload-free terminal receipts owned by existing queue boundaries. Keep bounded/permanent idempotency only for reusable or crash-ambiguous producers, move physical expiry to queue maintenance, and preserve migration and media-cleanup safety.\n\nTogether with #123410, production code is net negative by 11 lines; tests, docs, and generated protocol mirrors are accounted separately.

* fix(delivery): break state DB import cycle

* fix(delivery): classify SQLite boundary uses

* test(gateway): mark retained health fixture
2026-08-14 06:22:51 -07:00
Peter Steinberger d19c7553dd feat(computer-use): computer.act v2 action contract with capability-filtered tool (#123544)
* feat(computer-use): computer.act v2 action contract with capability-filtered tool

* fix(computer-use): break contract import cycle, bound model-visible elements, regen swift protocol

* test(computer-use): satisfy curly rule in schema-cap helpers

* fix(computer-use): satisfy type-aware lint on contract and tool

* test(gateway-protocol): keep connect-params suite under the line cap
2026-08-14 02:40:56 -07:00
Peter Steinberger 848a7e30b3 refactor(computer-use): one canonical wire contract + node-host provider seam (#123509)
* refactor(computer-use): add provider seam

* refactor(computer-use): retry provider open after failure; drop changelog entry
2026-08-13 23:32:32 -07:00
Peter Steinberger 575467aa58 fix(openai): unify server-side compaction gates and harden compaction recovery (#123397)
* fix(openai): unify server compaction policy

* fix(openai): preserve managed responses aliases

* fix(compaction): harden bounded recovery

* refactor(compaction): simplify orphan output classifier

* fix(compaction): unanchor overflow classifiers and route image constant through runtime facade

* test(openai): use provider input config in compaction parity

* test(openai): model default compaction route accurately

* fix(openai): isolate responses payload policy imports

* fix(ai): remove unused responses api re-export

* fix(plugins): resolve responses policy source alias
2026-08-13 20:45:07 -07:00
Bek eb1035e861 fix(codex): retain direct-child hook policy after parent yield (#122503) 2026-08-13 22:51:34 -04:00
Peter Steinberger 1348387076 refactor(plugins): replace node-llama-cpp with managed llama-server (#123105)
Move llama.cpp chat and local embeddings onto a verified externally managed llama-server runtime. Remove the in-process native runtime, forked embedding workers, and node-llama-cpp dependency while preserving guided setup, local GGUF models, tool-capable agent runs, diagnostics, and operator docs.
2026-08-13 16:58:20 -07:00
Peter Steinberger 902eddf16b fix: keep global channel events agent-scoped (#123316)
Slack and Discord routed system events now retain route ownership when they enter literal-global queues, so sibling agents cannot consume them. Genuinely unbound routing remains an explicit error instead of falling back to a default agent.
2026-08-13 14:45:19 -07:00
Ayaan Zaidi d2afbd05ad refactor(plugin-sdk): replace API baselines with diffs (#123036)
* refactor(plugin-sdk): replace API baselines with diffs

* perf(plugin-sdk): bound API diff resources

* fix(plugin-sdk): isolate API diff dependencies

* fix(release): forward Plugin SDK acknowledgement

* fix(release): enforce SDK acknowledgement on publish

* chore: preserve generated-doc ignore policy

* fix(release): freeze SDK API evidence before publish

* fix(ci): satisfy SDK evidence guards

* fix(release): bind complete SDK evidence

* fix(release): authenticate plugin SDK evidence

* fix(plugin-sdk): abort interrupted API diffs

* test(ui): freeze page clock in background-tasks rail e2e

The rail transcript is compared byte-for-byte across the detail-panel
round-trip while it renders live relative ages; on slow CI runners the
second boundary ticks between the two reads (11s -> 12s) and fails the
equality assertion. Fix the page Date with Playwright setFixedTime while
keeping timers running so the tasks.list polling assertions still hold.

Repro: a 1.5s stall between the reads fails pre-fix with the exact CI
diff and passes post-fix.

* fix(scripts): drop unused export on dependency-evidence CLI main

Knip's workflow scan re-roots script references after an actions/checkout
step that sets path:, so the new trusted-tooling checkout in
openclaw-npm-release.yml stops marking this CLI as a workflow entry and
its exported main() surfaces as an unused export in check-dependencies.
Nothing imports main; the module invokes it through its own entry guard,
so the export keyword was dead surface either way.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-13 03:45:36 -07:00
Peter Steinberger b54034d5c2 fix: isolated gateways list and open the operator's HOME Claude/Codex/OpenCode/Pi sessions (#122983)
* fix(sessions): isolated gateways no longer inherit HOME external session catalogs

A gateway on isolated state (custom OPENCLAW_STATE_DIR/CONFIG_PATH/OPENCLAW_HOME,
relocated home, or any named profile) listed, read, continued, archived, and
reopened the operator's real Claude Code/Codex/OpenCode/Pi sessions from the
process HOME. External catalogs now require the default install identity for
process-HOME scans: every catalog verb receives the isolation policy and rejects
HOME-fallback local targets, unknown providers fail closed unless they declare
supportsProcessHomeIsolation, and one structured warning records the skip.
Paired-node hosts and explicitly rooted stores (CLAUDE_CONFIG_DIR, CODEX_HOME,
OPENCODE_DB, Pi session dirs) keep working; default-identity gateways are
unchanged.

* fix(sessions): inject catalog HOME-isolation fact at registry construction

* chore(sdk): regenerate plugin API baselines after rebase

* chore(sdk): regenerate plugin API baselines after rebase
2026-08-13 01:12:03 -07:00
SunnyShu 66e83a17e6 fix(sessions): distinguish transient lookup failures from policy denials (#117305)
* fix(sessions): distinguish transient lookup failures from policy denials

Make spawned-session ownership lookup failures observable and
distinguishable from genuine tree-visibility policy denials, with
retryability classification so permanent credential/configuration
failures are not mis-framed as transient. Addresses issue #114653.

Diagnostic layer only — does not add retry (maintainer product decision)
and does not address the recency-window denial path (#114180).

Core changes:
- session-visibility-internal: add a core-private three-state lookup result
  (ok / failed with retryable flag) plus classifyLookupRetryable (transport
  closes/timeouts and retryable request errors => retryable; credential/auth/
  unknown => non-retryable) and a shared lookupFailedDenialSuffix.
- session-visibility guard: pick the denial text by retryability so transient
  failures say "retry" and permanent failures say "check gateway configuration
  and credentials"; both still fail closed. Preserves the shipped public
  SessionAccessResult, Set<string> checker input, and test-hook contracts.
- sessions-resolution sandbox resolver: propagate the same retryability-
  classified denial; pass allowMissing: true on the speculative
  sessions.resolve probe and suppress the warn for the expected "No session
  found" miss so ordinary non-owned targets do not log as operational lookup
  failures (reuses callGatewayResolveSession for older-gateway compatibility).
- Tests: transient + permanent error coverage for both guard and sandbox
  resolver paths; classification contract locks; non-owned-miss quietness
  regression; redaction through formatErrorMessage.

* fix(lint): remove unnecessary Boolean() conversion in sessions-resolution

oxlint typescript(no-unnecessary-type-conversion) flagged the redundant
Boolean() wrapper around String.includes() which already returns boolean.
Use ?? false to preserve the undefined->false semantics from the optional
chain.

* fix(sessions): keep unknown lookup failures generic

* fix(sessions): narrow ownership lookup diagnostics

* test(sessions): format visibility coverage

* fix(sessions): preserve cross-agent denials on lookup failure

A failed spawned-session ownership lookup override was relabeling the row
checker's deterministic cross-agent policy denial as a retryable lookup
failure. Retrying the spawned ownership lookup cannot make a known
agent:other:* target eligible, so the cross-visibility refusal must be
preserved as-is.

Constrain the lookup-failure override to same-agent targets by mirroring
the row checker's agent resolution: when the target resolves to a
different agent than the requester, keep the original cross-agent denial
rather than overriding it. Add regression coverage for the cross-agent
case under a failed tree-visibility lookup.

ClawSweeper review P2: preserve cross-agent policy denials on lookup
failure.

* fix(lint): avoid implicit boolean coercion in cross-agent check

Replace the `!!id` coercions in `isCrossAgentTarget` with an explicit
empty-check so the return value reads as a plain inequality. The
`no-implicit-coercion` lint rule flags `!!` on already-resolved strings;
both ids are guaranteed non-empty by the resolve-or-return-false guards
above, so the explicit form is equivalent.

* fix(sessions): preserve lookup failures for owned children

* fix(sessions): preserve ownership lookup failures

* fix(sessions): carry ownership proof through tool access

* fix(plugin-sdk): remove stale visibility imports

* fix(sessions): preserve legacy ownership fallback

* fix(sessions): block incognito status access

* fix(sessions): preserve deterministic policy denials

* fix(sessions): block incognito semantic-current status

* test(channels): isolate env preflight contracts

* test(sessions): align ownership checks with access owner

* style(sessions): format rebased access paths

* fix(sessions): require resolved owners at access checks

* test(gateway): supply explicit session owners

* test(sessions): model expected key misses precisely

* fix(sessions): scope delegated access to target owner

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-08-13 15:03:09 +08:00
joshavant 13750feff3 fix(plugin-sdk): preserve cancellation receivers 2026-08-13 01:34:05 -05:00
joshavant b0a8cdb6f7 fix(discord): settle mixed cancellation fan-in 2026-08-13 01:34:05 -05:00
joshavant 5af3d49621 fix(plugin-sdk): make ingress cancellation fan-in safe 2026-08-13 01:34:05 -05:00
joshavant 06600e2ca0 fix(discord): unblock ingress after retry exhaustion 2026-08-13 01:34:05 -05:00