Independent Project Not affiliated with, sponsored by, or endorsed by the Watch Tower Bible and Tract Society or Jehovah's Witnesses.
jw-agent-toolkit
ES

Release 49-56 · jw-core complete + JS bridge

The toolkit speaks 1672 languages

Eight phases that move from "jw-core almost complete" to "jw-core is the official multilingual SDK". Persistent second-brain, native JWPUB and .jwlibrary generation, interop schemas for organized-app, Omnilingual ASR (1672 languages), NLLB-200 (200 languages, with exact Bible reference preservation), wire-up across 8 call sites and an honest close-out of the JS bridge with anti-drift Python↔TypeScript CI.

Phases

8

New tests

197+

Commits

30+

Phase 49

second-brain

Karpathy-style persistent memory + GraphRAG

✅ Shipped 🧪 95 tests ⊜ 22 commits T1 Multilingual SOTA + integration
Technical guide →

Compiler that extracts knowledge from the toolkit into a queryable graph. Dual backend DuckDB/Neo4j, Wiki over Obsidian with human_edited honored. Multi-tenant. BrainDomain plugins via F41.

What shipped

  • Karpathy-style: extracts entities and relationships from the toolkit code and docs.
  • Swappable backends: DuckDB (zero-config) or Neo4j (relationship-heavy).
  • Wiki on Obsidian: operator edits set human_edited=true and the compiler preserves them.
  • CLI: jw brain {init, compile, query, lint, status, snapshot, list}.
  • MCP tools: second_brain_query, second_brain_status, second_brain_compile.
  • F41 plugins: builtin TJ domain + financial fixture.

Phase 50

jwpub-writer

Generate native .jwpub files JW Library imports

✅ Shipped 🧪 9 tests ⊜ 1 commit T2 Generation and interop
Technical guide →

Closes the F5.5 (decrypt) symmetric loop. Port of darioragusa/html2jwpub (MIT, Swift): SHA-256+XOR key/IV, AES-128-CBC encrypt, zlib deflate, SQLite manifest + outer ZIP. Shared crypto module jw_core.jwpub_crypto.

What shipped

  • JwpubBuilder.add_document() / add_media() / build() — API symmetric to the parser.
  • 750-line SQLite schema lifted verbatim from html2jwpub dbQuery.swift.
  • encrypt_blob() (new) + decrypt_blob() (existing) share the XOR_KEY constant.
  • New CLI: jw jwpub build <folder> --out --symbol --year --lang.
  • Tests parametrised by content size (10/100/1000/10000) cover PKCS7 boundary.
  • Round-trip verified: builder → parser → identical bytes.

Phase 51

organized-app schemas

Pydantic v2 verbatim port from sws2apps/organized-app

✅ Shipped 🧪 10 tests ⊜ 1 commit T2 Generation and interop
Technical guide →

Port of the TypeScript types from organized-app (MIT) — the React PWA used by hundreds of congregations. Enables interop without depending on React/Firebase. The CRDT envelope Timestamped[T] preserves updatedAt per field.

What shipped

  • PersonType with publisher_baptized/unbaptized/midweek_meeting_student histories.
  • SchedWeekType with full midweek (chairman, TGW, AYF parts 1-4, LC, CBS) and weekend.
  • WeekType IntEnum (NORMAL=1, MEMORIAL=5, WATCHTOWER_STUDY=13, NO_MEETING=20).
  • AssignmentCode IntEnum 100-300 (MM_BibleReading=100, MINISTRY_HOURS_CREDIT=300).
  • UserFieldServiceMonthlyReportType — post-2023 S-21 layout.
  • Tests verify enum values verbatim TS + JSON envelope round-trip with by_alias.

Phase 52

jwlibrary-writer

Write .jwlibrary backups from agents and scripts

✅ Shipped 🧪 9 tests ⊜ 1 commit T2 Generation and interop
Technical guide →

Closes the read-write loop with the official JW Library app (Phase 19 was read-only). Port of erykjj/jwlmanager (MIT). The libjwlCore-based merge stays out (closed-source binary blob). write_backup() packs the userData.db; update_backup() offers extract → modify(conn) → repack.

What shipped

  • write_backup(out, *, user_data_db_path, ...) — userData.db + manifest + SHA-256 + ZIP.
  • update_backup(in, out, modify_fn) — round-trip extract → callback → repack.
  • PRAGMA user_version propagates to manifest.schemaVersion.
  • LastModified UPDATE re-stamps each repack (tolerant if the table is missing).
  • New CLI: jw library {inspect, re-export, from-notes}.
  • from-notes: agents produce notes JSON → .jwlibrary importable in JW Library.

