import { PublishHandle } from "@s2script/sdk/interfaces";
Author-time types ship in the npm package; the engine injects the runtime at plugin load.
Add @s2script/sdk to your plugin's dependencies.
API reference
Generated from the shipped type definitions.
interface
PublishHandle
Handle returned by publish(name, impl): lets the producer emit forwarded
events to every plugin subscribed to this interface via its on(event, …).
emit(event: string, payload: unknown): void
Emit a forwarded event to all consumers subscribed via interface.on(event, …). The payload is
structured-copied across the context boundary (JSON, EntityRef-aware — never a live reference).
import type { PublishHandle } from "@s2script/sdk/interfaces";// plugins/zones/src/plugin.ts:30 — notify consumers a zone was creatediface.emit("created", { zone: z.name, min: z.min, max: z.max, tags: z.tags });
interface
Notification
Type-only protocol 2 descriptor. Payloads must belong to the supported wire algebra.
readonly __notificationPayload: P
interface
Hook
Synchronous decision forward. Changed does not imply payload mutation.
readonly __hookPayload: P
interface
Transform
Synchronous shallow transformation; only W fields may be patched.
readonly __transformPayload: P
readonly __transformWritable: W
type
TransformResponse
interface
InterfaceContracts
CLI-generated association; an authored augmentation cannot authorize a build.