[P1] Add typed AgentProlog hook and extension-point registry #128
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm#128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #126
Depends on: #127 configuration runtime. Reuse existing
rlm_chainmiddleware,rlm_tool_loader, authority/effect boundaries, recursion/runtime events, andprolog_agent_ui_v1; do not build competing stacks.Goal
Define an inspectable typed extension-point registry for actual executable Prolog handlers registered from trusted AgentProlog configuration and trusted runtime modules.
The target is an Emacs-like programmable environment with explicit runtime ownership, not a static enable/disable catalog. A trusted XDG
config.prologshould be able to define predicates and register them directly as hook implementations.Executable project hooks are also supported only after that project configuration has passed #127's explicit trusted-project gate.
Required extension-point inventory
Initial registry must model stable identifiers for at least:
Exact names may change to match repository conventions.
Registry contract
Each registration carries stable id, extension point, schema/version, priority/order, allowed scopes, failure policy, origin/config generation, and a trusted Prolog callable.
The callable is intentionally executable inside the runtime. Catalog/model-facing inspection exposes sanitized identity/metadata but not the callable term itself.
Trusted user
config.prologmay register handlers. Trusted projectconfig.prologmay register project-scoped handlers. Untrusted project/model data may not register executable hooks.Define deterministic ordering, duplicate handling, generation-based unload/reload, cancellation propagation, and whether each point is observe-only, transform/waterfall, veto, or serial/parallel notification.
Runtime boundary
A hook may compute and influence only the semantics explicitly owned by its extension point. Registering a hook does not make its result a capability grant or authority decision unless the owning canonical subsystem explicitly interprets it that way.
Hooks must not silently swallow cancellation, durable-effect uncertainty, authority denial, or hard validation failures. Existing canonical modules remain the execution boundaries.
Acceptance
config.prologcan define a normal Prolog predicate and register it as a hook.config.prologhook examples, not merely declarative JSON examples.Child of #126; closed with the epic under the restored canonical boundary (#141, 2026-08-31): AgentProlog product configuration/UX belongs to lost-rob0t/agentProlog, and this is not a current prolog-rlm gap blocking a coding agent. Re-file in the product repo if still wanted.