Repository navigation
Releases: wojciechwiesner/jit-context
Release list
OpenCode plugin 0.2.0 (OpenCode 2.x support)
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 localOpenCode 1.x: use jit-context-opencode-v1.js instead (unchanged V1 entry).
Added
- V2 entry (
{ id, setup }). Toolsget_jit_context,record_jit_observationandget_project_stateare registered viactx.tool.transformwith JSON Schema inputs. Nothing fromeffector@opencode/pluginis needed at runtime. - The capsule is injected via the session
contexthook. The edit trail is recorded via toolexecute.after, including V2FileDiffmetadata.
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 runon OpenCode 2.1.4 calledget_project_state, which returned statuscompletedwith the correct STATE.md heading.
Checksums: SHA256SUMS.txt.
v0.5.1: Grounded capsules and safe diagnostics
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-onlyto 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
Added
- Per-project skill selection:
jit initnow picks must-have / optional skills from~/.hermes/skillsand relevant knowhow notes from~/Documents/Wojciech/knowhowwith 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.mdand merges askillsblock 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) andjit skills sync <worktree>(symlinks must-have skills into<worktree>/.claude/skills/) insrc/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/skillsto Pi'ssettings.jsonskills path. Registered ininstaller/cli.pyHOSTS.
Fixed
- Scope is anchored to the working directory: new
l1.scope.scope_from_cwd(~/Projects/active/<name>, git root, worktreegitdir:-> main repo) replacesPath.namein hooks;resolve_scope(cwd_scope=)lets only explicit switch commands change the active scope, other mentioned projects go to retrieval scopes only, andcompile_contextrealigns a stale stored scope. Tests:src/tests/test_scope_cwd_anchor.py. jit initstack detection and capsule verify command: Python no longer detected from helper scripts (scripts/,tools/,bin/,docs/) without a manifest (reported ashelper_languages); Node detection adds Vite, Vitest, Lit, Svelte, Vue, Hono, Tailwind, Playwright,package_managerfrom lockfile priority andtest_commandfromscripts.test; external knowledge is a data table; verify command is<pm> run testfor Node repos instead ofpytestfrom a baretests/dir. Shared logic insrc/context/stack_signals.py.scope_splitautochecker finding:config.get_session_dirpins 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 carryinggoal_anchor.ANCHOR_MARKERare notcapsule_goal_truncated;claim_without_proofignores negated/conditional claims and output containing exit=0 /N passed/ HTTP 200 proof. - JIT scope for delegated subagents and first turns:
get_session_cwdnow 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 scopegeneraland 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 listedcontext7 sqlmodeltwice. 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 modelgemini-3.1-flash-lite) through the new shared clientsrc/l0/borg_llm.pyinstead of direct Geminigenerativelanguage.googleapis.comcalls with the rate-limitedGOOGLE_API_KEY. Base URL/model are configurable viaJIT_LLM_BASE_URL/JIT_LLM_MODEL; the client fails loudly on missingBORG_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, default100.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
*.cssand*.jsassets (package-dataonly included*.html).
Added
- Small-model profile (
context/small_model.py): for local 2-9B models (LFM, Qwen, qwen-coder) detected from the hookmodel=field, the capsule gets a ranked list of skill pointers (name + one line, load viaskill_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(smallprofile).jit installlinks the Hermes plugin into every profile that listsona-contextinplugins.enabled(profiles read plugins from their own home; before this they silently ran without JIT).- Mission Control (
/mcon the livestream server, port 8766): one window with the live session stream, session history per project (matched bysessions.cwd), project status (STATE.md tasks/blockers, git, autochecks, deploy), the architecture diagram, the embedded.planning/state.htmlcockpit 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 incockpit_error. Spec:docs/MISSION_CONTROL.md. Tests:src/tests/test_mission_control.py. - Local Edge Autonomous Worker (
src/worker/andjit solve/jit workerCLI 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 oflfm2.5:2.6b-64kacrossbez_jit,jit_bez_jev, andjit_z_jevon 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.pycovering workspace capsule compilation and multi-turn tool execution.
Changed
src/context/cascade_distiller.py: Tier 2 local classifier fallback now prioritizes ultra-fast edge modellfm2.5:2.6b-64k(prefill 520 tok/s on Metal) with fallback toqwen3.8:jitandqwen2.5-coder:7b, with configurable timeoutJIT_LOCAL_TIMEOUT(default 2.5s).src/init.py: registeredworkerandsolvesubcommands inknown_cmdsand CLI parser routing.- Workflow
.github/workflows/agent-zero-mirror.yml: every push tomastertouchingintegrations/agent-zero/**(or a manual dispatch) rsyncs the plugin to the root ofwojciechwiesner/jit-context-osand pushes a regularchore(sync): mirror integrations/agent-zero from jit-context@<sha>commit (no force-push, no history rewrite). Needs the write deploy key secretJIT_CONTEXT_OS_DEPLOY_KEY.jit-context-osis now a read-only mirror; edit the plugin here. integrations/agent-zero/: reconciled drift withjit-context-osbefore the first sync so the mirror's--deleteloses nothing: portedCHANGELOG.md,CITATION.cff,docs/plans/2026-09-21-jev-bridge-plan.mdand.planning/(STATE, THOUGHTS, ARCHITECTURE), and merged the features, configuration table (corrected to realdefault_config.yamlkeys) and benchmark snapshot from its README.- Claude Code hooks now import an immutable runtime snapshot instead of the live dev checkout.
jit installcopiessrc/to~/.claude/jit-context-runtime/src-<head>[-dirty]-<timestamp>/(withDEPLOYED_FROM.txtand precompiled bytecode) and pointscurrentat it. The newhooks/jit_src_path.pyresolvesJIT_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 uninstallremoves the runtime directory. AGENTS.md(imported byCLAUDE.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/anddocs/.
Fixed
l0/epistemics.py+ newl0/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 against8b6a119:"retry the same UPDATE"wasVERIFIED/GROUNDED_EXACTfrom evidence saying"do not retry the same UPDATE", and"42"wasVERIFIED/COMPUTEDfrom apython_execoutput 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) isUNVERIFIED: CONTRADICTED_BY_NEGATION. ACOMPUTEDanswer (successful run, value absent from the output) isUNVERIFIED: NOT_IN_COMPUTED_OUTPUT.GateDecision.evidence_refsnow 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 triggersjit-spillover-hook.py) did not coverListMcpResourcesTool, ...
v0.3.0: One-line installer for Claude Code, Hermes, OpenCode and Agent Zero
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.jsonmerge, Hermes immutable plugin snapshot + gateway restart, OpenCode plugin (local bundle until the npm package is published), Agent Zero plugin copy keepingdata/+ self-test. Finds Python 3.11+ on stock macOS or installs it withuv. - 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
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
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
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
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-flashdemonstrating 100% grounded truth when tools fail. - Dynamic Module Hot-Reloading: Automatically detects file
mtimechanges 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
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
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.