Commit Graph
1846 Commits
Author SHA1 Message Date
Peter Steinberger d65e712b28 feat(macos): enable native node session hosting (#131717)
* feat(macos): enable native node session hosting

Complete the app-owned node worker connection lifecycle and honor explicitly admitted Full access without bypassing node-local restrictions. Preserve one node identity, native capabilities, approval lifetime, and exact placement/turn authority.

* test(nodes): exercise canonical exec policy flows

* refactor(macos): remove obsolete node bridge serializer

* fix(nodes): bind Full authority to harness execution commands
2026-08-28 07:11:12 -07:00
Peter Steinberger b03d2e79e9 fix(sessions): prevent participant misattribution in Activity (#130986)
* fix(sessions): preserve participant identity and input provenance

Keep profile, agent, remote, observed, and legacy identities distinct in the existing participant table. Record accepted input at admission, including steering, instead of inferring a person from the session creator. Preserve historical membership and counts while leaving ambiguous profile timestamps unknown through stopped-writer Doctor migration.

Project full visibility-filtered person membership before preview limits so Activity does not misattribute channel identities or omit people outside the facepile. Keep participant membership separate from authorization and expose raw-selector ambiguity to memory operators.

Repair Doctor readiness reporting, generic Swift inline-union generation, direct-dispatch metadata handling, and fixture-owned database lifetimes. Verify namespace collisions, real provider input, accepted steering, visibility, backup/migration/reopen boundaries, native decoding, and the built-CLI lifecycle.

Fixes #130661

* fix(macos): isolate readiness and discovery lifecycles

Keep readiness fixtures private for their entire lifetime and give health readiness one deadline owner. Start and cancel slow host discovery with active discovery, not model construction.

Make native protocol, callback, onboarding, and process-cleanup tests observe their intended lifecycle phases without expanding deadlines or weakening assertions. Correct the documented signing default.

Validated with 1,839 parallel native tests, the release product build, causal negative controls, pinned Swift lint/format checks, and fresh isolated autoreview. Native production delta: -5 lines.

* docs(macos): clarify app profile isolation boundaries

* build(protocol): refresh generated Swift install models

* fix(protocol): preserve optional literal field presence

* fix(ci): bound SDK declarations and isolate test lifecycles

Discover the current declaration source graph in a joined child before normal eager emission, and track its complete source-bearing cache inputs. Repair shared jsdom focus teardown and native worker fixture request ordering without changing UI focus ownership or execution fallback policy.

* test(sessions): prove Goal participant upgrade boundaries
2026-08-28 06:04:18 -07:00
Peter Steinberger d7e280fcf6 fix(http): deliver body rejection responses before closing uploads (#131724)
* fix(http): deliver body rejection responses before closing uploads

Centralize bounded rejection transport and ordered connection admission, preserving Node response framing, upgrade flow ownership, and Feishu anomaly diagnostics. Remove duplicate request teardown and expose the shared custom-envelope rejection helper. Related: #126808, #126818.

* test(http): keep rejection fixtures typed and scoped

Prove queued responses exist before use and move the abort-activity test into its own file with shared signing/account fixtures. Preserve all wire assertions and clarify the Node HEAD callback contract.

* fix(http): preserve incoming request ownership across consumers
2026-08-28 05:01:17 -07:00
Peter Steinberger 2059ea9dfc fix(codex): persist every completed pre-steer assistant item in steering history (#131606)
* fix(codex): persist every completed pre-steer assistant item in steering history

The steering transcript prefix reused the final-answer selection barrier,
so a steer consumed after a tool or sleep barrier persisted only the
latest eligible completed assistant item. Earlier completed items stayed
in the gateway run buffer with no durable row, and after a reload the
UI's persisted-prefix subtraction could not cover them — already-seen
pre-steer output re-rendered below the operator's steering message.

Final-answer selection and steering history are different concerns: the
steering path now collects every completed, terminal-eligible, visible
assistant item in chronological order, each with its mirror identity so
repeats across subsequent steers deduplicate. Final-answer candidate
selection, its exclusion tests, terminal-result handling, and the buffer
projection are unchanged. Net +1 production line.

Regressions: four barrier scenarios (none/sleep/dynamic-tool/native-tool)
fail pre-fix losing pre-steer items; snapshot mirror-identity coverage;
UI history recovery of the split after reload.

* fix(codex): keep assistant-message options caller-owned in steering collection

Restores the caller-supplied AssistantMessageOptions contract the boundary
picker had, and tightens the collection return. Also brings the file back
under the max-lines cap that check-lint enforces (the inlined options
object pushed it two counted lines over).

* test(ui): share steering recovery fixtures across identities
2026-08-28 04:52:26 -07:00
Peter Steinberger c85129f855 fix(codex): keep native overrides effective at launch and turn start (#131745)
* fix(codex): keep native overrides effective at launch and turn start

Preserve native CLI argument ordering and temporary-root exclusions across
launch and turn preparation, including commented TOML booleans.

Fixes #131741.

* fix(codex): remove type-only launch configuration cycle

Import the existing launch options contract directly, preserving identical
runtime output while removing the config barrel dependency cycle.
2026-08-28 04:43:16 -07:00
Peter Steinberger 047470456f feat(control-ui): create and manage goals without slash commands (#131370)
* feat(control-ui): create and manage goals without slash commands

* fix(control-ui): keep goal composer contracts acyclic

* refactor(control-ui): tighten goal composer guidance

* fix(goals): admit fresh and completed local sessions

Create the first session with its Goal, input, run claim, and receipt in the existing transaction. Scope reply dispatch hooks consistently at admission and execution, and retain built-in runtime eligibility after completed turns. Preserve creator and lifecycle checks and cover the failures observed through the real Control UI flow.

* fix(ui): preserve button names during fade-in

* docs: defer Goal release notes to release generation
2026-08-28 04:31:48 -07:00
Peter Steinberger 6d04ee6e7d fix(plugins): prepare standalone source artifacts for native imports (#131615)
Add explicit source setup for already-built standalone plugin artifacts after source dependency pruning. Reuse guarded declared-host linking without rebuilding artifacts or changing compilation, managed installs, discovery, or Doctor behavior.

Fixes #131611.
2026-08-28 01:58:08 -07:00
Peter Steinberger c6c2268034 perf(plugins): unify progressive plugin cache ownership (#131442)
* fix(gateway): stop rediscovering plugin metadata while running

* perf(plugins): unify progressive plugin cache ownership

* test(plugins): cover shared registry migration reads

* fix(plugins): reuse bundled channel metadata snapshots

* test(gateway): exercise channel rollback through public boundary
2026-08-28 01:46:59 -07:00
f7a9a361d9 feat(comfy): support custom headers and per-request seed randomization (#130098)
* feat(comfy): support custom headers and per-request seed randomization

Local-mode ComfyUI requests only ever sent Content-Type, so a local
instance reachable behind HTTP auth (Basic auth, a bearer token) had no
way to authenticate. Add a generic headers config key, merged over the
plugin's own headers -- same shape as the ollama plugin's established
remote.headers pattern, rather than inventing a comfy-specific scheme.

Also add optional seedNodeId/seedInputName: without it, a static
workflow file's sampler seed never changes between submissions, so
every generation was silently identical whenever the operator's
workflow relies on a fresh random seed per run.

* fix(comfy): resolve headers through the SecretInput path, not plaintext-only

The new headers config accepted only literal strings, so a credential-bearing
value (Authorization for a gated ComfyUI instance) had no path to secret
storage -- unlike the existing apiKey field, which already resolves through
resolveSecretInputString with an env-backed fallback. Mirrors that same
pattern per-header, plus the ollama plugin's established header-secret
precedent: a header pointed at a SecretRef that can't be resolved fails the
request outright instead of silently sending it unauthenticated.

* fix(comfy): resolve non-env header SecretRefs, hide capability on unresolvable ones

resolveComfyHeadersConfig only ever resolved env-sourced SecretRefs (a
manual process.env fallback bolted onto inspect-mode); any file,
keychain, or plugin-backed reference always threw, despite the schema
and docs advertising the same SecretRef shape apiKey accepts. Now
resolves through resolveConfiguredSecretInputString (the same async
resolver the ollama plugin's own headers use) for the non-literal case,
so a real non-env credential provider actually works.

Separately, isComfyCapabilityConfigured returned true for local mode
without ever inspecting headers, so an unavailable Authorization
SecretRef advertised an image/video/music tool that would always throw
on invocation. Extends the same sync inspect-based veto
resolveComfyApiKey already applies for cloud mode's apiKey.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6

* fix(comfy): don't veto a resolvable non-env header secret from provider selection

hasUnavailableComfyHeaderSecret treated any non-env SecretRef as
unavailable for the isComfyCapabilityConfigured gate, on the theory that
inspect mode can't confirm it -- but "can't confirm yet" isn't "won't
resolve": the async request path can and does resolve a real
file/keychain/plugin-backed ref. That made a perfectly valid,
already-working header credential permanently hide the image/video/music
tools from the agent, which is a worse outcome than a rare genuinely
broken ref surfacing its error at actual invocation. Only a definitely
missing/empty env var (decidable synchronously, no I/O) still vetoes.

Added a permanent committed integration test
(workflow-runtime.header-secrets.integration.test.ts) that proves this,
plus the env/non-env header resolution and fail-closed paths, over real
sockets with no SDK/ssrf-runtime mocking -- replacing the throwaway
proof script from the previous push, which was deleted after running and
therefore not rerunnable or reviewable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6

* fix(comfy): register header SecretRefs in the plugin secret contract

headers.* accepts and resolves SecretRef values, but the manifest never
declared configContracts.secretInputs for that path -- the canonical
plugin secret lifecycle (startup materialization, owner diagnostics,
audit/configure discovery, resolved-value redaction) only walks
manifest-declared paths, so this credential surface was invisible to
all of it despite working correctly at request time. apiKey doesn't
need the same declaration (it's covered by the separate, already-wired
provider-auth system via setup.providers.envVars/providerAuthChoices);
headers.* has no other declaration path.

Also fixes two smaller findings from the same review pass: the
seed-injection test asserted the freshly-generated seed is nonzero,
but randomInt(RANDOM_SEED_EXCLUSIVE_MAX) legitimately can (rarely)
return 0 -- a flaky assertion, removed; and documents that a configured
Content-Type header is ignored specifically on image-upload requests,
where the multipart boundary must come from the runtime.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6

* docs(secrets): register comfy header SecretRefs in the credential matrix

The comfy plugin manifest change in e32863dc6cd registered
plugins.entries.comfy.config.headers.* as a secret-input target, but the
generated docs matrix and its paired markdown list weren't refreshed to
match, breaking the docs-sync CI check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk2cBRQdErwRtPea8VuhG6

* test(comfy): restore inherited header proof env

* fix(comfy): redact reflected request credentials across generation failures

Reuse the Ollama exact-header redactor through the provider HTTP SDK, scrub structured and truncated diagnostics before retaining them, and cover decoded Basic credentials observed in real ComfyUI proxy failures. Preserve optional header and seed behavior while consolidating tests and documenting the shared boundary.

Co-authored-by: Markus Hartung <mail@hartmark.se>

* fix(provider-http): handle optional Node header values safely

Skip undefined HeaderRecord values allowed by Node types and document the intentional omission of unsafe parser causes in the lint exception. Actual credential and no-header error behavior remain unchanged.

Co-authored-by: Markus Hartung <mail@hartmark.se>

* test(comfy): explicitly stringify reflected proxy header values

Keep the socket fixture compatible with the IncomingHttpHeaders union without changing its reflected-error behavior.

Co-authored-by: Markus Hartung <mail@hartmark.se>

* test(provider-http): register credential-safe parser error exception

Track the intentional preserve-caught-error suppression in the explicit inventory: raw JSON parser causes can quote request credentials. The focused inventory and provider HTTP tests pass; runtime behavior is unchanged.

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-28 01:40:22 -07:00
Peter Steinberger 3234bb295d docs(plugins): clarify installed entrypoint source fallback (#131640) 2026-08-28 01:16:17 -07:00
Ayaan GazaliandPeter Steinberger 0bb870a40a fix(channels): bundled channels reject the documented mediaMaxMb override (#118157)
* fix(channels): enforce documented media limits at byte boundaries

Resolve canonical account caps at native byte consumers, publish QA attachments durably, and refresh global media policy without resurrecting manually stopped accounts. Preserve existing local survivor warnings, remote batch atomicity, transport ceilings, and contributor schema work.

Co-authored-by: Ayaan Gazali <ayaangazali.work@gmail.com>

* fix(qa-channel): serialize preview changes with durable delivery

* test(qa-channel): reuse the typed deferred helper

* fix(auto-reply): retain media captions when block streaming is off

Resolve disabled block delivery at message-end so suppressed text callbacks cannot strip the later attachment caption. Preserve enabled break modes and per-turn precedence using the existing boolean owner.

* docs(streaming): clarify captions with block delivery disabled

* test(media): rebalance bounded core typecheck shards

Keep the existing 720-root ceiling and exact-once canonical coverage by moving media tests into the messaging shard. The plugin/platform shard reached 721 roots with the new media contract coverage; the new allocation is 682 and 526 roots. No runtime or test assertions change.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-28 00:07:56 -07:00
Peter Steinberger 870ed9a5ab fix: recover active sessions across repeated gateway restarts (#131527)
* fix: recover active sessions across repeated gateway restarts

* fix: resolve recovery CI integration failures

* chore: document transcript assertion safety

* fix: finish recovery start persistence before command teardown

* test: type command fixtures with internal session state
2026-08-27 23:25:30 -07:00
ooiuuiiandPeter Steinberger c1a9dadf90 fix(agents): keep reasoning out of generated session titles (#111829)
* fix: keep model reasoning out of generated session titles

Request strict visible output before transport recovery can discard reasoning
tag provenance. Share host-prepared completion execution across bundled
harnesses while preserving normal completion recovery and title fallback.

Keep selected model/auth routing, HTTP-boundary coverage and persisted-title
browser proof. Remove duplicate completion paths and redundant test setup.

Co-authored-by: luyifan <al3060388206@gmail.com>

* fix(agents): preserve strict empty CLI completions

Forward strict-visible output policy through the CLI owner and allow a clean
empty result only for strict isolated completions. Keep ordinary CLI empty
responses rejected before successful auth settlement, without a silent token.

Consolidate post-dispatch empty validation and duplicate usage test setup.

Co-authored-by: luyifan <al3060388206@gmail.com>

* test(agents): retain label fallback and prompt contracts

Consolidate utility-success coverage into the two-API prompt and auth-owner
table. Keep both rejected and reasoning-only utility fallback cases bound to
the selected runtime owner after the main composition.

Co-authored-by: luyifan <al3060388206@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-27 23:11:57 -07:00
Peter Steinberger b70945a58e fix(meetings): preserve realtime provider recovery (#131524) 2026-08-27 22:38:15 -07:00
Vincent KocandPeter Steinberger d7b0e07f4c fix(sandbox): revert Daytona cloud sandbox plugin (#130996)
* fix: remove Daytona sandbox plugin

Retire the unshipped cloud sandbox provider and its exclusive dependency closure; preserve Crabbox and standalone Daytona hosting documentation.

Co-authored-by: Peter Steinberger <steipete@gmail.com>

* test(ui): await catalog terminal restore completion

Wait for catalog RPC dispatch and pending-intent completion before asserting exactly one restored terminal. Reuse the request filter without weakening payload, activation, or cache checks.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-27 22:31:04 -07:00
heichl_xydigitandAyaan Zaidi abf412aba4 fix(memory-core): keep dream prompts minimal (#106404)
Keep memory-core narrative and consolidation runs on the bounded subagent prompt. Tool-free minimal runs no longer receive unrelated tool, execution, messaging, or Control UI guidance.

Co-authored-by: heichl_xydigit <hei.chengliang@xydigit.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-28 10:36:59 +05:30
Peter Steinberger 596a86fa29 fix(config): preserve channel account policy inheritance (#131250)
* fix(config): preserve channel account policy inheritance

Keep pairing and allowlist defaults at channel roots while leaving named
account policies optional across bundled channel schemas. Consolidate
root-to-account merging at the config owner and resolve inherited
policies in doctor and security audit readers.

Fixes #131087

* chore(config): regenerate channel metadata after rebase

* perf(doctor): resolve channel allow-from mode once per channel

* test(doctor): stub channel doctor capabilities in allowlist repair tests

* test(telegram): prove inherited group authorization before dispatch
2026-08-27 20:37:15 -07:00
Peter Steinberger 16b0c1f251 fix(live): repair model E2E selection and session fixtures (#131229)
* fix(ci): accept valid focused live suite selectors

Match exact provider and media shard IDs to their enabled matrix profiles. Exercise the actual validator against all emitted suite selections.

Fixes #131204.

* fix(ci): forward DeepSeek credentials through live test hydration

* fix(ci): run local TTS live tests on the media runner

* test(moonshot): honor replay models and asynchronous stream contracts

* test(memory-lancedb): verify exact duplicate memory results

* test(skills): create valid sessions for experience review

* test(live): use current provider models and thinking capabilities

* fix(gateway): avoid pending model switches on new sessions

* test(gateway): advertise trajectory approval rendering capability

* test(setup): retain redacted inference failure diagnostics

* refactor(gateway): reuse unavailable model catalog handling
2026-08-27 20:09:39 -07:00
Peter Steinberger 22d019bfdb fix(plugins): keep SecretRef configurations loadable (#131310)
Validate paired pre-resolution plugin config while preserving resolved credentials and source-selected defaults. Include source config in the existing registry cache identity so unpaired inputs cannot reuse an accepted registry. Related: #130713.
2026-08-27 17:52:20 -07:00
Peter Steinberger 864034e5ce fix(codex): repair auth ownership across private turns, custom commands, and shared clients (#131187)
* fix(codex): bridge auth into private bounded turns

* fix(codex): keep custom-command credentials ephemeral

* fix(codex): revalidate shared auth and retire failed refreshes

* fix(codex): preserve claim-derived OAuth workspace ownership

Use the canonical ChatGPT identity resolver when deciding whether a supplied OAuth snapshot still belongs to the persisted account. This prevents a scoped refresh from overwriting a replacement workspace that shares the same email.

Exercise same-workspace and changed-workspace persisted clones with both stored and claim-derived account IDs.
2026-08-27 16:37:21 -07:00
Peter Steinberger 77746299ea refactor(imap): consume the core identifier-authentication scale (#131178)
* refactor(imap): consume the core identifier-authentication scale

Use the SDK type and canonical strength comparator instead of the private
SenderStrength vocabulary and index ordering. Bind config values to the SDK
union with a compile-time exhaustiveness check, preserving all config keys.

Classify unproven From ownership, including no-evidence and DMARC temperror
results, as unverified. Only an explicit unverified minimum gains admission;
the default verified floor and asserted minimum keep their behavior. Keep
existing token admission and thrown-authenticator retries unchanged.

Document the remaining mutable token/early-rejection paths and expose only
the canonical comparator through the SDK, with packaged-consumer coverage.
The IMAP introduction has no stable release contract.

* docs(security): record landed sender-auth mitigations in the threat atlas

Record the graded exact-pair identifier-authentication gate and inert mutable
allowFrom audit findings. Mark R-008 implemented in core while retaining
per-channel verified adoption and downstream mappers as remaining work.
Keep the existing atlas structure and Medium residual risk.
2026-08-27 14:19:39 -07:00
Peter Steinberger a509254b16 feat(security): warn on inert mutable allowFrom entries (#131129)
* feat(security): warn on inert mutable allowFrom entries

Report configured entries that cannot authorize with name matching disabled,
and preview lockout counts before disabling mutable matching. Distinguish
mutable aliases from exact identifiers with unproven ownership in audit text.

Reuse channel ingress declarations through one SDK classifier without changing
admission policy. Keep Discord audit findings redacted and exclude symbolic
access-group references from mutable-identifier warnings.

Refs #131099.

* test(security): keep entry-authentication audit coverage in its lanes
2026-08-27 12:33:12 -07:00
Peter Steinberger b3eded1744 fix(hooks): run plugin triggers with HTTP hooks disabled (#131059)
* fix(hooks): schedule plugin turns independently of HTTP hooks

* docs(hooks): clarify shared HTTP capacity reservation
2026-08-27 11:34:07 -07:00
xingzhouandPeter Steinberger 474624a5c7 fix(network): guarded fetch callers can leave responses streaming (#111277)
* fix(network): release captured streams without waiting on their cleanup

End best-effort reader ownership before guarded request cleanup, while preserving explicit cancellation failures after cleanup. Simplify llama download reader ownership without changing transport abort policy.

Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>

* fix(network): preserve caller-owned response cleanup

Preserve cancellation for partially consumed media responses, type the captured response handoff, and clarify beta stream cleanup ownership.

* fix(tts): settle stream cancellation with request cleanup

Own binary-stream cleanup in the shared helper and remove duplicate provider release wrappers. Preserve explicit cancellation settlement and errors while allowing cleanup to abort retained capture branches.

Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>

* test(tts): preserve cancellation result tuple types

Keep both cancellation/release call orders while passing an explicit two-result tuple to Promise.allSettled. Preserve the existing outcome and error-identity assertions without casts or non-null assertions.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-27 11:25:14 -07:00
Peter Steinberger ff3cf3de3b docs(start): correct headless credential handoff to the SQLite auth store (#131024) 2026-08-27 09:40:27 -07:00
Peter Steinberger 706a06eab6 refactor(channels): consolidate account logout cleanup (#130976)
* refactor(channels): consolidate account logout cleanup

* fix(channels): initialize local logout plugins
2026-08-27 09:18:11 -07:00
Peter Steinberger 23ae7bcc3e fix(doctor): surface unreadable legacy plugin state instead of silently skipping migration (#130956)
Preserve missing-source and intentional parser-null skips while forwarding other read and JSON parse errors to the existing Doctor warning boundaries. Keep plugin import, archive, and persistence behavior unchanged.
2026-08-27 08:13:02 -07:00
5cdef05903 fix(channels): preserve empty docs prefixes (#103794)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Leon-SK668 <17695126+Leon-SK668@users.noreply.github.com>
2026-08-27 22:42:47 +08:00
Ayaan Zaidi 06038f9df8 fix(llama): support embedding-only managed setup (#130883)
Allow low-memory local-memory setups to install only the verified managed server and embedding model while preserving every configured chat route.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-27 18:09:53 +05:30
Peter Steinberger 3ee363fc08 docs(codex): correct effort support and provenance in harness reference (#130882) 2026-08-27 04:19:05 -07:00
Omar ShahineandOmar Shahine ea552dff2c feat(plugin-sdk): publish identifier authentication contract (#123793)
* feat(plugin-sdk): publish identifier authentication contract

* fix(discord): distinguish PluralKit identity provenance

* fix(discord): preserve PluralKit group provenance

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
2026-08-27 04:03:40 -07:00
d561469745 feat(channels): grade sender identifier authentication in the ingress kernel (#123782)
* feat(channels): add identifier authentication kernel

* fix(channels): preserve exact identity provenance

* fix(channels): fail strict dynamic groups closed

* fix(channels): bind plugin allowlists to exact identity fields

Move the Twitch role normalizers into the kernel branch and keep Discord
name and tag entries on their corresponding identity fields. Repair the
same mismatch for Slack name slugs and IRC nick@host entries.

Add regressions at the channel authorization boundaries.

Related: #123782
Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>

* refactor(channels): resolve identifier authentication at intake

Keep raw SDK inputs optional and carry required authentication through
normalized kernel subjects, entries, and state. Resolve static claims at
intake and floor omitted fields in a supplied per-message map to unverified.

Remove the deprecated internal policy wrapper, downstream strength
fallbacks, and unused type exports. Cover the partial-map floor, static
claims, and mutable alias behavior, and document the map contract.

Related: #123782

* fix(channels): retain affected admission contributions

Preserve an authentication effect when other admission contributions were
not evaluated. Prefer any affected result, then any evaluated result,
before checking for uniformly unevaluated contributions.

Cover the mixed case through the existing redacted receipt flow.

Related: #123782

* test(twitch): await monitor delivery before resetting mocks

Make the ingress fixture drain accepted deliveries on stop, matching the
real monitor lifecycle. Await those deliveries directly so prefix and
reply assertions cannot race or leak completions into the next case.

Related: #123782

* fix(feishu): match ambiguous allow entries under both id fields

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-27 03:42:38 -07:00
Peter Steinberger 11ef173077 fix: preserve native session ownership during cleanup and attachment (#130864)
* fix: preserve native session ownership during cleanup and attachment

Prepare permitted harness owners for offline session deletion. Reject direct
attachment of parent-controlled Codex children before displacing ownership.
Keep deadline and client authority through binding publication, and release
accepted subscriptions when publication fails without a remaining owner.

Unify conversation create/attach and preserve observational child monitoring.
Verified 950 focused/sibling tests, production and test types, independent
Codex review, and the real built offline CLI capacity reproduction.

* test: avoid shadowing the native binding row
2026-08-27 03:37:44 -07:00
47882f48cb fix(discord): preserve stringified components (#128498)
Preserve documented Discord Components V2 when MCP clients serialize component objects, and keep cross-channel schema discovery account-neutral.

Co-authored-by: gaoanze888 <214786078+gaoanze888@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-27 16:02:33 +05:30
Peter Steinberger 0dbd5c81d5 feat(plugins): one consent screen for plugin capabilities, bound to the reviewed artifact (#130168)
* feat(plugins): surface plugin capability consent in Control UI and CLI

Adds plugins.inspect (declared manifest surface, operator grants, install
provenance/integrity, ClawHub trust), a Control UI consent dialog on install
and external-plugin enable, a server-side acceptance gate persisted on the
install record, artifact-anchored widen diffing, and --accept-capabilities
for non-interactive CLI use.

NOT READY TO LAND: autoreview found critical gaps (see PR notes) — the
declared surface omits 20 of 21 contract families, native plugins always
report zero hooks, several install/enable paths bypass the gate, and the
acknowledgment is not bound to the reviewed surface.

* refactor(plugins): bind capability consent to the reviewed surface

Collapses the consent error payload to the fields the client cannot fetch
(reviewToken, widened, acceptedAt) and pulls identity/declared/grants/source/
trust from plugins.inspect, shrinking the registry-free protocol reader from
395 to 91 lines and removing its divergence from the closed schema.

Acknowledgment now carries the SHA-256 reviewToken of the surface the operator
saw; the server recomputes the final staged artifact's surface and rejects any
mismatch before persisting acceptance. That closes review-then-swap, laundering
of forged acceptance through an unchanged update, and cross-artifact replay.

All 22 manifest contract families are now declared, hashed and diffed, so a
privileged family such as gatewayMethodDispatch can no longer be added without
re-consent. Consent reads the manifest runtime discovery will execute, ambiguous
install ownership fails closed, integrity resolution has one owner and no longer
labels npm SHA-1 shasums as SHA-256, and code plugins disclose that hooks
register at runtime instead of rendering an empty "no hooks" row.

* fix(gateway): register plugins.inspect in method inventories and regenerate protocol

Adds plugins.inspect to the advertised-method inventories (widening the
fixed-size slice windows so older indices stay stable), regenerates the Kotlin
protocol bindings, drops an unused exported type, and replaces two nested
conditional spreads with a plain conditional.

* refactor(plugins): split oversized consent modules and clear lint findings

Extracts the MCP controller out of the plugins page, unchanged-install
reconciliation out of update-installed, and the install lifecycle suite out of
the management-service tests, bringing all three back under the max-lines limit
without suppressions. Also renames a shadowed binding, drops an unnecessary
generic, removes a spread-to-modify in a map, and types catch callbacks as
unknown.

* chore(protocol): regenerate Kotlin bindings after rebase

* feat(plugins): let chat /plugins install review and accept capabilities

The consent gate applies to chat installs too, but the command had no way to
give consent, so external installs dead-ended on a CLI-only flag. Chat now
replies with the plugin's declared capability surface and the exact command to
rerun, and accepts a trailing --accept-capabilities mirroring the existing
--force acknowledgement. ClawHub trust acknowledgement stays CLI-only.

Staged-artifact verification is unchanged: the reviewToken is still checked
against the final artifact before acceptance is recorded.

* refactor(plugins): single-source the declared-surface groups and manifest precedence

The ordered capability group list was defined independently in the consent
engine, the protocol error reader, the CLI formatter and the Control UI, so a
new contract family had to be added in four places with nothing enforcing it.
All four now derive from one canonical list in the protocol schema with a
compile-time exhaustiveness guard.

Native-versus-bundle manifest precedence is centralized in one helper that both
discovery and staged consent call, so the two cannot drift again — that
divergence was a real bug where consent read one manifest and the runtime
executed another.

Also documents that carrying acceptance forward requires pinned artifact
integrity, so integrity-less sources such as local paths ask on every install.

* fix(plugins): enforce reviewed consent across activation flows

Route setup, repair, linked installs, updates, and chat activation through artifact-bound capability consent. Reuse canonical package discovery and recheck staged activation before config publication. Invalidate stale Control UI review requests on reconnect.

Verified focused owner and sibling tests, runtime rebuild, and real isolated CLI/Gateway install, inspect, enable, widening, and stale-token rejection flows.

* test(plugins): cover beta installs through capability consent

* test(plugins): align consent fixtures with staged artifacts

* fix(ui): review staged plugin capabilities once

* test(ui): inline the remaining plugin consent confirmation

* test(plugins): verify consent with deferred install transactions

* refactor(setup): share inference execution plan construction

* test(ui): settle applied config before deferring refresh

* fix(plugins): protect consent provenance and reuse acceptance
2026-08-27 02:58:07 -07:00
Peter Steinberger b4d6aff098 chore(deps): refresh seven-day-cooled providers and native tooling (#130653)
* chore(deps): refresh cooled provider and native tooling

* build: preserve installed SDK package identity

* test: isolate dependency validation fixtures
2026-08-27 00:57:31 -07:00
Peter Steinberger f8b04160ac fix(models): keep OpenCode fallback aligned with catalog lifecycle (#130785) 2026-08-27 00:56:13 -07:00
Peter Steinberger 625f3cf7ea fix(agents): preserve Codex for reasoning capability metadata (#130752)
* fix(agents): preserve Codex for reasoning capability metadata

Keep native-compatible reasoning metadata out of authored transport overrides.
Share effective harness availability across execution, session metadata, and
thinking controls while preserving exact-request fallback and locked ownership.

Fixes #130665.

* fix(agents): keep cold harness registry reads side-effect free
2026-08-27 00:41:18 -07:00
Peter SteinbergerandVincent Koc 1ea2640f54 refactor(state): consolidate wide rows, plugin index, workspace attestations, and shared auth singletons at schema v13 (#130466)
* refactor(state): make cron and subagent rows JSON-canonical

* refactor(state): make gateway origin device tokens canonical at v13

The lazy ensure predates the table joining the canonical schema; at the
v13 bump the schema owns creation, so the feature-local DDL, WeakSet
dedupe, and lazy-list entry retire. The legacy-file guard the ensure
carried stays at each call site.

* test: drop obsolete lazy-ensure coverage for origin device tokens

The table is canonical at v13; same-version lazy creation no longer
exists to protect. Origin CRUD, isolation, and rotation coverage remains
in the surviving cases.

* refactor(state): fold installed_plugin_index into config_machine_state

The singleton index row becomes one JSON value under
plugins.installedIndex with its rollback-fencing revision inside the
value; reads, CAS restore, and the lease-held write transactions use
direct Kysely on config_machine_state so the state_leases assertion
stays in-transaction. The v13 migration imports the row and drops the
table; the additive workspace_dir entry folds with it. Doctor guidance,
docker staging, and the e2e probes name the machine-state row.

* refactor(state): merge workspace_attestations into workspace_setup_state

One row per workspace now carries both setup milestones and the
attestation clock: nullable setup columns represent attestation-only
workspaces (replaceWorkspaceAttestation can precede any setup write) and
setupExists derives from a non-null version. The bootstrap-hash FK
repoints to the merged table; migration receipts keep the historical
workspace_attestations discriminator string. The v13 migration grows and
rebuilds the table, merges attestation rows (orphans without a path
alias drop — their hashes re-derive at the next bootstrap attestation),
and the consolidation kind is renamed state-consolidation-v13 to cover
the batch.

* test(state): cover the workspace merge and consolidation fallout

The v12-to-v13 regression seeds merged, attestation-only, and orphan
attestation workspaces; the 13-to-12 downgrade fixture recreates
workspace_attestations and installed_plugin_index from the folded data;
the fold-in migration gates the additive workspace_dir column for
pre-additive rows; the workspace merge now triggers on the setup table's
own shape so stable-era databases without an attestations table still
reshape; the consolidation applied-message covers the batch.

* refactor(state): fold shared auth profile singletons into config_machine_state

The shared-state auth_profile_stores/auth_profile_state rows (fixed key
'shared') become authProfiles.store/authProfiles.state machine-state
values; the agent-DB tables of the same names are untouched. Git-backup
redaction moves from table-drop to the authProfiles. secret prefix with
seeded-secret absence proof; migration receipts keep the historical
table-name discriminators; the shared-auth relocation and receipt
verification project the KV cells back to the receipt-era row shapes so
persisted digests stay byte-compatible. mcp_oauth_stores stays a table —
its multi-key fold is a named follow-up.

* test(state): finish shared-auth fold coverage and annotate boundary casts

Auth seeders and assertions across the e2e/scripts/secrets suites target
the authProfiles machine-state cells; the v12-to-v13 regression proves
payload-byte fidelity, non-shared-row drop, and insert-if-absent
precedence; the downgrade fixture recreates and repopulates both v12
tables. Boundary type assertions in the plugin-index store carry SAFETY
invariants per the ratchet.

* chore: shrink assertion-safety baseline for plugin-index store

* refactor(doctor): delete the dead onboarding-recommendations migration

Its input — the unscoped 'primary' onboarding row — existed only between
9a93a52a8a and 473962b7de, a two-day beta window; no shipped stable
can produce it and the runtime table folded away at v12. The audit
backup list keeps recognizing system-agent.jsonl artifacts because beta
installs that ran that import may still carry its backups.

* docs: sync the 13-to-12 downgrade example with the executable fixture

* style: format the synced downgrade example

* style: drop unused import and duplicate union constituent

* fix(state): keep orphan attestations across the v13 workspace merge

The merged workspace_setup_state required a workspace path, but legacy
orphan hashed-key attestations never recorded one. workspace_path is now
nullable (setup rows still enforce it via CHECK), the v13 migration and
the doctor file import keep orphans with a NULL path that heals on the
next live access, and the 13-to-12 downgrade keeps attestation-owned
hashes. Doctor test seeds move to the folded KV row.

* perf(state): retire unused cron indexes

* fix(state): preserve v13 migration recovery

* fix(state): preserve v12 lazy-table upgrade

* docs(state): document v13 auth relocation

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-27 15:26:14 +08:00
Peter Steinberger ab255086f7 fix(plugins): report failed plugin slash commands instead of silently ignoring them (#130743)
* fix(plugins): surface failed slash command availability

Retain manifest command ownership on the active plugin record after
registration rollback. Reuse the canonical alias resolver and existing
availability states to return an authorized, redacted diagnostic for a
failed plugin's declared runtime slash command.

Keep unknown commands and intentionally disabled plugins on their existing
path. Carry the same registry-bound selection through chat dispatch and
plugin-owned binding resolution, including registry-retirement checks.

Add loader-backed regressions and document the operator-visible behavior.
Release-note context: failed plugin slash commands now identify the plugin
and failure reason and point operators to doctor and gateway logs.

Refs #112248.

* fix(plugins): share command invocation normalization

Use one matcher-owned parser for executable commands and manifest-only availability lookup, including exact-first hyphen and underscore candidates. Failed plugins now return their load diagnostic for both spellings without changing executable argument handling.

Extend the loader-backed regression table for both separator directions while retaining the existing fall-through assertions. Both added cases fail before the repair and pass afterward.
2026-08-27 00:15:09 -07:00
Peter Steinberger 7eebd6d4a6 docs(hooks): clarify setup and execution contracts (#130734) 2026-08-26 23:12:06 -07:00
Vincent Koc c45cc17e05 fix(codex): update managed runtime to 0.150.1 (#130685)
* fix(codex): update managed runtime to 0.150.1

* test(codex): refresh newer runtime fixtures
2026-08-27 13:31:46 +08:00
Mislav IvandaandPatrick Erichsen 3a5cb3847c feat(sandbox): add Daytona cloud sandbox backend plugin (#121554)
* feat: @openclaw/daytona-sandbox inital version

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>

* feat: plugin config params extended

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>

* feat: implement ClawSweeper review notes

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>

* fix(daytona): honor abort signals and clean up remote staging on failure

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>

* fix(daytona): register launcher as knip entry and refresh manifest schema

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>

* fix(daytona): cancellable session transport and auto-stopped sandbox restart

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>

* fix(daytona): deny egress by default and arm launcher cleanup before startup

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>

* fix(daytona): stop cancelled startup before submission

* test(daytona): satisfy deferred race lint

* test(release): update plugin publisher inventory

* fix(daytona): close provisioning and PTY cleanup gaps

* test(daytona): type PTY launcher mock

* fix(acpx): avoid promise-returning line handler

* fix(daytona): await PTY signal cleanup

* fix(daytona): declare ClawHub install route

* fix(daytona): forward PTY stdin EOF

* fix(daytona): serialize PTY input

* docs(daytona): document sandbox backend config

---------

Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-26 20:52:12 -07:00
Peter Steinberger 0924fd9a0c fix(codex): reclaim binding capacity after session deletion (#128366)
* fix(codex): reclaim binding ownership when sessions are deleted

Prepare harness deletion outside the SQLite writer and compare-delete exact companion ownership at the session removal edge, with compensation before commit and native subscription release afterward. Preserve live siblings and upstream native history. Repair proven orphan bindings through the existing Doctor planner under maintenance ownership.

* fix(codex): reuse prepared auth for resumed thread ownership

* docs(plugins): clarify shared migration and auth contracts

* test(codex): use the canonical config type facade

* fix(codex): preserve native threads during manual resume

Record pending attachment intent and validate the immutable native tool catalog
before applying configuration to the selected thread. Require uninterrupted
physical-client ownership through native unsubscribe, resume, and binding commit.
Keep the thread intact on unsupported policy, competing work, or failed proof.

Reuse canonical retained-owner cleanup and preserve unsafe-client retirement.
Cover the real command producer, cold and loaded resumes, competing leases,
lazy-store commit fencing, and the Gateway competing-owner path.

* test: isolate Codex auth and session completion fixtures
2026-08-26 20:33:53 -07:00
Peter Steinberger 7c6a79828a fix(feishu): preserve unavailable controls in message cards (#130641) 2026-08-26 20:27:31 -07:00
Peter Steinbergerand1052326311 4b287caac3 fix(memory): stop false Copilot index mismatch warnings (#130603)
Share provider-owned canonical model projection across cold identity and creation, keep undiscovered models unknown, and preserve strict initialized identity checks. Consolidate obsolete lookup and table-existence paths.

Co-authored-by: 1052326311 <65798732+1052326311@users.noreply.github.com>
2026-08-26 19:50:15 -07:00
Peter Steinberger bbd66c475e fix(plugins): fail closed when plugin runtime is unavailable during registration (#130597)
* fix(plugins): fail closed when plugin runtime is unavailable

Core fabricated an empty object as `PluginRuntime` for the `cli-metadata`
and `setup-only` registration passes, so any plugin touching `api.runtime`
during `register()` died with an opaque
`TypeError: Cannot read properties of undefined (reading 'openSyncKeyedStore')`
that named neither the contract nor the mode.

Replace those fabrications with one shared fail-closed runtime that throws a
named, actionable error identifying the plugin and registration mode. Symbol
reads stay inert so inspection and reflection cannot trigger the guard.

Also resolve the lightweight `cli-metadata` entry beside the resolved plugin
entry, not only at the package root. Published plugin packages emit it at
`dist/cli-metadata.js`, so the probe always missed and the loader fell back to
executing the full heavy entry for CLI metadata collection.

Documents which registration modes expose a live `api.runtime`; the SDK
reference previously claimed it was injected into every plugin.

* fix(ui): restore sidebar lazy import boundaries

Remove the redundant viewer-facepile dynamic import: sidebar consumers
already register that element through the static graph.

Import pet data and sprite helpers from their owning leaf modules, delete
the registration module's re-export barrel, and make the element itself
the lobster-pet.runtime.ts lazy boundary. Keep shared sprite styles with
the look renderer so standalone pages do not need element registration.

Regenerate the measured boot inventory with the canonical browser probe.
Use Lit's typed lifecycle map to remove the obsolete assertion baseline
entry and keep the now-private facepile variant type local.

The full build has no INEFFECTIVE_DYNAMIC_IMPORT warnings. Relevant UI
coverage passes (503 tests plus 5 Chromium E2E tests); the unchanged plugin
runtime regression suites pass all 58 tests. The broad plugin suite still
reports schema-version, doctor-closure, hook-process, and catalog failures.
2026-08-26 19:45:39 -07:00
Ayaan Zaidi 1cb914d6bf fix(telegram): make ask_user controls native and reliable (#130262)
Make ask_user use native Telegram controls when one single-select question can be represented directly, while keeping multi-select and batch questions on the text fallback. Add native Other-to-ForceReply input, preserve Gateway-owned option ordering across Telegram, Slack, and Discord, and prevent later progress from overwriting the delivered question.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-27 08:14:39 +05:30
Peter Steinberger 67d22a58ac refactor(embeddings): unify provider contract (#130506)
* refactor(embeddings): unify provider contract

* test(plugins): declare embedding type bridge

* test(memory): migrate embedding fixtures
2026-08-26 18:20:48 -07:00
Peter Steinberger 42112dd86e fix(feishu): preserve commands in select fallback cards (#130515) 2026-08-26 17:41:40 -07:00