autokap 1.8.7 → 1.8.9
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/cli-config.js +7 -12
- package/dist/cli-contract.d.ts +0 -9
- package/dist/cli-contract.js +11 -38
- package/dist/cli-runner.d.ts +1 -0
- package/dist/cli-runner.js +26 -15
- package/dist/cli.js +7 -7
- package/dist/execution-schema.d.ts +2 -2
- package/dist/execution-schema.js +7 -1
- package/dist/execution-types.d.ts +9 -2
- package/dist/mockup.d.ts +13 -0
- package/dist/mockup.js +12 -0
- package/dist/program-signing.d.ts +1 -1
- package/dist/server-credit-usage.d.ts +1 -1
- package/dist/skill-packaging.js +1 -0
- package/dist/video-narration-schema.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +9 -15
package/dist/cli-config.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
// CLI-local config helpers.
|
|
1
|
+
// CLI-local config helpers. Self-contained, canonical implementation for the
|
|
2
|
+
// bundled CLI binary.
|
|
2
3
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// `@autokap/core` is not yet published to npm. Once core@0.1.0 is on the
|
|
7
|
-
// registry and the published CLI bumps to declare it as a runtime dep, this
|
|
8
|
-
// file can become a thin re-export shim (just LOCAL_WS_URL + requireConfig).
|
|
9
|
-
//
|
|
10
|
-
// Hardening here must stay in lockstep with packages/core/src/config.ts:
|
|
11
|
-
// atomic writes, scheme allowlist on URL inputs, env-var precedence, and
|
|
12
|
-
// the "untrusted origin override" guard.
|
|
4
|
+
// Security invariants to preserve when editing: atomic writes, scheme
|
|
5
|
+
// allowlist on URL inputs, env-var precedence, and the "untrusted origin
|
|
6
|
+
// override" guard.
|
|
13
7
|
import path from 'node:path';
|
|
14
8
|
import os from 'node:os';
|
|
15
9
|
import crypto from 'node:crypto';
|
|
@@ -131,7 +125,8 @@ export async function writeConfig(config) {
|
|
|
131
125
|
? { exportDebugLogs: config.exportDebugLogs }
|
|
132
126
|
: {}),
|
|
133
127
|
};
|
|
134
|
-
// Atomic write
|
|
128
|
+
// Atomic write: write to a temp file then rename, so a crash mid-write
|
|
129
|
+
// never leaves a truncated config.
|
|
135
130
|
const tmpPath = `${configPath}.${process.pid}.${crypto.randomBytes(4).toString('hex')}.tmp`;
|
|
136
131
|
try {
|
|
137
132
|
await fs.writeFile(tmpPath, JSON.stringify(normalizedConfig, null, 2), 'utf-8');
|
package/dist/cli-contract.d.ts
CHANGED
|
@@ -18,15 +18,6 @@ export declare const CLI_DEFAULT_INSTALL_COMMAND = "npx -y autokap@latest";
|
|
|
18
18
|
export declare const CLI_DEFAULT_INSTALLED_SETUP_COMMAND = "autokap login <your-api-key>";
|
|
19
19
|
export declare const CLI_DEFAULT_SETUP_COMMAND = "npx -y autokap@latest login <your-api-key>";
|
|
20
20
|
export declare const CLI_FALLBACK_PROGRAM_COMMAND = "autokap run <preset-id> --program <file>";
|
|
21
|
-
/** Bare MCP runner. Used by generic clients and as the npx command. */
|
|
22
|
-
export declare const MCP_INSTALL_COMMAND = "npx -y @autokap/mcp";
|
|
23
|
-
/** One-shot install command for Claude Code (CLI flag `claude mcp add`). */
|
|
24
|
-
export declare const MCP_CLAUDE_CODE_COMMAND = "claude mcp add autokap -- npx -y @autokap/mcp";
|
|
25
|
-
/**
|
|
26
|
-
* JSON snippet to merge into the IDE-specific MCP config file (Cursor, Codex,
|
|
27
|
-
* Windsurf, Cline...). Format follows the shared `mcpServers` schema.
|
|
28
|
-
*/
|
|
29
|
-
export declare const MCP_CONFIG_SNIPPET_JSON: string;
|
|
30
21
|
export declare function buildCliRunCommand(presetId: string, options?: {
|
|
31
22
|
local?: boolean;
|
|
32
23
|
env?: string;
|
package/dist/cli-contract.js
CHANGED
|
@@ -8,47 +8,20 @@ export const CLI_KEY_TERM = API_KEY_TERM;
|
|
|
8
8
|
export const CLI_VERSION_HEADER = "x-autokap-cli-version";
|
|
9
9
|
export const MIN_CLI_VERSION_FOR_SIGNED_PROGRAMS = "1.0.9";
|
|
10
10
|
export const MIN_CLI_VERSION_FOR_DIRECT_ARTIFACT_UPLOADS = "1.5.0";
|
|
11
|
-
//
|
|
12
|
-
// recommend `npx -y autokap@latest` over a global install to
|
|
13
|
-
// drift contained
|
|
14
|
-
//
|
|
15
|
-
// legacy doc surfaces that still want a single shell snippet.
|
|
11
|
+
// The bundled CLI binary ships for CI / Cloud Run and for running preset
|
|
12
|
+
// captures locally; recommend `npx -y autokap@latest` over a global install to
|
|
13
|
+
// keep version drift contained. The `CLI_DEFAULT_INSTALL_COMMAND` alias is the
|
|
14
|
+
// single shell snippet doc surfaces reference.
|
|
16
15
|
export const CLI_DEFAULT_INSTALL_COMMAND = "npx -y autokap@latest";
|
|
17
16
|
// `autokap init` was removed in v2. The setup command now uses the surviving
|
|
18
17
|
// `autokap login` for the same purpose (store the API key in ~/.autokap/config.json).
|
|
19
|
-
// MCP-first workflows should use `autokap_authenticate` from the IDE instead.
|
|
20
18
|
export const CLI_DEFAULT_INSTALLED_SETUP_COMMAND = "autokap login <your-api-key>";
|
|
21
19
|
export const CLI_DEFAULT_SETUP_COMMAND = "npx -y autokap@latest login <your-api-key>";
|
|
22
|
-
// `autokap skill --agent` was removed in v2. The
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
// surfacing it would mislead users into typing a non-existent command.
|
|
20
|
+
// `autokap skill --agent` was removed in v2. The legacy `CLI_ADVANCED_SKILL_COMMAND`
|
|
21
|
+
// constant that pointed at the removed command was dropped entirely — it had no
|
|
22
|
+
// consumers and any future doc page surfacing it would mislead users into typing
|
|
23
|
+
// a non-existent command.
|
|
27
24
|
export const CLI_FALLBACK_PROGRAM_COMMAND = "autokap run <preset-id> --program <file>";
|
|
28
|
-
// ── MCP-first install contract ──────────────────────────────────────
|
|
29
|
-
//
|
|
30
|
-
// AutoKap is primarily exposed as a Model Context Protocol server via the
|
|
31
|
-
// `@autokap/mcp` package. Every supported IDE installs the server by adding a
|
|
32
|
-
// single stdio entry that runs `npx -y @autokap/mcp` — the constants below
|
|
33
|
-
// are the canonical shell forms used across onboarding surfaces (wizard,
|
|
34
|
-
// modal, banner, docs). For per-IDE payloads (config paths, snippets, notes),
|
|
35
|
-
// use `getMcpInstallEntries()` from `web/lib/site-discovery.ts`.
|
|
36
|
-
/** Bare MCP runner. Used by generic clients and as the npx command. */
|
|
37
|
-
export const MCP_INSTALL_COMMAND = "npx -y @autokap/mcp";
|
|
38
|
-
/** One-shot install command for Claude Code (CLI flag `claude mcp add`). */
|
|
39
|
-
export const MCP_CLAUDE_CODE_COMMAND = "claude mcp add autokap -- npx -y @autokap/mcp";
|
|
40
|
-
/**
|
|
41
|
-
* JSON snippet to merge into the IDE-specific MCP config file (Cursor, Codex,
|
|
42
|
-
* Windsurf, Cline...). Format follows the shared `mcpServers` schema.
|
|
43
|
-
*/
|
|
44
|
-
export const MCP_CONFIG_SNIPPET_JSON = JSON.stringify({
|
|
45
|
-
mcpServers: {
|
|
46
|
-
autokap: {
|
|
47
|
-
command: "npx",
|
|
48
|
-
args: ["-y", "@autokap/mcp"],
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
}, null, 2);
|
|
52
25
|
export function buildCliRunCommand(presetId, options = {}) {
|
|
53
26
|
const flags = [
|
|
54
27
|
options.local ? " --local" : "",
|
|
@@ -65,19 +38,19 @@ export const CLI_PUBLIC_COMMANDS = [
|
|
|
65
38
|
{
|
|
66
39
|
id: "login",
|
|
67
40
|
command: "autokap login <key>",
|
|
68
|
-
summary: "Authenticate with your API key (used by Cloud Run + CI
|
|
41
|
+
summary: "Authenticate with your API key (used by Cloud Run + CI and for local preset runs)",
|
|
69
42
|
docsDescriptionKey: "cliCmdLogin",
|
|
70
43
|
},
|
|
71
44
|
{
|
|
72
45
|
id: "run",
|
|
73
46
|
command: "autokap run <preset-id> --env local",
|
|
74
|
-
summary: "Run a preset capture using local Playwright
|
|
47
|
+
summary: "Run a preset capture using local Playwright",
|
|
75
48
|
docsDescriptionKey: "cliCmdRun",
|
|
76
49
|
},
|
|
77
50
|
{
|
|
78
51
|
id: "auto-recapture",
|
|
79
52
|
command: "autokap auto-recapture --project <project-id> --env local",
|
|
80
|
-
summary: "Run every preset enabled for Recapture Cloud in a project (the canonical surface for Cloud Run + CI
|
|
53
|
+
summary: "Run every preset enabled for Recapture Cloud in a project (the canonical surface for Cloud Run + CI)",
|
|
81
54
|
docsDescriptionKey: "cliCmdAutoRecapture",
|
|
82
55
|
},
|
|
83
56
|
{
|
package/dist/cli-runner.d.ts
CHANGED
|
@@ -58,3 +58,4 @@ export interface CLIRunResult {
|
|
|
58
58
|
}
|
|
59
59
|
export declare function runCapture(options: CLIRunnerOptions): Promise<CLIRunResult>;
|
|
60
60
|
export declare function buildVideoClipMetadata(videoId: string, result: RunResult, program?: ExecutionProgram, runId?: string): VideoClipMetadata[];
|
|
61
|
+
export declare function resolveEffectiveCliArtifactPlan(artifactPlan: ExecutionProgram['artifactPlan'], deviceFrame?: string | null): ExecutionProgram['artifactPlan'];
|
package/dist/cli-runner.js
CHANGED
|
@@ -25,7 +25,7 @@ import { parseProgram } from './execution-schema.js';
|
|
|
25
25
|
import { buildCursorOverlayScript } from './cursor-overlay-script.js';
|
|
26
26
|
import { CLI_VERSION_HEADER, } from './cli-contract.js';
|
|
27
27
|
import { postProcessClipRecording } from './clip-postprocess.js';
|
|
28
|
-
import { applyDeviceFrame, seedDeviceConfigs } from './mockup.js';
|
|
28
|
+
import { applyDeviceFrame, resolveVariantFrameOptions, seedDeviceConfigs } from './mockup.js';
|
|
29
29
|
import { transformBrowserUrl } from './transform-browser-url.js';
|
|
30
30
|
import { localizeStatusBar } from './status-bar-l10n.js';
|
|
31
31
|
import { logger } from './logger.js';
|
|
@@ -164,7 +164,12 @@ export async function runCapture(options) {
|
|
|
164
164
|
catch (error) {
|
|
165
165
|
return { success: false, runId, error: error instanceof Error ? error.message : String(error) };
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
// TTS synthesis is real, billed work — it belongs to a real run only. A dry run validates
|
|
168
|
+
// navigation/opcodes (capture opcodes + upload are skipped below) and must NOT synthesize speech:
|
|
169
|
+
// doing so would bill TTS credits while the run reports "0 credits charged". The rewritten SLEEP
|
|
170
|
+
// durations + audio assets are only consumed on the upload path (signalVideoComplete), which a dry
|
|
171
|
+
// run never reaches, so skipping prep here is side-effect-free for dry.
|
|
172
|
+
if (!options.dryRun && !options.program && program.mediaMode === 'video') {
|
|
168
173
|
const prepareResult = await prepareVideoSpeechForRun(config, options.presetId, runId, options.regenerateTts ?? false);
|
|
169
174
|
if (!prepareResult.success) {
|
|
170
175
|
return { success: false, runId, error: prepareResult.error };
|
|
@@ -962,6 +967,9 @@ async function uploadArtifactMultipart(config, program, runId, job, filename, pr
|
|
|
962
967
|
if (variantSpec?.deviceFrame) {
|
|
963
968
|
formData.append('deviceFrame', variantSpec.deviceFrame);
|
|
964
969
|
}
|
|
970
|
+
if (variantSpec?.mockupOptions) {
|
|
971
|
+
formData.append('mockupOptions', JSON.stringify(variantSpec.mockupOptions));
|
|
972
|
+
}
|
|
965
973
|
const requestedDeviceScaleFactor = variantSpec?.deviceScaleFactor ?? program.outputScale ?? 2;
|
|
966
974
|
const isFrameCapture = artifact.mediaMode === 'clip' || artifact.mediaMode === 'video';
|
|
967
975
|
const deviceScaleFactor = isFrameCapture && Number.isFinite(requestedDeviceScaleFactor)
|
|
@@ -1103,22 +1111,24 @@ async function prepareDirectUploadParts(params) {
|
|
|
1103
1111
|
async function prepareScreenshotBufferForDirectUpload(input, metadata, program, variantSpec, tabIcon) {
|
|
1104
1112
|
let output = input;
|
|
1105
1113
|
const artifactPlan = resolveEffectiveCliArtifactPlan(program.artifactPlan, variantSpec?.deviceFrame ?? null);
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
if (
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
}
|
|
1113
|
-
output = await applyDeviceFrame(output, variantSpec.deviceFrame, {
|
|
1114
|
+
// The variant's deviceFrame is the sole gate. Its mockupOptions (orientation, status bar,
|
|
1115
|
+
// safe areas, …) — defined by the user on the preset — drive the frame; the legacy
|
|
1116
|
+
// program-level applyStatusBar only survives as a fallback for old programs without options.
|
|
1117
|
+
if (variantSpec?.deviceFrame) {
|
|
1118
|
+
const mockup = variantSpec.mockupOptions;
|
|
1119
|
+
const frame = resolveVariantFrameOptions(mockup, {
|
|
1114
1120
|
orientation: inferCliOrientation(metadata.viewport ?? null),
|
|
1121
|
+
showStatusBar: artifactPlan?.applyStatusBar,
|
|
1122
|
+
});
|
|
1123
|
+
output = await applyDeviceFrame(output, variantSpec.deviceFrame, {
|
|
1124
|
+
...mockup,
|
|
1125
|
+
...frame,
|
|
1115
1126
|
viewport: metadata.viewport ?? undefined,
|
|
1116
1127
|
colorScheme: metadata.theme,
|
|
1117
1128
|
outputScale: normalizeCliDeviceScaleFactor(metadata.deviceScaleFactor)
|
|
1118
1129
|
?? normalizeCliDeviceScaleFactor(program.outputScale)
|
|
1119
1130
|
?? 2,
|
|
1120
|
-
|
|
1121
|
-
statusBar: localizeStatusBar({}, metadata.lang),
|
|
1131
|
+
statusBar: localizeStatusBar(mockup?.statusBar ?? {}, metadata.lang),
|
|
1122
1132
|
browserBar: buildCliBrowserBar(metadata.captureUrl, metadata.theme, tabIcon, { publicUrl: program.publicUrl, pageTitle: metadata.pageTitle ?? null }),
|
|
1123
1133
|
});
|
|
1124
1134
|
}
|
|
@@ -1181,10 +1191,11 @@ async function prepareClipBuffersForDirectUpload(artifact, metadata) {
|
|
|
1181
1191
|
await fs.rm(tempDir, { recursive: true, force: true }).catch(() => undefined);
|
|
1182
1192
|
}
|
|
1183
1193
|
}
|
|
1184
|
-
function resolveEffectiveCliArtifactPlan(artifactPlan, deviceFrame) {
|
|
1194
|
+
export function resolveEffectiveCliArtifactPlan(artifactPlan, deviceFrame) {
|
|
1195
|
+
// Device mockups are gated SOLELY by the variant's `deviceFrame` (user-defined, deterministic).
|
|
1196
|
+
// A present deviceFrame always renders its frame; `applyMockup` is a derived value, never a
|
|
1197
|
+
// kill-switch (the legacy `applyMockup: false` toggle is intentionally ignored here).
|
|
1185
1198
|
if (deviceFrame) {
|
|
1186
|
-
if (artifactPlan.applyMockup === false)
|
|
1187
|
-
return artifactPlan;
|
|
1188
1199
|
return artifactPlan.applyMockup ? artifactPlan : { ...artifactPlan, applyMockup: true };
|
|
1189
1200
|
}
|
|
1190
1201
|
if (!artifactPlan.applyMockup && !artifactPlan.applyStatusBar)
|
package/dist/cli.js
CHANGED
|
@@ -120,9 +120,9 @@ program
|
|
|
120
120
|
logger.success(`Authenticated. Key stored in ${getConfigPath()}`);
|
|
121
121
|
process.exit(0);
|
|
122
122
|
});
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
// `
|
|
123
|
+
// This binary keeps `login` only for CI / Cloud Run and local preset runs.
|
|
124
|
+
// Local dev can still inspect the config via `autokap doctor` or
|
|
125
|
+
// `cat ~/.autokap/config.json`.
|
|
126
126
|
async function runOutdatedPresetsLocally(opts) {
|
|
127
127
|
if (opts.output) {
|
|
128
128
|
fatal('`--output` is not supported with `--outdated`; run an individual preset when local copies are needed.');
|
|
@@ -511,10 +511,10 @@ program
|
|
|
511
511
|
});
|
|
512
512
|
process.exit(0);
|
|
513
513
|
});
|
|
514
|
-
// Project, preset, capture, usage, video,
|
|
515
|
-
//
|
|
516
|
-
// commands needed by CI
|
|
517
|
-
//
|
|
514
|
+
// Project, preset, capture, usage, video, endpoints, proxy, and branding
|
|
515
|
+
// workflows are managed from the AutoKap web dashboard and GitHub PR
|
|
516
|
+
// generation. This binary exposes only the commands needed by CI, Cloud Run,
|
|
517
|
+
// and local preset runs (login / run / auto-recapture / doctor).
|
|
518
518
|
// ── doctor command ──────────────────────────────────────────────────
|
|
519
519
|
program
|
|
520
520
|
.command('doctor')
|
|
@@ -1053,7 +1053,7 @@ export declare const VariantSpecSchema: z.ZodObject<{
|
|
|
1053
1053
|
light: "light";
|
|
1054
1054
|
dark: "dark";
|
|
1055
1055
|
}>>;
|
|
1056
|
-
}, z.core.$
|
|
1056
|
+
}, z.core.$strip>>;
|
|
1057
1057
|
}, z.core.$strict>;
|
|
1058
1058
|
export declare const PreconditionSpecSchema: z.ZodObject<{
|
|
1059
1059
|
credentialsId: z.ZodOptional<z.ZodString>;
|
|
@@ -1205,7 +1205,7 @@ export declare const ExecutionProgramSchema: z.ZodObject<{
|
|
|
1205
1205
|
light: "light";
|
|
1206
1206
|
dark: "dark";
|
|
1207
1207
|
}>>;
|
|
1208
|
-
}, z.core.$
|
|
1208
|
+
}, z.core.$strip>>;
|
|
1209
1209
|
}, z.core.$strict>>;
|
|
1210
1210
|
preconditions: z.ZodObject<{
|
|
1211
1211
|
credentialsId: z.ZodOptional<z.ZodString>;
|
package/dist/execution-schema.js
CHANGED
|
@@ -553,7 +553,13 @@ export const VariantSpecSchema = z.object({
|
|
|
553
553
|
radius: z.number(),
|
|
554
554
|
}).strict().optional(),
|
|
555
555
|
colorScheme: z.enum(['light', 'dark']).optional(),
|
|
556
|
-
|
|
556
|
+
// STRIP (not strict): per-variant mockupOptions are reconciled verbatim from the preset's
|
|
557
|
+
// CaptureTarget, whose UI-side MockupOptions carries render-irrelevant keys the engine never
|
|
558
|
+
// consumes (showDock, dockScale, dockMode, userAppIcon, autoBrowserBar, viewport). Strict would
|
|
559
|
+
// make parseProgram THROW on those — stranding every Mac/browser preset at CLI fetch time.
|
|
560
|
+
// Dropping unknown keys post-parse is safe: applyDeviceFrame ignores them, and the full set
|
|
561
|
+
// stays on config.targets for the UI/preview.
|
|
562
|
+
}).optional(),
|
|
557
563
|
}).strict();
|
|
558
564
|
const cookieSchema = z.object({
|
|
559
565
|
name: z.string().min(1),
|
|
@@ -535,9 +535,16 @@ export interface ArtifactSpec {
|
|
|
535
535
|
cursorTheme?: VideoCursorTheme;
|
|
536
536
|
/** Max clip duration in seconds. Clips are trimmed if they exceed this. Default: 8. Ignored when `mediaMode='video'`. */
|
|
537
537
|
maxClipDurationSec?: number;
|
|
538
|
-
/**
|
|
538
|
+
/**
|
|
539
|
+
* @deprecated Device mockups are gated SOLELY by a variant's `deviceFrame` (user-defined,
|
|
540
|
+
* deterministic). The render paths derive mockup application from `deviceFrame` and ignore this
|
|
541
|
+
* flag as a gate. Kept optional for back-compat with stored programs; do not author it.
|
|
542
|
+
*/
|
|
539
543
|
applyMockup?: boolean;
|
|
540
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* @deprecated Per-variant `mockupOptions.showStatusBar` drives the status bar now. Retained only
|
|
546
|
+
* as a fallback for legacy programs that lack per-variant `mockupOptions`. Do not author it.
|
|
547
|
+
*/
|
|
541
548
|
applyStatusBar?: boolean;
|
|
542
549
|
}
|
|
543
550
|
export interface ExecutionProgram {
|
package/dist/mockup.d.ts
CHANGED
|
@@ -204,6 +204,19 @@ export interface MockupOptions {
|
|
|
204
204
|
height: number;
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Resolve the two per-variant frame decisions shared by both render paths (CLI direct-upload
|
|
209
|
+
* framing and the cloud legacy-multipart route): a variant's own `mockupOptions` wins, falling
|
|
210
|
+
* back to the viewport-inferred orientation and the deprecated program-level `applyStatusBar`.
|
|
211
|
+
* Pure + exported so the precedence is tested once instead of in two duplicated call sites.
|
|
212
|
+
*/
|
|
213
|
+
export declare function resolveVariantFrameOptions(mockupOptions: MockupOptions | undefined, fallback: {
|
|
214
|
+
orientation?: MockupOrientation;
|
|
215
|
+
showStatusBar?: boolean;
|
|
216
|
+
}): {
|
|
217
|
+
orientation?: MockupOrientation;
|
|
218
|
+
showStatusBar: boolean;
|
|
219
|
+
};
|
|
207
220
|
export interface ResolvedDeviceFrameDescriptor {
|
|
208
221
|
id: string;
|
|
209
222
|
name: string;
|
package/dist/mockup.js
CHANGED
|
@@ -17,6 +17,18 @@ function getSupabaseMockupConfig() {
|
|
|
17
17
|
serviceKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolve the two per-variant frame decisions shared by both render paths (CLI direct-upload
|
|
22
|
+
* framing and the cloud legacy-multipart route): a variant's own `mockupOptions` wins, falling
|
|
23
|
+
* back to the viewport-inferred orientation and the deprecated program-level `applyStatusBar`.
|
|
24
|
+
* Pure + exported so the precedence is tested once instead of in two duplicated call sites.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveVariantFrameOptions(mockupOptions, fallback) {
|
|
27
|
+
return {
|
|
28
|
+
orientation: mockupOptions?.orientation ?? fallback.orientation,
|
|
29
|
+
showStatusBar: mockupOptions?.showStatusBar ?? fallback.showStatusBar ?? false,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
20
32
|
const DEFAULT_MOCKUP_OPTIONS = {
|
|
21
33
|
orientation: 'portrait',
|
|
22
34
|
outputScale: 2,
|
|
@@ -111,7 +111,7 @@ export declare const SignedExecutionProgramEnvelopeSchema: z.ZodObject<{
|
|
|
111
111
|
light: "light";
|
|
112
112
|
dark: "dark";
|
|
113
113
|
}>>;
|
|
114
|
-
}, z.core.$
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
115
|
}, z.core.$strict>>;
|
|
116
116
|
preconditions: z.ZodObject<{
|
|
117
117
|
credentialsId: z.ZodOptional<z.ZodString>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
-
export type CreditUsageType = 'screenshot' | 'clip' | 'video' | 'cloud_recapture' | 'ai_chat' | 'studio_creation' | 'studio_iteration' | 'error_analysis' | 'obsolescence_analysis';
|
|
2
|
+
export type CreditUsageType = 'screenshot' | 'clip' | 'video' | 'cloud_recapture' | 'ai_chat' | 'studio_creation' | 'studio_iteration' | 'error_analysis' | 'obsolescence_analysis' | 'pr_generation';
|
|
3
3
|
export declare function recordCreditUsage(supabase: SupabaseClient, params: {
|
|
4
4
|
userId: string;
|
|
5
5
|
projectId: string | null;
|
package/dist/skill-packaging.js
CHANGED
|
@@ -19,6 +19,7 @@ const PRESET_SKILL_SOURCE = {
|
|
|
19
19
|
{ relativePath: 'OPCODE-REFERENCE.md', title: 'Opcode Reference', anchor: 'reference-opcode-reference' },
|
|
20
20
|
{ relativePath: 'references/STANDARDS.md', title: 'Prompt Charter & Quality Standards', anchor: 'reference-prompt-standards' },
|
|
21
21
|
{ relativePath: 'references/mock-data.md', title: 'Mock Data Injection', anchor: 'reference-mock-data-injection' },
|
|
22
|
+
{ relativePath: 'references/video-workflow.md', title: 'Demo Video Workflow', anchor: 'reference-demo-video-workflow' },
|
|
22
23
|
{ relativePath: 'references/examples.md', title: 'Complete Examples', anchor: 'reference-complete-examples' },
|
|
23
24
|
],
|
|
24
25
|
};
|
|
@@ -130,7 +130,7 @@ export declare const VideoIngestPayloadSchema: z.ZodObject<{
|
|
|
130
130
|
light: "light";
|
|
131
131
|
dark: "dark";
|
|
132
132
|
}>>;
|
|
133
|
-
}, z.core.$
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
134
|
}, z.core.$strict>>;
|
|
135
135
|
preconditions: z.ZodObject<{
|
|
136
136
|
credentialsId: z.ZodOptional<z.ZodString>;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -3,21 +3,15 @@
|
|
|
3
3
|
AI-powered website screenshot capture across every device, language, and
|
|
4
4
|
theme.
|
|
5
5
|
|
|
6
|
-
This npm package (`autokap`) is the **backend**
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
in the repository root README and the
|
|
16
|
-
[migration guide](https://github.com/autokap/autokap/blob/main/MIGRATION-v1-to-v2.md).
|
|
17
|
-
|
|
18
|
-
The advanced commands `autokap login`, `autokap run`, `autokap doctor`,
|
|
19
|
-
and `autokap auto-recapture` remain available for users who need a
|
|
20
|
-
scriptable backend (CI/CD, custom orchestrators).
|
|
6
|
+
This npm package (`autokap`) is the **backend** that runs the AutoKap capture
|
|
7
|
+
engine. It is consumed by the AutoKap Cloud Run service that handles
|
|
8
|
+
`npx autokap auto-recapture --cloud` jobs, by CI pipelines, and for local
|
|
9
|
+
preset runs.
|
|
10
|
+
|
|
11
|
+
The commands `autokap login`, `autokap run`, `autokap doctor`, and
|
|
12
|
+
`autokap auto-recapture` are available for users who need a scriptable backend
|
|
13
|
+
(CI/CD, custom orchestrators). Project, preset, and capture management happens
|
|
14
|
+
in the AutoKap web dashboard.
|
|
21
15
|
|
|
22
16
|
## Recapture Cloud in CI/CD
|
|
23
17
|
|