@deepstrike/wasm-kernel 0.2.61 → 0.2.63

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/LICENSE ADDED
@@ -0,0 +1,106 @@
1
+ DeepStrike License (Dual License)
2
+ Version 1.0 — 2026-09-01
3
+
4
+ Copyright (c) 2025-2026 DeepStrike Contributors
5
+ Project: https://github.com/kongusen/deepstrike
6
+
7
+ ======================================================================
8
+ 中文摘要(便于理解,不具有法律效力;以下英文条款为准)
9
+ ======================================================================
10
+
11
+ 本软件采用双授权模式:
12
+
13
+ 1. 个人,以及上一财年总营收低于 1,000,000 美元的组织(含其关联方),
14
+ 可按 MIT 条款免费使用本软件(见第 2 节),包括使用、复制、修改、
15
+ 合并、发布、分发、再授权及销售的权利。
16
+ 2. 上一财年总营收达到或超过 1,000,000 美元的组织(含其关联方),
17
+ 在使用本软件之前(包括内部使用、基于本软件开发的项目、以及对外
18
+ 分发此类产品或服务)须向作者获取商业授权(见第 3 节)。
19
+ 获取方式:发送邮件至 wanghaishan0210@gmail.com,或通过
20
+ https://github.com/kongusen/deepstrike 提交 Issue / Discussion
21
+ 联系作者。出于评估目的的试用不超过 30 天除外。
22
+ 3. 当组织的年营收增长至达到或超过该阈值时,自该时点起第 2 节的免费
23
+ 授权终止,须获取商业授权后方可继续使用。
24
+ 4. v0.2.62 及之前已经以 MIT 协议发布的版本继续适用 MIT 协议,不受
25
+ 本协议影响。本协议仅适用于随其一同分发的版本。
26
+
27
+ ======================================================================
28
+ TERMS AND CONDITIONS
29
+ ======================================================================
30
+
31
+ 1. DEFINITIONS
32
+
33
+ "Software" means the DeepStrike software and associated documentation
34
+ files distributed by the Licensor, including all copies and substantial
35
+ portions thereof.
36
+
37
+ "Licensor" means the copyright holders of the Software (the DeepStrike
38
+ Contributors), represented by the project maintainer at
39
+ https://github.com/kongusen/deepstrike.
40
+
41
+ "You" (or "Licensee") means the individual or legal entity exercising
42
+ permissions granted by this License, including, where that entity is an
43
+ organization, all entities that control, are controlled by, or are under
44
+ common control with that entity ("Affiliates"). "Control" means ownership
45
+ of more than fifty percent (50%) of the equity or voting interests, or
46
+ the power to direct management and policies.
47
+
48
+ "Annual Revenue" means the total gross revenue of You and Your Affiliates
49
+ for the most recently completed fiscal year, expressed in US dollars or
50
+ converted into US dollars at prevailing exchange rates.
51
+
52
+ 2. FREE LICENSE FOR INDIVIDUALS AND SMALL ORGANIZATIONS
53
+
54
+ If You are an individual, or a legal entity whose Annual Revenue is less
55
+ than one million US dollars (USD 1,000,000), the Licensor hereby grants
56
+ You, free of charge, permission to deal in the Software without
57
+ restriction, including without limitation the rights to use, copy, modify,
58
+ merge, publish, distribute, sublicense, and/or sell copies of the
59
+ Software, and to permit persons to whom the Software is furnished to do
60
+ so, subject to the following conditions:
61
+
62
+ (a) The above copyright notice and this License shall be included in all
63
+ copies or substantial portions of the Software.
64
+
65
+ (b) If Your Annual Revenue reaches or exceeds USD 1,000,000, the grant in
66
+ this Section 2 terminates for You, and Section 3 applies from that
67
+ point on.
68
+
69
+ 3. COMMERCIAL LICENSE REQUIRED (ANNUAL REVENUE >= USD 1,000,000)
70
+
71
+ If Your Annual Revenue equals or exceeds one million US dollars
72
+ (USD 1,000,000), You must obtain a commercial license from the Licensor
73
+ before using the Software. This applies to every form of use, including
74
+ internal use, use within products or services developed based on the
75
+ Software, and distribution or provision of such products or services to
76
+ third parties.
77
+
78
+ Exception: You may use the Software without a commercial license solely
79
+ for evaluation purposes, for a period of up to thirty (30) days.
80
+
81
+ To obtain a commercial license, contact the Licensor at
82
+ wanghaishan0210@gmail.com, or via the project repository at
83
+ https://github.com/kongusen/deepstrike (open an issue or discussion).
84
+ Commercial terms, including fees, are set by individual agreement with
85
+ the Licensor.
86
+
87
+ Any use of the Software requiring a commercial license under this
88
+ Section 3 without one is unlicensed use and constitutes copyright
89
+ infringement.
90
+
91
+ 4. PRIOR VERSIONS
92
+
93
+ Versions of the Software released before this License took effect (up to
94
+ and including version 0.2.62) were released under the MIT License and
95
+ remain available under the terms of the MIT License. This License applies
96
+ only to versions of the Software distributed together with it.
97
+
98
+ 5. NO WARRANTY
99
+
100
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
101
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
102
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
103
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
104
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
105
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
106
+ DEALINGS IN THE SOFTWARE.
@@ -252,6 +252,7 @@ export class CanonicalKernel {
252
252
  * Commit only after the journal appended the prepared record.
253
253
  */
254
254
  commit(prepare_token: string, appended_head: string): CanonicalCommit;
255
+ currentProjectionJson(): string;
255
256
  lifecycle(): CanonicalLifecycle;
256
257
  constructor();
257
258
  pendingEffectsJson(): string;
@@ -259,6 +260,8 @@ export class CanonicalKernel {
259
260
  * Strictly decode and prepare one canonical envelope.
260
261
  */
261
262
  prepare(input_json: string): CanonicalPreparation;
263
+ projectPlannedStepJson(planned_step_json: string): string;
264
+ publishedEffectsManifestJson(planned_step_json: string): string;
262
265
  /**
263
266
  * Replace this handle in place from checkpoint bytes plus post-checkpoint record bytes.
264
267
  */
@@ -114,6 +114,33 @@ export class CanonicalKernel {
114
114
  wasm.__wbindgen_add_to_stack_pointer(16);
115
115
  }
116
116
  }
117
+ /**
118
+ * @returns {string}
119
+ */
120
+ currentProjectionJson() {
121
+ let deferred2_0;
122
+ let deferred2_1;
123
+ try {
124
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
125
+ wasm.canonicalkernel_currentProjectionJson(retptr, this.__wbg_ptr);
126
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
127
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
128
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
129
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
130
+ var ptr1 = r0;
131
+ var len1 = r1;
132
+ if (r3) {
133
+ ptr1 = 0; len1 = 0;
134
+ throw takeObject(r2);
135
+ }
136
+ deferred2_0 = ptr1;
137
+ deferred2_1 = len1;
138
+ return getStringFromWasm0(ptr1, len1);
139
+ } finally {
140
+ wasm.__wbindgen_add_to_stack_pointer(16);
141
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
142
+ }
143
+ }
117
144
  /**
118
145
  * @returns {CanonicalLifecycle}
119
146
  */
@@ -176,6 +203,66 @@ export class CanonicalKernel {
176
203
  wasm.__wbindgen_add_to_stack_pointer(16);
177
204
  }
178
205
  }
