Skip to content

Registry

The application-owned registry of installed extensions. It is process-local and never stored: conversations store extension names, and every resolution looks them up here. The registry is also where the scheduler finds task definitions, so installing an extension unblocks the tasks it defines.

Since v0.0.0


The section key reserved for the agent’s instructions.

Signature

declare const INSTRUCTIONS_KEY: "instructions"

Source

Since v0.0.0

Signature

declare class Registry

Source

Since v0.0.0

An install the registry refuses; nothing was published.

Signature

declare class RegistryError

Source

Since v0.0.0

Signature

export interface RegistryShape {
/** The current snapshot. */
readonly snapshot: () => Snapshot
/** Install `extension`, or replace the installed one with its name in place. Publishes at once. */
readonly install: (extension: Extension.Any) => Effect.Effect<void, RegistryError>
/** Remove the installed extension with this name, whichever object it is. A later install appends. */
readonly uninstall: (extension: Extension.Any | string) => Effect.Effect<void>
/** Call `listener` after every publication, until the scope closes. It must not throw or block. */
readonly subscribe: (listener: () => void) => Effect.Effect<void, never, Scope.Scope>
}

Source

Since v0.0.0

An immutable view of the whole registry at one moment.

Signature

export interface Snapshot {
readonly installed: ReadonlyArray<Extension.Any>
readonly extension: (name: string) => Extension.Any | undefined
/** The installed tasks by name. */
readonly task: (name: string) => Task.Any | undefined
}

Source

Since v0.0.0

Install an extension (or replace the installed one with its name).

Signature

declare const install: (extension: Extension.Any) => any

Source

Since v0.0.0

A registry holding extensions, in order.

Signature

declare const layer: (extensions?: Iterable<Extension.Any>) => Layer.Layer<Registry, RegistryError>

Source

Since v0.0.0

A registry holding extensions, in order.

Signature

declare const make: (extensions?: Iterable<Extension.Any>) => Effect.Effect<RegistryShape, RegistryError>

Source

Since v0.0.0

The current snapshot.

Signature

declare const snapshot: Effect.Effect<Snapshot, never, Registry>

Source

Since v0.0.0

Uninstall the extension with this name.

Signature

declare const uninstall: (extension: Extension.Any | string) => any

Source

Since v0.0.0