Commit Graph

427 Commits

Author SHA1 Message Date
Peter Steinberger 8876528f7c feat: clone GitHub projects from session picker (#121818)
* feat(projects): add managed GitHub clones

* feat(ui): clone GitHub projects from session picker

* fix(projects): integrate current gateway owners

* fix(protocol): derive Swift error detail accessors

* fix(ui): gate project cloning by scope

* test(gateway): isolate session prewarm probes

* revert: drop duplicate session prewarm repair
2026-08-11 18:49:16 -07:00
Sliverp 84c7d45f15 refactor(qqbot): install plugin from Tencent package (#107295)
* refactor(qqbot): remove bundled extension source

Mechanical deletion half of the #107295 squashed rebase; the catalog
repoint and host integration land in the follow-up commit.

Co-authored-by: sliverp <870080352@qq.com>

* refactor(qqbot): install plugin from Tencent package

Squashed rebase of #107295 onto current main. Repoints the official
external channel catalog at @tencent-connect/openclaw-qqbot@2.0.1 and
adapts onboarding, doctor migrations, secrets, build guards, and tests.

Documents the known limitation that the external package does not
support structured SecretRef clientSecret values; operators move those
to QQBOT_CLIENT_SECRET or clientSecretFile before upgrading.

Co-authored-by: sliverp <870080352@qq.com>

* fix(doctor): reuse shared hasOwnKey record helper

The rebased QQBot migration carried its own hasOwnKey export, colliding
with the one main now ships in legacy-config-record-shared.ts.

Co-authored-by: sliverp <870080352@qq.com>

* fix(plugins): carry catalog integrity through the update bridge

The externalized-bundled-plugin bridge dropped the official catalog's
expectedIntegrity pin, so bundled-user updates installed the external
npm package without integrity verification. The bridge now carries the
pin for the catalog's exact npm spec and both bridge install calls pass
it through; update-channel spec overrides intentionally skip the pin
since it only covers the pinned version.

Co-authored-by: sliverp <870080352@qq.com>

* chore(plugin-sdk): refresh per-entrypoint API baselines

The QQBot compat export and bundled-type removal shift 26 entrypoint
closure hashes in the new split baseline layout.

Co-authored-by: sliverp <870080352@qq.com>

* refactor(qqbot): drop helper reintroduced during rebase

Main's coercion consolidation added this file after the deletion
commit's base; its only consumers were the removed qqbot sources.

Co-authored-by: sliverp <870080352@qq.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-11 15:10:27 -07:00
Peter Steinberger e74be5d41d refactor: eliminate final wrapper-shadowing hazards (#122157)
* refactor: disambiguate wrapper-shadowed exports

* test: align renamed session and facade boundaries

* test: cover renamed runtime mock exports

* refactor: align remaining wrapper owner call sites

* test: align overlap-rebased runtime mocks

* refactor: preserve public SDK names after overlap rebase

* chore: regenerate wrapper shadowing baselines

* test: align cron model selection mocks
2026-08-11 13:34:24 -07:00
Peter Steinberger ebb2770000 refactor: eliminate export name collisions (#122084)
* refactor: eliminate export name collisions

* chore(scripts): burn resolved collision baselines

* refactor: narrow legacy session load options

* chore: refresh SDK and session debt baselines

* refactor: adopt upstream secrets collision fix

* test(plugin-sdk): mock renamed session store core

* fix(scripts): track renamed session accessor core
2026-08-11 10:41:50 -07:00
Peter Steinberger e390781534 refactor: burn cross-directory export name collisions (#121893)
* refactor: name subsystem logger exports

* refactor(test): distinguish exported test doubles

* refactor: consolidate canonical owner helpers

* refactor: give cross-domain helpers distinct names

* chore(lint): ratchet collision debt baselines

* fix(test): complete collision rename consumers

* fix(test): update remaining collision mock consumers

* fix(test): update transcript reader mock export

* refactor: keep embedded logger name at its owner

* fix(test): align embedded logger mock with owner

* refactor: name shared assistant phase extraction

* fix(ui): update assistant phase extractor import

* chore(generated): refresh collision and SDK baselines

* style(test): format merged plugin mocks

* chore(sdk): refresh API content hashes
2026-08-11 06:50:22 -07:00
Peter Steinberger fada067277 feat(browser): add zero-click Chrome extension bootstrap (#121586)
* feat(browser): add zero-click extension bootstrap

Pre-register deterministic path-derived extension IDs and install a strict native messaging host.

Keep the popup and options UI minimal while removing the obsolete copilot and page-share flows.

* fix(browser): satisfy native bootstrap CI guards

* test(browser): isolate native bootstrap Chrome roots

* test(browser): flush native bootstrap profile before status

* test(browser): seed Linux native bootstrap identity

* fix(browser): preserve native bootstrap upgrade safety

Allow immutable root-owned package inputs while keeping mutable state, manifests, and launchers user-owned. Preserve all retired copilot keys whenever active or unrecognized recovery custody remains.

* fix(browser): preserve pending copilot custody

Retired cleanup now removes copilot state only when the durable registry is exactly empty. Any session, archive, malformed value, future shape, or read failure preserves every retired key.

* fix(browser): guard native bootstrap upgrades

Fail closed while retired copilot custody remains and make discard durable across partial failures.

Require exact launcher-embedded origins and repair full launcher drift without accepting mismatched registrations.

* fix(browser): remove stale layout export

* chore(release): leave changelog to release flow
2026-08-10 19:31:13 -07:00
Ayaan Zaidi bdf202ccc8 feat(skills): reconcile learned skill collections (#121653)
Replace divergent per-skill curation with one daily isolated collection review that can consolidate, rewrite, create, and drop writable skills atomically.

Autonomous auto mode remains automatic. Adds bounded review, transactional recovery, durable cadence, shared locking, and reuse-first /learn behavior.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 02:06:26 +05:30
Peter Steinberger fe9bd7583e fix(models): migrate catalog credentials into SQLite (#87166)
* fix(models): migrate catalog credentials into SQLite

* refactor(models): share catalog JSON parser
2026-08-10 02:47:51 -07:00
Peter Steinberger ce53f7e82e refactor(agents)!: remove the session write lease (#121113)
* refactor(agents): remove session write lease

* refactor(plugin-sdk): deprecate session write lease

* refactor(doctor): remove session lock checks

* test(agents): remove session lease fixtures

* test(agents): align writer rebound assertion

* refactor(infra): remove retired session lock exports

* test(tooling): preserve embedded abort race shard
2026-08-09 15:30:48 -07:00
Peter Steinberger 27be810311 fix(sessions): resolve legacy surfaces from selected plugins (#121082)
* fix(sessions): resolve legacy surfaces from selected plugins

* fix(sessions): keep sidecar collection internal

* fix(sessions): isolate legacy sidecar loading

* style(sessions): format legacy surface imports

* fix(sessions): preserve all enabled legacy owners

* test(sessions): assert prepared surface propagation

* test(sessions): safely inspect prepared surfaces
2026-08-09 12:28:12 -07:00
Peter Steinberger 8b0735e89f refactor(memory)!: remove the QMD backend; builtin is the only memory engine (#120936)
* refactor(memory): remove qmd backend

Make builtin the sole memory-core engine, rename the retained session helper barrel, retire QMD config with doctor migrations, and remove QMD runtime/UI/policy surfaces.

* docs(memory): remove qmd backend guidance

Delete the QMD concept page, rewrite memory documentation for builtin retrieval, and remove QMD from navigation and taxonomy source.

* refactor(memory): remove qmd-only leftovers

* refactor(memory): finish qmd integration cleanup

* build(deps): align root string-width types

* build(deps): model root string-width tooling

* refactor(memory): align qmd removal ui and docs

* fix(memory): preserve qmd external paths in doctor

* test(memory): remove obsolete backend probe case

* test(plugin-sdk): refresh private type baseline
2026-08-09 03:05:47 -07:00
Peter Steinberger 4c2d8d8adb fix(doctor): migrate legacy agent databases and bound registry writes to the active state dir (#120906)
* fix(doctor): migrate legacy agent databases discovered on disk and bound registry writes to the active state dir

* fix(doctor): discover configured agent databases without registry rows

* fix(doctor): preserve filesystem and configured database identity

* fix(doctor): prioritize configured agent database identity

* fix(doctor): prefer recorded agent database ownership
2026-08-08 23:34:38 -07:00
Peter Steinberger 7a8eee4a36 perf(agents): keep turn-path model catalog reads off the full live build (#120834)
* perf(agents): keep turn-path model catalog reads off the full live build

First agent turns (embedded and cron) resolved thinking capability through
loadPreparedModelCatalogSnapshot without readOnly, which materialized the
full live model-runtime catalog: ambient synthetic-auth discovery fanned out
to every registered provider and loaded plugin discovery modules through
jiti source transform (3,172 TS modules, 36s event-loop block, +600MB heap,
58.7s model-selection on a cold gateway).

- add loadProviderScopedThinkingCatalog: manifest metadata first, then a
  provider-scoped read-only static catalog, then scoped live discovery only
  for runtime-discovery providers (preserves #116584 Ollama semantics)
- route scopedLiveProviderDiscovery through the scoped read-only loader
- scope live-mode ambient synthetic-auth refs to the requested providers
- bound the last-resort synthetic-auth sweep to discovery entry modules
- memoize per-turn plugin skill dir resolution/republish (single-slot,
  lifecycle-cleared; was a full walk + symlink republish every turn)

Cold first turn 72.7s -> ~22s wall (remaining cost is provider prefill of
the ~19.5k-token default prompt); model-selection 58,726ms -> 124ms.

* test(agents): align model-catalog.runtime mocks with scoped thinking catalog seam

Explicit vi.mock factories must export every binding prod touches; the new
loadProviderScopedThinkingCatalog export is now mocked everywhere the module
is stubbed, and the live-model-switch Ollama hydration test asserts the new
provider-scoped seam instead of the retired unscoped snapshot call shape.

* test(agents): export scoped thinking catalog from every prepared-catalog mock; split synthetic-auth helpers

- add loadProviderScopedThinkingCatalog to all explicit prepared-model-catalog
  and model-catalog.runtime mock factories (vi.mock factories must export every
  binding prod touches)
- move synthetic-auth ref scoping/resolution into
  prepared-model-runtime.synthetic-auth.ts; keeps facts under the max-lines cap

* test(agents): prove scoped thinking hydration for runtime-only models

Boundary proof for the ClawSweeper review gap: the three-tier helper stops at
manifest or scoped-static when they resolve, and runs provider-scoped live
discovery (no broad fanout) only for runtime-only models; cron selection
hydrates through the same scoped helper and skips it entirely for thinking=off.

* test(agents): accept rest args in scoped thinking catalog mocks
2026-08-08 22:48:40 -07:00
Peter Steinberger c8cd98cf52 refactor(gateway): centralize connect failure classification (#120505)
* refactor(gateway): centralize connect failure classification

* fix(gateway): project connect failure into status JSON

* fix(protocol): restore remote-auth context in pairing remediation

* fix(gateway): classify generic probe failures by close reason

* fix(gateway): keep transport closes unreachable

* fix(gateway): preserve rate-limit diagnostics

* fix(gateway): preserve typed rate-limit failures
2026-08-08 18:34:01 -07:00
Peter Steinberger eecbfcc960 fix(infra): unify env-truthiness, missing-path, realpath, and abort-sleep semantics (#120359)
* fix(infra): unify environment truthiness

* fix(infra): unify missing path classification

* refactor(infra): unify realpath fallbacks

* fix(infra): unify abortable sleep errors

* docs(infra): clarify path fallback semantics

* fix(infra): route realpaths through policy wrapper

* fix(infra): ratchet plugin SDK wildcard budget

* fix(agents): preserve zero-delay abort precedence

* fix(infra): preserve fallback and media recovery contracts

* fix(plugins): share quarantine path resolution
2026-08-08 10:58:57 -07:00
SunnyShu 21e9634f10 fix(node-cli): warn when systemd user lingering is disabled after install (#118430)
* [AI] fix(node-cli): warn when systemd user lingering is disabled after install

openclaw node install now detects when systemd user lingering is off and
warns the operator (text + JSON) to run 'sudo loginctl enable-linger <user>'.
Without lingering, the user-level node service is torn down when the last SSH
session ends, so the node silently goes offline after logout.

The check is read-only and never auto-enables lingering, matching the
operator-consent policy used elsewhere. It runs only on the verified-success
path: an optional onVerified hook is added to installDaemonServiceAndEmit
that fires after service.isLoaded() confirms the service is loaded and before
the success payload is emitted. The linger diagnostic runs there, so a failed
install or verification failure never carries a linger warning (avoids
misdirecting the operator to fix lingering for a service that was not
successfully installed). The already-installed short-circuit warns separately.
Skipped on non-Linux and when systemd user service is unavailable.

Adds unit tests for both paths, the linger=yes no-op, the install-failure
isolation, the verification-failure no-warn regression, and the
systemd-unavailable skip, plus response.test.ts cases covering onVerified
running on success and failing safely when it throws. The
readSystemdUserLingerStatus mock is typed with the full linger union to
satisfy tsgo. Documents the linger step in docs/cli/node.md and
docs/nodes/troubleshooting.md.

Real-behavior evidence captured on a Linux host by toggling
loginctl disable-linger/enable-linger and running the real install flow:
linger=no emits the warning on successful install (text + JSON) and on the
already-installed path; linger=yes emits nothing; a failed install or
verification failure emits no warning.

Fixes #107033

Co-Authored-By: deepseek-v4-flash <noreply@anthropic.com>

* fix(node-cli): align linger user with service owner

* docs(node): narrow crash-loop claim to gateway units

The duplicate-scope guard that raises on two managers running the same unit
name is enforced for gateway units (two supervisors on the same port SIGTERM
each other in a restart loop); assertNoSystemGatewayOwnership returns early
for node services, so claiming node services crash-loop misattributes gateway
behavior. Qualify the troubleshooting note accordingly.

Addresses ClawSweeper P3 finding on PR #118430.

* fix(systemd): align linger checks with service owner

* test(doctor): align linger status mock contract

* style(doctor): format linger mock

* test(wizard): mock systemd service account

---------

Co-authored-by: deepseek-v4-flash <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 19:28:10 -07:00
Vincent Koc 80da61668e improve(doctor): avoid repeated plugin metadata scans (#119482)
* perf(doctor): reuse plugin metadata snapshot

Punchcard-Session: coral-workshop-workshop-3f

* test(doctor): update legacy issue mock

Punchcard-Session: coral-workshop-workshop-3f

* fix(doctor): refresh metadata after repairs

* test(doctor): type legacy issue mock arguments

Punchcard-Session: coral-workshop-workshop-3f

* fix(doctor): invalidate scoped plugin metadata

Punchcard-Session: coral-workshop-workshop-3f

* fix(doctor): keep snapshot scope type private

Punchcard-Session: coral-workshop-workshop-3f

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-05 19:06:08 +08:00
Bek 50a30b7373 fix(codex): migrate redundant native service tiers (#118738) 2026-08-04 11:36:03 -04:00
juyaohuidt 096c929ecf fix(doctor): audit every agent workspace (#111840)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: juyaohuidt <266015826+xydt-juyaohui@users.noreply.github.com>
2026-08-03 21:04:56 +08:00
Peter Steinberger f5facf8cbf test(doctor): use core SecretRef registry fixture (#118527)
Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-02 23:17:40 -07:00
Peter Steinberger c574a6544c fix(auth): retain the selected account when migrating Codex sessions (#118205)
* fix(auth): preserve selected OAuth accounts during Codex migrations

* test(auth): complete doctor context and stabilize MCP pagination
2026-08-02 16:14:11 -07:00
Peter Steinberger 3f3ceb2def feat(gateway): track event-loop degradation persistence and add concurrency benchmark (#118193)
* feat(gateway): persist event loop degradation metrics

* fix(gateway): bound concurrency benchmark turn waits
2026-08-02 14:21:44 -07:00
Jason (Json) eef59b572b fix(doctor): stop stale builds before repair guidance (#117913)
* fix(doctor): refuse newer database schemas before repairs

* fix(doctor): preserve update before schema refusal
2026-08-02 11:52:52 -06:00
Peter Steinberger 3f9b24237b fix(doctor): preserve surviving lint selections (#117543)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 10:55:53 -07:00
Peter Steinberger 581688143a fix(doctor): reject contradictory lint check selectors (#117495)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 09:57:28 -07:00
Vincent Koc 263741b1f0 fix(ci): align release validation fixtures (#117494)
* fix(release): align beta 6 e2e fixtures

* fix(doctor): preserve missing state startup signal

* test(release): align beta e2e contracts

* test(agents): use canonical empty auth store

* test(agents): isolate prompt cooldown scheduling

* test(release): align main validation fixtures

* test(release): accept Code Mode plugin tool evidence

* fix(test): repair release validation checks

* test(cron): assert structured session targets
2026-08-02 00:39:36 +08:00
Peter Steinberger 83208eb4a9 fix(doctor): preserve unresolved per-check repair findings (#117448)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-01 08:47:27 -07:00
Peter Steinberger 3777f009d0 refactor(doctor): unify legacy auth migration ownership (#117361) 2026-08-01 04:51:46 -07:00
Jason (Json) af687f920f fix(doctor): persist normalized agent roster (#117115) 2026-07-31 19:06:14 -06:00
Peter Steinberger 8978ef44f3 fix: updates repair additive agent database schema (#116980)
* fix: repair same-version agent schema updates

* fix: converge agent schema before doctor migrations

* fix: repair session keys before doctor state checks

* test: split additive schema migration coverage
2026-07-31 12:15:21 -07:00
Peter Steinberger 6540e5ac79 fix(setup): isolate failed channel probes and report doctor diagnostics (#116824)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 05:15:34 -07:00
Omar Shahine b82a59a798 feat(cli): add openclaw automations alias and reword cron display prose (#114854)
* feat(cli): add openclaw automations alias and reword cron display prose

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

* test(doctor): update cron doctor prose assertions for automations wording

* fix(plugins): include command aliases in plugin CLI collision detection

Codex review finding on the automations alias: plugin CLI registration
seeded existingCommands from command names only, so a plugin exposing a
top-level command matching an alias-only root name (automations, terminal,
chat) would crash Commander at startup instead of being skipped. Seed from
names plus aliases; regression test covers the alias path.

* fix(cli): rename residual cron prose in CLI and gateway RPC errors

Found in combined dev-gateway E2E: automation not found / unknown automation
id errors, add/edit prose, docs tip, skills-cli mention, and the gateway RPC
not-found message. The CLI missing-get matcher accepts both message forms so
older gateways keep resolving name lookups.

* fix(gateway): keep cron.get missing wording as a wire contract for older CLI matchers

ClawSweeper rank-up: shipped CLI matchers parse 'cron job not found: <id>'
before the name-lookup fallback; the rename stays CLI-display only. Adds a
regression pinning the exact wire form.

* fix(cli): rename doctor and task-summary cron prose flagged in review

Repair-plan advisories, session-registry task summary, and the heartbeat
migration health check now say automations; recreate hints use the
openclaw automations CLI form.

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 07:16:57 -07:00
Jason (Json) a67ad03eea perf(gateway): bound prepared runtime startup work (#116261) 2026-07-30 01:41:35 -06:00
Ayaan Zaidi d8074d7ca2 fix(daemon): require system-scope ownership before removing the user unit
Doctor's dueling-scope repair removed the user-scope gateway unit on file
presence alone. A system unit file that is merely staged, disabled, failed, or
uncheckable would then cost the operator their only working gateway, and the
default confirm value is true so non-interactive repair amplifies it.

Gate the removal on isSystemUnitActiveOrEnabled: the system unit must be the
live or boot-configured supervisor. Otherwise doctor explains the ambiguity and
prints both fix directions instead of deleting anything. An erroring probe
fails closed for the same reason.

Applies the ClawSweeper rank-up move on #91221.
2026-07-30 08:52:05 +09:00
北京刻熵科技有限责任公司 9308557f72 fix(daemon): detect and resolve dueling user+system systemd gateway units
After upgrading on Linux, a user-scope unit
(~/.config/systemd/user/openclaw-gateway.service) and a system-scope unit
(/etc/systemd/system/openclaw-gateway.service) can both exist and both try to
manage the gateway. They bind the same port and each instance's stale-process
detection SIGTERMs the other, producing an endless restart cascade (#79375).

The detector `findInstalledSystemdGatewayScope` checked the user path first and
returned early, so it could never surface that both scopes coexist.

This adds, in three layers:

1. Detection: `findSystemdGatewayInstallation` — a discriminated union
   (none/user/system/dueling) that reports every installed scope without
   early-returning. `findInstalledSystemdGatewayScope` is refactored to delegate
   to it while preserving the exact user-first preference its four lifecycle
   callers rely on (no behavior change for stop/restart/is-enabled/runtime).
   Adds `uninstallUserSystemdGatewayUnit` (removes only the $HOME user unit, no
   root needed) and the pure `formatDuelingScopesWarning` helper.

2. Doctor: `maybeResolveDuelingSystemdGatewayScopes` detects the dueling state
   and, after the existing confirm/policy gate, removes the redundant user-scope
   unit while keeping the root-installed system unit authoritative. Declining or
   an externally-managed policy falls back to the existing cleanup hints.

3. Startup guard: in service mode, when a stale-kill actually happened, log a
   targeted remediation pointing at `openclaw doctor --fix` instead of letting
   the loop look like routine stale cleanup. Diagnostic only — the kill decision
   is unchanged.
2026-07-30 08:52:05 +09:00
Peter Steinberger 383f8947c1 fix: doctor skips host services for isolated state (#115922)
* fix(doctor): isolate host service management

* fix(doctor): clarify service isolation recovery

* test(doctor): isolate service identity fixtures

* test(daemon): keep lifecycle fixtures lint-clean

* test(daemon): isolate install identity fixtures
2026-07-29 11:09:56 -04:00
Vincent Koc fa16b0fcf0 refactor(status): own summary preparation 2026-07-29 18:08:41 +08:00
Peter Steinberger 8fd49c84aa feat: make self-learning automatic by default (#115576)
* feat: make self-learning automatic by default

* fix: preserve capture authorization boundaries

* test: split autonomous capture coverage
2026-07-29 02:04:57 -04:00
Galin Iliev 8aa67634ca fix: agent stops replying when a session transcript has no header row (#115080)
* fix(sessions): stop rejecting header-less persisted transcripts as legacy

Sessions whose SQLite transcript has no session header row were treated as
version 1 and hard-failed every run with "Persisted legacy session transcripts
require doctor/import migration before runtime use". Only an actual header now
declares a legacy version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(sessions): keep entry ids stable for header-less transcripts

Rebuild the header at the current version instead of inferring v1, and route
header-less transcripts that still hold legacy-shaped entries to doctor.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(sessions): repair headerless transcripts in doctor

---------

Co-authored-by: Galin Iliev <galin.iliev@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-28 21:47:51 +03:00
Peter Steinberger e8c3e8bb1a fix(doctor): eagerly canonicalize memory_index_chunks recall columns (#115154)
* fix(state): migrate memory_index_chunks columns for pre-provenance agent DBs

Fixes #115142

* fix(doctor): eagerly canonicalize memory_index_chunks recall columns

* fix(doctor): narrow memory schema import seam
2026-07-28 08:50:37 -04:00
Peter Steinberger 29b6f56254 feat(system-agent): host skills and web-search setup in Ask OpenClaw (#115130)
* feat(system-agent): host skills and search setup

* test(system-agent): align stop-message assertions with channel-specific labels

* fix(system-agent): report failed search-provider install honestly

* fix(system-agent): preserve nonfatal search setup skips

* test(flows): satisfy plugin-install mock return type

* test(system-agent): split setup-flow operation tests
2026-07-28 06:59:28 -04:00
Peter Steinberger 938749180e refactor(nodes)!: retire arming leases for durable capability enablement (#114892)
* refactor(nodes): retire phone control leases

* fix(doctor): clean retired phone control state

* docs(nodes): document durable capability enablement

* docs(changelog): defer node enablement note

* fix(doctor): harden retired phone control cleanup

* fix(doctor): fail closed on unreadable lease state

* fix(doctor): validate retired lease journals

* fix(doctor): preserve deny-shadowed consent

* docs: refresh node authorization map

* fix(doctor): keep retirement helpers private
2026-07-27 23:51:30 -04:00
Jason (Json) d3026c3b90 fix(doctor): persist config migrations before runtime checks (#114703) 2026-07-27 15:40:04 -06:00
Peter Steinberger 669db2968f refactor(agents): retire TOOLS.md into an AGENTS.md section with a doctor migration (#113966)
* fix(agents): stop retired attestation hashes from faking a vanished workspace

* feat(agents): migrate TOOLS.md content into the AGENTS.md tools section

* refactor(agents): drop TOOLS.md from the workspace bootstrap set

* refactor(policy): read tool policy entries from AGENTS.md

* docs: describe local tool notes as an AGENTS.md section

* test(codex): drop TOOLS.md developer-instruction coverage with the removed path

* test(agents): cover the TOOLS.md doctor migration behaviors

* refactor(doctor): satisfy TOOLS.md migration lint

* test(agents): split workspace attestation survival coverage

* refactor(codex): simplify workspace context basenames

* refactor(doctor): keep TOOLS.md migration helpers module-local

* docs: regenerate docs map

* fix(doctor): keep migration claims fresh

* fix(doctor): preserve nested tool notes

* refactor(doctor): split tools migration helpers

* refactor(doctor): limit TOOLS.md migration to workspace root

* style(doctor): keep migration under line limit

* fix(doctor): recover interrupted AGENTS publish

* docs(hooks): describe root-only TOOLS.md migration accurately

* fix(doctor): preserve migrated tool guidance visibility

* test(agents): regenerate prompt snapshots after rebase

* fix(policy): block evaluation while TOOLS.md is unmigrated

* fix(doctor): check merged bootstrap budget per agent

* fix(doctor): keep budget helper internal

* refactor(doctor): keep migration budget helpers to their consumers
2026-07-27 03:56:30 -04:00
Peter Steinberger 498a2caaf2 fix(models): keep dynamic model lists consistent across CLI and Gateway (#114393)
* fix(models): unify prepared catalogs and safe migration

* refactor(models): remove obsolete prepared catalog paths
2026-07-27 03:46:56 -04:00
dandriscoll 71eb9a3ec9 fix: Telegram forum topics answered twice (duplicate conversation per topic) (#113063)
* fix: Telegram forum topics answered twice (duplicate conversation per topic)

* fix(telegram): repair General topic conversation identity

Co-authored-by: Dan Driscoll <thedandriscoll.org@gmail.com>

* fix: keep doctor repair detail internal

---------

Co-authored-by: Dan Driscoll <thedandriscoll.org@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 00:42:00 -04:00
Jesse Merhi d7627d6f4c refactor(prompt): use plain inbound context labels and drop system-tag sanitizer (#112000)
* refactor(prompt): plain inbound context labels with a provenance marker

Replaces trust-worded inbound context labels ("(untrusted metadata)",
"(untrusted, for context)") with plain labels plus a fixed provenance
marker suffix appended to every OpenClaw-injected context header.

Detection keys on the marker, not label text, so strippers stay correct
across UI, TUI, replay, /trace segmentation, memory recall, and the Swift
chat preprocessor. Drops sanitizeInboundSystemTags in favor of the marker
boundary plus trusted system-prompt narration.

Renames the untrusted-named plugin SDK context identifiers to
channel-provenance names, keeping deprecated aliases registered for
removal after 2026-09-08.

Adds `openclaw doctor --fix` migrations that rewrite legacy inbound
labels in stored SQLite transcripts and purge legacy envelope-
contaminated LanceDB recall rows.

* fix(ci): resolve gate failures for plain inbound context labels

- doctor sqlite readers: open read-only connections via openNodeSqliteDatabase
  so the Kysely connection-boundary guardrail holds; unexport the now-internal
  transcript snapshot type (Knip unused-export gate).
- compat registry: split the record table into registry-records.ts and
  plugin-sdk-subpath-records.ts. The new compat record pushed registry.ts past
  the 700-line oxlint cap; suppressions are disallowed, so follow the existing
  sibling record-module pattern. Public exports and PluginCompatCode literals
  unchanged.
- acp-runtime test: assert current finalization behavior (newline normalization
  only). The bracket de-fang and System: rewrite it expected were removed with
  sanitizeInboundSystemTags; forged system lines are neutralized at the
  system-event queue, the single chokepoint feeding the System:-per-line render.
- regenerate docs_map and the plugin SDK API baseline manifest.

* fix(prompt): harden inbound context label migration and drop in-band sanitizer

Review follow-ups on the plain-label + provenance-marker change:

- Remove src/security/system-tags.ts. Rewriting inbound text to neutralize
  look-alike `System:`/`[System]` markers corrupted legitimate user text and is
  not a real injection boundary; role separation plus external-content wrapping
  is. Explicit product decision, recorded at the system-event queue.
- Narrow the LanceDB legacy-row purge so it cannot delete benign memories. It
  now requires a complete known legacy sentinel line, a legacy label followed by
  a fenced JSON body, or the complete legacy external-content header. The prior
  predicates matched ordinary prose such as `Notes (untrusted metadata):`, and
  deletion is irreversible.
- Make explicit-empty canonical ChannelStructuredContext win over the deprecated
  alias via a present/absent result instead of collapsing `[]` to undefined.
- Keep `\r?` in the active-memory doctor rule. It is the only rule spanning the
  header's line break, migrated assistant rows skip newline normalization, and
  without it the marked-header replace wins and the body strips to empty. Added
  a CRLF regression test.
- Fix stale comments that described removed behavior, and cover the Swift
  prose-block strip path.

Claude-Session: https://claude.ai/code/session_01WNzsPddQmxy9Y7jKD4wAxH
2026-07-27 11:27:53 +10:00
Jesse Merhi 6bbf1dd917 fix: open selected channel setup immediately (#113197)
* CLI: enter selected channel setup directly

* fix: keep channel direct entry resolution scoped

* fix: keep exact channel ids ahead of aliases

* test: clarify channel-only guided routing

* fix: align channel direct entry with current main
2026-07-27 03:30:15 +10:00
Shakker 3e858a2a6f fix: streamline Buzz guided setup 2026-07-26 14:09:23 +01:00
Shakker 089931d95d fix: make paused channel setup resumable 2026-07-26 14:09:23 +01:00