206
+ /**
207
+ * @param {string} planned_step_json
208
+ * @returns {string}
209
+ */
210
+ projectPlannedStepJson(planned_step_json) {
211
+ let deferred3_0;
212
+ let deferred3_1;
213
+ try {
214
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
215
+ const ptr0 = passStringToWasm0(planned_step_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
216
+ const len0 = WASM_VECTOR_LEN;
217
+ wasm.canonicalkernel_projectPlannedStepJson(retptr, this.__wbg_ptr, ptr0, len0);
218
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
219
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
220
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
221
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
222
+ var ptr2 = r0;
223
+ var len2 = r1;
224
+ if (r3) {
225
+ ptr2 = 0; len2 = 0;
226
+ throw takeObject(r2);
227
+ }
228
+ deferred3_0 = ptr2;
229
+ deferred3_1 = len2;
230
+ return getStringFromWasm0(ptr2, len2);
231
+ } finally {
232
+ wasm.__wbindgen_add_to_stack_pointer(16);
233
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
234
+ }
235
+ }
236
+ /**
237
+ * @param {string} planned_step_json
238
+ * @returns {string}
239
+ */
240
+ publishedEffectsManifestJson(planned_step_json) {
241
+ let deferred3_0;
242
+ let deferred3_1;
243
+ try {
244
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
245
+ const ptr0 = passStringToWasm0(planned_step_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
246
+ const len0 = WASM_VECTOR_LEN;
247
+ wasm.canonicalkernel_publishedEffectsManifestJson(retptr, this.__wbg_ptr, ptr0, len0);
248
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
249
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
250
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
251
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
252
+ var ptr2 = r0;
253
+ var len2 = r1;
254
+ if (r3) {
255
+ ptr2 = 0; len2 = 0;
256
+ throw takeObject(r2);
257
+ }
258
+ deferred3_0 = ptr2;
259
+ deferred3_1 = len2;
260
+ return getStringFromWasm0(ptr2, len2);
261
+ } finally {
262
+ wasm.__wbindgen_add_to_stack_pointer(16);
263
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
264
+ }
265
+ }
179
266
  /**
180
267
  * Replace this handle in place from checkpoint bytes plus post-checkpoint record bytes.
181
268
  * @param {Uint8Array | null | undefined} checkpoint_bytes
Binary file
package/package.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "name": "@deepstrike/wasm-kernel",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for DeepStrike runtime kernel",
5
- "version": "0.2.61",
6
- "license": "MIT",
5
+ "version": "0.2.63",
6
+ "license": "SEE LICENSE IN LICENSE",
7
7
  "files": [
8
8
  "deepstrike_wasm_bg.wasm",
9
9
  "deepstrike_wasm.js",