omp packages

@tryinget/pi-runtime-registry0.2.2

Shared runtime instance registry for pi-interaction extensions

GitHub Actions Published 1 month ago SEE LICENSE IN LICENSE ~1K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

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 runtime
  • unregister(ownerId, runtimeId) - Remove a runtime
  • get(ownerId, runtimeId) - Get a specific runtime
  • getByOwner(ownerId) - Get all runtimes for an owner
  • findByCapability(capabilityId) - Find runtimes with a capability
  • list() - List all runtimes
  • diagnostics() - Get registry diagnostics
  • clear() - Clear all runtimes

Release alignment: npm state must catch up to manifest pins after blocked wave e30aea5.