Skip to content

Releases: wojciechwiesner/jit-context

OpenCode plugin 0.2.0 (OpenCode 2.x support)

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 23 Oct 22:39

OpenCode plugin for JIT Context OS, now compatible with OpenCode 2.x.

Install (OpenCode 2.x)

mkdir -p ~/.config/opencode/plugins
curl -fsSL -o ~/.config/opencode/plugins/jit-context.js \
  https://github.com/wojciechwiesner/jit-context/releases/download/opencode-v0.2.0/jit-context-opencode-v2.js
opencode plugin list   # shows: jit-context  local

OpenCode 1.x: use jit-context-opencode-v1.js instead (unchanged V1 entry).

Added

  • V2 entry ({ id, setup }). Tools get_jit_context, record_jit_observation and get_project_state are registered via ctx.tool.transform with JSON Schema inputs. Nothing from effect or @opencode/plugin is needed at runtime.
  • The capsule is injected via the session context hook. The edit trail is recorded via tool execute.after, including V2 FileDiff metadata.

Fixed

  • OpenCode 2.x rejected the V1 module. Plugin activation never finished and every server request returned 503.

Verification

  • CI green on the release commit (typecheck + 24 tests + build).
  • A real opencode run on OpenCode 2.1.4 called get_project_state, which returned status completed with the correct STATE.md heading.

Checksums: SHA256SUMS.txt.

v0.5.1: Grounded capsules and safe diagnostics

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 17 Oct 10:28

Correctness and diagnostic safety

  • Preserve compiler metadata and cap the fully enriched capsule at the host boundary.
  • Keep inferred guidance advisory; ground targets in the current request and active workspace.
  • Prevent background/MCP host notifications from becoming user instructions; preserve genuine requests following reload notices.
  • Run synthetic health/doctor checks in disposable SQLite storage instead of polluting live memory and replication queues.
  • Remove fabricated savings baselines and static dashboard success claims. Show unavailable measurements, explicitly disabled L2, and self-tests versus end-to-end verification.
  • Repair hidden-parent file discovery and nested-venv packaging smoke tests.
  • Add jit install --only hermes --active-profile-only to preserve other profiles and the snapshots they reference.

Verification

  • 231 Python tests passed locally; the exact release commit passed GitHub CI.
  • Built wheel and source archive; installed-wheel CLI, health HTTP and HTML assets exercised.
  • Real hook subprocess and dashboard DOM verified; deployed snapshot checked against canonical source.
  • No new performance or token-savings benchmark is claimed.

Assets include the wheel, source archive and SHA256 checksums. Borg L2 deployment and historical synthetic-data cleanup remain separate operator actions.

v0.5.0: Per-project skills, cwd-anchored scope, stack detector

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 14 Oct 11:11

Added

  • Per-project skill selection: jit init now picks must-have / optional skills from ~/.hermes/skills and relevant knowhow notes from ~/Documents/Wojciech/knowhow with deterministic scoring (context/skill_index.py, skill_signals.py, skill_selector.py, STACK_SKILL_HINTS, ALWAYS_MUST, optional .planning/skills.override.json). Writes .planning/SKILLS.md and merges a skills block into .planning/jit.json.
  • Capsule [AVAILABLE POINTERS] lists @skill:<name> per must-have skill and one @skills:optional: line (names only) read from .planning/jit.json.
  • jit skills [path] [--write] (dry-run by default) and jit skills sync <worktree> (symlinks must-have skills into <worktree>/.claude/skills/) in src/skills_cli.py. Tests: src/tests/test_skill_selector.py.
  • Pi coding agent host (src/installer/pi.py, integrations/pi/jit-context.ts): installs the capsule-injection/observation-recording extension into ~/.pi/agent/extensions/ and adds ~/.hermes/skills to Pi's settings.json skills path. Registered in installer/cli.py HOSTS.

