autokap 1.0.8 → 1.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/assets/skill/OPCODE-REFERENCE.md +29 -1
- package/assets/skill/SKILL.md +2 -1
- package/dist/auth-capture.js +35 -2
- package/dist/billing-operation-logging.d.ts +4 -3
- package/dist/billing-operation-logging.js +3 -2
- package/dist/browser.d.ts +10 -10
- package/dist/browser.js +32 -28
- package/dist/capture-encryption.d.ts +3 -1
- package/dist/capture-encryption.js +21 -6
- package/dist/capture-strategy.js +3 -2
- package/dist/cli-config.d.ts +2 -1
- package/dist/cli-config.js +51 -2
- package/dist/cli-contract.d.ts +5 -1
- package/dist/cli-contract.js +7 -1
- package/dist/cli-runner-local.js +16 -3
- package/dist/cli-runner.js +165 -18
- package/dist/cli.js +25 -19
- package/dist/clip-begin-frame-recorder.d.ts +44 -0
- package/dist/clip-begin-frame-recorder.js +250 -0
- package/dist/clip-capture-backend.d.ts +25 -0
- package/dist/clip-capture-backend.js +189 -0
- package/dist/clip-capture-loop.d.ts +61 -0
- package/dist/clip-capture-loop.js +111 -0
- package/dist/clip-frame-recorder.d.ts +63 -0
- package/dist/clip-frame-recorder.js +305 -0
- package/dist/clip-postprocess.d.ts +31 -2
- package/dist/clip-postprocess.js +174 -57
- package/dist/clip-runtime.d.ts +18 -0
- package/dist/clip-runtime.js +67 -0
- package/dist/clip-scale.d.ts +10 -0
- package/dist/clip-scale.js +21 -0
- package/dist/clip-screencast-recorder.d.ts +42 -0
- package/dist/clip-screencast-recorder.js +242 -0
- package/dist/clip-sidecar.d.ts +54 -0
- package/dist/clip-sidecar.js +208 -0
- package/dist/cost-logging.d.ts +1 -1
- package/dist/env-validation.js +38 -4
- package/dist/execution-schema.d.ts +690 -360
- package/dist/execution-schema.js +98 -42
- package/dist/execution-types.d.ts +53 -3
- package/dist/execution-types.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/llm-healer.d.ts +2 -10
- package/dist/llm-healer.js +109 -62
- package/dist/llm-provider.js +3 -0
- package/dist/opcode-actions.js +13 -0
- package/dist/opcode-runner.js +21 -12
- package/dist/program-signing.d.ts +1094 -0
- package/dist/program-signing.js +140 -0
- package/dist/provider-config.d.ts +5 -0
- package/dist/provider-config.js +28 -1
- package/dist/recovery-chain.js +40 -16
- package/dist/server-credit-usage.d.ts +1 -1
- package/dist/types.d.ts +8 -2
- package/dist/web-playwright-local.d.ts +31 -1
- package/dist/web-playwright-local.js +207 -37
- package/package.json +12 -2
package/dist/env-validation.js
CHANGED
|
@@ -4,26 +4,60 @@
|
|
|
4
4
|
*/
|
|
5
5
|
const REQUIRED_ENV_VARS = [
|
|
6
6
|
'SUPABASE_SERVICE_ROLE_KEY',
|
|
7
|
-
'OPENROUTER_API_KEY',
|
|
8
7
|
];
|
|
9
8
|
const REQUIRED_WITH_PUBLIC_FALLBACK = [
|
|
10
9
|
{ key: 'SUPABASE_URL', fallback: 'NEXT_PUBLIC_SUPABASE_URL' },
|
|
11
10
|
];
|
|
12
11
|
export function validateRequiredEnv() {
|
|
13
12
|
const missing = [];
|
|
13
|
+
const invalid = [];
|
|
14
14
|
for (const key of REQUIRED_ENV_VARS) {
|
|
15
|
-
|
|
15
|
+
const value = process.env[key];
|
|
16
|
+
if (!value) {
|
|
16
17
|
missing.push(key);
|
|
17
18
|
}
|
|
19
|
+
else if (!looksLikeStrongSecret(value)) {
|
|
20
|
+
invalid.push(key);
|
|
21
|
+
}
|
|
18
22
|
}
|
|
19
23
|
for (const { key, fallback } of REQUIRED_WITH_PUBLIC_FALLBACK) {
|
|
20
24
|
if (!process.env[key] && !process.env[fallback]) {
|
|
21
25
|
missing.push(`${key} (or ${fallback})`);
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
for (const key of OPTIONAL_STRONG_SECRET_VARS) {
|
|
29
|
+
const value = process.env[key];
|
|
30
|
+
if (value && !looksLikeStrongSecret(value)) {
|
|
31
|
+
invalid.push(key);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (missing.length > 0 || invalid.length > 0) {
|
|
35
|
+
const lines = [
|
|
36
|
+
missing.length > 0
|
|
37
|
+
? `[AutoKap] Missing required environment variables:\n${missing.map((v) => ` - ${v}`).join('\n')}`
|
|
38
|
+
: null,
|
|
39
|
+
invalid.length > 0
|
|
40
|
+
? `[AutoKap] Invalid or placeholder secrets detected:\n${invalid.map((v) => ` - ${v}`).join('\n')}`
|
|
41
|
+
: null,
|
|
42
|
+
].filter(Boolean);
|
|
43
|
+
console.error(`\n${lines.join('\n\n')}\n\nCopy .env.example to .env and fill in the values.\n`);
|
|
26
44
|
process.exit(1);
|
|
27
45
|
}
|
|
28
46
|
}
|
|
47
|
+
const OPTIONAL_STRONG_SECRET_VARS = [
|
|
48
|
+
'PRESET_CREDENTIALS_ENCRYPTION_SECRET',
|
|
49
|
+
'AUTOKAP_WEBHOOK_SECRET',
|
|
50
|
+
'INTERACTIVE_DEMO_TRACKING_SECRET',
|
|
51
|
+
];
|
|
52
|
+
function looksLikeStrongSecret(value) {
|
|
53
|
+
const trimmed = value.trim();
|
|
54
|
+
if (trimmed.length < 24)
|
|
55
|
+
return false;
|
|
56
|
+
const upper = trimmed.toUpperCase();
|
|
57
|
+
return !(upper === 'CHANGE_ME'
|
|
58
|
+
|| upper === 'CHANGEME'
|
|
59
|
+
|| upper.includes('YOUR_')
|
|
60
|
+
|| upper.includes('PLACEHOLDER')
|
|
61
|
+
|| upper.includes('EXAMPLE'));
|
|
62
|
+
}
|
|
29
63
|
//# sourceMappingURL=env-validation.js.map
|