Context
aiperceivable/apcore PR #54 introduces docs/spec/rfc-ephemeral-modules.md — a reserved ephemeral.* namespace for programmatically-registered modules synthesized at runtime by LLM agents (à la ToolMaker, ACL 2025, arXiv 2502.11705).
apcore-python is the recommended pilot SDK because it already has the register_internal() precedent (used for system.* modules) — the closest existing pattern in any of the three SDKs.
Why pilot here first
- Existing programmatic-registration path:
Registry.register(module_id, module, ...) already accepts caller-supplied IDs.
- Existing
register_internal() for system.* proves the non-filesystem registration model in production.
- Python's runtime introspection makes the
discoverable: false filter trivial to implement (hasattr / annotation-driven).
Scope of pilot
- Reserve
ephemeral.* namespace — error if it's used as a filesystem-derived ID; allow only via Registry.register().
- Add
discoverable: false annotation to ModuleAnnotations (default true). When false, exclude from Registry.list() / find() / manifest exports.
- Audit-event emission — emit
apcore.registry.module_registered / apcore.registry.module_unregistered for ephemeral.* IDs (mirroring D-35 contextual-auditing shape).
- Soft warning when
requires_approval is not true on an ephemeral.* registration — guard against unattended execution of agent-synthesized code.
- Lifecycle: caller-managed (
Registry.unregister()) for the v1 pilot. TTL/GC sweeper deferred to v2 if leakage is observed.
Out of scope (host concern)
Sandboxing of agent-synthesized code bodies. Hosts (apcore-mcp, apcore-cli, etc.) provide their own isolation. This pilot is registration + audit + lifecycle only.
Acceptance criteria
Cross-refs
🤖 Generated with Claude Code
Context
aiperceivable/apcorePR #54 introducesdocs/spec/rfc-ephemeral-modules.md— a reservedephemeral.*namespace for programmatically-registered modules synthesized at runtime by LLM agents (à la ToolMaker, ACL 2025, arXiv 2502.11705).apcore-python is the recommended pilot SDK because it already has the
register_internal()precedent (used forsystem.*modules) — the closest existing pattern in any of the three SDKs.Why pilot here first
Registry.register(module_id, module, ...)already accepts caller-supplied IDs.register_internal()forsystem.*proves the non-filesystem registration model in production.discoverable: falsefilter trivial to implement (hasattr/ annotation-driven).Scope of pilot
ephemeral.*namespace — error if it's used as a filesystem-derived ID; allow only viaRegistry.register().discoverable: falseannotation toModuleAnnotations(defaulttrue). Whenfalse, exclude fromRegistry.list()/find()/ manifest exports.apcore.registry.module_registered/apcore.registry.module_unregisteredforephemeral.*IDs (mirroring D-35 contextual-auditing shape).requires_approvalis nottrueon anephemeral.*registration — guard against unattended execution of agent-synthesized code.Registry.unregister()) for the v1 pilot. TTL/GC sweeper deferred to v2 if leakage is observed.Out of scope (host concern)
Sandboxing of agent-synthesized code bodies. Hosts (
apcore-mcp,apcore-cli, etc.) provide their own isolation. This pilot is registration + audit + lifecycle only.Acceptance criteria
ephemeral.*namespace reserved + testeddiscoverableannotation added + honored byRegistry.list()/find()ephemeral.*IDsrequires_approvalis nottrueonephemeral.*registrationCross-refs
docs/spec/rfc-ephemeral-modules.md)register_internal()forsystem.*modules🤖 Generated with Claude Code