@parall/daemon 1.36.0 → 1.36.1
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/bundle/manifest.json +11 -11
- package/bundle/parall-browser-pod.js +77 -5
- package/bundle/parall-claude-agent.js +63 -1
- package/bundle/parall-codex-agent.js +63 -1
- package/bundle/parall-daemon.js +52 -3
- package/dist/browser-pod.d.ts +7 -0
- package/dist/browser-pod.d.ts.map +1 -1
- package/dist/browser-pod.js +73 -3
- package/dist/clip-runtime/browser-profile-manager.d.ts +16 -0
- package/dist/clip-runtime/browser-profile-manager.d.ts.map +1 -1
- package/dist/clip-runtime/browser-profile-manager.js +17 -0
- package/dist/clip-runtime/index.d.ts +1 -0
- package/dist/clip-runtime/index.d.ts.map +1 -1
- package/dist/supervisor.d.ts +11 -0
- package/dist/supervisor.d.ts.map +1 -1
- package/dist/supervisor.js +25 -0
- package/package.json +6 -6
package/bundle/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.36.
|
|
3
|
-
"built_at": "2026-06-
|
|
2
|
+
"version": "1.36.1",
|
|
3
|
+
"built_at": "2026-06-26T10:09:22.541Z",
|
|
4
4
|
"min_node_version": "20.0.0",
|
|
5
5
|
"files": {
|
|
6
6
|
"bb-browser-daemon.js": {
|
|
@@ -16,25 +16,25 @@
|
|
|
16
16
|
"size": 18
|
|
17
17
|
},
|
|
18
18
|
"parall-browser-pod.js": {
|
|
19
|
-
"sha256": "
|
|
20
|
-
"size":
|
|
19
|
+
"sha256": "a9f602f001380c7fdfd2db7e7109343f07267a1acd6c020f5802a949769cd9fb",
|
|
20
|
+
"size": 1682059
|
|
21
21
|
},
|
|
22
22
|
"parall-claude-agent.js": {
|
|
23
|
-
"sha256": "
|
|
24
|
-
"size":
|
|
23
|
+
"sha256": "f38cb2274682403d735e9ea3772d56fcfeee9636a1866eb599e41b4a23075ea6",
|
|
24
|
+
"size": 1574204
|
|
25
25
|
},
|
|
26
26
|
"parall-codex-agent.js": {
|
|
27
|
-
"sha256": "
|
|
28
|
-
"size":
|
|
27
|
+
"sha256": "ceee4b4852cb9cc058dbb70022c8fcf81fd802d1bff709d063386b95a9d501e4",
|
|
28
|
+
"size": 1605214
|
|
29
29
|
},
|
|
30
30
|
"parall-daemon.js": {
|
|
31
|
-
"sha256": "
|
|
32
|
-
"size":
|
|
31
|
+
"sha256": "a7cae49ec5efb258f60e35f9a03b71a9edbd947886b0b037c761aaa36bf9af79",
|
|
32
|
+
"size": 1612971
|
|
33
33
|
},
|
|
34
34
|
"parall-openclaw-agent.js": {
|
|
35
35
|
"sha256": "505433b4bf3a4b8dbb7b96978d8693d6c48079f4513282ff1ee59a6d13b3eddf",
|
|
36
36
|
"size": 9801
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"signature": "
|
|
39
|
+
"signature": "P/Lgycpu5bMlOGiMzEto4lrKQuoz4c17B0IJ0xmyP6n6DBpuUIEEGJZKs9lQtkz1kVhEgQ4dN9IipxLIZ6hhCg=="
|
|
40
40
|
}
|
|
@@ -35343,6 +35343,7 @@ var ENDPOINTS = {
|
|
|
35343
35343
|
// References (org-scoped)
|
|
35344
35344
|
REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
|
|
35345
35345
|
REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
|
|
35346
|
+
REFS_GRAPH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/graph`,
|
|
35346
35347
|
REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
|
|
35347
35348
|
// Platform config (agent-scoped, not org-scoped)
|
|
35348
35349
|
PLATFORM_CONFIG: `${API_BASE}/agents/platform-config`,
|
|
@@ -36200,7 +36201,8 @@ var ParallClient = class _ParallClient {
|
|
|
36200
36201
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_CLIPS);
|
|
36201
36202
|
return res.data;
|
|
36202
36203
|
}
|
|
36203
|
-
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
36204
|
+
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
36205
|
+
* Returns the daemon DTO (carries proxy_password for bb-browser replay). */
|
|
36204
36206
|
async listMachineBrowserProfiles() {
|
|
36205
36207
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_BROWSER_PROFILES);
|
|
36206
36208
|
return res.data;
|
|
@@ -36787,6 +36789,16 @@ var ParallClient = class _ParallClient {
|
|
|
36787
36789
|
async getBacklinks(orgId, params) {
|
|
36788
36790
|
return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
|
|
36789
36791
|
}
|
|
36792
|
+
/**
|
|
36793
|
+
* Bounded multi-hop walk of the prll:// reference graph around `uri`. `uri`
|
|
36794
|
+
* must be an entity-level prll:// URI — a refined URI (path/query/fragment) is
|
|
36795
|
+
* rejected with 400 UNSUPPORTED_REFINED_URI. `depth` is clamped server-side to
|
|
36796
|
+
* [1, 4]; breadth (node/edge counts) is capped server-side and surfaced via
|
|
36797
|
+
* `truncated`. ACL is applied per hop (chat membership + wiki path scope).
|
|
36798
|
+
*/
|
|
36799
|
+
async getRefsGraph(orgId, params) {
|
|
36800
|
+
return this.request("GET", ENDPOINTS.REFS_GRAPH(orgId), void 0, params);
|
|
36801
|
+
}
|
|
36790
36802
|
async checkBrokenRefs(orgId) {
|
|
36791
36803
|
return this.request("GET", ENDPOINTS.REFS_CHECK(orgId));
|
|
36792
36804
|
}
|
|
@@ -37922,10 +37934,12 @@ var BrowserProfileManager = class {
|
|
|
37922
37934
|
if (!isBrowserAccountInfoUnauthenticatedError(err)) {
|
|
37923
37935
|
if (!isBrowserAccountNotFoundError(err))
|
|
37924
37936
|
throw err;
|
|
37937
|
+
const proxy = this.opts.resolveProxy ? await this.opts.resolveProxy(account) : null;
|
|
37925
37938
|
await this.sendCommand({
|
|
37926
37939
|
method: "account_create",
|
|
37927
37940
|
account,
|
|
37928
|
-
...accountUrl ? { accountUrl } : {}
|
|
37941
|
+
...accountUrl ? { accountUrl } : {},
|
|
37942
|
+
...proxyCreateFields(proxy)
|
|
37929
37943
|
});
|
|
37930
37944
|
accountCreated = true;
|
|
37931
37945
|
}
|
|
@@ -38182,6 +38196,16 @@ function resolveBbBrowserDaemonPath() {
|
|
|
38182
38196
|
function randomToken() {
|
|
38183
38197
|
return randomBytes(16).toString("hex");
|
|
38184
38198
|
}
|
|
38199
|
+
function proxyCreateFields(proxy) {
|
|
38200
|
+
if (!proxy?.server)
|
|
38201
|
+
return {};
|
|
38202
|
+
const fields = { proxyServer: proxy.server };
|
|
38203
|
+
if (proxy.username)
|
|
38204
|
+
fields.proxyUsername = proxy.username;
|
|
38205
|
+
if (proxy.password)
|
|
38206
|
+
fields.proxyPassword = proxy.password;
|
|
38207
|
+
return fields;
|
|
38208
|
+
}
|
|
38185
38209
|
|
|
38186
38210
|
// ts/daemon/dist/clip-runtime/browser-state-store.js
|
|
38187
38211
|
var import_client_s3 = __toESM(require_dist_cjs73(), 1);
|
|
@@ -40165,9 +40189,25 @@ function resolveBrowserPodConfig(env = process.env) {
|
|
|
40165
40189
|
orgId,
|
|
40166
40190
|
healthPort: parsePort(env.PRLL_HEALTH_PORT, DEFAULT_HEALTH_PORT),
|
|
40167
40191
|
stateDir,
|
|
40168
|
-
homeDir
|
|
40192
|
+
homeDir,
|
|
40193
|
+
proxy: parseProxyEnv(env)
|
|
40169
40194
|
};
|
|
40170
40195
|
}
|
|
40196
|
+
function parseProxyEnv(env) {
|
|
40197
|
+
const server = env.PRLL_BROWSER_PROXY_SERVER?.trim();
|
|
40198
|
+
const username = env.PRLL_BROWSER_PROXY_USERNAME || void 0;
|
|
40199
|
+
const password = env.PRLL_BROWSER_PROXY_PASSWORD || void 0;
|
|
40200
|
+
if (!server) {
|
|
40201
|
+
if (username !== void 0 || password !== void 0) {
|
|
40202
|
+
throw new Error("browser-pod: PRLL_BROWSER_PROXY_USERNAME/PASSWORD set without PRLL_BROWSER_PROXY_SERVER");
|
|
40203
|
+
}
|
|
40204
|
+
return null;
|
|
40205
|
+
}
|
|
40206
|
+
if (username === void 0 !== (password === void 0)) {
|
|
40207
|
+
throw new Error("browser-pod: PRLL_BROWSER_PROXY_USERNAME and PRLL_BROWSER_PROXY_PASSWORD must be set together");
|
|
40208
|
+
}
|
|
40209
|
+
return { server, username, password };
|
|
40210
|
+
}
|
|
40171
40211
|
function resolvePoolPodConfig(env = process.env) {
|
|
40172
40212
|
const poolToken = env.PRLL_POOL_TOKEN?.trim() || "";
|
|
40173
40213
|
const podId = env.PRLL_POD_ID?.trim() || "";
|
|
@@ -40236,7 +40276,25 @@ function parseAssignRequest(body) {
|
|
|
40236
40276
|
sessionToken
|
|
40237
40277
|
};
|
|
40238
40278
|
}
|
|
40239
|
-
|
|
40279
|
+
let proxy;
|
|
40280
|
+
if (b5.proxy !== void 0 && b5.proxy !== null) {
|
|
40281
|
+
if (typeof b5.proxy !== "object")
|
|
40282
|
+
return { ok: false, error: "proxy must be an object" };
|
|
40283
|
+
const p2 = b5.proxy;
|
|
40284
|
+
const server = str(p2.server);
|
|
40285
|
+
if (!server)
|
|
40286
|
+
return { ok: false, error: "proxy requires server" };
|
|
40287
|
+
const username = (typeof p2.username === "string" ? p2.username : "") || void 0;
|
|
40288
|
+
const password = (typeof p2.password === "string" ? p2.password : "") || void 0;
|
|
40289
|
+
if (username === void 0 !== (password === void 0)) {
|
|
40290
|
+
return { ok: false, error: "proxy username and password must be provided together" };
|
|
40291
|
+
}
|
|
40292
|
+
proxy = { server, username, password };
|
|
40293
|
+
}
|
|
40294
|
+
return {
|
|
40295
|
+
ok: true,
|
|
40296
|
+
value: { assignmentToken, profileId, orgId, leaseId, generation, state: state2, proxy }
|
|
40297
|
+
};
|
|
40240
40298
|
}
|
|
40241
40299
|
function applyAssignmentEnv(env, req) {
|
|
40242
40300
|
env.PRLL_ASSIGNMENT_TOKEN = req.assignmentToken;
|
|
@@ -40254,6 +40312,16 @@ function applyAssignmentEnv(env, req) {
|
|
|
40254
40312
|
if (req.state.endpoint)
|
|
40255
40313
|
env.PRLL_BROWSER_STATE_ENDPOINT = req.state.endpoint;
|
|
40256
40314
|
}
|
|
40315
|
+
delete env.PRLL_BROWSER_PROXY_SERVER;
|
|
40316
|
+
delete env.PRLL_BROWSER_PROXY_USERNAME;
|
|
40317
|
+
delete env.PRLL_BROWSER_PROXY_PASSWORD;
|
|
40318
|
+
if (req.proxy) {
|
|
40319
|
+
env.PRLL_BROWSER_PROXY_SERVER = req.proxy.server;
|
|
40320
|
+
if (req.proxy.username)
|
|
40321
|
+
env.PRLL_BROWSER_PROXY_USERNAME = req.proxy.username;
|
|
40322
|
+
if (req.proxy.password)
|
|
40323
|
+
env.PRLL_BROWSER_PROXY_PASSWORD = req.proxy.password;
|
|
40324
|
+
}
|
|
40257
40325
|
}
|
|
40258
40326
|
function poolTokenMatches(bearer, expected) {
|
|
40259
40327
|
if (!bearer)
|
|
@@ -40507,7 +40575,11 @@ function makeCheckpointer(store) {
|
|
|
40507
40575
|
};
|
|
40508
40576
|
}
|
|
40509
40577
|
async function preparePodRuntime(config, env, log) {
|
|
40510
|
-
const browser = new BrowserProfileManager({
|
|
40578
|
+
const browser = new BrowserProfileManager({
|
|
40579
|
+
homeDir: config.homeDir,
|
|
40580
|
+
log,
|
|
40581
|
+
resolveProxy: () => config.proxy
|
|
40582
|
+
});
|
|
40511
40583
|
const clipManager = new ClipProcessManager({
|
|
40512
40584
|
clipsDir: path5.join(config.stateDir, "clips"),
|
|
40513
40585
|
dataDir: path5.join(config.stateDir, "clip-data"),
|
|
@@ -27334,6 +27334,7 @@ var ENDPOINTS = {
|
|
|
27334
27334
|
// References (org-scoped)
|
|
27335
27335
|
REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
|
|
27336
27336
|
REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
|
|
27337
|
+
REFS_GRAPH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/graph`,
|
|
27337
27338
|
REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
|
|
27338
27339
|
// Platform config (agent-scoped, not org-scoped)
|
|
27339
27340
|
PLATFORM_CONFIG: `${API_BASE}/agents/platform-config`,
|
|
@@ -28270,7 +28271,8 @@ var ParallClient = class _ParallClient {
|
|
|
28270
28271
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_CLIPS);
|
|
28271
28272
|
return res.data;
|
|
28272
28273
|
}
|
|
28273
|
-
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
28274
|
+
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
28275
|
+
* Returns the daemon DTO (carries proxy_password for bb-browser replay). */
|
|
28274
28276
|
async listMachineBrowserProfiles() {
|
|
28275
28277
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_BROWSER_PROFILES);
|
|
28276
28278
|
return res.data;
|
|
@@ -28857,6 +28859,16 @@ var ParallClient = class _ParallClient {
|
|
|
28857
28859
|
async getBacklinks(orgId, params) {
|
|
28858
28860
|
return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
|
|
28859
28861
|
}
|
|
28862
|
+
/**
|
|
28863
|
+
* Bounded multi-hop walk of the prll:// reference graph around `uri`. `uri`
|
|
28864
|
+
* must be an entity-level prll:// URI — a refined URI (path/query/fragment) is
|
|
28865
|
+
* rejected with 400 UNSUPPORTED_REFINED_URI. `depth` is clamped server-side to
|
|
28866
|
+
* [1, 4]; breadth (node/edge counts) is capped server-side and surfaced via
|
|
28867
|
+
* `truncated`. ACL is applied per hop (chat membership + wiki path scope).
|
|
28868
|
+
*/
|
|
28869
|
+
async getRefsGraph(orgId, params) {
|
|
28870
|
+
return this.request("GET", ENDPOINTS.REFS_GRAPH(orgId), void 0, params);
|
|
28871
|
+
}
|
|
28860
28872
|
async checkBrokenRefs(orgId) {
|
|
28861
28873
|
return this.request("GET", ENDPOINTS.REFS_CHECK(orgId));
|
|
28862
28874
|
}
|
|
@@ -31526,8 +31538,36 @@ parall machines logs prll://mch_xxx --lines 100
|
|
|
31526
31538
|
\`\`\`bash
|
|
31527
31539
|
parall chats list # List all chats
|
|
31528
31540
|
parall messages list prll://cht_xxx # Read chat message history
|
|
31541
|
+
parall messages list prll://cht_xxx --since 2026-01-01 # Only messages at/after a date (RFC3339 or YYYY-MM-DD)
|
|
31542
|
+
\`\`\`
|
|
31543
|
+
|
|
31544
|
+
## Org-Context Search
|
|
31545
|
+
|
|
31546
|
+
Before deciding or starting non-trivial work, search the org's real history \u2014
|
|
31547
|
+
past discussions, decisions, tasks, and wiki notes \u2014 so you don't re-litigate
|
|
31548
|
+
settled questions or repeat known mistakes. This searches live org data
|
|
31549
|
+
(semantic + keyword), not a local copy, and is permission-filtered to what you
|
|
31550
|
+
can see.
|
|
31551
|
+
|
|
31552
|
+
\`\`\`bash
|
|
31553
|
+
# Semantic + keyword search across messages, tasks, and wiki
|
|
31554
|
+
parall search "auth v5 upgrade"
|
|
31555
|
+
|
|
31556
|
+
# Restrict entity types (m=message, t=task, w=wiki). --channel narrows the
|
|
31557
|
+
# MESSAGE hits to one chat (tasks/wiki are unaffected by it).
|
|
31558
|
+
parall search "auth v5 upgrade" --types m,w --channel prll://cht_eng
|
|
31559
|
+
|
|
31560
|
+
# Time-box to recent activity (RFC3339 or YYYY-MM-DD). Narrows messages + tasks;
|
|
31561
|
+
# wiki is always matched by relevance (the index has no authored timestamp).
|
|
31562
|
+
parall search "auth v5 upgrade" --since 2026-01-01
|
|
31563
|
+
|
|
31564
|
+
# Narrow wiki hits to a frontmatter document type
|
|
31565
|
+
parall search "deploy steps" --types w --wiki-type Runbook
|
|
31529
31566
|
\`\`\`
|
|
31530
31567
|
|
|
31568
|
+
Even with zero curated notes, the raw message + task history is searchable \u2014 the
|
|
31569
|
+
original discussion and its approval/rejection IS the precedent.
|
|
31570
|
+
|
|
31531
31571
|
## Sending Messages
|
|
31532
31572
|
|
|
31533
31573
|
Each \`[Event: message.new]\` includes \`[Chat: ... (prll://cht_xxx)]\` \u2014 use that chat URI to reply.
|
|
@@ -31629,6 +31669,28 @@ When a message or event references \`prll://sch_xxx\` or \`prll://srn_xxx\`, or
|
|
|
31629
31669
|
|
|
31630
31670
|
When a message or event references \`prll://xcn_xxx\`, \`prll://xin_xxx\`, \`prll://xtr_xxx\`, or \`prll://xrn_xxx\`, or when you receive \`[Event: external.trigger]\`, switch to the **parall-external-triggers** skill for the CLI commands (connections / triggers / events / runs).
|
|
31631
31671
|
|
|
31672
|
+
## References (relationship graph)
|
|
31673
|
+
|
|
31674
|
+
\`prll://\` references between entities form a graph \u2014 a message cites a task, a
|
|
31675
|
+
task cites a wiki page, and so on. Walk it to answer "what is this decision /
|
|
31676
|
+
entity connected to". All results are permission-filtered to what you can see.
|
|
31677
|
+
|
|
31678
|
+
\`\`\`bash
|
|
31679
|
+
# Resolve URIs to entity metadata (titles, status, previews)
|
|
31680
|
+
parall refs resolve prll://tsk_xxx prll://wik_xxx
|
|
31681
|
+
|
|
31682
|
+
# Single hop \u2014 who references X
|
|
31683
|
+
parall refs backlinks prll://tsk_xxx
|
|
31684
|
+
|
|
31685
|
+
# Multi-hop \u2014 the connected sub-graph around X (entity-level URI only \u2014 no
|
|
31686
|
+
# path/anchor; depth 1\u20134, default 2)
|
|
31687
|
+
parall refs graph prll://tsk_xxx --depth 2
|
|
31688
|
+
\`\`\`
|
|
31689
|
+
|
|
31690
|
+
\`refs graph\` traverses both directions (inbound + outbound) and returns \`nodes\`
|
|
31691
|
+
and \`edges\` with each node's hop \`depth\`. \`truncated: true\` means a size cap clipped
|
|
31692
|
+
the result \u2014 narrow it with a smaller \`--depth\`.
|
|
31693
|
+
|
|
31632
31694
|
CLI success output is JSON. Errors print a JSON line (\`{"error","status","code",...}\`) and, on a \`PERMISSION_DENIED\`, may add a plain-text \`Request approval:\` line \u2014 read both.
|
|
31633
31695
|
`;
|
|
31634
31696
|
|
|
@@ -27334,6 +27334,7 @@ var ENDPOINTS = {
|
|
|
27334
27334
|
// References (org-scoped)
|
|
27335
27335
|
REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
|
|
27336
27336
|
REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
|
|
27337
|
+
REFS_GRAPH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/graph`,
|
|
27337
27338
|
REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
|
|
27338
27339
|
// Platform config (agent-scoped, not org-scoped)
|
|
27339
27340
|
PLATFORM_CONFIG: `${API_BASE}/agents/platform-config`,
|
|
@@ -28270,7 +28271,8 @@ var ParallClient = class _ParallClient {
|
|
|
28270
28271
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_CLIPS);
|
|
28271
28272
|
return res.data;
|
|
28272
28273
|
}
|
|
28273
|
-
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
28274
|
+
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
28275
|
+
* Returns the daemon DTO (carries proxy_password for bb-browser replay). */
|
|
28274
28276
|
async listMachineBrowserProfiles() {
|
|
28275
28277
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_BROWSER_PROFILES);
|
|
28276
28278
|
return res.data;
|
|
@@ -28857,6 +28859,16 @@ var ParallClient = class _ParallClient {
|
|
|
28857
28859
|
async getBacklinks(orgId, params) {
|
|
28858
28860
|
return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
|
|
28859
28861
|
}
|
|
28862
|
+
/**
|
|
28863
|
+
* Bounded multi-hop walk of the prll:// reference graph around `uri`. `uri`
|
|
28864
|
+
* must be an entity-level prll:// URI — a refined URI (path/query/fragment) is
|
|
28865
|
+
* rejected with 400 UNSUPPORTED_REFINED_URI. `depth` is clamped server-side to
|
|
28866
|
+
* [1, 4]; breadth (node/edge counts) is capped server-side and surfaced via
|
|
28867
|
+
* `truncated`. ACL is applied per hop (chat membership + wiki path scope).
|
|
28868
|
+
*/
|
|
28869
|
+
async getRefsGraph(orgId, params) {
|
|
28870
|
+
return this.request("GET", ENDPOINTS.REFS_GRAPH(orgId), void 0, params);
|
|
28871
|
+
}
|
|
28860
28872
|
async checkBrokenRefs(orgId) {
|
|
28861
28873
|
return this.request("GET", ENDPOINTS.REFS_CHECK(orgId));
|
|
28862
28874
|
}
|
|
@@ -31526,8 +31538,36 @@ parall machines logs prll://mch_xxx --lines 100
|
|
|
31526
31538
|
\`\`\`bash
|
|
31527
31539
|
parall chats list # List all chats
|
|
31528
31540
|
parall messages list prll://cht_xxx # Read chat message history
|
|
31541
|
+
parall messages list prll://cht_xxx --since 2026-01-01 # Only messages at/after a date (RFC3339 or YYYY-MM-DD)
|
|
31542
|
+
\`\`\`
|
|
31543
|
+
|
|
31544
|
+
## Org-Context Search
|
|
31545
|
+
|
|
31546
|
+
Before deciding or starting non-trivial work, search the org's real history \u2014
|
|
31547
|
+
past discussions, decisions, tasks, and wiki notes \u2014 so you don't re-litigate
|
|
31548
|
+
settled questions or repeat known mistakes. This searches live org data
|
|
31549
|
+
(semantic + keyword), not a local copy, and is permission-filtered to what you
|
|
31550
|
+
can see.
|
|
31551
|
+
|
|
31552
|
+
\`\`\`bash
|
|
31553
|
+
# Semantic + keyword search across messages, tasks, and wiki
|
|
31554
|
+
parall search "auth v5 upgrade"
|
|
31555
|
+
|
|
31556
|
+
# Restrict entity types (m=message, t=task, w=wiki). --channel narrows the
|
|
31557
|
+
# MESSAGE hits to one chat (tasks/wiki are unaffected by it).
|
|
31558
|
+
parall search "auth v5 upgrade" --types m,w --channel prll://cht_eng
|
|
31559
|
+
|
|
31560
|
+
# Time-box to recent activity (RFC3339 or YYYY-MM-DD). Narrows messages + tasks;
|
|
31561
|
+
# wiki is always matched by relevance (the index has no authored timestamp).
|
|
31562
|
+
parall search "auth v5 upgrade" --since 2026-01-01
|
|
31563
|
+
|
|
31564
|
+
# Narrow wiki hits to a frontmatter document type
|
|
31565
|
+
parall search "deploy steps" --types w --wiki-type Runbook
|
|
31529
31566
|
\`\`\`
|
|
31530
31567
|
|
|
31568
|
+
Even with zero curated notes, the raw message + task history is searchable \u2014 the
|
|
31569
|
+
original discussion and its approval/rejection IS the precedent.
|
|
31570
|
+
|
|
31531
31571
|
## Sending Messages
|
|
31532
31572
|
|
|
31533
31573
|
Each \`[Event: message.new]\` includes \`[Chat: ... (prll://cht_xxx)]\` \u2014 use that chat URI to reply.
|
|
@@ -31629,6 +31669,28 @@ When a message or event references \`prll://sch_xxx\` or \`prll://srn_xxx\`, or
|
|
|
31629
31669
|
|
|
31630
31670
|
When a message or event references \`prll://xcn_xxx\`, \`prll://xin_xxx\`, \`prll://xtr_xxx\`, or \`prll://xrn_xxx\`, or when you receive \`[Event: external.trigger]\`, switch to the **parall-external-triggers** skill for the CLI commands (connections / triggers / events / runs).
|
|
31631
31671
|
|
|
31672
|
+
## References (relationship graph)
|
|
31673
|
+
|
|
31674
|
+
\`prll://\` references between entities form a graph \u2014 a message cites a task, a
|
|
31675
|
+
task cites a wiki page, and so on. Walk it to answer "what is this decision /
|
|
31676
|
+
entity connected to". All results are permission-filtered to what you can see.
|
|
31677
|
+
|
|
31678
|
+
\`\`\`bash
|
|
31679
|
+
# Resolve URIs to entity metadata (titles, status, previews)
|
|
31680
|
+
parall refs resolve prll://tsk_xxx prll://wik_xxx
|
|
31681
|
+
|
|
31682
|
+
# Single hop \u2014 who references X
|
|
31683
|
+
parall refs backlinks prll://tsk_xxx
|
|
31684
|
+
|
|
31685
|
+
# Multi-hop \u2014 the connected sub-graph around X (entity-level URI only \u2014 no
|
|
31686
|
+
# path/anchor; depth 1\u20134, default 2)
|
|
31687
|
+
parall refs graph prll://tsk_xxx --depth 2
|
|
31688
|
+
\`\`\`
|
|
31689
|
+
|
|
31690
|
+
\`refs graph\` traverses both directions (inbound + outbound) and returns \`nodes\`
|
|
31691
|
+
and \`edges\` with each node's hop \`depth\`. \`truncated: true\` means a size cap clipped
|
|
31692
|
+
the result \u2014 narrow it with a smaller \`--depth\`.
|
|
31693
|
+
|
|
31632
31694
|
CLI success output is JSON. Errors print a JSON line (\`{"error","status","code",...}\`) and, on a \`PERMISSION_DENIED\`, may add a plain-text \`Request approval:\` line \u2014 read both.
|
|
31633
31695
|
`;
|
|
31634
31696
|
|
package/bundle/parall-daemon.js
CHANGED
|
@@ -27348,6 +27348,7 @@ var ENDPOINTS = {
|
|
|
27348
27348
|
// References (org-scoped)
|
|
27349
27349
|
REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
|
|
27350
27350
|
REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
|
|
27351
|
+
REFS_GRAPH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/graph`,
|
|
27351
27352
|
REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
|
|
27352
27353
|
// Platform config (agent-scoped, not org-scoped)
|
|
27353
27354
|
PLATFORM_CONFIG: `${API_BASE}/agents/platform-config`,
|
|
@@ -28284,7 +28285,8 @@ var ParallClient = class _ParallClient {
|
|
|
28284
28285
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_CLIPS);
|
|
28285
28286
|
return res.data;
|
|
28286
28287
|
}
|
|
28287
|
-
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
28288
|
+
/** `GET /machines/me/browser-profiles` — browser profiles hosted by this machine.
|
|
28289
|
+
* Returns the daemon DTO (carries proxy_password for bb-browser replay). */
|
|
28288
28290
|
async listMachineBrowserProfiles() {
|
|
28289
28291
|
const res = await this.request("GET", ENDPOINTS.MACHINES_ME_BROWSER_PROFILES);
|
|
28290
28292
|
return res.data;
|
|
@@ -28871,6 +28873,16 @@ var ParallClient = class _ParallClient {
|
|
|
28871
28873
|
async getBacklinks(orgId, params) {
|
|
28872
28874
|
return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
|
|
28873
28875
|
}
|
|
28876
|
+
/**
|
|
28877
|
+
* Bounded multi-hop walk of the prll:// reference graph around `uri`. `uri`
|
|
28878
|
+
* must be an entity-level prll:// URI — a refined URI (path/query/fragment) is
|
|
28879
|
+
* rejected with 400 UNSUPPORTED_REFINED_URI. `depth` is clamped server-side to
|
|
28880
|
+
* [1, 4]; breadth (node/edge counts) is capped server-side and surfaced via
|
|
28881
|
+
* `truncated`. ACL is applied per hop (chat membership + wiki path scope).
|
|
28882
|
+
*/
|
|
28883
|
+
async getRefsGraph(orgId, params) {
|
|
28884
|
+
return this.request("GET", ENDPOINTS.REFS_GRAPH(orgId), void 0, params);
|
|
28885
|
+
}
|
|
28874
28886
|
async checkBrokenRefs(orgId) {
|
|
28875
28887
|
return this.request("GET", ENDPOINTS.REFS_CHECK(orgId));
|
|
28876
28888
|
}
|
|
@@ -33184,10 +33196,12 @@ var BrowserProfileManager = class {
|
|
|
33184
33196
|
if (!isBrowserAccountInfoUnauthenticatedError(err)) {
|
|
33185
33197
|
if (!isBrowserAccountNotFoundError(err))
|
|
33186
33198
|
throw err;
|
|
33199
|
+
const proxy = this.opts.resolveProxy ? await this.opts.resolveProxy(account) : null;
|
|
33187
33200
|
await this.sendCommand({
|
|
33188
33201
|
method: "account_create",
|
|
33189
33202
|
account,
|
|
33190
|
-
...accountUrl ? { accountUrl } : {}
|
|
33203
|
+
...accountUrl ? { accountUrl } : {},
|
|
33204
|
+
...proxyCreateFields(proxy)
|
|
33191
33205
|
});
|
|
33192
33206
|
accountCreated = true;
|
|
33193
33207
|
}
|
|
@@ -33444,6 +33458,16 @@ function resolveBbBrowserDaemonPath() {
|
|
|
33444
33458
|
function randomToken() {
|
|
33445
33459
|
return randomBytes(16).toString("hex");
|
|
33446
33460
|
}
|
|
33461
|
+
function proxyCreateFields(proxy) {
|
|
33462
|
+
if (!proxy?.server)
|
|
33463
|
+
return {};
|
|
33464
|
+
const fields = { proxyServer: proxy.server };
|
|
33465
|
+
if (proxy.username)
|
|
33466
|
+
fields.proxyUsername = proxy.username;
|
|
33467
|
+
if (proxy.password)
|
|
33468
|
+
fields.proxyPassword = proxy.password;
|
|
33469
|
+
return fields;
|
|
33470
|
+
}
|
|
33447
33471
|
|
|
33448
33472
|
// ts/daemon/dist/supervisor.js
|
|
33449
33473
|
init_config();
|
|
@@ -34371,7 +34395,8 @@ var DaemonSupervisor = class {
|
|
|
34371
34395
|
log: this.log,
|
|
34372
34396
|
reportStatus: (profileId, status, errorMsg) => {
|
|
34373
34397
|
this.client.reportBrowserProfileStatus(profileId, status, errorMsg).catch((err) => this.log.warn(`browser profile status report failed: ${String(err)}`));
|
|
34374
|
-
}
|
|
34398
|
+
},
|
|
34399
|
+
resolveProxy: (profileId) => this.resolveBrowserProfileProxy(profileId)
|
|
34375
34400
|
});
|
|
34376
34401
|
this.clipManager = new ClipProcessManager({
|
|
34377
34402
|
clipsDir: path13.join(this.config.rootStateDir, "clips"),
|
|
@@ -34637,6 +34662,30 @@ var DaemonSupervisor = class {
|
|
|
34637
34662
|
}
|
|
34638
34663
|
}
|
|
34639
34664
|
}
|
|
34665
|
+
/**
|
|
34666
|
+
* Resolve a profile's outbound proxy for bb-browser account creation (BYOC).
|
|
34667
|
+
* Fetched fresh — account creation is rare (once per profile until reset), so a
|
|
34668
|
+
* proxy edit applies on the next account_create. The mck_-authed machine list is
|
|
34669
|
+
* the only path that carries proxy_password (for replay to bb-browser).
|
|
34670
|
+
*
|
|
34671
|
+
* Fails closed: a fetch failure or a vanished profile THROWS, so the manager never
|
|
34672
|
+
* creates an account that would egress from the host's real IP for a
|
|
34673
|
+
* proxy-configured profile (the caller reports `error` and retries next tick).
|
|
34674
|
+
*/
|
|
34675
|
+
async resolveBrowserProfileProxy(profileId) {
|
|
34676
|
+
const profiles = await this.client.listMachineBrowserProfiles();
|
|
34677
|
+
const profile = profiles.find((p) => p.id === profileId);
|
|
34678
|
+
if (!profile) {
|
|
34679
|
+
throw new Error(`browser profile ${profileId} not found; refusing to create a bb-browser account without its proxy config`);
|
|
34680
|
+
}
|
|
34681
|
+
if (!profile.proxy_server)
|
|
34682
|
+
return null;
|
|
34683
|
+
return {
|
|
34684
|
+
server: profile.proxy_server,
|
|
34685
|
+
username: profile.proxy_username ?? void 0,
|
|
34686
|
+
password: profile.proxy_password ?? void 0
|
|
34687
|
+
};
|
|
34688
|
+
}
|
|
34640
34689
|
// ---- Flat layout migration (self-hosted → daemon) ----
|
|
34641
34690
|
/**
|
|
34642
34691
|
* Detects a legacy flat state layout (no agents/ subdir) and migrates it
|
package/dist/browser-pod.d.ts
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
*/
|
|
47
47
|
import * as http from 'node:http';
|
|
48
48
|
import { type GatewayLogger } from '@parall/agent-core';
|
|
49
|
+
import { type BrowserProxyConfig } from './clip-runtime/browser-profile-manager.js';
|
|
49
50
|
import { BrowserStateStore, type HydrateResult } from './clip-runtime/browser-state-store.js';
|
|
50
51
|
export interface BrowserPodConfig {
|
|
51
52
|
/** Controller-minted pba_ platform assignment token (ProviderStream bearer). */
|
|
@@ -64,6 +65,9 @@ export interface BrowserPodConfig {
|
|
|
64
65
|
stateDir: string;
|
|
65
66
|
/** bb-browser user-data dir (BB_BROWSER_HOME); where S3 state hydrates in a later PR. */
|
|
66
67
|
homeDir: string;
|
|
68
|
+
/** Per-profile outbound proxy (controller-injected via PRLL_BROWSER_PROXY_* env on a
|
|
69
|
+
* cold pod, or the /assign body on a warm one). null = direct egress. */
|
|
70
|
+
proxy: BrowserProxyConfig | null;
|
|
67
71
|
}
|
|
68
72
|
/**
|
|
69
73
|
* Resolve and validate the pod's runtime config from the environment. Throws on
|
|
@@ -109,6 +113,9 @@ export interface AssignRequest {
|
|
|
109
113
|
leaseId: string;
|
|
110
114
|
generation: number;
|
|
111
115
|
state?: AssignStateCreds;
|
|
116
|
+
/** Per-profile outbound proxy (warm-pod counterpart of the cold pod's
|
|
117
|
+
* PRLL_BROWSER_PROXY_* env). Absent = direct egress. */
|
|
118
|
+
proxy?: BrowserProxyConfig;
|
|
112
119
|
}
|
|
113
120
|
type AssignParseResult = {
|
|
114
121
|
ok: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-pod.d.ts","sourceRoot":"","sources":["../src/browser-pod.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"browser-pod.d.ts","sourceRoot":"","sources":["../src/browser-pod.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAgB9F,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,eAAe,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB;8EAC0E;IAC1E,KAAK,EAAE,kBA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AqED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,GAAG,EAAE,aAAa,GACjB,iBAAiB,GAAG,IAAI,CAiC1B;AAED,6EAA6E;AAC7E,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAK1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAE3E;AAcD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,GAAG,EAAE,aAAa,GACjB,OAAO,CAAC,iBAAiB,CAAC,CA0F5B;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,aAAa,GACjB,OAAO,CAAC,IAAI,CAAC,CAyCf;AAED;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,aAAa,GACjB,OAAO,CAAC,IAAI,CAAC,CAmDf"}
|
package/dist/browser-pod.js
CHANGED
|
@@ -51,7 +51,7 @@ import * as os from 'node:os';
|
|
|
51
51
|
import * as path from 'node:path';
|
|
52
52
|
import { pathToFileURL } from 'node:url';
|
|
53
53
|
import { createLogger } from '@parall/agent-core';
|
|
54
|
-
import { BrowserProfileManager } from './clip-runtime/browser-profile-manager.js';
|
|
54
|
+
import { BrowserProfileManager, } from './clip-runtime/browser-profile-manager.js';
|
|
55
55
|
import { BrowserStateStore } from './clip-runtime/browser-state-store.js';
|
|
56
56
|
import { ClipProvider } from './clip-runtime/clip-provider.js';
|
|
57
57
|
import { ClipProcessManager } from './clip-runtime/process-manager.js';
|
|
@@ -114,8 +114,37 @@ export function resolveBrowserPodConfig(env = process.env) {
|
|
|
114
114
|
healthPort: parsePort(env.PRLL_HEALTH_PORT, DEFAULT_HEALTH_PORT),
|
|
115
115
|
stateDir,
|
|
116
116
|
homeDir,
|
|
117
|
+
proxy: parseProxyEnv(env),
|
|
117
118
|
};
|
|
118
119
|
}
|
|
120
|
+
/** Parse the controller-injected PRLL_BROWSER_PROXY_* env into a proxy config, or
|
|
121
|
+
* null when no proxy is set (PRLL_BROWSER_PROXY_SERVER absent → direct egress).
|
|
122
|
+
* The cold pod gets these as env; the warm pod's /assign writes the same vars. */
|
|
123
|
+
function parseProxyEnv(env) {
|
|
124
|
+
const server = env.PRLL_BROWSER_PROXY_SERVER?.trim();
|
|
125
|
+
// username + password are credential-like passthrough — kept VERBATIM (never
|
|
126
|
+
// trimmed), because residential-proxy usernames carry session/geo selectors and
|
|
127
|
+
// a provider could legitimately use surrounding whitespace. Empty string → undefined.
|
|
128
|
+
const username = env.PRLL_BROWSER_PROXY_USERNAME || undefined;
|
|
129
|
+
const password = env.PRLL_BROWSER_PROXY_PASSWORD || undefined;
|
|
130
|
+
if (!server) {
|
|
131
|
+
// Orphan credentials with no server must FAIL CLOSED, not silently fall through
|
|
132
|
+
// to direct egress: a misconfigured pod spec that drops the server var while
|
|
133
|
+
// keeping creds should crash here, not leak traffic past the intended proxy.
|
|
134
|
+
if (username !== undefined || password !== undefined) {
|
|
135
|
+
throw new Error('browser-pod: PRLL_BROWSER_PROXY_USERNAME/PASSWORD set without PRLL_BROWSER_PROXY_SERVER');
|
|
136
|
+
}
|
|
137
|
+
return null; // no proxy at all → direct egress
|
|
138
|
+
}
|
|
139
|
+
// Reject half-auth at the pod boundary too (the server already enforces the
|
|
140
|
+
// user+pass pair). A version skew / bad pod spec should fail fast here, not
|
|
141
|
+
// forward incomplete creds to account_create where it becomes a confusing
|
|
142
|
+
// runtime auth failure.
|
|
143
|
+
if ((username === undefined) !== (password === undefined)) {
|
|
144
|
+
throw new Error('browser-pod: PRLL_BROWSER_PROXY_USERNAME and PRLL_BROWSER_PROXY_PASSWORD must be set together');
|
|
145
|
+
}
|
|
146
|
+
return { server, username, password };
|
|
147
|
+
}
|
|
119
148
|
/**
|
|
120
149
|
* Resolve a warm pod's identity-less config. Unlike resolveBrowserPodConfig this
|
|
121
150
|
* requires PRLL_POOL_TOKEN (not PRLL_ASSIGNMENT_TOKEN) and NO profile/org — those
|
|
@@ -196,7 +225,29 @@ export function parseAssignRequest(body) {
|
|
|
196
225
|
sessionToken,
|
|
197
226
|
};
|
|
198
227
|
}
|
|
199
|
-
|
|
228
|
+
let proxy;
|
|
229
|
+
if (b.proxy !== undefined && b.proxy !== null) {
|
|
230
|
+
if (typeof b.proxy !== 'object')
|
|
231
|
+
return { ok: false, error: 'proxy must be an object' };
|
|
232
|
+
const p = b.proxy;
|
|
233
|
+
const server = str(p.server);
|
|
234
|
+
if (!server)
|
|
235
|
+
return { ok: false, error: 'proxy requires server' };
|
|
236
|
+
// username + password are credentials — preserved VERBATIM (never trimmed);
|
|
237
|
+
// empty string → undefined. (server is a structured host:port, so it is trimmed.)
|
|
238
|
+
const username = (typeof p.username === 'string' ? p.username : '') || undefined;
|
|
239
|
+
const password = (typeof p.password === 'string' ? p.password : '') || undefined;
|
|
240
|
+
// Reject half-auth (same invariant the server enforces) before it reaches
|
|
241
|
+
// account_create as a confusing runtime auth failure.
|
|
242
|
+
if ((username === undefined) !== (password === undefined)) {
|
|
243
|
+
return { ok: false, error: 'proxy username and password must be provided together' };
|
|
244
|
+
}
|
|
245
|
+
proxy = { server, username, password };
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
ok: true,
|
|
249
|
+
value: { assignmentToken, profileId, orgId, leaseId, generation, state, proxy },
|
|
250
|
+
};
|
|
200
251
|
}
|
|
201
252
|
/**
|
|
202
253
|
* Apply an /assign payload to `env` (process.env in prod) so the assigned path
|
|
@@ -220,6 +271,19 @@ export function applyAssignmentEnv(env, req) {
|
|
|
220
271
|
if (req.state.endpoint)
|
|
221
272
|
env.PRLL_BROWSER_STATE_ENDPOINT = req.state.endpoint;
|
|
222
273
|
}
|
|
274
|
+
// Clear any prior proxy env BEFORE applying this assignment's proxy, so a pod
|
|
275
|
+
// env reused across assignments never inherits a stale credential (a no-proxy
|
|
276
|
+
// or different-proxy reassignment must not keep the previous profile's creds).
|
|
277
|
+
delete env.PRLL_BROWSER_PROXY_SERVER;
|
|
278
|
+
delete env.PRLL_BROWSER_PROXY_USERNAME;
|
|
279
|
+
delete env.PRLL_BROWSER_PROXY_PASSWORD;
|
|
280
|
+
if (req.proxy) {
|
|
281
|
+
env.PRLL_BROWSER_PROXY_SERVER = req.proxy.server;
|
|
282
|
+
if (req.proxy.username)
|
|
283
|
+
env.PRLL_BROWSER_PROXY_USERNAME = req.proxy.username;
|
|
284
|
+
if (req.proxy.password)
|
|
285
|
+
env.PRLL_BROWSER_PROXY_PASSWORD = req.proxy.password;
|
|
286
|
+
}
|
|
223
287
|
}
|
|
224
288
|
/** Constant-time bearer comparison against the injected pool token. The pod cannot
|
|
225
289
|
* verify the JWT signature (no shared secret), so it string-compares the bearer to
|
|
@@ -562,7 +626,13 @@ function makeCheckpointer(store) {
|
|
|
562
626
|
export async function preparePodRuntime(config, env, log) {
|
|
563
627
|
// Real browser runtime — starts bb-browser + Chromium lazily on first invoke,
|
|
564
628
|
// ensures the single profile's account, persists under homeDir (BB_BROWSER_HOME).
|
|
565
|
-
|
|
629
|
+
// A hosted pod serves exactly one profile, so resolveProxy ignores the id and
|
|
630
|
+
// returns the controller-injected proxy (env on a cold pod, /assign on a warm one).
|
|
631
|
+
const browser = new BrowserProfileManager({
|
|
632
|
+
homeDir: config.homeDir,
|
|
633
|
+
log,
|
|
634
|
+
resolveProxy: () => config.proxy,
|
|
635
|
+
});
|
|
566
636
|
// The process manager hosts no installable clips in pod mode — its only job is
|
|
567
637
|
// to advertise the synthetic "browser" capability (getProviderClips appends it
|
|
568
638
|
// because a BrowserProfileManager is present) and route inbound browser invokes
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { type ViewerTurnConfig } from './browser-viewer-streamer.js';
|
|
2
2
|
type BrowserProfileStatus = 'running' | 'stopped' | 'error';
|
|
3
|
+
/** Per-profile outbound proxy (BYO provider credentials) bound at bb-browser
|
|
4
|
+
* account_create. server is host:port (optional http/https/socks5 scheme);
|
|
5
|
+
* username/password authenticate (CDP Fetch.authRequired). Geo/session targeting
|
|
6
|
+
* lives inside the username (provider-specific). null/absent = direct egress. */
|
|
7
|
+
export interface BrowserProxyConfig {
|
|
8
|
+
server: string;
|
|
9
|
+
username?: string;
|
|
10
|
+
password?: string;
|
|
11
|
+
}
|
|
3
12
|
interface BrowserProfileManagerOptions {
|
|
4
13
|
homeDir: string;
|
|
5
14
|
log: {
|
|
@@ -8,6 +17,13 @@ interface BrowserProfileManagerOptions {
|
|
|
8
17
|
error(msg: string): void;
|
|
9
18
|
};
|
|
10
19
|
reportStatus?: (profileId: string, status: BrowserProfileStatus, errorMsg?: string) => void;
|
|
20
|
+
/** Resolve the profile's outbound proxy, called once per bb-browser account
|
|
21
|
+
* creation (the single choke point — invoke / open / ensureRuntime all funnel
|
|
22
|
+
* through ensureAccount). A proxy change therefore takes effect on the next
|
|
23
|
+
* account_create (after a reset). Returning null = direct egress. A thrown
|
|
24
|
+
* error fails the account creation closed (better than egressing from the real
|
|
25
|
+
* IP for a proxy-configured profile). */
|
|
26
|
+
resolveProxy?: (profileId: string) => Promise<BrowserProxyConfig | null> | BrowserProxyConfig | null;
|
|
11
27
|
}
|
|
12
28
|
interface BrowserInvokeRequest {
|
|
13
29
|
profileId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-profile-manager.d.ts","sourceRoot":"","sources":["../../src/clip-runtime/browser-profile-manager.ts"],"names":[],"mappings":"AAMA,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAG5F,KAAK,oBAAoB,GAAG,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EAAE,gBAAgB,GACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAInC,qEAAqE;YACvD,WAAW;YAWX,kBAAkB;YAYlB,kBAAkB;YAUlB,gBAAgB;YAOhB,oBAAoB;YAKpB,yBAAyB;YAezB,aAAa;YAWb,mBAAmB;IAqBjC;;;;;;;;;;;;OAYG;YACW,uBAAuB;IAiCrC,oFAAoF;YACtE,oBAAoB;YAuBpB,aAAa;YAsCb,qBAAqB;YAKrB,wBAAwB;YAQxB,kBAAkB;YAQlB,yBAAyB;IAqBvC,OAAO,CAAC,YAAY;YAON,WAAW;YAaX,YAAY;YAmBZ,kBAAkB;YAUlB,aAAa;YAUb,iBAAiB;YAsBjB,WAAW;YAmDX,IAAI;CA2BnB"}
|
|
@@ -321,10 +321,15 @@ export class BrowserProfileManager {
|
|
|
321
321
|
if (!isBrowserAccountInfoUnauthenticatedError(err)) {
|
|
322
322
|
if (!isBrowserAccountNotFoundError(err))
|
|
323
323
|
throw err;
|
|
324
|
+
// Resolve the proxy ONLY here, at the single account-creation choke point.
|
|
325
|
+
// A thrown resolve fails closed (no account rather than direct egress for a
|
|
326
|
+
// proxy-configured profile). bb-browser binds the proxy at account_create.
|
|
327
|
+
const proxy = this.opts.resolveProxy ? await this.opts.resolveProxy(account) : null;
|
|
324
328
|
await this.sendCommand({
|
|
325
329
|
method: 'account_create',
|
|
326
330
|
account,
|
|
327
331
|
...(accountUrl ? { accountUrl } : {}),
|
|
332
|
+
...proxyCreateFields(proxy),
|
|
328
333
|
});
|
|
329
334
|
accountCreated = true;
|
|
330
335
|
}
|
|
@@ -618,3 +623,15 @@ function resolveBbBrowserDaemonPath() {
|
|
|
618
623
|
function randomToken() {
|
|
619
624
|
return randomBytes(16).toString('hex');
|
|
620
625
|
}
|
|
626
|
+
/** Render a proxy config into bb-browser `account_create` fields (camelCase, the
|
|
627
|
+
* bb-browser-pro 0.15 contract). Empty when there is no proxy → direct egress. */
|
|
628
|
+
function proxyCreateFields(proxy) {
|
|
629
|
+
if (!proxy?.server)
|
|
630
|
+
return {};
|
|
631
|
+
const fields = { proxyServer: proxy.server };
|
|
632
|
+
if (proxy.username)
|
|
633
|
+
fields.proxyUsername = proxy.username;
|
|
634
|
+
if (proxy.password)
|
|
635
|
+
fields.proxyPassword = proxy.password;
|
|
636
|
+
return fields;
|
|
637
|
+
}
|
|
@@ -5,5 +5,6 @@ export { type ClipConfig, type ManifestCache, type CommandDetail, type ClipJson,
|
|
|
5
5
|
export { ClipProvider, type ClipProviderOptions } from './clip-provider.js';
|
|
6
6
|
export { HubClient, HubCommandError, type HubClientOptions, type ClipBinding, } from './hub-client.js';
|
|
7
7
|
export { BrowserProfileManager } from './browser-profile-manager.js';
|
|
8
|
+
export type { BrowserProxyConfig } from './browser-profile-manager.js';
|
|
8
9
|
export { installClip, removeClip, parseSource, type InstallOptions, type InstallResult, } from './clip-installer.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clip-runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,QAAQ,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACL,SAAS,EACT,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clip-runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,QAAQ,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACL,SAAS,EACT,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
|
package/dist/supervisor.d.ts
CHANGED
|
@@ -57,6 +57,17 @@ export declare class DaemonSupervisor {
|
|
|
57
57
|
private bootstrapWithRetry;
|
|
58
58
|
private fullReconcile;
|
|
59
59
|
private reconcileBrowserProfiles;
|
|
60
|
+
/**
|
|
61
|
+
* Resolve a profile's outbound proxy for bb-browser account creation (BYOC).
|
|
62
|
+
* Fetched fresh — account creation is rare (once per profile until reset), so a
|
|
63
|
+
* proxy edit applies on the next account_create. The mck_-authed machine list is
|
|
64
|
+
* the only path that carries proxy_password (for replay to bb-browser).
|
|
65
|
+
*
|
|
66
|
+
* Fails closed: a fetch failure or a vanished profile THROWS, so the manager never
|
|
67
|
+
* creates an account that would egress from the host's real IP for a
|
|
68
|
+
* proxy-configured profile (the caller reports `error` and retries next tick).
|
|
69
|
+
*/
|
|
70
|
+
private resolveBrowserProfileProxy;
|
|
60
71
|
/**
|
|
61
72
|
* Detects a legacy flat state layout (no agents/ subdir) and migrates it
|
|
62
73
|
* into the per-agent directory for the owning agent. Ownership is determined
|
package/dist/supervisor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../src/supervisor.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAeL,KAAK,YAAY,EAElB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../src/supervisor.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAeL,KAAK,YAAY,EAElB,MAAM,aAAa,CAAC;AAUrB,OAAO,EAKL,KAAK,kBAAkB,EAExB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiBlD;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO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E;IACnE,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA2L7C,sEAAsE;IAChE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YA8Cb,kBAAkB;YAwClB,aAAa;YA0Db,wBAAwB;IAkCtC;;;;;;;;;OASG;YACW,0BAA0B;IAkBxC;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;YA6CX,kBAAkB;YAqBlB,mBAAmB;YAgBnB,mBAAmB;YAmBnB,sBAAsB;YAwBtB,6BAA6B;IAoC3C,OAAO,CAAC,8BAA8B;IAMtC,OAAO,CAAC,uBAAuB;IAgB/B;;;;;OAKG;YACW,0BAA0B;IAiCxC,OAAO,CAAC,2BAA2B;YAIrB,cAAc;YAId,qBAAqB;YAgBrB,wBAAwB;IAoDtC,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,uBAAuB;IAyB/B,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,mBAAmB;YAab,mBAAmB;IAyCjC,OAAO,CAAC,wBAAwB;YAelB,6BAA6B;IAqC3C,OAAO,CAAC,2BAA2B;IAYnC,OAAO,CAAC,wBAAwB;YAUlB,oBAAoB;IAmClC;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IASpB;;;;;;;;OAQG;YACW,sBAAsB;YA4CtB,kBAAkB;YAYlB,eAAe;YAcf,UAAU;YAoBV,cAAc;IAkE5B,OAAO,CAAC,UAAU;YA4GJ,cAAc;IAyB5B,OAAO,CAAC,0BAA0B;CAkCnC"}
|
package/dist/supervisor.js
CHANGED
|
@@ -133,6 +133,7 @@ export class DaemonSupervisor {
|
|
|
133
133
|
.reportBrowserProfileStatus(profileId, status, errorMsg)
|
|
134
134
|
.catch((err) => this.log.warn(`browser profile status report failed: ${String(err)}`));
|
|
135
135
|
},
|
|
136
|
+
resolveProxy: (profileId) => this.resolveBrowserProfileProxy(profileId),
|
|
136
137
|
});
|
|
137
138
|
this.clipManager = new ClipProcessManager({
|
|
138
139
|
clipsDir: path.join(this.config.rootStateDir, 'clips'),
|
|
@@ -423,6 +424,30 @@ export class DaemonSupervisor {
|
|
|
423
424
|
}
|
|
424
425
|
}
|
|
425
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* Resolve a profile's outbound proxy for bb-browser account creation (BYOC).
|
|
429
|
+
* Fetched fresh — account creation is rare (once per profile until reset), so a
|
|
430
|
+
* proxy edit applies on the next account_create. The mck_-authed machine list is
|
|
431
|
+
* the only path that carries proxy_password (for replay to bb-browser).
|
|
432
|
+
*
|
|
433
|
+
* Fails closed: a fetch failure or a vanished profile THROWS, so the manager never
|
|
434
|
+
* creates an account that would egress from the host's real IP for a
|
|
435
|
+
* proxy-configured profile (the caller reports `error` and retries next tick).
|
|
436
|
+
*/
|
|
437
|
+
async resolveBrowserProfileProxy(profileId) {
|
|
438
|
+
const profiles = await this.client.listMachineBrowserProfiles();
|
|
439
|
+
const profile = profiles.find((p) => p.id === profileId);
|
|
440
|
+
if (!profile) {
|
|
441
|
+
throw new Error(`browser profile ${profileId} not found; refusing to create a bb-browser account without its proxy config`);
|
|
442
|
+
}
|
|
443
|
+
if (!profile.proxy_server)
|
|
444
|
+
return null;
|
|
445
|
+
return {
|
|
446
|
+
server: profile.proxy_server,
|
|
447
|
+
username: profile.proxy_username ?? undefined,
|
|
448
|
+
password: profile.proxy_password ?? undefined,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
426
451
|
// ---- Flat layout migration (self-hosted → daemon) ----
|
|
427
452
|
/**
|
|
428
453
|
* Detects a legacy flat state layout (no agents/ subdir) and migrates it
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/daemon",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.1",
|
|
4
4
|
"description": "Parall local agent runtime — daemon supervisor + bridge runtimes, bundled as standalone JS files",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@aws-sdk/client-s3": "3.984.0",
|
|
34
34
|
"@pinixai/bb-browser-pro": "0.15.0",
|
|
35
|
-
"@parall/sdk": "1.36.
|
|
36
|
-
"@parall/claude-agent": "1.36.
|
|
37
|
-
"@parall/
|
|
38
|
-
"@parall/agent
|
|
39
|
-
"@parall/
|
|
35
|
+
"@parall/sdk": "1.36.1",
|
|
36
|
+
"@parall/claude-agent": "1.36.1",
|
|
37
|
+
"@parall/agent-core": "1.36.1",
|
|
38
|
+
"@parall/codex-agent": "1.36.1",
|
|
39
|
+
"@parall/openclaw-agent": "1.36.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^22.0.0",
|