Fixed

  • Scope is anchored to the working directory: new l1.scope.scope_from_cwd (~/Projects/active/<name>, git root, worktree gitdir: -> main repo) replaces Path.name in hooks; resolve_scope(cwd_scope=) lets only explicit switch commands change the active scope, other mentioned projects go to retrieval scopes only, and compile_context realigns a stale stored scope. Tests: src/tests/test_scope_cwd_anchor.py.
  • jit init stack detection and capsule verify command: Python no longer detected from helper scripts (scripts/, tools/, bin/, docs/) without a manifest (reported as helper_languages); Node detection adds Vite, Vitest, Lit, Svelte, Vue, Hono, Tailwind, Playwright, package_manager from lockfile priority and test_command from scripts.test; external knowledge is a data table; verify command is <pm> run test for Node repos instead of pytest from a bare tests/ dir. Shared logic in src/context/stack_signals.py.
  • scope_split autochecker finding: config.get_session_dir pins session storage to the scope the session was first created under (oldest existing dir wins, cached in-process), so a mid-session scope change (general -> project) no longer forks overlay DB, meta and capsule into two dirs. Tests: src/tests/test_session_dir_pinning.py.
  • Turn autochecker false positives: synthetic prompts ([ASYNC DELEGATION, [IMPORTANT: family) are never aligned against the capsule goal (capsule_goal_stale); goals carrying goal_anchor.ANCHOR_MARKER are not capsule_goal_truncated; claim_without_proof ignores negated/conditional claims and output containing exit=0 / N passed / HTTP 200 proof.
  • JIT scope for delegated subagents and first turns: get_session_cwd now falls back to the cwd Hermes stores for that exact session id (~/.hermes/state.db, read-only) until a terminal tool reports one. Children that only use file tools previously got scope general and an empty capsule (no project state, no JEV facts), e.g. on the local LFM fallback route.
  • jit init: external resources are deduplicated by (type, target); a project with both SQLAlchemy and SQLModel listed context7 sqlmodel twice. Test: src/tests/test_init_dossier.py::test_external_resources_dedupe_shared_target.

Changed

  • Classifier and epistemic distiller now call the fast Borg-hosted LLM (llm.borg.tools, OpenAI-compatible, default model gemini-3.1-flash-lite) through the new shared client src/l0/borg_llm.py instead of direct Gemini generativelanguage.googleapis.com calls with the rate-limited GOOGLE_API_KEY. Base URL/model are configurable via JIT_LLM_BASE_URL / JIT_LLM_MODEL; the client fails loudly on missing BORG_TOOLS_LLM_TOKEN, non-200 responses, or non-HTTPS (non-loopback) endpoints, and the classifier keeps its validated local Ollama fallback. Regression tests: src/tests/test_borg_llm.py.

Security

  • Livestream server access guard (src/health/mission_access.py): loopback is allowed; the borg proxy (JIT_MC_TRUSTED_PROXIES, default 100.118.47.46) is allowed only with a Borg SSO identity header; every other caller gets 403. Applies to all routes, including SSE.

Fixed

  • Wheel now ships the livestream / Mission Control *.css and *.js assets (package-data only included *.html).

Added

  • Small-model profile (context/small_model.py): for local 2-9B models (LFM, Qwen, qwen-coder) detected from the hook model= field, the capsule gets a ranked list of skill pointers (name + one line, load via skill_view), the project brief .planning/CONTEXT_SMALL.md, and a hard 4.8k-char cap. Large models are unchanged.
  • jit init --profile small [--model M] writes .planning/CONTEXT_SMALL.md (<=2k chars: stack, verify command, layout, focus, hard rules) and .planning/jit.json (small profile).
  • jit install links the Hermes plugin into every profile that lists ona-context in plugins.enabled (profiles read plugins from their own home; before this they silently ran without JIT).
  • Mission Control (/mc on the livestream server, port 8766): one window with the live session stream, session history per project (matched by sessions.cwd), project status (STATE.md tasks/blockers, git, autochecks, deploy), the architecture diagram, the embedded .planning/state.html cockpit and Obsidian SSOT freshness. Read-only API: /api/mc/projects, /api/mc/project, /api/mc/sessions, /api/mc/whoami, /cockpit/<slug>. Cockpit data comes from the canonical cockpit exporter (sota-starter/cockpit/export.js); when it is unavailable the API says so in cockpit_error. Spec: docs/MISSION_CONTROL.md. Tests: src/tests/test_mission_control.py.
  • Local Edge Autonomous Worker (src/worker/ and jit solve / jit worker CLI command): enables running 100% offline agentic bugfixing using local edge models (LiquidAI LFM 2.5 2.6B-64k, Qwen 3.8/2.5) on Apple Silicon Metal via Ollama. Automatically compiles the JIT workspace capsule, executes a multi-turn tool calling loop (search_files, read_file, patch, run_tests), applies surgical patches, and verifies fixes with test suite (exit 0).
  • SWE-Bench empirical benchmark for edge models (benchmarks/run_swe_local_lfm.py): empirical evaluation of lfm2.5:2.6b-64k across bez_jit, jit_bez_jev, and jit_z_jev on real repository tasks (django__django-15400), proving -40% turn reduction, -67% discovery reduction, -32% wall clock speedup (14.4s vs 21.2s), and 100% test suite pass rate with zero cloud LLM cost.
  • Case study and empirical benchmark section in README.md ("Edge / On-Device Autonomy: LiquidAI LFM 2.5 (2.6B-64k) on Apple Silicon Metal").
  • Test suite coverage in src/tests/test_local_worker.py covering workspace capsule compilation and multi-turn tool execution.

Changed

  • src/context/cascade_distiller.py: Tier 2 local classifier fallback now prioritizes ultra-fast edge model lfm2.5:2.6b-64k (prefill 520 tok/s on Metal) with fallback to qwen3.8:jit and qwen2.5-coder:7b, with configurable timeout JIT_LOCAL_TIMEOUT (default 2.5s).
  • src/init.py: registered worker and solve subcommands in known_cmds and CLI parser routing.
  • Workflow .github/workflows/agent-zero-mirror.yml: every push to master touching integrations/agent-zero/** (or a manual dispatch) rsyncs the plugin to the root of wojciechwiesner/jit-context-os and pushes a regular chore(sync): mirror integrations/agent-zero from jit-context@<sha> commit (no force-push, no history rewrite). Needs the write deploy key secret JIT_CONTEXT_OS_DEPLOY_KEY. jit-context-os is now a read-only mirror; edit the plugin here.
  • integrations/agent-zero/: reconciled drift with jit-context-os before the first sync so the mirror's --delete loses nothing: ported CHANGELOG.md, CITATION.cff, docs/plans/2026-09-21-jev-bridge-plan.md and .planning/ (STATE, THOUGHTS, ARCHITECTURE), and merged the features, configuration table (corrected to real default_config.yaml keys) and benchmark snapshot from its README.
  • Claude Code hooks now import an immutable runtime snapshot instead of the live dev checkout. jit install copies src/ to ~/.claude/jit-context-runtime/src-<head>[-dirty]-<timestamp>/ (with DEPLOYED_FROM.txt and precompiled bytecode) and points current at it. The new hooks/jit_src_path.py resolves JIT_SRC > JIT_DEV_LIVE=1 (live ~/.jit-context/src) > snapshot > live fallback, so a half-finished edit in the checkout can no longer break running hooks. jit uninstall removes the runtime directory.
  • AGENTS.md (imported by CLAUDE.md) and a README "Development workflow" section: never edit deployed copies; fix in the repo, test, commit, jit install, push.

Changed

  • agent-zero-release.yml: the release ZIP excludes the plugin's .planning/ and docs/.

Fixed

  • l0/epistemics.py + new l0/claim_support.py: the conscience gate treated "answer text occurs in tool output" as "evidence supports the answer". Reported publicly in langgenius/dify discussion #41966 against 8b6a119: "retry the same UPDATE" was VERIFIED/GROUNDED_EXACT from evidence saying "do not retry the same UPDATE", and "42" was VERIFIED/COMPUTED from a python_exec output of "result: 17". Traceability and support are now separate checks. An exact match whose every occurrence is directly negated (up to two words before it) is UNVERIFIED: CONTRADICTED_BY_NEGATION. A COMPUTED answer (successful run, value absent from the output) is UNVERIFIED: NOT_IN_COMPUTED_OUTPUT. GateDecision.evidence_refs now carries [grounding, support]. This is a deterministic heuristic, not semantic entailment; the limits are documented in the module docstring. Regression tests: src/tests/test_claim_support.py.
  • installer/claude_code.py: SPILL_MATCHER (the PostToolUse matcher that triggers jit-spillover-hook.py) did not cover ListMcpResourcesTool, ...
Read more

v0.3.0: One-line installer for Claude Code, Hermes, OpenCode and Agent Zero

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 28 Sep 10:58

One line, every agent host

The one-line installer is in the README Quickstart. It detects and wires Claude Code, Hermes, OpenCode and Agent Zero on the machine. Re-run to update; --only <hosts>, --dry-run, jit uninstall. It backs up every config it writes and never duplicates hook entries.

Highlights

  • Installer (jit install / jit uninstall): Claude Code hooks + settings.json merge, Hermes immutable plugin snapshot + gateway restart, OpenCode plugin (local bundle until the npm package is published), Agent Zero plugin copy keeping data/ + self-test. Finds Python 3.11+ on stock macOS or installs it with uv.
  • OpenCode plugin now lives in integrations/opencode/ (A/B: 8.6 s vs 42.4 s, 0 vs 14.5 tool calls on a memory-dependent task).
  • Agent Zero plugin 0.4.1: Polish diacritics folded before JEV tokenizing (fixes judge, rerank and distill on Polish text). ZIP asset in release a0-v0.4.1.
  • Core: L0 verified facts ranked by JEV, L2 recall opt-in (JIT_L2_ENABLED=1), overlay DB schema migrations, MCP scope fix, per-turn autochecker and live panel.

Full list: CHANGELOG.md

Cite: DOI 10.5281/zenodo.22649542

Agent Zero plugin 0.4.1

Choose a tag to compare

@github-actions github-actions released this 28 Sep 10:57

Install in Agent Zero: Plugins > Install from ZIP (this file), or install from git: https://github.com/wojciechwiesner/jit-context-os. One line for every agent host: curl -fsSL https://raw.githubusercontent.com/wojciechwiesner/jit-context/master/install.sh | bash

v0.2.11: TypeSafe JEV System 1 Gate, MCP Server & SWE-bench Suite

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 23 Sep 19:03

JIT-Context v0.2.11 — Universal Epistemic Runtime for AI Agents

CERN Zenodo Concept DOI: 10.5281/zenodo.22649541
CERN Zenodo Version DOI: 10.5281/zenodo.22649542

What's New in v0.2.11 & v0.2.9–v0.2.10

1. TypeSafe JEV Decision Engine (src/cognitive/jev_engine.py)

  • Integrated TypeSafe JEV System 1 context gate for fast epistemic ranking.
  • Sub-millisecond prefetch and cache read (<0.05ms) in daemon threads, eliminating latency on the agent hot-path.
  • CircuitBreaker with Invariant I6 (Fail-Open) falling back to deterministic token overlap on timeouts or rate-limits with zero agent crashes.

2. Model Context Protocol (MCP) Server (src/mcp_server.py)

  • Native MCP server exposing JIT epistemic retrieval, AST symbol indexing, and session memory to Claude Code, Codex, and external tool harnesses.

3. Empirical SWE-bench & GAIA Benchmark Suite (benchmarks/)

  • Reproducible multi-mode evaluation harness testing raw models vs. JIT context vs. JIT+JEV.
  • Verified telemetry tracking prompt/candidate tokens, wall-clock latency, and tool discovery cycles.

4. Epistemic Invariants & Zero Self-Poisoning (I1–I10)

  • Enforces strict unidirectional authority (User 1.0 > Environment 0.95 > Memory 0.6 > Assistant 0.0).
  • Subconscious schema sanitation distinguishing verified observations from unverified hypotheses.

Test Verification

  • 59/59 unit tests pass (pytest) with zero regressions.

Developed by Wojciech Wiesner wojciech@theones.io -= join.theones.io =- be The One Who Is Many -

v0.2.6: 1:1 Session Sandboxing, Live Session Routing & Obsidian SSOT Bridge

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 15 Sep 16:35

Highlights of v0.2.6

  • 1:1 Session Isolation Sandbox: Dedicated SQLite WAL (overlay_{session_id}.db) and physical context XML (ona_context_{session_id}.xml) per active session.
  • Per-Session Live Observatory Routing: /live?session={session_id} dynamically binds to the active session, locking view to that session even if background cron jobs or parallel workers run turns. Includes interactive dropdown session switcher.
  • Obsidian SSOT Live Bridge: Automatic lean snapshots into Obsidian (projects/{project}.md) recording commit SHA, session goal, and capsule path.
  • Runtime Tool Epistemics: Typed tool evidence models verifying process exits and file mutations before certifying actions done.
  • CERN Zenodo Concept DOI: 10.5281/zenodo.22649542

v0.2.4: Runtime Tool Epistemics, Dynamic Hot-Reload & Strict Scope Isolation

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 08 Sep 02:41

Highlights in v0.2.4

  • Runtime Tool Verification & Fact Extraction: Sinks verified tool exit codes and write results into SQLite WAL overlay with authority 1.0, rejecting ungrounded assistant speculations.
  • Physical Benchmark EXP-008: Real-world anti-hallucination test on gemini-3.8-flash demonstrating 100% grounded truth when tools fail.
  • Dynamic Module Hot-Reloading: Automatically detects file mtime changes and reloads in-memory modules without restarting long-running agent sessions.
  • Session CWD Tracking & Strict Scope Isolation: Eliminates cross-project context bleeding by dynamically tracking terminal directories and isolating scope state.
  • 27/27 Pytest Pass & 10/10 Invariants Verified.

CERN Zenodo DOI: 10.5281/zenodo.22649542

v0.1.3: JIT-Context — Verified Academic & Production Release

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 07 Sep 19:42

JIT-Context v0.1.3

  • Universal Architecture: Universal drop-in context runtime for autonomous AI agents.
  • Empirical Production Benchmark (EXP-005): Demonstrated 2.44x speedup, -61.4% LLM turns, zero test/patch errors, and 100% elimination of scope drift on Synthapse codebase.
  • Calibrated Context Capsule: Dynamic budget (400–1,200 tokens, ceiling <1,500 tokens / Invariant I8) preserving full architecture and guardrails.
  • Cryptographic Verification: Verified MANIFEST.sha256 checksums matching all source files and benchmark artifacts.
  • Valid Academic Citation: Standard compliant CITATION.cff for CERN / Zenodo DOI registration.

v0.1.2: JIT-Context — Universal Epistemic Runtime for AI Agents

Choose a tag to compare

@wojciechwiesner wojciechwiesner released this 07 Sep 19:38

JIT-Context v0.1.2: Universal Epistemic Context Runtime for AI Agents

  • Universal Architecture: Decoupled from any single framework — drop-in context runtime for Claude Code, Hermes, Cursor, OpenCode, Codex, and custom multi-agent harnesses.
  • Empirical Production Benchmark (EXP-005): Head-to-head paired benchmark on production repository Synthapse (Web Audio Generative AI Techno Instrument, Vitest + Vite build). Demonstrated 2.44x speedup (232s vs 568s), -61.4% LLM turns, zero test/patch errors, and 100% elimination of scope drift (4 files vs 14 files).
  • Calibrated Context Capsule: Dynamic budget (400–1,200 tokens, ceiling <1,500 tokens / Invariant I8) preserving full architecture, audio engine details, mastering guardrails, and key file mappings.
  • Cryptographic Verification: Complete verified matching all source files and benchmark artifacts.
  • Test Suite: 25/25 automated unit and invariant regression tests passing cleanly.