Commit Graph

693 Commits

Author SHA1 Message Date
Tak Hoffman
59e2825274 fix: deprecate models add command (#71175) 2026-04-24 12:20:59 -05:00
lsdsjy
7d1891e6e6 feat(deepseek): support v4 models
Add DeepSeek V4 Flash/Pro support, update Pi packages to 0.70.2, and handle disabled thinking/None by stripping replayed reasoning content.
2026-04-24 16:09:36 +01:00
Peter Steinberger
6c509d8d4b docs: clarify codex plugin auto-enable boundary 2026-04-24 06:38:54 +01:00
Patrick Erichsen
aca92b2906 memory/dreaming: decouple managed cron from heartbeat (#70737)
* Revert "fix(memory/dreaming): surface blocked status when heartbeat is disabled for main (#69875)"

This reverts commit 529577e045.

Making way for the dreaming-vs-heartbeat decoupling from Josh's
josh/dreaming-isolated-cron-fix branch, which moves the managed dreaming
cron to isolated agent turns (sessionTarget: "isolated") so dreaming no
longer requires heartbeat to fire. Once the cron no longer rides the
heartbeat path, the blocked-reason observability has nothing left to
report — removing it cleanly here before the cherry-picks land.

* openclaw-3ba.1: move managed dreaming cron to isolated agent turns

* openclaw-46d: claim cron runs before embedded attempts

* openclaw-575: disable managed dreaming cron delivery

* openclaw-575: accept wrapped dreaming cron tokens

* openclaw-ccd: filter cron and wrapper transcript noise from dreaming corpus

* openclaw-cd9: filter archived, cron, and heartbeat transcript noise from dreaming corpus

* openclaw-cd9: suppress role-label reflection tags in rem dreaming

* openclaw-b49: stop narrative timeouts from blocking dreaming cron

* openclaw-b49: keep managed dreaming cron out of diary subagents

* openclaw-ff9: restore cron dream diary generation without serial waits

* openclaw-ff9: run dreaming narratives with lightweight isolated subagent lanes

* openclaw-ff9: detach cron dream diary generation from run completion

* openclaw-ff9: defer cron diary task startup until after cron completion

* doctor/cron: migrate stale managed dreaming jobs to isolated agent turns

After the dreaming cron moved off the heartbeat path to sessionTarget:
"isolated" + payload.kind: "agentTurn" (see the preceding memory-core
changes), users with existing ~/.openclaw/cron/jobs.json entries in the
old sessionTarget: "main" + payload.kind: "systemEvent" shape still
carry stale jobs until the gateway restart reconcile rewrites them.

Add a dreaming-specific cron migration to the existing
maybeRepairLegacyCronStore doctor path so "openclaw doctor" (and
"openclaw doctor --fix") rewrites those jobs without needing a gateway
restart. Match lives in a new doctor-cron-dreaming-payload-migration
helper alongside the existing legacy-delivery and store-migration files.

The matching uses the memory-core managed-job name and description tag
plus the short-term-promotion payload token. Constants are mirrored
from extensions/memory-core/src/dreaming.ts and commented so a future
rename in memory-core is a visible drift point here too.

* memory/dreaming: tighten cron-token match to known wrapper, not substring

The previous match relaxed the line check from 'trimmed line equals token'
to 'line contains token anywhere as a substring' to accept the
`[cron:<id>] <token>` wrapper that isolated-cron turns add. Substring
matching also let any user message embedding the token mid-sentence
trigger the dream-promotion hook, and was flagged by both Greptile and
Aisle on PR #70737.

Replace it with strip-the-known-prefix-then-exact-match: keep the
`[cron:<id>]` wrapper case working, reject every other variant. Add
focused unit coverage that the bare token, the wrapped token, and bare
multiline cases match while embedded / code-fenced / arbitrarily-wrapped
variants do not.

* memory/dreaming: drop assistant followup only on assistant-side signals

Per PR #70737 review (aisle-research-bot, Medium): the previous logic
suppressed the next assistant message whenever the prior user message
matched a 'generated prompt' pattern (`[cron:...]`,
`System (untrusted): ...`, heartbeat prompts, exec-completion events).
Real users can type those same patterns, which let a user exfiltrate
real assistant replies from the dreaming corpus by prefixing their own
prompt — the assistant's reply would be silently dropped.

Remove the cross-message coupling. Assistant-side machinery (silent
replies, system wrappers) is already dropped by sanitizeSessionText,
which is the right layer for that filter. Add an explicit assistant-side
HEARTBEAT_TOKEN check to keep the legitimate `HEARTBEAT_OK` ack drop
working without depending on the prior user message. Add a regression
test exercising the spoofing scenario.

* doctor/cron: assert mirrored dreaming constants stay in sync

Per PR #70737 review (greptile-apps): the doctor migration mirrors three
constants (MANAGED_DREAMING_CRON_NAME, MANAGED_DREAMING_CRON_TAG,
DREAMING_SYSTEM_EVENT_TEXT) from extensions/memory-core/src/dreaming.ts.
A future rename in either file would silently break the migration.

Add a vitest unit that reads both files and asserts the literals match.
Manually verified the assertion fires with a clear error when one side
diverges. Adds no runtime cost; sits in the regular test pipeline.

* fix(memory): stabilize dreaming CI checks

* memory/dreaming: skip eager narrative session cleanup when detached

Per PR #70737 review (chatgpt-codex-connector, P2): runDreamingSweepPhases
called deleteNarrativeSessionBestEffort synchronously right after each
phase. Once narrative generation moved to detached mode (queued via
queueMicrotask), the eager cleanup races the writer: the session is
deleted before the queued subagent run reads it, silently dropping cron
diary entries.

Skip the eager cleanup branch when params.detachNarratives is true.
generateAndAppendDreamNarrative still runs its own deleteSession in the
finally{} block, so the cleanup intent is preserved without the race.
Heartbeat-driven (non-detached) runs keep the original eager-cleanup
behavior.

* fix(plugin-sdk): restore heartbeat-summary re-export

Per PR #70737 review (chatgpt-codex-connector, P1): the revert of
PR #69875 dropped the `heartbeat-summary` re-export from
`openclaw/plugin-sdk/infra-runtime`. That subpath shipped publicly two
days earlier, so removing it is technically a breaking change to a
public SDK surface — third-party plugins importing
`isHeartbeatEnabledForAgent` / `resolveHeartbeatIntervalMs` from this
path would fail with no replacement contract introduced.

Restore the re-export. Costs nothing to keep; the helpers are already
public via `../infra/heartbeat-summary.ts`. SDK additions are by
default backwards-compatible (CLAUDE.md), so removing within days of
introduction violates that intent.

* changelog: note dreaming decoupling from heartbeat

Refs PR #70737.

---------

Co-authored-by: Josh Lehman <josh@martian.engineering>
2026-04-23 22:23:19 -07:00
Josh Lehman
51186d2725 feat(codex): run context-engine lifecycle in app-server harness (#70809)
Port the Codex app-server harness onto the context-engine lifecycle, add Codex context projection and compaction integration, and cover bootstrap/history/compaction fallback behavior.

Thanks @jalehman.
2026-04-24 05:06:45 +01:00
Vincent Koc
ed286078d6 docs(concepts): expand agent runtime opening with contract orientation 2026-04-23 20:36:40 -07:00
Vincent Koc
ae609e0249 docs(gateway): split configuration-reference by extracting tools and custom providers into config-tools 2026-04-23 20:34:46 -07:00
Vincent Koc
031c3b22de docs: clarify pruning behavior and setup TL;DR orientation 2026-04-23 20:26:26 -07:00
Vincent Koc
07cee914aa docs(gateway): split configuration-reference by extracting agent-defaults cluster into config-agents 2026-04-23 20:11:12 -07:00
Vincent Koc
72a8e4e5db docs(codex): clarify hook layering
Clarify Codex hook layering in the harness docs.
2026-04-23 20:09:46 -07:00
Vincent Koc
9153598e65 docs(plugins): split architecture by extracting internals (load pipeline, runtime hooks, HTTP routes, schemas) 2026-04-23 20:03:22 -07:00
Patrick Erichsen
3a18801343 Add Discord live QA lane (#70792)
* Add Discord live QA lane

* Add Discord native command QA coverage
2026-04-23 19:48:37 -07:00
Peter Steinberger
2af88fab6c docs: document local memory embedding provider 2026-04-24 03:11:22 +01:00
Peter Steinberger
903308dbf2 fix: stabilize qa lab mock suite 2026-04-24 02:46:33 +01:00
Peter Steinberger
d8eb5ffef0 docs: fix typebox rpc link 2026-04-23 23:51:50 +01:00
Vincent Koc
c843c5b4ac docs: tighten passive voice and hedging on context-engine, xai, anthropic, building-plugins 2026-04-23 15:50:43 -07:00
Peter Steinberger
14c4143723 docs: clarify OpenAI GPT-5.5 auth routes 2026-04-23 23:49:17 +01:00
Vincent Koc
367b9721b6 docs(concepts,automation,plugins): add Related sections to pages missing them 2026-04-23 15:48:46 -07:00
Vincent Koc
41448da417 docs: gloss agentDir, BOOT.md, and ambiguous dashboard pronoun 2026-04-23 15:45:29 -07:00
openclaw-docs-agent[bot]
452a1b6341 docs: refresh documentation 2026-04-23 22:08:58 +00:00
Peter Steinberger
f5042adf27 feat: add forked subagent context 2026-04-23 21:28:58 +01:00
Vincent Koc
c5c163d078 docs: standardize frontmatter field order (summary before title) 2026-04-23 13:18:17 -07:00
Peter Steinberger
f6336c5521 fix(openai): retire removed Codex Spark model 2026-04-23 21:16:46 +01:00
Vincent Koc
2777b089b5 docs: normalize frontmatter titles to sentence case 2026-04-23 13:15:17 -07:00
Vincent Koc
4a2cd533ac docs: remove duplicate H1 where frontmatter title already sets it 2026-04-23 13:11:14 -07:00
Peter Steinberger
a8173276bf docs(openai): canonicalize GPT model refs 2026-04-23 20:47:38 +01:00
Peter Steinberger
89051c6bf6 docs(openai): document GPT-5.5 defaults 2026-04-23 20:19:15 +01:00
Vincent Koc
ed52e2ec91 docs(concepts): compress model-providers reference — move SDK hook list to provider plugins doc, tabulate bundled providers 2026-04-23 09:20:59 -07:00
Mariano
10a9acbf29 fix: keep root memory uppercase (#70621)
Thanks @mbelinky.
2026-04-23 16:10:36 +01:00
Ayaan Zaidi
c22a21759b test(qa): report telegram reply rtt 2026-04-23 14:33:17 +05:30
Vincent Koc
d1f91b52fa docs: restructure cli index and active memory pages 2026-04-23 00:42:08 -07:00
Vincent Koc
ea3970f138 docs: CLI + gateway + plugin harness coverage for 48h changes 2026-04-22 23:49:06 -07:00
Peter Steinberger
834fdc4832 docs: align documentation with current surfaces 2026-04-23 07:25:06 +01:00
Shakker
bd4cfe0e7e docs: document provider ids and auth contracts 2026-04-23 07:22:24 +01:00
Peter Steinberger
35ec4a9991 fix: make session write locks non-reentrant by default 2026-04-23 04:57:30 +01:00
Peter Steinberger
b09aed8271 fix: cap long SDK retry waits (#68474) (thanks @jetd1) 2026-04-23 03:32:35 +01:00
Peter Steinberger
5461195035 docs: document session mailbox discovery (#69839) 2026-04-23 02:33:55 +01:00
dangoZhang
1a4c32e366 feat: expose mailbox session discovery in sessions_list 2026-04-23 02:33:55 +01:00
Peter Steinberger
22814c1add docs(config): document safe model config merges 2026-04-22 23:23:54 +01:00
Tak Hoffman
78d491d909 feat(commands): gate /models add with modelsWrite (#70321) 2026-04-22 14:49:07 -05:00
Neerav Makwana
5462d4d5c5 fix: drop silent parent replies while subagents are pending (#69942)
Drop bare parent NO_REPLY payloads while spawned subagents are pending, preserving quiet parent turns until child completion delivers the real reply.\n\nThanks @neeravmakwana.
2026-04-22 20:04:38 +01:00
Tak Hoffman
f328c21046 feat: Add /models add hot-reload model registration (#70211)
* feat(models): add chat model registration with hot reload

* docs(changelog): add models entry for pr 70211

* fix(models): harden add flow follow-ups

* fix models add review follow-ups

* harden models add config writes

* tighten plugin boundary invariant

* move models add adapters behind sdk facades

* avoid ollama-specific core facade
2026-04-22 12:00:30 -05:00
Ayaan Zaidi
18869acf46 fix(cli): keep provider-owned sessions through implicit expiry 2026-04-22 15:35:21 +05:30
pashpashpash
89932593bb Show typing while heartbeats are running (#69963)
* Heartbeat: show typing during runs

* Heartbeat: fix typing review issues

* Discord: preserve heartbeat typing config
2026-04-22 13:50:27 +09:00
Shakker
651d5e0022 docs: document provider catalog model discovery 2026-04-22 04:51:38 +01:00
Patrick Erichsen
529577e045 fix(memory/dreaming): surface blocked status when heartbeat is disabled for main (#69875)
* fix(memory/dreaming): surface blocked status in memory status when heartbeat disabled for main

Replace the hand-rolled heartbeat-rules logic in resolveDreamingBlockedReason
with the shared resolveHeartbeatSummaryForAgent helper, promoted from core to
the plugin-sdk via infra-runtime. Collapses the two disabled-reason branches
into a single message that points at a new Troubleshooting section in the
dreaming docs, so the silent-failure mode described in openclaw/openclaw#69843
becomes legible without the extension re-encoding heartbeat-enablement rules.

Refs openclaw/openclaw#69843, openclaw/openclaw#46046.

* refactor(memory/dreaming): share resolveDreamingBlockedReason across cli and /dreaming surfaces

- Move resolveDreamingBlockedReason from cli.runtime.ts into dreaming.ts as an exported helper and pin its heartbeat check to DEFAULT_AGENT_ID (now exported from plugin-sdk/routing) so the status-line check agrees with the cron's hardcoded sessionTarget even when the configured default agent is not main.
- Render the blocked reason from formatStatus in dreaming-command.ts directly under the enabled line, so /dreaming status, /dreaming on, /dreaming off, and bare /dreaming all flag that the cron is blocked instead of implying dreaming is healthy.
- Tighten the blocked-reason text to lead with user impact ('dreaming is enabled but will not run because heartbeat is disabled for main'), so operators immediately understand the config is toggled on but nothing is actually running.
- Tighten the dreaming Troubleshooting copy to name main explicitly and mention both surfaces.
- Add tests locking the new behavior across cli.test.ts (default-agent=ops still reports blocked for main) and dreaming-command.test.ts (/dreaming status ordering, /dreaming on surfacing, healthy-heartbeat omission).

Refs openclaw/openclaw#69843, openclaw/openclaw#46046.

* fix(memory/dreaming): check heartbeat for the resolved default agent, not the literal 'main'

sessionTarget: 'main' is a cron session-type enum variant meaning 'the default agent's main session', not an agent id (see src/cron/service/jobs.ts). buildManagedDreamingCronJob does not set agentId, and cron runtime resolves the missing agentId through resolveDefaultAgentId(cfg) before enqueuing or waking. The previous pin to DEFAULT_AGENT_ID could produce a false 'blocked' reading when a configured default agent is not 'main' and its heartbeat is fine, and could miss a real block when the default agent is not 'main' and that agent's heartbeat is actually off.

Switch resolveDreamingBlockedReason to resolveDefaultAgentId(cfg) and interpolate the resolved agent id into the message so the blocked line names the agent whose heartbeat is the blocker. Introduce a narrow local CRON_SESSION_TARGET_MAIN constant for the cron session-type enum variant (used by the sessionTarget type and value) so the remaining 'main' literal is semantically distinct from any agent id. Revert the DEFAULT_AGENT_ID export addition on plugin-sdk/routing; memory-core no longer needs it. Update the Troubleshooting doc wording and the cli test that was locking the wrong behaviour.

Refs openclaw/openclaw#69843, openclaw/openclaw#46046.

* fix(memory/dreaming): align blocked check with server-cron wake's defaults-only heartbeat

resolveDreamingBlockedReason was using resolveHeartbeatSummaryForAgent, which merges agents.defaults.heartbeat with agents.list[].heartbeat. The managed dreaming cron leaves job.agentId and job.sessionKey unset, so server-cron's wake wrapper cannot look up a per-agent entry and calls runHeartbeatOnce with agents.defaults.heartbeat only. Using the summary helper would disagree with the actual wake when the default agent overrides heartbeat.every differently from the defaults (either direction — false blocked when the override would run, or false healthy when defaults block).

Mirror the wake path explicitly: rule-1 enablement via isHeartbeatEnabledForAgent against the default agent, rule-3 interval via resolveHeartbeatIntervalMs with defaults-only heartbeat config. Comment points at server-cron so a future cleanup of that latent override-propagation gap sees the coupling.

Refs openclaw/openclaw#69843.
2026-04-21 18:51:43 -07:00
claycurry
6a68f1dd57 Docs: link feature cards to relevant pages
Link docs feature cards to their intended destination pages in the English docs surfaces.

- add hrefs to the feature cards in docs/concepts/features.md
- add hrefs to the key capability cards in docs/index.md
- preserve current main branch copy while landing the navigation fix
2026-04-21 20:36:55 -05:00
Peter Steinberger
fb9a21ae8f fix: centralize draft preview finalization 2026-04-22 02:32:55 +01:00
Peter Steinberger
aa94501f5f feat(openai): default images to gpt-image-2 2026-04-21 21:49:16 +01:00
Vincent Koc
9702f0bf21 docs: tool-progress preview streaming, Control UI avatar auth, exec heredoc and external-content token sanitization 2026-04-21 13:39:55 -07:00