Commit Graph
2 Commits
Author SHA1 Message Date
t0saki 3ae94afeea fix(skills): 让 Experience 技能兼容没有 viking://~ 的旧服务端 (#4857)
* fix(skills): resolve an explicit user root when the server has no viking://~

The Experience workflow tells the agent to scope its search by
`viking://~/memories/experiences`. `viking://~` is the home alias for
the caller's own space, added in v0.4.16 (#4167); a server older than
that has no branch for the `~` scope, so the URI never resolves and the
request comes back as `INVALID_URI` (HTTP 400) instead of a search. The
skill offered no second spelling, so on those servers the first step of
the workflow failed and Experience retrieval stopped there — reported
in #4828, where every read succeeded once the caller substituted its
own `viking://user/<user_id>/memories/...` root by hand.

The alias is the only spelling that works everywhere it exists, so the
skill keeps leading with it and now says what to do when it is
rejected: rebuild the root from a canonical `viking://user/<user_id>/`
URI already visible in the session, or repeat the query unscoped and
keep the hits whose URI contains `/memories/experiences/`, whose URIs
carry the canonical user id for the reads that follow. Both paths
resolve the id from evidence, which is what keeps the existing "never
hardcode `default`" rule intact — the reporter's server resolved to
`default`, another account's will not.

The uid-less `viking://user/memories/experiences` is called out as a
non-fallback: only pre-v0.4.17 servers expand it, only for USER and
ADMIN callers, and #4196 made current servers reject it, so an agent
reaching for the obvious shorthand would fail on both ends of the
version range.

The same note goes to the agent-plugins memory skill, which scopes
recall the same way, and a sync test pins the pairing so a later edit
cannot drop the fallback while keeping the alias.

* chore(plugins): bump the plugins that ship the experience skill

Claude Code and Codex cache a plugin under
`cache/<marketplace>/<plugin>/<version>/`, so a skill edit behind a
frozen manifest version never reaches an installed user: `plugin
update` sees the same version and does nothing. The three plugins whose
skills changed move one patch step — claude-code 0.4.5 -> 0.4.6 (its
`package.json` stays in lockstep with the manifest), codex 0.8.1 ->
0.8.2 and agent-plugins 0.1.0 -> 0.1.1. The openclaw plugin resolves
its version at release time, so its copy needs no manual bump.
2026-09-09 15:36:58 +08:00
t0sakiandZayn Jarvis 8abd61fcb6 feat(plugins): add Agent Plugins 1.0 portable package (#3998)
* feat(plugins): add Agent Plugins 1.0 portable package

Add agent-plugins/, an Agent Plugins 1.0 conformant package
(https://agent-plugins.org/specification) that any conforming client can
load: plugin.json manifest, an openviking-memory skill teaching the
hook-less recall + persist loop, and an mcp.json stdio entry running a
stdio -> streamable-HTTP proxy that resolves credentials from
OPENVIKING_* env -> ~/.openviking/ovcli.conf -> ~/.openviking/ov.conf,
same as the ov CLI.

servers/shared/* are generated copies of memory-plugin-shared/lib, wired
into sync.mjs / sync.test.mjs TARGETS so they cannot drift silently.
config.mjs / debug-log.mjs / mcp-proxy.mjs are adapted from
claude-code-memory-plugin with the hook-tuning knobs dropped.
plugin.test.mjs validates spec conformance (schema URLs and matching
spec versions, name rules, closed manifest root, semver, skill
frontmatter, referenced files staying inside the plugin root, node
--check on all .mjs) and runs in CI via pr.yml.

The skill treats tree/write/edit as optional, since they only exist on
servers that carry #3936.

Docs: docs/{en,zh}/agent-integrations/15-agent-plugins.md, registered in
the VitePress sidebar and the integration overview tables, plus a link
from the three root READMEs. The docs recommend the per-client plugin
whenever the harness has hooks, with the shared installer one-liner.

Based on #3994 by @ZaynJarvis.

Co-Authored-By: Zayn Jarvis <zaynjarvis@gmail.com>

* docs(agent-plugins): pluralize README title

---------

Co-authored-by: Zayn Jarvis <zaynjarvis@gmail.com>
2026-08-14 14:33:54 +08:00