@songtonyli/dsh-cli 0.1.25 → 0.1.27

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.
@@ -570,11 +570,12 @@ static int AnalyseFlatRec(const TypeInfo *type, int offset, int count, FunctionR
570
570
  }
571
571
  } else if (type->primitive == PrimitiveKind::Union) {
572
572
  for (int i = 0; i < count; i++) {
573
+ int next = offset;
573
574
  for (const RecordMember &member: type->members) {
574
- AnalyseFlatRec(member.type, offset, 1, func);
575
+ next = std::max(next, AnalyseFlatRec(member.type, offset, 1, func));
575
576
  }
577
+ offset = next;
576
578
  }
577
- offset += count;
578
579
  } else if (type->primitive == PrimitiveKind::Array) {
579
580
  count *= type->size / type->ref.type->size;
580
581
  offset = AnalyseFlatRec(type->ref.type, offset, count, func);
@@ -203,7 +203,7 @@ static K_FORCE_INLINE bool TryPointer(napi_env env, napi_value value, void **out
203
203
  return false;
204
204
  }
205
205
 
206
- static K_FORCE_INLINE bool TryPointer(napi_env env, napi_value value, void **out_ptr, Size *out_len, napi_valuetype *out_kind)
206
+ static K_FORCE_INLINE bool TryPointer(napi_env env, napi_value value, void **out_ptr, Size *out_len)
207
207
  {
208
208
  // Fast path for BigInt
209
209
  {
@@ -214,7 +214,6 @@ static K_FORCE_INLINE bool TryPointer(napi_env env, napi_value value, void **out
214
214
  if (status == napi_ok) {
215
215
  *out_ptr = (void *)(uintptr_t)u64;
216
216
  *out_len = -1;
217
- *out_kind = napi_bigint;
218
217
 
219
218
  return true;
220
219
  }
@@ -222,8 +221,6 @@ static K_FORCE_INLINE bool TryPointer(napi_env env, napi_value value, void **out
222
221
 
223
222
  if (size_t len = 0; node_api_get_buffer_info(env, value, out_ptr, &len) == napi_ok) {
224
223
  *out_len = (Size)len;
225
- *out_kind = napi_object;
226
-
227
224
  return true;
228
225
  }
229
226
 
@@ -232,7 +229,6 @@ static K_FORCE_INLINE bool TryPointer(napi_env env, napi_value value, void **out
232
229
  if (IsNullOrUndefined(kind)) {
233
230
  *out_ptr = nullptr;
234
231
  *out_len = -1;
235
- *out_kind = kind;
236
232
 
237
233
  return true;
238
234
  } else if (kind == napi_number) {
@@ -242,19 +238,16 @@ static K_FORCE_INLINE bool TryPointer(napi_env env, napi_value value, void **out
242
238
 
243
239
  *out_ptr = (void *)(uintptr_t)i;
244
240
  *out_len = -1;
245
- *out_kind = napi_number;
246
241
 
247
242
  return true;
248
243
  }
249
244
 
250
245
  if (size_t len = 0; napi_get_arraybuffer_info(env, value, out_ptr, &len) == napi_ok) {
251
246
  *out_len = (Size)len;
252
- *out_kind = napi_object;
253
-
254
247
  return true;
255
248
  }
256
249
 
257
- *out_kind = kind;
250
+ *out_len = (Size)kind;
258
251
  return false;
259
252
  }
260
253
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songtonyli/dsh-cli",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "The dsh terminal agent: an interactive TUI over the DeepSeek Harness, with its whole Node runtime bundled in one install.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -448,7 +448,7 @@
448
448
  "json-schema-to-ts": "3.1.1",
449
449
  "jwa": "2.0.1",
450
450
  "jws": "4.0.1",
451
- "koffi": "3.3.0",
451
+ "koffi": "3.3.1",
452
452
  "long": "5.3.2",
453
453
  "marked": "18.0.5",
454
454
  "mdast-util-to-hast": "13.2.1",
@@ -557,26 +557,26 @@
557
557
  "@vscode/ripgrep-linux-riscv64": "1.18.0",
558
558
  "@vscode/ripgrep-linux-s390x": "1.18.0",
559
559
  "@vscode/ripgrep-linux-ia32": "1.18.0",
560
- "@koromix/koffi-linux-arm": "3.3.0",
561
- "@koromix/koffi-linux-arm64": "3.3.0",
562
- "@koromix/koffi-linux-ia32": "3.3.0",
563
- "@koromix/koffi-linux-x64": "3.3.0",
564
- "@koromix/koffi-linux-riscv64": "3.3.0",
565
- "@koromix/koffi-freebsd-ia32": "3.3.0",
566
- "@koromix/koffi-freebsd-x64": "3.3.0",
567
- "@koromix/koffi-freebsd-arm64": "3.3.0",
568
- "@koromix/koffi-openbsd-ia32": "3.3.0",
569
- "@koromix/koffi-openbsd-x64": "3.3.0",
570
- "@koromix/koffi-win32-ia32": "3.3.0",
571
- "@koromix/koffi-win32-x64": "3.3.0",
572
- "@koromix/koffi-win32-arm64": "3.3.0",
573
- "@koromix/koffi-darwin-x64": "3.3.0",
574
- "@koromix/koffi-darwin-arm64": "3.3.0",
575
- "@koromix/koffi-linux-loong64": "3.3.0",
576
- "@koromix/koffi-android-arm64": "3.3.0",
577
- "@koromix/koffi-android-x64": "3.3.0",
578
- "@koromix/koffi-linux-ppc64": "3.3.0",
579
- "@koromix/koffi-openbsd-arm64": "3.3.0",
560
+ "@koromix/koffi-linux-arm": "3.3.1",
561
+ "@koromix/koffi-linux-arm64": "3.3.1",
562
+ "@koromix/koffi-linux-ia32": "3.3.1",
563
+ "@koromix/koffi-linux-x64": "3.3.1",
564
+ "@koromix/koffi-linux-riscv64": "3.3.1",
565
+ "@koromix/koffi-freebsd-ia32": "3.3.1",
566
+ "@koromix/koffi-freebsd-x64": "3.3.1",
567
+ "@koromix/koffi-freebsd-arm64": "3.3.1",
568
+ "@koromix/koffi-openbsd-ia32": "3.3.1",
569
+ "@koromix/koffi-openbsd-x64": "3.3.1",
570
+ "@koromix/koffi-win32-ia32": "3.3.1",
571
+ "@koromix/koffi-win32-x64": "3.3.1",
572
+ "@koromix/koffi-win32-arm64": "3.3.1",
573
+ "@koromix/koffi-darwin-x64": "3.3.1",
574
+ "@koromix/koffi-darwin-arm64": "3.3.1",
575
+ "@koromix/koffi-linux-loong64": "3.3.1",
576
+ "@koromix/koffi-android-arm64": "3.3.1",
577
+ "@koromix/koffi-android-x64": "3.3.1",
578
+ "@koromix/koffi-linux-ppc64": "3.3.1",
579
+ "@koromix/koffi-openbsd-arm64": "3.3.1",
580
580
  "node-addon-require-builtin-darwin-arm64": "0.1.6",
581
581
  "node-addon-require-builtin-darwin-x64": "0.1.6",
582
582
  "node-addon-require-builtin-linux-arm64-gnu": "0.1.6",