dhalsim 0.1.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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +137 -0
  3. package/dhalsim-icon.png +0 -0
  4. package/dist/config/cmp-selectors.d.ts +9 -0
  5. package/dist/factory.d.ts +110 -0
  6. package/dist/gadgets/click.d.ts +57 -0
  7. package/dist/gadgets/content.d.ts +89 -0
  8. package/dist/gadgets/content.test.d.ts +1 -0
  9. package/dist/gadgets/form.d.ts +199 -0
  10. package/dist/gadgets/index.d.ts +12 -0
  11. package/dist/gadgets/interaction.test.d.ts +1 -0
  12. package/dist/gadgets/keyboard.d.ts +40 -0
  13. package/dist/gadgets/navigation.d.ts +143 -0
  14. package/dist/gadgets/navigation.test.d.ts +1 -0
  15. package/dist/gadgets/overlays.d.ts +42 -0
  16. package/dist/gadgets/page.d.ts +106 -0
  17. package/dist/gadgets/page.test.d.ts +1 -0
  18. package/dist/gadgets/script.d.ts +40 -0
  19. package/dist/gadgets/script.test.d.ts +1 -0
  20. package/dist/gadgets/scroll.d.ts +90 -0
  21. package/dist/gadgets/selection.d.ts +93 -0
  22. package/dist/gadgets/selector-validator.d.ts +29 -0
  23. package/dist/gadgets/selector-validator.test.d.ts +1 -0
  24. package/dist/gadgets/user-input.d.ts +46 -0
  25. package/dist/gadgets/wait.d.ts +85 -0
  26. package/dist/gadgets/wait.test.d.ts +1 -0
  27. package/dist/index.d.ts +5 -0
  28. package/dist/index.js +22722 -0
  29. package/dist/session/index.d.ts +4 -0
  30. package/dist/session/manager.d.ts +59 -0
  31. package/dist/session/manager.test.d.ts +1 -0
  32. package/dist/session/test-manager.d.ts +33 -0
  33. package/dist/session/types.d.ts +41 -0
  34. package/dist/state/index.d.ts +1 -0
  35. package/dist/state/page-state.d.ts +99 -0
  36. package/dist/state/page-state.test.d.ts +1 -0
  37. package/dist/stealth.d.ts +15 -0
  38. package/dist/subagents/dhalsim.d.ts +112 -0
  39. package/dist/subagents/dhalsim.test.d.ts +1 -0
  40. package/dist/subagents/index.d.ts +3 -0
  41. package/dist/subagents/prompts.d.ts +9 -0
  42. package/dist/utils/constants.d.ts +20 -0
  43. package/dist/utils/element-checks.d.ts +17 -0
  44. package/dist/utils/errors.d.ts +12 -0
  45. package/dist/utils/index.d.ts +6 -0
  46. package/package.json +88 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Zbigniew Sobiecki
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,137 @@
1
+ <img src="dhalsim-icon.png" width="120" align="right" alt="dhalsim" />
2
+
3
+ # dhalsim
4
+
5
+ [![npm version](https://img.shields.io/npm/v/dhalsim.svg)](https://www.npmjs.com/package/dhalsim)
6
+ [![CI](https://github.com/zbigniewsobiecki/dhalsim/actions/workflows/ci.yml/badge.svg)](https://github.com/zbigniewsobiecki/dhalsim/actions/workflows/ci.yml)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ Browser automation gadgets for [llmist](https://llmist.dev) agents using [Camoufox](https://camoufox.com) anti-detect browser.
10
+
11
+ ## Using with llmist CLI
12
+
13
+ Use dhalsim gadgets directly from the command line for quick tasks and testing.
14
+
15
+ ### Quick Start
16
+
17
+ ```bash
18
+ # Use the BrowseWeb subagent
19
+ bunx @llmist/cli agent "go to apple.com and find iPhone 16 Pro price" -g dhalsim:subagent
20
+
21
+ # Use all gadgets (for custom agent workflows)
22
+ bunx @llmist/cli agent "navigate to example.com" -g dhalsim
23
+
24
+ # Use readonly preset
25
+ bunx @llmist/cli agent "take a screenshot of google.com" -g dhalsim:readonly
26
+
27
+ # Use latest dev from GitHub (with BrowseWeb subagent)
28
+ bunx @llmist/cli agent "search google for llmist" -g git+https://github.com/zbigniewsobiecki/dhalsim.git#dev:subagent
29
+ ```
30
+
31
+ ### Configuration
32
+
33
+ Configure BrowseWeb subagent in `~/.llmist/cli.toml`:
34
+
35
+ ```toml
36
+ [subagents.BrowseWeb]
37
+ model = "sonnet" # LLM model for the subagent (default: sonnet)
38
+ maxIterations = 20 # Max agent loop iterations (default: 15)
39
+ headless = true # Run browser in headless mode (default: true)
40
+ ```
41
+
42
+ #### Per-profile configuration
43
+
44
+ ```toml
45
+ [develop.subagents.BrowseWeb]
46
+ headless = false # Show browser during development
47
+
48
+ [research.subagents.BrowseWeb]
49
+ maxIterations = 30 # More iterations for deep research
50
+ ```
51
+
52
+ #### Using "inherit" for model
53
+
54
+ ```toml
55
+ [subagents.BrowseWeb]
56
+ model = "inherit" # Use parent agent's model
57
+ ```
58
+
59
+ ### Custom Commands in cli.toml
60
+
61
+ ```toml
62
+ [my-research-command]
63
+ gadgets = [
64
+ "dhalsim:subagent", # from npm
65
+ "git+https://github.com/zbigniewsobiecki/dhalsim.git#dev:subagent", # from git
66
+ ]
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Using in Projects
72
+
73
+ Install dhalsim as a dependency and use gadgets programmatically.
74
+
75
+ ### Installation
76
+
77
+ ```bash
78
+ npm install dhalsim
79
+ # or
80
+ bun add dhalsim
81
+ ```
82
+
83
+ ### Using Dhalsim Subagent
84
+
85
+ ```typescript
86
+ import { LLMist } from 'llmist';
87
+ import { Dhalsim } from 'dhalsim';
88
+
89
+ const result = await LLMist.createAgent()
90
+ .withModel('sonnet')
91
+ .withGadgets(new Dhalsim())
92
+ .askAndCollect('Go to google.com and search for "playwright"');
93
+ ```
94
+
95
+ ### Using Individual Gadgets
96
+
97
+ ```typescript
98
+ import { LLMist } from 'llmist';
99
+ import { createGadgetsByPreset } from 'dhalsim';
100
+
101
+ const gadgets = createGadgetsByPreset('all');
102
+
103
+ const agent = LLMist.createAgent()
104
+ .withGadgets(...gadgets)
105
+ .ask('Navigate to example.com and take a screenshot');
106
+
107
+ for await (const event of agent.run()) {
108
+ // handle events
109
+ }
110
+ ```
111
+
112
+ ---
113
+
114
+ ## Presets
115
+
116
+ - `all` (default) - All gadgets
117
+ - `readonly` - Navigate, Screenshot, GetFullPageContent, ListPages
118
+ - `minimal` - Navigate, Screenshot, GetFullPageContent
119
+ - `subagent` - BrowseWeb subagent only
120
+
121
+ ## Available Gadgets
122
+
123
+ | Category | Gadgets |
124
+ |----------|---------|
125
+ | Page | NewPage, ClosePage, ListPages |
126
+ | Navigation | Navigate, GoBack, GoForward, Reload |
127
+ | Content | GetFullPageContent, Screenshot |
128
+ | Interaction | Click, Type, Fill, FillForm, PressKey, Select, Check, Hover, Scroll, DismissOverlays |
129
+ | Script | ExecuteScript |
130
+ | Wait | WaitForElement, Wait |
131
+ | User Input | RequestUserAssistance |
132
+
133
+ ## Subagents
134
+
135
+ ### BrowseWeb
136
+
137
+ Autonomous browser agent that can navigate, interact, and extract information from websites. Runs its own agent loop internally, making it suitable for complex multi-step web tasks.
Binary file
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Language-agnostic CMP accept button selectors (from CHI 2025 research paper).
3
+ * These work regardless of language because they target CMP-specific class/id patterns.
4
+ */
5
+ export declare const CMP_ACCEPT_SELECTORS: readonly ["#cmpwelcomebtnyes", ".cmpboxbtnyes", "[class*=\"cmpbox\"] .cmpboxbtnyes", "[class*=\"cmpbox\"] button:first-of-type", "#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll", "#CybotCookiebotDialogBodyButtonAccept", "[data-testid=\"uc-accept-all-button\"]", ".uc-accept-all-btn", "button[class*=\"usercentrics\"][class*=\"accept\"]", "#onetrust-accept-btn-handler", ".onetrust-accept-btn-handler", "button[class*=\"onetrust\"][class*=\"accept\"]", "[data-cky-tag=\"accept-button\"]", ".cky-btn-accept", "button[class*=\"cky\"][class*=\"accept\"]", ".osano-cm-accept-all", ".cc-accept", ".cc-btn.cc-allow", "[class*=\"coi-\"] button[class*=\"accept\"]", ".coi-banner__accept", "#didomi-notice-agree-button", "[class*=\"didomi\"] button[class*=\"agree\"]", ".iubenda-cs-accept-btn", "[class*=\"iubenda\"] button[class*=\"accept\"]", "#tarteaucitronAllAllowed", ".tarteaucitronAllow", ".cmplz-accept", "button[class*=\"cmplz\"][class*=\"accept\"]", ".qc-cmp2-summary-buttons button:first-child", "[class*=\"qc-cmp\"] button[class*=\"accept\"]", "#cookiescript_accept", ".cookiescript_accept", ".cc_btn.cc_btn_accept_all", "[class*=\"termsfeed\"] button[class*=\"accept\"]", ".moove-gdpr-infobar-allow-all", "[class*=\"moove-gdpr\"] button[class*=\"allow\"]", "[class*=\"borlabs\"] button[class*=\"accept\"]", ".BorlabsCookie .accept", ".ccc-accept-button", "[class*=\"consent\"][class*=\"accept\"]", "[id*=\"consent\"][id*=\"accept\"]", "[class*=\"cookie\"][class*=\"accept\"]", "[id*=\"cookie\"][id*=\"accept\"]", "[class*=\"gdpr\"][class*=\"accept\"]", "[id*=\"gdpr\"][id*=\"accept\"]", "[class*=\"privacy\"][class*=\"accept\"]", "[data-testid*=\"accept\"]", "[data-action*=\"accept\"]", "[class*=\"modal\"] button[class*=\"close\"]", "[class*=\"overlay\"] button[class*=\"close\"]", "[aria-label=\"Close\"]", "button[aria-label=\"Dismiss\"]"];
6
+ /**
7
+ * Overlay selectors for last resort DOM hiding.
8
+ */
9
+ export declare const OVERLAY_SELECTORS: readonly ["[id*=\"cookie\"]", "[class*=\"cookie\"]", "[id*=\"consent\"]", "[class*=\"consent\"]", "[id*=\"cmp\"]", "[class*=\"cmp\"]", "[class*=\"gdpr\"]", "[class*=\"privacy\"]", "[class*=\"overlay\"]", "[class*=\"modal\"]", "[class*=\"popup\"]", "[class*=\"banner\"]"];
@@ -0,0 +1,110 @@
1
+ import type { AbstractGadget } from "llmist";
2
+ import type { IBrowserSessionManager } from "./session/types";
3
+ import { GetFullPageContent, Screenshot } from "./gadgets/content";
4
+ import { Click } from "./gadgets/click";
5
+ import { Type, Fill, FillForm, FillPinCode } from "./gadgets/form";
6
+ import { PressKey } from "./gadgets/keyboard";
7
+ import { Select, Check } from "./gadgets/selection";
8
+ import { Hover, Scroll } from "./gadgets/scroll";
9
+ import { DismissOverlays } from "./gadgets/overlays";
10
+ import { GoBack, GoForward, Navigate, Reload } from "./gadgets/navigation";
11
+ import { ClosePage, ListPages, NewPage } from "./gadgets/page";
12
+ import { ExecuteScript } from "./gadgets/script";
13
+ import { RequestUserAssistance } from "./gadgets/user-input";
14
+ import { Wait, WaitForElement } from "./gadgets/wait";
15
+ /**
16
+ * Configuration for creating dhalsim gadgets.
17
+ */
18
+ export interface DhalsimConfig {
19
+ /**
20
+ * Browser session manager to use. If not provided, uses the default singleton.
21
+ */
22
+ sessionManager?: IBrowserSessionManager;
23
+ }
24
+ /**
25
+ * All dhalsim gadgets as a record keyed by name.
26
+ */
27
+ export interface DhalsimGadgets {
28
+ GetFullPageContent: GetFullPageContent;
29
+ Screenshot: Screenshot;
30
+ Check: Check;
31
+ Click: Click;
32
+ DismissOverlays: DismissOverlays;
33
+ Fill: Fill;
34
+ FillForm: FillForm;
35
+ FillPinCode: FillPinCode;
36
+ Hover: Hover;
37
+ PressKey: PressKey;
38
+ Scroll: Scroll;
39
+ Select: Select;
40
+ Type: Type;
41
+ GoBack: GoBack;
42
+ GoForward: GoForward;
43
+ Navigate: Navigate;
44
+ Reload: Reload;
45
+ ClosePage: ClosePage;
46
+ ListPages: ListPages;
47
+ NewPage: NewPage;
48
+ ExecuteScript: ExecuteScript;
49
+ RequestUserAssistance: RequestUserAssistance;
50
+ Wait: Wait;
51
+ WaitForElement: WaitForElement;
52
+ }
53
+ /**
54
+ * Create all dhalsim gadgets with dependency injection.
55
+ *
56
+ * @param config - Optional configuration (sessionManager)
57
+ * @returns Record of all gadgets keyed by name
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * // Use default session manager (CLI usage)
62
+ * const gadgets = createDhalsimGadgets();
63
+ *
64
+ * // Use custom session manager (library usage)
65
+ * const gadgets = createDhalsimGadgets({
66
+ * sessionManager: myCustomSessionManager,
67
+ * });
68
+ *
69
+ * // Access individual gadgets
70
+ * registry.register('Navigate', gadgets.Navigate);
71
+ * ```
72
+ */
73
+ export declare function createDhalsimGadgets(config?: DhalsimConfig): DhalsimGadgets;
74
+ /**
75
+ * Preset names for common gadget combinations.
76
+ */
77
+ export type DhalsimPreset = "all" | "subagent" | "readonly" | "minimal";
78
+ /**
79
+ * Get gadgets by preset name.
80
+ *
81
+ * @param preset - Preset name
82
+ * @param config - Optional configuration
83
+ * @returns Array of gadgets for the preset
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * // Get all gadgets as array
88
+ * const allGadgets = createGadgetsByPreset('all');
89
+ *
90
+ * // Get read-only gadgets (Navigate, Screenshot, GetFullPageContent, ListPages)
91
+ * const readonlyGadgets = createGadgetsByPreset('readonly');
92
+ *
93
+ * // Get minimal gadgets (Navigate, Screenshot, GetFullPageContent)
94
+ * const minimalGadgets = createGadgetsByPreset('minimal');
95
+ * ```
96
+ */
97
+ export declare function createGadgetsByPreset(preset: DhalsimPreset, config?: DhalsimConfig): AbstractGadget[];
98
+ /**
99
+ * Get gadgets by name(s).
100
+ *
101
+ * @param names - Array of gadget names to include
102
+ * @param config - Optional configuration
103
+ * @returns Array of matching gadgets
104
+ *
105
+ * @example
106
+ * ```typescript
107
+ * const gadgets = createGadgetsByName(['Navigate', 'Click', 'Screenshot']);
108
+ * ```
109
+ */
110
+ export declare function createGadgetsByName(names: string[], config?: DhalsimConfig): AbstractGadget[];
@@ -0,0 +1,57 @@
1
+ import { z } from "llmist";
2
+ import type { IBrowserSessionManager } from "../session";
3
+ declare const Click_base: new () => {
4
+ description: string;
5
+ parameterSchema: z.ZodObject<{
6
+ pageId: z.ZodString;
7
+ selector: z.ZodString;
8
+ button: z.ZodDefault<z.ZodEnum<{
9
+ left: "left";
10
+ right: "right";
11
+ middle: "middle";
12
+ }>>;
13
+ clickCount: z.ZodDefault<z.ZodNumber>;
14
+ force: z.ZodDefault<z.ZodBoolean>;
15
+ }, z.core.$strip>;
16
+ name: string | undefined;
17
+ timeoutMs: number | undefined;
18
+ examples: import("llmist").GadgetExample<{
19
+ pageId: string;
20
+ selector: string;
21
+ button: "left" | "right" | "middle";
22
+ clickCount: number;
23
+ force: boolean;
24
+ }>[] | undefined;
25
+ readonly params: {
26
+ pageId: string;
27
+ selector: string;
28
+ button: "left" | "right" | "middle";
29
+ clickCount: number;
30
+ force: boolean;
31
+ };
32
+ execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
33
+ throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
34
+ onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
35
+ createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
36
+ readonly instruction: string;
37
+ getInstruction(optionsOrArgPrefix?: string | {
38
+ argPrefix?: string;
39
+ startPrefix?: string;
40
+ endPrefix?: string;
41
+ }): string;
42
+ } & {
43
+ params: {
44
+ pageId: string;
45
+ selector: string;
46
+ button: "left" | "right" | "middle";
47
+ clickCount: number;
48
+ force: boolean;
49
+ };
50
+ };
51
+ export declare class Click extends Click_base {
52
+ private manager;
53
+ private lastClickedSelector;
54
+ constructor(manager: IBrowserSessionManager);
55
+ execute(params: this["params"]): Promise<string>;
56
+ }
57
+ export {};
@@ -0,0 +1,89 @@
1
+ import { z, type GadgetExecuteResultWithMedia } from "llmist";
2
+ import type { IBrowserSessionManager } from "../session";
3
+ declare const GetFullPageContent_base: new () => {
4
+ description: string;
5
+ parameterSchema: z.ZodObject<{
6
+ pageId: z.ZodString;
7
+ selector: z.ZodOptional<z.ZodString>;
8
+ selectors: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ structure: z.ZodOptional<z.ZodBoolean>;
10
+ }, z.core.$strip>;
11
+ name: string | undefined;
12
+ timeoutMs: number | undefined;
13
+ examples: import("llmist").GadgetExample<{
14
+ pageId: string;
15
+ selector?: string | undefined;
16
+ selectors?: string[] | undefined;
17
+ structure?: boolean | undefined;
18
+ }>[] | undefined;
19
+ readonly params: {
20
+ pageId: string;
21
+ selector?: string | undefined;
22
+ selectors?: string[] | undefined;
23
+ structure?: boolean | undefined;
24
+ };
25
+ execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
26
+ throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
27
+ onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
28
+ createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
29
+ readonly instruction: string;
30
+ getInstruction(optionsOrArgPrefix?: string | {
31
+ argPrefix?: string;
32
+ startPrefix?: string;
33
+ endPrefix?: string;
34
+ }): string;
35
+ } & {
36
+ params: {
37
+ pageId: string;
38
+ selector?: string | undefined;
39
+ selectors?: string[] | undefined;
40
+ structure?: boolean | undefined;
41
+ };
42
+ };
43
+ export declare class GetFullPageContent extends GetFullPageContent_base {
44
+ private manager;
45
+ constructor(manager: IBrowserSessionManager);
46
+ execute(params: this["params"]): Promise<string>;
47
+ }
48
+ declare const Screenshot_base: new () => {
49
+ description: string;
50
+ parameterSchema: z.ZodObject<{
51
+ pageId: z.ZodString;
52
+ fullPage: z.ZodDefault<z.ZodBoolean>;
53
+ selector: z.ZodOptional<z.ZodString>;
54
+ }, z.core.$strip>;
55
+ name: string | undefined;
56
+ timeoutMs: number | undefined;
57
+ examples: import("llmist").GadgetExample<{
58
+ pageId: string;
59
+ fullPage: boolean;
60
+ selector?: string | undefined;
61
+ }>[] | undefined;
62
+ readonly params: {
63
+ pageId: string;
64
+ fullPage: boolean;
65
+ selector?: string | undefined;
66
+ };
67
+ execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
68
+ throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
69
+ onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
70
+ createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
71
+ readonly instruction: string;
72
+ getInstruction(optionsOrArgPrefix?: string | {
73
+ argPrefix?: string;
74
+ startPrefix?: string;
75
+ endPrefix?: string;
76
+ }): string;
77
+ } & {
78
+ params: {
79
+ pageId: string;
80
+ fullPage: boolean;
81
+ selector?: string | undefined;
82
+ };
83
+ };
84
+ export declare class Screenshot extends Screenshot_base {
85
+ private manager;
86
+ constructor(manager: IBrowserSessionManager);
87
+ execute(params: this["params"]): Promise<string | GadgetExecuteResultWithMedia>;
88
+ }
89
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,199 @@
1
+ import { z } from "llmist";
2
+ import type { IBrowserSessionManager } from "../session";
3
+ declare const Type_base: new () => {
4
+ description: string;
5
+ parameterSchema: z.ZodObject<{
6
+ pageId: z.ZodString;
7
+ selector: z.ZodString;
8
+ text: z.ZodString;
9
+ delay: z.ZodDefault<z.ZodNumber>;
10
+ }, z.core.$strip>;
11
+ name: string | undefined;
12
+ timeoutMs: number | undefined;
13
+ examples: import("llmist").GadgetExample<{
14
+ pageId: string;
15
+ selector: string;
16
+ text: string;
17
+ delay: number;
18
+ }>[] | undefined;
19
+ readonly params: {
20
+ pageId: string;
21
+ selector: string;
22
+ text: string;
23
+ delay: number;
24
+ };
25
+ execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
26
+ throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
27
+ onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
28
+ createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
29
+ readonly instruction: string;
30
+ getInstruction(optionsOrArgPrefix?: string | {
31
+ argPrefix?: string;
32
+ startPrefix?: string;
33
+ endPrefix?: string;
34
+ }): string;
35
+ } & {
36
+ params: {
37
+ pageId: string;
38
+ selector: string;
39
+ text: string;
40
+ delay: number;
41
+ };
42
+ };
43
+ export declare class Type extends Type_base {
44
+ private manager;
45
+ constructor(manager: IBrowserSessionManager);
46
+ execute(params: this["params"]): Promise<string>;
47
+ }
48
+ declare const Fill_base: new () => {
49
+ description: string;
50
+ parameterSchema: z.ZodObject<{
51
+ pageId: z.ZodString;
52
+ selector: z.ZodString;
53
+ value: z.ZodString;
54
+ }, z.core.$strip>;
55
+ name: string | undefined;
56
+ timeoutMs: number | undefined;
57
+ examples: import("llmist").GadgetExample<{
58
+ pageId: string;
59
+ selector: string;
60
+ value: string;
61
+ }>[] | undefined;
62
+ readonly params: {
63
+ pageId: string;
64
+ selector: string;
65
+ value: string;
66
+ };
67
+ execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
68
+ throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
69
+ onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
70
+ createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
71
+ readonly instruction: string;
72
+ getInstruction(optionsOrArgPrefix?: string | {
73
+ argPrefix?: string;
74
+ startPrefix?: string;
75
+ endPrefix?: string;
76
+ }): string;
77
+ } & {
78
+ params: {
79
+ pageId: string;
80
+ selector: string;
81
+ value: string;
82
+ };
83
+ };
84
+ export declare class Fill extends Fill_base {
85
+ private manager;
86
+ constructor(manager: IBrowserSessionManager);
87
+ execute(params: this["params"]): Promise<string>;
88
+ }
89
+ declare const FillForm_base: new () => {
90
+ description: string;
91
+ parameterSchema: z.ZodObject<{
92
+ pageId: z.ZodString;
93
+ fields: z.ZodArray<z.ZodObject<{
94
+ selector: z.ZodString;
95
+ value: z.ZodString;
96
+ }, z.core.$strip>>;
97
+ submit: z.ZodOptional<z.ZodString>;
98
+ waitForNavigation: z.ZodDefault<z.ZodBoolean>;
99
+ }, z.core.$strip>;
100
+ name: string | undefined;
101
+ timeoutMs: number | undefined;
102
+ examples: import("llmist").GadgetExample<{
103
+ pageId: string;
104
+ fields: {
105
+ selector: string;
106
+ value: string;
107
+ }[];
108
+ waitForNavigation: boolean;
109
+ submit?: string | undefined;
110
+ }>[] | undefined;
111
+ readonly params: {
112
+ pageId: string;
113
+ fields: {
114
+ selector: string;
115
+ value: string;
116
+ }[];
117
+ waitForNavigation: boolean;
118
+ submit?: string | undefined;
119
+ };
120
+ execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
121
+ throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
122
+ onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
123
+ createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
124
+ readonly instruction: string;
125
+ getInstruction(optionsOrArgPrefix?: string | {
126
+ argPrefix?: string;
127
+ startPrefix?: string;
128
+ endPrefix?: string;
129
+ }): string;
130
+ } & {
131
+ params: {
132
+ pageId: string;
133
+ fields: {
134
+ selector: string;
135
+ value: string;
136
+ }[];
137
+ waitForNavigation: boolean;
138
+ submit?: string | undefined;
139
+ };
140
+ };
141
+ export declare class FillForm extends FillForm_base {
142
+ private manager;
143
+ constructor(manager: IBrowserSessionManager);
144
+ execute(params: this["params"]): Promise<string>;
145
+ }
146
+ declare const FillPinCode_base: new () => {
147
+ description: string;
148
+ parameterSchema: z.ZodObject<{
149
+ pageId: z.ZodString;
150
+ code: z.ZodString;
151
+ selectorPattern: z.ZodOptional<z.ZodString>;
152
+ startIndex: z.ZodDefault<z.ZodNumber>;
153
+ submit: z.ZodOptional<z.ZodString>;
154
+ waitForNavigation: z.ZodDefault<z.ZodBoolean>;
155
+ }, z.core.$strip>;
156
+ name: string | undefined;
157
+ timeoutMs: number | undefined;
158
+ examples: import("llmist").GadgetExample<{
159
+ pageId: string;
160
+ code: string;
161
+ startIndex: number;
162
+ waitForNavigation: boolean;
163
+ selectorPattern?: string | undefined;
164
+ submit?: string | undefined;
165
+ }>[] | undefined;
166
+ readonly params: {
167
+ pageId: string;
168
+ code: string;
169
+ startIndex: number;
170
+ waitForNavigation: boolean;
171
+ selectorPattern?: string | undefined;
172
+ submit?: string | undefined;
173
+ };
174
+ execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
175
+ throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
176
+ onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
177
+ createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
178
+ readonly instruction: string;
179
+ getInstruction(optionsOrArgPrefix?: string | {
180
+ argPrefix?: string;
181
+ startPrefix?: string;
182
+ endPrefix?: string;
183
+ }): string;
184
+ } & {
185
+ params: {
186
+ pageId: string;
187
+ code: string;
188
+ startIndex: number;
189
+ waitForNavigation: boolean;
190
+ selectorPattern?: string | undefined;
191
+ submit?: string | undefined;
192
+ };
193
+ };
194
+ export declare class FillPinCode extends FillPinCode_base {
195
+ private manager;
196
+ constructor(manager: IBrowserSessionManager);
197
+ execute(params: this["params"]): Promise<string>;
198
+ }
199
+ export {};
@@ -0,0 +1,12 @@
1
+ export { GetFullPageContent, Screenshot } from "./content";
2
+ export { Click } from "./click";
3
+ export { Type, Fill, FillForm, FillPinCode } from "./form";
4
+ export { PressKey } from "./keyboard";
5
+ export { Select, Check } from "./selection";
6
+ export { Hover, Scroll } from "./scroll";
7
+ export { DismissOverlays, dismissOverlaysOnPage } from "./overlays";
8
+ export { GoBack, GoForward, Navigate, Reload } from "./navigation";
9
+ export { ClosePage, ListPages, NewPage } from "./page";
10
+ export { ExecuteScript } from "./script";
11
+ export { Wait, WaitForElement } from "./wait";
12
+ export { RequestUserAssistance } from "./user-input";
@@ -0,0 +1 @@
1
+ export {};