interface
EngineCallsThe calls this plugin declares. The base interface is EMPTY — s2s build generates
.s2script/gamedata.d.ts, which augments this from your gamedata's calls section.
@s2script/sdk/unsafe
Call an engine function the framework does not wrap, declared in your own gamedata. Validated at load and degraded to null on failure — requires a manifest permission and an operator allow-list entry.
import { EngineCalls } from "@s2script/sdk/unsafe";Author-time types ship in the npm package; the engine injects the runtime at plugin load.
Add @s2script/sdk to your plugin's dependencies.
Generated from the shipped type definitions.
EngineCallsThe calls this plugin declares. The base interface is EMPTY — s2s build generates
.s2script/gamedata.d.ts, which augments this from your gamedata's calls section.
EnginePlugin-declared engine calls, resolved from this plugin's own gamedata.
import { Engine } from "@s2script/sdk/unsafe";
// Resolve ONCE at load — null means the descriptor failed a load-time gate.
const ignite = Engine.call("ignite");
if (!ignite) console.log(`unavailable: ${Engine.status("ignite")}`);call(name: K): EngineCalls[K] | nullnull when its descriptor failed a load-time gate (signature miss,
validator rejection, slot outside .text, missing platform entry, or the plugin is not
operator-allow-listed). Guard once at load; the returned function is a plain callable.status(name: string): string"available" when it resolved. For diagnostics/operator reports.