@tai2/aco 0.2.2 → 0.2.3
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 +12 -0
- package/dist/cli.js +11 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,18 @@ npm i -g @tai2/aco
|
|
|
31
31
|
npx @tai2/aco --help
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
## Use with Claude Code
|
|
35
|
+
|
|
36
|
+
Install the `aco` plugin so Claude Code can drive sessions for you:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
claude plugin marketplace add tai2/aco
|
|
40
|
+
claude plugin install aco@aco
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then ask your agent things like "tap the login button on the simulator" or
|
|
44
|
+
"screenshot the current screen" — it shells out to `aco`.
|
|
45
|
+
|
|
34
46
|
## Usage
|
|
35
47
|
|
|
36
48
|
### Discover devices
|
package/dist/cli.js
CHANGED
|
@@ -292,6 +292,14 @@ function resolveConnection(flags) {
|
|
|
292
292
|
|
|
293
293
|
// src/lib/wd-client.ts
|
|
294
294
|
import { attach, remote } from "webdriverio";
|
|
295
|
+
function stripForbiddenHeaders(requestOptions) {
|
|
296
|
+
const { headers } = requestOptions;
|
|
297
|
+
if (headers instanceof Headers) {
|
|
298
|
+
headers.delete("Connection");
|
|
299
|
+
headers.delete("Content-Length");
|
|
300
|
+
}
|
|
301
|
+
return requestOptions;
|
|
302
|
+
}
|
|
295
303
|
async function attachBrowser(conn) {
|
|
296
304
|
return attach({
|
|
297
305
|
sessionId: conn.sessionId,
|
|
@@ -303,7 +311,8 @@ async function attachBrowser(conn) {
|
|
|
303
311
|
isMobile: true,
|
|
304
312
|
isIOS: conn.platform === "ios",
|
|
305
313
|
isAndroid: conn.platform === "android",
|
|
306
|
-
logLevel: "silent"
|
|
314
|
+
logLevel: "silent",
|
|
315
|
+
transformRequest: stripForbiddenHeaders
|
|
307
316
|
});
|
|
308
317
|
}
|
|
309
318
|
var DEFAULT_SESSION_TIMEOUT_MS = 3e5;
|
|
@@ -316,6 +325,7 @@ async function createBrowser(opts) {
|
|
|
316
325
|
logLevel: "silent",
|
|
317
326
|
connectionRetryTimeout: opts.connectionTimeoutMs ?? DEFAULT_SESSION_TIMEOUT_MS,
|
|
318
327
|
connectionRetryCount: 0,
|
|
328
|
+
transformRequest: stripForbiddenHeaders,
|
|
319
329
|
// Only forwarded when set; undefined user/key means no auth header.
|
|
320
330
|
...opts.user !== void 0 ? { user: opts.user } : {},
|
|
321
331
|
...opts.key !== void 0 ? { key: opts.key } : {},
|