Skip to content

Class: SafetyPolicyExtension

Registers kinds, readers, and writers on the Kernel.

The templates?() method is INTENTIONALLY OPTIONAL so extensions that predate Phase 0 (i.e. shipped before the Template contract existed) keep satisfying the Extension contract without modification. When present, Kernel.listTemplates() aggregates entries from every loaded extension so UIs (Tauri Studio, CLI) can offer scaffold() for any extension-shipped file tree. See ./templates.ts for the payload shape.

Implements

Constructors

Constructor

new SafetyPolicyExtension(fs?): SafetyPolicyExtension;

Parameters

Parameter Type Default value
fs FSLike nodeFS

Returns

SafetyPolicyExtension

Properties

name

readonly name: "safety" = "safety";

Implementation of

Extension.name


version

readonly version: "1.0.0" = "1.0.0";

Implementation of

Extension.version

Methods

register()

register(kernel): void;

Wire the extension into the kernel. kernel.load(ext) fail-loud validates the whole contract first (name non-empty string, version string, register callable → ExtensionLoadError otherwise), then calls register() with the registration-time host slice — see ExtensionHost for the exact vocabulary.

Parameters

Parameter Type
kernel ExtensionHost

Returns

void

Implementation of

Extension.register