@getmagical/cli 0.2.8 → 0.2.9
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.js +420 -420
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7750,7 +7750,7 @@ function safeJsonParseWithoutLogging(json) {
|
|
|
7750
7750
|
}
|
|
7751
7751
|
|
|
7752
7752
|
// ../common/dist/src/constants/tool-declarations.js
|
|
7753
|
-
import { z as
|
|
7753
|
+
import { z as z13 } from "zod";
|
|
7754
7754
|
|
|
7755
7755
|
// ../common/dist/src/stdlib/state-machine.util.js
|
|
7756
7756
|
var StateMachine = class {
|
|
@@ -12490,6 +12490,266 @@ var reportStopDataSchema = z11.object({
|
|
|
12490
12490
|
output: z11.string().optional().describe('Put the user-requested result content here when asked to return it with reportStop. This is for unstructured results only; do not include statuses ("success", "fail") and do not place results in metadata.reasoning. If the user did not request return content, omit this field.')
|
|
12491
12491
|
});
|
|
12492
12492
|
|
|
12493
|
+
// ../common/dist/src/commands/commands.util.js
|
|
12494
|
+
var commandCategories = {
|
|
12495
|
+
action: "action",
|
|
12496
|
+
logic: "logic",
|
|
12497
|
+
navigation: "navigation",
|
|
12498
|
+
formsAndDropdowns: "formsAndDropdowns",
|
|
12499
|
+
files: "files",
|
|
12500
|
+
notesAndControl: "notesAndControl",
|
|
12501
|
+
specialCommands: "specialCommands",
|
|
12502
|
+
remoteFiles: "remoteFiles"
|
|
12503
|
+
};
|
|
12504
|
+
|
|
12505
|
+
// ../common/dist/src/commands/commands-registry/special.commands.js
|
|
12506
|
+
import { z as z12 } from "zod";
|
|
12507
|
+
|
|
12508
|
+
// ../common/dist/src/constants/som.js
|
|
12509
|
+
var SOM_LEGEND_HTML_ATTRIBUTES = [
|
|
12510
|
+
"alt",
|
|
12511
|
+
"aria-autocomplete",
|
|
12512
|
+
"aria-checked",
|
|
12513
|
+
"aria-haspopup",
|
|
12514
|
+
"aria-label",
|
|
12515
|
+
"aria-role",
|
|
12516
|
+
"autocomplete",
|
|
12517
|
+
"checked",
|
|
12518
|
+
"contenteditable",
|
|
12519
|
+
"disabled",
|
|
12520
|
+
"max",
|
|
12521
|
+
"maxlength",
|
|
12522
|
+
"min",
|
|
12523
|
+
"minlength",
|
|
12524
|
+
"multiple",
|
|
12525
|
+
"pattern",
|
|
12526
|
+
"placeholder",
|
|
12527
|
+
"readonly",
|
|
12528
|
+
"required",
|
|
12529
|
+
"role",
|
|
12530
|
+
"step",
|
|
12531
|
+
"title",
|
|
12532
|
+
"type"
|
|
12533
|
+
];
|
|
12534
|
+
|
|
12535
|
+
// ../common/dist/src/commands/commands-registry/special.commands.js
|
|
12536
|
+
var MARKDOWN_INDENT = "\xA0\xA0";
|
|
12537
|
+
var SOM_FILTER_VALIDATION_MESSAGE = "Select at least one include or exclude tag.";
|
|
12538
|
+
var SOM_FILTER_TAG_NAMES_VALIDATION_MESSAGE = "Select at least one tag.";
|
|
12539
|
+
var SOM_OVERLAP_VALIDATION_MESSAGE = "A tag cannot be in both include and exclude.";
|
|
12540
|
+
var SOM_FILTER_ADDITIONAL_LEGEND_HTML_ATTRIBUTE_OPTIONS = [
|
|
12541
|
+
...SOM_LEGEND_HTML_ATTRIBUTES,
|
|
12542
|
+
"href",
|
|
12543
|
+
"src"
|
|
12544
|
+
];
|
|
12545
|
+
var somFilterAdditionalLegendAttributeSchema = z12.string().trim().min(1);
|
|
12546
|
+
var somFilterBaseSchema = z12.object({
|
|
12547
|
+
includeMarks: withMetadata(z12.object({
|
|
12548
|
+
tagNames: z12.array(z12.string()),
|
|
12549
|
+
additionalLegendAttributes: z12.array(somFilterAdditionalLegendAttributeSchema).optional()
|
|
12550
|
+
}).optional(), {
|
|
12551
|
+
description: "The HTML tagNames to include",
|
|
12552
|
+
typeOverride: null
|
|
12553
|
+
}),
|
|
12554
|
+
excludeMarks: withMetadata(z12.object({
|
|
12555
|
+
tagNames: z12.array(z12.string())
|
|
12556
|
+
}).optional(), {
|
|
12557
|
+
description: "The HTML tagNames to exclude",
|
|
12558
|
+
typeOverride: null
|
|
12559
|
+
})
|
|
12560
|
+
});
|
|
12561
|
+
function addSomFilterValidationIssues(data, ctx) {
|
|
12562
|
+
const includeTags = data.includeMarks?.tagNames ?? [];
|
|
12563
|
+
const excludeTags = data.excludeMarks?.tagNames ?? [];
|
|
12564
|
+
const includeCount = includeTags.length;
|
|
12565
|
+
const excludeCount = excludeTags.length;
|
|
12566
|
+
if (includeCount > 0 || excludeCount > 0) {
|
|
12567
|
+
const includeSet = new Set(includeTags.map((t) => t.trim().toLowerCase()));
|
|
12568
|
+
const hasOverlap = excludeTags.some((tag) => includeSet.has(tag.trim().toLowerCase()));
|
|
12569
|
+
if (hasOverlap) {
|
|
12570
|
+
ctx.addIssue({
|
|
12571
|
+
code: "custom",
|
|
12572
|
+
message: SOM_OVERLAP_VALIDATION_MESSAGE,
|
|
12573
|
+
path: ["includeMarks"]
|
|
12574
|
+
});
|
|
12575
|
+
ctx.addIssue({
|
|
12576
|
+
code: "custom",
|
|
12577
|
+
message: SOM_OVERLAP_VALIDATION_MESSAGE,
|
|
12578
|
+
path: ["excludeMarks"]
|
|
12579
|
+
});
|
|
12580
|
+
}
|
|
12581
|
+
return;
|
|
12582
|
+
}
|
|
12583
|
+
ctx.addIssue({
|
|
12584
|
+
code: "custom",
|
|
12585
|
+
message: SOM_FILTER_VALIDATION_MESSAGE,
|
|
12586
|
+
path: ["includeMarks"]
|
|
12587
|
+
});
|
|
12588
|
+
ctx.addIssue({
|
|
12589
|
+
code: "custom",
|
|
12590
|
+
message: SOM_FILTER_VALIDATION_MESSAGE,
|
|
12591
|
+
path: ["excludeMarks"]
|
|
12592
|
+
});
|
|
12593
|
+
}
|
|
12594
|
+
var somFilterSchema = somFilterBaseSchema.extend({
|
|
12595
|
+
clearFilters: withMetadata(z12.boolean().default(false), {
|
|
12596
|
+
description: "Whether to clear current som filter",
|
|
12597
|
+
typeOverride: null
|
|
12598
|
+
})
|
|
12599
|
+
}).superRefine((data, ctx) => {
|
|
12600
|
+
if (data.clearFilters) {
|
|
12601
|
+
return;
|
|
12602
|
+
}
|
|
12603
|
+
addSomFilterValidationIssues(data, ctx);
|
|
12604
|
+
});
|
|
12605
|
+
var somFilterConfigMarksSchema = z12.object({
|
|
12606
|
+
tagNames: z12.array(z12.string().trim().min(1)).min(1, SOM_FILTER_TAG_NAMES_VALIDATION_MESSAGE)
|
|
12607
|
+
}).strict();
|
|
12608
|
+
var somFilterConfigAdditionalLegendAttributesSchema = z12.array(somFilterAdditionalLegendAttributeSchema).optional().describe("Additional HTML attributes to include in the SOM legend.");
|
|
12609
|
+
var somFilterConfigSchema = z12.union([
|
|
12610
|
+
z12.object({
|
|
12611
|
+
includeMarks: somFilterConfigMarksSchema.describe("The HTML tagNames to include."),
|
|
12612
|
+
additionalLegendAttributes: somFilterConfigAdditionalLegendAttributesSchema
|
|
12613
|
+
}).strict(),
|
|
12614
|
+
z12.object({
|
|
12615
|
+
excludeMarks: somFilterConfigMarksSchema.describe("The HTML tagNames to exclude."),
|
|
12616
|
+
additionalLegendAttributes: somFilterConfigAdditionalLegendAttributesSchema
|
|
12617
|
+
}).strict()
|
|
12618
|
+
]);
|
|
12619
|
+
var specialCommands = {
|
|
12620
|
+
callAPI: {
|
|
12621
|
+
category: commandCategories.specialCommands,
|
|
12622
|
+
description: "Call an API",
|
|
12623
|
+
environmentAgnostic: true,
|
|
12624
|
+
definition: {
|
|
12625
|
+
inputSchema: z12.object({
|
|
12626
|
+
api: withMetadata(z12.string().min(1), {
|
|
12627
|
+
description: "The name of the API to call",
|
|
12628
|
+
typeOverride: null
|
|
12629
|
+
})
|
|
12630
|
+
}),
|
|
12631
|
+
template: "Use the **callAPI** tool with {{api}}",
|
|
12632
|
+
tool: "callAPI"
|
|
12633
|
+
}
|
|
12634
|
+
},
|
|
12635
|
+
checkpoint: {
|
|
12636
|
+
category: commandCategories.specialCommands,
|
|
12637
|
+
description: "Record evidence for an important milestone",
|
|
12638
|
+
environmentAgnostic: true,
|
|
12639
|
+
definition: {
|
|
12640
|
+
inputSchema: z12.object({
|
|
12641
|
+
name: withMetadata(z12.string().min(1), {
|
|
12642
|
+
description: "The name of the checkpoint",
|
|
12643
|
+
typeOverride: null
|
|
12644
|
+
}),
|
|
12645
|
+
outcome: withMetadata(z12.string(), {
|
|
12646
|
+
description: "The expected outcome of the checkpoint",
|
|
12647
|
+
typeOverride: null
|
|
12648
|
+
}).optional(),
|
|
12649
|
+
screenshot: withMetadata(z12.enum(["Include", "Do not include"]), {
|
|
12650
|
+
description: "Whether to capture a screenshot for this checkpoint.",
|
|
12651
|
+
typeOverride: "radio"
|
|
12652
|
+
}).default("Include"),
|
|
12653
|
+
verificationRule: withMetadata(z12.string().min(1), {
|
|
12654
|
+
description: "The checkpoint-specific visual verification rule for the judge.",
|
|
12655
|
+
typeOverride: null
|
|
12656
|
+
}).optional()
|
|
12657
|
+
}),
|
|
12658
|
+
template: [
|
|
12659
|
+
"Use the **checkpoint** tool with:",
|
|
12660
|
+
`${MARKDOWN_INDENT}* name: {{name}}`,
|
|
12661
|
+
`${MARKDOWN_INDENT}* screenshot: {{screenshot}}`,
|
|
12662
|
+
`{{#if outcome}}${MARKDOWN_INDENT}* outputText: {{outcome}}{{/if}}`,
|
|
12663
|
+
`{{#if verificationRule}}${MARKDOWN_INDENT}* verificationRule: {{verificationRule}}{{/if}}`
|
|
12664
|
+
].join("\n"),
|
|
12665
|
+
tool: "checkpoint"
|
|
12666
|
+
}
|
|
12667
|
+
},
|
|
12668
|
+
custom: {
|
|
12669
|
+
category: commandCategories.specialCommands,
|
|
12670
|
+
description: "Write your own instructions",
|
|
12671
|
+
environmentAgnostic: true,
|
|
12672
|
+
definition: {
|
|
12673
|
+
inputSchema: z12.object({
|
|
12674
|
+
instructions: withMetadata(z12.string().min(1), {
|
|
12675
|
+
description: "The custom instructions to run for this step",
|
|
12676
|
+
typeOverride: null,
|
|
12677
|
+
allowLineBreaks: true
|
|
12678
|
+
})
|
|
12679
|
+
}),
|
|
12680
|
+
template: "{{{instructions}}}",
|
|
12681
|
+
tool: null
|
|
12682
|
+
}
|
|
12683
|
+
},
|
|
12684
|
+
getNDCFromMedication: {
|
|
12685
|
+
category: commandCategories.specialCommands,
|
|
12686
|
+
description: "Look up the best matching NDC for a medication using its details",
|
|
12687
|
+
environmentAgnostic: true,
|
|
12688
|
+
definition: {
|
|
12689
|
+
inputSchema: z12.object({
|
|
12690
|
+
roa: withMetadata(z12.string(), {
|
|
12691
|
+
description: "The route of administration of the medication",
|
|
12692
|
+
typeOverride: null
|
|
12693
|
+
}),
|
|
12694
|
+
name: withMetadata(z12.string(), {
|
|
12695
|
+
description: "The name of the medication",
|
|
12696
|
+
typeOverride: null
|
|
12697
|
+
}),
|
|
12698
|
+
supply: withMetadata(z12.string(), {
|
|
12699
|
+
description: "The supply of the medication",
|
|
12700
|
+
typeOverride: null
|
|
12701
|
+
}),
|
|
12702
|
+
quantity: withMetadata(z12.string(), {
|
|
12703
|
+
description: "The quantity of the medication",
|
|
12704
|
+
typeOverride: null
|
|
12705
|
+
}),
|
|
12706
|
+
strength: withMetadata(z12.string(), {
|
|
12707
|
+
description: "The strength of the medication",
|
|
12708
|
+
typeOverride: null
|
|
12709
|
+
})
|
|
12710
|
+
}),
|
|
12711
|
+
template: 'Use the **getNDCFromMedication** tool with:\n- ROA: "{{roa}}"\n- Name: "{{name}}"\n- Supply: "{{supply}}"\n- Quantity: "{{quantity}}"\n- Strength: "{{strength}}"',
|
|
12712
|
+
tool: "getNDCFromMedication"
|
|
12713
|
+
}
|
|
12714
|
+
},
|
|
12715
|
+
setCheckpointId: {
|
|
12716
|
+
category: commandCategories.specialCommands,
|
|
12717
|
+
description: "Set a unique ID used to group checkpoints",
|
|
12718
|
+
environmentAgnostic: true,
|
|
12719
|
+
definition: {
|
|
12720
|
+
inputSchema: z12.object({
|
|
12721
|
+
name: withMetadata(z12.string().min(1), {
|
|
12722
|
+
description: "The name of the checkpoint id",
|
|
12723
|
+
typeOverride: null
|
|
12724
|
+
}),
|
|
12725
|
+
value: withMetadata(z12.string().min(1), {
|
|
12726
|
+
description: "The value of the checkpoint id",
|
|
12727
|
+
typeOverride: null
|
|
12728
|
+
})
|
|
12729
|
+
}),
|
|
12730
|
+
template: 'Use the **setCheckpointId** tool with:\n- name: "{{name}}"\n- value: "{{value}}"',
|
|
12731
|
+
tool: "setCheckpointId"
|
|
12732
|
+
}
|
|
12733
|
+
},
|
|
12734
|
+
somFilter: {
|
|
12735
|
+
category: commandCategories.specialCommands,
|
|
12736
|
+
description: "Filter the SOM overlay so only relevant page elements are shown",
|
|
12737
|
+
whenToUse: "Browser runtime only. Use sparingly \u2014 default to no filter. Add a somFilter step only when the agent is repeatedly clicking distractor elements; place it before the action it should constrain, and reset with { clearFilters: true } when later steps need the full overlay back.",
|
|
12738
|
+
environmentAgnostic: false,
|
|
12739
|
+
definition: {
|
|
12740
|
+
browser: {
|
|
12741
|
+
inputSchema: somFilterSchema,
|
|
12742
|
+
template: "Use the **somFilter** tool with args `{{{json args}}}`",
|
|
12743
|
+
tool: "somFilter"
|
|
12744
|
+
},
|
|
12745
|
+
browserCoordinates: void 0,
|
|
12746
|
+
desktop: void 0,
|
|
12747
|
+
desktopApp: void 0,
|
|
12748
|
+
minimal: void 0
|
|
12749
|
+
}
|
|
12750
|
+
}
|
|
12751
|
+
};
|
|
12752
|
+
|
|
12493
12753
|
// ../common/dist/src/utils/automation-store-path.util.js
|
|
12494
12754
|
var AUTOMATION_STORE_ROOT_PATH = "store";
|
|
12495
12755
|
var relativeStorePathRegex = /^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*)*$/u;
|
|
@@ -12532,132 +12792,132 @@ function getCanonicalAutomationStoreMutationPath(path9) {
|
|
|
12532
12792
|
// ../common/dist/src/constants/tool-declarations.js
|
|
12533
12793
|
var COMMON_PARAMETERS_KEY = "metadata";
|
|
12534
12794
|
var COMMON_PARAMETERS_DESCRIPTION = `REQUIRED metadata object that must be provided with every tool call. This object contains context and tracking information that helps monitor agent progress and decision-making. MUST be provided as a JSON object (not a string) under the 'metadata' parameter for all tool calls.`;
|
|
12535
|
-
var DEFAULT_COMMON_PARAMETERS =
|
|
12536
|
-
reasoning:
|
|
12537
|
-
step:
|
|
12795
|
+
var DEFAULT_COMMON_PARAMETERS = z13.object({
|
|
12796
|
+
reasoning: z13.string().describe("Explain clearly why this tool is being used at this point. Include the goal it helps achieve and the context behind the decision."),
|
|
12797
|
+
step: z13.coerce.string().regex(/^[\dA-Za-z]+(?:\.[\dA-Za-z]+)*$/u, {
|
|
12538
12798
|
message: 'Step must follow the format of numbers separated by periods (e.g., "1", "1.2", "2.3.1")'
|
|
12539
12799
|
}).describe(String.raw`Indicate the exact step in the process where this tool is being used. MUST use a hierarchical numbering format like "1", "1.2", or "2.3.1" to reflect the structure of the workflow. MUST match this regex: /^[\dA-Za-z]+(?:\.[\dA-Za-z]+)*$/u`),
|
|
12540
|
-
isRetry:
|
|
12800
|
+
isRetry: z13.boolean().default(false).describe("Indicates whether this tool call is a retry of the previous step.")
|
|
12541
12801
|
}).describe(COMMON_PARAMETERS_DESCRIPTION);
|
|
12542
|
-
var scrollToTextPositionEnum =
|
|
12543
|
-
var agentToolSchema =
|
|
12544
|
-
agentId:
|
|
12545
|
-
args:
|
|
12802
|
+
var scrollToTextPositionEnum = z13.enum(["start", "center", "end"]);
|
|
12803
|
+
var agentToolSchema = z13.object({
|
|
12804
|
+
agentId: z13.string(),
|
|
12805
|
+
args: z13.unknown().optional()
|
|
12546
12806
|
});
|
|
12547
12807
|
var baseToolDeclarations = {
|
|
12548
12808
|
clickFill: {
|
|
12549
12809
|
id: "clickFill",
|
|
12550
12810
|
description: 'ONLY USE FOR TEXT INPUT FIELDS. This tool combines two actions: (1) clicking on a form input field and (2) typing text into it. NEVER use this for buttons, links, checkboxes, radio buttons, or any non-input elements. ONLY use when you need to enter text into a field. If you only want to click something without entering text, use "click" instead.',
|
|
12551
|
-
parameters:
|
|
12811
|
+
parameters: z13.object({
|
|
12552
12812
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12553
12813
|
marker: markerSchema("The marker of the input field to fill."),
|
|
12554
|
-
text:
|
|
12814
|
+
text: z13.string().describe("The text to fill the marker with")
|
|
12555
12815
|
})
|
|
12556
12816
|
},
|
|
12557
12817
|
click: {
|
|
12558
12818
|
id: "click",
|
|
12559
12819
|
description: 'ONLY USE FOR CLICKING WITHOUT ENTERING TEXT. This tool clicks on an element but DOES NOT allow entering text. Use for buttons, links, checkboxes, dropdown toggles, tabs, and other clickable elements. NEVER use this when you need to enter text into a field - for text entry, use "clickFill" instead, this tool automatically moves the cursor to the element, no need to use the move tool first.',
|
|
12560
|
-
parameters:
|
|
12820
|
+
parameters: z13.object({
|
|
12561
12821
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12562
12822
|
marker: markerSchema("The marker of the element to click."),
|
|
12563
|
-
clickType:
|
|
12823
|
+
clickType: z13.enum(["LEFT", "RIGHT", "MIDDLE", "DOUBLE", "TRIPLE"]).describe("The type of click to perform")
|
|
12564
12824
|
})
|
|
12565
12825
|
},
|
|
12566
12826
|
multiClick: {
|
|
12567
12827
|
id: "multiClick",
|
|
12568
12828
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
12569
|
-
parameters:
|
|
12829
|
+
parameters: z13.object({
|
|
12570
12830
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12571
|
-
markers:
|
|
12831
|
+
markers: z13.array(markerSchema("The marker of the element to click.")).min(1)
|
|
12572
12832
|
})
|
|
12573
12833
|
},
|
|
12574
12834
|
clickAndConfirm: {
|
|
12575
12835
|
id: "clickAndConfirm",
|
|
12576
12836
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
12577
|
-
parameters:
|
|
12837
|
+
parameters: z13.object({
|
|
12578
12838
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12579
12839
|
marker: markerSchema("The marker of the element to click."),
|
|
12580
|
-
clickType:
|
|
12581
|
-
promptMessage:
|
|
12840
|
+
clickType: z13.enum(["LEFT", "RIGHT", "MIDDLE", "DOUBLE", "TRIPLE"]).describe("The type of click to perform"),
|
|
12841
|
+
promptMessage: z13.string().min(1).describe("The prompt message to respond to.")
|
|
12582
12842
|
})
|
|
12583
12843
|
},
|
|
12584
12844
|
copy: {
|
|
12585
12845
|
id: "copy",
|
|
12586
12846
|
description: "Copy given text to the clipboard.",
|
|
12587
|
-
parameters:
|
|
12847
|
+
parameters: z13.object({
|
|
12588
12848
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12589
|
-
text:
|
|
12849
|
+
text: z13.string().describe("The text to copy to the clipboard.")
|
|
12590
12850
|
})
|
|
12591
12851
|
},
|
|
12592
12852
|
downloadFile: {
|
|
12593
12853
|
id: "downloadFile",
|
|
12594
12854
|
description: "Download a file in the browser by clicking on something",
|
|
12595
|
-
parameters:
|
|
12855
|
+
parameters: z13.object({
|
|
12596
12856
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12597
12857
|
marker: markerSchema("The marker to click on the page to initiate the download"),
|
|
12598
|
-
clickType:
|
|
12599
|
-
extension:
|
|
12858
|
+
clickType: z13.enum(["LEFT", "RIGHT", "MIDDLE", "DOUBLE", "TRIPLE"]).describe("The type of click to perform"),
|
|
12859
|
+
extension: z13.string().min(1).optional().describe("The extension of the downloaded document")
|
|
12600
12860
|
})
|
|
12601
12861
|
},
|
|
12602
12862
|
downloadNextDocumentRequest: {
|
|
12603
12863
|
id: "downloadNextDocumentRequest",
|
|
12604
12864
|
description: "Download file types that a browser doesn't automatically download (like images) by specifying the file extension and either clicking a marker or navigating to a URL. Must provide either marker or URL parameter.",
|
|
12605
|
-
parameters:
|
|
12865
|
+
parameters: z13.object({
|
|
12606
12866
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12607
12867
|
marker: markerSchema("The marker of the element that triggers the new page").optional(),
|
|
12608
|
-
clickType:
|
|
12609
|
-
url:
|
|
12610
|
-
extension:
|
|
12868
|
+
clickType: z13.enum(["LEFT", "RIGHT", "MIDDLE", "DOUBLE", "TRIPLE"]).optional().describe("The type of click to perform"),
|
|
12869
|
+
url: z13.url().optional().describe("The url to navigate to that triggers the new page"),
|
|
12870
|
+
extension: z13.string().describe("The extension of the downloaded document")
|
|
12611
12871
|
})
|
|
12612
12872
|
},
|
|
12613
12873
|
downloadNextNetworkRequest: {
|
|
12614
12874
|
id: "downloadNextNetworkRequest",
|
|
12615
12875
|
description: "Download the next network request by listening for a specific content type and resource type",
|
|
12616
|
-
parameters:
|
|
12876
|
+
parameters: z13.object({
|
|
12617
12877
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12618
|
-
clickType:
|
|
12619
|
-
extension:
|
|
12620
|
-
contentType:
|
|
12878
|
+
clickType: z13.enum(["LEFT", "RIGHT", "MIDDLE", "DOUBLE", "TRIPLE"]).describe("The type of click to perform"),
|
|
12879
|
+
extension: z13.string().describe("The extension of the downloaded document"),
|
|
12880
|
+
contentType: z13.string().describe("The content type of the network request"),
|
|
12621
12881
|
// The actual tool is using an enum for the resourceType
|
|
12622
|
-
resourceType:
|
|
12623
|
-
urlPattern:
|
|
12882
|
+
resourceType: z13.string().describe("The resource type of the network request"),
|
|
12883
|
+
urlPattern: z13.string().min(1).optional().describe("An optional regular expression pattern to match against the request URL")
|
|
12624
12884
|
})
|
|
12625
12885
|
},
|
|
12626
12886
|
printToPDF: {
|
|
12627
12887
|
id: "printToPDF",
|
|
12628
12888
|
description: "Print the current page to a PDF file",
|
|
12629
|
-
parameters:
|
|
12889
|
+
parameters: z13.object({
|
|
12630
12890
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
12631
12891
|
})
|
|
12632
12892
|
},
|
|
12633
12893
|
printFrameToPDF: {
|
|
12634
12894
|
id: "printFrameToPDF",
|
|
12635
12895
|
description: "Print the selected frame to a PDF file",
|
|
12636
|
-
parameters:
|
|
12896
|
+
parameters: z13.object({
|
|
12637
12897
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12638
|
-
frameSelector:
|
|
12898
|
+
frameSelector: z13.string().describe("The selector of the frame to print")
|
|
12639
12899
|
})
|
|
12640
12900
|
},
|
|
12641
12901
|
printFocusedFrameToPDF: {
|
|
12642
12902
|
id: "printFocusedFrameToPDF",
|
|
12643
12903
|
description: "Print the focused frame to a PDF file",
|
|
12644
|
-
parameters:
|
|
12904
|
+
parameters: z13.object({
|
|
12645
12905
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
12646
12906
|
})
|
|
12647
12907
|
},
|
|
12648
12908
|
capturePrintOutput: {
|
|
12649
12909
|
id: "capturePrintOutput",
|
|
12650
12910
|
description: "Capture the next printed content triggered by clicking an element, then save it as a PDF",
|
|
12651
|
-
parameters:
|
|
12911
|
+
parameters: z13.object({
|
|
12652
12912
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12653
12913
|
marker: markerSchema("The marker of the element that triggers the print request"),
|
|
12654
|
-
clickType:
|
|
12914
|
+
clickType: z13.enum(["LEFT", "RIGHT", "MIDDLE", "DOUBLE", "TRIPLE"]).optional().describe("The type of click to perform")
|
|
12655
12915
|
})
|
|
12656
12916
|
},
|
|
12657
12917
|
drag: {
|
|
12658
12918
|
id: "drag",
|
|
12659
12919
|
description: 'Perform a drag-and-drop operation by clicking at the "from" position, holding the mouse button down, and moving to the "to" position before releasing. Use this for dragging elements, sliders, or selecting text. If "from" is not provided, it will start from the current cursor position.',
|
|
12660
|
-
parameters:
|
|
12920
|
+
parameters: z13.object({
|
|
12661
12921
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12662
12922
|
from: markerSchema("The marker to drag from").optional(),
|
|
12663
12923
|
to: markerSchema("The marker to drag to")
|
|
@@ -12666,19 +12926,19 @@ var baseToolDeclarations = {
|
|
|
12666
12926
|
extractInfoFromFile: {
|
|
12667
12927
|
id: "extractInfoFromFile",
|
|
12668
12928
|
description: "Extract information from a previously downloaded file using specific prompts. Provide the file URL using `s3://{key}` and clearly defined extraction instructions.",
|
|
12669
|
-
parameters:
|
|
12929
|
+
parameters: z13.object({
|
|
12670
12930
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12671
|
-
filePath:
|
|
12672
|
-
extractions:
|
|
12673
|
-
name:
|
|
12674
|
-
prompt:
|
|
12931
|
+
filePath: z13.string().describe("The URI to the file, starting with s3://"),
|
|
12932
|
+
extractions: z13.array(z13.object({
|
|
12933
|
+
name: z13.string().describe("The name of the extraction"),
|
|
12934
|
+
prompt: z13.string().describe("Instructions on how to find")
|
|
12675
12935
|
}))
|
|
12676
12936
|
})
|
|
12677
12937
|
},
|
|
12678
12938
|
getDropdownOptions: {
|
|
12679
12939
|
id: "getDropdownOptions",
|
|
12680
12940
|
description: "Get dropdown option labels of a `<select>` dropdown element",
|
|
12681
|
-
parameters:
|
|
12941
|
+
parameters: z13.object({
|
|
12682
12942
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12683
12943
|
marker: markerSchema("The marker of the `<select>` dropdown to get option labels from")
|
|
12684
12944
|
})
|
|
@@ -12692,7 +12952,7 @@ var baseToolDeclarations = {
|
|
|
12692
12952
|
move: {
|
|
12693
12953
|
id: "move",
|
|
12694
12954
|
description: `Simply move the cursor to a marker location without clicking. Only use this when you need to position the cursor without performing any action, e.g. to make something appear upon hovering. For most interactions, use click or clickFill which already include cursor movement. Don't use this before "scroll", instead provide a marker to "scroll" that indicates the position to scroll from.`,
|
|
12695
|
-
parameters:
|
|
12955
|
+
parameters: z13.object({
|
|
12696
12956
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12697
12957
|
marker: markerSchema("The marker to move the mouse to")
|
|
12698
12958
|
})
|
|
@@ -12700,14 +12960,14 @@ var baseToolDeclarations = {
|
|
|
12700
12960
|
paste: {
|
|
12701
12961
|
id: "paste",
|
|
12702
12962
|
description: "Paste text from the clipboard.",
|
|
12703
|
-
parameters:
|
|
12963
|
+
parameters: z13.object({
|
|
12704
12964
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
12705
12965
|
})
|
|
12706
12966
|
},
|
|
12707
12967
|
pressKeys: {
|
|
12708
12968
|
id: "pressKeys",
|
|
12709
12969
|
description: "Press given keys",
|
|
12710
|
-
parameters:
|
|
12970
|
+
parameters: z13.object({
|
|
12711
12971
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12712
12972
|
...pressDataSchema.shape
|
|
12713
12973
|
})
|
|
@@ -12715,7 +12975,7 @@ var baseToolDeclarations = {
|
|
|
12715
12975
|
reportStop: {
|
|
12716
12976
|
id: "reportStop",
|
|
12717
12977
|
description: "Report that you have stopped either because you have succeeded in completing all your assigned tasks, or because you were told to do so. If the user asks to return something with it, put it in output (unstructured). Omit output if there is no extra info to return.",
|
|
12718
|
-
parameters:
|
|
12978
|
+
parameters: z13.object({
|
|
12719
12979
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12720
12980
|
...reportStopDataSchema.shape
|
|
12721
12981
|
})
|
|
@@ -12723,23 +12983,23 @@ var baseToolDeclarations = {
|
|
|
12723
12983
|
terminateRun: {
|
|
12724
12984
|
id: "terminateRun",
|
|
12725
12985
|
description: "End the whole run early using a configured termination code. This stops every agent in the run, not just the current one, and marks the run as early-terminated.",
|
|
12726
|
-
parameters:
|
|
12986
|
+
parameters: z13.object({
|
|
12727
12987
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12728
|
-
code:
|
|
12729
|
-
message:
|
|
12988
|
+
code: z13.enum(TerminationCodes).describe("A global termination code identifying why the run is ending early."),
|
|
12989
|
+
message: z13.string().max(TERMINATION_MESSAGE_MAX_LENGTH).optional().describe("Optional human-readable explanation for why the run is ending early.")
|
|
12730
12990
|
})
|
|
12731
12991
|
},
|
|
12732
12992
|
updateStoreValues: {
|
|
12733
12993
|
id: "updateStoreValues",
|
|
12734
12994
|
description: "Update values in the automation store. Set complete scalar or Object values, append one item or a list of items to array paths, replace complete arrays, and clear supported scalar, Object, or array paths in a single mutation.",
|
|
12735
|
-
parameters:
|
|
12995
|
+
parameters: z13.object({
|
|
12736
12996
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12737
|
-
updates:
|
|
12738
|
-
path:
|
|
12739
|
-
arrayMode:
|
|
12740
|
-
value:
|
|
12997
|
+
updates: z13.array(z13.object({
|
|
12998
|
+
path: z13.string().min(1).describe("Scalar or Object path to set, or array path to append to or replace, such as patient.name, patient, or documents. The root Store path is not supported."),
|
|
12999
|
+
arrayMode: z13.enum(["append", "appendList", "replace"]).optional().describe("Array mutation behavior. Omit or use append to add one item, use appendList to add every item in the supplied list, or use replace to set the complete array. Do not use this for scalar or Object paths."),
|
|
13000
|
+
value: z13.json().describe("Concrete JSON value for this update. Scalar and Object paths receive the complete value. Array append updates receive one item, appendList updates receive a list of items, and replacements receive the complete list.")
|
|
12741
13001
|
})).optional().describe("Store values to update. Omit or pass an empty array when only clearing values."),
|
|
12742
|
-
clears:
|
|
13002
|
+
clears: z13.array(z13.string().min(1)).optional().describe("Optional scalar or Object paths, or array Store paths, to clear. Clearing an array writes an empty list. Omit or pass an empty array when only updating values.")
|
|
12743
13003
|
}).superRefine((value, context) => {
|
|
12744
13004
|
const updates = value.updates ?? [];
|
|
12745
13005
|
const clears = value.clears ?? [];
|
|
@@ -12783,82 +13043,82 @@ var baseToolDeclarations = {
|
|
|
12783
13043
|
scroll: {
|
|
12784
13044
|
id: "scroll",
|
|
12785
13045
|
description: "Scroll the page in a specified direction by a defined amount at the specified location. Useful for navigating to content that is out of view",
|
|
12786
|
-
parameters:
|
|
13046
|
+
parameters: z13.object({
|
|
12787
13047
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12788
13048
|
...scrollDataSchema.shape,
|
|
12789
13049
|
// The previous mouse/cursor position is lost between workflow activities because we create a
|
|
12790
13050
|
// new Playwright client each time. See AGT-658 for details.
|
|
12791
|
-
marker:
|
|
13051
|
+
marker: z13.union([
|
|
12792
13052
|
markerSchema("The marker to move the cursor to before scrolling. This mark should usually have a scroll-distance-* attribute indicating the maximum distance that can be scrolled in a given direction."),
|
|
12793
|
-
|
|
13053
|
+
z13.enum(["body"]).describe('Specify the string "body" to scroll the top frame if there is no relevant marker.')
|
|
12794
13054
|
])
|
|
12795
13055
|
})
|
|
12796
13056
|
},
|
|
12797
13057
|
scrollToText: {
|
|
12798
13058
|
id: "scrollToText",
|
|
12799
13059
|
description: "Scroll the page until the specified text string is visible. Use when you need to locate and bring a certain piece of visible text into view.",
|
|
12800
|
-
parameters:
|
|
13060
|
+
parameters: z13.object({
|
|
12801
13061
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12802
|
-
text:
|
|
13062
|
+
text: z13.string().describe("The text to find and scroll to"),
|
|
12803
13063
|
scrollPosition: scrollToTextPositionEnum.optional().describe("The position the text should be relative to its scrollable container."),
|
|
12804
|
-
instance:
|
|
13064
|
+
instance: z13.number().int().min(1).default(1).describe("If there are multiple matching elements, indicate which occurrence the agent should be scrolled to.")
|
|
12805
13065
|
})
|
|
12806
13066
|
},
|
|
12807
13067
|
scrollToPattern: {
|
|
12808
13068
|
id: "scrollToPattern",
|
|
12809
13069
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
12810
|
-
parameters:
|
|
13070
|
+
parameters: z13.object({
|
|
12811
13071
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12812
|
-
pattern:
|
|
12813
|
-
flags:
|
|
13072
|
+
pattern: z13.string().min(1).describe("The regular expression to match."),
|
|
13073
|
+
flags: z13.string().regex(/^[dgimsuvy]*$/u, {
|
|
12814
13074
|
message: "Flags can only contain valid RegExp flag characters: d, g, i, m, s, u, v, y"
|
|
12815
13075
|
}).describe('The flags to use for the regular expression. Defaults to "iu" if not specified.').default("iu"),
|
|
12816
13076
|
scrollPosition: scrollToTextPositionEnum.optional().describe("The position the text should be relative to its scrollable container."),
|
|
12817
|
-
instance:
|
|
13077
|
+
instance: z13.number().int().min(1).default(1).describe("If there are multiple matching elements, indicate which occurrence the agent should be scrolled to.")
|
|
12818
13078
|
})
|
|
12819
13079
|
},
|
|
12820
13080
|
selectDropdownOptions: {
|
|
12821
13081
|
id: "selectDropdownOptions",
|
|
12822
13082
|
description: "Select dropdown options with the given label text, replacing existing selections.",
|
|
12823
|
-
parameters:
|
|
13083
|
+
parameters: z13.object({
|
|
12824
13084
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12825
13085
|
marker: markerSchema("The marker of the `<select>` dropdown to change"),
|
|
12826
|
-
labels:
|
|
13086
|
+
labels: z13.array(z13.string().describe("The label text of the dropdown option to select"))
|
|
12827
13087
|
})
|
|
12828
13088
|
},
|
|
12829
13089
|
type: {
|
|
12830
13090
|
id: "type",
|
|
12831
13091
|
description: "Type in the currently focused element. By default, this replaces the complete current value; updateMode can instead append or prepend the text.",
|
|
12832
|
-
parameters:
|
|
13092
|
+
parameters: z13.object({
|
|
12833
13093
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12834
|
-
text:
|
|
13094
|
+
text: z13.string().describe("The text to type"),
|
|
12835
13095
|
updateMode: updateModeSchema.optional().describe("How to combine the text with the current value. Defaults to replace.")
|
|
12836
13096
|
})
|
|
12837
13097
|
},
|
|
12838
13098
|
getNDCFromMedication: {
|
|
12839
13099
|
id: "getNDCFromMedication",
|
|
12840
13100
|
description: "Extract the National Drug Code (NDC) for a medication by providing detailed medication information including name, route of administration (roa), supply, quantity, and strength. Returns the standardized NDC identifier.",
|
|
12841
|
-
parameters:
|
|
13101
|
+
parameters: z13.object({
|
|
12842
13102
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12843
|
-
roa:
|
|
12844
|
-
name:
|
|
12845
|
-
supply:
|
|
12846
|
-
quantity:
|
|
12847
|
-
strength:
|
|
13103
|
+
roa: z13.string().describe("The route of administration of the medication"),
|
|
13104
|
+
name: z13.string().describe("The name of the medication"),
|
|
13105
|
+
supply: z13.string().describe("The supply of the medication"),
|
|
13106
|
+
quantity: z13.string().describe("The quantity of the medication"),
|
|
13107
|
+
strength: z13.string().describe("The strength of the medication")
|
|
12848
13108
|
})
|
|
12849
13109
|
},
|
|
12850
13110
|
navigateTo: {
|
|
12851
13111
|
id: "navigateTo",
|
|
12852
13112
|
description: "Navigate the browser to the specified URL. Use this when explicitly instructed to navigate to a URL.",
|
|
12853
|
-
parameters:
|
|
13113
|
+
parameters: z13.object({
|
|
12854
13114
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12855
|
-
url:
|
|
13115
|
+
url: z13.url().describe("The URL to navigate to")
|
|
12856
13116
|
})
|
|
12857
13117
|
},
|
|
12858
13118
|
navigateToLinkFromNewTab: {
|
|
12859
13119
|
id: "navigateToLinkFromNewTab",
|
|
12860
13120
|
description: "When clicking a link would open content in a new tab, this tool captures the destination URL and loads it in the current tab instead. Useful for links with target='_blank' or JavaScript-triggered new windows.",
|
|
12861
|
-
parameters:
|
|
13121
|
+
parameters: z13.object({
|
|
12862
13122
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12863
13123
|
marker: markerSchema("The item to click on which opens in a new tab.")
|
|
12864
13124
|
})
|
|
@@ -12866,97 +13126,97 @@ var baseToolDeclarations = {
|
|
|
12866
13126
|
listTabs: {
|
|
12867
13127
|
id: "listTabs",
|
|
12868
13128
|
description: "List all open tabs in the browser session, including each tab ID, URL, and whether it is active.",
|
|
12869
|
-
parameters:
|
|
13129
|
+
parameters: z13.object({
|
|
12870
13130
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
12871
13131
|
})
|
|
12872
13132
|
},
|
|
12873
13133
|
openNewTab: {
|
|
12874
13134
|
id: "openNewTab",
|
|
12875
13135
|
description: "Open a new browser tab, navigate it to the provided URL, and switch the active tab to it.",
|
|
12876
|
-
parameters:
|
|
13136
|
+
parameters: z13.object({
|
|
12877
13137
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12878
|
-
url:
|
|
13138
|
+
url: z13.url().describe("The URL to open in a new tab and navigate to.")
|
|
12879
13139
|
})
|
|
12880
13140
|
},
|
|
12881
13141
|
switchToTab: {
|
|
12882
13142
|
id: "switchToTab",
|
|
12883
13143
|
description: "Switch the active browser tab to the tab ID returned by listTabs.",
|
|
12884
|
-
parameters:
|
|
13144
|
+
parameters: z13.object({
|
|
12885
13145
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12886
|
-
tabId:
|
|
13146
|
+
tabId: z13.string().min(1).describe("The ID of the tab to activate.")
|
|
12887
13147
|
})
|
|
12888
13148
|
},
|
|
12889
13149
|
closeTabs: {
|
|
12890
13150
|
id: "closeTabs",
|
|
12891
13151
|
description: "Close one or more tabs by ID. At least one tab must remain open after closing.",
|
|
12892
|
-
parameters:
|
|
13152
|
+
parameters: z13.object({
|
|
12893
13153
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12894
|
-
tabIds:
|
|
13154
|
+
tabIds: z13.array(z13.string().min(1)).min(1).describe("A list of tab IDs to close.")
|
|
12895
13155
|
})
|
|
12896
13156
|
},
|
|
12897
13157
|
uploadFile: {
|
|
12898
13158
|
id: "uploadFile",
|
|
12899
13159
|
description: "Upload a file to a file input element in the browser. The filePath must be an S3 URI like s3://{key}",
|
|
12900
|
-
parameters:
|
|
13160
|
+
parameters: z13.object({
|
|
12901
13161
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12902
|
-
filePath:
|
|
13162
|
+
filePath: z13.string().describe("The URI to the file to upload like s3://{key}, it should be a valid URI to a file"),
|
|
12903
13163
|
marker: markerSchema("The marker of the element to upload the file to")
|
|
12904
13164
|
})
|
|
12905
13165
|
},
|
|
12906
13166
|
uploadScreenshot: {
|
|
12907
13167
|
id: "uploadScreenshot",
|
|
12908
13168
|
description: "Take a screenshot of the current view, optionally target a marked element or crop it to a bounding box, upload it to storage, and return a reference to the uploaded screenshot.",
|
|
12909
|
-
parameters:
|
|
13169
|
+
parameters: z13.object({
|
|
12910
13170
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12911
|
-
filename:
|
|
13171
|
+
filename: z13.string().regex(/^[\w-]+$/u, "Filename can only contain letters, numbers, underscores, and hyphens").optional().describe("Optional custom filename for the screenshot. If not provided, a unique filename will be generated."),
|
|
12912
13172
|
marker: markerSchema("Optional marker of the element to capture instead of the full screenshot.").optional(),
|
|
12913
|
-
boundingBox:
|
|
12914
|
-
x:
|
|
12915
|
-
y:
|
|
12916
|
-
width:
|
|
12917
|
-
height:
|
|
13173
|
+
boundingBox: z13.object({
|
|
13174
|
+
x: z13.number().int().min(0).describe("The left edge of the bounding box in screenshot coordinates."),
|
|
13175
|
+
y: z13.number().int().min(0).describe("The top edge of the bounding box in screenshot coordinates."),
|
|
13176
|
+
width: z13.number().int().positive().describe("The width of the bounding box in screenshot pixels."),
|
|
13177
|
+
height: z13.number().int().positive().describe("The height of the bounding box in screenshot pixels.")
|
|
12918
13178
|
}).optional().describe("Optional bounding box in screenshot coordinates for capturing only part of the current screenshot.")
|
|
12919
13179
|
})
|
|
12920
13180
|
},
|
|
12921
13181
|
wait: {
|
|
12922
13182
|
id: "wait",
|
|
12923
13183
|
description: "Wait the specified number of seconds before proceeding to the next action. Use when pages, elements, or processes need time to load or complete. No network idle check is performed after this tool.",
|
|
12924
|
-
parameters:
|
|
13184
|
+
parameters: z13.object({
|
|
12925
13185
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12926
|
-
seconds:
|
|
13186
|
+
seconds: z13.number().min(1).describe("The number of seconds to wait (must be at least 1)")
|
|
12927
13187
|
})
|
|
12928
13188
|
},
|
|
12929
13189
|
notepad: {
|
|
12930
13190
|
id: "notepad",
|
|
12931
13191
|
description: "Append information to the session's persistent notepad. Each call adds to the end and does not overwrite existing notes. Notes persist between tool calls and can be accessed throughout the entire session.",
|
|
12932
|
-
parameters:
|
|
13192
|
+
parameters: z13.object({
|
|
12933
13193
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12934
|
-
text:
|
|
13194
|
+
text: z13.string().describe("The text to write to the notepad")
|
|
12935
13195
|
})
|
|
12936
13196
|
},
|
|
12937
13197
|
setCheckpointId: {
|
|
12938
13198
|
id: "setCheckpointId",
|
|
12939
13199
|
description: "Set a context identifier for this agent run that labels all checkpoints within it. This allows filtering and grouping checkpoints by meaningful identifiers like patient ID, email, order number, etc. All iterations marked as checkpoints in this agent run will be associated with this identifier.",
|
|
12940
|
-
parameters:
|
|
13200
|
+
parameters: z13.object({
|
|
12941
13201
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12942
|
-
name:
|
|
12943
|
-
value:
|
|
13202
|
+
name: z13.string().describe('The identifier name/type (e.g., "patientId", "email", "orderId")'),
|
|
13203
|
+
value: z13.string().describe('The identifier value (e.g., "12345", "user@example.com", "ORD-789")')
|
|
12944
13204
|
})
|
|
12945
13205
|
},
|
|
12946
13206
|
checkpoint: {
|
|
12947
13207
|
id: "checkpoint",
|
|
12948
13208
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
12949
|
-
parameters:
|
|
13209
|
+
parameters: z13.object({
|
|
12950
13210
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
12951
13211
|
})
|
|
12952
13212
|
},
|
|
12953
13213
|
requestHumanIntervention: {
|
|
12954
13214
|
id: "requestHumanIntervention",
|
|
12955
13215
|
description: "Request intervention from a human. This tool should only be used when you are stuck and need to ask a human for help.",
|
|
12956
|
-
parameters:
|
|
13216
|
+
parameters: z13.object({
|
|
12957
13217
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12958
|
-
pauseReason:
|
|
12959
|
-
message:
|
|
13218
|
+
pauseReason: z13.enum(["UNEXPECTED_BLOCKER", "HUMAN_INPUT_EXPLICITLY_REQUESTED"]).describe("The reason for requesting human intervention. Use UNEXPECTED_BLOCKER when encountering unexpected issues that prevent progress, or HUMAN_INPUT_EXPLICITLY_REQUESTED when pausing was requested in the instructions."),
|
|
13219
|
+
message: z13.string().describe("The message to send to the human. This should be a clear and concise message that describes the problem you are facing.")
|
|
12960
13220
|
})
|
|
12961
13221
|
},
|
|
12962
13222
|
/**
|
|
@@ -12966,139 +13226,139 @@ var baseToolDeclarations = {
|
|
|
12966
13226
|
somFilter: {
|
|
12967
13227
|
id: "somFilter",
|
|
12968
13228
|
description: "IMPORTANT: DO NOT USE THIS TOOL. You are only allowed to use this tool if user specifically asks you to use it.",
|
|
12969
|
-
parameters:
|
|
13229
|
+
parameters: z13.object({
|
|
12970
13230
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12971
|
-
includeMarks:
|
|
12972
|
-
tagNames:
|
|
12973
|
-
additionalLegendAttributes:
|
|
13231
|
+
includeMarks: z13.object({
|
|
13232
|
+
tagNames: z13.array(z13.string()),
|
|
13233
|
+
additionalLegendAttributes: z13.array(z13.string()).optional()
|
|
12974
13234
|
}).describe("The marker tagNames to include").optional(),
|
|
12975
|
-
excludeMarks:
|
|
12976
|
-
tagNames:
|
|
13235
|
+
excludeMarks: z13.object({
|
|
13236
|
+
tagNames: z13.array(z13.string())
|
|
12977
13237
|
}).describe("The marker tagNames to exclude").optional(),
|
|
12978
|
-
clearFilters:
|
|
13238
|
+
clearFilters: z13.boolean().default(false).describe("Whether to clear current som filter")
|
|
12979
13239
|
})
|
|
12980
13240
|
},
|
|
12981
13241
|
fillCredential: {
|
|
12982
13242
|
id: "fillCredential",
|
|
12983
13243
|
description: "Enter a saved credential (e.g., username, password, or code) into the specified input field marked by a given marker. **You are only allowed to use this tool if user specifically asks you to use it.**",
|
|
12984
|
-
parameters:
|
|
13244
|
+
parameters: z13.object({
|
|
12985
13245
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
12986
13246
|
marker: markerSchema("The marker to fill the credential into"),
|
|
12987
|
-
credential:
|
|
12988
|
-
id:
|
|
12989
|
-
type:
|
|
13247
|
+
credential: z13.object({
|
|
13248
|
+
id: z13.string(),
|
|
13249
|
+
type: z13.enum([
|
|
12990
13250
|
"email",
|
|
12991
13251
|
"username",
|
|
12992
13252
|
"password",
|
|
12993
13253
|
"authenticatorCode",
|
|
12994
13254
|
"phoneAuthenticatorCode"
|
|
12995
13255
|
]),
|
|
12996
|
-
args:
|
|
13256
|
+
args: z13.record(z13.string(), z13.unknown())
|
|
12997
13257
|
})
|
|
12998
13258
|
})
|
|
12999
13259
|
},
|
|
13000
13260
|
readRemoteFile: {
|
|
13001
13261
|
id: "readRemoteFile",
|
|
13002
13262
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13003
|
-
parameters:
|
|
13263
|
+
parameters: z13.object({
|
|
13004
13264
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13005
13265
|
})
|
|
13006
13266
|
},
|
|
13007
13267
|
listRemoteFiles: {
|
|
13008
13268
|
id: "listRemoteFiles",
|
|
13009
13269
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13010
|
-
parameters:
|
|
13270
|
+
parameters: z13.object({
|
|
13011
13271
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13012
13272
|
})
|
|
13013
13273
|
},
|
|
13014
13274
|
writeRemoteFile: {
|
|
13015
13275
|
id: "writeRemoteFile",
|
|
13016
13276
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13017
|
-
parameters:
|
|
13277
|
+
parameters: z13.object({
|
|
13018
13278
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13019
13279
|
})
|
|
13020
13280
|
},
|
|
13021
13281
|
writeRemoteFileFromStorage: {
|
|
13022
13282
|
id: "writeRemoteFileFromStorage",
|
|
13023
13283
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13024
|
-
parameters:
|
|
13284
|
+
parameters: z13.object({
|
|
13025
13285
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13026
13286
|
})
|
|
13027
13287
|
},
|
|
13028
13288
|
reloadPage: {
|
|
13029
13289
|
id: "experimental_reloadPage",
|
|
13030
13290
|
description: "Reload the current page.",
|
|
13031
|
-
parameters:
|
|
13291
|
+
parameters: z13.object({
|
|
13032
13292
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13033
13293
|
})
|
|
13034
13294
|
},
|
|
13035
13295
|
navigateBack: {
|
|
13036
13296
|
id: "navigateBack",
|
|
13037
13297
|
description: "Navigate the browser to the previous page in the history.",
|
|
13038
|
-
parameters:
|
|
13298
|
+
parameters: z13.object({
|
|
13039
13299
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13040
13300
|
})
|
|
13041
13301
|
},
|
|
13042
13302
|
getCurrentUrl: {
|
|
13043
13303
|
id: "getCurrentUrl",
|
|
13044
13304
|
description: "Get the current URL of the web page. Returns the full URL including protocol, domain, path, and query parameters.",
|
|
13045
|
-
parameters:
|
|
13305
|
+
parameters: z13.object({
|
|
13046
13306
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13047
13307
|
})
|
|
13048
13308
|
},
|
|
13049
13309
|
getSelectedText: {
|
|
13050
13310
|
id: "getSelectedText",
|
|
13051
13311
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13052
|
-
parameters:
|
|
13312
|
+
parameters: z13.object({
|
|
13053
13313
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13054
13314
|
})
|
|
13055
13315
|
},
|
|
13056
13316
|
notify: {
|
|
13057
13317
|
id: "notify",
|
|
13058
13318
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13059
|
-
parameters:
|
|
13319
|
+
parameters: z13.object({
|
|
13060
13320
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13061
13321
|
})
|
|
13062
13322
|
},
|
|
13063
13323
|
readDownloadedFile: {
|
|
13064
13324
|
id: "readDownloadedFile",
|
|
13065
13325
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13066
|
-
parameters:
|
|
13326
|
+
parameters: z13.object({
|
|
13067
13327
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13068
13328
|
})
|
|
13069
13329
|
},
|
|
13070
13330
|
generateDownloadLink: {
|
|
13071
13331
|
id: "generateDownloadLink",
|
|
13072
13332
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13073
|
-
parameters:
|
|
13333
|
+
parameters: z13.object({
|
|
13074
13334
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13075
13335
|
})
|
|
13076
13336
|
},
|
|
13077
13337
|
fillCredentialsAndSubmit: {
|
|
13078
13338
|
id: "fillCredentialsAndSubmit",
|
|
13079
13339
|
description: "This object is deprecated, only adding here to satisfy the DB type check",
|
|
13080
|
-
parameters:
|
|
13340
|
+
parameters: z13.object({
|
|
13081
13341
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS
|
|
13082
13342
|
})
|
|
13083
13343
|
},
|
|
13084
13344
|
usePasskey: {
|
|
13085
13345
|
id: "usePasskey",
|
|
13086
13346
|
description: "Arm or use a selected passkey for the current site WebAuthn challenge. Use arm mode before navigating to a page that immediately requests a passkey; use authenticate mode to wait for WebAuthn and optionally click a target.",
|
|
13087
|
-
parameters:
|
|
13347
|
+
parameters: z13.object({
|
|
13088
13348
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
13089
|
-
mode:
|
|
13090
|
-
rpId:
|
|
13091
|
-
timeoutSeconds:
|
|
13092
|
-
target:
|
|
13349
|
+
mode: z13.enum(["authenticate", "arm"]).default("authenticate"),
|
|
13350
|
+
rpId: z13.string().min(1).optional(),
|
|
13351
|
+
timeoutSeconds: z13.number().int().min(1).max(300).default(60),
|
|
13352
|
+
target: z13.object({
|
|
13093
13353
|
marker: markerSchema("The marker of the element that triggers passkey authentication."),
|
|
13094
|
-
clickType:
|
|
13354
|
+
clickType: z13.enum(["LEFT", "RIGHT", "MIDDLE", "DOUBLE", "TRIPLE"]).default("LEFT").describe("The type of click to perform")
|
|
13095
13355
|
}).optional().describe("Optional element to click after the passkey wait has started in authenticate mode.")
|
|
13096
13356
|
})
|
|
13097
13357
|
},
|
|
13098
13358
|
callSpecializedAgent: {
|
|
13099
13359
|
id: "callSpecializedAgent",
|
|
13100
13360
|
description: "Call a specialized agent to complete a task.",
|
|
13101
|
-
parameters:
|
|
13361
|
+
parameters: z13.object({
|
|
13102
13362
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
13103
13363
|
agent: agentToolSchema
|
|
13104
13364
|
})
|
|
@@ -13106,31 +13366,31 @@ var baseToolDeclarations = {
|
|
|
13106
13366
|
queueAgents: {
|
|
13107
13367
|
id: "queueAgents",
|
|
13108
13368
|
description: "ONLY USE THIS IF EXPLICITLY MENTIONED IN THE INSTRUCTIONS. Queue a list of agents. When waitUponQueueing is true, this waits for every queued workflow in the call and returns their outputs.",
|
|
13109
|
-
parameters:
|
|
13369
|
+
parameters: z13.object({
|
|
13110
13370
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
13111
|
-
idempotencyKey:
|
|
13112
|
-
waitUponQueueing:
|
|
13113
|
-
queueItems:
|
|
13371
|
+
idempotencyKey: z13.string().optional(),
|
|
13372
|
+
waitUponQueueing: z13.boolean().optional().describe("Applies to every queued agent in this call. If true, wait for all queued workflows to finish and return their outputs before continuing."),
|
|
13373
|
+
queueItems: z13.array(agentToolSchema)
|
|
13114
13374
|
})
|
|
13115
13375
|
},
|
|
13116
13376
|
callAPI: {
|
|
13117
13377
|
id: "callAPI",
|
|
13118
13378
|
description: "Call an API to complete a task.",
|
|
13119
|
-
parameters:
|
|
13379
|
+
parameters: z13.object({
|
|
13120
13380
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
13121
|
-
api:
|
|
13381
|
+
api: z13.unknown()
|
|
13122
13382
|
})
|
|
13123
13383
|
},
|
|
13124
13384
|
generateObject: {
|
|
13125
13385
|
id: "generateObject",
|
|
13126
13386
|
description: "Generate an object using the AI.",
|
|
13127
|
-
parameters:
|
|
13387
|
+
parameters: z13.object({
|
|
13128
13388
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
13129
13389
|
model: modelConfigSchema,
|
|
13130
|
-
prompt:
|
|
13131
|
-
successMessage:
|
|
13132
|
-
schema:
|
|
13133
|
-
fileAssets:
|
|
13390
|
+
prompt: z13.string().describe("The prompt to use for the generation."),
|
|
13391
|
+
successMessage: z13.string().optional().describe("The success message to use for the generation."),
|
|
13392
|
+
schema: z13.custom().describe("The output schema to use for the generation."),
|
|
13393
|
+
fileAssets: z13.array(z13.string()).optional().describe("The file assets to use for the generation.")
|
|
13134
13394
|
})
|
|
13135
13395
|
}
|
|
13136
13396
|
};
|
|
@@ -13138,20 +13398,20 @@ var triggerAgentToolDeclarations = {
|
|
|
13138
13398
|
queueAgents: {
|
|
13139
13399
|
id: "queueAgents",
|
|
13140
13400
|
description: "ONLY USE THIS IF EXPLICITLY MENTIONED IN THE INSTRUCTIONS. Queue a list of agents. When waitUponQueueing is true, this waits for every queued workflow in the call and returns their outputs.",
|
|
13141
|
-
parameters:
|
|
13401
|
+
parameters: z13.object({
|
|
13142
13402
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
13143
|
-
idempotencyKey:
|
|
13144
|
-
runTime:
|
|
13403
|
+
idempotencyKey: z13.string().optional().describe("ONLY CALL THIS IF EXPLICITLY CALLED OUT, OTHERWISE LEAVE EMPTY. A unique identifier for this specific agent run to ensure exactly-once execution. If provided, the system guarantees that multiple queue operations with the same ID will only be executed once."),
|
|
13404
|
+
runTime: z13.string().datetime({
|
|
13145
13405
|
local: false
|
|
13146
13406
|
}).optional().describe("When should this run? ONLY CALL THIS IF EXPLICITLY CALLED OUT, OTHERWISE LEAVE EMPTY. Date time is in UTC and is a JS date string."),
|
|
13147
|
-
waitUponQueueing:
|
|
13148
|
-
queueItems:
|
|
13407
|
+
waitUponQueueing: z13.boolean().optional().describe("Applies to every queued agent in this call. If true, wait for all queued workflows to finish and return their outputs before continuing."),
|
|
13408
|
+
queueItems: z13.array(agentToolSchema)
|
|
13149
13409
|
})
|
|
13150
13410
|
},
|
|
13151
13411
|
callSpecializedAgent: {
|
|
13152
13412
|
id: "callSpecializedAgent",
|
|
13153
13413
|
description: "Call a specialized agent to complete a task.",
|
|
13154
|
-
parameters:
|
|
13414
|
+
parameters: z13.object({
|
|
13155
13415
|
[COMMON_PARAMETERS_KEY]: DEFAULT_COMMON_PARAMETERS,
|
|
13156
13416
|
agent: agentToolSchema
|
|
13157
13417
|
})
|
|
@@ -13164,273 +13424,13 @@ var allToolNames = [
|
|
|
13164
13424
|
...triggerAgentToolNames
|
|
13165
13425
|
];
|
|
13166
13426
|
function markerSchema(description) {
|
|
13167
|
-
return
|
|
13427
|
+
return z13.string().describe(`${description}
|
|
13168
13428
|
MUST match this regex: /^[A-NP-Z]+[1-9]$/`);
|
|
13169
13429
|
}
|
|
13170
13430
|
|
|
13171
|
-
// ../common/dist/src/constants/som.js
|
|
13172
|
-
var SOM_LEGEND_HTML_ATTRIBUTES = [
|
|
13173
|
-
"alt",
|
|
13174
|
-
"aria-autocomplete",
|
|
13175
|
-
"aria-checked",
|
|
13176
|
-
"aria-haspopup",
|
|
13177
|
-
"aria-label",
|
|
13178
|
-
"aria-role",
|
|
13179
|
-
"autocomplete",
|
|
13180
|
-
"checked",
|
|
13181
|
-
"contenteditable",
|
|
13182
|
-
"disabled",
|
|
13183
|
-
"max",
|
|
13184
|
-
"maxlength",
|
|
13185
|
-
"min",
|
|
13186
|
-
"minlength",
|
|
13187
|
-
"multiple",
|
|
13188
|
-
"pattern",
|
|
13189
|
-
"placeholder",
|
|
13190
|
-
"readonly",
|
|
13191
|
-
"required",
|
|
13192
|
-
"role",
|
|
13193
|
-
"step",
|
|
13194
|
-
"title",
|
|
13195
|
-
"type"
|
|
13196
|
-
];
|
|
13197
|
-
|
|
13198
13431
|
// ../common/dist/src/zod-schemas/agent-config.schema.js
|
|
13199
13432
|
import { z as z21 } from "zod";
|
|
13200
13433
|
|
|
13201
|
-
// ../common/dist/src/commands/commands-registry/special.commands.js
|
|
13202
|
-
import { z as z13 } from "zod";
|
|
13203
|
-
|
|
13204
|
-
// ../common/dist/src/commands/commands.util.js
|
|
13205
|
-
var commandCategories = {
|
|
13206
|
-
action: "action",
|
|
13207
|
-
logic: "logic",
|
|
13208
|
-
navigation: "navigation",
|
|
13209
|
-
formsAndDropdowns: "formsAndDropdowns",
|
|
13210
|
-
files: "files",
|
|
13211
|
-
notesAndControl: "notesAndControl",
|
|
13212
|
-
specialCommands: "specialCommands",
|
|
13213
|
-
remoteFiles: "remoteFiles"
|
|
13214
|
-
};
|
|
13215
|
-
|
|
13216
|
-
// ../common/dist/src/commands/commands-registry/special.commands.js
|
|
13217
|
-
var MARKDOWN_INDENT = "\xA0\xA0";
|
|
13218
|
-
var SOM_FILTER_VALIDATION_MESSAGE = "Select at least one include or exclude tag.";
|
|
13219
|
-
var SOM_FILTER_TAG_NAMES_VALIDATION_MESSAGE = "Select at least one tag.";
|
|
13220
|
-
var SOM_OVERLAP_VALIDATION_MESSAGE = "A tag cannot be in both include and exclude.";
|
|
13221
|
-
var SOM_FILTER_ADDITIONAL_LEGEND_HTML_ATTRIBUTE_OPTIONS = [
|
|
13222
|
-
...SOM_LEGEND_HTML_ATTRIBUTES,
|
|
13223
|
-
"href",
|
|
13224
|
-
"src"
|
|
13225
|
-
];
|
|
13226
|
-
var somFilterAdditionalLegendAttributeSchema = z13.string().trim().min(1);
|
|
13227
|
-
var somFilterBaseSchema = z13.object({
|
|
13228
|
-
includeMarks: withMetadata(z13.object({
|
|
13229
|
-
tagNames: z13.array(z13.string()),
|
|
13230
|
-
additionalLegendAttributes: z13.array(somFilterAdditionalLegendAttributeSchema).optional()
|
|
13231
|
-
}).optional(), {
|
|
13232
|
-
description: "The HTML tagNames to include",
|
|
13233
|
-
typeOverride: null
|
|
13234
|
-
}),
|
|
13235
|
-
excludeMarks: withMetadata(z13.object({
|
|
13236
|
-
tagNames: z13.array(z13.string())
|
|
13237
|
-
}).optional(), {
|
|
13238
|
-
description: "The HTML tagNames to exclude",
|
|
13239
|
-
typeOverride: null
|
|
13240
|
-
})
|
|
13241
|
-
});
|
|
13242
|
-
function addSomFilterValidationIssues(data, ctx) {
|
|
13243
|
-
const includeTags = data.includeMarks?.tagNames ?? [];
|
|
13244
|
-
const excludeTags = data.excludeMarks?.tagNames ?? [];
|
|
13245
|
-
const includeCount = includeTags.length;
|
|
13246
|
-
const excludeCount = excludeTags.length;
|
|
13247
|
-
if (includeCount > 0 || excludeCount > 0) {
|
|
13248
|
-
const includeSet = new Set(includeTags.map((t) => t.trim().toLowerCase()));
|
|
13249
|
-
const hasOverlap = excludeTags.some((tag) => includeSet.has(tag.trim().toLowerCase()));
|
|
13250
|
-
if (hasOverlap) {
|
|
13251
|
-
ctx.addIssue({
|
|
13252
|
-
code: "custom",
|
|
13253
|
-
message: SOM_OVERLAP_VALIDATION_MESSAGE,
|
|
13254
|
-
path: ["includeMarks"]
|
|
13255
|
-
});
|
|
13256
|
-
ctx.addIssue({
|
|
13257
|
-
code: "custom",
|
|
13258
|
-
message: SOM_OVERLAP_VALIDATION_MESSAGE,
|
|
13259
|
-
path: ["excludeMarks"]
|
|
13260
|
-
});
|
|
13261
|
-
}
|
|
13262
|
-
return;
|
|
13263
|
-
}
|
|
13264
|
-
ctx.addIssue({
|
|
13265
|
-
code: "custom",
|
|
13266
|
-
message: SOM_FILTER_VALIDATION_MESSAGE,
|
|
13267
|
-
path: ["includeMarks"]
|
|
13268
|
-
});
|
|
13269
|
-
ctx.addIssue({
|
|
13270
|
-
code: "custom",
|
|
13271
|
-
message: SOM_FILTER_VALIDATION_MESSAGE,
|
|
13272
|
-
path: ["excludeMarks"]
|
|
13273
|
-
});
|
|
13274
|
-
}
|
|
13275
|
-
var somFilterSchema = somFilterBaseSchema.extend({
|
|
13276
|
-
clearFilters: withMetadata(z13.boolean().default(false), {
|
|
13277
|
-
description: "Whether to clear current som filter",
|
|
13278
|
-
typeOverride: null
|
|
13279
|
-
})
|
|
13280
|
-
}).superRefine((data, ctx) => {
|
|
13281
|
-
if (data.clearFilters) {
|
|
13282
|
-
return;
|
|
13283
|
-
}
|
|
13284
|
-
addSomFilterValidationIssues(data, ctx);
|
|
13285
|
-
});
|
|
13286
|
-
var somFilterConfigMarksSchema = z13.object({
|
|
13287
|
-
tagNames: z13.array(z13.string().trim().min(1)).min(1, SOM_FILTER_TAG_NAMES_VALIDATION_MESSAGE)
|
|
13288
|
-
}).strict();
|
|
13289
|
-
var somFilterConfigAdditionalLegendAttributesSchema = z13.array(somFilterAdditionalLegendAttributeSchema).optional().describe("Additional HTML attributes to include in the SOM legend.");
|
|
13290
|
-
var somFilterConfigSchema = z13.union([
|
|
13291
|
-
z13.object({
|
|
13292
|
-
includeMarks: somFilterConfigMarksSchema.describe("The HTML tagNames to include."),
|
|
13293
|
-
additionalLegendAttributes: somFilterConfigAdditionalLegendAttributesSchema
|
|
13294
|
-
}).strict(),
|
|
13295
|
-
z13.object({
|
|
13296
|
-
excludeMarks: somFilterConfigMarksSchema.describe("The HTML tagNames to exclude."),
|
|
13297
|
-
additionalLegendAttributes: somFilterConfigAdditionalLegendAttributesSchema
|
|
13298
|
-
}).strict()
|
|
13299
|
-
]);
|
|
13300
|
-
var specialCommands = {
|
|
13301
|
-
callAPI: {
|
|
13302
|
-
category: commandCategories.specialCommands,
|
|
13303
|
-
description: "Call an API",
|
|
13304
|
-
environmentAgnostic: true,
|
|
13305
|
-
definition: {
|
|
13306
|
-
inputSchema: z13.object({
|
|
13307
|
-
api: withMetadata(z13.string().min(1), {
|
|
13308
|
-
description: "The name of the API to call",
|
|
13309
|
-
typeOverride: null
|
|
13310
|
-
})
|
|
13311
|
-
}),
|
|
13312
|
-
template: "Use the **callAPI** tool with {{api}}",
|
|
13313
|
-
tool: "callAPI"
|
|
13314
|
-
}
|
|
13315
|
-
},
|
|
13316
|
-
checkpoint: {
|
|
13317
|
-
category: commandCategories.specialCommands,
|
|
13318
|
-
description: "Record evidence for an important milestone",
|
|
13319
|
-
environmentAgnostic: true,
|
|
13320
|
-
definition: {
|
|
13321
|
-
inputSchema: z13.object({
|
|
13322
|
-
name: withMetadata(z13.string().min(1), {
|
|
13323
|
-
description: "The name of the checkpoint",
|
|
13324
|
-
typeOverride: null
|
|
13325
|
-
}),
|
|
13326
|
-
outcome: withMetadata(z13.string(), {
|
|
13327
|
-
description: "The expected outcome of the checkpoint",
|
|
13328
|
-
typeOverride: null
|
|
13329
|
-
}).optional(),
|
|
13330
|
-
screenshot: withMetadata(z13.enum(["Include", "Do not include"]), {
|
|
13331
|
-
description: "Whether to capture a screenshot for this checkpoint.",
|
|
13332
|
-
typeOverride: "radio"
|
|
13333
|
-
}).default("Include"),
|
|
13334
|
-
verificationRule: withMetadata(z13.string().min(1), {
|
|
13335
|
-
description: "The checkpoint-specific visual verification rule for the judge.",
|
|
13336
|
-
typeOverride: null
|
|
13337
|
-
}).optional()
|
|
13338
|
-
}),
|
|
13339
|
-
template: [
|
|
13340
|
-
"Use the **checkpoint** tool with:",
|
|
13341
|
-
`${MARKDOWN_INDENT}* name: {{name}}`,
|
|
13342
|
-
`${MARKDOWN_INDENT}* screenshot: {{screenshot}}`,
|
|
13343
|
-
`{{#if outcome}}${MARKDOWN_INDENT}* outputText: {{outcome}}{{/if}}`,
|
|
13344
|
-
`{{#if verificationRule}}${MARKDOWN_INDENT}* verificationRule: {{verificationRule}}{{/if}}`
|
|
13345
|
-
].join("\n"),
|
|
13346
|
-
tool: "checkpoint"
|
|
13347
|
-
}
|
|
13348
|
-
},
|
|
13349
|
-
custom: {
|
|
13350
|
-
category: commandCategories.specialCommands,
|
|
13351
|
-
description: "Write your own instructions",
|
|
13352
|
-
environmentAgnostic: true,
|
|
13353
|
-
definition: {
|
|
13354
|
-
inputSchema: z13.object({
|
|
13355
|
-
instructions: withMetadata(z13.string().min(1), {
|
|
13356
|
-
description: "The custom instructions to run for this step",
|
|
13357
|
-
typeOverride: null,
|
|
13358
|
-
allowLineBreaks: true
|
|
13359
|
-
})
|
|
13360
|
-
}),
|
|
13361
|
-
template: "{{{instructions}}}",
|
|
13362
|
-
tool: null
|
|
13363
|
-
}
|
|
13364
|
-
},
|
|
13365
|
-
getNDCFromMedication: {
|
|
13366
|
-
category: commandCategories.specialCommands,
|
|
13367
|
-
description: "Look up the best matching NDC for a medication using its details",
|
|
13368
|
-
environmentAgnostic: true,
|
|
13369
|
-
definition: {
|
|
13370
|
-
inputSchema: z13.object({
|
|
13371
|
-
roa: withMetadata(z13.string(), {
|
|
13372
|
-
description: "The route of administration of the medication",
|
|
13373
|
-
typeOverride: null
|
|
13374
|
-
}),
|
|
13375
|
-
name: withMetadata(z13.string(), {
|
|
13376
|
-
description: "The name of the medication",
|
|
13377
|
-
typeOverride: null
|
|
13378
|
-
}),
|
|
13379
|
-
supply: withMetadata(z13.string(), {
|
|
13380
|
-
description: "The supply of the medication",
|
|
13381
|
-
typeOverride: null
|
|
13382
|
-
}),
|
|
13383
|
-
quantity: withMetadata(z13.string(), {
|
|
13384
|
-
description: "The quantity of the medication",
|
|
13385
|
-
typeOverride: null
|
|
13386
|
-
}),
|
|
13387
|
-
strength: withMetadata(z13.string(), {
|
|
13388
|
-
description: "The strength of the medication",
|
|
13389
|
-
typeOverride: null
|
|
13390
|
-
})
|
|
13391
|
-
}),
|
|
13392
|
-
template: 'Use the **getNDCFromMedication** tool with:\n- ROA: "{{roa}}"\n- Name: "{{name}}"\n- Supply: "{{supply}}"\n- Quantity: "{{quantity}}"\n- Strength: "{{strength}}"',
|
|
13393
|
-
tool: "getNDCFromMedication"
|
|
13394
|
-
}
|
|
13395
|
-
},
|
|
13396
|
-
setCheckpointId: {
|
|
13397
|
-
category: commandCategories.specialCommands,
|
|
13398
|
-
description: "Set a unique ID used to group checkpoints",
|
|
13399
|
-
environmentAgnostic: true,
|
|
13400
|
-
definition: {
|
|
13401
|
-
inputSchema: z13.object({
|
|
13402
|
-
name: withMetadata(z13.string().min(1), {
|
|
13403
|
-
description: "The name of the checkpoint id",
|
|
13404
|
-
typeOverride: null
|
|
13405
|
-
}),
|
|
13406
|
-
value: withMetadata(z13.string().min(1), {
|
|
13407
|
-
description: "The value of the checkpoint id",
|
|
13408
|
-
typeOverride: null
|
|
13409
|
-
})
|
|
13410
|
-
}),
|
|
13411
|
-
template: 'Use the **setCheckpointId** tool with:\n- name: "{{name}}"\n- value: "{{value}}"',
|
|
13412
|
-
tool: "setCheckpointId"
|
|
13413
|
-
}
|
|
13414
|
-
},
|
|
13415
|
-
somFilter: {
|
|
13416
|
-
category: commandCategories.specialCommands,
|
|
13417
|
-
description: "Filter the SOM overlay so only relevant page elements are shown",
|
|
13418
|
-
whenToUse: "Browser runtime only. Use sparingly \u2014 default to no filter. Add a somFilter step only when the agent is repeatedly clicking distractor elements; place it before the action it should constrain, and reset with { clearFilters: true } when later steps need the full overlay back.",
|
|
13419
|
-
environmentAgnostic: false,
|
|
13420
|
-
definition: {
|
|
13421
|
-
browser: {
|
|
13422
|
-
inputSchema: somFilterSchema,
|
|
13423
|
-
template: "Use the **somFilter** tool with args `{{{json args}}}`",
|
|
13424
|
-
tool: "somFilter"
|
|
13425
|
-
},
|
|
13426
|
-
browserCoordinates: void 0,
|
|
13427
|
-
desktop: void 0,
|
|
13428
|
-
desktopApp: void 0,
|
|
13429
|
-
minimal: void 0
|
|
13430
|
-
}
|
|
13431
|
-
}
|
|
13432
|
-
};
|
|
13433
|
-
|
|
13434
13434
|
// ../common/dist/src/utils/agent-knowledge-base-assets.util.js
|
|
13435
13435
|
function getIsKnowledgeBaseAssetPathAllowed(path9) {
|
|
13436
13436
|
const pathSegments = path9.split("/");
|
|
@@ -15487,7 +15487,7 @@ query GetAutomationRuns(
|
|
|
15487
15487
|
operationName: "ListAutomations",
|
|
15488
15488
|
kind: "query",
|
|
15489
15489
|
inputSchema: z25.object({
|
|
15490
|
-
limit: z25.number().positive().optional(),
|
|
15490
|
+
limit: z25.number().int().positive().optional(),
|
|
15491
15491
|
order: jsonObjectSchema.optional(),
|
|
15492
15492
|
where: jsonObjectSchema.optional()
|
|
15493
15493
|
}),
|
|
@@ -15518,7 +15518,7 @@ query GetAutomationRuns(
|
|
|
15518
15518
|
document: `# Query to list automations with flat fields only (no nested objects)
|
|
15519
15519
|
# Excludes config and agents for MCP tool simplicity
|
|
15520
15520
|
query ListAutomations(
|
|
15521
|
-
$limit:
|
|
15521
|
+
$limit: Int
|
|
15522
15522
|
$order: AutomationsOrder
|
|
15523
15523
|
$where: AutomationsWhereInput
|
|
15524
15524
|
) {
|