@browsercash/chase 1.1.0 → 1.2.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/dist/cli.js +4 -0
- package/dist/server.js +6 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -159,6 +159,9 @@ async function commandAutomate(task, flags) {
|
|
|
159
159
|
if (flags.captcha) {
|
|
160
160
|
body.browserOptions = { ...(body.browserOptions || {}), captchaSolver: true };
|
|
161
161
|
}
|
|
162
|
+
if (flags['max-turns']) {
|
|
163
|
+
body.maxTurns = parseInt(flags['max-turns'], 10);
|
|
164
|
+
}
|
|
162
165
|
let taskId = null;
|
|
163
166
|
let result = null;
|
|
164
167
|
await streamRequest('/automate/stream', body, (type, data) => {
|
|
@@ -438,6 +441,7 @@ OPTIONS:
|
|
|
438
441
|
--country <code> Use a browser from specific country (e.g., US, DE, JP)
|
|
439
442
|
--adblock Enable ad-blocking
|
|
440
443
|
--captcha Enable CAPTCHA solving
|
|
444
|
+
--max-turns <n> Max Claude iterations (default: 30, use 50+ for complex tasks)
|
|
441
445
|
--quiet Reduce output verbosity
|
|
442
446
|
--skip-test Skip script testing (generate only)
|
|
443
447
|
--help Show this help message
|
package/dist/server.js
CHANGED
|
@@ -796,11 +796,12 @@ server.post('/automate/stream', {
|
|
|
796
796
|
captchaSolver: { type: 'boolean' },
|
|
797
797
|
},
|
|
798
798
|
},
|
|
799
|
+
maxTurns: { type: 'integer', minimum: 1, maximum: 100 },
|
|
799
800
|
},
|
|
800
801
|
},
|
|
801
802
|
},
|
|
802
803
|
}, async (request, reply) => {
|
|
803
|
-
const { task, browserCashApiKey, cdpUrl, browserOptions } = request.body;
|
|
804
|
+
const { task, browserCashApiKey, cdpUrl, browserOptions, maxTurns } = request.body;
|
|
804
805
|
// Validate that either browserCashApiKey or cdpUrl is provided
|
|
805
806
|
if (!browserCashApiKey && !cdpUrl) {
|
|
806
807
|
reply.raw.writeHead(400, { 'Content-Type': 'application/json' });
|
|
@@ -886,6 +887,10 @@ server.post('/automate/stream', {
|
|
|
886
887
|
cdpUrl: effectiveCdpUrl,
|
|
887
888
|
taskDescription: task,
|
|
888
889
|
});
|
|
890
|
+
// Override maxTurns if provided in request
|
|
891
|
+
if (maxTurns) {
|
|
892
|
+
config.maxTurns = maxTurns;
|
|
893
|
+
}
|
|
889
894
|
sendEvent('start', {
|
|
890
895
|
taskId,
|
|
891
896
|
task,
|