@s2script/sdk 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat.d.ts +7 -2
- package/dist/cli.js +846 -144
- package/package.json +4 -1
- package/unsafe.d.ts +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s2script/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "MIT OR Apache-2.0",
|
|
5
5
|
"description": "s2script SDK — the builtin capability types (imported as @s2script/sdk/entity, …) plus the `s2s` CLI for building Source 2 / CS2 plugins.",
|
|
6
6
|
"type": "module",
|
|
@@ -111,6 +111,9 @@
|
|
|
111
111
|
"./transmit": {
|
|
112
112
|
"types": "./transmit.d.ts"
|
|
113
113
|
},
|
|
114
|
+
"./unsafe": {
|
|
115
|
+
"types": "./unsafe.d.ts"
|
|
116
|
+
},
|
|
114
117
|
"./usercmd": {
|
|
115
118
|
"types": "./usercmd.d.ts"
|
|
116
119
|
},
|
package/unsafe.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @s2script/sdk/unsafe — plugin-declared engine calls. NO runtime code: the engine injects the
|
|
3
|
+
* implementation at load (`__s2pkg_unsafe`).
|
|
4
|
+
*
|
|
5
|
+
* UNSAFE by design. A declared call reaches a real engine function. The framework validates every
|
|
6
|
+
* descriptor at load and degrades a failure to `null`, but it cannot prove your signature or vtable
|
|
7
|
+
* index names the function you meant. Requires manifest `permissions: ["engine:calls"]` AND an
|
|
8
|
+
* operator allow-list entry (see docs/superpowers/specs/2026-07-24-plugin-gamedata-design.md §6).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The calls this plugin declares. The base interface is EMPTY — `s2s build` generates
|
|
13
|
+
* `.s2script/gamedata.d.ts`, which augments this from your gamedata's `calls` section.
|
|
14
|
+
*/
|
|
15
|
+
export interface EngineCalls {}
|
|
16
|
+
|
|
17
|
+
export declare const Engine: {
|
|
18
|
+
/**
|
|
19
|
+
* The declared call, or `null` when its descriptor failed a load-time gate (signature miss,
|
|
20
|
+
* validator rejection, slot outside `.text`, missing platform entry, or the plugin is not
|
|
21
|
+
* operator-allow-listed). Guard once at load; the returned function is a plain callable.
|
|
22
|
+
*/
|
|
23
|
+
call<K extends keyof EngineCalls>(name: K): EngineCalls[K] | null;
|
|
24
|
+
/** Why a descriptor is unavailable; `"available"` when it resolved. For diagnostics/operator reports. */
|
|
25
|
+
status(name: string): string;
|
|
26
|
+
};
|