Yuval Dinodia
f826a665a2
fix(compaction): trim prefix when transcript ends in an oversized tool result ( #95860 )
...
findCutPoint defaulted cutIndex to the earliest valid cut (cutPoints[0],
keep everything) and only moved it forward to a cut point at or after the
backward token cursor. When the final entry is a toolResult whose estimate
alone meets keepRecentTokens, the cursor stops at that trailing toolResult
index, no valid cut point sits at or after it (toolResult entries are not
valid cut points), and the default stuck at keep-everything. Compaction then
summarized zero messages, so preflight and overflow compaction silently
no-op and the session loops on a context it cannot shrink.
Default cutIndex to the most recent valid cut before the forward search.
When a cut point exists at or after the cursor the search still finds it and
behavior is unchanged; only the trailing-tool-result case now keeps the
recent tail and summarizes the prefix.
2026-06-23 07:34:33 +00:00
teamclaw
7fe287b0d3
fix(agent-core): stop loop after aborted tool run ( #94412 )
...
Merged via squash.
Prepared head SHA: e11d9718e3
Co-authored-by: szsip239 <88223778+szsip239@users.noreply.github.com >
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com >
Reviewed-by: @vincentkoc
2026-06-22 18:04:50 +08:00
Yuval Dinodia
2ece2945ae
fix(compaction): count user-message image blocks in cut-point estimator ( #95128 )
...
estimateTokens charged 4800 chars per image in the toolResult branch but
counted only text in the user branch, so image blocks in recent user turns
scored zero. findCutPoint never reached keepRecentTokens and left the cut at
the earliest point, so image-heavy sessions compacted to a no-op and looped on
context overflow. Fold the per-image accounting into one shared helper used by
both branches.
2026-06-22 13:48:02 +08:00
Vincent Koc
328a44695f
chore(deadcode): remove unused agent-core prompt formatter
2026-06-22 06:23:07 +08:00
Vincent Koc
464adfe5e5
chore(deadcode): remove unused agent-core harness APIs
2026-06-22 06:08:32 +08:00
snowzlm
1a002c2d9d
fix(agents): preserve prompt-released session state ( #93194 )
...
Preserve concurrent prompt-time transcript updates across stale session managers, side appends, transcript navigation, nested owned writes, and doctor repair.
Fixes #93193 .
Thanks @snowzlm for the report and original fix.
Co-authored-by: snowzlm <snowzlm@noreply.codeberg.org >
2026-06-16 10:21:01 +02:00
Peter Steinberger
0314819f91
fix(agents): replace prose terminal classifiers ( #93228 )
...
* fix(agents): replace prose terminal classifiers
Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com >
* fix(agents): preserve terminal failure lifecycles
* fix(agents): order parallel terminal summaries
* fix(agents): preserve structured post-tool silence
* fix(agents): preserve structured replay provenance
---------
Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com >
2026-06-15 02:53:14 -07:00
Jason (Json)
965fa05df3
feat: add tool search directory mode
...
Add an experimental directory mode that keeps large authorized tool schemas deferred while exposing bounded discovery, exact deferred hydration, and normal OpenClaw policy/hook execution. Client tools remain directly visible; ambiguous hidden names fail closed.
2026-06-13 20:08:39 -07:00
Josh Avant
462092936a
fix(agent): continue after source message tool replies ( #92343 )
2026-06-12 11:14:57 -05:00
Peter Steinberger
0e7b5c3429
feat(anthropic): support Claude Fable 5 adaptive thinking ( #91882 )
...
* feat(anthropic): support Claude Fable 5
* test(anthropic): tighten Fable stream fixtures
* fix(anthropic): preserve Vertex input types
* test(anthropic): use provider-ready Vertex effort
* fix(anthropic): support Fable deployment aliases
* fix(anthropic): discard incomplete Fable output
* feat(anthropic): support Fable on Bedrock
* fix(anthropic): preserve Fable reasoning contracts
* refactor(anthropic): unify canonical Claude model policy
* fix(anthropic): satisfy extension thinking types
* test(anthropic): complete canonical alias fixture
* fix(bedrock): scope thinking case declarations
2026-06-10 08:08:35 -07:00
Vincent Koc
6fcc945702
fix(agents): trim dense text delta snapshots
...
Trim dense plain text-delta stream snapshots for OpenAI-compatible, Responses, and Ollama providers while preserving full snapshots on stream checkpoints and terminal events.
Reconstruct partial-less text deltas in the agent loop so live message updates continue to advance for immutable snapshot providers, and document the optional text_delta.partial contract.
Fixes #86599 .
2026-06-09 13:21:23 +09:00
Vincent Koc
81234fbf12
feat(skills): expose content versions in skill prompts
2026-06-09 01:45:42 +09:00
Peter Steinberger
4df95d3c3f
docs: document package sources
2026-06-04 20:54:41 -04:00
Peter Steinberger
bdfeece562
docs: document agent core package
2026-06-04 01:23:43 -04:00
Peter Steinberger
b4dfa950b5
refactor: tighten agent harness surfaces
...
Refactor the agent harness surface after PR #88821 by moving compaction dispatch into its own module, splitting the harness type into explicit capability interfaces, and renaming the private agent-core class declaration to `CoreAgentHarness` while preserving the exported `AgentHarness` contract.
Verification:
- `node scripts/run-vitest.mjs src/agents/harness/selection.test.ts src/agents/command/cli-compaction.test.ts src/agents/embedded-agent-runner/compact.hooks.test.ts packages/agent-core/src/agent-loop.test.ts packages/agent-core/src/harness/messages.test.ts`
- `pnpm build`
- autoreview clean
- `pnpm check:changed` passed on Testbox `tbx_01kt407hq8sv1csm287pdj3fmp`
- PR CI merge state `CLEAN`
2026-06-02 07:20:43 -04:00
Peter Steinberger
27dde7a4d6
chore(lint): enable stricter error rules
2026-06-01 01:12:21 +01:00
Peter Steinberger
b653d94918
chore(lint): enable no-useless-assignment
2026-05-31 22:40:48 +01:00
Peter Steinberger
304e2c83c0
chore(lint): enable stricter oxlint rules
2026-05-31 18:59:02 +01:00
Peter Steinberger
85beee613c
docs: clarify inline code comments
...
Comment-only follow-up documenting reusable gateway, auth, proxy, device, Talk, session, and agent helper contracts.\n\nVerification: git diff --check plus targeted tests recorded in PR body.
2026-05-31 14:37:41 +01:00
Peter Steinberger
f5eca3f84c
chore(lint): enable object and reassignment rules
2026-05-31 09:32:52 +01:00
Peter Steinberger
b9fe0894a6
chore(lint): enable additional cleanup rules
2026-05-31 08:16:11 +01:00
Peter Steinberger
4eba3e5d7d
chore(lint): enable more readability rules
2026-05-31 07:38:33 +01:00
Peter Steinberger
deb7bc6539
chore(lint): enable readability lint rules
2026-05-31 07:17:57 +01:00
keshavbotagent
371a8abe9d
fix(build): avoid stale agent-core dts warnings ( #87915 )
...
* fix(build): avoid stale agent-core dts warnings
* test(secrets): secure plugin entrypoint fixtures
* fix(agent-core): normalize compaction summary timestamps
* test(secrets): secure platform preset fixture
* fix(build): preserve tracked package dts on skip builds
* test(secrets): secure platform preset resolver fixture
* fix(build): keep declarations during skip dts clean
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com >
2026-05-30 21:03:49 +01:00
Vincent Koc
231d0b28bd
fix(agents): harden message dts and block timestamps
2026-05-30 20:58:21 +02:00
Peter Steinberger
7840fdbada
fix(agent-core): cap shell exec timeouts
2026-05-30 02:40:32 -04:00
Peter Steinberger
aa0d6e1bca
refactor: extract LLM core packages ( #88117 )
...
* refactor: extract llm core packages
* chore: drop generated llm package artifacts
* fix: align llm package export artifacts
* test: fix moving main CI expectations
* fix: align llm core subpath aliases
* fix: use llm package exports
* fix: stabilize llm package boundary artifacts
* fix: sync llm boundary path contract
* test: isolate crabbox provider env
* test: pin crabbox configured-provider cases
* test: apply crabbox lease provider override
2026-05-30 07:45:04 +02:00
Vincent Koc
e9dee8dfe1
refactor: share harness truncation result helpers
2026-05-30 04:41:49 +02:00
Vincent Koc
deb48a96fb
refactor: share prompt template arguments
2026-05-30 03:05:46 +02:00
Vincent Koc
1a4eb0b5e7
refactor: share agent truncate utilities
2026-05-30 02:46:45 +02:00
Peter Steinberger
6c041ef65e
fix(agent-core): reject invalid session timestamps
2026-05-29 12:27:54 -04:00
Vincent Koc
e95fbc05aa
refactor: share agent harness loader helpers
2026-05-29 16:27:03 +02:00
Peter Steinberger
476d0a2c4b
fix(agent-core): reject non-decimal numeric tool args
2026-05-29 08:25:28 -04:00
Peter Steinberger
aff6d079d3
fix(agents): add typed tool progress updates
...
Add a general typed tool-progress contract so long-running non-exec tools can emit public channel progress without overloading model-facing tool content.
`web_fetch` now uses the generic delayed progress helper: it shows `Fetching page content...` only when the fetch is still pending after five seconds, clears the timer on completion/abort, passes the abort signal into guarded fetch, and avoids provider fallback or cached success after cancellation. The subscriber path accepts only explicit `visibility: "channel"` and `privacy: "public"` progress metadata, while untyped tool partials and exec output keep their existing behavior.
Docs now explain typed progress, delayed producer examples, and the `web_fetch` timing behavior.
Proof: `pnpm test src/agents/tools/web-tools.fetch.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts -- --run`; `pnpm docs:check-mdx`; changed-file `pnpm exec oxlint ...`; `git diff --check`; autoreview clean.
2026-05-29 11:06:13 +01:00
Peter Steinberger
8ac0c35462
fix(prompts): reject unsafe template indexes
2026-05-29 05:36:15 -04:00
Peter Steinberger
1188aa3b81
feat: add Claude Opus 4.8 support ( #87890 )
...
* feat: add Claude Opus 4.8 support
* fix: omit Vertex Opus sampling overrides
* fix: preserve Opus adaptive thinking levels
* fix: clamp Anthropic max effort support
* fix: use sha256 for QA mock call ids
* fix: type Anthropic transport test model metadata
* test: update PDF model default for Opus 4.8
2026-05-29 06:10:42 +01:00
Vincent Koc
9dd8ffd767
refactor: dedupe session storage indexing
2026-05-29 01:14:34 +02:00
Peter Steinberger
bb46b79d3c
refactor: internalize OpenClaw agent runtime ( #85341 )
...
* refactor: extract agent core package
Introduce packages/agent-core as the OpenClaw-owned home for reusable agent loop, harness, session, prompt, and runtime dependency contracts.
* refactor: extract shared llm runtime
Move provider model registries, stream wrappers, OAuth helpers, and LLM utilities into src/llm with plugin-sdk barrels instead of depending on the old embedded runtime layout.
* refactor: remove pi runtime internals
Rename remaining Pi-shaped agent surfaces to OpenClaw agent runtime names, delete obsolete Pi docs and package graph checks, and add the third-party notice for incorporated code.
* refactor: tighten agent session runtime
Make agent-core/runtime dependencies explicit, consolidate compaction and session transcript helpers, and move model/session helpers behind OpenClaw-owned contracts.
* refactor: remove static model and pi auth paths
Drop static model catalogs and Pi auth bridges, move model/provider facts to manifest-owned runtime contracts, and harden internal embedded-agent utilities.
* refactor: remove legacy provider compat paths
* docs: remove agent parity notes
* fix: skip provider wildcard metadata parsing
* refactor: share session extension sdk loading
* refactor: inline acpx proxy error formatter
* refactor: fold edit recovery into edit tool
* fix: accept extension batch separator
* test: align startup provider plugin expectations
* fix: restore provider-scoped release discovery
* test: align static asset packaging expectations
* fix: run static provider catalogs during scoped discovery
* fix: add provider entry catalogs for scoped live discovery
* fix: load lightweight provider catalog entries
* fix: refresh provider-scoped plugin metadata
* fix: keep provider catalog entries on release live path
* fix: keep static manifest models in release live checks
* fix: harden release model discovery
* fix: reduce OpenAI live cache probe reasoning
* fix: disable OpenAI cache probe reasoning
* ci: extend OpenAI gateway live timeout
* fix: extend live gateway model budget
* fix: stabilize release validation regressions
* fix: honor provider aliases in model rows
* fix: stabilize release validation lanes
* fix: stabilize release memory qa
* ci: stabilize release validation lanes
* ci: prefer ipv4 for live docker node calls
* fix: restore shared tool-call stream wrapper
* ci: remove legacy pi test shard alias
* fix: clean up embedded agent test drift
* fix: stabilize runtime alias status
* fix: clean up embedded agent ci drift
* fix: restore release ci invariants
* fix: clean up post-rebase runtime drift
* fix: restore release ci checks
* fix: restore release ci after rebase
* fix: remove stale pi runtime path
* test: align compaction runtime expectations
* test: update plugin prerelease expectations
* fix: handle claude live tool approvals
* fix: stabilize release validation gates
* fix: finish agent runtime import
* test: finish post-rebase agent runtime mocks
* fix: keep codex compaction native
* fix: stabilize codex app-server hook tests
* test: isolate codex diagnostic active run
* test: remove codex diagnostic completion race
# Conflicts:
# extensions/codex/src/app-server/run-attempt.test.ts
* ci: fix full release manifest performance run id
* refactor: narrow llm plugin sdk boundary
* chore: drop generated google boundary stamps
* fix: repair rebase fallout
* fix: clean up rebased runtime references
* fix: decode codex jwt payloads as base64url
* fix: preserve shipped pi runtime alias
* fix: add scoped sdk virtual modules
* fix: decode llm codex oauth jwt as base64url
* fix: avoid stale vertex adc negative cache
* fix: harden tool arg decoding and codeql path
* fix: keep vertex adc negative checks live
* refactor: consolidate codex jwt and edit helpers
* fix: await codex oauth node runtime imports
* fix: preserve sdk tool and notice contracts
* fix: preserve shipped compat config boundaries
* fix: align codex oauth callback host
* fix: terminate agent-core loop streams on failure
* fix: keep codex oauth callback alive during fallback
* ci: include session tools in critical codeql scans
* fix: keep Cloudflare Anthropic provider auth header
* docs: redirect legacy pi runtime pages
* fix: honor bundled web provider compat discovery
* fix: protect session output spill files
* fix: keep legacy agent dir env blocked
* fix: contain auto-discovered skill symlinks
* fix: harden agent core sdk proxy surfaces
* fix: restore approval reaction sdk compat
* fix: keep live docker runs bounded
* fix: keep codex oauth redirect host aligned
* fix: resolve post-rebase agent runtime drift
* fix: redact anthropic oauth parse failures
* fix: preserve responses strict tool shaping
* fix: repair agent runtime rebase cleanup
* docs: redirect retired parity pages
* fix: bound auto-discovered resources to roots
* fix: repair post-rebase agent test drift
* fix: preserve bundled provider allowlist migration
* fix: preserve manifest-owned provider aliases
* fix: declare photon image dependency
* fix: keep provider headers out of proxy body
* fix: preserve shipped env aliases
* fix: refresh control ui i18n generated state
* fix: quote read fallback paths
* fix: preview edits through configured backend
* test: satisfy core test typecheck
* fix: preserve ZAI usage auth fallback
* test: repair codex diagnostic test
* fix: repair agent runtime rebase drift
* test: finish embedded runner import rename
* fix: repair agent runtime rebase integrations
* test: align compaction oauth fallback expectations
* fix: allow sdk-auth session models
* fix: update doctor tool schema import
* fix: preserve bedrock plugin region
* fix: stream harmony-like prose immediately
* ci: include session runtime in codeql shards
* fix: repair latest rebase integrations
* fix: honor explicit codex websocket transport
* fix: keep openai-compatible credentials provider-scoped
* fix: refresh sdk api baseline after rebase
* fix: route cli runtime aliases through openclaw harness
* test: rename stale harness mock expectation
* test: rename embedded agent overflow calls
* test: clean embedded auth test wording
* test: use openclaw stream types in deepinfra cache test
* fix: refresh sdk api baseline on latest main
* fix: honor bundled discovery compat allowlists
* fix: refresh sdk api baseline after latest rebase
* fix: remove stale rebase imports
* test: rename stale model catalog mock
* test: mock renamed doctor runtime modules
* fix: map canonical kimi env auth
* fix: use internal model registry in bench script
* fix: migrate deepinfra provider catalog entry
* fix: enforce builtin tool suppression
* fix: route compaction auth and proxy payloads safely
* refactor: prune unused llm registry leftovers
* test: update codex hooks session import
* test: fix model picker ci coverage
* test: align model picker auth mock types
2026-05-27 19:24:04 +01:00