autokap 1.0.6 → 1.0.7
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/assets/chrome/ios-statusbar-comparison-reference.jpg +0 -0
- package/assets/chrome/ios-statusbar-dark-reference.jpg +0 -0
- package/assets/chrome/ios-statusbar-light-reference.jpg +0 -0
- package/assets/devices/ipad-pro-11-m4.json +52 -0
- package/assets/devices/iphone-16-pro.json +53 -0
- package/assets/devices/macbook-air-13.json +45 -0
- package/assets/frames/MacBook Air 13.svg +242 -0
- package/assets/frames/Status bar - iPhone.png +0 -0
- Menu bar- iPad.png +0 -0
- package/assets/frames/iPad Pro M4 11_.png +0 -0
- package/assets/frames/iPhone 16 Pro.png +0 -0
- package/assets/icons/Cellular Connection.svg +3 -0
- package/assets/icons/Union.svg +6 -0
- package/assets/icons/Wifi.svg +3 -0
- package/assets/icons/battery.svg +5 -0
- package/assets/icons/battery_charging.svg +8 -0
- package/dist/abort.d.ts +5 -0
- package/dist/abort.js +44 -0
- package/dist/agent.d.ts +142 -0
- package/dist/agent.js +4511 -0
- package/dist/billing-operation-logging.d.ts +38 -0
- package/dist/billing-operation-logging.js +248 -0
- package/dist/browser-bar.d.ts +40 -0
- package/dist/browser-bar.js +147 -0
- package/dist/browser.d.ts +25 -0
- package/dist/browser.js +177 -9
- package/dist/capture-alt-text.d.ts +12 -0
- package/dist/capture-alt-text.js +51 -0
- package/dist/capture-encryption.d.ts +10 -0
- package/dist/capture-encryption.js +41 -0
- package/dist/capture-language-preflight.d.ts +41 -0
- package/dist/capture-language-preflight.js +286 -0
- package/dist/capture-llm-page-identity.d.ts +15 -0
- package/dist/capture-llm-page-identity.js +116 -0
- package/dist/capture-model-resolution.d.ts +9 -0
- package/dist/capture-model-resolution.js +21 -0
- package/dist/capture-page-identity.d.ts +9 -0
- package/dist/capture-page-identity.js +219 -0
- package/dist/capture-preset-credentials.d.ts +12 -0
- package/dist/capture-preset-credentials.js +57 -0
- package/dist/capture-request-plan.d.ts +58 -0
- package/dist/capture-request-plan.js +216 -0
- package/dist/capture-run-optimizer.d.ts +139 -0
- package/dist/capture-run-optimizer.js +848 -0
- package/dist/capture-selector-memory.d.ts +26 -0
- package/dist/capture-selector-memory.js +327 -0
- package/dist/capture-session-profile-encryption.d.ts +2 -0
- package/dist/capture-session-profile-encryption.js +22 -0
- package/dist/capture-step-timeout.d.ts +10 -0
- package/dist/capture-step-timeout.js +30 -0
- package/dist/capture-studio-sync.d.ts +22 -0
- package/dist/capture-studio-sync.js +166 -0
- package/dist/capture-variant-state.d.ts +54 -0
- package/dist/capture-variant-state.js +156 -0
- package/dist/cli.js +15 -0
- package/dist/clip-orchestrator.d.ts +148 -0
- package/dist/clip-orchestrator.js +950 -0
- package/dist/clip-postprocess.d.ts +42 -0
- package/dist/clip-postprocess.js +192 -0
- package/dist/cost-logging.d.ts +27 -0
- package/dist/cost-logging.js +128 -0
- package/dist/credential-templates.d.ts +5 -0
- package/dist/credential-templates.js +60 -0
- package/dist/element-capture.d.ts +53 -0
- package/dist/element-capture.js +766 -0
- package/dist/hybrid-navigator.d.ts +138 -0
- package/dist/hybrid-navigator.js +468 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +11 -0
- package/dist/llm-usage.d.ts +17 -0
- package/dist/llm-usage.js +45 -0
- package/dist/mockup-html.d.ts +119 -0
- package/dist/mockup-html.js +253 -0
- package/dist/mockup.d.ts +94 -0
- package/dist/mockup.js +608 -0
- package/dist/mouse-animation.d.ts +46 -0
- package/dist/mouse-animation.js +100 -0
- package/dist/overlay-utils.d.ts +14 -0
- package/dist/overlay-utils.js +13 -0
- package/dist/posthog.d.ts +4 -0
- package/dist/posthog.js +26 -0
- package/dist/prompt-cache.d.ts +10 -0
- package/dist/prompt-cache.js +24 -0
- package/dist/prompts.d.ts +167 -0
- package/dist/prompts.js +1165 -0
- package/dist/remote-browser.d.ts +191 -0
- package/dist/remote-browser.js +305 -0
- package/dist/security.d.ts +20 -0
- package/dist/security.js +569 -0
- package/dist/server-capture-runtime.d.ts +123 -0
- package/dist/server-capture-runtime.js +638 -0
- package/dist/server-credit-usage.d.ts +12 -0
- package/dist/server-credit-usage.js +41 -0
- package/dist/server-posthog.d.ts +2 -0
- package/dist/server-posthog.js +16 -0
- package/dist/server-project-webhooks.d.ts +45 -0
- package/dist/server-project-webhooks.js +97 -0
- package/dist/server-screenshot-watermark.d.ts +7 -0
- package/dist/server-screenshot-watermark.js +38 -0
- package/dist/session-profile.d.ts +86 -0
- package/dist/session-profile.js +1373 -0
- package/dist/sf-pro-fonts.d.ts +4 -0
- package/dist/sf-pro-fonts.js +7 -0
- package/dist/status-bar-l10n.d.ts +14 -0
- package/dist/status-bar-l10n.js +177 -0
- package/dist/status-bar.d.ts +44 -0
- package/dist/status-bar.js +336 -0
- package/dist/tools.d.ts +4 -0
- package/dist/tools.js +578 -0
- package/dist/video-agent.d.ts +143 -0
- package/dist/video-agent.js +4783 -0
- package/dist/video-observation.d.ts +36 -0
- package/dist/video-observation.js +192 -0
- package/dist/video-planner.d.ts +12 -0
- package/dist/video-planner.js +500 -0
- package/dist/video-prompts.d.ts +37 -0
- package/dist/video-prompts.js +554 -0
- package/dist/video-tools.d.ts +3 -0
- package/dist/video-tools.js +59 -0
- package/dist/video-variant-state.d.ts +29 -0
- package/dist/video-variant-state.js +80 -0
- package/dist/vision-model.d.ts +17 -0
- package/dist/vision-model.js +74 -0
- package/dist/ws-auth.d.ts +20 -0
- package/dist/ws-auth.js +67 -0
- package/dist/ws-handler.d.ts +10 -0
- package/dist/ws-handler.js +1663 -0
- package/dist/ws-server.d.ts +9 -0
- package/dist/ws-server.js +52 -0
- package/package.json +93 -39
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* AutoKap WebSocket server — runs alongside Next.js on the VPS.
|
|
4
|
+
* Accepts CLI connections and orchestrates captures using RemoteBrowser.
|
|
5
|
+
*
|
|
6
|
+
* Usage: node dist/ws-server.js
|
|
7
|
+
* Env: WS_PORT (default 3001), SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, OPENROUTER_API_KEY
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* AutoKap WebSocket server — runs alongside Next.js on the VPS.
|
|
4
|
+
* Accepts CLI connections and orchestrates captures using RemoteBrowser.
|
|
5
|
+
*
|
|
6
|
+
* Usage: node dist/ws-server.js
|
|
7
|
+
* Env: WS_PORT (default 3001), SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, OPENROUTER_API_KEY
|
|
8
|
+
*/
|
|
9
|
+
import { config as loadEnv } from 'dotenv';
|
|
10
|
+
import { WebSocketServer } from 'ws';
|
|
11
|
+
import { handleConnection } from './ws-handler.js';
|
|
12
|
+
import { logger } from './logger.js';
|
|
13
|
+
loadEnv();
|
|
14
|
+
const PORT = parseInt(process.env.WS_PORT ?? '3001', 10);
|
|
15
|
+
const wss = new WebSocketServer({
|
|
16
|
+
port: PORT,
|
|
17
|
+
path: '/ws',
|
|
18
|
+
maxPayload: 10 * 1024 * 1024, // 10 MB max message (screenshots can be large)
|
|
19
|
+
});
|
|
20
|
+
wss.on('connection', (ws, req) => {
|
|
21
|
+
const ip = req.headers['x-real-ip'] ?? req.socket.remoteAddress ?? 'unknown';
|
|
22
|
+
logger.info(`[WS] New connection from ${ip}`);
|
|
23
|
+
handleConnection(ws, req).catch(err => {
|
|
24
|
+
logger.error(`[WS] Unhandled error: ${err.message}`);
|
|
25
|
+
try {
|
|
26
|
+
ws.close(5000, 'Internal error');
|
|
27
|
+
}
|
|
28
|
+
catch { /* ignore */ }
|
|
29
|
+
});
|
|
30
|
+
ws.on('close', () => {
|
|
31
|
+
logger.info(`[WS] Connection closed from ${ip}`);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
wss.on('error', (err) => {
|
|
35
|
+
logger.error(`[WS] Server error: ${err.message}`);
|
|
36
|
+
});
|
|
37
|
+
logger.success(`AutoKap WS server listening on port ${PORT} (path: /ws)`);
|
|
38
|
+
// Graceful shutdown
|
|
39
|
+
process.on('SIGTERM', () => {
|
|
40
|
+
logger.info('[WS] SIGTERM received, closing...');
|
|
41
|
+
wss.close(() => {
|
|
42
|
+
logger.info('[WS] Server closed');
|
|
43
|
+
process.exit(0);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
process.on('SIGINT', () => {
|
|
47
|
+
logger.info('[WS] SIGINT received, closing...');
|
|
48
|
+
wss.close(() => {
|
|
49
|
+
process.exit(0);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=ws-server.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autokap",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "AI-powered CLI tool for capturing clean screenshots of websites",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -90,6 +90,82 @@
|
|
|
90
90
|
"types": "./dist/clip-postprocess.d.ts",
|
|
91
91
|
"default": "./dist/clip-postprocess.js"
|
|
92
92
|
},
|
|
93
|
+
"./capture-alt-text": {
|
|
94
|
+
"types": "./dist/capture-alt-text.d.ts",
|
|
95
|
+
"default": "./dist/capture-alt-text.js"
|
|
96
|
+
},
|
|
97
|
+
"./capture-encryption": {
|
|
98
|
+
"types": "./dist/capture-encryption.d.ts",
|
|
99
|
+
"default": "./dist/capture-encryption.js"
|
|
100
|
+
},
|
|
101
|
+
"./capture-model-resolution": {
|
|
102
|
+
"types": "./dist/capture-model-resolution.d.ts",
|
|
103
|
+
"default": "./dist/capture-model-resolution.js"
|
|
104
|
+
},
|
|
105
|
+
"./capture-preset-credentials": {
|
|
106
|
+
"types": "./dist/capture-preset-credentials.d.ts",
|
|
107
|
+
"default": "./dist/capture-preset-credentials.js"
|
|
108
|
+
},
|
|
109
|
+
"./capture-selector-memory": {
|
|
110
|
+
"types": "./dist/capture-selector-memory.d.ts",
|
|
111
|
+
"default": "./dist/capture-selector-memory.js"
|
|
112
|
+
},
|
|
113
|
+
"./capture-session-profile-encryption": {
|
|
114
|
+
"types": "./dist/capture-session-profile-encryption.d.ts",
|
|
115
|
+
"default": "./dist/capture-session-profile-encryption.js"
|
|
116
|
+
},
|
|
117
|
+
"./capture-run-optimizer": {
|
|
118
|
+
"types": "./dist/capture-run-optimizer.d.ts",
|
|
119
|
+
"default": "./dist/capture-run-optimizer.js"
|
|
120
|
+
},
|
|
121
|
+
"./capture-request-plan": {
|
|
122
|
+
"types": "./dist/capture-request-plan.d.ts",
|
|
123
|
+
"default": "./dist/capture-request-plan.js"
|
|
124
|
+
},
|
|
125
|
+
"./capture-page-identity": {
|
|
126
|
+
"types": "./dist/capture-page-identity.d.ts",
|
|
127
|
+
"default": "./dist/capture-page-identity.js"
|
|
128
|
+
},
|
|
129
|
+
"./capture-variant-state": {
|
|
130
|
+
"types": "./dist/capture-variant-state.d.ts",
|
|
131
|
+
"default": "./dist/capture-variant-state.js"
|
|
132
|
+
},
|
|
133
|
+
"./capture-llm-page-identity": {
|
|
134
|
+
"types": "./dist/capture-llm-page-identity.d.ts",
|
|
135
|
+
"default": "./dist/capture-llm-page-identity.js"
|
|
136
|
+
},
|
|
137
|
+
"./capture-step-timeout": {
|
|
138
|
+
"types": "./dist/capture-step-timeout.d.ts",
|
|
139
|
+
"default": "./dist/capture-step-timeout.js"
|
|
140
|
+
},
|
|
141
|
+
"./capture-language-preflight": {
|
|
142
|
+
"types": "./dist/capture-language-preflight.d.ts",
|
|
143
|
+
"default": "./dist/capture-language-preflight.js"
|
|
144
|
+
},
|
|
145
|
+
"./cost-logging": {
|
|
146
|
+
"types": "./dist/cost-logging.d.ts",
|
|
147
|
+
"default": "./dist/cost-logging.js"
|
|
148
|
+
},
|
|
149
|
+
"./billing-operation-logging": {
|
|
150
|
+
"types": "./dist/billing-operation-logging.d.ts",
|
|
151
|
+
"default": "./dist/billing-operation-logging.js"
|
|
152
|
+
},
|
|
153
|
+
"./server-credit-usage": {
|
|
154
|
+
"types": "./dist/server-credit-usage.d.ts",
|
|
155
|
+
"default": "./dist/server-credit-usage.js"
|
|
156
|
+
},
|
|
157
|
+
"./server-posthog": {
|
|
158
|
+
"types": "./dist/server-posthog.d.ts",
|
|
159
|
+
"default": "./dist/server-posthog.js"
|
|
160
|
+
},
|
|
161
|
+
"./server-screenshot-watermark": {
|
|
162
|
+
"types": "./dist/server-screenshot-watermark.d.ts",
|
|
163
|
+
"default": "./dist/server-screenshot-watermark.js"
|
|
164
|
+
},
|
|
165
|
+
"./capture-studio-sync": {
|
|
166
|
+
"types": "./dist/capture-studio-sync.d.ts",
|
|
167
|
+
"default": "./dist/capture-studio-sync.js"
|
|
168
|
+
},
|
|
93
169
|
"./hybrid-navigator": {
|
|
94
170
|
"types": "./dist/hybrid-navigator.d.ts",
|
|
95
171
|
"default": "./dist/hybrid-navigator.js"
|
|
@@ -99,41 +175,22 @@
|
|
|
99
175
|
"autokap": "./dist/cli.js"
|
|
100
176
|
},
|
|
101
177
|
"scripts": {
|
|
102
|
-
"
|
|
103
|
-
"dev": "cd web && npm run dev",
|
|
104
|
-
"dev:lib:watch": "tsc -w --preserveWatchOutput",
|
|
105
|
-
"start": "cd web && npm run start",
|
|
106
|
-
"rebuild": "tsc && cd web && npx tsc --noEmit",
|
|
107
|
-
"typecheck": "tsc --noEmit",
|
|
108
|
-
"test": "vitest run",
|
|
109
|
-
"test:watch": "vitest",
|
|
110
|
-
"test:billing-limits": "node --test --import tsx scripts/billing-plan-limits.test.ts",
|
|
111
|
-
"deploy": "bash deploy.sh",
|
|
112
|
-
"sync-env": "bash scripts/sync-env.sh",
|
|
113
|
-
"screenshot:benchmark": "tsx scripts/screenshot-benchmark.ts",
|
|
114
|
-
"video:smoke": "tsx scripts/video-smoke-test.ts",
|
|
115
|
-
"video:regression": "tsx scripts/video-regression.ts"
|
|
178
|
+
"postinstall": "npx playwright install chromium 2>/dev/null || true"
|
|
116
179
|
},
|
|
117
180
|
"engines": {
|
|
118
181
|
"node": ">=20"
|
|
119
182
|
},
|
|
120
183
|
"files": [
|
|
121
|
-
"dist
|
|
122
|
-
"dist
|
|
123
|
-
"dist
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"dist/cookie-dismiss.js",
|
|
132
|
-
"dist/cookie-dismiss.d.ts",
|
|
133
|
-
"dist/logger.js",
|
|
134
|
-
"dist/logger.d.ts",
|
|
135
|
-
"dist/types.js",
|
|
136
|
-
"dist/types.d.ts",
|
|
184
|
+
"dist/**/*.js",
|
|
185
|
+
"dist/**/*.d.ts",
|
|
186
|
+
"!dist/**/*.js.map",
|
|
187
|
+
"assets/chrome",
|
|
188
|
+
"assets/devices",
|
|
189
|
+
"assets/frames/iPad*",
|
|
190
|
+
"assets/frames/iPhone*",
|
|
191
|
+
"assets/frames/MacBook*",
|
|
192
|
+
"assets/frames/Status*",
|
|
193
|
+
"assets/icons",
|
|
137
194
|
"assets/skill"
|
|
138
195
|
],
|
|
139
196
|
"keywords": [
|
|
@@ -148,21 +205,18 @@
|
|
|
148
205
|
],
|
|
149
206
|
"author": "AutoKap",
|
|
150
207
|
"license": "ISC",
|
|
151
|
-
"homepage": "https://autokap.
|
|
208
|
+
"homepage": "https://app.autokap.com",
|
|
152
209
|
"dependencies": {
|
|
153
210
|
"chalk": "^5.6.2",
|
|
154
211
|
"commander": "^14.0.3",
|
|
212
|
+
"dotenv": "^17.3.1",
|
|
213
|
+
"openai": "^6.25.0",
|
|
155
214
|
"playwright": "^1.58.2",
|
|
156
|
-
"
|
|
157
|
-
"
|
|
215
|
+
"posthog-node": "^5.26.2",
|
|
216
|
+
"sharp": "^0.34.5"
|
|
158
217
|
},
|
|
159
218
|
"devDependencies": {
|
|
160
|
-
"@supabase/supabase-js": "^2.100.1",
|
|
161
219
|
"@types/node": "^25.3.3",
|
|
162
|
-
"@types/ws": "^8.18.1",
|
|
163
|
-
"dotenv": "^17.3.1",
|
|
164
|
-
"openai": "^6.25.0",
|
|
165
|
-
"posthog-node": "^5.26.2",
|
|
166
220
|
"tsx": "^4.21.0",
|
|
167
221
|
"typescript": "^5.9.3",
|
|
168
222
|
"vitest": "^4.0.18"
|