@econ-v1/app-sdk 7.5.24 → 7.5.25

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.
@@ -27,7 +27,19 @@ export declare function assertHostEndpoint(): void;
27
27
  */
28
28
  export declare function connectToHost(handlers: HostConnectionHandlers): HostConnection;
29
29
  export declare function createInvocationContextStore<T>(): InvocationContextStore<T>;
30
- /** @internal Exact isolate sample used by the IPC timer and unit tests. */
30
+ /**
31
+ * @internal Isolate memory sample used by the IPC timer and unit tests.
32
+ *
33
+ * Reads counters only. On Bun >= 1.4.0 (the platform floor),
34
+ * `process.memoryUsage()` reports the heap size JSC measured at the end of the
35
+ * last collection, the bytes in allocated heap blocks and the extra/external
36
+ * memory, so one sample costs about a microsecond whatever the heap size.
37
+ * `bun:jsc.heapStats()` iterated every live cell (`objectTypeCounts`) instead:
38
+ * 210 ms for 9 M objects on an M-series Mac, 160-190 ms for the agent app's
39
+ * 34 MB heap on a Pi Zero 2 W, and on a swapping Pi it paged every idle app's
40
+ * whole heap back in on every tick (ADR-106). Heap capacity has no counter,
41
+ * so `heap_capacity_kb` is not reported; the host shows it as not sampled.
42
+ */
31
43
  export declare function _sampleMemory(): AppMemorySample;
32
44
  export declare function _captureHeapSnapshotTo(path: string, generate?: () => ArrayBuffer, write?: (path: string, bytes: ArrayBuffer) => Promise<number>): Promise<{
33
45
  size_bytes: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@econ-v1/app-sdk",
3
- "version": "7.5.24",
3
+ "version": "7.5.25",
4
4
  "description": "TypeScript SDK for building Node mini-app plugins (Bun runtime) on the Lightning-powered marketplace daemon",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Node contributors",