dhalsim 0.1.0 → 1.0.2
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 +10 -8
- package/package.json +30 -7
- package/dist/stealth.d.ts +0 -15
- package/dist/utils/errors.d.ts +0 -12
package/dist/index.js
CHANGED
|
@@ -22623,8 +22623,9 @@ Use this for web research, data extraction, form filling, or any web-based task.
|
|
|
22623
22623
|
}
|
|
22624
22624
|
logger13?.debug(`[BrowseWeb] Dismissing overlays...`);
|
|
22625
22625
|
const dismissOverlays = new DismissOverlays(manager);
|
|
22626
|
+
let dismissResult = null;
|
|
22626
22627
|
try {
|
|
22627
|
-
await dismissOverlays.execute({ pageId });
|
|
22628
|
+
dismissResult = await dismissOverlays.execute({ pageId });
|
|
22628
22629
|
} catch {}
|
|
22629
22630
|
logger13?.debug(`[BrowseWeb] Overlays dismissed`);
|
|
22630
22631
|
logger13?.debug(`[BrowseWeb] Auto-fetching page content...`);
|
|
@@ -22669,14 +22670,15 @@ Use this for web research, data extraction, form filling, or any web-based task.
|
|
|
22669
22670
|
if (ctx) {
|
|
22670
22671
|
builder.withParentContext(ctx);
|
|
22671
22672
|
}
|
|
22672
|
-
|
|
22673
|
-
|
|
22674
|
-
|
|
22675
|
-
|
|
22676
|
-
|
|
22673
|
+
if (dismissResult !== null) {
|
|
22674
|
+
builder.withSyntheticGadgetCall("DismissOverlays", { pageId }, dismissResult, "auto_dismiss");
|
|
22675
|
+
}
|
|
22676
|
+
if (initialPageContent !== null) {
|
|
22677
|
+
builder.withSyntheticGadgetCall("GetFullPageContent", { pageId }, initialPageContent, "auto_content");
|
|
22678
|
+
}
|
|
22679
|
+
const agent = builder.ask(`Page ${pageId} is ready at ${url2}.
|
|
22677
22680
|
|
|
22678
|
-
Task: ${task}`
|
|
22679
|
-
const agent = builder.ask(initialMessage);
|
|
22681
|
+
Task: ${task}`);
|
|
22680
22682
|
logger13?.debug(`[BrowseWeb] Starting agent loop model=${model} maxIterations=${maxIterations}`);
|
|
22681
22683
|
let finalResult = "";
|
|
22682
22684
|
for await (const event of agent.run()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dhalsim",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Browser automation for llmist agents using Camoufox anti-detect browser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,16 +13,33 @@
|
|
|
13
13
|
"entryPoint": "./dist/index.js",
|
|
14
14
|
"export": "Dhalsim",
|
|
15
15
|
"description": "Browse websites and accomplish tasks autonomously",
|
|
16
|
-
"uses": [
|
|
16
|
+
"uses": [
|
|
17
|
+
"Navigate",
|
|
18
|
+
"Click",
|
|
19
|
+
"Screenshot",
|
|
20
|
+
"GetFullPageContent",
|
|
21
|
+
"Fill"
|
|
22
|
+
],
|
|
17
23
|
"defaultModel": "sonnet",
|
|
18
24
|
"maxIterations": 15
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
27
|
"presets": {
|
|
22
28
|
"all": "*",
|
|
23
|
-
"subagent": [
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
"subagent": [
|
|
30
|
+
"BrowseWeb"
|
|
31
|
+
],
|
|
32
|
+
"readonly": [
|
|
33
|
+
"Navigate",
|
|
34
|
+
"Screenshot",
|
|
35
|
+
"GetFullPageContent",
|
|
36
|
+
"ListPages"
|
|
37
|
+
],
|
|
38
|
+
"minimal": [
|
|
39
|
+
"Navigate",
|
|
40
|
+
"Screenshot",
|
|
41
|
+
"GetFullPageContent"
|
|
42
|
+
]
|
|
26
43
|
},
|
|
27
44
|
"session": {
|
|
28
45
|
"factory": "getSessionManager",
|
|
@@ -38,7 +55,7 @@
|
|
|
38
55
|
"check": "biome check --write .",
|
|
39
56
|
"test": "vitest run --no-file-parallelism",
|
|
40
57
|
"precheck": "bun run lint && bun run typecheck && bun run test",
|
|
41
|
-
"prepare": "lefthook install"
|
|
58
|
+
"prepare": "test -n \"$CI\" || lefthook install"
|
|
42
59
|
},
|
|
43
60
|
"keywords": [
|
|
44
61
|
"browser",
|
|
@@ -66,7 +83,7 @@
|
|
|
66
83
|
"README.md"
|
|
67
84
|
],
|
|
68
85
|
"dependencies": {
|
|
69
|
-
"camoufox-js": "github:zbigniewsobiecki/camoufox-js#
|
|
86
|
+
"camoufox-js": "github:zbigniewsobiecki/camoufox-js#16eb589",
|
|
70
87
|
"sharp": "^0.34.5"
|
|
71
88
|
},
|
|
72
89
|
"optionalDependencies": {
|
|
@@ -75,10 +92,16 @@
|
|
|
75
92
|
"devDependencies": {
|
|
76
93
|
"@biomejs/biome": "^2.3.2",
|
|
77
94
|
"@llmist/testing": ">=9.2.0",
|
|
95
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
96
|
+
"@semantic-release/git": "^10.0.1",
|
|
97
|
+
"@semantic-release/github": "^12.0.2",
|
|
98
|
+
"@semantic-release/npm": "^13.1.3",
|
|
78
99
|
"@types/node": "^20.12.7",
|
|
79
100
|
"bun-types": "^1.3.2",
|
|
101
|
+
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
80
102
|
"lefthook": "^1.6.0",
|
|
81
103
|
"llmist": ">=9.2.0",
|
|
104
|
+
"semantic-release": "^25.0.2",
|
|
82
105
|
"typescript": "^5.4.5",
|
|
83
106
|
"vitest": "^4.0.15"
|
|
84
107
|
},
|
package/dist/stealth.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Human-like timing utilities for browser automation.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Generate a random delay within a range (for human-like timing).
|
|
6
|
-
* @param min Minimum delay in milliseconds
|
|
7
|
-
* @param max Maximum delay in milliseconds
|
|
8
|
-
*/
|
|
9
|
-
export declare function randomDelay(min: number, max: number): number;
|
|
10
|
-
/**
|
|
11
|
-
* Sleep for a random duration (for human-like timing).
|
|
12
|
-
* @param min Minimum delay in milliseconds
|
|
13
|
-
* @param max Maximum delay in milliseconds
|
|
14
|
-
*/
|
|
15
|
-
export declare function humanDelay(min?: number, max?: number): Promise<void>;
|
package/dist/utils/errors.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for error handling and text processing.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Extracts a string message from an unknown error type.
|
|
6
|
-
* Safely handles both Error objects and other thrown values.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getErrorMessage(error: unknown): string;
|
|
9
|
-
/**
|
|
10
|
-
* Truncates text to a maximum length, adding ellipsis if truncated.
|
|
11
|
-
*/
|
|
12
|
-
export declare function truncate(text: string, maxLength: number): string;
|