autokap 1.0.2 → 1.0.3
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.d.ts +13 -0
- package/dist/cli-config.js +42 -0
- package/dist/cli-utils.d.ts +0 -19
- package/dist/cli-utils.js +2 -65
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +266 -305
- package/package.json +23 -16
- 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 +0 -52
- package/assets/devices/iphone-16-pro.json +0 -53
- package/assets/devices/macbook-air-13.json +0 -45
- package/assets/frames/MacBook Air 13.svg +0 -242
- package/assets/frames/Status bar - iPhone.png +0 -0
- package/assets/frames/Status bar and 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 +0 -3
- package/assets/icons/Union.svg +0 -6
- package/assets/icons/Wifi.svg +0 -3
- package/assets/icons/battery.svg +0 -5
- package/assets/icons/battery_charging.svg +0 -8
- package/dist/abort.d.ts +0 -5
- package/dist/abort.js +0 -44
- package/dist/agent.d.ts +0 -142
- package/dist/agent.js +0 -4504
- package/dist/browser-bar.d.ts +0 -40
- package/dist/browser-bar.js +0 -147
- package/dist/clip-orchestrator.d.ts +0 -148
- package/dist/clip-orchestrator.js +0 -950
- package/dist/clip-postprocess.d.ts +0 -42
- package/dist/clip-postprocess.js +0 -192
- package/dist/credential-templates.d.ts +0 -5
- package/dist/credential-templates.js +0 -60
- package/dist/element-capture.d.ts +0 -53
- package/dist/element-capture.js +0 -766
- package/dist/hybrid-navigator.d.ts +0 -138
- package/dist/hybrid-navigator.js +0 -468
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -11
- package/dist/llm-usage.d.ts +0 -17
- package/dist/llm-usage.js +0 -45
- package/dist/mockup-html.d.ts +0 -119
- package/dist/mockup-html.js +0 -253
- package/dist/mockup.d.ts +0 -94
- package/dist/mockup.js +0 -604
- package/dist/mouse-animation.d.ts +0 -46
- package/dist/mouse-animation.js +0 -100
- package/dist/overlay-utils.d.ts +0 -14
- package/dist/overlay-utils.js +0 -13
- package/dist/posthog.d.ts +0 -4
- package/dist/posthog.js +0 -26
- package/dist/prompt-cache.d.ts +0 -10
- package/dist/prompt-cache.js +0 -24
- package/dist/prompts.d.ts +0 -167
- package/dist/prompts.js +0 -1165
- package/dist/security.d.ts +0 -20
- package/dist/security.js +0 -569
- package/dist/session-profile.d.ts +0 -86
- package/dist/session-profile.js +0 -1471
- package/dist/sf-pro-fonts.d.ts +0 -4
- package/dist/sf-pro-fonts.js +0 -7
- package/dist/status-bar-l10n.d.ts +0 -14
- package/dist/status-bar-l10n.js +0 -177
- package/dist/status-bar.d.ts +0 -44
- package/dist/status-bar.js +0 -336
- package/dist/tools.d.ts +0 -4
- package/dist/tools.js +0 -578
- package/dist/video-agent.d.ts +0 -143
- package/dist/video-agent.js +0 -4783
- package/dist/video-observation.d.ts +0 -36
- package/dist/video-observation.js +0 -192
- package/dist/video-planner.d.ts +0 -12
- package/dist/video-planner.js +0 -500
- package/dist/video-prompts.d.ts +0 -37
- package/dist/video-prompts.js +0 -554
- package/dist/video-tools.d.ts +0 -3
- package/dist/video-tools.js +0 -59
- package/dist/video-variant-state.d.ts +0 -29
- package/dist/video-variant-state.js +0 -80
- package/dist/vision-model.d.ts +0 -17
- package/dist/vision-model.js +0 -74
package/dist/video-agent.d.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Browser } from './browser.js';
|
|
2
|
-
import type { VideoAgentConfig, VideoAgentResult, VideoPhase, InteractiveElement, VideoStep, VideoPlan, StepUsage, VideoStepAttemptTrace, VideoStepArtifact, VideoSelectorMemoryUpdate, VideoPageSignals, VideoObservationSnapshot, BrowserSessionStorageState, BrowserStorageState } from './types.js';
|
|
3
|
-
export type VideoLogCallback = (entry: {
|
|
4
|
-
level: 'info' | 'success' | 'error' | 'ai';
|
|
5
|
-
message: string;
|
|
6
|
-
timestamp: number;
|
|
7
|
-
}) => void;
|
|
8
|
-
export type VideoPhaseCallback = (phase: VideoPhase) => void;
|
|
9
|
-
export type VideoStepCallback = (stepIndex: number, total: number, description: string, phase: 'dry_run' | 'recording') => void;
|
|
10
|
-
export type VideoStepResultCallback = (stepIndex: number, ok: boolean, reason?: string) => void;
|
|
11
|
-
export type VideoVariantPhase = 'preflight' | 'planning' | 'dry_run' | 'recording' | 'done' | 'failed';
|
|
12
|
-
export interface VideoPreflightResult {
|
|
13
|
-
ok: boolean;
|
|
14
|
-
reason?: string;
|
|
15
|
-
code?: string;
|
|
16
|
-
detectedLang?: string | null;
|
|
17
|
-
detectedTheme?: 'light' | 'dark' | null;
|
|
18
|
-
finalUrl?: string;
|
|
19
|
-
storageState?: BrowserStorageState;
|
|
20
|
-
sessionStorage?: BrowserSessionStorageState;
|
|
21
|
-
pageSignals?: VideoPageSignals;
|
|
22
|
-
observationSummary?: string;
|
|
23
|
-
observationSnapshot?: VideoObservationSnapshot;
|
|
24
|
-
usage?: StepUsage[];
|
|
25
|
-
}
|
|
26
|
-
export type VideoPreflightCallback = (result: VideoPreflightResult) => void;
|
|
27
|
-
export type VideoVariantPhaseCallback = (phase: VideoVariantPhase) => void;
|
|
28
|
-
export type VideoStepAttemptCallback = (attempt: VideoStepAttemptTrace) => void;
|
|
29
|
-
export type VideoStepArtifactCallback = (artifact: VideoStepArtifact) => void;
|
|
30
|
-
export interface VideoRunCallbacks {
|
|
31
|
-
onLog?: VideoLogCallback;
|
|
32
|
-
onPhaseChange?: VideoPhaseCallback;
|
|
33
|
-
onVariantPhase?: VideoVariantPhaseCallback;
|
|
34
|
-
onStep?: VideoStepCallback;
|
|
35
|
-
onStepResult?: VideoStepResultCallback;
|
|
36
|
-
onStepAttempt?: VideoStepAttemptCallback;
|
|
37
|
-
onStepArtifact?: VideoStepArtifactCallback;
|
|
38
|
-
onPreflightResult?: VideoPreflightCallback;
|
|
39
|
-
/** Emit a live Playwright screenshot (base64 JPEG) for real-time preview in the UI. */
|
|
40
|
-
onScreenshot?: (base64: string) => void;
|
|
41
|
-
}
|
|
42
|
-
type VideoDryRunFailureSubphase = 'prepared_variant' | 'deterministic_exec' | 'verification_snapshot' | 'verification_llm' | 'repair_lane' | 'llm_fixer' | 'checkpoint_restore' | 'budget';
|
|
43
|
-
export interface VideoDryRunFailure {
|
|
44
|
-
stepIndex: number;
|
|
45
|
-
subphase: VideoDryRunFailureSubphase;
|
|
46
|
-
reason: string;
|
|
47
|
-
resolvedTargetSummary?: string;
|
|
48
|
-
}
|
|
49
|
-
interface VideoStepCheckpoint {
|
|
50
|
-
url: string;
|
|
51
|
-
scrollX: number;
|
|
52
|
-
scrollY: number;
|
|
53
|
-
}
|
|
54
|
-
interface ViewportRectSnapshot {
|
|
55
|
-
top: number;
|
|
56
|
-
bottom: number;
|
|
57
|
-
left: number;
|
|
58
|
-
right: number;
|
|
59
|
-
width: number;
|
|
60
|
-
height: number;
|
|
61
|
-
}
|
|
62
|
-
export declare function restoreVideoStepCheckpoint(browser: Browser, checkpoint: VideoStepCheckpoint): Promise<void>;
|
|
63
|
-
export declare function isRectMeaningfullyVisibleInViewport(params: {
|
|
64
|
-
rect: ViewportRectSnapshot;
|
|
65
|
-
viewportWidth: number;
|
|
66
|
-
viewportHeight: number;
|
|
67
|
-
topInset?: number;
|
|
68
|
-
bottomInset?: number;
|
|
69
|
-
}): boolean;
|
|
70
|
-
export declare function sanitizeVariantPrefixSteps(steps: VideoStep[], requestedLang?: string, requestedTheme?: 'light' | 'dark'): VideoStep[];
|
|
71
|
-
export declare function evaluateVideoStepSafety(step: VideoStep, config: VideoAgentConfig, page: import('playwright').Page, currentUrl: string, interactiveElements: InteractiveElement[]): Promise<{
|
|
72
|
-
allowed: boolean;
|
|
73
|
-
reason?: string;
|
|
74
|
-
}>;
|
|
75
|
-
export declare function extractNamedScrollTarget(description?: string): string | null;
|
|
76
|
-
export declare function inspectVideoTarget(page: import('playwright').Page, selector?: string, coordinates?: {
|
|
77
|
-
x: number;
|
|
78
|
-
y: number;
|
|
79
|
-
}): Promise<InteractiveElement | null>;
|
|
80
|
-
interface VerifyStepResult {
|
|
81
|
-
ok: boolean;
|
|
82
|
-
reason?: string;
|
|
83
|
-
suggestion?: string;
|
|
84
|
-
giveUp?: boolean;
|
|
85
|
-
usage: Partial<StepUsage>;
|
|
86
|
-
}
|
|
87
|
-
export declare function verifyVideoStepDeterministically(browser: Browser, step: VideoStep): Promise<VerifyStepResult | null>;
|
|
88
|
-
export declare function runVariantPreflight(config: VideoAgentConfig, prefixPlan: VideoPlan | null, callbacks?: VideoRunCallbacks): Promise<VideoPreflightResult>;
|
|
89
|
-
export declare function composeHybridPlan(basePlan: VideoPlan, variantPrefixPlan: VideoPlan | null): VideoPlan;
|
|
90
|
-
export declare function createBasePlan(config: VideoAgentConfig): Promise<{
|
|
91
|
-
plan: VideoPlan;
|
|
92
|
-
usage: StepUsage;
|
|
93
|
-
}>;
|
|
94
|
-
export declare function createVariantPrefixPlan(config: VideoAgentConfig): Promise<{
|
|
95
|
-
plan: VideoPlan;
|
|
96
|
-
usage: StepUsage;
|
|
97
|
-
}>;
|
|
98
|
-
export declare function verifyAndPatchPlan(plan: VideoPlan, config: VideoAgentConfig, callbacks?: VideoRunCallbacks): Promise<{
|
|
99
|
-
success: true;
|
|
100
|
-
plan: VideoPlan;
|
|
101
|
-
usage: StepUsage[];
|
|
102
|
-
memoryUpdates: VideoSelectorMemoryUpdate[];
|
|
103
|
-
} | {
|
|
104
|
-
success: false;
|
|
105
|
-
error: string;
|
|
106
|
-
usage: StepUsage[];
|
|
107
|
-
memoryUpdates: VideoSelectorMemoryUpdate[];
|
|
108
|
-
failedStepIndex?: number;
|
|
109
|
-
failedSubphase?: VideoDryRunFailureSubphase;
|
|
110
|
-
}>;
|
|
111
|
-
/**
|
|
112
|
-
* Backward-compatible helper: full planning + verify in one call.
|
|
113
|
-
*/
|
|
114
|
-
export declare function planAndVerify(config: VideoAgentConfig, callbacks?: VideoRunCallbacks): Promise<{
|
|
115
|
-
success: true;
|
|
116
|
-
plan: VideoPlan;
|
|
117
|
-
usage: StepUsage[];
|
|
118
|
-
memoryUpdates: VideoSelectorMemoryUpdate[];
|
|
119
|
-
} | {
|
|
120
|
-
success: false;
|
|
121
|
-
error: string;
|
|
122
|
-
usage: StepUsage[];
|
|
123
|
-
memoryUpdates: VideoSelectorMemoryUpdate[];
|
|
124
|
-
}>;
|
|
125
|
-
/**
|
|
126
|
-
* Run phase 3 (recording only) using a pre-verified plan.
|
|
127
|
-
* Call after `planAndVerify()` to record across multiple lang/theme combinations.
|
|
128
|
-
*/
|
|
129
|
-
export declare function recordPlan(plan: VideoPlan, config: VideoAgentConfig, callbacks?: VideoRunCallbacks): Promise<{
|
|
130
|
-
videoPath: string | null;
|
|
131
|
-
durationMs: number;
|
|
132
|
-
stepsExecuted: number;
|
|
133
|
-
setupDurationSec: number;
|
|
134
|
-
usage: StepUsage[];
|
|
135
|
-
}>;
|
|
136
|
-
/**
|
|
137
|
-
* Run the full 3-phase video capture pipeline:
|
|
138
|
-
* 1. Planning: script → structured plan (LLM)
|
|
139
|
-
* 2. Dry-run: verify all steps work
|
|
140
|
-
* 3. Recording: execute with Bezier mouse + cursor overlay
|
|
141
|
-
*/
|
|
142
|
-
export declare function runVideoAgent(config: VideoAgentConfig, callbacks?: VideoRunCallbacks): Promise<VideoAgentResult>;
|
|
143
|
-
export {};
|