@andorra-labs/code 0.1.13 → 0.1.15

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.
Files changed (168) hide show
  1. package/dist/src/account-presentation.js +4 -1
  2. package/dist/src/acp-agent.d.ts +54 -0
  3. package/dist/src/acp-agent.js +991 -0
  4. package/dist/src/agent-execution.js +304 -140
  5. package/dist/src/agent-mcp-catalog.js +2 -0
  6. package/dist/src/agent-mcp.d.ts +2 -0
  7. package/dist/src/agent-mcp.js +86 -4
  8. package/dist/src/andorra/endpoint.d.ts +7 -0
  9. package/dist/src/andorra/endpoint.js +46 -0
  10. package/dist/src/andorra/entry.d.ts +21 -0
  11. package/dist/src/andorra/entry.js +118 -0
  12. package/dist/src/andorra/errors.d.ts +2 -0
  13. package/dist/src/andorra/errors.js +39 -0
  14. package/dist/src/andorra/hosted.d.ts +55 -0
  15. package/dist/src/andorra/hosted.js +130 -0
  16. package/dist/src/andorra/monitor.d.ts +151 -0
  17. package/dist/src/andorra/monitor.js +393 -0
  18. package/dist/src/andorra/notices.d.ts +16 -0
  19. package/dist/src/andorra/notices.js +38 -0
  20. package/dist/src/andorra/opt-in.d.ts +58 -0
  21. package/dist/src/andorra/opt-in.js +112 -0
  22. package/dist/src/andorra/request-watch.d.ts +6 -0
  23. package/dist/src/andorra/request-watch.js +10 -0
  24. package/dist/src/andorra/state.d.ts +86 -0
  25. package/dist/src/andorra/state.js +238 -0
  26. package/dist/src/andorra/terminal.d.ts +70 -0
  27. package/dist/src/andorra/terminal.js +125 -0
  28. package/dist/src/andorra/usage-format.d.ts +9 -0
  29. package/dist/src/andorra/usage-format.js +19 -0
  30. package/dist/src/anthropic-credentials.js +9 -1
  31. package/dist/src/app-server/protocol.d.ts +10 -2
  32. package/dist/src/app-server/protocol.js +1 -1
  33. package/dist/src/app-server/workspace.d.ts +1 -0
  34. package/dist/src/app-server/workspace.js +141 -10
  35. package/dist/src/app-server.d.ts +35 -0
  36. package/dist/src/app-server.js +377 -124
  37. package/dist/src/auth/AuthManager.d.ts +9 -0
  38. package/dist/src/auth/AuthManager.js +164 -24
  39. package/dist/src/auth/deployment.d.ts +1 -0
  40. package/dist/src/auth/deployment.js +1 -0
  41. package/dist/src/auth/index.d.ts +1 -1
  42. package/dist/src/auth/index.js +1 -1
  43. package/dist/src/auth/store.d.ts +26 -0
  44. package/dist/src/auth/store.js +34 -1
  45. package/dist/src/browser-bridge.d.ts +1 -0
  46. package/dist/src/browser-bridge.js +5 -2
  47. package/dist/src/browser-external-app.d.ts +27 -0
  48. package/dist/src/browser-external-app.js +60 -0
  49. package/dist/src/browser-panel-tool.d.ts +6 -0
  50. package/dist/src/browser-panel-tool.js +36 -0
  51. package/dist/src/browser-runner.js +1 -1
  52. package/dist/src/browser-server.d.ts +5 -0
  53. package/dist/src/browser-server.js +27 -3
  54. package/dist/src/browser-stealth.d.ts +19 -1
  55. package/dist/src/browser-stealth.js +23 -3
  56. package/dist/src/browser-ui/tokens.css +4 -4
  57. package/dist/src/browser-view.d.ts +81 -0
  58. package/dist/src/browser-view.js +289 -18
  59. package/dist/src/bug-report.d.ts +81 -0
  60. package/dist/src/bug-report.js +235 -0
  61. package/dist/src/claude-provider.d.ts +2 -1
  62. package/dist/src/claude-provider.js +10 -8
  63. package/dist/src/cli-sign-in.d.ts +3 -1
  64. package/dist/src/cli-sign-in.js +4 -1
  65. package/dist/src/cli.js +205 -58
  66. package/dist/src/coding-tools.js +7 -7
  67. package/dist/src/command-screens.d.ts +26 -3
  68. package/dist/src/command-screens.js +323 -85
  69. package/dist/src/commands.d.ts +7 -1
  70. package/dist/src/commands.js +79 -27
  71. package/dist/src/completion-gates.d.ts +22 -0
  72. package/dist/src/completion-gates.js +11 -0
  73. package/dist/src/config.d.ts +11 -1
  74. package/dist/src/config.js +134 -3
  75. package/dist/src/dashboard-view.d.ts +2 -0
  76. package/dist/src/dashboard-view.js +11 -2
  77. package/dist/src/decision/PreparedSteps.js +1 -1
  78. package/dist/src/decision/applyToolMenu.js +1 -1
  79. package/dist/src/decision/toolFamilies.js +1 -1
  80. package/dist/src/decision/types.d.ts +1 -0
  81. package/dist/src/google-provider.d.ts +31 -0
  82. package/dist/src/google-provider.js +153 -0
  83. package/dist/src/graph-health.d.ts +11 -0
  84. package/dist/src/graph-health.js +36 -4
  85. package/dist/src/graph-manager-chat.d.ts +33 -0
  86. package/dist/src/graph-manager-chat.js +165 -6
  87. package/dist/src/graph-runner.js +27 -0
  88. package/dist/src/graph-selection.js +2 -1
  89. package/dist/src/graph-sync.d.ts +1 -0
  90. package/dist/src/graph-sync.js +93 -34
  91. package/dist/src/graph-tool.d.ts +2 -0
  92. package/dist/src/graph-tool.js +2 -2
  93. package/dist/src/graph-ui/app.js +92 -10
  94. package/dist/src/graph-ui/edge-router.js +121 -53
  95. package/dist/src/graph-ui/manager.js +40 -5
  96. package/dist/src/graph-ui/style.css +5 -2
  97. package/dist/src/graph-ui/tokens.css +4 -4
  98. package/dist/src/graph-visibility.d.ts +31 -0
  99. package/dist/src/graph-visibility.js +102 -0
  100. package/dist/src/graphs.js +1 -3
  101. package/dist/src/hardened-runtime.js +1 -1
  102. package/dist/src/live-model.d.ts +24 -0
  103. package/dist/src/live-model.js +37 -0
  104. package/dist/src/managed-sign-in.d.ts +1 -0
  105. package/dist/src/managed-sign-in.js +13 -0
  106. package/dist/src/membership-errors.d.ts +2 -0
  107. package/dist/src/membership-errors.js +6 -2
  108. package/dist/src/membership.d.ts +13 -2
  109. package/dist/src/membership.js +39 -8
  110. package/dist/src/model-context-windows.d.ts +2 -0
  111. package/dist/src/model-context-windows.js +24 -0
  112. package/dist/src/model-health-cache.js +1 -1
  113. package/dist/src/model-metadata.d.ts +1 -0
  114. package/dist/src/model-metadata.js +47 -3
  115. package/dist/src/paged-transcript.d.ts +2 -0
  116. package/dist/src/paged-transcript.js +16 -0
  117. package/dist/src/palette.d.ts +1 -0
  118. package/dist/src/palette.js +1 -1
  119. package/dist/src/permissions.js +17 -4
  120. package/dist/src/provider-connection.js +32 -0
  121. package/dist/src/provider-engine.d.ts +5 -0
  122. package/dist/src/provider-engine.js +3 -3
  123. package/dist/src/provider-import.js +3 -1
  124. package/dist/src/provider-settings.d.ts +16 -1
  125. package/dist/src/provider-settings.js +50 -22
  126. package/dist/src/providers.d.ts +29 -3
  127. package/dist/src/providers.js +100 -18
  128. package/dist/src/react-runtime.js +33 -12
  129. package/dist/src/read-document-tool.d.ts +2 -0
  130. package/dist/src/read-document-tool.js +6 -6
  131. package/dist/src/remote/engine-pool.js +31 -6
  132. package/dist/src/run-control.d.ts +2 -2
  133. package/dist/src/run-control.js +9 -6
  134. package/dist/src/runtime-environment.d.ts +1 -0
  135. package/dist/src/runtime-environment.js +13 -0
  136. package/dist/src/runtime.d.ts +2 -0
  137. package/dist/src/runtime.js +2 -1
  138. package/dist/src/save-lock.js +14 -7
  139. package/dist/src/session-title.d.ts +3 -0
  140. package/dist/src/session-title.js +5 -2
  141. package/dist/src/sessions.d.ts +1 -0
  142. package/dist/src/sessions.js +4 -2
  143. package/dist/src/sign-in-detection.d.ts +1 -1
  144. package/dist/src/sign-in-detection.js +10 -3
  145. package/dist/src/sign-in-offer.js +1 -1
  146. package/dist/src/skill-commands.js +1 -1
  147. package/dist/src/skills/bundled/bug-report/SKILL.md +80 -0
  148. package/dist/src/skills/bundled/graph-manager/SKILL.md +9 -1
  149. package/dist/src/skills/bundled/graph-manager/errors.md +2 -1
  150. package/dist/src/skills/bundled/provenance.json +743 -738
  151. package/dist/src/skills/runtime-skills.js +1 -0
  152. package/dist/src/subagent-run.d.ts +2 -0
  153. package/dist/src/subagent-run.js +14 -3
  154. package/dist/src/telemetry/schema.d.ts +1 -1
  155. package/dist/src/telemetry/schema.js +2 -2
  156. package/dist/src/telemetry/uploader.d.ts +7 -1
  157. package/dist/src/telemetry/uploader.js +11 -2
  158. package/dist/src/terminal-links.d.ts +16 -0
  159. package/dist/src/terminal-links.js +113 -0
  160. package/dist/src/terminal-ui.d.ts +29 -1
  161. package/dist/src/terminal-ui.js +113 -24
  162. package/dist/src/tool-catalog.js +1 -1
  163. package/dist/src/trajectory.js +6 -1
  164. package/dist/src/transcript.d.ts +2 -0
  165. package/dist/src/transcript.js +5 -1
  166. package/dist/src/types.d.ts +5 -0
  167. package/dist/src/workspace-instructions.js +1 -1
  168. package/package.json +13 -1
