@cldmv/droidsock 1.0.0 → 1.1.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/README.md CHANGED
@@ -14,13 +14,24 @@ A complete, from-scratch implementation of the Android Debug Bridge (ADB) protoc
14
14
  > **Current status:**
15
15
  >
16
16
  > - **Shell + streaming**: Stable - command execution, interactive shells, and log/process streaming all work over the real ADB protocol.
17
- > - **File transfer**: `mkdir`/`remove`/`move`/`copy`/`chmod`/`diskUsage`/`find` work today via shell commands. `push`/`pull`/`list`/`stat` (the SYNC sub-protocol) are not implemented yet.
17
+ > - **File transfer**: `mkdir`/`remove`/`move`/`copy`/`chmod`/`diskUsage`/`find`/`stat` work today via shell commands. `list` prefers a binary-safe SYNC-based implementation with automatic shell fallback.
18
+ > - **Experimental**: `push`/`pull`/`listSync` (real ADB SYNC sub-protocol usage), `device.reboot()`, `device.forward()`, and `device.install()` are all implemented - built from the ADB protocol spec and covered by mocked unit tests - but **none of them have been run against a real device yet**. See [#2](https://github.com/CLDMV/droidsock/issues/2). Forwarding is host → device only; install is push-then-install only - see the [v1.1.0 changelog](./docs/changelog/v1/v1.1.0.md) for what's tracked separately.
18
19
 
19
20
  ---
20
21
 
21
22
  ## ✨ What's New
22
23
 
23
- ### Latest: v1.0.0 (September 2026)
24
+ ### Latest: v1.1.0 (September 2026)
25
+
26
+ - **`list`/`stat` fixed** - v1.0.0 shipped both throwing due to a dangling reference to a module that never existed in the repo.
27
+ - **Binary-safe `list()`** - prefers the ADB SYNC `LIST` command, falls back to shell `ls -la` parsing only when SYNC isn't usable.
28
+ - **`push`/`pull` implemented (experimental)** - real binary file transfer via the ADB SYNC sub-protocol.
29
+ - **`device.reboot()`** (experimental) - the real ADB `reboot:` service, including bootloader/recovery/sideload modes.
30
+ - **`device.forward()`** (experimental) - TCP port forwarding (host → device direction).
31
+ - **`device.install()`** (experimental) - local APK install via the classic push-then-install flow.
32
+ - [View full v1.1.0 Changelog](./docs/changelog/v1/v1.1.0.md)
33
+
34
+ ### Previous: v1.0.0 (September 2026)
24
35
 
25
36
  - **First stable release** - a real Vitest test suite with measured coverage, the full CLDMV v4 CI/release pipeline, a real `dist/` build, and an API surface that's been reviewed rather than just grown.
26
37
  - **Breaking**: the default export is now itself the callable quick path (`await droidsock()`); the old top-level `connect()`/`listDevices()` exports are gone.
@@ -36,7 +47,10 @@ A complete, from-scratch implementation of the Android Debug Bridge (ADB) protoc
36
47
  - ✅ **RSA Authentication**: Automatic key generation and ADB-specific signature/public-key formatting
37
48
  - ✅ **Stream Multiplexing**: Multiple concurrent operations over a single connection
38
49
  - ✅ **Shell Commands**: Execute commands, stream output, interactive sessions
39
- - ✅ **Shell-Based File Operations**: `mkdir`, `remove`, `move`, `copy`, `chmod`, `diskUsage`, `find`
50
+ - ✅ **File Operations**: Shell-based `mkdir`/`remove`/`move`/`copy`/`chmod`/`diskUsage`/`find`, plus binary-safe SYNC-based `list`, and experimental `push`/`pull`
51
+ - ✅ **Reboot** (experimental): Real `reboot:` service, including bootloader/recovery/sideload modes
52
+ - ✅ **Port Forwarding** (experimental): `adb forward`-equivalent TCP tunneling (host → device)
53
+ - ✅ **APK Install** (experimental): `adb install`-equivalent local APK installation
40
54
  - ✅ **Device Discovery**: Support for multiple devices via configuration
41
55
  - ✅ **Error Handling**: Robust error handling and connection recovery
42
56
 
@@ -98,45 +112,9 @@ Use the `references/devices.json` file to configure your devices:
98
112
 
99
113
  ## API Reference
100
114
 
101
- ### droidsock(options)
102
-
103
- The default export, and the quick path - creates a DroidSock API instance. `options.mode` (`"eager"` or `"lazy"`, default `"eager"`), `options.context`, and `options.config` are all optional. Also available under the explicit name `createDroidSock` (`import { createDroidSock } from "@cldmv/droidsock"`) for callers who prefer it - both names are the exact same function.
104
-
105
- #### device.connect(host, port, options)
106
-
107
- - `host`: Device IP address
108
- - `port`: ADB port (default: 5555)
109
- - `options.keyDir`: Directory for RSA keys (default: `~/.adb`)
110
-
111
- Returns a device object with the methods below.
112
-
113
- ##### Connection
114
-
115
- - `isConnected()`: Check connection status
116
- - `disconnect()`: Disconnect from device
117
-
118
- ##### Shell Commands
119
-
120
- - `shell(command, options)`: Execute shell command
121
- - `startStreamingShell(command, options)`: Start streaming command
122
- - `startInteractiveShell(command, options)`: Start interactive command
123
-
124
- ##### Convenience Methods
125
-
126
- - `ls(path)`: List directory
127
- - `pwd()`: Get current directory
128
- - `getprop(property)`: Get system property
129
- - `getModel()`: Get device model
130
- - `getAndroidVersion()`: Get Android version
131
- - `getBattery()`: Get battery status
132
- - `screenshot(filename)`: Take screenshot
133
- - `logcat(options)`: Stream logcat
134
- - `top(options)`: Stream top command
115
+ `droidsock(options)` (also `createDroidSock`) creates the API instance; `api.device.connect(host, port, options)` returns a device object exposing connection state, shell execution/streaming, file operations (`push`/`pull`/`list`/`stat`), reboot, port forwarding, and APK install.
135
116
 
136
- ##### File Operations
137
-
138
- - `push(localPath, remotePath, options)`: **Not yet implemented** - throws
139
- - `pull(remotePath, localPath, options)`: **Not yet implemented** - throws
117
+ 📚 **See [docs/API.md](./docs/API.md) for the full method reference**, including every option and the experimental/scope caveats on `push`/`pull`/`list`/`forward`/`install`.
140
118
 
141
119
  ## Examples
142
120
 
@@ -171,46 +149,14 @@ node examples/streaming-example.mjs files
171
149
  2. **Authentication Layer** (`src/api/auth.mjs`): RSA key management and ADB signature/public-key formatting
172
150
  3. **Stream Layer** (`src/api/stream.mjs`): ADB stream multiplexing (OPEN/WRTE/OKAY/CLSE)
173
151
  4. **Shell Layer** (`src/api/shell.mjs`): Command execution, streaming, and interactive shell APIs
174
- 5. **Files Layer** (`src/api/files.mjs`): Shell-based file operations (SYNC-protocol `push`/`pull`/`list`/`stat` not yet implemented)
175
- 6. **Device Layer** (`src/api/device.mjs`): High-level per-device API composing the layers above
176
- 7. **Config / Log Layers** (`src/api/config.mjs`, `src/api/log.mjs`): Shared configuration and logging
177
-
178
- ## Protocol Implementation Details
179
-
180
- ### Packet Structure
181
-
182
- All ADB packets follow a 24-byte header + optional data format:
183
-
184
- - Command (4 bytes, little-endian)
185
- - Arg0/Arg1 (4 bytes each, little-endian)
186
- - Data length (4 bytes, little-endian)
187
- - Checksum (4 bytes, sum of data bytes)
188
- - Magic (4 bytes, command XOR 0xFFFFFFFF)
189
-
190
- ### Authentication Flow
152
+ 5. **Files Layer** (`src/api/files.mjs`): Shell-based file operations, a binary-safe SYNC `LIST` implementation with automatic shell fallback, and an experimental ADB SYNC sub-protocol implementation for real binary transfer (`push`/`pull`) - not yet validated against a real device
153
+ 6. **Reboot Layer** (`src/api/reboot.mjs`): Real ADB `reboot:` service
154
+ 7. **Forward Layer** (`src/api/forward.mjs`): TCP port forwarding (host → device) via the `tcp:` service
155
+ 8. **Install Layer** (`src/api/install.mjs`): Local APK install, composed from the Files and Shell layers
156
+ 9. **Device Layer** (`src/api/device.mjs`): High-level per-device API composing the layers above
157
+ 10. **Config / Log Layers** (`src/api/config.mjs`, `src/api/log.mjs`): Shared configuration and logging
191
158
 
192
- 1. Client sends CNXN packet
193
- 2. Server responds with AUTH(TOKEN)
194
- 3. Client signs token with RSA private key
195
- 4. Client sends AUTH(SIGNATURE)
196
- 5. If rejected, client sends AUTH(RSAPUBLICKEY)
197
- 6. Server prompts user to authorize
198
- 7. Server sends CNXN on successful auth
199
-
200
- ### Stream Multiplexing
201
-
202
- - Each service (shell, sync, etc.) gets unique local/remote ID pair
203
- - WRTE packets carry data, OKAY packets acknowledge receipt
204
- - CLSE packets close streams
205
- - Multiple streams operate concurrently
206
-
207
- ### File Transfer (SYNC)
208
-
209
- - Uses "sync:" service with sub-protocol
210
- - SEND/RECV commands for push/pull
211
- - DATA packets for file chunks
212
- - DONE packets signal completion
213
- - Not yet implemented - see [Current status](#-key-features) above
159
+ 📚 **See [docs/PROTOCOL.md](./docs/PROTOCOL.md) for wire-level protocol details** (packet structure, auth flow, SYNC sub-protocol framing, reboot/forward service usage).
214
160
 
215
161
  ## Troubleshooting
216
162
 
@@ -235,12 +181,7 @@ All ADB packets follow a 24-byte header + optional data format:
235
181
 
236
182
  ## Development
237
183
 
238
- The implementation is based on:
239
-
240
- - Working ADB client implementation analysis
241
- - Kotlin reference implementation
242
- - Extensive testing with real Android devices
243
- - ADB protocol documentation
184
+ The implementation is built directly from the public ADB protocol documentation (AOSP `SYNC.TXT` and the wire-protocol references), cross-checked against Google's own reference client (`google/python-adb`) where the public docs are ambiguous, and covered by a mocked Vitest suite. The core connection/shell/stream-multiplexing path has real device usage behind it; the newer SYNC-protocol and service additions (`push`/`pull`/`listSync`/`reboot`/`forward`/`install`) have not yet been run against a real device - see the status note at the top of this README and [#2](https://github.com/CLDMV/droidsock/issues/2).
244
185
 
245
186
  ## License
246
187
 
@@ -14,4 +14,4 @@
14
14
  limitations under the License.
15
15
  */
16
16
 
17
- import{self}from"@cldmv/slothlet/runtime";const connections=new Map;async function connect(host,port=5555,options={}){const deviceId=`${host}:${port}`;if(connections.has(deviceId)){const existing=connections.get(deviceId);if(existing.isConnected()){return existing}else{connections.delete(deviceId)}}const keys=await self.auth.getKeys(options.keyDir);const connection=await self.connection.create({host,port,publicKey:keys.publicKey,privateKey:keys.privateKey,adbPublicKey:keys.adbPublicKey});const streamManager=await self.stream.create(connection.socket);connection.onUnhandledPacket=packet=>streamManager.handlePacket(packet);const device={host,port,deviceId,connection,streamManager,isConnected:()=>connection&&connection.connected,disconnect:()=>{if(connection){connection.disconnect();connections.delete(deviceId)}},shell:async(command,shellOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.shell.execute(connection.socket,streamManager,command,{...shellOptions,deviceFeatures:connection.deviceFeatures||[]})},startStreamingShell:(command,shellOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return self.shell.startStreaming(connection.socket,streamManager,command,shellOptions)},startInteractiveShell:(command,shellOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return self.shell.startInteractive(connection.socket,streamManager,command,shellOptions)},push:async(localPath,remotePath,transferOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.push(connection.socket,streamManager,localPath,remotePath,transferOptions)},pull:async(remotePath,localPath,transferOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.pull(connection.socket,streamManager,remotePath,localPath,transferOptions)},list:async remotePath=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.list(connection.socket,streamManager,remotePath)},stat:async remotePath=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.stat(connection.socket,streamManager,remotePath)},get ls(){return(path=".")=>device.shell(`ls -la "${path}"`)},get pwd(){return()=>device.shell("pwd")},get getprop(){return(prop=null)=>device.shell(prop?`getprop "${prop}"`:"getprop")},get getModel(){return()=>device.shell("getprop ro.product.model")},get getAndroidVersion(){return()=>device.shell("getprop ro.build.version.release")},get getBattery(){return()=>device.shell("dumpsys battery")},get screenshot(){return(filename="/sdcard/screenshot.png")=>device.shell(`screencap -p "${filename}"`)},get logcat(){return(logOptions={})=>device.startStreamingShell("logcat",logOptions)},get top(){return(topOptions={})=>device.startStreamingShell("top -m 10",topOptions)},get keypress(){return key=>device.shell(`input keyevent ${key}`)},get launchApp(){return(packageName,activity="")=>{const activityArg=activity?`/${activity}`:"";return device.shell(`am start -n ${packageName}${activityArg}`)}}};connections.set(deviceId,device);return device}function list(){return Array.from(connections.values()).filter(device=>device.isConnected())}function disconnect(host,port=5555){const deviceId=`${host}:${port}`;const device=connections.get(deviceId);if(device){device.disconnect();return true}return false}function disconnectAll(){let count=0;for(const device of connections.values()){device.disconnect();count++}connections.clear();return count}export{connect,disconnect,disconnectAll,list};
17
+ import{self}from"@cldmv/slothlet/runtime";const connections=new Map;async function connect(host,port=5555,options={}){const deviceId=`${host}:${port}`;if(connections.has(deviceId)){const existing=connections.get(deviceId);if(existing.isConnected()){return existing}else{connections.delete(deviceId)}}const keys=await self.auth.getKeys(options.keyDir);const connection=await self.connection.create({host,port,publicKey:keys.publicKey,privateKey:keys.privateKey,adbPublicKey:keys.adbPublicKey});const streamManager=await self.stream.create(connection.socket);connection.onUnhandledPacket=packet=>streamManager.handlePacket(packet);const device={host,port,deviceId,connection,streamManager,isConnected:()=>connection&&connection.connected,disconnect:()=>{if(connection){connection.disconnect();connections.delete(deviceId)}},shell:async(command,shellOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.shell.execute(connection.socket,streamManager,command,{...shellOptions,deviceFeatures:connection.deviceFeatures||[]})},startStreamingShell:(command,shellOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return self.shell.startStreaming(connection.socket,streamManager,command,shellOptions)},startInteractiveShell:(command,shellOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return self.shell.startInteractive(connection.socket,streamManager,command,shellOptions)},push:async(localPath,remotePath,transferOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.push(connection.socket,streamManager,localPath,remotePath,transferOptions)},pull:async(remotePath,localPath,transferOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.pull(connection.socket,streamManager,remotePath,localPath,transferOptions)},list:async remotePath=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.list(connection.socket,streamManager,remotePath)},stat:async remotePath=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.files.stat(connection.socket,streamManager,remotePath)},reboot:async(mode="")=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.reboot.execute(connection.socket,streamManager,mode)},forward:async(devicePort,forwardOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.forward.start(connection.socket,streamManager,devicePort,forwardOptions)},install:async(localPath,installOptions={})=>{if(!device.isConnected()){throw new Error("Device not connected")}if(!connection.authorized){throw new Error("Device not authorized. Please accept authorization dialog.")}return await self.install.classic(connection.socket,streamManager,localPath,installOptions)},get ls(){return(path=".")=>device.shell(`ls -la "${path}"`)},get pwd(){return()=>device.shell("pwd")},get getprop(){return(prop=null)=>device.shell(prop?`getprop "${prop}"`:"getprop")},get getModel(){return()=>device.shell("getprop ro.product.model")},get getAndroidVersion(){return()=>device.shell("getprop ro.build.version.release")},get getBattery(){return()=>device.shell("dumpsys battery")},get screenshot(){return(filename="/sdcard/screenshot.png")=>device.shell(`screencap -p "${filename}"`)},get logcat(){return(logOptions={})=>device.startStreamingShell("logcat",logOptions)},get top(){return(topOptions={})=>device.startStreamingShell("top -m 10",topOptions)},get keypress(){return key=>device.shell(`input keyevent ${key}`)},get launchApp(){return(packageName,activity="")=>{const activityArg=activity?`/${activity}`:"";return device.shell(`am start -n ${packageName}${activityArg}`)}},get rebootBootloader(){return()=>device.reboot("bootloader")},get rebootRecovery(){return()=>device.reboot("recovery")},get rebootSideload(){return()=>device.reboot("sideload")}};connections.set(deviceId,device);return device}function list(){return Array.from(connections.values()).filter(device=>device.isConnected())}function disconnect(host,port=5555){const deviceId=`${host}:${port}`;const device=connections.get(deviceId);if(device){device.disconnect();return true}return false}function disconnectAll(){let count=0;for(const device of connections.values()){device.disconnect();count++}connections.clear();return count}export{connect,disconnect,disconnectAll,list};
@@ -14,4 +14,4 @@
14
14
  limitations under the License.
