auto-chrome-mcp-shared 1.11.1 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +97 -52
- package/dist/index.mjs +97 -51
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
|
|
3
|
-
declare const DEFAULT_SERVER_PORT = 12320;
|
|
4
3
|
declare const HOST_NAME = "com.autochromemcp.nativehost";
|
|
5
4
|
|
|
6
5
|
declare enum NativeMessageType {
|
|
@@ -826,4 +825,4 @@ type OpenProjectResponse = {
|
|
|
826
825
|
error: string;
|
|
827
826
|
};
|
|
828
827
|
|
|
829
|
-
export { type AgentActRequest, type AgentActResponse, type AgentAttachment, type AgentCliPreference, type AgentConnectedEvent, type AgentEngineInfo, type AgentHeartbeatEvent, type AgentManagementInfo, type AgentMessage, type AgentProject, type AgentRole, type AgentSession, type AgentSessionOptionsConfig, type AgentStatusEvent, type AgentStoredMessage, type AgentSystemPromptConfig, type AgentToolsConfig, type AgentUsageStats, type AttachmentCleanupRequest, type AttachmentCleanupResponse, type AttachmentMetadata, type AttachmentProjectStats, type AttachmentStatsResponse, CODEX_AUTO_INSTRUCTIONS, type CleanupProjectResult, type CodexEngineConfig, type CodexReasoningEffort, type CodexSandboxMode, type CreateAgentSessionInput, DEFAULT_CODEX_CONFIG,
|
|
828
|
+
export { type AgentActRequest, type AgentActResponse, type AgentAttachment, type AgentCliPreference, type AgentConnectedEvent, type AgentEngineInfo, type AgentHeartbeatEvent, type AgentManagementInfo, type AgentMessage, type AgentProject, type AgentRole, type AgentSession, type AgentSessionOptionsConfig, type AgentStatusEvent, type AgentStoredMessage, type AgentSystemPromptConfig, type AgentToolsConfig, type AgentUsageStats, type AttachmentCleanupRequest, type AttachmentCleanupResponse, type AttachmentMetadata, type AttachmentProjectStats, type AttachmentStatsResponse, CODEX_AUTO_INSTRUCTIONS, type CleanupProjectResult, type CodexEngineConfig, type CodexReasoningEffort, type CodexSandboxMode, type CreateAgentSessionInput, DEFAULT_CODEX_CONFIG, EDGE_LABELS, type EdgeLabel, type ElementPickerRequest, type ElementPickerResult, type ElementPickerResultItem, type FieldArray, type FieldBoolean, type FieldJson, type FieldNumber, type FieldObject, type FieldSelect, type FieldSpec, type FieldSpecBase, type FieldString, type FieldType, HOST_NAME, type NativeMessage, NativeMessageType, type NodeCategory, type NodeSpec, type NodeSpecDisplay, type OpenProjectRequest, type OpenProjectResponse, type OpenProjectTarget, type PickedElement, type PickedElementPoint, type PickedElementRect, type RREdge, type RRNode, type RRStepType, RR_STEP_TYPES, type RealtimeEvent, STEP_TYPES, type ServerStartedPayload, type StepTypeConst, type StreamTransport, TOOL_NAMES, TOOL_SCHEMAS, type UpdateAgentSessionInput, getNodeSpec, listNodeSpecs, mapNodeToStep, mapStepToNodeConfig, nodesToSteps, registerBuiltinSpecs, registerNodeSpec, stepsToDAG, stepsToNodes, topoOrder };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
|
|
3
|
-
declare const DEFAULT_SERVER_PORT = 12320;
|
|
4
3
|
declare const HOST_NAME = "com.autochromemcp.nativehost";
|
|
5
4
|
|
|
6
5
|
declare enum NativeMessageType {
|
|
@@ -826,4 +825,4 @@ type OpenProjectResponse = {
|
|
|
826
825
|
error: string;
|
|
827
826
|
};
|
|
828
827
|
|
|
829
|
-
export { type AgentActRequest, type AgentActResponse, type AgentAttachment, type AgentCliPreference, type AgentConnectedEvent, type AgentEngineInfo, type AgentHeartbeatEvent, type AgentManagementInfo, type AgentMessage, type AgentProject, type AgentRole, type AgentSession, type AgentSessionOptionsConfig, type AgentStatusEvent, type AgentStoredMessage, type AgentSystemPromptConfig, type AgentToolsConfig, type AgentUsageStats, type AttachmentCleanupRequest, type AttachmentCleanupResponse, type AttachmentMetadata, type AttachmentProjectStats, type AttachmentStatsResponse, CODEX_AUTO_INSTRUCTIONS, type CleanupProjectResult, type CodexEngineConfig, type CodexReasoningEffort, type CodexSandboxMode, type CreateAgentSessionInput, DEFAULT_CODEX_CONFIG,
|
|
828
|
+
export { type AgentActRequest, type AgentActResponse, type AgentAttachment, type AgentCliPreference, type AgentConnectedEvent, type AgentEngineInfo, type AgentHeartbeatEvent, type AgentManagementInfo, type AgentMessage, type AgentProject, type AgentRole, type AgentSession, type AgentSessionOptionsConfig, type AgentStatusEvent, type AgentStoredMessage, type AgentSystemPromptConfig, type AgentToolsConfig, type AgentUsageStats, type AttachmentCleanupRequest, type AttachmentCleanupResponse, type AttachmentMetadata, type AttachmentProjectStats, type AttachmentStatsResponse, CODEX_AUTO_INSTRUCTIONS, type CleanupProjectResult, type CodexEngineConfig, type CodexReasoningEffort, type CodexSandboxMode, type CreateAgentSessionInput, DEFAULT_CODEX_CONFIG, EDGE_LABELS, type EdgeLabel, type ElementPickerRequest, type ElementPickerResult, type ElementPickerResultItem, type FieldArray, type FieldBoolean, type FieldJson, type FieldNumber, type FieldObject, type FieldSelect, type FieldSpec, type FieldSpecBase, type FieldString, type FieldType, HOST_NAME, type NativeMessage, NativeMessageType, type NodeCategory, type NodeSpec, type NodeSpecDisplay, type OpenProjectRequest, type OpenProjectResponse, type OpenProjectTarget, type PickedElement, type PickedElementPoint, type PickedElementRect, type RREdge, type RRNode, type RRStepType, RR_STEP_TYPES, type RealtimeEvent, STEP_TYPES, type ServerStartedPayload, type StepTypeConst, type StreamTransport, TOOL_NAMES, TOOL_SCHEMAS, type UpdateAgentSessionInput, getNodeSpec, listNodeSpecs, mapNodeToStep, mapStepToNodeConfig, nodesToSteps, registerBuiltinSpecs, registerNodeSpec, stepsToDAG, stepsToNodes, topoOrder };
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,6 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
CODEX_AUTO_INSTRUCTIONS: () => CODEX_AUTO_INSTRUCTIONS,
|
|
24
24
|
DEFAULT_CODEX_CONFIG: () => DEFAULT_CODEX_CONFIG,
|
|
25
|
-
DEFAULT_SERVER_PORT: () => DEFAULT_SERVER_PORT,
|
|
26
25
|
EDGE_LABELS: () => EDGE_LABELS,
|
|
27
26
|
HOST_NAME: () => HOST_NAME,
|
|
28
27
|
NativeMessageType: () => NativeMessageType,
|
|
@@ -44,7 +43,6 @@ __export(index_exports, {
|
|
|
44
43
|
module.exports = __toCommonJS(index_exports);
|
|
45
44
|
|
|
46
45
|
// src/constants.ts
|
|
47
|
-
var DEFAULT_SERVER_PORT = 12320;
|
|
48
46
|
var HOST_NAME = "com.autochromemcp.nativehost";
|
|
49
47
|
|
|
50
48
|
// src/types.ts
|
|
@@ -157,6 +155,15 @@ var P_STOP_IF = "Stop the whole run after this step when the condition holds.";
|
|
|
157
155
|
var P_REPEAT = 'Repeat group: { max: 1-20, until?: condition, delayMs?: 0-5000 } together with a "steps" array.';
|
|
158
156
|
var P_GROUP_STEPS = "Steps of a repeat group (no repeat inside a repeat).";
|
|
159
157
|
var P_PARAMS = "save: declare { user: { required: true }, pw: { secret: true } }. run: values for {{params.user}}.";
|
|
158
|
+
var P_TASK = 'Short label for what this run is doing (max 24 chars). Shows on the MCP tab group while it runs, then goes back to "MCP".';
|
|
159
|
+
var P_HISTORY_RUN_ID = 'action="history": return this one run in full, including its "results".';
|
|
160
|
+
var P_HISTORY_LIMIT = 'action="history": how many runs to list (default 20, max 100).';
|
|
161
|
+
var P_HISTORY_SINCE = 'action="history": only runs started at or after this time (ISO string or epoch ms).';
|
|
162
|
+
var P_SCHEDULE = 'action="schedule": { every: "15m"|"1h"|"6h"|"24h" } or { daily: ["08:00"], days?: ["mon"] }.';
|
|
163
|
+
var P_NOTIFY = 'action="schedule": show a Chrome notification when a run fails (default true).';
|
|
164
|
+
var P_REPORT = 'action="schedule": also write the run record to Downloads/mcp-screenshots (default false).';
|
|
165
|
+
var P_LOGIN_CHECK = 'action="schedule": "as" name of the top level step whose stopIf means the login expired.';
|
|
166
|
+
var P_HISTORY_STATUS = 'action="history": keep only these statuses: running, success, failed, stopped, timeout, interrupted, skipped_queue, login_required, user_took_over_tab.';
|
|
160
167
|
var tabIdProp = { type: "number", description: P_TAB_ID };
|
|
161
168
|
var windowIdProp = { type: "number", description: P_WINDOW_ID };
|
|
162
169
|
var frameIdProp = { type: "number", description: P_FRAME_ID };
|
|
@@ -199,7 +206,8 @@ var TOOL_SCHEMAS = [
|
|
|
199
206
|
type: "array",
|
|
200
207
|
items: { type: "string" },
|
|
201
208
|
description: P_RETURN
|
|
202
|
-
}
|
|
209
|
+
},
|
|
210
|
+
task: { type: "string", description: P_TASK }
|
|
203
211
|
},
|
|
204
212
|
required: ["steps"]
|
|
205
213
|
}
|
|
@@ -226,31 +234,23 @@ var TOOL_SCHEMAS = [
|
|
|
226
234
|
},
|
|
227
235
|
{
|
|
228
236
|
name: TOOL_NAMES.BROWSER.SHORTCUT,
|
|
229
|
-
description: "Save and
|
|
237
|
+
description: "Save, run and schedule named macros (a chrome_batch step list stored under a name). action: save {name, steps, description} | run (through the normal pipeline) | list | delete | history (past runs) | schedule (run it on a timer with no MCP session) | unschedule | schedules. Use for flows you repeat across sessions (logins, routine collection, overnight checks).",
|
|
230
238
|
inputSchema: {
|
|
231
239
|
type: "object",
|
|
232
240
|
properties: {
|
|
233
241
|
action: {
|
|
234
242
|
type: "string",
|
|
235
|
-
enum: ["save", "run", "list", "delete"],
|
|
243
|
+
enum: ["save", "run", "list", "delete", "history", "schedule", "unschedule", "schedules"],
|
|
236
244
|
description: "What to do"
|
|
237
245
|
},
|
|
238
|
-
name: {
|
|
246
|
+
name: {
|
|
247
|
+
type: "string",
|
|
248
|
+
description: "Shortcut name (save/run/delete/schedule/unschedule)"
|
|
249
|
+
},
|
|
239
250
|
steps: {
|
|
240
251
|
type: "array",
|
|
241
|
-
description: 'action="save": chrome_batch
|
|
242
|
-
items: {
|
|
243
|
-
type: "object",
|
|
244
|
-
properties: {
|
|
245
|
-
tool: { type: "string" },
|
|
246
|
-
args: { type: "object" },
|
|
247
|
-
as: { type: "string", description: P_STEP_AS },
|
|
248
|
-
when: { type: "object", description: P_WHEN },
|
|
249
|
-
stopIf: { type: "object", description: P_STOP_IF },
|
|
250
|
-
repeat: { type: "object", description: P_REPEAT },
|
|
251
|
-
steps: { type: "array", description: P_GROUP_STEPS }
|
|
252
|
-
}
|
|
253
|
-
}
|
|
252
|
+
description: 'action="save": same shape as chrome_batch.steps (max 20, tool/args, or a repeat group).',
|
|
253
|
+
items: { type: "object" }
|
|
254
254
|
},
|
|
255
255
|
description: { type: "string", description: 'action="save": what this shortcut does' },
|
|
256
256
|
continueOnError: {
|
|
@@ -263,7 +263,20 @@ var TOOL_SCHEMAS = [
|
|
|
263
263
|
items: { type: "string" },
|
|
264
264
|
description: P_RETURN
|
|
265
265
|
},
|
|
266
|
-
params: { type: "object", description: P_PARAMS }
|
|
266
|
+
params: { type: "object", description: P_PARAMS },
|
|
267
|
+
task: { type: "string", description: P_TASK },
|
|
268
|
+
runId: { type: "string", description: P_HISTORY_RUN_ID },
|
|
269
|
+
limit: { type: "number", description: P_HISTORY_LIMIT },
|
|
270
|
+
since: { type: "string", description: P_HISTORY_SINCE },
|
|
271
|
+
status: {
|
|
272
|
+
type: "array",
|
|
273
|
+
items: { type: "string" },
|
|
274
|
+
description: P_HISTORY_STATUS
|
|
275
|
+
},
|
|
276
|
+
schedule: { type: "object", description: P_SCHEDULE },
|
|
277
|
+
notify: { type: "boolean", description: P_NOTIFY },
|
|
278
|
+
report: { type: "boolean", description: P_REPORT },
|
|
279
|
+
loginCheck: { type: "string", description: P_LOGIN_CHECK }
|
|
267
280
|
},
|
|
268
281
|
required: ["action"]
|
|
269
282
|
}
|
|
@@ -371,24 +384,59 @@ var TOOL_SCHEMAS = [
|
|
|
371
384
|
required: []
|
|
372
385
|
}
|
|
373
386
|
},
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
387
|
+
{
|
|
388
|
+
name: TOOL_NAMES.RECORD_REPLAY.FLOW_RUN,
|
|
389
|
+
description: "Run a published record-replay flow (recorded in the extension side panel) on this session work tab. Requires a work tab: call chrome_navigate first, otherwise the call is refused with no_work_tab. Cannot be nested inside chrome_batch. Returns a summary: success, step counts, first failed step, flow outputs.",
|
|
390
|
+
inputSchema: {
|
|
391
|
+
type: "object",
|
|
392
|
+
properties: {
|
|
393
|
+
flowId: {
|
|
394
|
+
type: "string",
|
|
395
|
+
description: "Flow id, from record_replay_list_published."
|
|
396
|
+
},
|
|
397
|
+
args: {
|
|
398
|
+
type: "object",
|
|
399
|
+
description: "Values for the flow variables, keyed by variable name."
|
|
400
|
+
},
|
|
401
|
+
tabTarget: {
|
|
402
|
+
type: "string",
|
|
403
|
+
enum: ["current", "new"],
|
|
404
|
+
description: "'current' (default) runs in the work tab. 'new' opens a background tab in the work tab window, runs there and leaves it open. Pass a specific tab as tabId, not here."
|
|
405
|
+
},
|
|
406
|
+
startUrl: {
|
|
407
|
+
type: "string",
|
|
408
|
+
description: "Open this URL in the run tab before the first step."
|
|
409
|
+
},
|
|
410
|
+
refresh: {
|
|
411
|
+
type: "boolean",
|
|
412
|
+
description: "Reload the run tab before the first step (default false)."
|
|
413
|
+
},
|
|
414
|
+
captureNetwork: {
|
|
415
|
+
type: "boolean",
|
|
416
|
+
description: "Record network requests during the run (default false)."
|
|
417
|
+
},
|
|
418
|
+
returnLogs: {
|
|
419
|
+
type: "boolean",
|
|
420
|
+
description: "Include the step log, capped at 4000 chars (default false)."
|
|
421
|
+
},
|
|
422
|
+
timeoutMs: {
|
|
423
|
+
type: "number",
|
|
424
|
+
description: "Abort the whole run after this many ms."
|
|
425
|
+
},
|
|
426
|
+
tabId: tabIdProp
|
|
427
|
+
},
|
|
428
|
+
required: ["flowId"]
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
name: TOOL_NAMES.RECORD_REPLAY.LIST_PUBLISHED,
|
|
433
|
+
description: "List the published record-replay flows (id, slug, name, version, description) that record_replay_flow_run can run.",
|
|
434
|
+
inputSchema: {
|
|
435
|
+
type: "object",
|
|
436
|
+
properties: {},
|
|
437
|
+
required: []
|
|
438
|
+
}
|
|
439
|
+
},
|
|
392
440
|
{
|
|
393
441
|
name: TOOL_NAMES.BROWSER.PERFORMANCE_START_TRACE,
|
|
394
442
|
description: "Start a performance trace on the selected page. Optionally reload and/or auto-stop after a short duration.",
|
|
@@ -658,14 +706,15 @@ var TOOL_SCHEMAS = [
|
|
|
658
706
|
refresh: {
|
|
659
707
|
type: "boolean",
|
|
660
708
|
description: "Refresh the active tab instead of navigating (url ignored). Default false."
|
|
661
|
-
}
|
|
709
|
+
},
|
|
710
|
+
task: { type: "string", description: P_TASK }
|
|
662
711
|
},
|
|
663
712
|
required: []
|
|
664
713
|
}
|
|
665
714
|
},
|
|
666
715
|
{
|
|
667
716
|
name: TOOL_NAMES.BROWSER.SCREENSHOT,
|
|
668
|
-
description: '[Prefer chrome_read_page, or chrome_computer action="screenshot"] Take a screenshot of the page or an element. Use this tool only when you need its advanced options.',
|
|
717
|
+
description: '[Prefer chrome_read_page, or chrome_computer action="screenshot"] Take a screenshot of the page or an element. Use this tool only when you need its advanced options. With storeBase64, the image arrives as a separate MCP image content block in image pixels (chrome_computer converts coordinates via imageScale automatically), not base64 in this text; a saved file path (savePng/saveToDownloads) is included in the response.',
|
|
669
718
|
inputSchema: {
|
|
670
719
|
type: "object",
|
|
671
720
|
properties: {
|
|
@@ -1010,7 +1059,7 @@ var TOOL_SCHEMAS = [
|
|
|
1010
1059
|
},
|
|
1011
1060
|
{
|
|
1012
1061
|
name: TOOL_NAMES.BROWSER.JAVASCRIPT,
|
|
1013
|
-
description: "Execute JavaScript in a tab and return the result
|
|
1062
|
+
description: "Execute JavaScript in a tab and return the result, falling back automatically to a different execution path if the debugger is busy. Output is sanitized (sensitive data redacted) and truncated by default.",
|
|
1014
1063
|
inputSchema: {
|
|
1015
1064
|
type: "object",
|
|
1016
1065
|
properties: {
|
|
@@ -1270,7 +1319,7 @@ var TOOL_SCHEMAS = [
|
|
|
1270
1319
|
},
|
|
1271
1320
|
{
|
|
1272
1321
|
name: TOOL_NAMES.BROWSER.FILE_UPLOAD,
|
|
1273
|
-
description: "Upload files to file-input form elements
|
|
1322
|
+
description: "Upload files to file-input form elements.",
|
|
1274
1323
|
inputSchema: {
|
|
1275
1324
|
type: "object",
|
|
1276
1325
|
properties: {
|
|
@@ -1309,7 +1358,7 @@ var TOOL_SCHEMAS = [
|
|
|
1309
1358
|
},
|
|
1310
1359
|
{
|
|
1311
1360
|
name: TOOL_NAMES.BROWSER.HANDLE_DIALOG,
|
|
1312
|
-
description: "Handle JavaScript dialogs (alert/confirm/prompt)
|
|
1361
|
+
description: "Handle JavaScript dialogs (alert/confirm/prompt).",
|
|
1313
1362
|
inputSchema: {
|
|
1314
1363
|
type: "object",
|
|
1315
1364
|
properties: {
|
|
@@ -1489,7 +1538,7 @@ var TOOL_SCHEMAS = [
|
|
|
1489
1538
|
// ===== auto-chrome-mcp fork (B1~B4) =====
|
|
1490
1539
|
{
|
|
1491
1540
|
name: TOOL_NAMES.BROWSER.STORAGE,
|
|
1492
|
-
description: "Read or modify cookies, localStorage, or sessionStorage.
|
|
1541
|
+
description: "Read or modify cookies, localStorage, or sessionStorage. VALUES are masked by default (names/domains/expiry still returned); pass includeValues:true only when you need the secrets.",
|
|
1493
1542
|
inputSchema: {
|
|
1494
1543
|
type: "object",
|
|
1495
1544
|
properties: {
|
|
@@ -1649,13 +1698,10 @@ var LANE_EXEMPT_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1649
1698
|
TOOL_NAMES.BROWSER.BOOKMARK_SEARCH,
|
|
1650
1699
|
TOOL_NAMES.BROWSER.BOOKMARK_ADD,
|
|
1651
1700
|
TOOL_NAMES.BROWSER.BOOKMARK_DELETE,
|
|
1652
|
-
TOOL_NAMES.BROWSER.REQUEST_USER_CONSENT
|
|
1653
|
-
// record_replay 두 도구는
|
|
1654
|
-
//
|
|
1655
|
-
//
|
|
1656
|
-
// 판단을 되풀이하지 않도록 남겨 둔다.
|
|
1657
|
-
TOOL_NAMES.RECORD_REPLAY.FLOW_RUN,
|
|
1658
|
-
TOOL_NAMES.RECORD_REPLAY.LIST_PUBLISHED
|
|
1701
|
+
TOOL_NAMES.BROWSER.REQUEST_USER_CONSENT
|
|
1702
|
+
// record_replay 두 도구는 여기 넣지 않는다. flow_run 은 레인별 작업 탭을 그대로 받아야
|
|
1703
|
+
// 하고(게이트의 TAB_ID_INJECT_TOOLS), list_published 도 같은 레인 인자를 달고 다니는 편이
|
|
1704
|
+
// 호출 형태가 일관된다.
|
|
1659
1705
|
]);
|
|
1660
1706
|
var LANE_DESCRIPTION_SHORT = "Parallel-agent lane id (same value every call). Omit if solo.";
|
|
1661
1707
|
var LANE_DESCRIPTION_LONG = "Parallel lane id. Sub-agents of one Claude Code session share one MCP session, so without a lane they overwrite each other's work tab. Give each concurrent agent a distinct lane (same value every call): a lane keeps its own work tab that no other lane closes or retargets.";
|
|
@@ -2673,7 +2719,6 @@ var DEFAULT_CODEX_CONFIG = {
|
|
|
2673
2719
|
0 && (module.exports = {
|
|
2674
2720
|
CODEX_AUTO_INSTRUCTIONS,
|
|
2675
2721
|
DEFAULT_CODEX_CONFIG,
|
|
2676
|
-
DEFAULT_SERVER_PORT,
|
|
2677
2722
|
EDGE_LABELS,
|
|
2678
2723
|
HOST_NAME,
|
|
2679
2724
|
NativeMessageType,
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// src/constants.ts
|
|
2
|
-
var DEFAULT_SERVER_PORT = 12320;
|
|
3
2
|
var HOST_NAME = "com.autochromemcp.nativehost";
|
|
4
3
|
|
|
5
4
|
// src/types.ts
|
|
@@ -112,6 +111,15 @@ var P_STOP_IF = "Stop the whole run after this step when the condition holds.";
|
|
|
112
111
|
var P_REPEAT = 'Repeat group: { max: 1-20, until?: condition, delayMs?: 0-5000 } together with a "steps" array.';
|
|
113
112
|
var P_GROUP_STEPS = "Steps of a repeat group (no repeat inside a repeat).";
|
|
114
113
|
var P_PARAMS = "save: declare { user: { required: true }, pw: { secret: true } }. run: values for {{params.user}}.";
|
|
114
|
+
var P_TASK = 'Short label for what this run is doing (max 24 chars). Shows on the MCP tab group while it runs, then goes back to "MCP".';
|
|
115
|
+
var P_HISTORY_RUN_ID = 'action="history": return this one run in full, including its "results".';
|
|
116
|
+
var P_HISTORY_LIMIT = 'action="history": how many runs to list (default 20, max 100).';
|
|
117
|
+
var P_HISTORY_SINCE = 'action="history": only runs started at or after this time (ISO string or epoch ms).';
|
|
118
|
+
var P_SCHEDULE = 'action="schedule": { every: "15m"|"1h"|"6h"|"24h" } or { daily: ["08:00"], days?: ["mon"] }.';
|
|
119
|
+
var P_NOTIFY = 'action="schedule": show a Chrome notification when a run fails (default true).';
|
|
120
|
+
var P_REPORT = 'action="schedule": also write the run record to Downloads/mcp-screenshots (default false).';
|
|
121
|
+
var P_LOGIN_CHECK = 'action="schedule": "as" name of the top level step whose stopIf means the login expired.';
|
|
122
|
+
var P_HISTORY_STATUS = 'action="history": keep only these statuses: running, success, failed, stopped, timeout, interrupted, skipped_queue, login_required, user_took_over_tab.';
|
|
115
123
|
var tabIdProp = { type: "number", description: P_TAB_ID };
|
|
116
124
|
var windowIdProp = { type: "number", description: P_WINDOW_ID };
|
|
117
125
|
var frameIdProp = { type: "number", description: P_FRAME_ID };
|
|
@@ -154,7 +162,8 @@ var TOOL_SCHEMAS = [
|
|
|
154
162
|
type: "array",
|
|
155
163
|
items: { type: "string" },
|
|
156
164
|
description: P_RETURN
|
|
157
|
-
}
|
|
165
|
+
},
|
|
166
|
+
task: { type: "string", description: P_TASK }
|
|
158
167
|
},
|
|
159
168
|
required: ["steps"]
|
|
160
169
|
}
|
|
@@ -181,31 +190,23 @@ var TOOL_SCHEMAS = [
|
|
|
181
190
|
},
|
|
182
191
|
{
|
|
183
192
|
name: TOOL_NAMES.BROWSER.SHORTCUT,
|
|
184
|
-
description: "Save and
|
|
193
|
+
description: "Save, run and schedule named macros (a chrome_batch step list stored under a name). action: save {name, steps, description} | run (through the normal pipeline) | list | delete | history (past runs) | schedule (run it on a timer with no MCP session) | unschedule | schedules. Use for flows you repeat across sessions (logins, routine collection, overnight checks).",
|
|
185
194
|
inputSchema: {
|
|
186
195
|
type: "object",
|
|
187
196
|
properties: {
|
|
188
197
|
action: {
|
|
189
198
|
type: "string",
|
|
190
|
-
enum: ["save", "run", "list", "delete"],
|
|
199
|
+
enum: ["save", "run", "list", "delete", "history", "schedule", "unschedule", "schedules"],
|
|
191
200
|
description: "What to do"
|
|
192
201
|
},
|
|
193
|
-
name: {
|
|
202
|
+
name: {
|
|
203
|
+
type: "string",
|
|
204
|
+
description: "Shortcut name (save/run/delete/schedule/unschedule)"
|
|
205
|
+
},
|
|
194
206
|
steps: {
|
|
195
207
|
type: "array",
|
|
196
|
-
description: 'action="save": chrome_batch
|
|
197
|
-
items: {
|
|
198
|
-
type: "object",
|
|
199
|
-
properties: {
|
|
200
|
-
tool: { type: "string" },
|
|
201
|
-
args: { type: "object" },
|
|
202
|
-
as: { type: "string", description: P_STEP_AS },
|
|
203
|
-
when: { type: "object", description: P_WHEN },
|
|
204
|
-
stopIf: { type: "object", description: P_STOP_IF },
|
|
205
|
-
repeat: { type: "object", description: P_REPEAT },
|
|
206
|
-
steps: { type: "array", description: P_GROUP_STEPS }
|
|
207
|
-
}
|
|
208
|
-
}
|
|
208
|
+
description: 'action="save": same shape as chrome_batch.steps (max 20, tool/args, or a repeat group).',
|
|
209
|
+
items: { type: "object" }
|
|
209
210
|
},
|
|
210
211
|
description: { type: "string", description: 'action="save": what this shortcut does' },
|
|
211
212
|
continueOnError: {
|
|
@@ -218,7 +219,20 @@ var TOOL_SCHEMAS = [
|
|
|
218
219
|
items: { type: "string" },
|
|
219
220
|
description: P_RETURN
|
|
220
221
|
},
|
|
221
|
-
params: { type: "object", description: P_PARAMS }
|
|
222
|
+
params: { type: "object", description: P_PARAMS },
|
|
223
|
+
task: { type: "string", description: P_TASK },
|
|
224
|
+
runId: { type: "string", description: P_HISTORY_RUN_ID },
|
|
225
|
+
limit: { type: "number", description: P_HISTORY_LIMIT },
|
|
226
|
+
since: { type: "string", description: P_HISTORY_SINCE },
|
|
227
|
+
status: {
|
|
228
|
+
type: "array",
|
|
229
|
+
items: { type: "string" },
|
|
230
|
+
description: P_HISTORY_STATUS
|
|
231
|
+
},
|
|
232
|
+
schedule: { type: "object", description: P_SCHEDULE },
|
|
233
|
+
notify: { type: "boolean", description: P_NOTIFY },
|
|
234
|
+
report: { type: "boolean", description: P_REPORT },
|
|
235
|
+
loginCheck: { type: "string", description: P_LOGIN_CHECK }
|
|
222
236
|
},
|
|
223
237
|
required: ["action"]
|
|
224
238
|
}
|
|
@@ -326,24 +340,59 @@ var TOOL_SCHEMAS = [
|
|
|
326
340
|
required: []
|
|
327
341
|
}
|
|
328
342
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
{
|
|
344
|
+
name: TOOL_NAMES.RECORD_REPLAY.FLOW_RUN,
|
|
345
|
+
description: "Run a published record-replay flow (recorded in the extension side panel) on this session work tab. Requires a work tab: call chrome_navigate first, otherwise the call is refused with no_work_tab. Cannot be nested inside chrome_batch. Returns a summary: success, step counts, first failed step, flow outputs.",
|
|
346
|
+
inputSchema: {
|
|
347
|
+
type: "object",
|
|
348
|
+
properties: {
|
|
349
|
+
flowId: {
|
|
350
|
+
type: "string",
|
|
351
|
+
description: "Flow id, from record_replay_list_published."
|
|
352
|
+
},
|
|
353
|
+
args: {
|
|
354
|
+
type: "object",
|
|
355
|
+
description: "Values for the flow variables, keyed by variable name."
|
|
356
|
+
},
|
|
357
|
+
tabTarget: {
|
|
358
|
+
type: "string",
|
|
359
|
+
enum: ["current", "new"],
|
|
360
|
+
description: "'current' (default) runs in the work tab. 'new' opens a background tab in the work tab window, runs there and leaves it open. Pass a specific tab as tabId, not here."
|
|
361
|
+
},
|
|
362
|
+
startUrl: {
|
|
363
|
+
type: "string",
|
|
364
|
+
description: "Open this URL in the run tab before the first step."
|
|
365
|
+
},
|
|
366
|
+
refresh: {
|
|
367
|
+
type: "boolean",
|
|
368
|
+
description: "Reload the run tab before the first step (default false)."
|
|
369
|
+
},
|
|
370
|
+
captureNetwork: {
|
|
371
|
+
type: "boolean",
|
|
372
|
+
description: "Record network requests during the run (default false)."
|
|
373
|
+
},
|
|
374
|
+
returnLogs: {
|
|
375
|
+
type: "boolean",
|
|
376
|
+
description: "Include the step log, capped at 4000 chars (default false)."
|
|
377
|
+
},
|
|
378
|
+
timeoutMs: {
|
|
379
|
+
type: "number",
|
|
380
|
+
description: "Abort the whole run after this many ms."
|
|
381
|
+
},
|
|
382
|
+
tabId: tabIdProp
|
|
383
|
+
},
|
|
384
|
+
required: ["flowId"]
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: TOOL_NAMES.RECORD_REPLAY.LIST_PUBLISHED,
|
|
389
|
+
description: "List the published record-replay flows (id, slug, name, version, description) that record_replay_flow_run can run.",
|
|
390
|
+
inputSchema: {
|
|
391
|
+
type: "object",
|
|
392
|
+
properties: {},
|
|
393
|
+
required: []
|
|
394
|
+
}
|
|
395
|
+
},
|
|
347
396
|
{
|
|
348
397
|
name: TOOL_NAMES.BROWSER.PERFORMANCE_START_TRACE,
|
|
349
398
|
description: "Start a performance trace on the selected page. Optionally reload and/or auto-stop after a short duration.",
|
|
@@ -613,14 +662,15 @@ var TOOL_SCHEMAS = [
|
|
|
613
662
|
refresh: {
|
|
614
663
|
type: "boolean",
|
|
615
664
|
description: "Refresh the active tab instead of navigating (url ignored). Default false."
|
|
616
|
-
}
|
|
665
|
+
},
|
|
666
|
+
task: { type: "string", description: P_TASK }
|
|
617
667
|
},
|
|
618
668
|
required: []
|
|
619
669
|
}
|
|
620
670
|
},
|
|
621
671
|
{
|
|
622
672
|
name: TOOL_NAMES.BROWSER.SCREENSHOT,
|
|
623
|
-
description: '[Prefer chrome_read_page, or chrome_computer action="screenshot"] Take a screenshot of the page or an element. Use this tool only when you need its advanced options.',
|
|
673
|
+
description: '[Prefer chrome_read_page, or chrome_computer action="screenshot"] Take a screenshot of the page or an element. Use this tool only when you need its advanced options. With storeBase64, the image arrives as a separate MCP image content block in image pixels (chrome_computer converts coordinates via imageScale automatically), not base64 in this text; a saved file path (savePng/saveToDownloads) is included in the response.',
|
|
624
674
|
inputSchema: {
|
|
625
675
|
type: "object",
|
|
626
676
|
properties: {
|
|
@@ -965,7 +1015,7 @@ var TOOL_SCHEMAS = [
|
|
|
965
1015
|
},
|
|
966
1016
|
{
|
|
967
1017
|
name: TOOL_NAMES.BROWSER.JAVASCRIPT,
|
|
968
|
-
description: "Execute JavaScript in a tab and return the result
|
|
1018
|
+
description: "Execute JavaScript in a tab and return the result, falling back automatically to a different execution path if the debugger is busy. Output is sanitized (sensitive data redacted) and truncated by default.",
|
|
969
1019
|
inputSchema: {
|
|
970
1020
|
type: "object",
|
|
971
1021
|
properties: {
|
|
@@ -1225,7 +1275,7 @@ var TOOL_SCHEMAS = [
|
|
|
1225
1275
|
},
|
|
1226
1276
|
{
|
|
1227
1277
|
name: TOOL_NAMES.BROWSER.FILE_UPLOAD,
|
|
1228
|
-
description: "Upload files to file-input form elements
|
|
1278
|
+
description: "Upload files to file-input form elements.",
|
|
1229
1279
|
inputSchema: {
|
|
1230
1280
|
type: "object",
|
|
1231
1281
|
properties: {
|
|
@@ -1264,7 +1314,7 @@ var TOOL_SCHEMAS = [
|
|
|
1264
1314
|
},
|
|
1265
1315
|
{
|
|
1266
1316
|
name: TOOL_NAMES.BROWSER.HANDLE_DIALOG,
|
|
1267
|
-
description: "Handle JavaScript dialogs (alert/confirm/prompt)
|
|
1317
|
+
description: "Handle JavaScript dialogs (alert/confirm/prompt).",
|
|
1268
1318
|
inputSchema: {
|
|
1269
1319
|
type: "object",
|
|
1270
1320
|
properties: {
|
|
@@ -1444,7 +1494,7 @@ var TOOL_SCHEMAS = [
|
|
|
1444
1494
|
// ===== auto-chrome-mcp fork (B1~B4) =====
|
|
1445
1495
|
{
|
|
1446
1496
|
name: TOOL_NAMES.BROWSER.STORAGE,
|
|
1447
|
-
description: "Read or modify cookies, localStorage, or sessionStorage.
|
|
1497
|
+
description: "Read or modify cookies, localStorage, or sessionStorage. VALUES are masked by default (names/domains/expiry still returned); pass includeValues:true only when you need the secrets.",
|
|
1448
1498
|
inputSchema: {
|
|
1449
1499
|
type: "object",
|
|
1450
1500
|
properties: {
|
|
@@ -1604,13 +1654,10 @@ var LANE_EXEMPT_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1604
1654
|
TOOL_NAMES.BROWSER.BOOKMARK_SEARCH,
|
|
1605
1655
|
TOOL_NAMES.BROWSER.BOOKMARK_ADD,
|
|
1606
1656
|
TOOL_NAMES.BROWSER.BOOKMARK_DELETE,
|
|
1607
|
-
TOOL_NAMES.BROWSER.REQUEST_USER_CONSENT
|
|
1608
|
-
// record_replay 두 도구는
|
|
1609
|
-
//
|
|
1610
|
-
//
|
|
1611
|
-
// 판단을 되풀이하지 않도록 남겨 둔다.
|
|
1612
|
-
TOOL_NAMES.RECORD_REPLAY.FLOW_RUN,
|
|
1613
|
-
TOOL_NAMES.RECORD_REPLAY.LIST_PUBLISHED
|
|
1657
|
+
TOOL_NAMES.BROWSER.REQUEST_USER_CONSENT
|
|
1658
|
+
// record_replay 두 도구는 여기 넣지 않는다. flow_run 은 레인별 작업 탭을 그대로 받아야
|
|
1659
|
+
// 하고(게이트의 TAB_ID_INJECT_TOOLS), list_published 도 같은 레인 인자를 달고 다니는 편이
|
|
1660
|
+
// 호출 형태가 일관된다.
|
|
1614
1661
|
]);
|
|
1615
1662
|
var LANE_DESCRIPTION_SHORT = "Parallel-agent lane id (same value every call). Omit if solo.";
|
|
1616
1663
|
var LANE_DESCRIPTION_LONG = "Parallel lane id. Sub-agents of one Claude Code session share one MCP session, so without a lane they overwrite each other's work tab. Give each concurrent agent a distinct lane (same value every call): a lane keeps its own work tab that no other lane closes or retargets.";
|
|
@@ -2627,7 +2674,6 @@ var DEFAULT_CODEX_CONFIG = {
|
|
|
2627
2674
|
export {
|
|
2628
2675
|
CODEX_AUTO_INSTRUCTIONS,
|
|
2629
2676
|
DEFAULT_CODEX_CONFIG,
|
|
2630
|
-
DEFAULT_SERVER_PORT,
|
|
2631
2677
|
EDGE_LABELS,
|
|
2632
2678
|
HOST_NAME,
|
|
2633
2679
|
NativeMessageType,
|