Repository navigation
agent-context-graph: entry_points-based runtime plugin registry - #273
Merged
Merged
Conversation
bootstrap/doctor/setup <runtime> and hook run/init <runtime> hardcoded
a closed choices=["codex", "claude-code"] enum with if/else dispatch
in three places (cli.py's _check_runtime, hooks/cli.py's _run_runtime
and _init) -- a third-party package implementing its own RuntimeAdapter
for a new harness had no way to get bootstrap/doctor/setup support
without a code change here.
Adds a RuntimeCLIPlugin protocol (adapter_class, response_for_payload,
build_hooks_config, optional init) registered via the
agent_context_graph.runtimes entry point group, resolved through
importlib.metadata.entry_points() -- no registry file, no code changes
to this package needed for a new runtime.
Also extracts hooks/runner.py: codex.py and claude_code.py's main()
duplicated near-identical stdin-loading/connector-construction/
CLI-argument logic (flagged by a pre-existing # TODO in codex.py),
differing only in the adapter class and a few env var names. One
generic run_hook(plugin, argv) now serves both, and any future
runtime, driven by the plugin object instead of a hardcoded branch.
Codex and Claude Code become the first two registered plugins (in
this package's own pyproject.toml) rather than special-cased code
paths -- claude-code's plugin has no init, matching its pre-existing
"not implemented yet" behavior, now expressed by simply omitting the
optional protocol member instead of a hardcoded early-return.
All 88 existing + new unit tests pass unchanged in behavior (only
monkeypatch targets moved, matching where the code moved to). Smoke
tested for real: hook run/init codex, hook init claude-code's
not-implemented message, an unknown-runtime error, and doctor
--runtime {codex,claude-code} against a live Memgraph instance.
Design: #269
This was referenced Aug 11, 2026
antejavor
added a commit
that referenced
this pull request
Aug 18, 2026
…try_points registry) (#295) PyPI has been stale for months relative to main -- these four packages haven't been released since before most of maps #275/#288's work landed, so the actual subagent-nesting model (Agent node, SPAWNED inference, HAS_AGENT, USED_SKILL-on-Agent attachment) isn't published anywhere yet. - actions-graph 0.1.2 -> 0.2.0: first-class Agent node model, SPAWNED inference rule, and the agent_spawning_tool_names default-name fix, all verified live against a real Claude Code session. - skills-graph 0.1.3 -> 0.2.0: USED_SKILL attaching to the specific Agent (not just the flat Session) when skill usage happens inside a subagent. - sessions-graph 0.4.0 -> 0.5.0: reconcile_session() now writes episodic Session.summary, plus config propagation fixes to the reconcile subprocess. (0.4.0 itself was already unreleased -- the ontology/label- promotion work from #248/#251.) - agent-context-graph 0.1.9 -> 0.2.0: entry_points-based runtime plugin registry. (main's 0.1.9 already diverged from the last published 0.1.9 build without a version bump -- #273 landed after the last release.) No code changes -- version bumps only, verified compatible with existing consumers (all internal >= constraints, no upper bounds).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bootstrap/doctor/setup <runtime>andhook run/init <runtime>hardcoded a closedchoices=["codex", "claude-code"]enum with if/else dispatch in three places (cli.py's_check_runtime,hooks/cli.py's_run_runtimeand_init) -- a third-party package implementing its ownRuntimeAdapterfor a new harness had no way to getbootstrap/doctor/setupsupport without a code change here.RuntimeCLIPluginprotocol (adapter_class,response_for_payload,build_hooks_config, optionalinit) registered via theagent_context_graph.runtimesentry point group, resolved throughimportlib.metadata.entry_points()-- no registry file, no code changes to this package needed to add a runtime.hooks/runner.py:codex.pyandclaude_code.py'smain()duplicated near-identical stdin-loading/connector-construction/CLI-argument logic (flagged by a pre-existing# TODOincodex.py), differing only in the adapter class and a few env var names. One genericrun_hook(plugin, argv)now serves both, and any future runtime.pyproject.toml) rather than special-cased code paths -- Claude Code's plugin has noinit, matching its pre-existing "not implemented yet" behavior, now expressed by simply omitting the optional protocol member instead of a hardcoded early-return.Implements the design from Grilling: CLI plugin-discovery for custom runtime adapters, a child ticket of the Wayfinder map Continuous memory organization for context-graph.
Test plan
ruff check/ruff format --checkhook run codexwith a live Stop payload,hook run <unknown>prints a clear "Unknown runtime" error listing what's registered,hook init claude-codestill prints its pre-existing "not implemented yet" message,hook init codexwrites real.codex/config.toml+.codex/hooks.jsondoctor --runtime codexanddoctor --runtime claude-codeboth pass their full check suite (including the new registry-basedruntime:smoke check) against a live Memgraph instancemaintoo (unrelated to this change) by reproducing it against unmodifiedmainviagit stash