15
15
  */
16
16
 
17
- import{self}from"@cldmv/slothlet/runtime";async function push(___socket,___streamManager,___localPath,___remotePath,___options={}){throw new Error("File push not yet implemented in slothlet structure")}async function pull(___socket,___streamManager,___remotePath,___localPath,___options={}){throw new Error("File pull not yet implemented in slothlet structure")}async function list(___socket,___streamManager,___remotePath){throw new Error("Directory listing not yet implemented in slothlet structure")}async function stat(___socket,___streamManager,___remotePath){throw new Error("File stat not yet implemented in slothlet structure")}async function mkdir(socket,streamManager,remotePath,mode=493){const command=`mkdir -p "${remotePath}" && chmod ${mode.toString(8)} "${remotePath}"`;return await self.shell.execute(socket,streamManager,command)}async function remove(socket,streamManager,remotePath,recursive=false){const flag=recursive?"-rf":"-f";const command=`rm ${flag} "${remotePath}"`;return await self.shell.execute(socket,streamManager,command)}async function move(socket,streamManager,sourcePath,destPath){const command=`mv "${sourcePath}" "${destPath}"`;return await self.shell.execute(socket,streamManager,command)}async function copy(socket,streamManager,sourcePath,destPath,recursive=false){const flag=recursive?"-r":"";const command=`cp ${flag} "${sourcePath}" "${destPath}"`;return await self.shell.execute(socket,streamManager,command)}async function chmod(socket,streamManager,remotePath,mode,recursive=false){const flag=recursive?"-R":"";const command=`chmod ${flag} ${mode.toString(8)} "${remotePath}"`;return await self.shell.execute(socket,streamManager,command)}async function diskUsage(socket,streamManager,path="/"){const command=`df -h "${path}"`;return await self.shell.execute(socket,streamManager,command)}async function find(socket,streamManager,path,pattern,options={}){let command=`find "${path}"`;if(options.maxDepth){command+=` -maxdepth ${options.maxDepth}`}if(options.type){command+=` -type ${options.type}`}command+=` -name "${pattern}"`;return await self.shell.execute(socket,streamManager,command)}export{chmod,copy,diskUsage,find,list,mkdir,move,pull,push,remove,stat};
17
+ import{self}from"@cldmv/slothlet/runtime";import{parseListing}from"./utils.mjs";import{readFile,writeFile}from"node:fs/promises";const SYNC_ID_SEND="SEND";const SYNC_ID_RECV="RECV";const SYNC_ID_LIST="LIST";const SYNC_ID_DENT="DENT";const SYNC_ID_DATA="DATA";const SYNC_ID_DONE="DONE";const SYNC_ID_OKAY="OKAY";const SYNC_ID_FAIL="FAIL";const SYNC_ID_QUIT="QUIT";const SYNC_DATA_MAX=64*1024;const SYNC_DENT_HEADER_SIZE=20;const S_IFMT=61440;const S_IFDIR=16384;const S_IFREG=32768;const S_IFLNK=40960;function buildSyncFrame(id,valueOrPayload){const payload=Buffer.isBuffer(valueOrPayload)?valueOrPayload:Buffer.alloc(0);const value=Buffer.isBuffer(valueOrPayload)?valueOrPayload.length:valueOrPayload;const header=Buffer.alloc(8);header.write(id,0,4,"ascii");header.writeUInt32LE(value>>>0,4);return Buffer.concat([header,payload])}function createSyncFrameReader(stream){let buffer=Buffer.alloc(0);const pending=[];let waiter=null;function drain(){while(buffer.length>=8){const id=buffer.toString("ascii",0,4);const value=buffer.readUInt32LE(4);if(buffer.length<8+value)return;const payload=Buffer.from(buffer.subarray(8,8+value));buffer=buffer.subarray(8+value);pending.push({id,value,payload})}if(pending.length>0&&waiter){const resolve=waiter;waiter=null;resolve()}}stream.on("data",chunk=>{buffer=Buffer.concat([buffer,Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk)]);drain()});return{async next(){while(pending.length===0){await new Promise(resolve=>{waiter=resolve})}return pending.shift()}}}function createListFrameReader(stream){let buffer=Buffer.alloc(0);const pending=[];let waiter=null;let endError=null;function drain(){for(;;){if(buffer.length<4)break;const id=buffer.toString("ascii",0,4);if(id===SYNC_ID_DENT){if(buffer.length<SYNC_DENT_HEADER_SIZE)break;const mode=buffer.readUInt32LE(4);const size=buffer.readUInt32LE(8);const mtime=buffer.readUInt32LE(12);const namelen=buffer.readUInt32LE(16);if(buffer.length<SYNC_DENT_HEADER_SIZE+namelen)break;const name=buffer.toString("utf8",SYNC_DENT_HEADER_SIZE,SYNC_DENT_HEADER_SIZE+namelen);buffer=buffer.subarray(SYNC_DENT_HEADER_SIZE+namelen);pending.push({id,mode,size,mtime,name});continue}if(buffer.length<8)break;const value=buffer.readUInt32LE(4);if(buffer.length<8+value)break;const payload=Buffer.from(buffer.subarray(8,8+value));buffer=buffer.subarray(8+value);pending.push({id,value,payload})}if(pending.length>0&&waiter){const resolve=waiter.resolve;waiter=null;resolve()}}function endWith(error){if(endError)return;endError=error||new Error("Sync stream ended before a DONE/FAIL frame arrived");if(waiter){const reject=waiter.reject;waiter=null;reject(endError)}}stream.on("data",chunk=>{buffer=Buffer.concat([buffer,Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk)]);drain()});stream.on("close",()=>endWith());stream.on("error",error=>endWith(error));return{async next(){while(pending.length===0){if(endError)throw endError;await new Promise((resolve,reject)=>{waiter={resolve,reject}})}return pending.shift()}}}async function quitSyncStream(stream){try{await stream.write(buildSyncFrame(SYNC_ID_QUIT,Buffer.alloc(0)))}catch{}stream.close()}async function push(___socket,streamManager,localPath,remotePath,options={}){const{onProgress,mode=420}=options;const data=await readFile(localPath);const stream=await streamManager.openStream("sync:");const reader=createSyncFrameReader(stream);try{const pathAndMode=Buffer.from(`${remotePath},${mode.toString(10)}`,"utf8");await stream.write(buildSyncFrame(SYNC_ID_SEND,pathAndMode));let offset=0;while(offset<data.length){const chunk=data.subarray(offset,Math.min(offset+SYNC_DATA_MAX,data.length));await stream.write(buildSyncFrame(SYNC_ID_DATA,chunk));offset+=chunk.length;if(onProgress)onProgress({bytesTransferred:offset,totalBytes:data.length})}await stream.write(buildSyncFrame(SYNC_ID_DONE,Math.floor(Date.now()/1e3)));const frame=await reader.next();if(frame.id===SYNC_ID_FAIL){throw new Error(`SYNC push failed: ${frame.payload.toString("utf8")}`)}if(frame.id!==SYNC_ID_OKAY){throw new Error(`Unexpected SYNC frame during push: ${frame.id}`)}}finally{await quitSyncStream(stream)}}async function pull(___socket,streamManager,remotePath,localPath,options={}){const{onProgress}=options;const stream=await streamManager.openStream("sync:");const reader=createSyncFrameReader(stream);try{await stream.write(buildSyncFrame(SYNC_ID_RECV,Buffer.from(remotePath,"utf8")));const chunks=[];let totalBytes=0;for(;;){const frame=await reader.next();if(frame.id===SYNC_ID_DATA){chunks.push(frame.payload);totalBytes+=frame.payload.length;if(onProgress)onProgress({bytesTransferred:totalBytes})}else if(frame.id===SYNC_ID_DONE){break}else if(frame.id===SYNC_ID_FAIL){throw new Error(`SYNC pull failed: ${frame.payload.toString("utf8")}`)}else{throw new Error(`Unexpected SYNC frame during pull: ${frame.id}`)}}await writeFile(localPath,Buffer.concat(chunks))}finally{await quitSyncStream(stream)}}async function listOverStream(stream,remotePath){const reader=createListFrameReader(stream);try{await stream.write(buildSyncFrame(SYNC_ID_LIST,Buffer.from(remotePath,"utf8")));const entries=[];for(;;){const frame=await reader.next();if(frame.id===SYNC_ID_DENT){entries.push({name:frame.name,size:frame.size,mtime:frame.mtime,mode:frame.mode,isDirectory:(frame.mode&S_IFMT)===S_IFDIR,isFile:(frame.mode&S_IFMT)===S_IFREG,isSymlink:(frame.mode&S_IFMT)===S_IFLNK})}else if(frame.id===SYNC_ID_DONE){break}else if(frame.id===SYNC_ID_FAIL){throw new Error(`SYNC list failed: ${frame.payload.toString("utf8")}`)}else{throw new Error(`Unexpected SYNC frame during list: ${frame.id}`)}}return entries}finally{await quitSyncStream(stream)}}async function listSync(___socket,streamManager,remotePath){const stream=await streamManager.openStream("sync:");return await listOverStream(stream,remotePath)}async function listShell(socket,streamManager,remotePath){const output=await self.shell.execute(socket,streamManager,`ls -la "${remotePath}"`);return parseListing(output)}async function list(socket,streamManager,remotePath){let stream;try{stream=await streamManager.openStream("sync:")}catch{return await listShell(socket,streamManager,remotePath)}return await listOverStream(stream,remotePath)}async function stat(socket,streamManager,remotePath){return await self.shell.execute(socket,streamManager,`stat "${remotePath}"`)}async function mkdir(socket,streamManager,remotePath,mode=493){const command=`mkdir -p "${remotePath}" && chmod ${mode.toString(8)} "${remotePath}"`;return await self.shell.execute(socket,streamManager,command)}async function remove(socket,streamManager,remotePath,recursive=false){const flag=recursive?"-rf":"-f";const command=`rm ${flag} "${remotePath}"`;return await self.shell.execute(socket,streamManager,command)}async function move(socket,streamManager,sourcePath,destPath){const command=`mv "${sourcePath}" "${destPath}"`;return await self.shell.execute(socket,streamManager,command)}async function copy(socket,streamManager,sourcePath,destPath,recursive=false){const flag=recursive?"-r":"";const command=`cp ${flag} "${sourcePath}" "${destPath}"`;return await self.shell.execute(socket,streamManager,command)}async function chmod(socket,streamManager,remotePath,mode,recursive=false){const flag=recursive?"-R":"";const command=`chmod ${flag} ${mode.toString(8)} "${remotePath}"`;return await self.shell.execute(socket,streamManager,command)}async function diskUsage(socket,streamManager,path="/"){const command=`df -h "${path}"`;return await self.shell.execute(socket,streamManager,command)}async function find(socket,streamManager,path,pattern,options={}){let command=`find "${path}"`;if(options.maxDepth){command+=` -maxdepth ${options.maxDepth}`}if(options.type){command+=` -type ${options.type}`}command+=` -name "${pattern}"`;return await self.shell.execute(socket,streamManager,command)}export{chmod,copy,diskUsage,find,list,listShell,listSync,mkdir,move,pull,push,remove,stat};
@@ -0,0 +1,17 @@
1
+ /*
2
+ Copyright 2026 CLDMV/Shinrai
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ import net from"node:net";async function start(___socket,streamManager,devicePort,options={}){const{localPort=0,host="127.0.0.1",onError}=options;const server=net.createServer(localSocket=>{let stream;let localSocketFailed=false;localSocket.on("error",error=>{localSocketFailed=true;if(stream)stream.close();if(onError)onError(error,localSocket)});(async()=>{try{stream=await streamManager.openStream(`tcp:${devicePort}`)}catch(error){localSocket.destroy();if(onError)onError(error,localSocket);return}if(localSocketFailed||localSocket.destroyed){stream.close();return}stream.on("data",data=>localSocket.write(data));stream.on("close",()=>localSocket.end());stream.on("error",error=>{stream.close();localSocket.destroy();if(onError)onError(error,localSocket)});localSocket.on("data",data=>{stream.write(data).catch(error=>{stream.close();localSocket.destroy();if(onError)onError(error,localSocket)})});localSocket.on("close",()=>stream.close())})()});await new Promise((resolve,reject)=>{server.once("error",reject);server.listen(localPort,host,()=>{server.removeListener("error",reject);resolve()})});return{localPort:server.address().port,close(){return new Promise(resolve=>server.close(()=>resolve()))}}}export{start};
@@ -0,0 +1,17 @@
1
+ /*
2
+ Copyright 2026 CLDMV/Shinrai
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ import{self}from"@cldmv/slothlet/runtime";import path from"node:path";async function classic(socket,streamManager,localPath,options={}){const{flags=[],remoteDir="/data/local/tmp",onProgress}=options;const remotePath=path.posix.join(remoteDir,path.basename(localPath));try{await self.files.push(socket,streamManager,localPath,remotePath,{onProgress});return await self.shell.commands.installApk(socket,streamManager,remotePath,flags)}finally{await self.files.remove(socket,streamManager,remotePath).catch(()=>{})}}export{classic};
@@ -0,0 +1,17 @@
1
+ /*
2
+ Copyright 2026 CLDMV/Shinrai
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ async function execute(___socket,streamManager,mode=""){const stream=await streamManager.openStream(`reboot:${mode}`);try{streamManager.closeStream(stream.localId)}catch{}}export{execute};
@@ -14,4 +14,4 @@
14
14
  limitations under the License.
15
15
  */
