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.
- package/LICENSE +21 -0
- package/README.md +137 -0
- package/dhalsim-icon.png +0 -0
- package/dist/config/cmp-selectors.d.ts +9 -0
- package/dist/factory.d.ts +110 -0
- package/dist/gadgets/click.d.ts +57 -0
- package/dist/gadgets/content.d.ts +89 -0
- package/dist/gadgets/content.test.d.ts +1 -0
- package/dist/gadgets/form.d.ts +199 -0
- package/dist/gadgets/index.d.ts +12 -0
- package/dist/gadgets/interaction.test.d.ts +1 -0
- package/dist/gadgets/keyboard.d.ts +40 -0
- package/dist/gadgets/navigation.d.ts +143 -0
- package/dist/gadgets/navigation.test.d.ts +1 -0
- package/dist/gadgets/overlays.d.ts +42 -0
- package/dist/gadgets/page.d.ts +106 -0
- package/dist/gadgets/page.test.d.ts +1 -0
- package/dist/gadgets/script.d.ts +40 -0
- package/dist/gadgets/script.test.d.ts +1 -0
- package/dist/gadgets/scroll.d.ts +90 -0
- package/dist/gadgets/selection.d.ts +93 -0
- package/dist/gadgets/selector-validator.d.ts +29 -0
- package/dist/gadgets/selector-validator.test.d.ts +1 -0
- package/dist/gadgets/user-input.d.ts +46 -0
- package/dist/gadgets/wait.d.ts +85 -0
- package/dist/gadgets/wait.test.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +22722 -0
- package/dist/session/index.d.ts +4 -0
- package/dist/session/manager.d.ts +59 -0
- package/dist/session/manager.test.d.ts +1 -0
- package/dist/session/test-manager.d.ts +33 -0
- package/dist/session/types.d.ts +41 -0
- package/dist/state/index.d.ts +1 -0
- package/dist/state/page-state.d.ts +99 -0
- package/dist/state/page-state.test.d.ts +1 -0
- package/dist/stealth.d.ts +15 -0
- package/dist/subagents/dhalsim.d.ts +112 -0
- package/dist/subagents/dhalsim.test.d.ts +1 -0
- package/dist/subagents/index.d.ts +3 -0
- package/dist/subagents/prompts.d.ts +9 -0
- package/dist/utils/constants.d.ts +20 -0
- package/dist/utils/element-checks.d.ts +17 -0
- package/dist/utils/errors.d.ts +12 -0
- package/dist/utils/index.d.ts +6 -0
- package/package.json +88 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { IBrowserSessionManager } from "../session";
|
|
3
|
+
declare const PressKey_base: new () => {
|
|
4
|
+
description: string;
|
|
5
|
+
parameterSchema: z.ZodObject<{
|
|
6
|
+
pageId: z.ZodString;
|
|
7
|
+
key: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
name: string | undefined;
|
|
10
|
+
timeoutMs: number | undefined;
|
|
11
|
+
examples: import("llmist").GadgetExample<{
|
|
12
|
+
pageId: string;
|
|
13
|
+
key: string;
|
|
14
|
+
}>[] | undefined;
|
|
15
|
+
readonly params: {
|
|
16
|
+
pageId: string;
|
|
17
|
+
key: string;
|
|
18
|
+
};
|
|
19
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
20
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
21
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
22
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
23
|
+
readonly instruction: string;
|
|
24
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
25
|
+
argPrefix?: string;
|
|
26
|
+
startPrefix?: string;
|
|
27
|
+
endPrefix?: string;
|
|
28
|
+
}): string;
|
|
29
|
+
} & {
|
|
30
|
+
params: {
|
|
31
|
+
pageId: string;
|
|
32
|
+
key: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare class PressKey extends PressKey_base {
|
|
36
|
+
private manager;
|
|
37
|
+
constructor(manager: IBrowserSessionManager);
|
|
38
|
+
execute(params: this["params"]): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { IBrowserSessionManager } from "../session";
|
|
3
|
+
declare const Navigate_base: new () => {
|
|
4
|
+
description: string;
|
|
5
|
+
parameterSchema: z.ZodObject<{
|
|
6
|
+
pageId: z.ZodString;
|
|
7
|
+
url: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
name: string | undefined;
|
|
10
|
+
timeoutMs: number | undefined;
|
|
11
|
+
examples: import("llmist").GadgetExample<{
|
|
12
|
+
pageId: string;
|
|
13
|
+
url: string;
|
|
14
|
+
}>[] | undefined;
|
|
15
|
+
readonly params: {
|
|
16
|
+
pageId: string;
|
|
17
|
+
url: string;
|
|
18
|
+
};
|
|
19
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
20
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
21
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
22
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
23
|
+
readonly instruction: string;
|
|
24
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
25
|
+
argPrefix?: string;
|
|
26
|
+
startPrefix?: string;
|
|
27
|
+
endPrefix?: string;
|
|
28
|
+
}): string;
|
|
29
|
+
} & {
|
|
30
|
+
params: {
|
|
31
|
+
pageId: string;
|
|
32
|
+
url: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare class Navigate extends Navigate_base {
|
|
36
|
+
private manager;
|
|
37
|
+
constructor(manager: IBrowserSessionManager);
|
|
38
|
+
execute(params: this["params"]): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Compare URLs accounting for trailing slashes and minor differences.
|
|
41
|
+
*/
|
|
42
|
+
private urlsMatch;
|
|
43
|
+
}
|
|
44
|
+
declare const GoBack_base: new () => {
|
|
45
|
+
description: string;
|
|
46
|
+
parameterSchema: z.ZodObject<{
|
|
47
|
+
pageId: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
name: string | undefined;
|
|
50
|
+
timeoutMs: number | undefined;
|
|
51
|
+
examples: import("llmist").GadgetExample<{
|
|
52
|
+
pageId: string;
|
|
53
|
+
}>[] | undefined;
|
|
54
|
+
readonly params: {
|
|
55
|
+
pageId: string;
|
|
56
|
+
};
|
|
57
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
58
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
59
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
60
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
61
|
+
readonly instruction: string;
|
|
62
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
63
|
+
argPrefix?: string;
|
|
64
|
+
startPrefix?: string;
|
|
65
|
+
endPrefix?: string;
|
|
66
|
+
}): string;
|
|
67
|
+
} & {
|
|
68
|
+
params: {
|
|
69
|
+
pageId: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export declare class GoBack extends GoBack_base {
|
|
73
|
+
private manager;
|
|
74
|
+
constructor(manager: IBrowserSessionManager);
|
|
75
|
+
execute(params: this["params"]): Promise<string>;
|
|
76
|
+
}
|
|
77
|
+
declare const GoForward_base: new () => {
|
|
78
|
+
description: string;
|
|
79
|
+
parameterSchema: z.ZodObject<{
|
|
80
|
+
pageId: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
name: string | undefined;
|
|
83
|
+
timeoutMs: number | undefined;
|
|
84
|
+
examples: import("llmist").GadgetExample<{
|
|
85
|
+
pageId: string;
|
|
86
|
+
}>[] | undefined;
|
|
87
|
+
readonly params: {
|
|
88
|
+
pageId: string;
|
|
89
|
+
};
|
|
90
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
91
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
92
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
93
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
94
|
+
readonly instruction: string;
|
|
95
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
96
|
+
argPrefix?: string;
|
|
97
|
+
startPrefix?: string;
|
|
98
|
+
endPrefix?: string;
|
|
99
|
+
}): string;
|
|
100
|
+
} & {
|
|
101
|
+
params: {
|
|
102
|
+
pageId: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
export declare class GoForward extends GoForward_base {
|
|
106
|
+
private manager;
|
|
107
|
+
constructor(manager: IBrowserSessionManager);
|
|
108
|
+
execute(params: this["params"]): Promise<string>;
|
|
109
|
+
}
|
|
110
|
+
declare const Reload_base: new () => {
|
|
111
|
+
description: string;
|
|
112
|
+
parameterSchema: z.ZodObject<{
|
|
113
|
+
pageId: z.ZodString;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
name: string | undefined;
|
|
116
|
+
timeoutMs: number | undefined;
|
|
117
|
+
examples: import("llmist").GadgetExample<{
|
|
118
|
+
pageId: string;
|
|
119
|
+
}>[] | undefined;
|
|
120
|
+
readonly params: {
|
|
121
|
+
pageId: string;
|
|
122
|
+
};
|
|
123
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
124
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
125
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
126
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
127
|
+
readonly instruction: string;
|
|
128
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
129
|
+
argPrefix?: string;
|
|
130
|
+
startPrefix?: string;
|
|
131
|
+
endPrefix?: string;
|
|
132
|
+
}): string;
|
|
133
|
+
} & {
|
|
134
|
+
params: {
|
|
135
|
+
pageId: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
export declare class Reload extends Reload_base {
|
|
139
|
+
private manager;
|
|
140
|
+
constructor(manager: IBrowserSessionManager);
|
|
141
|
+
execute(params: this["params"]): Promise<string>;
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { Page } from "playwright-core";
|
|
3
|
+
import type { IBrowserSessionManager } from "../session";
|
|
4
|
+
/**
|
|
5
|
+
* Utility function to dismiss cookie banners and overlays on a page.
|
|
6
|
+
* Exported for use by StartBrowser's autoDismissOverlays option.
|
|
7
|
+
*/
|
|
8
|
+
export declare function dismissOverlaysOnPage(page: Page): Promise<number>;
|
|
9
|
+
declare const DismissOverlays_base: new () => {
|
|
10
|
+
description: string;
|
|
11
|
+
parameterSchema: z.ZodObject<{
|
|
12
|
+
pageId: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
name: string | undefined;
|
|
15
|
+
timeoutMs: number | undefined;
|
|
16
|
+
examples: import("llmist").GadgetExample<{
|
|
17
|
+
pageId: string;
|
|
18
|
+
}>[] | undefined;
|
|
19
|
+
readonly params: {
|
|
20
|
+
pageId: string;
|
|
21
|
+
};
|
|
22
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
23
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
24
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
25
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
26
|
+
readonly instruction: string;
|
|
27
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
28
|
+
argPrefix?: string;
|
|
29
|
+
startPrefix?: string;
|
|
30
|
+
endPrefix?: string;
|
|
31
|
+
}): string;
|
|
32
|
+
} & {
|
|
33
|
+
params: {
|
|
34
|
+
pageId: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare class DismissOverlays extends DismissOverlays_base {
|
|
38
|
+
private manager;
|
|
39
|
+
constructor(manager: IBrowserSessionManager);
|
|
40
|
+
execute(params: this["params"]): Promise<string>;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { IBrowserSessionManager } from "../session";
|
|
3
|
+
declare const NewPage_base: new () => {
|
|
4
|
+
description: string;
|
|
5
|
+
parameterSchema: z.ZodObject<{
|
|
6
|
+
browserId: z.ZodString;
|
|
7
|
+
url: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
name: string | undefined;
|
|
10
|
+
timeoutMs: number | undefined;
|
|
11
|
+
examples: import("llmist").GadgetExample<{
|
|
12
|
+
browserId: string;
|
|
13
|
+
url?: string | undefined;
|
|
14
|
+
}>[] | undefined;
|
|
15
|
+
readonly params: {
|
|
16
|
+
browserId: string;
|
|
17
|
+
url?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
20
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
21
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
22
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
23
|
+
readonly instruction: string;
|
|
24
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
25
|
+
argPrefix?: string;
|
|
26
|
+
startPrefix?: string;
|
|
27
|
+
endPrefix?: string;
|
|
28
|
+
}): string;
|
|
29
|
+
} & {
|
|
30
|
+
params: {
|
|
31
|
+
browserId: string;
|
|
32
|
+
url?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare class NewPage extends NewPage_base {
|
|
36
|
+
private manager;
|
|
37
|
+
constructor(manager: IBrowserSessionManager);
|
|
38
|
+
execute(params: this["params"]): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
declare const ClosePage_base: new () => {
|
|
41
|
+
description: string;
|
|
42
|
+
parameterSchema: z.ZodObject<{
|
|
43
|
+
pageId: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
name: string | undefined;
|
|
46
|
+
timeoutMs: number | undefined;
|
|
47
|
+
examples: import("llmist").GadgetExample<{
|
|
48
|
+
pageId: string;
|
|
49
|
+
}>[] | undefined;
|
|
50
|
+
readonly params: {
|
|
51
|
+
pageId: string;
|
|
52
|
+
};
|
|
53
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
54
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
55
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
56
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
57
|
+
readonly instruction: string;
|
|
58
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
59
|
+
argPrefix?: string;
|
|
60
|
+
startPrefix?: string;
|
|
61
|
+
endPrefix?: string;
|
|
62
|
+
}): string;
|
|
63
|
+
} & {
|
|
64
|
+
params: {
|
|
65
|
+
pageId: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export declare class ClosePage extends ClosePage_base {
|
|
69
|
+
private manager;
|
|
70
|
+
constructor(manager: IBrowserSessionManager);
|
|
71
|
+
execute(params: this["params"]): Promise<string>;
|
|
72
|
+
}
|
|
73
|
+
declare const ListPages_base: new () => {
|
|
74
|
+
description: string;
|
|
75
|
+
parameterSchema: z.ZodObject<{
|
|
76
|
+
browserId: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
name: string | undefined;
|
|
79
|
+
timeoutMs: number | undefined;
|
|
80
|
+
examples: import("llmist").GadgetExample<{
|
|
81
|
+
browserId?: string | undefined;
|
|
82
|
+
}>[] | undefined;
|
|
83
|
+
readonly params: {
|
|
84
|
+
browserId?: string | undefined;
|
|
85
|
+
};
|
|
86
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
87
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
88
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
89
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
90
|
+
readonly instruction: string;
|
|
91
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
92
|
+
argPrefix?: string;
|
|
93
|
+
startPrefix?: string;
|
|
94
|
+
endPrefix?: string;
|
|
95
|
+
}): string;
|
|
96
|
+
} & {
|
|
97
|
+
params: {
|
|
98
|
+
browserId?: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export declare class ListPages extends ListPages_base {
|
|
102
|
+
private manager;
|
|
103
|
+
constructor(manager: IBrowserSessionManager);
|
|
104
|
+
execute(params: this["params"]): Promise<string>;
|
|
105
|
+
}
|
|
106
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { IBrowserSessionManager } from "../session";
|
|
3
|
+
declare const ExecuteScript_base: new () => {
|
|
4
|
+
description: string;
|
|
5
|
+
parameterSchema: z.ZodObject<{
|
|
6
|
+
pageId: z.ZodString;
|
|
7
|
+
script: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
name: string | undefined;
|
|
10
|
+
timeoutMs: number | undefined;
|
|
11
|
+
examples: import("llmist").GadgetExample<{
|
|
12
|
+
pageId: string;
|
|
13
|
+
script: string;
|
|
14
|
+
}>[] | undefined;
|
|
15
|
+
readonly params: {
|
|
16
|
+
pageId: string;
|
|
17
|
+
script: string;
|
|
18
|
+
};
|
|
19
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
20
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
21
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
22
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
23
|
+
readonly instruction: string;
|
|
24
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
25
|
+
argPrefix?: string;
|
|
26
|
+
startPrefix?: string;
|
|
27
|
+
endPrefix?: string;
|
|
28
|
+
}): string;
|
|
29
|
+
} & {
|
|
30
|
+
params: {
|
|
31
|
+
pageId: string;
|
|
32
|
+
script: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare class ExecuteScript extends ExecuteScript_base {
|
|
36
|
+
private manager;
|
|
37
|
+
constructor(manager: IBrowserSessionManager);
|
|
38
|
+
execute(params: this["params"]): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { IBrowserSessionManager } from "../session";
|
|
3
|
+
declare const Hover_base: new () => {
|
|
4
|
+
description: string;
|
|
5
|
+
parameterSchema: z.ZodObject<{
|
|
6
|
+
pageId: z.ZodString;
|
|
7
|
+
selector: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
name: string | undefined;
|
|
10
|
+
timeoutMs: number | undefined;
|
|
11
|
+
examples: import("llmist").GadgetExample<{
|
|
12
|
+
pageId: string;
|
|
13
|
+
selector: string;
|
|
14
|
+
}>[] | undefined;
|
|
15
|
+
readonly params: {
|
|
16
|
+
pageId: string;
|
|
17
|
+
selector: string;
|
|
18
|
+
};
|
|
19
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
20
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
21
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
22
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
23
|
+
readonly instruction: string;
|
|
24
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
25
|
+
argPrefix?: string;
|
|
26
|
+
startPrefix?: string;
|
|
27
|
+
endPrefix?: string;
|
|
28
|
+
}): string;
|
|
29
|
+
} & {
|
|
30
|
+
params: {
|
|
31
|
+
pageId: string;
|
|
32
|
+
selector: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare class Hover extends Hover_base {
|
|
36
|
+
private manager;
|
|
37
|
+
constructor(manager: IBrowserSessionManager);
|
|
38
|
+
execute(params: this["params"]): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
declare const Scroll_base: new () => {
|
|
41
|
+
description: string;
|
|
42
|
+
parameterSchema: z.ZodObject<{
|
|
43
|
+
pageId: z.ZodString;
|
|
44
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
45
|
+
left: "left";
|
|
46
|
+
right: "right";
|
|
47
|
+
up: "up";
|
|
48
|
+
down: "down";
|
|
49
|
+
}>>;
|
|
50
|
+
amount: z.ZodDefault<z.ZodNumber>;
|
|
51
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
name: string | undefined;
|
|
54
|
+
timeoutMs: number | undefined;
|
|
55
|
+
examples: import("llmist").GadgetExample<{
|
|
56
|
+
pageId: string;
|
|
57
|
+
direction: "left" | "right" | "up" | "down";
|
|
58
|
+
amount: number;
|
|
59
|
+
selector?: string | undefined;
|
|
60
|
+
}>[] | undefined;
|
|
61
|
+
readonly params: {
|
|
62
|
+
pageId: string;
|
|
63
|
+
direction: "left" | "right" | "up" | "down";
|
|
64
|
+
amount: number;
|
|
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
|
+
direction: "left" | "right" | "up" | "down";
|
|
81
|
+
amount: number;
|
|
82
|
+
selector?: string | undefined;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export declare class Scroll extends Scroll_base {
|
|
86
|
+
private manager;
|
|
87
|
+
constructor(manager: IBrowserSessionManager);
|
|
88
|
+
execute(params: this["params"]): Promise<string>;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { IBrowserSessionManager } from "../session";
|
|
3
|
+
declare const Select_base: new () => {
|
|
4
|
+
description: string;
|
|
5
|
+
parameterSchema: z.ZodObject<{
|
|
6
|
+
pageId: z.ZodString;
|
|
7
|
+
selector: z.ZodString;
|
|
8
|
+
value: z.ZodOptional<z.ZodString>;
|
|
9
|
+
label: z.ZodOptional<z.ZodString>;
|
|
10
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
name: string | undefined;
|
|
13
|
+
timeoutMs: number | undefined;
|
|
14
|
+
examples: import("llmist").GadgetExample<{
|
|
15
|
+
pageId: string;
|
|
16
|
+
selector: string;
|
|
17
|
+
value?: string | undefined;
|
|
18
|
+
label?: string | undefined;
|
|
19
|
+
index?: number | undefined;
|
|
20
|
+
}>[] | undefined;
|
|
21
|
+
readonly params: {
|
|
22
|
+
pageId: string;
|
|
23
|
+
selector: string;
|
|
24
|
+
value?: string | undefined;
|
|
25
|
+
label?: string | undefined;
|
|
26
|
+
index?: number | undefined;
|
|
27
|
+
};
|
|
28
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
29
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
30
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
31
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
32
|
+
readonly instruction: string;
|
|
33
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
34
|
+
argPrefix?: string;
|
|
35
|
+
startPrefix?: string;
|
|
36
|
+
endPrefix?: string;
|
|
37
|
+
}): string;
|
|
38
|
+
} & {
|
|
39
|
+
params: {
|
|
40
|
+
pageId: string;
|
|
41
|
+
selector: string;
|
|
42
|
+
value?: string | undefined;
|
|
43
|
+
label?: string | undefined;
|
|
44
|
+
index?: number | undefined;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export declare class Select extends Select_base {
|
|
48
|
+
private manager;
|
|
49
|
+
constructor(manager: IBrowserSessionManager);
|
|
50
|
+
execute(params: this["params"]): Promise<string>;
|
|
51
|
+
}
|
|
52
|
+
declare const Check_base: new () => {
|
|
53
|
+
description: string;
|
|
54
|
+
parameterSchema: z.ZodObject<{
|
|
55
|
+
pageId: z.ZodString;
|
|
56
|
+
selector: z.ZodString;
|
|
57
|
+
checked: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
name: string | undefined;
|
|
60
|
+
timeoutMs: number | undefined;
|
|
61
|
+
examples: import("llmist").GadgetExample<{
|
|
62
|
+
pageId: string;
|
|
63
|
+
selector: string;
|
|
64
|
+
checked: boolean;
|
|
65
|
+
}>[] | undefined;
|
|
66
|
+
readonly params: {
|
|
67
|
+
pageId: string;
|
|
68
|
+
selector: string;
|
|
69
|
+
checked: boolean;
|
|
70
|
+
};
|
|
71
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
72
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
73
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
74
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
75
|
+
readonly instruction: string;
|
|
76
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
77
|
+
argPrefix?: string;
|
|
78
|
+
startPrefix?: string;
|
|
79
|
+
endPrefix?: string;
|
|
80
|
+
}): string;
|
|
81
|
+
} & {
|
|
82
|
+
params: {
|
|
83
|
+
pageId: string;
|
|
84
|
+
selector: string;
|
|
85
|
+
checked: boolean;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export declare class Check extends Check_base {
|
|
89
|
+
private manager;
|
|
90
|
+
constructor(manager: IBrowserSessionManager);
|
|
91
|
+
execute(params: this["params"]): Promise<string>;
|
|
92
|
+
}
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export interface ValidationResult {
|
|
3
|
+
valid: boolean;
|
|
4
|
+
reason?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Validates a CSS selector to ensure it's not constructed.
|
|
8
|
+
* Returns { valid: true } for allowed selectors, or { valid: false, reason: string } for forbidden ones.
|
|
9
|
+
*/
|
|
10
|
+
export declare function validateSelector(selector: string): ValidationResult;
|
|
11
|
+
/**
|
|
12
|
+
* Validates an array of selectors.
|
|
13
|
+
* Returns the first validation error found, or { valid: true } if all pass.
|
|
14
|
+
*/
|
|
15
|
+
export declare function validateSelectors(selectors: string[]): ValidationResult;
|
|
16
|
+
/**
|
|
17
|
+
* Zod schema for a single selector string.
|
|
18
|
+
* Allows all selectors (including :nth-child, wildcards, etc.)
|
|
19
|
+
* Use validateSelector() separately for diagnostics if needed.
|
|
20
|
+
*/
|
|
21
|
+
export declare const selectorSchema: z.ZodString;
|
|
22
|
+
/**
|
|
23
|
+
* Zod schema for an optional selector string.
|
|
24
|
+
*/
|
|
25
|
+
export declare const optionalSelectorSchema: z.ZodOptional<z.ZodString>;
|
|
26
|
+
/**
|
|
27
|
+
* Zod schema for an array of selectors.
|
|
28
|
+
*/
|
|
29
|
+
export declare const selectorsArraySchema: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "llmist";
|
|
2
|
+
import type { IBrowserSessionManager } from "../session";
|
|
3
|
+
declare const RequestUserAssistance_base: new () => {
|
|
4
|
+
description: string;
|
|
5
|
+
parameterSchema: z.ZodObject<{
|
|
6
|
+
reason: z.ZodEnum<{
|
|
7
|
+
captcha: "captcha";
|
|
8
|
+
"2fa_code": "2fa_code";
|
|
9
|
+
sms_code: "sms_code";
|
|
10
|
+
manual_action: "manual_action";
|
|
11
|
+
confirmation: "confirmation";
|
|
12
|
+
other: "other";
|
|
13
|
+
}>;
|
|
14
|
+
message: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
name: string | undefined;
|
|
17
|
+
timeoutMs: number | undefined;
|
|
18
|
+
examples: import("llmist").GadgetExample<{
|
|
19
|
+
reason: "captcha" | "2fa_code" | "sms_code" | "manual_action" | "confirmation" | "other";
|
|
20
|
+
message: string;
|
|
21
|
+
}>[] | undefined;
|
|
22
|
+
readonly params: {
|
|
23
|
+
reason: "captcha" | "2fa_code" | "sms_code" | "manual_action" | "confirmation" | "other";
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
execute(params: Record<string, unknown>, ctx?: import("llmist").ExecutionContext): import("llmist").GadgetExecuteReturn | Promise<import("llmist").GadgetExecuteReturn>;
|
|
27
|
+
throwIfAborted(ctx?: import("llmist").ExecutionContext): void;
|
|
28
|
+
onAbort(ctx: import("llmist").ExecutionContext | undefined, cleanup: () => void | Promise<void>): void;
|
|
29
|
+
createLinkedAbortController(ctx?: import("llmist").ExecutionContext): AbortController;
|
|
30
|
+
readonly instruction: string;
|
|
31
|
+
getInstruction(optionsOrArgPrefix?: string | {
|
|
32
|
+
argPrefix?: string;
|
|
33
|
+
startPrefix?: string;
|
|
34
|
+
endPrefix?: string;
|
|
35
|
+
}): string;
|
|
36
|
+
} & {
|
|
37
|
+
params: {
|
|
38
|
+
reason: "captcha" | "2fa_code" | "sms_code" | "manual_action" | "confirmation" | "other";
|
|
39
|
+
message: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare class RequestUserAssistance extends RequestUserAssistance_base {
|
|
43
|
+
constructor(_manager: IBrowserSessionManager);
|
|
44
|
+
execute(params: this["params"]): string;
|
|
45
|
+
}
|
|
46
|
+
export {};
|