explorbot 0.1.30 → 0.1.32-beta.1
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/boat/api-tester/example/apibot.config.js +30 -0
- package/dist/package.json +11 -26
- package/dist/src/action-result.d.ts +133 -0
- package/dist/src/action-result.js +22 -7
- package/dist/src/action.d.ts +50 -0
- package/dist/src/action.js +10 -5
- package/dist/src/activity.d.ts +26 -0
- package/dist/src/ai/agent.d.ts +3 -0
- package/dist/src/ai/captain/file-tools.d.ts +28 -0
- package/dist/src/ai/captain/idle-mode.d.ts +11 -0
- package/dist/src/ai/captain/mixin.d.ts +10 -0
- package/dist/src/ai/captain/test-mode.d.ts +13 -0
- package/dist/src/ai/captain/web-mode.d.ts +13 -0
- package/dist/src/ai/captain.d.ts +143 -0
- package/dist/src/ai/conversation.d.ts +31 -0
- package/dist/src/ai/conversation.js +1 -1
- package/dist/src/ai/driller.d.ts +161 -0
- package/dist/src/ai/experience-compactor.d.ts +53 -0
- package/dist/src/ai/fisherman-tools.d.ts +90 -0
- package/dist/src/ai/fisherman.d.ts +30 -0
- package/dist/src/ai/historian/codeceptjs.d.ts +15 -0
- package/dist/src/ai/historian/experience.d.ts +40 -0
- package/dist/src/ai/historian/mixin.d.ts +2 -0
- package/dist/src/ai/historian/playwright.d.ts +20 -0
- package/dist/src/ai/historian/screencast.d.ts +32 -0
- package/dist/src/ai/historian/utils.d.ts +4 -0
- package/dist/src/ai/historian.d.ts +108 -0
- package/dist/src/ai/navigator.d.ts +56 -0
- package/dist/src/ai/pilot.d.ts +83 -0
- package/dist/src/ai/planner/session-dedup.d.ts +12 -0
- package/dist/src/ai/planner/styles.d.ts +6 -0
- package/dist/src/ai/planner/subpages.d.ts +35 -0
- package/dist/src/ai/planner.d.ts +79 -0
- package/dist/src/ai/provider.d.ts +50 -0
- package/dist/src/ai/provider.js +13 -5
- package/dist/src/ai/quartermaster.d.ts +57 -0
- package/dist/src/ai/rerunner.d.ts +49 -0
- package/dist/src/ai/researcher/cache.d.ts +6 -0
- package/dist/src/ai/researcher/coordinates.d.ts +56 -0
- package/dist/src/ai/researcher/deep-analysis.d.ts +74 -0
- package/dist/src/ai/researcher/fingerprint-worker.d.ts +1 -0
- package/dist/src/ai/researcher/focus.d.ts +8 -0
- package/dist/src/ai/researcher/locators.d.ts +36 -0
- package/dist/src/ai/researcher/mixin.d.ts +2 -0
- package/dist/src/ai/researcher/parser.d.ts +35 -0
- package/dist/src/ai/researcher/research-result.d.ts +16 -0
- package/dist/src/ai/researcher/sections.d.ts +19 -0
- package/dist/src/ai/rules.d.ts +15 -0
- package/dist/src/ai/session-analyst.d.ts +11 -0
- package/dist/src/ai/task-agent.d.ts +28 -0
- package/dist/src/ai/tester.d.ts +103 -0
- package/dist/src/ai/tools.d.ts +41 -0
- package/dist/src/api/api-client.d.ts +17 -0
- package/dist/src/api/request-result.d.ts +44 -0
- package/dist/src/api/request-store.d.ts +29 -0
- package/dist/src/api/spec-reader.d.ts +5 -0
- package/dist/src/api/xhr-capture.d.ts +10 -0
- package/dist/src/browser-server.d.ts +10 -0
- package/dist/src/command-handler.d.ts +68 -0
- package/dist/src/commands/add-rule-command.d.ts +11 -0
- package/dist/src/commands/base-command.d.ts +26 -0
- package/dist/src/commands/clean-command.d.ts +12 -0
- package/dist/src/commands/compact-command.d.ts +20 -0
- package/dist/src/commands/context-aria-command.d.ts +6 -0
- package/dist/src/commands/context-command.d.ts +11 -0
- package/dist/src/commands/context-data-command.d.ts +6 -0
- package/dist/src/commands/context-experience-command.d.ts +6 -0
- package/dist/src/commands/context-html-command.d.ts +6 -0
- package/dist/src/commands/context-knowledge-command.d.ts +6 -0
- package/dist/src/commands/debug-command.d.ts +6 -0
- package/dist/src/commands/drill-command.d.ts +10 -0
- package/dist/src/commands/exit-command.d.ts +7 -0
- package/dist/src/commands/experience-command.d.ts +15 -0
- package/dist/src/commands/explore-command.d.ts +51 -0
- package/dist/src/commands/freesail-command.d.ts +12 -0
- package/dist/src/commands/help-command.d.ts +6 -0
- package/dist/src/commands/index.d.ts +4 -0
- package/dist/src/commands/init-command.d.ts +7 -0
- package/dist/src/commands/knows-command.d.ts +10 -0
- package/dist/src/commands/learn-command.d.ts +7 -0
- package/dist/src/commands/navigate-command.d.ts +7 -0
- package/dist/src/commands/path-command.d.ts +10 -0
- package/dist/src/commands/plan-clear-command.d.ts +7 -0
- package/dist/src/commands/plan-command.d.ts +14 -0
- package/dist/src/commands/plan-edit-command.d.ts +7 -0
- package/dist/src/commands/plan-load-command.d.ts +7 -0
- package/dist/src/commands/plan-reload-command.d.ts +7 -0
- package/dist/src/commands/plan-save-command.d.ts +7 -0
- package/dist/src/commands/plans-command.d.ts +21 -0
- package/dist/src/commands/rerun-command.d.ts +7 -0
- package/dist/src/commands/research-command.d.ts +11 -0
- package/dist/src/commands/runs-command.d.ts +7 -0
- package/dist/src/commands/start-command.d.ts +7 -0
- package/dist/src/commands/status-command.d.ts +6 -0
- package/dist/src/commands/test-command.d.ts +11 -0
- package/dist/src/components/ActivityPane.d.ts +6 -0
- package/dist/src/components/AddKnowledge.d.ts +8 -0
- package/dist/src/components/AddRule.d.ts +9 -0
- package/dist/src/components/App.d.ts +9 -0
- package/dist/src/components/Autocomplete.d.ts +3 -0
- package/dist/src/components/InputPane.d.ts +13 -0
- package/dist/src/components/InputReadline.d.ts +17 -0
- package/dist/src/components/LogPane.d.ts +6 -0
- package/dist/src/components/PlanEditor.d.ts +9 -0
- package/dist/src/components/PlanPane.d.ts +13 -0
- package/dist/src/components/SessionTimer.d.ts +6 -0
- package/dist/src/components/StateTransitionPane.d.ts +8 -0
- package/dist/src/components/StatusPane.d.ts +4 -0
- package/dist/src/components/TaskPane.d.ts +9 -0
- package/dist/src/components/Welcome.d.ts +3 -0
- package/dist/src/components/WelcomeChecklist.d.ts +9 -0
- package/dist/src/components/WelcomeCommands.d.ts +6 -0
- package/dist/src/components/autocomplete-store.d.ts +10 -0
- package/dist/src/components/parse-keypress.d.ts +12 -0
- package/dist/src/config.d.ts +251 -0
- package/dist/src/execution-controller.d.ts +25 -0
- package/dist/src/experience-tracker.d.ts +107 -0
- package/dist/src/experience-tracker.js +2 -1
- package/dist/src/explorbot.d.ts +107 -0
- package/dist/src/explorer.d.ts +140 -0
- package/dist/src/explorer.js +13 -9
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +2 -55
- package/dist/src/knowledge-tracker.d.ts +33 -0
- package/dist/src/knowledge-tracker.js +9 -2
- package/dist/src/observability.d.ts +13 -0
- package/dist/src/observability.js +2 -1
- package/dist/src/playwright-recorder.d.ts +31 -0
- package/dist/src/reporter.d.ts +34 -0
- package/dist/src/state-manager.d.ts +185 -0
- package/dist/src/state-manager.js +0 -7
- package/dist/src/stats.d.ts +24 -0
- package/dist/src/suite.d.ts +24 -0
- package/dist/src/test-plan.d.ts +166 -0
- package/dist/src/utils/aria.d.ts +20 -0
- package/dist/src/utils/browser-errors.d.ts +8 -0
- package/dist/src/utils/cli-name.d.ts +1 -0
- package/dist/src/utils/code-extractor.d.ts +1 -0
- package/dist/src/utils/context-formatter.d.ts +25 -0
- package/dist/src/utils/error-page.d.ts +12 -0
- package/dist/src/utils/expandable.d.ts +4 -0
- package/dist/src/utils/hooks-runner.d.ts +15 -0
- package/dist/src/utils/html-diff.d.ts +19 -0
- package/dist/src/utils/html.d.ts +124 -0
- package/dist/src/utils/log-filters.d.ts +6 -0
- package/dist/src/utils/logger.d.ts +35 -0
- package/dist/src/utils/loop.d.ts +35 -0
- package/dist/src/utils/markdown-parser.d.ts +17 -0
- package/dist/src/utils/markdown-query.d.ts +40 -0
- package/dist/src/utils/markdown-terminal.d.ts +1 -0
- package/dist/src/utils/next-steps.d.ts +11 -0
- package/dist/src/utils/page-readiness.d.ts +6 -0
- package/dist/src/utils/research-parser.d.ts +1 -0
- package/dist/src/utils/retry.d.ts +8 -0
- package/dist/src/utils/rules-loader.d.ts +12 -0
- package/dist/src/utils/secrets.d.ts +4 -0
- package/dist/src/utils/secrets.js +28 -0
- package/dist/src/utils/step-analyzer.d.ts +11 -0
- package/dist/src/utils/strings.d.ts +3 -0
- package/dist/src/utils/test-files.d.ts +3 -0
- package/dist/src/utils/test-plan-markdown.d.ts +9 -0
- package/dist/src/utils/throttle.d.ts +2 -0
- package/dist/src/utils/unique-names.d.ts +2 -0
- package/dist/src/utils/url-matcher.d.ts +6 -0
- package/dist/src/utils/web-element.d.ts +44 -0
- package/dist/src/utils/xpath.d.ts +17 -0
- package/package.json +11 -26
- package/src/action-result.ts +22 -7
- package/src/action.ts +12 -5
- package/src/ai/conversation.ts +1 -1
- package/src/ai/provider.ts +13 -5
- package/src/experience-tracker.ts +2 -1
- package/src/explorer.ts +14 -9
- package/src/index.ts +9 -0
- package/src/knowledge-tracker.ts +7 -1
- package/src/observability.ts +2 -1
- package/src/state-manager.ts +0 -8
- package/src/utils/secrets.ts +29 -0
- package/src/index.tsx +0 -62
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ModelMessage } from 'ai';
|
|
2
|
+
export interface ToolExecution {
|
|
3
|
+
toolName: string;
|
|
4
|
+
input: any;
|
|
5
|
+
output: any;
|
|
6
|
+
wasSuccessful: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function toolExecutionLabel(input: Record<string, any> | undefined): string;
|
|
9
|
+
export declare class Conversation {
|
|
10
|
+
id: string;
|
|
11
|
+
messages: ModelMessage[];
|
|
12
|
+
model: any;
|
|
13
|
+
telemetryFunctionId?: string;
|
|
14
|
+
protectedPrefixCount: number;
|
|
15
|
+
autoTrimRules: Map<string, number>;
|
|
16
|
+
constructor(messages?: ModelMessage[], model?: any, telemetryFunctionId?: string);
|
|
17
|
+
protectPrefix(count: number): void;
|
|
18
|
+
addUserText(text: string): void;
|
|
19
|
+
addUserImage(image: string): void;
|
|
20
|
+
addAssistantText(text: string): void;
|
|
21
|
+
getLastMessage(): string;
|
|
22
|
+
clone(): Conversation;
|
|
23
|
+
cleanupTag(tagName: string, replacement: string, keepLast?: number): void;
|
|
24
|
+
autoTrimTag(tagName: string, maxLength: number): void;
|
|
25
|
+
compactToolResults(keepLastN: number): void;
|
|
26
|
+
markLastMessageCacheable(): void;
|
|
27
|
+
hasTag(tagName: string, lastN?: number): boolean;
|
|
28
|
+
applyAutoTrim(text: string): string;
|
|
29
|
+
generateId(): string;
|
|
30
|
+
getToolExecutions(): ToolExecution[];
|
|
31
|
+
}
|
|
@@ -34,7 +34,7 @@ export class Conversation {
|
|
|
34
34
|
const imageData = image.startsWith('data:') ? image : `data:image/png;base64,${image}`;
|
|
35
35
|
this.messages.push({
|
|
36
36
|
role: 'user',
|
|
37
|
-
content: [{ type: 'image',
|
|
37
|
+
content: [{ type: 'file', mediaType: 'image/png', data: imageData }],
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
addAssistantText(text) {
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { ActionResult } from '../action-result.js';
|
|
2
|
+
import type { ExperienceTracker } from '../experience-tracker.js';
|
|
3
|
+
import type Explorer from '../explorer.js';
|
|
4
|
+
import type { KnowledgeTracker } from '../knowledge-tracker.js';
|
|
5
|
+
import { Plan, Test } from '../test-plan.js';
|
|
6
|
+
import { HooksRunner } from '../utils/hooks-runner.js';
|
|
7
|
+
import { WebElement } from '../utils/web-element.js';
|
|
8
|
+
import type { Agent } from './agent.js';
|
|
9
|
+
import type { Conversation } from './conversation.js';
|
|
10
|
+
import type { Navigator } from './navigator.js';
|
|
11
|
+
import type { Provider } from './provider.js';
|
|
12
|
+
import { TaskAgent } from './task-agent.js';
|
|
13
|
+
interface ComponentInfo {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
role: string;
|
|
17
|
+
locator: string;
|
|
18
|
+
preferredCode: string;
|
|
19
|
+
eidx: string;
|
|
20
|
+
description: string;
|
|
21
|
+
html: string;
|
|
22
|
+
text: string;
|
|
23
|
+
tag: string;
|
|
24
|
+
classes: string[];
|
|
25
|
+
attrs: Record<string, string>;
|
|
26
|
+
context: string;
|
|
27
|
+
variant: string;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
ariaMatches: string[];
|
|
31
|
+
}
|
|
32
|
+
interface InteractionResult {
|
|
33
|
+
componentId: string;
|
|
34
|
+
component: string;
|
|
35
|
+
action: string;
|
|
36
|
+
result: 'success' | 'failed' | 'unknown';
|
|
37
|
+
description: string;
|
|
38
|
+
code?: string;
|
|
39
|
+
}
|
|
40
|
+
interface ComponentTest extends Test {
|
|
41
|
+
component?: ComponentInfo;
|
|
42
|
+
interactions?: InteractionResult[];
|
|
43
|
+
}
|
|
44
|
+
interface DrillOptions {
|
|
45
|
+
knowledgePath?: string;
|
|
46
|
+
maxComponents?: number;
|
|
47
|
+
interactive?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export declare class Driller extends TaskAgent implements Agent {
|
|
50
|
+
readonly ACTION_TOOLS: string[];
|
|
51
|
+
emoji: string;
|
|
52
|
+
explorer: Explorer;
|
|
53
|
+
provider: Provider;
|
|
54
|
+
navigator: Navigator;
|
|
55
|
+
hooksRunner: HooksRunner;
|
|
56
|
+
currentPlan?: Plan;
|
|
57
|
+
currentConversation: Conversation | null;
|
|
58
|
+
allResults: InteractionResult[];
|
|
59
|
+
verifiedAction: {
|
|
60
|
+
componentId: string;
|
|
61
|
+
toolName: string;
|
|
62
|
+
code?: string;
|
|
63
|
+
canonicalCode?: string;
|
|
64
|
+
} | null;
|
|
65
|
+
pendingNestedContext: string | null;
|
|
66
|
+
MAX_COMPONENT_ITERATIONS: number;
|
|
67
|
+
constructor(explorer: Explorer, provider: Provider, navigator: Navigator);
|
|
68
|
+
getNavigator(): Navigator;
|
|
69
|
+
getExperienceTracker(): ExperienceTracker;
|
|
70
|
+
getKnowledgeTracker(): KnowledgeTracker;
|
|
71
|
+
getProvider(): Provider;
|
|
72
|
+
getSystemMessage(component?: ComponentInfo): string;
|
|
73
|
+
drill(opts?: DrillOptions): Promise<Plan>;
|
|
74
|
+
captureAnnotatedState(): Promise<ActionResult>;
|
|
75
|
+
collectComponents(state: ActionResult, maxComponents: number): Promise<ComponentInfo[]>;
|
|
76
|
+
toComponentInfo(element: WebElement, ariaNodes: Array<Record<string, unknown>>): ComponentInfo;
|
|
77
|
+
drillComponent(test: ComponentTest, originalState: ActionResult, interactive: boolean): Promise<void>;
|
|
78
|
+
buildComponentPrompt(originalState: ActionResult, component: ComponentInfo): Promise<string>;
|
|
79
|
+
buildContextUpdate(currentState: ActionResult, component: ComponentInfo): Promise<string>;
|
|
80
|
+
createDrillFlowTools(originalState: ActionResult, test: ComponentTest, interactive: boolean): {
|
|
81
|
+
drill_record: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
82
|
+
action: any;
|
|
83
|
+
result: any;
|
|
84
|
+
code: any;
|
|
85
|
+
}, {
|
|
86
|
+
success: boolean;
|
|
87
|
+
message: string;
|
|
88
|
+
recorded?: undefined;
|
|
89
|
+
} | {
|
|
90
|
+
success: boolean;
|
|
91
|
+
recorded: string;
|
|
92
|
+
message?: undefined;
|
|
93
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
94
|
+
drill_done: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
95
|
+
summary: any;
|
|
96
|
+
}, {
|
|
97
|
+
success: boolean;
|
|
98
|
+
message: string;
|
|
99
|
+
summary?: undefined;
|
|
100
|
+
recorded?: undefined;
|
|
101
|
+
} | {
|
|
102
|
+
success: boolean;
|
|
103
|
+
summary: any;
|
|
104
|
+
recorded: number;
|
|
105
|
+
message?: undefined;
|
|
106
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
107
|
+
drill_skip: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
108
|
+
reason: any;
|
|
109
|
+
}, {
|
|
110
|
+
success: boolean;
|
|
111
|
+
message: string;
|
|
112
|
+
skipped?: undefined;
|
|
113
|
+
} | {
|
|
114
|
+
success: boolean;
|
|
115
|
+
skipped: string;
|
|
116
|
+
message?: undefined;
|
|
117
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
118
|
+
drill_restore: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
119
|
+
reason: any;
|
|
120
|
+
}, {
|
|
121
|
+
success: boolean;
|
|
122
|
+
url: string;
|
|
123
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
124
|
+
drill_ask: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
125
|
+
question: any;
|
|
126
|
+
}, {
|
|
127
|
+
success: boolean;
|
|
128
|
+
message: string;
|
|
129
|
+
skipped?: undefined;
|
|
130
|
+
userSuggestion?: undefined;
|
|
131
|
+
instruction?: undefined;
|
|
132
|
+
} | {
|
|
133
|
+
success: boolean;
|
|
134
|
+
skipped: boolean;
|
|
135
|
+
message?: undefined;
|
|
136
|
+
userSuggestion?: undefined;
|
|
137
|
+
instruction?: undefined;
|
|
138
|
+
} | {
|
|
139
|
+
success: boolean;
|
|
140
|
+
userSuggestion: string;
|
|
141
|
+
instruction: string;
|
|
142
|
+
message?: undefined;
|
|
143
|
+
skipped?: undefined;
|
|
144
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
145
|
+
};
|
|
146
|
+
restoreOriginalState(originalState: ActionResult, reason: string): Promise<void>;
|
|
147
|
+
saveToExperience(state: ActionResult, results: InteractionResult[]): Promise<void>;
|
|
148
|
+
createVerifiedActionTools(baseTools: Record<string, any>, component: ComponentInfo): Record<string, any>;
|
|
149
|
+
hasVerifiedAction(componentId: string): boolean;
|
|
150
|
+
detectNestedOverlayContext(component: ComponentInfo, result: any): Promise<string | null>;
|
|
151
|
+
getVisibleOverlayHtml(): Promise<string>;
|
|
152
|
+
getComponentScopeHtml(component: ComponentInfo, originalState: ActionResult): Promise<string>;
|
|
153
|
+
saveToKnowledge(knowledgePath: string, state: ActionResult, results: InteractionResult[]): Promise<void>;
|
|
154
|
+
generateKnowledgeContent(state: ActionResult, interactions: InteractionResult[]): string;
|
|
155
|
+
logSummary(): void;
|
|
156
|
+
getCurrentPlan(): Plan | undefined;
|
|
157
|
+
getConversation(): Conversation | null;
|
|
158
|
+
}
|
|
159
|
+
export declare function buildCanonicalClickCode(component: ComponentInfo): string;
|
|
160
|
+
export declare function formatExperienceTitle(interaction: InteractionResult): string;
|
|
161
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ExperienceFile, type ExperienceTracker } from '../experience-tracker.js';
|
|
2
|
+
import type { Agent } from './agent.js';
|
|
3
|
+
import type { Provider } from './provider.js';
|
|
4
|
+
export type { ExperienceFile };
|
|
5
|
+
interface MergeGroup {
|
|
6
|
+
pattern: string;
|
|
7
|
+
files: ExperienceFile[];
|
|
8
|
+
}
|
|
9
|
+
export declare class ExperienceCompactor implements Agent {
|
|
10
|
+
emoji: string;
|
|
11
|
+
provider: Provider;
|
|
12
|
+
experienceTracker: ExperienceTracker;
|
|
13
|
+
MAX_LENGTH: number;
|
|
14
|
+
constructor(provider: Provider, experienceTracker: ExperienceTracker);
|
|
15
|
+
compactExperience(experience: string): Promise<string>;
|
|
16
|
+
stripNonUsefulEntries(content: string): string;
|
|
17
|
+
isRecent(file: ExperienceFile): boolean;
|
|
18
|
+
reviewExperienceQuality(content: string, context: {
|
|
19
|
+
url?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
compactAllExperiences(): Promise<{
|
|
23
|
+
merged: number;
|
|
24
|
+
compacted: number;
|
|
25
|
+
}>;
|
|
26
|
+
autocompact(): Promise<{
|
|
27
|
+
merged: number;
|
|
28
|
+
compacted: number;
|
|
29
|
+
}>;
|
|
30
|
+
generalizeDynamicUrls(): number;
|
|
31
|
+
compactFiles(files: ExperienceFile[], options?: {
|
|
32
|
+
skipSmall?: boolean;
|
|
33
|
+
}): Promise<number>;
|
|
34
|
+
mergeSimilarExperiences(options?: {
|
|
35
|
+
onlyDynamic?: boolean;
|
|
36
|
+
}): Promise<number>;
|
|
37
|
+
identifyMergeGroups(files: ExperienceFile[]): Promise<MergeGroup[]>;
|
|
38
|
+
askAiForMergeDecisions(urls: string[]): Promise<{
|
|
39
|
+
urls: string[];
|
|
40
|
+
pattern: string;
|
|
41
|
+
}[]>;
|
|
42
|
+
buildMergePrompt(urls: string[]): string;
|
|
43
|
+
mergeExperienceGroup(group: MergeGroup): Promise<void>;
|
|
44
|
+
getSystemPrompt(): string;
|
|
45
|
+
buildCompactionPrompt(content: string): string;
|
|
46
|
+
buildReviewPrompt(sections: Array<{
|
|
47
|
+
title: string;
|
|
48
|
+
raw: string;
|
|
49
|
+
}>, context: {
|
|
50
|
+
url?: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
}): string;
|
|
53
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { ApiClient } from '../api/api-client.js';
|
|
2
|
+
import type { RequestStore } from '../api/request-store.js';
|
|
3
|
+
export declare function createFishermanTools(apiClient: ApiClient, requestStore: RequestStore, opts: {
|
|
4
|
+
spec?: any;
|
|
5
|
+
baseEndpoint?: string;
|
|
6
|
+
}): {
|
|
7
|
+
tools: {
|
|
8
|
+
getEndpointSpec: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
9
|
+
method: any;
|
|
10
|
+
path: any;
|
|
11
|
+
}, {
|
|
12
|
+
source: string;
|
|
13
|
+
method: string;
|
|
14
|
+
path: string;
|
|
15
|
+
status: number;
|
|
16
|
+
requestBody: any;
|
|
17
|
+
definition?: undefined;
|
|
18
|
+
error?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
source: string;
|
|
21
|
+
definition: string;
|
|
22
|
+
method?: undefined;
|
|
23
|
+
path?: undefined;
|
|
24
|
+
status?: undefined;
|
|
25
|
+
requestBody?: undefined;
|
|
26
|
+
error?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
source: string;
|
|
29
|
+
error: any;
|
|
30
|
+
method?: undefined;
|
|
31
|
+
path?: undefined;
|
|
32
|
+
status?: undefined;
|
|
33
|
+
requestBody?: undefined;
|
|
34
|
+
definition?: undefined;
|
|
35
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
36
|
+
request: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<any, {
|
|
37
|
+
success: boolean;
|
|
38
|
+
error: string;
|
|
39
|
+
status?: undefined;
|
|
40
|
+
statusText?: undefined;
|
|
41
|
+
errorPreview?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
success: boolean;
|
|
44
|
+
status: number;
|
|
45
|
+
statusText: string;
|
|
46
|
+
errorPreview: string;
|
|
47
|
+
error?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
success: boolean;
|
|
50
|
+
status: number;
|
|
51
|
+
error?: undefined;
|
|
52
|
+
statusText?: undefined;
|
|
53
|
+
errorPreview?: undefined;
|
|
54
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
55
|
+
finish: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
56
|
+
summary: string;
|
|
57
|
+
created: {
|
|
58
|
+
type: string;
|
|
59
|
+
id?: string | number;
|
|
60
|
+
title?: string;
|
|
61
|
+
}[];
|
|
62
|
+
failed?: {
|
|
63
|
+
type: string;
|
|
64
|
+
reason: string;
|
|
65
|
+
}[];
|
|
66
|
+
}, {
|
|
67
|
+
finished: boolean;
|
|
68
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
69
|
+
stop: import("@ai-sdk/provider-utils").ExecutableTool<import("ai").Tool<{
|
|
70
|
+
reason: any;
|
|
71
|
+
}, {
|
|
72
|
+
stopped: boolean;
|
|
73
|
+
}, import("@ai-sdk/provider-utils").Context>>;
|
|
74
|
+
};
|
|
75
|
+
getResult: () => FishermanResult;
|
|
76
|
+
isFinished: () => boolean;
|
|
77
|
+
};
|
|
78
|
+
export interface FishermanResult {
|
|
79
|
+
success: boolean;
|
|
80
|
+
summary: string;
|
|
81
|
+
created: Array<{
|
|
82
|
+
type: string;
|
|
83
|
+
id?: string | number;
|
|
84
|
+
title?: string;
|
|
85
|
+
}>;
|
|
86
|
+
failed: Array<{
|
|
87
|
+
type: string;
|
|
88
|
+
reason: string;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ApiClient } from '../api/api-client.js';
|
|
2
|
+
import type { RequestStore } from '../api/request-store.js';
|
|
3
|
+
import type { Agent } from './agent.js';
|
|
4
|
+
import { type FishermanResult } from './fisherman-tools.js';
|
|
5
|
+
import type { Provider } from './provider.js';
|
|
6
|
+
export declare class Fisherman implements Agent {
|
|
7
|
+
emoji: string;
|
|
8
|
+
provider: Provider;
|
|
9
|
+
apiClient: ApiClient;
|
|
10
|
+
requestStore: RequestStore;
|
|
11
|
+
specLoader: () => Promise<any | null>;
|
|
12
|
+
cookieProvider: () => Promise<Record<string, string>>;
|
|
13
|
+
configHeaders: Record<string, string>;
|
|
14
|
+
sessionName?: string;
|
|
15
|
+
baseEndpoint: string;
|
|
16
|
+
spec: any | null;
|
|
17
|
+
mode: 'replicate' | 'achieve' | 'disabled';
|
|
18
|
+
hasApiConfig: boolean;
|
|
19
|
+
constructor(provider: Provider, apiClient: ApiClient, requestStore: RequestStore, specLoader: () => Promise<any | null>, baseEndpoint: string, cookieProvider: () => Promise<Record<string, string>>, configHeaders?: Record<string, string>, hasApiConfig?: boolean);
|
|
20
|
+
isAvailable(): boolean;
|
|
21
|
+
getMode(): string;
|
|
22
|
+
ensureReady(scopeUrl?: string): Promise<void>;
|
|
23
|
+
getEndpointList(scopeUrl?: string): string;
|
|
24
|
+
prepareData(instructions: string, scopeUrl?: string, sessionName?: string): Promise<FishermanResult>;
|
|
25
|
+
detectMode(scopeUrl?: string): Promise<void>;
|
|
26
|
+
refreshAuth(): Promise<void>;
|
|
27
|
+
buildEndpointList(scopeUrl?: string): string;
|
|
28
|
+
buildSystemPrompt(endpointList: string, toolNames: string[], scopeUrl?: string): string;
|
|
29
|
+
buildTaskPrompt(instructions: string): string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Plan } from '../../test-plan.js';
|
|
2
|
+
import type { Conversation } from '../conversation.js';
|
|
3
|
+
import type { Constructor } from './mixin.js';
|
|
4
|
+
export interface CodeceptJSMethods {
|
|
5
|
+
toCode(conversation: Conversation, scenario: string): string;
|
|
6
|
+
saveCodeceptPlanToFile(plan: Plan): string;
|
|
7
|
+
}
|
|
8
|
+
export declare function WithCodeceptJS<T extends Constructor>(Base: T): {
|
|
9
|
+
new (...args: any[]): {
|
|
10
|
+
savedFiles: Set<string>;
|
|
11
|
+
toCode(conversation: Conversation, scenario: string): string;
|
|
12
|
+
saveCodeceptPlanToFile(plan: Plan): string;
|
|
13
|
+
getKnowledgeLines(url: string, indent?: string): string[];
|
|
14
|
+
};
|
|
15
|
+
} & T;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ActionResult } from '../../action-result.js';
|
|
2
|
+
import { ExperienceTracker, type SessionStep } from '../../experience-tracker.js';
|
|
3
|
+
import type { Reporter } from '../../reporter.js';
|
|
4
|
+
import type { StateManager } from '../../state-manager.js';
|
|
5
|
+
import { type Task, Test } from '../../test-plan.js';
|
|
6
|
+
import type { Conversation, ToolExecution } from '../conversation.js';
|
|
7
|
+
import type { Provider } from '../provider.js';
|
|
8
|
+
import { type Constructor } from './mixin.js';
|
|
9
|
+
export interface ExperienceMethods {
|
|
10
|
+
saveSession(task: Task, initialState: ActionResult, conversation: Conversation): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function WithExperience<T extends Constructor>(Base: T): {
|
|
13
|
+
new (...args: any[]): {
|
|
14
|
+
provider: Provider;
|
|
15
|
+
experienceTracker: ExperienceTracker;
|
|
16
|
+
reporter: Reporter | undefined;
|
|
17
|
+
stateManager: StateManager | undefined;
|
|
18
|
+
isPlaywrightFramework: () => boolean;
|
|
19
|
+
toCode: (conversation: Conversation, scenario: string) => string;
|
|
20
|
+
toPlaywrightCode: (conversation: Conversation, scenario: string) => Promise<string>;
|
|
21
|
+
stopScreencast: () => Promise<void>;
|
|
22
|
+
saveSession(task: Task, initialState: ActionResult, conversation: Conversation): Promise<void>;
|
|
23
|
+
reportSession(test: Test, steps: SessionStep[]): Promise<void>;
|
|
24
|
+
extractSteps(toolExecutions: ToolExecution[]): Promise<SessionStep[]>;
|
|
25
|
+
hasRelevantFlowExperience(state: ActionResult): boolean;
|
|
26
|
+
extractPassedCodeceptSteps(task: Task): SessionStep[];
|
|
27
|
+
curateFlow(steps: SessionStep[], task: Task, initialState: ActionResult): Promise<string>;
|
|
28
|
+
renderFlowFromSuccessfulSteps(steps: SessionStep[], task: Task): string;
|
|
29
|
+
detectRetryPatterns(toolExecutions: ToolExecution[], initialState: ActionResult): Promise<void>;
|
|
30
|
+
analyzeDiscoveries(stepsWithDiffs: Array<{
|
|
31
|
+
step: SessionStep;
|
|
32
|
+
ariaDiff: string | null;
|
|
33
|
+
}>): Promise<void>;
|
|
34
|
+
buildDiscoveryPrompt(stepsWithDiffs: Array<{
|
|
35
|
+
step: SessionStep;
|
|
36
|
+
ariaDiff: string | null;
|
|
37
|
+
}>): string;
|
|
38
|
+
extractVisitedUrls(toolExecutions: ToolExecution[], initialUrl: string): string[];
|
|
39
|
+
};
|
|
40
|
+
} & T;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type PlaywrightRecorder } from '../../playwright-recorder.js';
|
|
2
|
+
import type { Plan } from '../../test-plan.js';
|
|
3
|
+
import type { Conversation } from '../conversation.js';
|
|
4
|
+
import type { Constructor } from './mixin.js';
|
|
5
|
+
export interface PlaywrightMethods {
|
|
6
|
+
toPlaywrightCode(conversation: Conversation, scenario: string): Promise<string>;
|
|
7
|
+
savePlaywrightPlanToFile(plan: Plan): string;
|
|
8
|
+
}
|
|
9
|
+
export declare function WithPlaywright<T extends Constructor>(Base: T): {
|
|
10
|
+
new (...args: any[]): {
|
|
11
|
+
playwright: {
|
|
12
|
+
recorder: PlaywrightRecorder;
|
|
13
|
+
helper: any;
|
|
14
|
+
} | undefined;
|
|
15
|
+
savedFiles: Set<string>;
|
|
16
|
+
toPlaywrightCode(conversation: Conversation, scenario: string): Promise<string>;
|
|
17
|
+
savePlaywrightPlanToFile(plan: Plan): string;
|
|
18
|
+
getPlaywrightKnowledgeLines(url: string, indent?: string): string[];
|
|
19
|
+
};
|
|
20
|
+
} & T;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ExplorbotConfig } from '../../config.js';
|
|
2
|
+
import type { PlaywrightRecorder } from '../../playwright-recorder.js';
|
|
3
|
+
import { type Constructor } from './mixin.js';
|
|
4
|
+
export interface ScreencastMethods {
|
|
5
|
+
attachScreencast(): void;
|
|
6
|
+
isScreencastActive(): boolean;
|
|
7
|
+
stopScreencast(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function WithScreencast<T extends Constructor>(Base: T): {
|
|
10
|
+
new (...args: any[]): {
|
|
11
|
+
config: ExplorbotConfig | undefined;
|
|
12
|
+
savedFiles: Set<string>;
|
|
13
|
+
playwright: {
|
|
14
|
+
recorder: PlaywrightRecorder;
|
|
15
|
+
helper: any;
|
|
16
|
+
} | undefined;
|
|
17
|
+
screencastPage: any;
|
|
18
|
+
screencastActive: boolean;
|
|
19
|
+
screencastPath: string | null;
|
|
20
|
+
screencastListenersInstalled: boolean;
|
|
21
|
+
screencastTask: any;
|
|
22
|
+
screencastLastChapter: string | null;
|
|
23
|
+
onTestBefore?: (test: any) => void;
|
|
24
|
+
onStepPassed?: (step: any) => void;
|
|
25
|
+
onTestAfter?: () => void;
|
|
26
|
+
isScreencastActive(): boolean;
|
|
27
|
+
attachScreencast(): void;
|
|
28
|
+
startScreencast(test: any): Promise<void>;
|
|
29
|
+
emitChapter(_step: any): Promise<void>;
|
|
30
|
+
stopScreencast(): Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
} & T;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ToolExecution } from '../conversation.js';
|
|
2
|
+
export { isNonReusableCode, stripComments } from '../../utils/step-analyzer.js';
|
|
3
|
+
export declare function escapeString(str: string): string;
|
|
4
|
+
export declare function getExecutionLabel(exec: ToolExecution, fallback?: string): string;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { ExplorbotConfig } from '../config.js';
|
|
2
|
+
import { ExperienceTracker } from '../experience-tracker.js';
|
|
3
|
+
import type { PlaywrightRecorder } from '../playwright-recorder.js';
|
|
4
|
+
import type { Reporter } from '../reporter.js';
|
|
5
|
+
import type { StateManager } from '../state-manager.js';
|
|
6
|
+
import type { Plan } from '../test-plan.js';
|
|
7
|
+
import { type CodeceptJSMethods } from './historian/codeceptjs.js';
|
|
8
|
+
import { type ExperienceMethods } from './historian/experience.js';
|
|
9
|
+
import { type PlaywrightMethods } from './historian/playwright.js';
|
|
10
|
+
import { type ScreencastMethods } from './historian/screencast.js';
|
|
11
|
+
import type { Provider } from './provider.js';
|
|
12
|
+
export { isNonReusableCode } from '../utils/step-analyzer.js';
|
|
13
|
+
declare const HistorianBase: {
|
|
14
|
+
new (...args: any[]): {
|
|
15
|
+
config: ExplorbotConfig | undefined;
|
|
16
|
+
savedFiles: Set<string>;
|
|
17
|
+
playwright: {
|
|
18
|
+
recorder: PlaywrightRecorder;
|
|
19
|
+
helper: any;
|
|
20
|
+
};
|
|
21
|
+
screencastPage: any;
|
|
22
|
+
screencastActive: boolean;
|
|
23
|
+
screencastPath: string | null;
|
|
24
|
+
screencastListenersInstalled: boolean;
|
|
25
|
+
screencastTask: any;
|
|
26
|
+
screencastLastChapter: string | null;
|
|
27
|
+
onTestBefore?: (test: any) => void;
|
|
28
|
+
onStepPassed?: (step: any) => void;
|
|
29
|
+
onTestAfter?: () => void;
|
|
30
|
+
isScreencastActive(): boolean;
|
|
31
|
+
attachScreencast(): void;
|
|
32
|
+
startScreencast(test: any): Promise<void>;
|
|
33
|
+
emitChapter(_step: any): Promise<void>;
|
|
34
|
+
stopScreencast(): Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
} & {
|
|
37
|
+
new (...args: any[]): {
|
|
38
|
+
playwright: {
|
|
39
|
+
recorder: PlaywrightRecorder;
|
|
40
|
+
helper: any;
|
|
41
|
+
};
|
|
42
|
+
savedFiles: Set<string>;
|
|
43
|
+
toPlaywrightCode(conversation: import("./conversation.js").Conversation, scenario: string): Promise<string>;
|
|
44
|
+
savePlaywrightPlanToFile(plan: Plan): string;
|
|
45
|
+
getPlaywrightKnowledgeLines(url: string, indent?: string): string[];
|
|
46
|
+
};
|
|
47
|
+
} & {
|
|
48
|
+
new (...args: any[]): {
|
|
49
|
+
savedFiles: Set<string>;
|
|
50
|
+
toCode(conversation: import("./conversation.js").Conversation, scenario: string): string;
|
|
51
|
+
saveCodeceptPlanToFile(plan: Plan): string;
|
|
52
|
+
getKnowledgeLines(url: string, indent?: string): string[];
|
|
53
|
+
};
|
|
54
|
+
} & {
|
|
55
|
+
new (...args: any[]): {
|
|
56
|
+
provider: Provider;
|
|
57
|
+
experienceTracker: ExperienceTracker;
|
|
58
|
+
reporter: Reporter | undefined;
|
|
59
|
+
stateManager: StateManager | undefined;
|
|
60
|
+
isPlaywrightFramework: () => boolean;
|
|
61
|
+
toCode: (conversation: import("./conversation.js").Conversation, scenario: string) => string;
|
|
62
|
+
toPlaywrightCode: (conversation: import("./conversation.js").Conversation, scenario: string) => Promise<string>;
|
|
63
|
+
stopScreencast: () => Promise<void>;
|
|
64
|
+
saveSession(task: import("../test-plan.js").Task, initialState: import("../action-result.js").ActionResult, conversation: import("./conversation.js").Conversation): Promise<void>;
|
|
65
|
+
reportSession(test: import("../test-plan.js").Test, steps: import("../experience-tracker.js").SessionStep[]): Promise<void>;
|
|
66
|
+
extractSteps(toolExecutions: import("./conversation.js").ToolExecution[]): Promise<import("../experience-tracker.js").SessionStep[]>;
|
|
67
|
+
hasRelevantFlowExperience(state: import("../action-result.js").ActionResult): boolean;
|
|
68
|
+
extractPassedCodeceptSteps(task: import("../test-plan.js").Task): import("../experience-tracker.js").SessionStep[];
|
|
69
|
+
curateFlow(steps: import("../experience-tracker.js").SessionStep[], task: import("../test-plan.js").Task, initialState: import("../action-result.js").ActionResult): Promise<string>;
|
|
70
|
+
renderFlowFromSuccessfulSteps(steps: import("../experience-tracker.js").SessionStep[], task: import("../test-plan.js").Task): string;
|
|
71
|
+
detectRetryPatterns(toolExecutions: import("./conversation.js").ToolExecution[], initialState: import("../action-result.js").ActionResult): Promise<void>;
|
|
72
|
+
analyzeDiscoveries(stepsWithDiffs: {
|
|
73
|
+
step: import("../experience-tracker.js").SessionStep;
|
|
74
|
+
ariaDiff: string | null;
|
|
75
|
+
}[]): Promise<void>;
|
|
76
|
+
buildDiscoveryPrompt(stepsWithDiffs: {
|
|
77
|
+
step: import("../experience-tracker.js").SessionStep;
|
|
78
|
+
ariaDiff: string | null;
|
|
79
|
+
}[]): string;
|
|
80
|
+
extractVisitedUrls(toolExecutions: import("./conversation.js").ToolExecution[], initialUrl: string): string[];
|
|
81
|
+
};
|
|
82
|
+
} & (new (...args: any[]) => object);
|
|
83
|
+
export interface Historian extends ExperienceMethods, CodeceptJSMethods, PlaywrightMethods, ScreencastMethods {
|
|
84
|
+
}
|
|
85
|
+
export declare class Historian extends HistorianBase {
|
|
86
|
+
provider: Provider;
|
|
87
|
+
experienceTracker: ExperienceTracker;
|
|
88
|
+
reporter: Reporter | undefined;
|
|
89
|
+
stateManager: StateManager | undefined;
|
|
90
|
+
config: ExplorbotConfig | undefined;
|
|
91
|
+
playwright: {
|
|
92
|
+
recorder: PlaywrightRecorder;
|
|
93
|
+
helper: any;
|
|
94
|
+
} | undefined;
|
|
95
|
+
savedFiles: Set<string>;
|
|
96
|
+
constructor(provider: Provider, experienceTracker?: ExperienceTracker, reporter?: Reporter, stateManager?: StateManager, config?: ExplorbotConfig, playwright?: {
|
|
97
|
+
recorder: PlaywrightRecorder;
|
|
98
|
+
helper: any;
|
|
99
|
+
});
|
|
100
|
+
isPlaywrightFramework(): boolean;
|
|
101
|
+
getSavedFiles(): string[];
|
|
102
|
+
savePlanToFile(plan: Plan): string;
|
|
103
|
+
rewriteScenarioInFile(filePath: string, healedSteps: Array<{
|
|
104
|
+
test: string;
|
|
105
|
+
original: string;
|
|
106
|
+
healed: string;
|
|
107
|
+
}>): void;
|
|
108
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ActionResult } from '../action-result.js';
|
|
2
|
+
import type Action from '../action.js';
|
|
3
|
+
import { ExperienceTracker } from '../experience-tracker.js';
|
|
4
|
+
import Explorer from '../explorer.js';
|
|
5
|
+
import { KnowledgeTracker } from '../knowledge-tracker.js';
|
|
6
|
+
import { HooksRunner } from '../utils/hooks-runner.js';
|
|
7
|
+
import type { Agent } from './agent.js';
|
|
8
|
+
import { ExperienceCompactor } from './experience-compactor.js';
|
|
9
|
+
import type { Provider } from './provider.js';
|
|
10
|
+
declare class Navigator implements Agent {
|
|
11
|
+
emoji: string;
|
|
12
|
+
provider: Provider;
|
|
13
|
+
experienceCompactor: ExperienceCompactor;
|
|
14
|
+
knowledgeTracker: KnowledgeTracker;
|
|
15
|
+
experienceTracker: ExperienceTracker;
|
|
16
|
+
hooksRunner: HooksRunner;
|
|
17
|
+
MAX_ATTEMPTS: number;
|
|
18
|
+
systemPrompt: string;
|
|
19
|
+
freeSailSystemPrompt: string;
|
|
20
|
+
explorer: Explorer;
|
|
21
|
+
constructor(explorer: Explorer, provider: Provider, experienceCompactor: ExperienceCompactor, experienceTracker?: ExperienceTracker);
|
|
22
|
+
get verifyAttempts(): number;
|
|
23
|
+
get verifyTimeout(): number;
|
|
24
|
+
getBaseOrigin(): string | null;
|
|
25
|
+
getComparableCurrentUrl(stateManager: any, expectedUrl: string): string;
|
|
26
|
+
isSameExpectedOrigin(expectedUrl: string, stateManager: any): boolean;
|
|
27
|
+
isOnExpectedPage(expectedUrl: string, stateManager: any): boolean;
|
|
28
|
+
visit(url: string): Promise<void>;
|
|
29
|
+
visitOnce(url: string): Promise<void>;
|
|
30
|
+
resolveState(message: string, actionResult: ActionResult, opts?: {
|
|
31
|
+
action?: Action;
|
|
32
|
+
expectedUrl?: string;
|
|
33
|
+
}): Promise<boolean>;
|
|
34
|
+
buildExperienceTools(): {
|
|
35
|
+
learnExperience: unknown;
|
|
36
|
+
} | undefined;
|
|
37
|
+
freeSail(opts?: {
|
|
38
|
+
strategy?: 'deep' | 'shallow';
|
|
39
|
+
scope?: string;
|
|
40
|
+
visitedUrls?: Set<string>;
|
|
41
|
+
}, actionResult?: ActionResult): Promise<{
|
|
42
|
+
target: string;
|
|
43
|
+
reason: string;
|
|
44
|
+
} | null>;
|
|
45
|
+
verifyState(message: string, actionResult: ActionResult): Promise<{
|
|
46
|
+
verified: boolean;
|
|
47
|
+
successfulCodes: string[];
|
|
48
|
+
assertionSteps: Array<{
|
|
49
|
+
name: string;
|
|
50
|
+
args: any[];
|
|
51
|
+
}>;
|
|
52
|
+
totalAttempted: number;
|
|
53
|
+
}>;
|
|
54
|
+
checkAlreadyVerified(aiResponse: string, actionResult: ActionResult): boolean;
|
|
55
|
+
}
|
|
56
|
+
export { Navigator };
|