@tryinget/pi-runtime-registry
Shared runtime instance registry for pi-interaction extensions
Package details
Install @tryinget/pi-runtime-registry from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@tryinget/pi-runtime-registry- Package
@tryinget/pi-runtime-registry- Version
0.2.0- Published
- Jul 13, 2026
- Downloads
- 224/mo · 224/wk
- Author
- tryinget
- License
- SEE LICENSE IN LICENSE
- Types
- extension
- Size
- 15.4 KB
- Dependencies
- 0 dependencies · 0 peers
Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
summary: "@tryinget/pi-runtime-registry package overview." read_when:
- "Orienting to this package or directory before changing its behavior."
@tryinget/pi-runtime-registry
Shared runtime instance registry for pi-interaction extensions.
Purpose
Provides a central place for registering and discovering runtime instances across extensions. Extensions can:
- Register their runtime instances with capability descriptors
- Discover runtimes by owner or capability
- Query registry state for diagnostics
Usage
import { createRuntimeRegistry, getGlobalRuntimeRegistry } from "@tryinget/pi-runtime-registry";
// Use the global singleton for cross-extension discovery
const registry = getGlobalRuntimeRegistry();
// Register a runtime with capabilities
registry.register(
"my-extension",
"main-runtime",
myRuntimeInstance,
[
{ id: "picker", description: "Fuzzy picker interactions" },
{ id: "editor", description: "Editor ownership" }
]
);
// Find runtimes by capability
const pickerRuntimes = registry.findByCapability("picker");
// Get diagnostics
console.log(registry.diagnostics());
API
createRuntimeRegistry(options?)
Create a new registry instance.
getGlobalRuntimeRegistry()
Get the process-wide singleton registry for cross-extension discovery.
Registry Methods
register(ownerId, runtimeId, instance, capabilities?)- Register a runtimeunregister(ownerId, runtimeId)- Remove a runtimeget(ownerId, runtimeId)- Get a specific runtimegetByOwner(ownerId)- Get all runtimes for an ownerfindByCapability(capabilityId)- Find runtimes with a capabilitylist()- List all runtimesdiagnostics()- Get registry diagnosticsclear()- Clear all runtimes