autokap 1.0.5 → 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 +21 -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,216 @@
|
|
|
1
|
+
import { resolveDeviceFrameDescriptor, } from "./mockup.js";
|
|
2
|
+
import { buildScreenshotVariantPlan, } from "./capture-run-optimizer.js";
|
|
3
|
+
import { findVariantPageDefinitionIssues } from "./capture-page-identity.js";
|
|
4
|
+
function normalizeViewportDimension(value) {
|
|
5
|
+
if (!Number.isFinite(value))
|
|
6
|
+
return 1;
|
|
7
|
+
return Math.max(1, Math.round(value));
|
|
8
|
+
}
|
|
9
|
+
function getRequestedOrientation(target) {
|
|
10
|
+
const orientation = target.mockupOptions?.orientation;
|
|
11
|
+
return orientation === "portrait" || orientation === "landscape"
|
|
12
|
+
? orientation
|
|
13
|
+
: undefined;
|
|
14
|
+
}
|
|
15
|
+
async function resolveDeviceViewport(deviceId, orientation) {
|
|
16
|
+
const descriptor = await resolveDeviceFrameDescriptor(deviceId, {
|
|
17
|
+
orientation,
|
|
18
|
+
});
|
|
19
|
+
if (!descriptor)
|
|
20
|
+
return null;
|
|
21
|
+
return {
|
|
22
|
+
label: descriptor.name,
|
|
23
|
+
viewport: {
|
|
24
|
+
width: normalizeViewportDimension(descriptor.screen.logicalWidth
|
|
25
|
+
- (descriptor.safeArea.left ?? 0)
|
|
26
|
+
- (descriptor.safeArea.right ?? 0)),
|
|
27
|
+
height: normalizeViewportDimension(descriptor.screen.logicalHeight
|
|
28
|
+
- descriptor.safeArea.top
|
|
29
|
+
- descriptor.safeArea.bottom),
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function hasNonEmptyCapturePrompt(prompt) {
|
|
34
|
+
return typeof prompt === "string" && prompt.trim().length > 0;
|
|
35
|
+
}
|
|
36
|
+
export function getCapturePromptValidationError(input) {
|
|
37
|
+
const hasLegacyPrompt = hasNonEmptyCapturePrompt(input.prompt);
|
|
38
|
+
const hasNamedPages = Array.isArray(input.pages) && input.pages.length > 0;
|
|
39
|
+
const hasInvalidNamedPage = hasNamedPages
|
|
40
|
+
&& input.pages.some((page) => !hasNonEmptyCapturePrompt(page.prompt));
|
|
41
|
+
if (!input.url || (!hasLegacyPrompt && !hasNamedPages)) {
|
|
42
|
+
return "url and either a prompt or named capture pages are required";
|
|
43
|
+
}
|
|
44
|
+
if (hasInvalidNamedPage) {
|
|
45
|
+
return "each named capture page requires a prompt";
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
export function normalizeOutputScale(scale) {
|
|
50
|
+
if (!Number.isFinite(scale))
|
|
51
|
+
return 2;
|
|
52
|
+
return Math.max(0.5, Math.min(4, Number(scale)));
|
|
53
|
+
}
|
|
54
|
+
export function resolveCaptureLangs(raw) {
|
|
55
|
+
const langs = Array.isArray(raw)
|
|
56
|
+
? raw.filter((value) => typeof value === "string" && value.trim().length > 0)
|
|
57
|
+
: [];
|
|
58
|
+
return langs.length > 0 ? langs : ["en"];
|
|
59
|
+
}
|
|
60
|
+
export function resolveCaptureThemes(raw) {
|
|
61
|
+
const themes = Array.isArray(raw)
|
|
62
|
+
? raw.filter((value) => value === "light" || value === "dark")
|
|
63
|
+
: [];
|
|
64
|
+
return themes.length > 0 ? themes : ["light"];
|
|
65
|
+
}
|
|
66
|
+
export function buildCapturePageRuns(input) {
|
|
67
|
+
const pages = input.pages ?? [];
|
|
68
|
+
if (pages.length === 0) {
|
|
69
|
+
return [
|
|
70
|
+
{
|
|
71
|
+
url: input.url,
|
|
72
|
+
prompt: String(input.prompt ?? "").trim(),
|
|
73
|
+
pageId: null,
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
return pages.map((page) => ({
|
|
78
|
+
url: page.url
|
|
79
|
+
? page.url.startsWith("http")
|
|
80
|
+
? page.url
|
|
81
|
+
: new URL(page.url, input.url).href
|
|
82
|
+
: input.url,
|
|
83
|
+
prompt: String(page.prompt ?? "").trim(),
|
|
84
|
+
pageId: page.id ?? null,
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
export async function normalizeCaptureTargets(input) {
|
|
88
|
+
let targets;
|
|
89
|
+
if (input.targets?.length) {
|
|
90
|
+
targets = input.targets.map((target) => ({
|
|
91
|
+
...target,
|
|
92
|
+
viewport: { ...target.viewport },
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
else if (input.deviceFrame) {
|
|
96
|
+
const resolved = await resolveDeviceViewport(input.deviceFrame, getRequestedOrientation({ mockupOptions: input.mockupOptions }));
|
|
97
|
+
targets = [
|
|
98
|
+
{
|
|
99
|
+
id: input.deviceFrame,
|
|
100
|
+
label: resolved?.label ?? input.deviceFrame,
|
|
101
|
+
viewport: resolved?.viewport ?? { width: 1440, height: 900 },
|
|
102
|
+
deviceFrame: input.deviceFrame,
|
|
103
|
+
mockupOptions: input.mockupOptions ?? null,
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
else if (input.viewports?.length) {
|
|
108
|
+
targets = input.viewports.map((viewport) => ({
|
|
109
|
+
id: `custom-${viewport.width}x${viewport.height}`,
|
|
110
|
+
label: `${viewport.width}×${viewport.height}`,
|
|
111
|
+
viewport: { ...viewport },
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
targets = [
|
|
116
|
+
{
|
|
117
|
+
id: "desktop-1440x900",
|
|
118
|
+
label: "1440×900",
|
|
119
|
+
viewport: { width: 1440, height: 900 },
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
const deviceViewportCache = new Map();
|
|
124
|
+
const resolvedTargets = await Promise.all(targets.map(async (target) => {
|
|
125
|
+
if (!target.deviceFrame)
|
|
126
|
+
return target;
|
|
127
|
+
const orientation = getRequestedOrientation(target);
|
|
128
|
+
const cacheKey = `${target.deviceFrame}:${orientation ?? "default"}`;
|
|
129
|
+
let pending = deviceViewportCache.get(cacheKey);
|
|
130
|
+
if (!pending) {
|
|
131
|
+
pending = resolveDeviceViewport(target.deviceFrame, orientation);
|
|
132
|
+
deviceViewportCache.set(cacheKey, pending);
|
|
133
|
+
}
|
|
134
|
+
const resolved = await pending;
|
|
135
|
+
if (!resolved)
|
|
136
|
+
return target;
|
|
137
|
+
return {
|
|
138
|
+
...target,
|
|
139
|
+
viewport: resolved.viewport,
|
|
140
|
+
};
|
|
141
|
+
}));
|
|
142
|
+
return resolvedTargets;
|
|
143
|
+
}
|
|
144
|
+
export function sanitizeStorageSegment(value) {
|
|
145
|
+
const normalized = (value ?? "main")
|
|
146
|
+
.replace(/[^a-zA-Z0-9_-]+/g, "-")
|
|
147
|
+
.replace(/-+/g, "-")
|
|
148
|
+
.replace(/^-|-$/g, "");
|
|
149
|
+
return normalized || "main";
|
|
150
|
+
}
|
|
151
|
+
export function getCaptureUrlHostname(value) {
|
|
152
|
+
if (!value)
|
|
153
|
+
return "unknown";
|
|
154
|
+
try {
|
|
155
|
+
return new URL(value).hostname;
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
return value;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
export function normalizeComparableUrl(value) {
|
|
162
|
+
if (!value)
|
|
163
|
+
return "";
|
|
164
|
+
try {
|
|
165
|
+
const url = new URL(value);
|
|
166
|
+
url.hash = "";
|
|
167
|
+
if ((url.protocol === "https:" && url.port === "443")
|
|
168
|
+
|| (url.protocol === "http:" && url.port === "80")) {
|
|
169
|
+
url.port = "";
|
|
170
|
+
}
|
|
171
|
+
const normalizedPath = url.pathname.replace(/\/+$/, "") || "/";
|
|
172
|
+
const queryEntries = [...url.searchParams.entries()].sort(([leftKey, leftValue], [rightKey, rightValue]) => leftKey === rightKey
|
|
173
|
+
? leftValue.localeCompare(rightValue)
|
|
174
|
+
: leftKey.localeCompare(rightKey));
|
|
175
|
+
url.search = "";
|
|
176
|
+
for (const [key, queryValue] of queryEntries) {
|
|
177
|
+
url.searchParams.append(key, queryValue);
|
|
178
|
+
}
|
|
179
|
+
return `${url.origin}${normalizedPath}${url.search}`;
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
return value;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export function urlsPointToSameCaptureState(left, right) {
|
|
186
|
+
return normalizeComparableUrl(left) === normalizeComparableUrl(right);
|
|
187
|
+
}
|
|
188
|
+
export async function resolveCaptureRequestPlan(input) {
|
|
189
|
+
const targets = await normalizeCaptureTargets(input);
|
|
190
|
+
const outputScale = normalizeOutputScale(input.outputScale);
|
|
191
|
+
const langs = resolveCaptureLangs(input.langs);
|
|
192
|
+
const themes = resolveCaptureThemes(input.themes);
|
|
193
|
+
const elements = input.elements ?? [];
|
|
194
|
+
const pageRuns = buildCapturePageRuns(input);
|
|
195
|
+
const variantPlan = buildScreenshotVariantPlan({
|
|
196
|
+
langs,
|
|
197
|
+
themes,
|
|
198
|
+
pages: pageRuns,
|
|
199
|
+
});
|
|
200
|
+
const pageDefinitionIssues = findVariantPageDefinitionIssues(pageRuns);
|
|
201
|
+
const requestedCaptureCount = pageRuns.length * targets.length * langs.length * themes.length
|
|
202
|
+
+ elements.length * langs.length * themes.length;
|
|
203
|
+
return {
|
|
204
|
+
targets,
|
|
205
|
+
outputScale,
|
|
206
|
+
langs,
|
|
207
|
+
themes,
|
|
208
|
+
elements,
|
|
209
|
+
pageRuns,
|
|
210
|
+
variantPlan,
|
|
211
|
+
pageDefinitionIssues,
|
|
212
|
+
requestedCaptureCount,
|
|
213
|
+
totalCaptures: requestedCaptureCount,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=capture-request-plan.js.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { CaptureCheckpoint, CapturePageIdentity, InteractiveElement, IsolatedElement, ValidatedSessionProfile } from "./types.js";
|
|
2
|
+
export interface ScreenshotPageRunInput {
|
|
3
|
+
url: string;
|
|
4
|
+
prompt: string;
|
|
5
|
+
pageId: string | null;
|
|
6
|
+
}
|
|
7
|
+
export interface ScreenshotVariantExecution {
|
|
8
|
+
key: string;
|
|
9
|
+
lang: string;
|
|
10
|
+
theme: "light" | "dark";
|
|
11
|
+
pages: ScreenshotPageRunInput[];
|
|
12
|
+
}
|
|
13
|
+
export interface DeterministicNavigationCandidate {
|
|
14
|
+
description: string;
|
|
15
|
+
selectors: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface SelectorMemoryScopeContext {
|
|
18
|
+
pageId?: string | null;
|
|
19
|
+
pageIdentity?: CapturePageIdentity | null;
|
|
20
|
+
pageUrl?: string | null;
|
|
21
|
+
}
|
|
22
|
+
export declare function getUrlOrigin(value: string | null | undefined): string | null;
|
|
23
|
+
export declare function urlMatchesCaptureTarget(currentUrl: string | null | undefined, targetUrl: string): boolean;
|
|
24
|
+
export declare function urlsShareOrigin(left: string | null | undefined, right: string | null | undefined): boolean;
|
|
25
|
+
export declare function resolveCaptureResumeUrl(params: {
|
|
26
|
+
pageIndex: number;
|
|
27
|
+
currentUrl?: string | null;
|
|
28
|
+
cursorResumeUrl?: string | null;
|
|
29
|
+
checkpoints: Array<Pick<CaptureCheckpoint, "pageId" | "resumeUrl" | "url" | "canonicalUrl">>;
|
|
30
|
+
pageId: string | null;
|
|
31
|
+
pageUrl: string;
|
|
32
|
+
sessionProfile?: ValidatedSessionProfile;
|
|
33
|
+
}): string;
|
|
34
|
+
export declare function shouldNormalizeDialogsBeforeTargetReuse(params: {
|
|
35
|
+
currentDialogCount: number | null | undefined;
|
|
36
|
+
pageIdentity?: Pick<CapturePageIdentity, "dialogTarget"> | null;
|
|
37
|
+
}): boolean;
|
|
38
|
+
export declare function buildScreenshotVariantPlan(params: {
|
|
39
|
+
langs: string[];
|
|
40
|
+
themes: Array<"light" | "dark">;
|
|
41
|
+
pages: ScreenshotPageRunInput[];
|
|
42
|
+
}): ScreenshotVariantExecution[];
|
|
43
|
+
export interface ResolvedIsolatedElementAssignment {
|
|
44
|
+
element: IsolatedElement;
|
|
45
|
+
pageId: string;
|
|
46
|
+
explicit: boolean;
|
|
47
|
+
score: number;
|
|
48
|
+
}
|
|
49
|
+
export declare function resolveIsolatedElementAssignments(params: {
|
|
50
|
+
elements: IsolatedElement[];
|
|
51
|
+
pageRuns: ScreenshotPageRunInput[];
|
|
52
|
+
}): ResolvedIsolatedElementAssignment[];
|
|
53
|
+
export declare function describeScreenshotVariantPlan(plan: ScreenshotVariantExecution[]): string;
|
|
54
|
+
export declare function shouldReuseLivePageState(params: {
|
|
55
|
+
pageIndex: number;
|
|
56
|
+
presetRootUrl: string;
|
|
57
|
+
pageUrl: string;
|
|
58
|
+
currentUrl?: string | null;
|
|
59
|
+
isAuthenticated: boolean;
|
|
60
|
+
}): boolean;
|
|
61
|
+
export declare function shouldUseSequentialPageHandoff(params: {
|
|
62
|
+
pageIndex: number;
|
|
63
|
+
currentUrl?: string | null;
|
|
64
|
+
pageUrl: string;
|
|
65
|
+
previousPageId?: string | null;
|
|
66
|
+
pageId?: string | null;
|
|
67
|
+
previousPrompt?: string;
|
|
68
|
+
pagePrompt: string;
|
|
69
|
+
}): boolean;
|
|
70
|
+
export declare function buildSequentialHandoffArtifacts(actions: Array<{
|
|
71
|
+
action: string;
|
|
72
|
+
success: boolean;
|
|
73
|
+
stateChanged?: boolean;
|
|
74
|
+
params: Record<string, unknown>;
|
|
75
|
+
}>): {
|
|
76
|
+
selectorHints: string[];
|
|
77
|
+
selectorMemory: Record<string, string[]>;
|
|
78
|
+
};
|
|
79
|
+
export declare function buildTargetNavigationArtifacts(params: {
|
|
80
|
+
selectorMemory?: Record<string, string[]>;
|
|
81
|
+
pageUrl: string;
|
|
82
|
+
pageId?: string | null;
|
|
83
|
+
prompt: string;
|
|
84
|
+
}): {
|
|
85
|
+
navigationHints: string[];
|
|
86
|
+
selectorMemory: Record<string, string[]>;
|
|
87
|
+
};
|
|
88
|
+
export declare function buildDeterministicNavigationPlan(params: {
|
|
89
|
+
selectorMemory?: Record<string, string[]>;
|
|
90
|
+
pageUrl: string;
|
|
91
|
+
pageId?: string | null;
|
|
92
|
+
prompt: string;
|
|
93
|
+
}): DeterministicNavigationCandidate[];
|
|
94
|
+
export declare function buildVisibleControlNavigationPlan(params: {
|
|
95
|
+
interactiveElements?: InteractiveElement[];
|
|
96
|
+
pageId?: string | null;
|
|
97
|
+
prompt: string;
|
|
98
|
+
}): DeterministicNavigationCandidate[];
|
|
99
|
+
export declare function shouldAttemptSequentialReadyCheck(params: {
|
|
100
|
+
currentUrl?: string | null;
|
|
101
|
+
pageUrl: string;
|
|
102
|
+
previousPageId?: string | null;
|
|
103
|
+
pageId?: string | null;
|
|
104
|
+
previousPrompt?: string;
|
|
105
|
+
pagePrompt: string;
|
|
106
|
+
}): boolean;
|
|
107
|
+
export declare function shouldUseLiveStateFastPath(params: {
|
|
108
|
+
bootstrapMode: "reused_live_state" | "fresh_navigation" | "sequential_handoff";
|
|
109
|
+
currentUrl?: string | null;
|
|
110
|
+
pageUrl: string;
|
|
111
|
+
previousPageId?: string | null;
|
|
112
|
+
pageId?: string | null;
|
|
113
|
+
previousPrompt?: string;
|
|
114
|
+
pagePrompt: string;
|
|
115
|
+
}): boolean;
|
|
116
|
+
export declare function deriveRunSharedAuthProfile(profile: ValidatedSessionProfile | undefined): ValidatedSessionProfile | undefined;
|
|
117
|
+
export declare function buildSessionBootstrapProfile(params: {
|
|
118
|
+
runAuthProfile?: ValidatedSessionProfile;
|
|
119
|
+
persistedVariantProfile?: ValidatedSessionProfile;
|
|
120
|
+
requestedLang: string;
|
|
121
|
+
requestedTheme: "light" | "dark";
|
|
122
|
+
startUrl?: string;
|
|
123
|
+
}): {
|
|
124
|
+
profile?: ValidatedSessionProfile;
|
|
125
|
+
source: "run_shared_auth" | "persisted_variant" | "none";
|
|
126
|
+
};
|
|
127
|
+
export declare function buildSelectorMemoryScopeKeys(context?: SelectorMemoryScopeContext): string[];
|
|
128
|
+
export declare function scopeSelectorMemoryUpdates<T extends {
|
|
129
|
+
stepSignature: string;
|
|
130
|
+
selector: string;
|
|
131
|
+
success: boolean;
|
|
132
|
+
}>(updates: T[], context?: SelectorMemoryScopeContext): T[];
|
|
133
|
+
export declare function resolveScopedSelectorMemory(memory: Record<string, string[]> | undefined, context?: SelectorMemoryScopeContext): Record<string, string[]>;
|
|
134
|
+
export declare function mergeSelectorMemory(...sources: Array<Record<string, string[]> | undefined>): Record<string, string[]>;
|
|
135
|
+
export declare function applySelectorMemoryUpdates(current: Record<string, string[]>, updates: Array<{
|
|
136
|
+
stepSignature: string;
|
|
137
|
+
selector: string;
|
|
138
|
+
success: boolean;
|
|
139
|
+
}>): Record<string, string[]>;
|