Skip to main content

witan-core

Shared core for the two witan MCP servers — witan (dist witan-council, mcp/servers/witan) and witan-code (mcp/servers/witan-code). It is the third shared packages/ sibling alongside agent-config-kit, wired into both servers via a [tool.uv.sources] editable path (dev/CI) plus a published PyPI version range.

Why

The two servers were built copy-paste-and-diverge and carried an explicit "deliberately duplicated — no cross-package import" convention. As the shared surface grew, fixes had to be applied twice and silently drifted — including code that is contractually required to stay identical (the repo-key canonicalizer behind the cross-layer symbol join key; the pinned omnigraph binary version, kept in lockstep by a fragile Renovate custom manager).

witan-core deliberately reverses that convention. The full rationale, scope, and per-extraction contracts live in docs/design/witan-core-extraction-spec.md.

Invariant

witan_core imports neither witan nor witan_code. It is a leaf below both, preserving the one-directional witanwitan_code optional-mount DAG (witan mounts witan-code as witan code; witan-code never imports witan).

Dependencies

The base package is stdlib-only. Heavier concerns are gated behind extras so neither server pulls weight it doesn't use:

  • witan-core[cli]cyclopts, rich (CLI scaffolding, styled installer output)
  • witan-core[mcp]fastmcp (MCP elicitation primitives)

What's here

Extracted so far (each deletes the duplicated copies from both servers):

  • _detach.popen_detached — cross-platform detached subprocess spawning
  • omnigraph_install — the pinned-omnigraph-binary installer (single source of the version; rich imported lazily)
  • elicit — the confirm/text MCP elicitation primitives (needs the mcp extra; not re-exported from the package root)
  • repo_keynormalise + find_git_config, the cross-layer repo-key canonicalizer, with a golden contract test
  • timeutil.now_iso
  • maintenance — the throttled-optimize stamp/interval/due mechanics
  • omnigraph.OmnigraphClient — the omnigraph-CLI subprocess wrapper base (write lock, retry/repair, admission-cap backoff); each server subclasses it (witan adds apply_schema; witan-code adds branch ops + bulk load)
  • config_file.load_toml — shared config.toml loading (WITAN_CONFIG env var). Both servers read the same file, so one [targets.<name>] block can override both at once.
  • target_config — the [targets.<name>] match/select logic: match_target (priority match_paths > match_repos > match_hosts > match_orgs), parse_target_tables, to_list, local_project_path. Each server keeps its own typed target model (different override fields — witan's server/graph/token/…, witan-code's code_dir) and calls into this shared matcher, which is structurally typed over just the four match_* lists.

Still local to each server (intentionally): the CLI scaffolding — its extraction coordinates with the in-flight multi-user deployment work (see the spec).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

witan_core-0.22.0.tar.gz (208.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

witan_core-0.22.0-py3-none-any.whl (122.1 kB view details)

Uploaded Python 3

File details

Details for the file witan_core-0.22.0.tar.gz.

File metadata

  • Download URL: witan_core-0.22.0.tar.gz
  • Upload date:
  • Size: 208.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for witan_core-0.22.0.tar.gz
Algorithm Hash digest
SHA256 61857f5ad2ff201f7a259b3e18dbd6e9b0e3f6cec13f46732f10d021732c3ffa
MD5 836be113e0bb34fa7aeefb20a8d7f35a
BLAKE2b-256 df71cdfeaef2cabdd0ef3232b6c242ae4e49456bd0efd6ccbfefa85f34a9d2d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan_core-0.22.0.tar.gz:

Publisher: publish-witan-core.yml on mitodl/agent-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file witan_core-0.22.0-py3-none-any.whl.

File metadata

  • Download URL: witan_core-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 122.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for witan_core-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6405b765047eb5eb8a94d9108d17d781872178aafd501a8470a843059f43bd9
MD5 bd2214e65a2920fbb98a7f0cef136986
BLAKE2b-256 6d1b6c907e3d614ad1bb55d7bc59a7d84a83390ea22ae86ef75094d24668242a

See more details on using hashes here.

Provenance

The following attestation bundles were made for witan_core-0.22.0-py3-none-any.whl:

Publisher: publish-witan-core.yml on mitodl/agent-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.35.0

2 files

0.34.0

2 files

0.33.1

2 files

0.33.0

2 files

0.32.2

2 files

0.32.1

2 files

0.32.0

2 files

0.31.0

2 files

0.30.0

2 files

0.29.0

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

This release

0.22.0 This release

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page