explorbot 0.1.31 → 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 +10 -25
- 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/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 +10 -3
- 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 +10 -25
- package/src/action-result.ts +22 -7
- package/src/action.ts +12 -5
- package/src/ai/provider.ts +10 -3
- 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,12 @@
|
|
|
1
|
+
import { BaseCommand } from './base-command.js';
|
|
2
|
+
export declare class FreesailCommand extends BaseCommand {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
aliases: string[];
|
|
6
|
+
tuiEnabled: boolean;
|
|
7
|
+
options: {
|
|
8
|
+
flags: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}[];
|
|
11
|
+
execute(args: string): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from './base-command.js';
|
|
2
|
+
export declare function formatKnowledgeList(knowledge: Array<{
|
|
3
|
+
url: string;
|
|
4
|
+
firstLine: string;
|
|
5
|
+
}>, limit?: number): string;
|
|
6
|
+
export declare class KnowsCommand extends BaseCommand {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
execute(args: string, limit?: number): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand, type Suggestion } from './base-command.js';
|
|
2
|
+
export declare class PlanCommand extends BaseCommand {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
suggestions: Suggestion[];
|
|
6
|
+
options: {
|
|
7
|
+
flags: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}[];
|
|
10
|
+
execute(args: string): Promise<void>;
|
|
11
|
+
printNextSteps(): void;
|
|
12
|
+
printPlanSummary(): void;
|
|
13
|
+
updateSuggestions(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Plan } from '../test-plan.js';
|
|
2
|
+
import { BaseCommand } from './base-command.js';
|
|
3
|
+
export declare class PlansCommand extends BaseCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
options: {
|
|
7
|
+
flags: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}[];
|
|
10
|
+
execute(args: string): Promise<void>;
|
|
11
|
+
getPlanFiles(): PlanFile[];
|
|
12
|
+
printPlans(files: PlanFile[]): void;
|
|
13
|
+
printPlanDetails(plan: Plan, file: PlanFile): void;
|
|
14
|
+
resolvePlanFile(target: string, files: PlanFile[]): PlanFile;
|
|
15
|
+
}
|
|
16
|
+
interface PlanFile {
|
|
17
|
+
name: string;
|
|
18
|
+
path: string;
|
|
19
|
+
modifiedAt: number;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand, type Suggestion } from './base-command.js';
|
|
2
|
+
export declare class ResearchCommand extends BaseCommand {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
suggestions: Suggestion[];
|
|
6
|
+
options: {
|
|
7
|
+
flags: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}[];
|
|
10
|
+
execute(args: string): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand, type Suggestion } from './base-command.js';
|
|
2
|
+
export declare class TestCommand extends BaseCommand {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
options: {
|
|
6
|
+
flags: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}[];
|
|
9
|
+
suggestions: Suggestion[];
|
|
10
|
+
execute(args: string): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExplorBot } from '../explorbot.js';
|
|
3
|
+
interface AppProps {
|
|
4
|
+
explorBot: ExplorBot;
|
|
5
|
+
initialShowInput?: boolean;
|
|
6
|
+
exitOnEmptyInput?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function App({ explorBot, initialShowInput, exitOnEmptyInput }: AppProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CommandHandler } from '../command-handler.js';
|
|
3
|
+
interface InputPaneProps {
|
|
4
|
+
commandHandler: CommandHandler;
|
|
5
|
+
exitOnEmptyInput?: boolean;
|
|
6
|
+
onSubmit?: (value: string) => Promise<void>;
|
|
7
|
+
onCommandStart?: () => void;
|
|
8
|
+
onCommandComplete?: () => void;
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const InputPane: React.FC<InputPaneProps>;
|
|
13
|
+
export default InputPane;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CommandHandler } from '../command-handler.js';
|
|
3
|
+
interface InputReadlineProps {
|
|
4
|
+
commandHandler?: CommandHandler;
|
|
5
|
+
exitOnEmptyInput?: boolean;
|
|
6
|
+
onSubmit?: (value: string) => void | Promise<void>;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
onCommandStart?: () => void;
|
|
9
|
+
onCommandComplete?: () => void;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
value?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
showPrompt?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const InputReadline: React.FC<InputReadlineProps>;
|
|
17
|
+
export default InputReadline;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PlanPaneProps {
|
|
3
|
+
completedPlans: PlanSummary[];
|
|
4
|
+
activePlan: PlanSummary | null;
|
|
5
|
+
}
|
|
6
|
+
declare const PlanPane: React.FC<PlanPaneProps>;
|
|
7
|
+
export default PlanPane;
|
|
8
|
+
export interface PlanSummary {
|
|
9
|
+
title: string;
|
|
10
|
+
testCount: number;
|
|
11
|
+
passed: number;
|
|
12
|
+
failed: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StateTransition, WebPageState } from '../state-manager.js';
|
|
3
|
+
interface StateTransitionPaneProps {
|
|
4
|
+
transition?: StateTransition;
|
|
5
|
+
currentState?: WebPageState;
|
|
6
|
+
}
|
|
7
|
+
declare const StateTransitionPane: React.FC<StateTransitionPaneProps>;
|
|
8
|
+
export default StateTransitionPane;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExplorbotConfig } from '../config.js';
|
|
3
|
+
import type { KnowledgeTracker } from '../knowledge-tracker.js';
|
|
4
|
+
interface WelcomeChecklistProps {
|
|
5
|
+
config: ExplorbotConfig;
|
|
6
|
+
knowledgeTracker: KnowledgeTracker;
|
|
7
|
+
}
|
|
8
|
+
declare const WelcomeChecklist: React.FC<WelcomeChecklistProps>;
|
|
9
|
+
export default WelcomeChecklist;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CommandAutocompleteSuggestion } from '../command-handler.js';
|
|
2
|
+
interface AutocompleteState {
|
|
3
|
+
suggestions: CommandAutocompleteSuggestion[];
|
|
4
|
+
argumentHint?: string;
|
|
5
|
+
selectedIndex: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const setAutocompleteState: (next: AutocompleteState) => void;
|
|
9
|
+
export declare const useAutocompleteState: () => AutocompleteState;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
|
+
export declare const nonAlphanumericKeys: string[];
|
|
3
|
+
export default function parseKeypress(value?: string | Buffer): {
|
|
4
|
+
name: string;
|
|
5
|
+
ctrl: boolean;
|
|
6
|
+
meta: boolean;
|
|
7
|
+
shift: boolean;
|
|
8
|
+
option: boolean;
|
|
9
|
+
sequence: string;
|
|
10
|
+
raw: string | undefined;
|
|
11
|
+
code: string | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
interface PlaywrightConfig {
|
|
2
|
+
browser: 'chromium' | 'firefox' | 'webkit';
|
|
3
|
+
url: string;
|
|
4
|
+
show?: boolean;
|
|
5
|
+
windowSize?: string;
|
|
6
|
+
slowMo?: number;
|
|
7
|
+
chromium?: {
|
|
8
|
+
args?: string[];
|
|
9
|
+
};
|
|
10
|
+
firefox?: {
|
|
11
|
+
args?: string[];
|
|
12
|
+
};
|
|
13
|
+
webkit?: {
|
|
14
|
+
args?: string[];
|
|
15
|
+
};
|
|
16
|
+
timeout?: number;
|
|
17
|
+
waitForAction?: number;
|
|
18
|
+
waitForNavigation?: 'load' | 'domcontentloaded' | 'networkidle';
|
|
19
|
+
waitForTimeout?: number;
|
|
20
|
+
spinnerSelectors?: string[];
|
|
21
|
+
ignoreHTTPSErrors?: boolean;
|
|
22
|
+
userAgent?: string;
|
|
23
|
+
viewport?: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
args?: string[];
|
|
28
|
+
}
|
|
29
|
+
type PlaywrightHookFn = (ctx: {
|
|
30
|
+
page: any;
|
|
31
|
+
url: string;
|
|
32
|
+
}) => Promise<void> | void;
|
|
33
|
+
type CodeceptJSHookFn = (ctx: {
|
|
34
|
+
I: any;
|
|
35
|
+
url: string;
|
|
36
|
+
}) => Promise<void> | void;
|
|
37
|
+
interface PlaywrightHook {
|
|
38
|
+
type: 'playwright';
|
|
39
|
+
hook: PlaywrightHookFn;
|
|
40
|
+
}
|
|
41
|
+
interface CodeceptJSHook {
|
|
42
|
+
type: 'codeceptjs';
|
|
43
|
+
hook: CodeceptJSHookFn;
|
|
44
|
+
}
|
|
45
|
+
type Hook = PlaywrightHook | CodeceptJSHook;
|
|
46
|
+
type HookPatternMap = Record<string, Hook>;
|
|
47
|
+
type HookConfig = Hook | HookPatternMap;
|
|
48
|
+
interface HooksConfig {
|
|
49
|
+
beforeHook?: HookConfig;
|
|
50
|
+
afterHook?: HookConfig;
|
|
51
|
+
}
|
|
52
|
+
interface AgentConfig extends HooksConfig {
|
|
53
|
+
model?: any;
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
systemPrompt?: string;
|
|
56
|
+
rules?: RuleEntry[];
|
|
57
|
+
providerOptions?: Record<string, any>;
|
|
58
|
+
reasoning?: 'provider-default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
59
|
+
}
|
|
60
|
+
interface ResearcherAgentConfig extends AgentConfig {
|
|
61
|
+
excludeSelectors?: string[];
|
|
62
|
+
includeSelectors?: string[];
|
|
63
|
+
stopWords?: string[];
|
|
64
|
+
maxElementsToExplore?: number;
|
|
65
|
+
maxExpandableClicks?: number;
|
|
66
|
+
retries?: number;
|
|
67
|
+
sections?: string[];
|
|
68
|
+
focusSections?: string[];
|
|
69
|
+
errorPageTimeout?: number;
|
|
70
|
+
}
|
|
71
|
+
interface TesterAgentConfig extends AgentConfig {
|
|
72
|
+
progressCheckInterval?: number;
|
|
73
|
+
}
|
|
74
|
+
interface PilotAgentConfig extends AgentConfig {
|
|
75
|
+
stepsToReview?: number;
|
|
76
|
+
}
|
|
77
|
+
interface NavigatorAgentConfig extends AgentConfig {
|
|
78
|
+
addHtmlOnTry?: number;
|
|
79
|
+
maxAttempts?: number;
|
|
80
|
+
verifyAttempts?: number;
|
|
81
|
+
verifyTimeout?: number;
|
|
82
|
+
}
|
|
83
|
+
type HealFn = (ctx: {
|
|
84
|
+
I: any;
|
|
85
|
+
}) => Promise<void> | void;
|
|
86
|
+
interface HealRecipe {
|
|
87
|
+
priority?: number;
|
|
88
|
+
steps?: string[];
|
|
89
|
+
fn: (context: {
|
|
90
|
+
step: any;
|
|
91
|
+
error: Error;
|
|
92
|
+
prevSteps?: any[];
|
|
93
|
+
}) => HealFn | Promise<HealFn | null> | null;
|
|
94
|
+
}
|
|
95
|
+
interface RerunnerAgentConfig extends AgentConfig {
|
|
96
|
+
healLimit?: number;
|
|
97
|
+
ariaSnapshotLimit?: number;
|
|
98
|
+
retryFailedStep?: Record<string, any>;
|
|
99
|
+
screenshotOnFail?: Record<string, any>;
|
|
100
|
+
recipes?: Record<string, HealRecipe>;
|
|
101
|
+
}
|
|
102
|
+
interface PlannerAgentConfig extends AgentConfig {
|
|
103
|
+
styles?: string[];
|
|
104
|
+
stylesDir?: string;
|
|
105
|
+
}
|
|
106
|
+
interface ScreencastConfig {
|
|
107
|
+
size?: {
|
|
108
|
+
width: number;
|
|
109
|
+
height: number;
|
|
110
|
+
};
|
|
111
|
+
quality?: number;
|
|
112
|
+
}
|
|
113
|
+
interface HistorianAgentConfig extends AgentConfig {
|
|
114
|
+
framework?: 'codeceptjs' | 'playwright';
|
|
115
|
+
screencast?: boolean | ScreencastConfig;
|
|
116
|
+
}
|
|
117
|
+
interface AgentsConfig {
|
|
118
|
+
tester?: TesterAgentConfig;
|
|
119
|
+
navigator?: NavigatorAgentConfig;
|
|
120
|
+
researcher?: ResearcherAgentConfig;
|
|
121
|
+
planner?: PlannerAgentConfig;
|
|
122
|
+
pilot?: PilotAgentConfig;
|
|
123
|
+
driller?: AgentConfig;
|
|
124
|
+
'experience-compactor'?: AgentConfig;
|
|
125
|
+
captain?: AgentConfig;
|
|
126
|
+
quartermaster?: AgentConfig;
|
|
127
|
+
historian?: HistorianAgentConfig;
|
|
128
|
+
fisherman?: AgentConfig;
|
|
129
|
+
chief?: AgentConfig;
|
|
130
|
+
curler?: AgentConfig;
|
|
131
|
+
rerunner?: RerunnerAgentConfig;
|
|
132
|
+
analyst?: AgentConfig;
|
|
133
|
+
}
|
|
134
|
+
interface AIConfig {
|
|
135
|
+
model: any;
|
|
136
|
+
apiKey?: string;
|
|
137
|
+
config?: Record<string, any>;
|
|
138
|
+
langfuse?: {
|
|
139
|
+
enabled?: boolean;
|
|
140
|
+
publicKey?: string;
|
|
141
|
+
secretKey?: string;
|
|
142
|
+
baseUrl?: string;
|
|
143
|
+
};
|
|
144
|
+
tools?: {
|
|
145
|
+
enabled: boolean;
|
|
146
|
+
maxConcurrency: number;
|
|
147
|
+
timeout: number;
|
|
148
|
+
};
|
|
149
|
+
vision?: boolean;
|
|
150
|
+
visionModel?: any;
|
|
151
|
+
agenticModel?: any;
|
|
152
|
+
maxAttempts?: number;
|
|
153
|
+
retryDelay?: number;
|
|
154
|
+
agents?: AgentsConfig;
|
|
155
|
+
}
|
|
156
|
+
interface HtmlConfig {
|
|
157
|
+
minimal?: {
|
|
158
|
+
include?: string[];
|
|
159
|
+
exclude?: string[];
|
|
160
|
+
};
|
|
161
|
+
combined?: {
|
|
162
|
+
include?: string[];
|
|
163
|
+
exclude?: string[];
|
|
164
|
+
};
|
|
165
|
+
text?: {
|
|
166
|
+
include?: string[];
|
|
167
|
+
exclude?: string[];
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
interface ActionConfig {
|
|
171
|
+
delay?: number;
|
|
172
|
+
retries?: number;
|
|
173
|
+
}
|
|
174
|
+
interface ReporterConfig {
|
|
175
|
+
enabled?: boolean;
|
|
176
|
+
html?: boolean;
|
|
177
|
+
markdown?: boolean;
|
|
178
|
+
runGroup?: string | null;
|
|
179
|
+
}
|
|
180
|
+
type ApiHookFn = (ctx: {
|
|
181
|
+
headers: Record<string, string>;
|
|
182
|
+
baseEndpoint: string;
|
|
183
|
+
}) => Promise<Record<string, string> | undefined> | Record<string, string> | undefined;
|
|
184
|
+
interface ApiConfig {
|
|
185
|
+
baseEndpoint?: string;
|
|
186
|
+
spec?: string[];
|
|
187
|
+
headers?: Record<string, string>;
|
|
188
|
+
bootstrap?: ApiHookFn;
|
|
189
|
+
teardown?: ApiHookFn;
|
|
190
|
+
}
|
|
191
|
+
interface WebConfig {
|
|
192
|
+
url: string;
|
|
193
|
+
}
|
|
194
|
+
interface ExplorbotConfig {
|
|
195
|
+
web?: WebConfig;
|
|
196
|
+
playwright: PlaywrightConfig;
|
|
197
|
+
ai: AIConfig;
|
|
198
|
+
html?: HtmlConfig;
|
|
199
|
+
action?: ActionConfig;
|
|
200
|
+
dirs?: {
|
|
201
|
+
knowledge: string;
|
|
202
|
+
experience: string;
|
|
203
|
+
output: string;
|
|
204
|
+
};
|
|
205
|
+
experience?: {
|
|
206
|
+
maxReadLines?: number;
|
|
207
|
+
};
|
|
208
|
+
reporter?: ReporterConfig;
|
|
209
|
+
api?: ApiConfig;
|
|
210
|
+
stepsFile?: string;
|
|
211
|
+
files?: Record<string, string>;
|
|
212
|
+
dynamicPageRegex?: string;
|
|
213
|
+
}
|
|
214
|
+
type RuleEntry = string | Record<string, string>;
|
|
215
|
+
export declare const EXPLORBOT_CONFIG_PATHS: string[];
|
|
216
|
+
export type { ExplorbotConfig, PlaywrightConfig, AIConfig, HtmlConfig, ActionConfig, AgentConfig, AgentsConfig, HistorianAgentConfig, ResearcherAgentConfig, NavigatorAgentConfig, PlannerAgentConfig, RerunnerAgentConfig, HealRecipe, Hook, HookConfig, HooksConfig, PlaywrightHook, CodeceptJSHook, HookPatternMap, RuleEntry, ReporterConfig, ApiConfig, WebConfig, ApiHookFn, };
|
|
217
|
+
export declare class ConfigParser {
|
|
218
|
+
static instance: ConfigParser;
|
|
219
|
+
config: ExplorbotConfig | null;
|
|
220
|
+
configPath: string | null;
|
|
221
|
+
runtimeBaseUrlOverride: string | null;
|
|
222
|
+
constructor();
|
|
223
|
+
static loadEnv(filePath: string): void;
|
|
224
|
+
static getInstance(): ConfigParser;
|
|
225
|
+
loadConfig(options?: {
|
|
226
|
+
config?: string;
|
|
227
|
+
path?: string;
|
|
228
|
+
baseUrl?: string;
|
|
229
|
+
}): Promise<ExplorbotConfig>;
|
|
230
|
+
getConfig(): ExplorbotConfig;
|
|
231
|
+
getConfigPath(): string | null;
|
|
232
|
+
getOutputDir(): string;
|
|
233
|
+
getStatesDir(): string;
|
|
234
|
+
getPlansDir(): string;
|
|
235
|
+
getTestsDir(): string;
|
|
236
|
+
static resetForTesting(): void;
|
|
237
|
+
static setupTestConfig(): void;
|
|
238
|
+
static getTestDirectories(): string[];
|
|
239
|
+
static cleanupAllTestDirectories(): void;
|
|
240
|
+
findConfigFile(): string | null;
|
|
241
|
+
loadConfigModule(configPath: string): Promise<any>;
|
|
242
|
+
resolveConfig(config: ExplorbotConfig, options?: {
|
|
243
|
+
baseUrl?: string;
|
|
244
|
+
}): ExplorbotConfig;
|
|
245
|
+
validateConfig(config: ExplorbotConfig): void;
|
|
246
|
+
getNestedValue(obj: any, path: string): any;
|
|
247
|
+
mergeWithDefaults(config: Partial<ExplorbotConfig>): ExplorbotConfig;
|
|
248
|
+
deepMerge(target: any, source: any): any;
|
|
249
|
+
ensureDirectory(path: string): void;
|
|
250
|
+
}
|
|
251
|
+
export declare function outputPath(...segments: string[]): string;
|