@projectservan8n/cnapse 0.6.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ProviderSelector-MXRZFAOB.js +6 -0
- package/dist/chunk-OPX7FFL6.js +391 -0
- package/dist/index.js +882 -525
- package/package.json +17 -16
- package/src/agents/executor.ts +20 -13
- package/src/index.tsx +32 -6
- package/src/lib/tasks.ts +451 -74
- package/src/services/browser.ts +669 -0
- package/src/tools/index.ts +0 -1
- package/dist/ConfigUI-I2CJVODT.js +0 -305
- package/dist/Setup-KGYXCA7Y.js +0 -177
- package/dist/chunk-COKO6V5J.js +0 -50
- package/src/components/ConfigUI.tsx +0 -352
- package/src/components/Setup.tsx +0 -202
- package/src/lib/screen.ts +0 -118
- package/src/tools/vision.ts +0 -65
package/src/tools/vision.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vision tools - Screenshot capture and AI description
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { describeScreen, captureScreenshot } from '../lib/vision.js';
|
|
6
|
-
|
|
7
|
-
export interface ScreenshotResult {
|
|
8
|
-
success: boolean;
|
|
9
|
-
screenshot?: string; // base64
|
|
10
|
-
error?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface VisionResult {
|
|
14
|
-
success: boolean;
|
|
15
|
-
description?: string;
|
|
16
|
-
screenshot?: string; // base64
|
|
17
|
-
error?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Take a screenshot and return as base64
|
|
22
|
-
*/
|
|
23
|
-
export async function takeScreenshot(): Promise<ScreenshotResult> {
|
|
24
|
-
try {
|
|
25
|
-
const screenshot = await captureScreenshot();
|
|
26
|
-
if (!screenshot) {
|
|
27
|
-
return { success: false, error: 'Failed to capture screenshot' };
|
|
28
|
-
}
|
|
29
|
-
return { success: true, screenshot };
|
|
30
|
-
} catch (error) {
|
|
31
|
-
return {
|
|
32
|
-
success: false,
|
|
33
|
-
error: error instanceof Error ? error.message : 'Screenshot failed',
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Capture screen and get AI description of what's visible
|
|
40
|
-
*/
|
|
41
|
-
export async function describeCurrentScreen(): Promise<VisionResult> {
|
|
42
|
-
try {
|
|
43
|
-
const result = await describeScreen();
|
|
44
|
-
return {
|
|
45
|
-
success: true,
|
|
46
|
-
description: result.description,
|
|
47
|
-
screenshot: result.screenshot,
|
|
48
|
-
};
|
|
49
|
-
} catch (error) {
|
|
50
|
-
return {
|
|
51
|
-
success: false,
|
|
52
|
-
error: error instanceof Error ? error.message : 'Vision analysis failed',
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Get all vision tools for the executor
|
|
59
|
-
*/
|
|
60
|
-
export function getVisionTools() {
|
|
61
|
-
return {
|
|
62
|
-
takeScreenshot,
|
|
63
|
-
describeCurrentScreen,
|
|
64
|
-
};
|
|
65
|
-
}
|