@bastani/atomic 0.9.28-alpha.3 → 0.9.28-alpha.5
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/CHANGELOG.md +39 -0
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +3 -2
- package/dist/builtin/intercom/broker/broker.ts +90 -14
- package/dist/builtin/intercom/broker/paths.ts +4 -0
- package/dist/builtin/intercom/broker/socket-liveness.ts +32 -0
- package/dist/builtin/intercom/broker/socket-replacement-lock.ts +104 -0
- package/dist/builtin/intercom/broker/spawn.ts +108 -63
- package/dist/builtin/intercom/index.bundle.mjs +114 -61
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/skills/agent-browser/SKILL.md +1 -1
- package/dist/builtin/subagents/skills/cua-driver/BROWSER.md +60 -39
- package/dist/builtin/subagents/skills/cua-driver/EMBEDDING.md +119 -36
- package/dist/builtin/subagents/skills/cua-driver/LINUX.md +225 -183
- package/dist/builtin/subagents/skills/cua-driver/MACOS.md +120 -89
- package/dist/builtin/subagents/skills/cua-driver/README.md +16 -7
- package/dist/builtin/subagents/skills/cua-driver/RECORDING.md +85 -115
- package/dist/builtin/subagents/skills/cua-driver/RUNTIME.md +113 -0
- package/dist/builtin/subagents/skills/cua-driver/SKILL.md +55 -1071
- package/dist/builtin/subagents/skills/cua-driver/VISUAL.md +125 -0
- package/dist/builtin/subagents/skills/cua-driver/WINDOWS.md +145 -185
- package/dist/builtin/subagents/skills/cua-driver/WORKFLOW.md +173 -0
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +16 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/builtin/{chunk-aqv8ny38.js → chunk-9ywkdsa9.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-p6jagvyf.js → chunk-bnz4knhy.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-br4ac9a3.js → chunk-dx5sjaxe.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-p3xmajmj.js → chunk-v4scsq3y.js} +41 -13
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/impeccable/SKILL.md +8 -2
- package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +6 -0
- package/dist/builtin/workflows/skills/impeccable/reference/audit.md +2 -1
- package/dist/builtin/workflows/skills/impeccable/reference/component-review.md +63 -0
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/asset-producer.md +5 -0
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/finish-reviewer.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/generate.md +101 -0
- package/dist/builtin/workflows/skills/impeccable/reference/harden.md +9 -0
- package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +3 -1
- package/dist/builtin/workflows/skills/impeccable/reference/mode-operate.md +21 -0
- package/dist/builtin/workflows/skills/impeccable/reference/mode-persuade.md +19 -0
- package/dist/builtin/workflows/skills/impeccable/reference/mode-read.md +21 -0
- package/dist/builtin/workflows/skills/impeccable/reference/new-work.md +19 -12
- package/dist/builtin/workflows/skills/impeccable/reference/region-map.md +26 -0
- package/dist/builtin/workflows/skills/impeccable/reference/routing.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/visualize.md +5 -5
- package/dist/builtin/workflows/skills/impeccable/scripts/VERSION +1 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/command-metadata.json +4 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/impeccable.cmd +2 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-session.js +5 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +524 -4
- package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +1 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_haiku_5_5.md +81 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +38 -14
- package/dist/builtin/workflows/src/index.js +38 -14
- package/dist/cli/startup-ui.d.ts +3 -2
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +19 -4
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/codemode-worker.js +2 -2
- package/dist/core/agent-session-compaction.d.ts +3 -3
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +5 -1
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +1 -0
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +4 -0
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +6 -1
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +3 -2
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +5 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +13 -9
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +1 -0
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +2 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/agent-events.d.ts +2 -0
- package/dist/core/extensions/agent-events.d.ts.map +1 -1
- package/dist/core/extensions/agent-events.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +2 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/mcp-server-registry.d.ts +4 -1
- package/dist/core/extensions/mcp-server-registry.d.ts.map +1 -1
- package/dist/core/extensions/mcp-server-registry.js +7 -4
- package/dist/core/extensions/mcp-server-registry.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +19 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/session-events.d.ts +2 -0
- package/dist/core/extensions/session-events.d.ts.map +1 -1
- package/dist/core/extensions/session-events.js.map +1 -1
- package/dist/core/extensions/tool-types.d.ts +2 -0
- package/dist/core/extensions/tool-types.d.ts.map +1 -1
- package/dist/core/extensions/tool-types.js.map +1 -1
- package/dist/core/fast-model-variants.d.ts.map +1 -1
- package/dist/core/fast-model-variants.js +3 -2
- package/dist/core/fast-model-variants.js.map +1 -1
- package/dist/core/model-resolver-defaults.d.ts.map +1 -1
- package/dist/core/model-resolver-defaults.js +2 -0
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +1 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -1
- package/dist/core/nested-tool-calls.js +1 -0
- package/dist/core/nested-tool-calls.js.map +1 -1
- package/dist/core/provider-alias.d.ts.map +1 -1
- package/dist/core/provider-alias.js +8 -0
- package/dist/core/provider-alias.js.map +1 -1
- package/dist/core/provider-composer-internal.d.ts.map +1 -1
- package/dist/core/provider-composer-internal.js +6 -3
- package/dist/core/provider-composer-internal.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +1 -0
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/resource-loader-types.d.ts +1 -0
- package/dist/core/resource-loader-types.d.ts.map +1 -1
- package/dist/core/resource-loader-types.js.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +7 -3
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.js +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +55 -7
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/index.d.ts.map +1 -1
- package/dist/extensions/codemode/index.js +7 -0
- package/dist/extensions/codemode/index.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +2 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +2 -0
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/herdr/index.d.ts.map +1 -1
- package/dist/extensions/herdr/index.js +20 -2
- package/dist/extensions/herdr/index.js.map +1 -1
- package/dist/extensions/herdr/pane-owner.d.ts +7 -0
- package/dist/extensions/herdr/pane-owner.d.ts.map +1 -1
- package/dist/extensions/herdr/pane-owner.js +53 -11
- package/dist/extensions/herdr/pane-owner.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main-deferred-startup.d.ts +8 -0
- package/dist/main-deferred-startup.d.ts.map +1 -1
- package/dist/main-deferred-startup.js +6 -0
- package/dist/main-deferred-startup.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +11 -3
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +5 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +17 -14
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +5 -2
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +1 -0
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +19 -8
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.d.ts +3 -2
- package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.js +7 -4
- package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +3 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +8 -2
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +5 -2
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +4 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +10 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +3 -1
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +6 -0
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js +2 -2
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js +2 -2
- package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-dialogs.js +19 -2
- package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +4 -0
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +7 -0
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +2 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
- package/dist/modes/interactive/interactive-process-lifecycle.js +1 -1
- package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +7 -5
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +8 -1
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +1 -0
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-startup-trust.d.ts +6 -0
- package/dist/modes/interactive/interactive-startup-trust.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-startup-trust.js +15 -0
- package/dist/modes/interactive/interactive-startup-trust.js.map +1 -0
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +4 -0
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/program-status-reporter.d.ts +24 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
- package/dist/modes/interactive/program-status-reporter.js +96 -0
- package/dist/modes/interactive/program-status-reporter.js.map +1 -0
- package/dist/modes/interactive-engine/engine-child-liveness.d.ts +1 -0
- package/dist/modes/interactive-engine/engine-child-liveness.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-child-liveness.js +15 -1
- package/dist/modes/interactive-engine/engine-child-liveness.js.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.js +1 -0
- package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
- package/dist/modes/interactive-engine/engine-monitor.d.ts +4 -0
- package/dist/modes/interactive-engine/engine-monitor.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-monitor.js +17 -0
- package/dist/modes/interactive-engine/engine-monitor.js.map +1 -1
- package/dist/modes/interactive-engine/engine-quit-intent.d.ts +16 -0
- package/dist/modes/interactive-engine/engine-quit-intent.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-quit-intent.js +27 -0
- package/dist/modes/interactive-engine/engine-quit-intent.js.map +1 -0
- package/dist/modes/interactive-engine/engine-render-service.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-render-service.js +3 -1
- package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +1 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.js +5 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +4 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +19 -2
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts +19 -1
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +7 -0
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/dist/modes/interactive-engine/remote-renderer.d.ts +3 -0
- package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-renderer.js +7 -0
- package/dist/modes/interactive-engine/remote-renderer.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +11 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +42 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-input-scheduler.js +2 -2
- package/dist/modes/rpc/rpc-input-scheduler.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +23 -6
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.js +1 -1
- package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
- package/docs/codemode.md +10 -6
- package/docs/compaction.md +1 -1
- package/docs/computer-use.md +9 -9
- package/docs/custom-provider/streaming.md +4 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions/api-reference.md +1 -1
- package/docs/extensions/authoring.md +2 -0
- package/docs/extensions/events.md +8 -1
- package/docs/getting-started/first-session.md +1 -1
- package/docs/herdr.md +11 -2
- package/docs/json.md +6 -1
- package/docs/models/evals.md +34 -3
- package/docs/models.md +1 -1
- package/docs/providers.md +10 -0
- package/docs/sdk.md +8 -2
- package/docs/settings.md +2 -2
- package/docs/skills.md +1 -1
- package/docs/terminal-setup.md +14 -0
- package/docs/workflows/authoring.md +3 -3
- package/examples/extensions/sandbox/package-lock.json +3 -3
- package/npm-shrinkwrap.json +67 -67
- package/package.json +8 -8
|
@@ -1406,13 +1406,43 @@ var init_client = __esm(() => {
|
|
|
1406
1406
|
};
|
|
1407
1407
|
});
|
|
1408
1408
|
|
|
1409
|
+
// dist/builtin/intercom/broker/socket-liveness.ts
|
|
1410
|
+
import net2 from "net";
|
|
1411
|
+
function isSocketAnswering(socketPath, timeoutMs = SOCKET_PROBE_TIMEOUT_MS) {
|
|
1412
|
+
return new Promise((resolve) => {
|
|
1413
|
+
const socket = net2.connect(socketPath);
|
|
1414
|
+
const finish = (isConnected) => {
|
|
1415
|
+
clearTimeout(timeout);
|
|
1416
|
+
socket.off("connect", onConnect);
|
|
1417
|
+
socket.off("error", onError);
|
|
1418
|
+
resolve(isConnected);
|
|
1419
|
+
};
|
|
1420
|
+
const onConnect = () => {
|
|
1421
|
+
socket.on("error", () => {});
|
|
1422
|
+
socket.end();
|
|
1423
|
+
finish(true);
|
|
1424
|
+
};
|
|
1425
|
+
const onError = () => {
|
|
1426
|
+
socket.destroy();
|
|
1427
|
+
finish(false);
|
|
1428
|
+
};
|
|
1429
|
+
socket.on("connect", onConnect);
|
|
1430
|
+
socket.on("error", onError);
|
|
1431
|
+
const timeout = setTimeout(() => {
|
|
1432
|
+
socket.destroy();
|
|
1433
|
+
finish(false);
|
|
1434
|
+
}, timeoutMs);
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
var SOCKET_PROBE_TIMEOUT_MS = 1000;
|
|
1438
|
+
var init_socket_liveness = () => {};
|
|
1439
|
+
|
|
1409
1440
|
// dist/builtin/intercom/broker/spawn.ts
|
|
1410
1441
|
import { spawn } from "child_process";
|
|
1411
|
-
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
1442
|
+
import { appendFileSync, chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
1412
1443
|
import { join as join2, dirname } from "path";
|
|
1413
1444
|
import { fileURLToPath } from "url";
|
|
1414
1445
|
import { createRequire } from "module";
|
|
1415
|
-
import net2 from "net";
|
|
1416
1446
|
import { createChildProcessEnvironment, isBunBinary } from "@bastani/atomic";
|
|
1417
1447
|
function isIntercomPackageRoot(dir) {
|
|
1418
1448
|
return existsSync(join2(dir, "package.json")) && existsSync(join2(dir, "broker"));
|
|
@@ -1537,7 +1567,15 @@ function getBrokerSpawnOptions(extensionDir = EXTENSION_DIR, stderr = "ignore")
|
|
|
1537
1567
|
}
|
|
1538
1568
|
function resetBrokerLog(logPath = BROKER_LOG) {
|
|
1539
1569
|
ensurePrivateDirectory(dirname(logPath));
|
|
1540
|
-
|
|
1570
|
+
try {
|
|
1571
|
+
closeSync(openSync(logPath, "w"));
|
|
1572
|
+
return true;
|
|
1573
|
+
} catch (error) {
|
|
1574
|
+
const code = error.code;
|
|
1575
|
+
if (process.platform === "win32" && (code === "EBUSY" || code === "EPERM"))
|
|
1576
|
+
return false;
|
|
1577
|
+
throw error;
|
|
1578
|
+
}
|
|
1541
1579
|
}
|
|
1542
1580
|
function readBrokerLogTail(logPath = BROKER_LOG, maxBytes = BROKER_LOG_TAIL_BYTES) {
|
|
1543
1581
|
let fd;
|
|
@@ -1571,16 +1609,17 @@ ${tail}`;
|
|
|
1571
1609
|
function toError2(error) {
|
|
1572
1610
|
return error instanceof Error ? error : new Error(String(error));
|
|
1573
1611
|
}
|
|
1574
|
-
async function spawnBrokerIfNeeded(brokerCommand, brokerArgs) {
|
|
1612
|
+
async function spawnBrokerIfNeeded(brokerCommand, brokerArgs, readyTimeoutMs = BROKER_READY_TIMEOUT_MS) {
|
|
1575
1613
|
ensurePrivateDirectory(INTERCOM_DIR);
|
|
1576
1614
|
if (await isBrokerRunning()) {
|
|
1577
1615
|
return;
|
|
1578
1616
|
}
|
|
1579
|
-
const
|
|
1580
|
-
if (
|
|
1581
|
-
await waitForBroker();
|
|
1617
|
+
const lockOwner = acquireSpawnLock();
|
|
1618
|
+
if (lockOwner === undefined) {
|
|
1619
|
+
await waitForBroker(readyTimeoutMs);
|
|
1582
1620
|
return;
|
|
1583
1621
|
}
|
|
1622
|
+
let keepLock = false;
|
|
1584
1623
|
try {
|
|
1585
1624
|
if (await isBrokerRunning()) {
|
|
1586
1625
|
return;
|
|
@@ -1590,7 +1629,10 @@ async function spawnBrokerIfNeeded(brokerCommand, brokerArgs) {
|
|
|
1590
1629
|
if (launch.kind === "windows-launcher") {
|
|
1591
1630
|
writeWindowsHiddenLauncher(launch.launcherCommandLine, launch.launcherPath);
|
|
1592
1631
|
}
|
|
1593
|
-
resetBrokerLog()
|
|
1632
|
+
if (!resetBrokerLog()) {
|
|
1633
|
+
await waitForBroker(readyTimeoutMs);
|
|
1634
|
+
return;
|
|
1635
|
+
}
|
|
1594
1636
|
const logFd = launch.kind === "direct" ? openSync(BROKER_LOG, "a") : undefined;
|
|
1595
1637
|
let child;
|
|
1596
1638
|
try {
|
|
@@ -1620,21 +1662,28 @@ ${describeBrokerLog()}`, { cause: error }));
|
|
|
1620
1662
|
${describeBrokerLog()}`));
|
|
1621
1663
|
return;
|
|
1622
1664
|
}
|
|
1623
|
-
|
|
1624
|
-
${describeBrokerLog()}`)
|
|
1665
|
+
const exitedBeforeStartup = () => new Error(`Intercom broker exited before startup with code ${code ?? "unknown"}
|
|
1666
|
+
${describeBrokerLog()}`);
|
|
1667
|
+
if (code === 0) {
|
|
1668
|
+
checkSocketConnectable().then((answering) => answering ? resolve() : reject(exitedBeforeStartup()));
|
|
1669
|
+
return;
|
|
1670
|
+
}
|
|
1671
|
+
reject(exitedBeforeStartup());
|
|
1625
1672
|
};
|
|
1626
1673
|
child.once("error", onError);
|
|
1627
1674
|
child.once("exit", onExit);
|
|
1628
|
-
waitForBroker().then(() => {
|
|
1675
|
+
waitForBroker(readyTimeoutMs).then(() => {
|
|
1629
1676
|
cleanup();
|
|
1630
1677
|
resolve();
|
|
1631
1678
|
}, (error) => {
|
|
1632
1679
|
cleanup();
|
|
1680
|
+
keepLock = launch.kind === "direct" && child.exitCode === null && child.signalCode === null && handSpawnLockToBroker(child.pid, lockOwner);
|
|
1633
1681
|
reject(toError2(error));
|
|
1634
1682
|
});
|
|
1635
1683
|
});
|
|
1636
1684
|
} finally {
|
|
1637
|
-
|
|
1685
|
+
if (!keepLock)
|
|
1686
|
+
releaseSpawnLock(lockOwner);
|
|
1638
1687
|
}
|
|
1639
1688
|
}
|
|
1640
1689
|
async function isBrokerRunning() {
|
|
@@ -1654,39 +1703,35 @@ async function isBrokerRunning() {
|
|
|
1654
1703
|
}
|
|
1655
1704
|
}
|
|
1656
1705
|
function checkSocketConnectable() {
|
|
1657
|
-
return
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
const timeout = setTimeout(() => {
|
|
1677
|
-
socket.destroy();
|
|
1678
|
-
finish(false);
|
|
1679
|
-
}, 1000);
|
|
1680
|
-
});
|
|
1706
|
+
return isSocketAnswering(BROKER_SOCKET2);
|
|
1707
|
+
}
|
|
1708
|
+
function handSpawnLockToBroker(pid, owner) {
|
|
1709
|
+
if (pid === undefined || !ownsSpawnLock(owner))
|
|
1710
|
+
return false;
|
|
1711
|
+
try {
|
|
1712
|
+
appendFileSync(BROKER_SPAWN_LOCK, `${pid}
|
|
1713
|
+
`);
|
|
1714
|
+
return true;
|
|
1715
|
+
} catch {
|
|
1716
|
+
return false;
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
function ownsSpawnLock(owner, lockPath = BROKER_SPAWN_LOCK) {
|
|
1720
|
+
try {
|
|
1721
|
+
return readFileSync(lockPath, "utf-8").startsWith(owner);
|
|
1722
|
+
} catch {
|
|
1723
|
+
return false;
|
|
1724
|
+
}
|
|
1681
1725
|
}
|
|
1682
1726
|
function acquireSpawnLock() {
|
|
1683
1727
|
const maxRetries = 5;
|
|
1684
1728
|
for (let attempt = 0;attempt < maxRetries; attempt++) {
|
|
1685
|
-
|
|
1686
|
-
writeFileSync(BROKER_SPAWN_LOCK, `${process.pid}
|
|
1729
|
+
const owner = `${process.pid}
|
|
1687
1730
|
${Date.now()}
|
|
1688
|
-
|
|
1689
|
-
|
|
1731
|
+
`;
|
|
1732
|
+
try {
|
|
1733
|
+
writeFileSync(BROKER_SPAWN_LOCK, owner, { flag: "wx" });
|
|
1734
|
+
return owner;
|
|
1690
1735
|
} catch (error) {
|
|
1691
1736
|
if (!(error instanceof Error) || error.code !== "EEXIST") {
|
|
1692
1737
|
throw error;
|
|
@@ -1697,39 +1742,46 @@ ${Date.now()}
|
|
|
1697
1742
|
} catch {}
|
|
1698
1743
|
continue;
|
|
1699
1744
|
}
|
|
1700
|
-
return
|
|
1745
|
+
return;
|
|
1701
1746
|
}
|
|
1702
1747
|
}
|
|
1703
|
-
return
|
|
1748
|
+
return;
|
|
1704
1749
|
}
|
|
1705
|
-
function
|
|
1706
|
-
|
|
1750
|
+
function isProcessAlive(pid) {
|
|
1751
|
+
try {
|
|
1752
|
+
process.kill(pid, 0);
|
|
1753
|
+
return true;
|
|
1754
|
+
} catch (error) {
|
|
1755
|
+
return error.code === "EPERM";
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
function isSpawnLockStale(lockPath = BROKER_SPAWN_LOCK, nowMs = Date.now()) {
|
|
1759
|
+
if (!existsSync(lockPath)) {
|
|
1707
1760
|
return false;
|
|
1708
1761
|
}
|
|
1709
1762
|
try {
|
|
1710
|
-
const [
|
|
1763
|
+
const [spawnerLine = "", createdAtLine = "", brokerLine = ""] = readFileSync(lockPath, "utf-8").trim().split(`
|
|
1711
1764
|
`);
|
|
1712
|
-
const
|
|
1765
|
+
const spawnerPid = Number.parseInt(spawnerLine, 10);
|
|
1713
1766
|
const createdAt = Number.parseInt(createdAtLine, 10);
|
|
1714
|
-
const
|
|
1715
|
-
if (Number.isFinite(
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
return !Number.isFinite(createdAt) || ageMs > 1e4;
|
|
1767
|
+
const brokerPid = Number.parseInt(brokerLine, 10);
|
|
1768
|
+
if (!Number.isFinite(spawnerPid) || !Number.isFinite(createdAt))
|
|
1769
|
+
return true;
|
|
1770
|
+
if (nowMs - createdAt > BROKER_SPAWN_LOCK_MAX_AGE_MS)
|
|
1771
|
+
return true;
|
|
1772
|
+
return !isProcessAlive(Number.isFinite(brokerPid) ? brokerPid : spawnerPid);
|
|
1723
1773
|
} catch {
|
|
1724
1774
|
return true;
|
|
1725
1775
|
}
|
|
1726
1776
|
}
|
|
1727
|
-
function releaseSpawnLock() {
|
|
1777
|
+
function releaseSpawnLock(owner, lockPath = BROKER_SPAWN_LOCK) {
|
|
1778
|
+
if (!ownsSpawnLock(owner, lockPath))
|
|
1779
|
+
return;
|
|
1728
1780
|
try {
|
|
1729
|
-
unlinkSync(
|
|
1781
|
+
unlinkSync(lockPath);
|
|
1730
1782
|
} catch {}
|
|
1731
1783
|
}
|
|
1732
|
-
async function waitForBroker(timeoutMs =
|
|
1784
|
+
async function waitForBroker(timeoutMs = BROKER_READY_TIMEOUT_MS) {
|
|
1733
1785
|
const start = Date.now();
|
|
1734
1786
|
let interval = BROKER_POLL_INITIAL_INTERVAL_MS;
|
|
1735
1787
|
while (Date.now() - start < timeoutMs) {
|
|
@@ -1742,8 +1794,9 @@ async function waitForBroker(timeoutMs = 5000) {
|
|
|
1742
1794
|
throw new Error(`Broker failed to start within timeout
|
|
1743
1795
|
${describeBrokerLog()}`);
|
|
1744
1796
|
}
|
|
1745
|
-
var INTERCOM_DIR, EXTENSION_DIR, BROKER_SOCKET2, BROKER_PID, BROKER_SPAWN_LOCK, BROKER_LOG, BROKER_LOG_TAIL_BYTES, BROKER_POLL_INITIAL_INTERVAL_MS = 10, BROKER_POLL_MAX_INTERVAL_MS = 100, INTERNAL_INTERCOM_BROKER_ARG = "--atomic-internal-intercom-broker";
|
|
1797
|
+
var INTERCOM_DIR, EXTENSION_DIR, BROKER_SOCKET2, BROKER_PID, BROKER_SPAWN_LOCK, BROKER_LOG, BROKER_LOG_TAIL_BYTES, BROKER_POLL_INITIAL_INTERVAL_MS = 10, BROKER_POLL_MAX_INTERVAL_MS = 100, BROKER_READY_TIMEOUT_MS = 5000, BROKER_SPAWN_LOCK_MAX_AGE_MS = 60000, INTERNAL_INTERCOM_BROKER_ARG = "--atomic-internal-intercom-broker";
|
|
1746
1798
|
var init_spawn = __esm(() => {
|
|
1799
|
+
init_socket_liveness();
|
|
1747
1800
|
init_paths();
|
|
1748
1801
|
INTERCOM_DIR = getIntercomDirPath();
|
|
1749
1802
|
EXTENSION_DIR = resolveIntercomPackageRoot(import.meta.url);
|
|
@@ -6393,7 +6446,7 @@ __export(exports_index_heavy, {
|
|
|
6393
6446
|
default: () => piIntercomExtension
|
|
6394
6447
|
});
|
|
6395
6448
|
import { APP_NAME, sessionScopedExtensionState } from "@bastani/atomic";
|
|
6396
|
-
import { appendFileSync } from "node:fs";
|
|
6449
|
+
import { appendFileSync as appendFileSync2 } from "node:fs";
|
|
6397
6450
|
function isPendingStageUndeliverableEvent(value) {
|
|
6398
6451
|
if (typeof value !== "object" || value === null)
|
|
6399
6452
|
return false;
|
|
@@ -7352,7 +7405,7 @@ var init_index_heavy = __esm(() => {
|
|
|
7352
7405
|
process.env.ATOMIC_INTERCOM_HEAVY_IMPORTED = "1";
|
|
7353
7406
|
}
|
|
7354
7407
|
if (process.env.ATOMIC_TEST_LAZY_IMPORT_SENTINEL_FILE) {
|
|
7355
|
-
|
|
7408
|
+
appendFileSync2(process.env.ATOMIC_TEST_LAZY_IMPORT_SENTINEL_FILE, `intercom
|
|
7356
7409
|
`);
|
|
7357
7410
|
}
|
|
7358
7411
|
INTERCOM_SESSION_ID_ENV = `${APP_NAME.toUpperCase()}_INTERCOM_SESSION_ID`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.28-alpha.
|
|
3
|
+
"version": "0.9.28-alpha.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
|
|
6
6
|
"contributors": [
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@bastani/atomic": "*",
|
|
47
|
-
"@earendil-works/pi-tui": "^1.0
|
|
47
|
+
"@earendil-works/pi-tui": "^1.1.0",
|
|
48
48
|
"typebox": "*"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.28-alpha.4] - 2026-10-07
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Updated the bundled Cua Driver skill to upstream `cua-driver-rs-v0.34.0`, with focused runtime, workflow, and visual guides covering authorization, exact targets, observation, and outcome verification.
|
|
10
|
+
|
|
5
11
|
## [0.9.27] - 2026-10-05
|
|
6
12
|
|
|
7
13
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.9.28-alpha.
|
|
3
|
+
"version": "0.9.28-alpha.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with parallel execution. Fork of: https://github.com/nicobailon/pi-subagents",
|
|
6
6
|
"contributors": [
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@bastani/atomic": "*",
|
|
37
37
|
"@bastani/pi-ai": "*",
|
|
38
|
-
"@earendil-works/pi-agent-core": "^1.0
|
|
39
|
-
"@earendil-works/pi-tui": "^1.0
|
|
38
|
+
"@earendil-works/pi-agent-core": "^1.1.0",
|
|
39
|
+
"@earendil-works/pi-tui": "^1.1.0",
|
|
40
40
|
"typebox": "*"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
@@ -4,7 +4,7 @@ description: Browser automation CLI for AI agents. Use when the user needs to in
|
|
|
4
4
|
hidden: true
|
|
5
5
|
metadata:
|
|
6
6
|
github-path: skills/agent-browser
|
|
7
|
-
github-ref: refs/tags/v0.38.
|
|
7
|
+
github-ref: refs/tags/v0.38.2
|
|
8
8
|
github-repo: https://github.com/vercel-labs/agent-browser
|
|
9
9
|
github-tree-sha: 82def67855a0d2aad7794207951820fa5422fdb0
|
|
10
10
|
name: agent-browser
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
Use this guide for page content in Chromium-family browsers and Electron.
|
|
4
4
|
Browser chrome, permission prompts, downloads, file pickers, and unsupported
|
|
5
5
|
engines remain native windows: inspect and operate them with
|
|
6
|
-
`get_window_state` and the
|
|
6
|
+
`get_window_state` and the native action loop in [WORKFLOW.md](WORKFLOW.md).
|
|
7
7
|
|
|
8
8
|
## Choose the page-aware route first
|
|
9
9
|
|
|
10
|
+
Use this route only when the user's requested interaction method permits
|
|
11
|
+
page-aware automation. GUI-only/native-input tasks stay on the native window
|
|
12
|
+
or authorized desktop loop, even for Electron applications.
|
|
13
|
+
|
|
10
14
|
For supported page content, prefer the typed browser tools over the legacy
|
|
11
15
|
`page` tool, accessibility guesses, omnibox shortcuts, or raw pixels. The
|
|
12
16
|
typed route binds an exact native `(pid, window_id)` to a browser target and
|
|
@@ -32,14 +36,15 @@ same value on every call that accepts it. Passing it once is not sticky; a later
|
|
|
32
36
|
omitted value uses the transport's implicit session. One long-lived MCP or SDK
|
|
33
37
|
transport may omit `session` for one-off or deliberately unlabeled work; its
|
|
34
38
|
first admitted call creates one implicit session and later unnamed calls reuse
|
|
35
|
-
it.
|
|
39
|
+
it. Use one persistent MCP connection for preparation, binding, actions, and
|
|
40
|
+
cleanup; see [RUNTIME.md](RUNTIME.md). Anonymous one-shot CLI calls use disposable transports. Never substitute a raw
|
|
36
41
|
CDP target id, tab ordinal, URL match, or remembered ref for a capability
|
|
37
42
|
returned by `get_browser_state`.
|
|
38
43
|
|
|
39
44
|
### Copy page content to the system clipboard
|
|
40
45
|
|
|
41
|
-
If the requested outcome is exact page content on the system clipboard
|
|
42
|
-
literal text-selection gesture
|
|
46
|
+
If the requested outcome is exact page content on the system clipboard (not a
|
|
47
|
+
literal text-selection gesture), read the content from a fresh semantic browser
|
|
43
48
|
snapshot, call `clipboard_write` with the exact observed value, and verify it
|
|
44
49
|
with `clipboard_read`. This path is background-safe and does not require a
|
|
45
50
|
clickable ref: passive headings and text nodes are evidence sources, not
|
|
@@ -48,7 +53,7 @@ controls that must be clicked before their value can be copied.
|
|
|
48
53
|
Fall back to visual text selection and the platform copy hotkey only when the
|
|
49
54
|
user explicitly requires that gesture or clipboard tools are unavailable.
|
|
50
55
|
That fallback is native input, not a typed page mutation, and may require the
|
|
51
|
-
foreground escalation rules in
|
|
56
|
+
foreground escalation rules in [RUNTIME.md](RUNTIME.md#foreground-boundary).
|
|
52
57
|
|
|
53
58
|
### Browser recording feedback
|
|
54
59
|
|
|
@@ -74,13 +79,17 @@ recording overlay to explain navigation in a public demo.
|
|
|
74
79
|
|
|
75
80
|
## 1. Select an exact native window
|
|
76
81
|
|
|
82
|
+
The examples below show tool names and JSON arguments for calls on the same
|
|
83
|
+
persistent MCP connection. They are not separate shell commands. Replace all
|
|
84
|
+
sample PIDs, windows, target/tab IDs, and refs with returned values.
|
|
85
|
+
|
|
77
86
|
Start or discover the app with the native tools and select one returned
|
|
78
87
|
`window_id`:
|
|
79
88
|
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
```text
|
|
90
|
+
start_session '{"session":"browser-run-1"}'
|
|
91
|
+
list_windows '{"pid":4242}'
|
|
92
|
+
get_browser_state
|
|
84
93
|
'{"pid":4242,"window_id":991,"session":"browser-run-1"}'
|
|
85
94
|
```
|
|
86
95
|
|
|
@@ -108,8 +117,8 @@ a DevTools listener merely because the listener belongs to that process.
|
|
|
108
117
|
Prefer an isolated profile when the task does not need the user's existing
|
|
109
118
|
cookies or login state:
|
|
110
119
|
|
|
111
|
-
```
|
|
112
|
-
|
|
120
|
+
```text
|
|
121
|
+
browser_prepare
|
|
113
122
|
'{"session":"browser-run-1","allow_launch":true,
|
|
114
123
|
"profile":{"mode":"isolated_new"}}'
|
|
115
124
|
```
|
|
@@ -126,6 +135,14 @@ order: Google Chrome, then Microsoft Edge. On Linux it accepts exact
|
|
|
126
135
|
root-owned, non-group/world-writable package payloads in this order: Google
|
|
127
136
|
Chrome, Chromium, then Microsoft Edge. User application directories, `PATH`
|
|
128
137
|
entries, redirected paths, and unsigned or mismatched products fail closed.
|
|
138
|
+
On Windows, the installation must also be unmodifiable by the token that runs
|
|
139
|
+
the browser. A non-elevated Driver runs the browser with its own token. An
|
|
140
|
+
elevated Driver, including the built-in Administrator and administrators with
|
|
141
|
+
UAC off, runs it with a derived standard-user token (administrator rights
|
|
142
|
+
removed, Medium integrity) and proves the installation protected from that
|
|
143
|
+
token. If that token cannot be derived and verified, or can still modify the
|
|
144
|
+
installation, the refusal says so; the browser is not missing or unsigned, and
|
|
145
|
+
Driver never falls back to an elevated browser.
|
|
129
146
|
Supply a Chromium-family browser pid when the isolated launch must use that
|
|
130
147
|
process's exact executable, including Chromium on macOS or Windows. The pid
|
|
131
148
|
remains required for existing-profile attachment.
|
|
@@ -151,8 +168,12 @@ satisfy the task.
|
|
|
151
168
|
```bash
|
|
152
169
|
# Start the runtime with the trusted standard-mode launch grant.
|
|
153
170
|
cua-driver mcp --grant existing-profile
|
|
171
|
+
```
|
|
154
172
|
|
|
155
|
-
|
|
173
|
+
Then call on that connection:
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
browser_prepare
|
|
156
177
|
'{"pid":4242,"window_id":991,"session":"browser-run-1",
|
|
157
178
|
"strategy":{"kind":"existing_profile"}}'
|
|
158
179
|
```
|
|
@@ -228,8 +249,8 @@ tri-state: `true` is a uniquely proven selected tab, `false` is a proven
|
|
|
228
249
|
unselected tab, and `null` means native evidence cannot distinguish the
|
|
229
250
|
selection. Never guess from list order when all tabs are `null`.
|
|
230
251
|
|
|
231
|
-
```
|
|
232
|
-
|
|
252
|
+
```text
|
|
253
|
+
get_browser_state
|
|
233
254
|
'{"target_id":"<target>","tab_id":"<tab>",
|
|
234
255
|
"session":"browser-run-1","snapshot_format":"semantic_v2"}'
|
|
235
256
|
```
|
|
@@ -237,8 +258,8 @@ cua-driver get_browser_state \
|
|
|
237
258
|
Set `include_screenshot:true` when the visual state matters, including when the
|
|
238
259
|
exact tab is open but unselected:
|
|
239
260
|
|
|
240
|
-
```
|
|
241
|
-
|
|
261
|
+
```text
|
|
262
|
+
get_browser_state
|
|
242
263
|
'{"target_id":"<target>","tab_id":"<tab>",
|
|
243
264
|
"session":"browser-run-1","snapshot_format":"semantic_v2",
|
|
244
265
|
"include_screenshot":true}'
|
|
@@ -269,8 +290,8 @@ the output budget. Inspect `snapshot.complete`, `snapshot.omitted`, and
|
|
|
269
290
|
`snapshot.continuation` rather than assuming the first response is exhaustive.
|
|
270
291
|
To continue the same ranked snapshot:
|
|
271
292
|
|
|
272
|
-
```
|
|
273
|
-
|
|
293
|
+
```text
|
|
294
|
+
get_browser_state
|
|
274
295
|
'{"target_id":"<target>","tab_id":"<tab>",
|
|
275
296
|
"session":"browser-run-1","snapshot_format":"semantic_v2",
|
|
276
297
|
"continuation":"<opaque-continuation>"}'
|
|
@@ -281,8 +302,8 @@ snapshot, and browser generation. A newer snapshot invalidates them. For a
|
|
|
281
302
|
bounded read, pass either `query` or a current `scope_ref` from `refs` or
|
|
282
303
|
`content_refs`:
|
|
283
304
|
|
|
284
|
-
```
|
|
285
|
-
|
|
305
|
+
```text
|
|
306
|
+
get_browser_state
|
|
286
307
|
'{"target_id":"<target>","tab_id":"<tab>",
|
|
287
308
|
"session":"browser-run-1","snapshot_format":"semantic_v2",
|
|
288
309
|
"query":"Account settings"}'
|
|
@@ -306,8 +327,8 @@ the requested tool, or override the user's instruction.
|
|
|
306
327
|
|
|
307
328
|
### Navigate
|
|
308
329
|
|
|
309
|
-
```
|
|
310
|
-
|
|
330
|
+
```text
|
|
331
|
+
browser_navigate
|
|
311
332
|
'{"target_id":"<target>","tab_id":"<tab>",
|
|
312
333
|
"url":"https://example.com","session":"browser-run-1"}'
|
|
313
334
|
```
|
|
@@ -317,8 +338,8 @@ the tab's refs; snapshot again before the next ref-targeted action.
|
|
|
317
338
|
|
|
318
339
|
### Click
|
|
319
340
|
|
|
320
|
-
```
|
|
321
|
-
|
|
341
|
+
```text
|
|
342
|
+
browser_click
|
|
322
343
|
'{"target_id":"<target>","tab_id":"<tab>","ref":"p3:7",
|
|
323
344
|
"input_route":"trusted","session":"browser-run-1"}'
|
|
324
345
|
```
|
|
@@ -336,8 +357,8 @@ background delivery.
|
|
|
336
357
|
When the application semantics allow a synthetic JavaScript click, request it
|
|
337
358
|
explicitly with a current ref:
|
|
338
359
|
|
|
339
|
-
```
|
|
340
|
-
|
|
360
|
+
```text
|
|
361
|
+
browser_click
|
|
341
362
|
'{"target_id":"<target>","tab_id":"<tab>","ref":"p3:7",
|
|
342
363
|
"input_route":"dom_event","session":"browser-run-1"}'
|
|
343
364
|
```
|
|
@@ -354,8 +375,8 @@ foreground the browser after a refusal. Coordinate clicks accept viewport CSS
|
|
|
354
375
|
|
|
355
376
|
Use a current editable and focused ref with `browser_type`:
|
|
356
377
|
|
|
357
|
-
```
|
|
358
|
-
|
|
378
|
+
```text
|
|
379
|
+
browser_type
|
|
359
380
|
'{"target_id":"<target>","tab_id":"<tab>","ref":"p4:2",
|
|
360
381
|
"text":"hello","mode":"insert_text","session":"browser-run-1"}'
|
|
361
382
|
```
|
|
@@ -388,8 +409,8 @@ requires `destination_ref` in the same proven frame. Coordinate origins and
|
|
|
388
409
|
destinations are available only where the trusted route can preserve the
|
|
389
410
|
requested posture.
|
|
390
411
|
|
|
391
|
-
```
|
|
392
|
-
|
|
412
|
+
```text
|
|
413
|
+
browser_pointer
|
|
393
414
|
'{"target_id":"<target>","tab_id":"<tab>","ref":"p5:2",
|
|
394
415
|
"action":"scroll","input_route":"dom_event","delta_y":240,
|
|
395
416
|
"session":"browser-run-1"}'
|
|
@@ -455,15 +476,15 @@ capabilities, or existing-profile consent.
|
|
|
455
476
|
|
|
456
477
|
## Support boundaries
|
|
457
478
|
|
|
458
|
-
| Surface
|
|
459
|
-
|
|
|
460
|
-
| Chrome / Edge on Windows
|
|
461
|
-
| Chrome / Edge on macOS
|
|
462
|
-
| Chrome / Chromium on Linux X11
|
|
463
|
-
| Chromium on validated Wayland setups
|
|
464
|
-
| Electron
|
|
465
|
-
| Safari / Firefox
|
|
466
|
-
| WebView2 / Tauri / other embedded webviews | Native AX/PX fallback unless an exact route is reported
|
|
479
|
+
| Surface | Typed state and mutation | Important boundary |
|
|
480
|
+
| ------------------------------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------------- |
|
|
481
|
+
| Chrome / Edge on Windows | Exact binding, refs, navigation, typing, trusted or explicit DOM click | Must run in an interactive user session, not Session 0 |
|
|
482
|
+
| Chrome / Edge on macOS | Exact binding, refs, navigation, typing, explicit DOM click | Trusted standalone click refuses to preserve background posture |
|
|
483
|
+
| Chrome / Chromium on Linux X11 | Exact binding, refs, navigation, typing, explicit DOM click | Trusted standalone click refuses to preserve background posture |
|
|
484
|
+
| Chromium on validated Wayland setups | Exact binding only when compositor identity is provable | Generic/ambiguous compositor identity refuses mutation |
|
|
485
|
+
| Electron | Exact single-page routes where endpoint and host relationship are proven | Do not infer support for arbitrary embedded webviews |
|
|
486
|
+
| Safari / Firefox | Native window state only | Typed page mutation is not supported yet |
|
|
487
|
+
| WebView2 / Tauri / other embedded webviews | Native AX/PX fallback unless an exact route is reported | Host/renderer correlation may refuse |
|
|
467
488
|
|
|
468
489
|
Product classification alone is not a capability claim. Trust the structured
|
|
469
490
|
result from the current host, process, window, session, and tab.
|