16
16
 
17
- import{self}from"@cldmv/slothlet/runtime";import{EventEmitter}from"node:events";const MSG_OPEN=1313165391;const MSG_WRTE=1163154007;const MSG_CLSE=1163086915;const MSG_OKAY=1497451343;function getCommandName(command){switch(command){case MSG_OPEN:return"OPEN";case MSG_WRTE:return"WRTE";case MSG_CLSE:return"CLSE";case MSG_OKAY:return"OKAY";default:return`0x${command.toString(16).toUpperCase()}`}}function create(socket){const streams=new Map;let nextStreamId=1;const manager={socket,streams,nextStreamId,async openStream(destination){const localId=nextStreamId++;const stream=new AdbStream(localId,0,socket,manager);streams.set(localId,stream);const destBuffer=Buffer.from(destination);await sendMessage(socket,MSG_OPEN,localId,0,destBuffer);return new Promise((resolve,reject)=>{stream.once("ready",()=>resolve(stream));stream.once("error",reject);setTimeout(()=>{if(!stream.ready){streams.delete(localId);reject(new Error("Stream open timeout"))}},5e3)})},handlePacket(data){let offset=0;while(offset<data.length){if(data.length-offset<24)break;const command=data.readUInt32LE(offset);const arg0=data.readUInt32LE(offset+4);const arg1=data.readUInt32LE(offset+8);const dataLength=data.readUInt32LE(offset+12);if(data.length-offset<24+dataLength)break;const packetData=data.slice(offset+24,offset+24+dataLength);offset+=24+dataLength;const commandName=getCommandName(command);if(self.config.get("debug")){self.log.debug(`${self.config.get("debugArrowReceived")} ${commandName} arg0:${arg0} arg1:${arg1} len:${dataLength}`)}const stream=streams.get(arg1);if(stream){stream.handleMessage(command,arg0,arg1,packetData)}}},closeStream(streamId){const stream=streams.get(streamId);if(stream){stream.close();streams.delete(streamId)}}};return manager}class AdbStream extends EventEmitter{constructor(localId,remoteId,socket,manager){super();this.localId=localId;this.remoteId=remoteId;this.socket=socket;this.manager=manager;this.ready=false;this.closed=false}handleMessage(command,arg0,arg1,data){switch(command){case MSG_OKAY:if(!this.ready){this.remoteId=arg0;this.ready=true;this.emit("ready")}else{this.emit("ack")}break;case MSG_WRTE:this.emit("data",data);sendMessage(this.socket,MSG_OKAY,this.localId,this.remoteId);break;case MSG_CLSE:this.closed=true;this.emit("close");break}}async write(data){if(this.closed||!this.ready){throw new Error("Stream not ready or closed")}const buffer=Buffer.isBuffer(data)?data:Buffer.from(data);await sendMessage(this.socket,MSG_WRTE,this.remoteId,this.localId,buffer)}close(){if(!this.closed){this.closed=true;sendMessage(this.socket,MSG_CLSE,this.remoteId,this.localId);this.emit("close")}}}async function sendMessage(socket,command,arg0,arg1,data=Buffer.alloc(0)){const header=Buffer.alloc(24);let offset=0;header.writeUInt32LE(command,offset);offset+=4;header.writeUInt32LE(arg0,offset);offset+=4;header.writeUInt32LE(arg1,offset);offset+=4;header.writeUInt32LE(data.length,offset);offset+=4;header.writeUInt32LE(checksum(data),offset);offset+=4;header.writeUInt32LE((command^4294967295)>>>0,offset);const commandName=getCommandName(command);if(self.config.get("debug")){self.log.debug(`${self.config.get("debugArrowSent")} ${commandName} arg0:${arg0} arg1:${arg1} len:${data.length}`)}socket.write(header);if(data.length>0){socket.write(data)}}function checksum(data){let sum=0;for(let i=0;i<data.length;i++){sum+=data[i]}return sum&4294967295}export{create};
17
+ import{self}from"@cldmv/slothlet/runtime";import{EventEmitter}from"node:events";const MSG_OPEN=1313165391;const MSG_WRTE=1163154007;const MSG_CLSE=1163086915;const MSG_OKAY=1497451343;function getCommandName(command){switch(command){case MSG_OPEN:return"OPEN";case MSG_WRTE:return"WRTE";case MSG_CLSE:return"CLSE";case MSG_OKAY:return"OKAY";default:return`0x${command.toString(16).toUpperCase()}`}}function create(socket){const streams=new Map;let nextStreamId=1;const manager={socket,streams,nextStreamId,async openStream(destination){const localId=nextStreamId++;const stream=new AdbStream(localId,0,socket,manager);streams.set(localId,stream);const destBuffer=Buffer.from(destination);await sendMessage(socket,MSG_OPEN,localId,0,destBuffer);return new Promise((resolve,reject)=>{stream.once("ready",()=>resolve(stream));stream.once("error",reject);setTimeout(()=>{if(!stream.ready){streams.delete(localId);reject(new Error("Stream open timeout"))}},5e3)})},handlePacket(data){let offset=0;while(offset<data.length){if(data.length-offset<24)break;const command=data.readUInt32LE(offset);const arg0=data.readUInt32LE(offset+4);const arg1=data.readUInt32LE(offset+8);const dataLength=data.readUInt32LE(offset+12);if(data.length-offset<24+dataLength)break;const packetData=data.slice(offset+24,offset+24+dataLength);offset+=24+dataLength;const commandName=getCommandName(command);if(self.config.get("debug")){self.log.debug(`${self.config.get("debugArrowReceived")} ${commandName} arg0:${arg0} arg1:${arg1} len:${dataLength}`)}const stream=streams.get(arg1);if(stream){stream.handleMessage(command,arg0,arg1,packetData)}}},closeStream(streamId){const stream=streams.get(streamId);if(stream){try{stream.close()}finally{streams.delete(streamId)}}}};return manager}class AdbStream extends EventEmitter{constructor(localId,remoteId,socket,manager){super();this.localId=localId;this.remoteId=remoteId;this.socket=socket;this.manager=manager;this.ready=false;this.closed=false}handleMessage(command,arg0,arg1,data){switch(command){case MSG_OKAY:if(!this.ready){this.remoteId=arg0;this.ready=true;this.emit("ready")}else{this.emit("ack")}break;case MSG_WRTE:this.emit("data",data);sendMessage(this.socket,MSG_OKAY,this.localId,this.remoteId);break;case MSG_CLSE:this.closed=true;this.emit("close");break}}async write(data){if(this.closed||!this.ready){throw new Error("Stream not ready or closed")}const buffer=Buffer.isBuffer(data)?data:Buffer.from(data);await sendMessage(this.socket,MSG_WRTE,this.remoteId,this.localId,buffer)}close(){if(!this.closed){this.closed=true;sendMessage(this.socket,MSG_CLSE,this.remoteId,this.localId);this.emit("close")}}}async function sendMessage(socket,command,arg0,arg1,data=Buffer.alloc(0)){const header=Buffer.alloc(24);let offset=0;header.writeUInt32LE(command,offset);offset+=4;header.writeUInt32LE(arg0,offset);offset+=4;header.writeUInt32LE(arg1,offset);offset+=4;header.writeUInt32LE(data.length,offset);offset+=4;header.writeUInt32LE(checksum(data),offset);offset+=4;header.writeUInt32LE((command^4294967295)>>>0,offset);const commandName=getCommandName(command);if(self.config.get("debug")){self.log.debug(`${self.config.get("debugArrowSent")} ${commandName} arg0:${arg0} arg1:${arg1} len:${data.length}`)}socket.write(header);if(data.length>0){socket.write(data)}}function checksum(data){let sum=0;for(let i=0;i<data.length;i++){sum+=data[i]}return sum&4294967295}export{create};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cldmv/droidsock",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Complete Node.js implementation of the Android Debug Bridge (ADB) protocol",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.mjs",
@@ -43,6 +43,7 @@
43
43
  "format:check": "prettier --config .configs/.prettierrc --check .",