Phase 53

omnilingual-asr

Meta Omnilingual ASR — 1672 languages, Apache 2.0

✅ Shipped 🧪 16 tests ⊜ 1 commit T1 Multilingual SOTA + integration
Technical guide →

Integrates facebookresearch/omnilingual-asr as a first-class provider. Polyglot Python: fairseq2 has no cp313 wheels, so OmnilingualProvider lives in a dedicated Python 3.12 venv and runs via subprocess JSON. Quechua, Kinyarwanda, Aymara, Guarani all confirmed.

What shipped

  • OmnilingualProvider fires a worker in a dedicated 3.12 venv (~/.jw-core/omnilingual/venv).
  • 1672 languages — the long tail that Deepgram (~16) and Whisper-large-v3 (~99) miss.
  • ISO-639-1 → FLORES-200 mapping curated for JW cases (qu → quy_Latn, rw → kin_Latn).
  • Default model: omniASR_CTC_300M (Mac M1/M2 8GB). 7B-Unlimited for server GPU.
  • New CLI: jw omnilingual {install, status, transcribe, supports}.
  • End-to-end verified: real install plus quechua/kinyarwanda/aymara/guarani support.

Phase 54

nllb-translation

NLLB-200 with exact Bible reference preservation

✅ Shipped 🧪 10 tests ⊜ 1 commit T1 Multilingual SOTA + integration
Technical guide →

NLLBProvider wraps Meta's NLLB-200 (200 languages, CC-BY-NC-4.0) backed by CTranslate2 INT8 (~7 GB on M-series). is_commercial_safe = False at the attribute level — the router filters it structurally. translate_preserving_references() masks refs before the model and restores them in the target language.

What shipped

  • CTranslate2 4.7+ has cp313 wheels — runs in-process (no separate venv).
  • ISO → FLORES map with explicit low-resource entries (yor_Latn, kin_Latn, swh_Latn).
  • is_commercial_safe = False — the F55.1 router filters NLLB when commercial=True.
  • translate_preserving_references(text, source, target, provider) in jw_core.translation.
  • Zero numeric hallucination on verses: the model never sees the reference.
  • 10 tests with ctranslate2/transformers mocked — no 7 GB weights download in CI.

Phase 55

multilingual wire-up

8 call sites that activate F50-F54 in the toolkit

✅ Shipped 🧪 24 tests ⊜ 1 commit T1 Multilingual SOTA + integration
Technical guide →

Converts F50-F54 from ported islands into actual capabilities. Without this, the modules existed but nobody called them. Honest pre-F55 audit: zero uses across agents and CLI beyond tests.

What shipped

  • F55.1 — get_asr_provider(language) auto-routes Quechua → Omnilingual without naming it.
  • F55.1 — get_translation_provider(commercial=True) excludes NLLB on licence grounds.
  • F55.2 — jw translate CLI + MCP translate_preserving_refs tool.
  • F55.3 — jw library CLI: agents → JW Library importable .jwlibrary.
  • F55.4 — jw jwpub build CLI: HTML+media → native .jwpub.
  • F55.5 — parse/write_organized_backup() — JSON ↔ Pydantic models.
  • F55.6 — bridge ministry.MonthlyReport ↔ post-2023 organized S-21.
  • F55.7 — cross_lingual_research agent: query A → corpus B → results in A with refs intact.
  • F55.8 — broadcasting.transcribe_and_index_audio + optional translate_to flag.

Phase 56

jw-core-js close-out

Close F47 MVP honestly with anti-drift CI

✅ Shipped 🧪 24 tests ⊜ 2 commits T4 JS surface
Technical guide →

Audit revealed 3 ROADMAP F47 lies: F48 was already integrated (not pending), cookbook 12 already passes, buckets B/C/D/E have no real justification (Capacitor mobile is vaporware). F56 fixes the docs, closes the real Python↔TS parity gap, and adds a blocking CI workflow.

What shipped

  • F56.1 — Honest ROADMAP + guide: 3 inconsistencies fixed; buckets B/C/D/E deferred.
  • F56.2 — Language type re-exported from core, dedup in F48 (-7 LOC).
  • F56.3 — Fixture 17 → 174 cases + verifying detected_language + raw_match.
  • F56.4 — .github/workflows/cross-lang.yml + Makefile dump-shared-data + git diff --exit-code.
  • F56.5 — BibleRef.fromWolUrl() + langFromWolPath() (pure inverse of wolUrl).
  • F48 verse_detector.ts: -35 LOC delegating URL parsing to core. Thin-adapter pattern.
  • Final cross-stack: 174 Python + 212 TS + 41 extension = 427 tests green.