This repository was archived by the owner on Jun 13, 2026. It is now read-only.
Repository navigation
Releases: JimJafar/the-librarian-opencode-plugin
Releases · JimJafar/the-librarian-opencode-plugin
Release list
v0.4.0
Changed
- Docs aligned to the 9-verb agent-facing MCP surface (the-librarian
ADR 0006). The agent-facing surface is nowrecall,remember,
flag_memory,store_handoff,list_handoffs,claim_handoff,
list_skills,get_skill,search_references(plus the internal
conv_state_*primer). README, SPEC, and the/toggle-privatecommand
doc no longer reference the retired verbs:verify_memoryis replaced
byflag_memory(flag a wrong/misleading/outdated memory; routed to
review),propose_memoryis folded intoremember, the per-turn
conv_state_getprimer covers whatstart_contextused to, and
session_manifest/find_skillsare replaced bylist_skills. The
README now also documents thelist_skills/get_skill/
search_referencesskill + reference tools. Docs-only — no runtime or
API change.
v0.3.3
Changed
/learnnow saves picked lessons viarememberinstead of
propose_memory. Picking a lesson in the/learnmulti-select already
is the review, so the old flow double-gated it behind a dashboard
proposal./learnnow callsremember, which files non-protected lessons
directly (deduped/merged) while the server still routes protected categories
(identity, relationship) to the proposal queue. Coordinated with the server
fix that routespropose_memorythrough the curator (the-librarian ADR 0004).- Release process automated — every merge to
mainis a release. Added
.github/workflows/release.yml(tags, publishes the GitHub release, and runs
npm publishon a version-bumping merge) and ascripts/check-release.mjs
guard wired into CI. The CHANGELOG no longer carries an[Unreleased]section;
every PR bumpspackage.jsonwith a dated entry.
v0.3.2
v0.3.1
Fix: declare oc-plugin: [server, tui] so the plugin loads in OpenCode >= 1.3.4 (1.3.8 enforces it) — resolves 'Package has no tui target to load in this app.' Includes the v0.3.0 awareness primer. This is the first npm-publishable working version.
v0.3.0
v0.2.0
Added
- Release runbook + per-repo release doc. A new
docs/release.mdcaptures the per-repo release
steps (package.jsonbump, CHANGELOG move, tag, GitHub release,
thennpm publish— this is the only plugin in the family with an
npm artifact). AGENTS.md is thinned and points at it; the
cross-family runbook lives in the monorepo at
the-librarian/docs/release-runbook.md.
Changed
- Sessions rethink — breaking change (sessions-rethink PR 4). The
entire session-lifecycle stack is retired in favour of a four-verb
agent surface. The OpenCode plugin had the heaviest hook surface of
any harness; this PR is correspondingly the largest deletion:- Removed hooks:
chat.message(privacy gate),eventswitch
onsession.created/session.idle/session.compacted. Only
experimental.chat.system.transformsurvives, and only to do
conv-state injection (spec §4.9). - Removed handlers:
src/handlers/chat-message.ts,
checkpoint-policy.ts,session-bootstrap.ts,
session-compacted.ts,session-created.ts,session-idle.ts. - Removed source:
src/state-store.ts,src/privacy-detector.ts,
src/mcp-parse.ts. The state-store file (with its per-cwd lock)
and the natural-language private detector are gone — private mode
is now an in-conversation[librarian:private=on|off]marker the
LLM handles directly via/toggle-private. - Removed commands: the seven
commands/lib-session-*.mdfiles. - Added commands:
commands/handoff.md,takeover.md,
learn.md,toggle-private.md— installed via the existing
ensureCommandsmechanism at plugin init (instead of on
session.created). - Server compatibility: requires a Librarian server running the
sessions-rethink PR 1 build (thestore_handoff/list_handoffs
/claim_handoffandconv_state_*MCP tools must exist). - Migration: existing operators should restart opencode. The
install dir is now resolved viaLIBRARIAN_COMMANDS_DIR(override)
then$XDG_CONFIG_HOME/opencode/commands, then
~/.config/opencode/commands. The oldlib-session-*.mdfiles
written by prior versions can be deleted by hand — the new build
never touches them.
- Removed hooks:
Added
- Conv-state injection via
experimental.chat.system.transform.
Implements §4.9 of the upstream memory-domain-isolation rollout. A
new handler fires once per turn after opencode assembles the system
prompt, resolves the callingconversation_staterow via
conv_state_get, and.push()es the canonical
<conversation-state>block ontooutput.system. The LLM sees the
currentdomain/session_id/off_recordon every turn,
defeating context-compaction-driven state loss. Fail-soft per
AGENTS.md §2 — off-record / missing sessionID / missing row /
network failure / timeout / unexpected throw all leave
output.systemuntouched. AGENTS.md§5 — monitoring plan for the experimental hook. Four
mechanisms (pinned SDK + CI typecheck; CHANGELOG grep on bumps;
namespace-graduation watch; quarterly eyeball re-test) so the
experimental.*namespace can be tracked without surprise.
Changed
- Privacy detector documentation: AGENTS.md §2 and §4 updated to
reflect that the canonical TS source inthe-librarianwas deleted
when the family went fully standalone. The privacy detector is now
one of five peer implementations across the family (Claude Code,
Codex, Hermes, this repo, Pi); coordinate any marker-list change
across all five repos. scripts/validate.ts: removed the byte-identity check against
the canonical TS source (the canonical no longer exists). All other
shape checks (package.json, entrypoint, commands frontmatter) are
unchanged.
v0.1.0 — Initial release
Initial public release. An opencode plugin for The Librarian — durable memory + cross-harness session lifecycle, backed by a remote Librarian MCP server.
Install (once published to npm)
opencode plugin the-librarian-opencode-pluginThen add the mcpServers.librarian block from the README to your opencode.json and set the env vars (LIBRARIAN_MCP_URL, LIBRARIAN_AGENT_TOKEN).
Highlights
- Pre-LLM privacy gate via
chat.message— off-record markers stop recording on the same turn (no one-turn lag). - Seven
/lib-session-*slash commands auto-installed to~/.config/opencode/commands/on first run (sentinel-gated; never clobbers user edits). - Automatic session lifecycle: bootstrap on
session.created(race-safe), per-turn record onsession.idle, checkpoint onsession.compacted+ debounced threshold (≥ 10 min OR ≥ 20 turns). - Stale-active session reconciliation on every
session.created. - Direct port of canonical TS privacy detector (one fewer drift surface than the Codex JS port or the Hermes Python port).
- Atomic state store + cross-process
withLockverified on Bun. - HTTP MCP client:
redirect: "error", rejects embedded credentials / query strings / fragments, 8 MiB cap, 15 s timeout.
Family
Final plugin in the Librarian family. Siblings:
- the-librarian-claude-plugin
- the-librarian-codex-plugin
- the-librarian-hermes-plugin
- the-librarian-pi-extension
See CHANGELOG.md for the full feature list, security posture, and known limitations.