44
44
  "fix:headers": "node tools/fix-headers.mjs",
45
45
  "prepare": "node -e \"import('./.githooks/install.mjs').catch(()=>{})\"",
46
+ "precommit:local": "npm run test:types",
46
47
  "precommit": "npm run build && npm run build:types && npm run test:types && npm run lint && npm run format:check && npm run test"
47
48
  },
48
49
  "keywords": [
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.mts","sourceRoot":"","sources":["../../../dist/api/device.mjs"],"names":[],"mappings":"AAgBoE,8EAA4wH;AAA6F,8DAAoK;AAAA,wCAA4I;AAA7Y,8BAA6F"}
1
+ {"version":3,"file":"device.d.mts","sourceRoot":"","sources":["../../../dist/api/device.mjs"],"names":[],"mappings":"AAgBoE,8EAAmzJ;AAA6F,8DAAoK;AAAA,wCAA4I;AAA7Y,8BAA6F"}
@@ -2,11 +2,51 @@ export function chmod(socket: any, streamManager: any, remotePath: any, mode: an
2
2
  export function copy(socket: any, streamManager: any, sourcePath: any, destPath: any, recursive?: boolean): Promise<any>;
3
3
  export function diskUsage(socket: any, streamManager: any, path?: string): Promise<any>;
4
4
  export function find(socket: any, streamManager: any, path: any, pattern: any, options?: {}): Promise<any>;
5
- export function list(___socket: any, ___streamManager: any, ___remotePath: any): Promise<void>;
5
+ export function list(socket: any, streamManager: any, remotePath: any): Promise<{
6
+ name: any;
7
+ permissions: any;
8
+ links: number;
9
+ owner: any;
10
+ group: any;
11
+ size: number;
12
+ dateTime: any;
13
+ isDirectory: any;
14
+ isFile: any;
15
+ isSymlink: any;
16
+ }[] | {
17
+ name: any;
18
+ size: any;
19
+ mtime: any;
20
+ mode: any;
21
+ isDirectory: boolean;
22
+ isFile: boolean;
23
+ isSymlink: boolean;
24
+ }[]>;
25
+ export function listShell(socket: any, streamManager: any, remotePath: any): Promise<{
26
+ name: any;
27
+ permissions: any;
28
+ links: number;
29
+ owner: any;
30
+ group: any;
31
+ size: number;
32
+ dateTime: any;
33
+ isDirectory: any;
34
+ isFile: any;
35
+ isSymlink: any;
36
+ }[]>;
37
+ export function listSync(___socket: any, streamManager: any, remotePath: any): Promise<{
38
+ name: any;
39
+ size: any;
40
+ mtime: any;
41
+ mode: any;
42
+ isDirectory: boolean;
43
+ isFile: boolean;
44
+ isSymlink: boolean;
45
+ }[]>;
6
46
  export function mkdir(socket: any, streamManager: any, remotePath: any, mode?: number): Promise<any>;
7
47
  export function move(socket: any, streamManager: any, sourcePath: any, destPath: any): Promise<any>;
8
- export function pull(___socket: any, ___streamManager: any, ___remotePath: any, ___localPath: any, ___options?: {}): Promise<void>;
9
- export function push(___socket: any, ___streamManager: any, ___localPath: any, ___remotePath: any, ___options?: {}): Promise<void>;
48
+ export function pull(___socket: any, streamManager: any, remotePath: any, localPath: any, options?: {}): Promise<void>;
49
+ export function push(___socket: any, streamManager: any, localPath: any, remotePath: any, options?: {}): Promise<void>;
10
50
  export function remove(socket: any, streamManager: any, remotePath: any, recursive?: boolean): Promise<any>;
11
- export function stat(___socket: any, ___streamManager: any, ___remotePath: any): Promise<void>;
51
+ export function stat(socket: any, streamManager: any, remotePath: any): Promise<any>;
12
52
  //# sourceMappingURL=files.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../../dist/api/files.mjs"],"names":[],"mappings":"AAgB86C,sHAAwO;AAA1c,yHAAkO;AAAwO,wFAAsJ;AAAA,2GAA8S;AAAhvD,+FAA6I;AAAqI,qGAAmN;AAAgN,oGAA6K;AAAlgC,mIAAgK;AAAhU,mIAAgK;AAAqoB,4GAAgN;AAAxiB,+FAAqI"}
1
+ {"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../../dist/api/files.mjs"],"names":[],"mappings":"AAgBw+N,sHAAwO;AAA1c,yHAAkO;AAAwO,wFAAsJ;AAAA,2GAA8S;AAAh0D;;;;;;;;;;;;;;;;;;;KAAgO;AAA3Y;;;;;;;;;;;KAA2K;AAA3U;;;;;;;;KAAgK;AAA6gB,qGAAmN;AAAgN,oGAA6K;AAAzvF,uHAAkyB;AAAlwD,uHAAg+B;AAA43E,4GAAgN;AAAriB,qFAAkI"}
@@ -0,0 +1,5 @@
1
+ export function start(___socket: any, streamManager: any, devicePort: any, options?: {}): Promise<{
2
+ localPort: any;
3
+ close(): Promise<any>;
4
+ }>;
5
+ //# sourceMappingURL=forward.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forward.d.mts","sourceRoot":"","sources":["../../../dist/api/forward.mjs"],"names":[],"mappings":"AAgB0B;;;GAA8pC"}
@@ -0,0 +1,2 @@
1
+ export function classic(socket: any, streamManager: any, localPath: any, options?: {}): Promise<any>;
2
+ //# sourceMappingURL=install.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.d.mts","sourceRoot":"","sources":["../../../dist/api/install.mjs"],"names":[],"mappings":"AAgBsE,qGAA2b"}
@@ -0,0 +1,2 @@
1
+ export function execute(___socket: any, streamManager: any, mode?: string): Promise<void>;
2
+ //# sourceMappingURL=reboot.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reboot.d.mts","sourceRoot":"","sources":["../../../dist/api/reboot.mjs"],"names":[],"mappings":"AAgBA,0FAA4K"}
@@ -1 +1 @@
1
- {"version":3,"file":"stream.d.mts","sourceRoot":"","sources":["../../../dist/api/stream.mjs"],"names":[],"mappings":"AAgB8Y;;;;;;;EAAs0C"}
1
+ {"version":3,"file":"stream.d.mts","sourceRoot":"","sources":["../../../dist/api/stream.mjs"],"names":[],"mappings":"AAgB8Y;;;;;;;EAAm1C"}