@@ -9,7 +9,7 @@ import { join, resolve } from 'node:path';
9
9
  import { configDirectory, loadConfig } from './config.js';
10
10
  import { SessionWriteFence, SessionStore, sessionName, writeSessionSnapshot, removeSessionSnapshot, savedSessionFields, carryRailOwnedFields, primaryDigest, projectIdentity, validSavedSession } from './sessions.js';
11
11
  import { acquireSessionMutationLock, SessionMutationLockHeldError, sessionHasOpenRun } from './run-records.js';
12
- import { createBrowserBridge, validBrowserSession, browserAuthorized, browserBody, browserReply, discoverBrowserSessions, assertBrowserSessionUnowned } from './browser-bridge.js';
12
+ import { createBrowserBridge, validBrowserSession, browserBearerMatches, browserBody, browserReply, discoverBrowserSessions, assertBrowserSessionUnowned } from './browser-bridge.js';
13
13
  import { readSessionTrajectory } from './app-server/workspace.js';
14
14
  import { runBrowserTask } from './browser-runner.js';
15
15
  import { configuredSurface, reportSessionStarted } from './telemetry/surface.js';
@@ -659,7 +659,8 @@ export async function startBrowserServer(options = {}) {
659
659
  const server = createServer(async (req, res) => {
660
660
  try {
661
661
  const path = new URL(req.url || '/', origin).pathname;
662
- if (!req.headers.host || req.headers.host !== new URL(origin).host || req.headers.origin && req.headers.origin !== origin) {
662
+ const requestOrigin = loopbackRequestOrigin(req.headers.host);
663
+ if (!requestOrigin || req.headers.origin && req.headers.origin !== requestOrigin) {
663
664
  browserReply(res, 403, { error: 'Invalid origin' });
664
665
  return;
665
666
  }
@@ -674,7 +675,7 @@ export async function startBrowserServer(options = {}) {
674
675
  res.end(content);
675
676
  return;
676
677
  }
677
- if (!browserAuthorized(req, token, origin)) {
678
+ if (!browserBearerMatches(req, token)) {
678
679
  browserReply(res, 401, { error: 'Reopen using /browser.' });
679
680
  return;
680
681
  }
@@ -987,6 +988,29 @@ export async function startBrowserServer(options = {}) {
987
988
  throw failure.reason;
988
989
  } };
989
990
  }
991
+ // The origin a request addressed, when its Host header names this machine's loopback interface.
992
+ // A forwarded port (ssh -L, an editor's port forwarding) arrives as localhost or under another
993
+ // port, so neither the spelling nor the port is compared with the bound address. Refusing every
994
+ // other name is what stops DNS rebinding: a page on a hostile name that resolves here still sends
995
+ // its own name as Host.
996
+ export function loopbackRequestOrigin(host) {
997
+ if (!host || !/^(?:127\.0\.0\.1|localhost|\[::1\])(?::\d{1,5})?$/i.test(host))
998
+ return undefined;
999
+ return `http://${host.toLowerCase()}`;
1000
+ }
1001
+ // What /browser prints, and whether to launch a browser on this machine. Over SSH a browser
1002
+ // opened here is on the wrong computer, so the text explains how to reach the server instead.
1003
+ export function browserLaunch(url, environment = process.env) {
1004
+ if (!(environment.SSH_CONNECTION || environment.SSH_CLIENT || environment.SSH_TTY))
1005
+ return { text: `Andorra Browser: ${url}`, open: true };
1006
+ const port = new URL(url).port;
1007
+ return { open: false, text: [
1008
+ `Andorra Browser: ${url}`,
1009
+ 'This is an SSH session, so no browser was opened on this machine. The server listens only on this machine, so forward its port from your own computer, then open the address above there:',
1010
+ ` ssh -N -L ${port}:127.0.0.1:${port} <this host>`,
1011
+ 'The same address works with localhost in place of 127.0.0.1, and with a different local port if you forward to one.',
1012
+ ].join('\n') };
1013
+ }
990
1014
  export function openBrowserUrl(url) {
991
1015
  const command = process.platform === 'win32' ? 'rundll32.exe' : process.platform === 'darwin' ? 'open' : 'xdg-open';
992
1016
  execFile(command, process.platform === 'win32' ? ['url.dll,FileProtocolHandler', url] : [url], { windowsHide: true, timeout: 10000 }, error => { if (error)
@@ -6,11 +6,29 @@ export declare function stealthContextOptions(platform?: NodeJS.Platform): {
6
6
  userAgent: string;
7
7
  locale: string;
8
8
  };
9
- export declare function desktopUaOverride(platform?: NodeJS.Platform): {
9
+ export declare function desktopUaOverride(platform?: NodeJS.Platform, version?: string): {
10
10
  userAgent: string;
11
11
  acceptLanguage: string;
12
12
  platform: string;
13
13
  };
14
+ /**
15
+ * The client-hint (UA-CH) metadata Chromium itself would send for this browser.
16
+ * An Emulation.setUserAgentOverride without userAgentMetadata stops Chromium from
17
+ * sending Sec-CH-UA headers at all, so every override carries a matching set:
18
+ * the brand and major version mirror the real running browser and the platform
19
+ * mirrors the UA string, keeping UA and client hints consistent for bot checks.
20
+ */
21
+ export declare function userAgentMetadata(version: string | undefined, mobile?: boolean): {
22
+ brands: {
23
+ brand: string;
24
+ version: string;
25
+ }[];
26
+ mobile: boolean;
27
+ model: string;
28
+ platform: string;
29
+ platformVersion: string;
30
+ architecture: string;
31
+ };
14
32
  export declare function stealthInitScript(hardware?: {
15
33
  cores?: number;
16
34
  }): string;
@@ -20,8 +20,10 @@ const OS_PROFILES = {
20
20
  },
21
21
  };
22
22
  const osProfile = (platform = process.platform) => OS_PROFILES[platform === 'darwin' ? 'darwin' : platform === 'win32' ? 'win32' : 'linux'];
23
+ const safeVersion = (version) => (/^\d+(\.\d+)*$/.test(version) ? version : STEALTH_UA_VERSION);
24
+ const userAgentFor = (platform, version) => `Mozilla/5.0 (${osProfile(platform).uaPlatform}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${safeVersion(version)} Safari/537.36`;
23
25
  export function stealthUserAgent(platform = process.platform) {
24
- return `Mozilla/5.0 (${osProfile(platform).uaPlatform}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${STEALTH_UA_VERSION} Safari/537.36`;
26
+ return userAgentFor(platform, STEALTH_UA_VERSION);
25
27
  }
26
28
  export function stealthLaunchArgs() {
27
29
  return ['--disable-blink-features=AutomationControlled'];
@@ -29,9 +31,27 @@ export function stealthLaunchArgs() {
29
31
  export function stealthContextOptions(platform = process.platform) {
30
32
  return { userAgent: stealthUserAgent(platform), locale: STEALTH_LOCALE };
31
33
  }
32
- export function desktopUaOverride(platform = process.platform) {
34
+ export function desktopUaOverride(platform = process.platform, version = STEALTH_UA_VERSION) {
33
35
  const profile = osProfile(platform);
34
- return { userAgent: stealthUserAgent(platform), acceptLanguage: STEALTH_ACCEPT_LANGUAGE, platform: profile.cdpPlatform };
36
+ return { userAgent: userAgentFor(platform, version), acceptLanguage: STEALTH_ACCEPT_LANGUAGE, platform: profile.cdpPlatform };
37
+ }
38
+ /**
39
+ * The client-hint (UA-CH) metadata Chromium itself would send for this browser.
40
+ * An Emulation.setUserAgentOverride without userAgentMetadata stops Chromium from
41
+ * sending Sec-CH-UA headers at all, so every override carries a matching set:
42
+ * the brand and major version mirror the real running browser and the platform
43
+ * mirrors the UA string, keeping UA and client hints consistent for bot checks.
44
+ */
45
+ export function userAgentMetadata(version, mobile = false) {
46
+ const major = (typeof version === 'string' && /^\d+/.test(version) ? version : STEALTH_UA_VERSION).split('.')[0];
47
+ return {
48
+ brands: [{ brand: 'Chromium', version: major }, { brand: 'Not:A-Brand', version: '99' }],
49
+ mobile,
50
+ model: mobile ? 'Pixel 8' : '',
51
+ platform: mobile ? 'Android' : process.platform === 'darwin' ? 'macOS' : process.platform === 'win32' ? 'Windows' : 'Linux',
52
+ platformVersion: mobile ? '14' : '10.0.0',
53
+ architecture: mobile ? '' : 'x86',
54
+ };
35
55
  }
36
56
  const clampCores = (cores) => Math.min(Math.max(cores || 8, 2), 16);
37
57
  const PAGE_SCRIPT = `(cfg => {
@@ -47,8 +47,8 @@
47
47
  --accent-hover: #ffffff; --accent-ring: rgba(245,245,245,.36);
48
48
  --accent-fill: #1372da; --accent-fill-hover: #2a7fdd; --on-accent-fill: #f5f5f5;
49
49
  --accent-text: #71aeff; --focus: #1f87fc;
50
- --ok: #2f9e6a; --err: #e5484d; --warn: #c9c9c9;
51
- --ok-text: #7cc79a; --err-text: #f47174; --warn-text: #ececec; --merged-text: #bba4f2;
50
+ --ok: #2f9e6a; --err: #e5484d; --warn: #c9c9c9; --caution: #d9a520; --caution-text: #f2c94c;
51
+ --ok-text: #7cc79a; --err-text: #f47174; --warn-text: #ececec; --merged-text: #bba4f2; --draft-text: #f0a35e;
52
52
  --skill: #aab8ff; --skill-wash: rgba(120,140,255,.18);
53
53
  --ok-wash: rgba(47,158,106,.14); --err-wash: rgba(229,72,77,.14); --merged-wash: rgba(142,110,224,.14);
54
54
  --add-wash: rgba(47,158,106,.16); --del-wash: rgba(229,72,77,.16);
@@ -94,8 +94,8 @@
94
94
  --accent-hover: #333333; --accent-ring: rgba(28,28,28,.48);
95
95
  --accent-fill: #1680f3; --accent-fill-hover: #1776dd; --on-accent-fill: #ffffff;
96
96
  --accent-text: #0b6dd3; --focus: #1680f3;
97
- --ok: #3d7a5c; --err: #d13438; --warn: #45464b;
98
- --ok-text: #36704f; --err-text: #c4262e; --warn-text: #1c1c1c; --merged-text: #6a4fc4;
97
+ --ok: #3d7a5c; --err: #d13438; --warn: #45464b; --caution: #b8860b; --caution-text: #8a6100;
98
+ --ok-text: #36704f; --err-text: #c4262e; --warn-text: #1c1c1c; --merged-text: #6a4fc4; --draft-text: #b35a0e;
99
99
  --skill: #3b4fc4; --skill-wash: rgba(59,79,196,.10);
100
100
  --ok-wash: rgba(61,122,92,.08); --err-wash: rgba(209,52,56,.08); --merged-wash: rgba(106,79,196,.08);
101
101
  --add-wash: rgba(61,122,92,.14); --del-wash: rgba(209,52,56,.13);
@@ -1,3 +1,4 @@
1
+ import { type ExternalAppPrompt } from './browser-external-app.js';
1
2
  import type { ImportedCookie } from './firefox-cookies.js';
2
3
  import type { ExtensionStatus } from './browser-extensions.js';
3
4
  export type BrowserViewChannel = 'chromium' | 'msedge' | 'chrome';
@@ -12,6 +13,7 @@ export interface BrowserViewTab {
12
13
  url: string;
13
14
  title: string;
14
15
  loading: boolean;
16
+ appPrompt?: ExternalAppPrompt;
15
17
  }
16
18
  export declare const VIEW_TAB_LIMIT = 6;
17
19
  export declare const VIEW_SESSION_LIMIT = 4;
@@ -34,6 +36,28 @@ export declare function nextFrameBudget(budget: {
34
36
  size: number;
35
37
  } | undefined;
36
38
  export declare const VIEW_MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Mobile Safari/537.36";
39
+ /**
40
+ * The panel browses with a real headed window so sites score it as a browser and
41
+ * not a bot, but the window is parked far offscreen: the pane shows the page by
42
+ * screencasting it, so the window does not need to be on screen or in the way.
43
+ * -32000 is the standard spot that Windows, macOS and Linux all keep off the
44
+ * visible desktop without clamping back.
45
+ */
46
+ export declare const VIEW_OFFSCREEN_POSITION: {
47
+ readonly left: -32000;
48
+ readonly top: -32000;
49
+ };
50
+ /** Where the window goes when the user asks to see it. */
51
+ export declare const VIEW_ONSCREEN_POSITION: {
52
+ readonly left: 80;
53
+ readonly top: 80;
54
+ };
55
+ /**
56
+ * The mobile emulation override is built from the running browser's real version,
57
+ * so the page never sees a version the browser itself does not have. Without a
58
+ * readable version the old constant stays the fallback.
59
+ */
60
+ export declare function mobileUserAgent(version: string | undefined): string;
37
61
  export declare function browserViewUrl(value: string): string;
38
62
  export declare function clampViewport(width: unknown, height: unknown): {
39
63
  width: number;
@@ -55,6 +79,14 @@ export declare const MODIFIER_BITS: Record<string, number>;
55
79
  export declare function modifierMask(modifiers: unknown): number;
56
80
  export declare function macEditingCommands(key: string, modifiers: number): string[];
57
81
  export declare function viewLaunchOptions(channel: BrowserViewChannel, executablePath: string, scale?: number, extensionPaths?: string[]): Record<string, unknown>;
82
+ /**
83
+ * The options the panel actually launches with: the stealth launch options above,
84
+ * but headed, with the real window parked offscreen. A real window is what bot
85
+ * checks (Cloudflare's managed challenge among them) look for; the pane shows the
86
+ * page by screencasting it, so the window does not have to be visible or in the
87
+ * way. parkWindow re-asserts the offscreen position after the launch.
88
+ */
89
+ export declare function headedViewLaunchOptions(channel: BrowserViewChannel, executablePath: string, scale?: number, extensionPaths?: string[]): Record<string, unknown>;
58
90
  export declare function frameGate(now: number, lastEmittedAt: number | undefined, minIntervalMs: number): boolean;
59
91
  export declare function channelCandidate(channel: BrowserViewChannel, platform: NodeJS.Platform, chromiumExecutable: () => string): string | undefined;
60
92
  export type BrowserViewProfileKind = 'project' | 'incognito' | 'isolated';
@@ -113,6 +145,39 @@ export declare class BrowserViewManager {
113
145
  private launch;
114
146
  private launchPersistent;
115
147
  private reportLoaded;
148
+ /**
149
+ * Re-assert the offscreen position over the browser-level CDP connection after
150
+ * the launch. --window-position already asks for it at startup; this second
151
+ * pass catches window managers that clamp the window back on screen (macOS has
152
+ * done so with very large negative coordinates).
153
+ */
154
+ private parkWindow;
155
+ /**
156
+ * Finds the id of the window that should be moved. The precise way is the target
157
+ * id of the tab the user is looking at; without one the browser target itself has
158
+ * no web contents to look a window up with, so the newest page target is used.
159
+ */
160
+ private windowIdFor;
161
+ private lookupWindowId;
162
+ private browserFor;
163
+ private browserCdpFor;
164
+ showWindow(sessionId: string): Promise<void>;
165
+ hideWindow(sessionId: string): Promise<void>;
166
+ /**
167
+ * Whether the native window holding this tab is on the user's screen right now.
168
+ * Sessions of one project share a window, so one session can hide what another
169
+ * showed; the window's own bounds are the only record that stays true.
170
+ */
171
+ private windowOnScreen;
172
+ /**
173
+ * An app link got past the in-page guard. With the window on screen the user can
174
+ * see the browser's prompt; otherwise the tab is flagged so the panel and the
175
+ * agent are told why it stopped responding.
176
+ */
177
+ private flagAppPrompt;
178
+ /** What to tell the agent when a tab may be stuck behind the browser's "Open app?" prompt. */
179
+ appPromptNote(sessionId: string, tabId?: string): string | undefined;
180
+ private moveWindow;
116
181
  restartForExtensions(force?: boolean): Promise<{
117
182
  restarted: number;
118
183
  pending: string[];
@@ -130,6 +195,13 @@ export declare class BrowserViewManager {
130
195
  private armRestartPoll;
131
196
  private restartProfile;
132
197
  private acquireProfile;
198
+ /**
199
+ * Closes the blank pages a persistent launch was left holding, once the profile
200
+ * has at least one real page: under a headed launch the initial about:blank is
201
+ * the only tab of the real window, and closing it while it is alone destroys the
202
+ * window, so the blanks are held until a real page keeps the window alive.
203
+ */
204
+ private drainPendingBlanks;
133
205
  private claimExtensionPage;
134
206
  private claimUnclaimed;
135
207
  private releaseProfile;
@@ -145,6 +217,15 @@ export declare class BrowserViewManager {
145
217
  private showTab;
146
218
  private applyViewportMode;
147
219
  private queueViewportMode;
220
+ private browserVersion;
221
+ /**
222
+ * The desktop override after mobile emulation: built from the real running
223
+ * browser version when it is readable, falling back to the stealth version when
224
+ * it is not. A desktop UA carrying a version the running browser does not have
225
+ * is exactly what fingerprinting checks catch, so the real one wins whenever it
226
+ * is available.
227
+ */
228
+ private applyDesktopIdentity;
148
229
  private emitFrame;
149
230
  private startScreencast;
150
231
  private shrinkStream;