Commit Graph
12 Commits
Author SHA1 Message Date
Evo f8ae35c274 fix(openclaw-plugin): require OpenClaw 2026.5.27 (#3021) 2026-07-07 21:35:04 +08:00
LinQiang391andCursor b55d379160 chore(openclaw-plugin): release 2026.6.18 and raise OpenViking floor to 0.4.1 (#2705)
Bump plugin to 2026.6.18 across package.json, package-lock.json and install-manifest. Raise minOpenvikingVersion 0.2.9 to 0.4.1 and add recommended OpenClaw/OpenViking versions. Update the guide version matrix and add a manifest-contract test that locks the compatibility floors/recommended versions and keeps pluginVersion in sync with package.json version.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 17:14:49 +08:00
Mingjian Que ccf00aa8a4 feat(openclaw): add TOS release installer flow (#2653) 2026-06-17 01:07:50 +08:00
Mingjian Que 8310a6a094 Package OpenClaw plugin dist entrypoints (#2577)
* chore(openclaw): package plugin dist entrypoints

* chore(openclaw): sync plugin ignore rules
2026-06-15 18:47:23 +08:00
LinQiang391andLinQiang391 933ece4acb docs(openclaw): use canonical OpenViking plugin package (#2099)
Co-authored-by: LinQiang391 <linqiang391@users.noreply.github.com>
2026-05-18 10:55:01 +08:00
LinQiang391andLinQiang391 72a3cd29f0 feat(openclaw-plugin): support OpenClaw install and ClawHub release flow (#1904)
Squashes OpenClaw plugin install compatibility, setup helper source-build support, built dist output, and ClawHub release workflow updates into one publish commit.

Co-authored-by: LinQiang391 <linqiang391@users.noreply.github.com>
2026-05-08 17:38:04 +08:00
AutoCoder 4d6f5b65bd fix(openclaw): route auto recall through assemble (#1835) 2026-05-01 16:39:32 +08:00
lililiandMoss 6c76318013 fix(plugin): 修复 OpenClaw 工具调用消息格式不兼容导致的 toolResult 孤儿错误 (#1632)
* fix(plugin): canonicalize tool message format for OpenClaw Responses API

The OpenClaw Responses API replay path only recognizes `toolCall` blocks
(with `arguments` field), but the OpenViking context engine plugin was
emitting `toolUse` blocks (with `input` field) from its assembled context.
This mismatch caused `toolResult` orphan errors on subsequent turns after
tool use.

Changes:
- convertToAgentMessages: emit toolCall+arguments instead of
  toolUse+input, matching the OpenClaw canonical format
- Add canonicalizeAgentMessages() to normalize legacy/variant block
  formats (toolUse, functionCall, tool_call) into toolCall before
  sanitizeToolUseResultPairing
- Add canonicalizeAssistantBlock() for per-block normalization with
  id/name/arguments field mapping
- messageDigest: update type guard from toolUse to toolCall

This preserves backward compatibility on input (old toolUse blocks are
still accepted and normalized) while ensuring output always matches the
current OpenClaw Responses API contract.

* fix(plugin): address review feedback on PR #1632

- Remove 'unknown' fallback for toolResult.toolName in canonicalizeAgentMessages();
  preserve undefined to let downstream normalizeToolResultName() backfill from paired toolCall
- Remove 'unknown' fallback for tool_name in convertToAgentMessages() structured path;
  only set toolName on toolResult when the value exists
- Only include toolName on toolResult when present (not always)
- Update test expectations: toolUse → toolCall, input → arguments
- Update README/README_CN: describe canonical output format with backward-compat note

---------

Co-authored-by: Moss <moss@openclaw.ai>
2026-04-22 18:22:28 +08:00
chenjwandClaude Opus 4.6 c430b97493 Fix/openclaw addmsg (#1391)
* fix(ragfs): localfs write should respect WriteFlag to truncate file

The localfs write implementation was ignoring the WriteFlag parameter and
not truncating the file when WriteFlag::Create or WriteFlag::Truncate was
specified. This caused files to be appended instead of overwritten when
writing empty content.

Root cause: The _flags parameter was declared but never used. When opening
an existing file, .truncate(true) was not called.

Fix: Use OpenOptions::new().truncate(should_truncate) based on the flags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(session): clear messages.jsonl after commit and improve memory extraction

- Add workaround to delete messages.jsonl before writing to work around
  RAGFS localfs not truncating files (now fixed in ragfs)
- Add _get_latest_archive_last_msg_time to filter messages for memory
  extraction by timestamp
- Fix memory extraction to only process new messages after last archive

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update

* fix(openclaw): add HEARTBEAT filtering in sanitizeUserTextForCapture

过滤 HEARTBEAT 健康检查消息,避免 HEARTBEAT.md 和 HEARTBEAT_OK
进入 session 存档。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* revert: restore logger.warn instead of warnOrInfo

Reverting to use logger.warn directly. The warnOrInfo wrapper was
unnecessary as logger always has warn method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(session): remove RAGFS truncate workaround

The ragfs localfs write now respects WriteFlag to truncate files,
so the workaround to delete messages.jsonl before writing is no
longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(openclaw): unify addSessionMessage with parts API

- Remove old addSessionMessage (string content)
- Keep addSessionMessage but accept parts array
- Update index.ts and context-engine.ts to use new format
- Update tests to check parts structure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(openclaw): use optional chaining for logger.warn

TypeScript strict mode requires handling possibly undefined warn method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(openclaw): log trace_id from commit results

Add trace_id to CommitSessionResult type and log it for all
commitSession calls (afterTurn, commitOVSession, compact).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(openclaw): add tool_input to tool parts

- Add toolInput field to ExtractedMessage type
- Extract tool_input from msg.toolInput in extractNewTurnMessages
- Pass tool_input when constructing tool parts for addSessionMessage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(openclaw): lookup toolInput from preceding toolUse messages

When extracting toolResult messages, look up the corresponding toolInput
from the preceding assistant messages' toolUse blocks using toolCallId/
toolUseId as the key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(openclaw): add more field name variations for toolInput/toolCallId

Support additional field names: arguments, toolInput, tool_call_id

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(openclaw): lookup toolInput from preceding toolCall messages

- Scan all messages to find toolCall/toolUse/tool_call blocks
- Extract tool input from arguments/input/toolInput fields
- Match toolResult with toolCall using toolCallId/toolUseId

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 14:03:04 +08:00
x__dot 23f0775ab5 feat(openclaw-plugin): add unified ov_import and ov_search (#1369) 2026-04-12 22:16:22 +08:00
3b5b9a42c0 feat(openclaw-plugin):context engine refactor design & enforce token budget and reduce context bloat (#891)
* fix(openclaw-plugin): enforce token budget and reduce context bloat (#730) (#796)

* test(openclaw-plugin): add vitest test infrastructure for #730

* fix(openclaw-plugin): raise recallScoreThreshold default from 0.01 to 0.15 (#730)

* fix(openclaw-plugin): narrow isLeafLikeMemory boost to level-2 only (#730)

* fix(openclaw-plugin): prefer abstract over full content fetch in memory injection (#730)

* feat(openclaw-plugin): add recallMaxContentChars and recallPreferAbstract config (#730)

* feat(openclaw-plugin): enforce tokenBudget in injection with decrement loop (#730)

* fix(openclaw-plugin): update recallScoreThreshold placeholder to match new default (#730)

* fix(openclaw-plugin): deduplicate content resolution and document budget behavior (#730)

Extract resolveMemoryContent() helper to eliminate duplicate content-resolution
logic between buildMemoryLines and buildMemoryLinesWithBudget. Add JSDoc and
inline comment documenting intentional first-line budget overshoot (spec §6.2).
Tighten test assertion from <=120 to <=106 tokens.

* fix(openclaw-plugin): use truthy fallback for empty abstract strings (#730)

Change nullish coalescing (??) to truthy fallback (||) in
resolveMemoryContent() so empty-string abstracts fall back to item.uri
instead of producing empty content lines.

* docs: add openclaw context engine refactor design

Co-authored-by: Mijamind <mijamind@163.com>
Co-authored-by: GPT-5.4 <noreply@openai.com>

* add afterTurn refactor in design_doc

* add afterTurn compact in design_doc

---------

Co-authored-by: chethanuk <chethanuk@outlook.com>
Co-authored-by: GPT-5.4 <noreply@openai.com>
Co-authored-by: wlff123 <wulf234@163.com>
Co-authored-by: xuwengui <huangxun375@gmail.com>
2026-03-23 15:40:15 +08:00
Mingjian QueandGPT-5.4 f93d10523b feat(openclaw-plugin 2.0): from memory plugin to context engine (#662)
* feat(openclaw-context-plugin): migrate OpenViking memory plugin to context engine

1. Rename the OpenClaw plugin from memory-openviking to openclaw-context-plugin and switch its kind from memory to context-engine.
2. Keep auto-recall and ingest-reply-assist on before_prompt_build to preserve the existing prompt injection behavior.
3. Move the canonical auto-capture flow from the old agent_end-style lifecycle to ContextEngine afterTurn.
4. Delegate compact handling to the legacy compact engine when it is available, so existing compaction behavior can still be reused.
5. Preserve the OpenViking tools and local process management while updating setup helpers, installers, docs, and OpenClaw config paths to plugins.slots.contextEngine.

Co-authored-by: GPT-5.4 <noreply@openai.com>

* refactor(openclaw-context-plugin): rename plugin id to context-openviking

- rename the runtime plugin id, package name, install destination, and OpenClaw config keys from openclaw-context-plugin to context-openviking
- keep the source directory at examples/openclaw-context-plugin unchanged while updating docs, installers, and setup helpers to use the new runtime name
- remove unused sys imports from the demo scripts so ruff check stays green

---------

Co-authored-by: GPT-5.4 <noreply@openai.com>
2026-03-18 21:10:20 +08:00