Skip to content
This repository was archived by the owner on Jun 13, 2026. It is now read-only.

Releases: JimJafar/the-librarian-opencode-plugin

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 12 Jun 03:12

Changed

  • Docs aligned to the 9-verb agent-facing MCP surface (the-librarian
    ADR 0006).
    The agent-facing surface is now recall, 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-private command
    doc no longer reference the retired verbs: verify_memory is replaced
    by flag_memory (flag a wrong/misleading/outdated memory; routed to
    review), propose_memory is folded into remember, the per-turn
    conv_state_get primer covers what start_context used to, and
    session_manifest / find_skills are replaced by list_skills. The
    README now also documents the list_skills / get_skill /
    search_references skill + reference tools. Docs-only — no runtime or
    API change.

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 08 Jun 11:16

Changed

  • /learn now saves picked lessons via remember instead of
    propose_memory.
    Picking a lesson in the /learn multi-select already
    is the review, so the old flow double-gated it behind a dashboard
    proposal. /learn now calls remember, 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 routes propose_memory through the curator (the-librarian ADR 0004).
  • Release process automated — every merge to main is a release. Added
    .github/workflows/release.yml (tags, publishes the GitHub release, and runs
    npm publish on a version-bumping merge) and a scripts/check-release.mjs
    guard wired into CI. The CHANGELOG no longer carries an [Unreleased] section;
    every PR bumps package.json with a dated entry.

v0.3.2

Choose a tag to compare

@JimJafar JimJafar released this 07 Jun 06:53

Fix: declare oc-plugin: ["server"] (server-only) so the in-app OpenCode install works — 0.3.1's ["server","tui"] made the in-app installer fail looking for a TUI module this hooks-only plugin doesn't ship.

v0.3.1

Choose a tag to compare

@JimJafar JimJafar released this 07 Jun 05:58

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

Choose a tag to compare

@JimJafar JimJafar released this 07 Jun 05:38

Awareness primer (spec 041): the plugin now injects the server's primer block into output.system every turn. Coordinated cross-family release (monorepo v0.5.0). npm publish to follow.

v0.2.0

Choose a tag to compare

@JimJafar JimJafar released this 28 May 20:22

Added

  • Release runbook + per-repo release doc. A new
    docs/release.md captures the per-repo release
    steps (package.json bump, CHANGELOG move, tag, GitHub release,
    then npm 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), event switch
      on session.created / session.idle / session.compacted. Only
      experimental.chat.system.transform survives, 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-*.md files.
    • Added commands: commands/handoff.md, takeover.md,
      learn.md, toggle-private.md — installed via the existing
      ensureCommands mechanism at plugin init (instead of on
      session.created).
    • Server compatibility: requires a Librarian server running the
      sessions-rethink PR 1 build (the store_handoff / list_handoffs
      / claim_handoff and conv_state_* MCP tools must exist).
    • Migration: existing operators should restart opencode. The
      install dir is now resolved via LIBRARIAN_COMMANDS_DIR (override)
      then $XDG_CONFIG_HOME/opencode/commands, then
      ~/.config/opencode/commands. The old lib-session-*.md files
      written by prior versions can be deleted by hand — the new build
      never touches them.

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 calling conversation_state row via
    conv_state_get, and .push()es the canonical
    <conversation-state> block onto output.system. The LLM sees the
    current domain / session_id / off_record on 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.system untouched.
  • 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 in the-librarian was 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

Choose a tag to compare

@JimJafar JimJafar released this 26 May 18:25

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-plugin

Then 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 on session.idle, checkpoint on session.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 withLock verified 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:

See CHANGELOG.md for the full feature list, security posture, and known limitations.