autochrome-bridge 1.0.0 → 1.1.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/dist/cli.js +56 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -19839,7 +19839,7 @@ var toolDefinitions = {
|
|
|
19839
19839
|
"Wait for a fixed time, for text to appear in the page, or both. Use after actions that load content asynchronously.",
|
|
19840
19840
|
external_exports.object({
|
|
19841
19841
|
ms: external_exports.number().min(0).max(1e4).optional(),
|
|
19842
|
-
text: external_exports.string().optional().describe("Resolve as soon as this text is in the page."),
|
|
19842
|
+
text: external_exports.string().optional().describe("Resolve as soon as this text is in the page (case-insensitive)."),
|
|
19843
19843
|
timeoutMs: external_exports.number().positive().max(3e4).default(1e4),
|
|
19844
19844
|
tabId
|
|
19845
19845
|
}).refine((v) => v.ms !== void 0 || v.text !== void 0, {
|
|
@@ -19874,6 +19874,22 @@ var toolDefinitions = {
|
|
|
19874
19874
|
"Get the response headers and body of a request listed by network_requests. Text bodies only, truncated at 20,000 characters.",
|
|
19875
19875
|
external_exports.object({ requestId: external_exports.string(), tabId })
|
|
19876
19876
|
),
|
|
19877
|
+
workflows_list: defineTool(
|
|
19878
|
+
"workflows_list",
|
|
19879
|
+
"List the saved workflows (recorded in the browser or saved from a chat) with their ids, names and variables. Use it to find a workflow before running it with workflow_run.",
|
|
19880
|
+
external_exports.object({})
|
|
19881
|
+
),
|
|
19882
|
+
workflow_run: defineTool(
|
|
19883
|
+
"workflow_run",
|
|
19884
|
+
"Replay a saved workflow by id or name in its own tab and return the run log: each step with its status (ok, repaired by AI, or failed) and duration. Fill the workflow variables with `variables`. A step that cannot find its element is handed to the configured AI provider to repair.",
|
|
19885
|
+
external_exports.object({
|
|
19886
|
+
id: external_exports.string().optional().describe("Workflow id from workflows_list."),
|
|
19887
|
+
name: external_exports.string().optional().describe("Workflow name, when the id is not known."),
|
|
19888
|
+
variables: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Values for the workflow variables, by name.")
|
|
19889
|
+
}).refine((v) => v.id !== void 0 || v.name !== void 0, {
|
|
19890
|
+
message: "Provide id or name."
|
|
19891
|
+
})
|
|
19892
|
+
),
|
|
19877
19893
|
js_eval: defineTool(
|
|
19878
19894
|
"js_eval",
|
|
19879
19895
|
"Run JavaScript in the page and return the JSON result (or the exception). For debugging and inspecting page state, not for ordinary browsing. The user is always asked to approve the code first.",
|
|
@@ -19952,6 +19968,44 @@ function protocolVersionMismatch(version2) {
|
|
|
19952
19968
|
return version2 === PROTOCOL_VERSION ? void 0 : `Protocol version ${version2} is not supported (expected ${PROTOCOL_VERSION}).`;
|
|
19953
19969
|
}
|
|
19954
19970
|
|
|
19971
|
+
// ../shared/src/workflow.ts
|
|
19972
|
+
var WORKFLOW_TOOLS = ["workflows_list", "workflow_run"];
|
|
19973
|
+
var targetHint = external_exports.object({
|
|
19974
|
+
/** Accessibility role; empty when the element has none. */
|
|
19975
|
+
role: external_exports.string(),
|
|
19976
|
+
name: external_exports.string(),
|
|
19977
|
+
/** Visible text, matched when the role and name no longer fit. */
|
|
19978
|
+
text: external_exports.string().optional(),
|
|
19979
|
+
selector: external_exports.string().optional(),
|
|
19980
|
+
/** The page the step happened on. */
|
|
19981
|
+
url: external_exports.string().optional()
|
|
19982
|
+
});
|
|
19983
|
+
var workflowVariable = external_exports.object({
|
|
19984
|
+
name: external_exports.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/, "Use letters, digits and underscores."),
|
|
19985
|
+
label: external_exports.string(),
|
|
19986
|
+
default: external_exports.string().optional()
|
|
19987
|
+
});
|
|
19988
|
+
var workflowStep = external_exports.object({
|
|
19989
|
+
tool: external_exports.custom(
|
|
19990
|
+
(value) => typeof value === "string" && isToolName(value) && !WORKFLOW_TOOLS.includes(value),
|
|
19991
|
+
"Unknown tool."
|
|
19992
|
+
),
|
|
19993
|
+
/** The tool input; string fields may contain `{{variable}}`. A ref is added at replay time. */
|
|
19994
|
+
input: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
19995
|
+
target: targetHint.optional(),
|
|
19996
|
+
/** Human-readable, e.g. `Click "Sign in"`. */
|
|
19997
|
+
note: external_exports.string().optional()
|
|
19998
|
+
});
|
|
19999
|
+
var workflow = external_exports.object({
|
|
20000
|
+
id: external_exports.string().min(1),
|
|
20001
|
+
name: external_exports.string().trim().min(1),
|
|
20002
|
+
description: external_exports.string().optional(),
|
|
20003
|
+
variables: external_exports.array(workflowVariable),
|
|
20004
|
+
steps: external_exports.array(workflowStep),
|
|
20005
|
+
createdFrom: external_exports.enum(["recording", "chat"]),
|
|
20006
|
+
updatedAt: external_exports.number()
|
|
20007
|
+
});
|
|
20008
|
+
|
|
19955
20009
|
// src/hub.ts
|
|
19956
20010
|
import { createServer } from "http";
|
|
19957
20011
|
import { WebSocket, WebSocketServer } from "ws";
|
|
@@ -20434,7 +20488,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprot
|
|
|
20434
20488
|
// package.json
|
|
20435
20489
|
var package_default = {
|
|
20436
20490
|
name: "autochrome-bridge",
|
|
20437
|
-
version: "1.
|
|
20491
|
+
version: "1.1.1",
|
|
20438
20492
|
description: "MCP server and local HTTP/WebSocket bridge that lets AI tools control Chrome through the autochrome extension.",
|
|
20439
20493
|
license: "MIT",
|
|
20440
20494
|
author: "fahaddhruba",
|
package/package.json
CHANGED