@parall/cli 1.76.0 → 1.77.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/commands/approvals.d.ts.map +1 -1
- package/dist/commands/approvals.js +2 -0
- package/dist/commands/apps-publish.d.ts.map +1 -1
- package/dist/commands/apps-publish.js +9 -1
- package/dist/commands/browser.d.ts.map +1 -1
- package/dist/commands/browser.js +1 -0
- package/dist/lib/browser-operation.d.ts.map +1 -1
- package/dist/lib/browser-operation.js +4 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/commands/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/commands/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,QAgLxD"}
|
|
@@ -22,6 +22,7 @@ export function registerApprovalCommands(program) {
|
|
|
22
22
|
.requiredOption('--title <title>', 'Human-readable title for the request')
|
|
23
23
|
.option('--reason <text>', 'Why this action is needed')
|
|
24
24
|
.option('--payload <json>', PAYLOAD_HELP)
|
|
25
|
+
.option('--thread-root-id <id>', 'Post the card as a reply in this thread of --chat')
|
|
25
26
|
.action(async (opts) => {
|
|
26
27
|
try {
|
|
27
28
|
const { client, orgId } = resolveCredentials();
|
|
@@ -32,6 +33,7 @@ export function registerApprovalCommands(program) {
|
|
|
32
33
|
chat_id: stripPrllScheme(opts.chat),
|
|
33
34
|
title: opts.title,
|
|
34
35
|
reason: opts.reason,
|
|
36
|
+
...(opts.threadRootId ? { thread_root_id: stripPrllScheme(opts.threadRootId) } : {}),
|
|
35
37
|
});
|
|
36
38
|
printJson(result);
|
|
37
39
|
printFiledApproval(result, result.deduplicated ? 'Already waiting' : 'Created');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps-publish.d.ts","sourceRoot":"","sources":["../../src/commands/apps-publish.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"apps-publish.d.ts","sourceRoot":"","sources":["../../src/commands/apps-publish.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC;;;;;;wEAMwE;AACxE,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,QAiJtD;AAwCD,UAAU,MAAM;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;yBAEyB;AACzB,iBAAe,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,eAAe,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA8D7F;AA4BD,iBAAe,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCrE;AAGD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -10,6 +10,7 @@ import { resolveCredentials } from '../lib/client.js';
|
|
|
10
10
|
import { printError, printJson, printProgress, stripPrllScheme } from '../lib/output.js';
|
|
11
11
|
import { appIdFrom, outputPath, withApp } from './apps-args.js';
|
|
12
12
|
import { checkActions } from './apps-check.js';
|
|
13
|
+
import { DEV_VARS_FILE } from './apps-dev-vars.js';
|
|
13
14
|
/** `parall app publish / versions / rollback / pull` (design §7.3): the
|
|
14
15
|
* agent's machine builds, the platform accepts. publish = tar the dist and
|
|
15
16
|
* the source, reserve a seq, PUT both content-addressed tarballs, finalize
|
|
@@ -159,6 +160,13 @@ async function assertBundleRoot(dist) {
|
|
|
159
160
|
}
|
|
160
161
|
/** Anything a source tree drags along that is never source. */
|
|
161
162
|
const sourceExcludes = new Set(['node_modules', '.git', 'dist', '.DS_Store']);
|
|
163
|
+
/** The source archive is kept for `parall app pull`, so it must not carry
|
|
164
|
+
* the local secrets file — `.dev.vars` and its variants, as the scaffold's
|
|
165
|
+
* .gitignore lists them (`.dev.vars*`): secret values never leave this
|
|
166
|
+
* machine (mini-app-network-design.md §7.6). */
|
|
167
|
+
function excludedFromSource(name) {
|
|
168
|
+
return sourceExcludes.has(name) || name.startsWith(DEV_VARS_FILE);
|
|
169
|
+
}
|
|
162
170
|
// Mirrors the server's archive caps (model.MiniAppBundleArchiveMaxBytes /
|
|
163
171
|
// MiniAppSourceArchiveMaxBytes).
|
|
164
172
|
const BUNDLE_ARCHIVE_MAX_BYTES = 22 * 1024 * 1024;
|
|
@@ -177,7 +185,7 @@ async function packDirectory(dir, opts) {
|
|
|
177
185
|
const files = [];
|
|
178
186
|
const walk = async (current) => {
|
|
179
187
|
for (const entry of await fs.readdir(current, { withFileTypes: true })) {
|
|
180
|
-
if (opts.excludeDefaults &&
|
|
188
|
+
if (opts.excludeDefaults && excludedFromSource(entry.name))
|
|
181
189
|
continue;
|
|
182
190
|
const full = join(current, entry.name);
|
|
183
191
|
if (entry.isDirectory()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAwCnD;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyC9D"}
|
package/dist/commands/browser.js
CHANGED
|
@@ -34,6 +34,7 @@ export function browserHelp(action) {
|
|
|
34
34
|
'read: exactly one of --url or a tab target. get: --prop title/url need no locator; text/html/value/attr require one; attr also needs --name.',
|
|
35
35
|
'wait: --selector, or --state load (no selector). Boolean values are explicit true/false.',
|
|
36
36
|
'open <url> and eval <javascript> also accept positional values. eval is bounded, not streaming.',
|
|
37
|
+
'DIALOG_OPEN: the page is paused on an alert/confirm. dialog with no options reads it; --accept true|false answers it (--text needs --accept). navigate or close also dismiss it. Nothing answers it for you.',
|
|
37
38
|
'--json prints the result on stdout or the error and next step on stderr. Save the operation ID for later checks.',
|
|
38
39
|
'read --url uses a temporary page that closes after reading; use open to keep a page for the user.',
|
|
39
40
|
'Decode screenshot PNG base64 into a file before viewing it. Expired result data cannot be recovered by checking again; do not rerun an action to recover old data.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-operation.d.ts","sourceRoot":"","sources":["../../src/lib/browser-operation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,0BAA0B,EAG1B,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,KAAK,MAAM,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACnG,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACpC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CA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AgB,YAAY,CAC1B,GAAG,EAAE,OAAO,EACZ,MAAM,GAAE,MAAW,EACnB,iBAAiB,UAAQ,GACxB,cAAc,CA+ChB;AACD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,0BAA0B,EACnC,WAAW,UAAQ,GAClB,cAAc,CAwChB;AAED,oFAAoF;AACpF,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,CAAC,cAAc,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,EACtD,KAAK;;gBAAgC,MAAM;CAAkD,GAC5F,OAAO,CAAC,cAAc,CAAC,CAoFzB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CA8BjF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { randomBytes, webcrypto } from 'node:crypto';
|
|
2
2
|
import { ApiError, BrowserUseValidationError, validateBrowserUseReceipt } from '@parall/sdk';
|
|
3
3
|
const recovery = (operationId, profileId) => `Do not retry the action. Check the original operation without running it again: parall browser operation get ${operationId} --profile ${profileId} --json`;
|
|
4
|
+
const dialogRecovery = (receipt) => `The page is paused on a JavaScript dialog; do not repeat the action. Read it: parall browser dialog --profile ${receipt.profile_id}${receipt.tab_id ? ` --tab ${receipt.tab_id} --browser-generation ${receipt.browser_generation}` : ' --tab <btab_id> --browser-generation <n>'} --json, then answer it with --accept true or --accept false. Nothing answers it for you.`;
|
|
4
5
|
const publicText = (value) => value.length <= 1024 &&
|
|
5
6
|
!/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/u.test(value) &&
|
|
6
7
|
!/\b(?:agk_|pk_|sk_|edg_)|dispatch[_ -]?claim|grant[_ -]?proof/iu.test(value)
|
|
@@ -86,7 +87,9 @@ export function browserReceiptOutcome(receipt, waitExpired = false) {
|
|
|
86
87
|
message: publicText(receipt.error.message ?? 'Browser Use did not succeed.'),
|
|
87
88
|
hint: receipt.error.code === 'CANCELLED'
|
|
88
89
|
? 'Stop and report the cancellation to the user. Do not resume the task automatically.'
|
|
89
|
-
:
|
|
90
|
+
: receipt.error.code === 'DIALOG_OPEN'
|
|
91
|
+
? dialogRecovery(receipt)
|
|
92
|
+
: recovery(receipt.operation_id, receipt.profile_id),
|
|
90
93
|
},
|
|
91
94
|
};
|
|
92
95
|
return { ok: true, ...base, ...(receipt.result_available ? { data: receipt.data } : {}) };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.77.0",
|
|
4
4
|
"description": "CLI client for Parall — universal agent & human access to Parall API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"node-diff3": "3.2.1",
|
|
43
43
|
"tar-stream": "^3.2.1",
|
|
44
44
|
"zod": "^4.3.6",
|
|
45
|
-
"@parall/agent-core": "1.
|
|
46
|
-
"@parall/sdk": "1.
|
|
45
|
+
"@parall/agent-core": "1.77.0",
|
|
46
|
+
"@parall/sdk": "1.77.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@dnd-kit/core": "6.3.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"tw-animate-css": "1.4.0",
|
|
72
72
|
"typescript": "^5.7.0",
|
|
73
73
|
"vite": "6.4.1",
|
|
74
|
-
"@parall/agent-core": "1.
|
|
74
|
+
"@parall/agent-core": "1.77.0"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "node scripts/generate-miniapp-sdk.mjs --check && node scripts/generate-local-runner.mjs --check && node scripts/generate-app-templates.mjs --check && tsc",
|