explorbot 0.0.1 → 0.1.0
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/README.md +80 -26
- package/bin/explorbot-cli.ts +680 -0
- package/boat/api-tester/src/ai/chief/styles.ts +15 -0
- package/boat/api-tester/src/ai/chief.ts +335 -0
- package/boat/api-tester/src/ai/curler-tools.ts +278 -0
- package/boat/api-tester/src/ai/curler.ts +306 -0
- package/boat/api-tester/src/api-client.ts +28 -0
- package/boat/api-tester/src/apibot.ts +203 -0
- package/boat/api-tester/src/cli.ts +301 -0
- package/boat/api-tester/src/config.ts +190 -0
- package/dist/bin/explorbot-cli.js +23 -101
- package/dist/boat/api-tester/bin/apibot-cli.js +0 -1
- package/dist/boat/api-tester/src/ai/chief/styles.js +0 -1
- package/dist/boat/api-tester/src/ai/chief.js +0 -1
- package/dist/boat/api-tester/src/ai/curler-tools.js +0 -1
- package/dist/boat/api-tester/src/ai/curler.js +0 -1
- package/dist/boat/api-tester/src/api-client.js +0 -1
- package/dist/boat/api-tester/src/apibot.js +0 -1
- package/dist/boat/api-tester/src/cli.js +0 -1
- package/dist/boat/api-tester/src/config.js +0 -1
- package/dist/src/action-result.js +0 -1
- package/dist/src/action.js +14 -12
- package/dist/src/activity.js +0 -1
- package/dist/src/ai/agent.js +0 -1
- package/dist/src/ai/bosun.js +0 -1
- package/dist/src/ai/captain/idle-mode.js +0 -1
- package/dist/src/ai/captain/mixin.js +0 -1
- package/dist/src/ai/captain/test-mode.js +0 -1
- package/dist/src/ai/captain/web-mode.js +0 -1
- package/dist/src/ai/captain.js +0 -1
- package/dist/src/ai/conversation.js +0 -1
- package/dist/src/ai/experience-compactor.js +0 -1
- package/dist/src/ai/fisherman-tools.js +0 -1
- package/dist/src/ai/fisherman.js +0 -1
- package/dist/src/ai/historian.js +0 -1
- package/dist/src/ai/navigator.js +0 -1
- package/dist/src/ai/pilot.js +0 -1
- package/dist/src/ai/planner/session-dedup.js +0 -1
- package/dist/src/ai/planner/styles.js +0 -1
- package/dist/src/ai/planner/subpages.js +42 -7
- package/dist/src/ai/planner.js +15 -4
- package/dist/src/ai/provider.js +0 -1
- package/dist/src/ai/quartermaster.js +0 -1
- package/dist/src/ai/researcher/cache.js +13 -9
- package/dist/src/ai/researcher/coordinates.js +4 -3
- package/dist/src/ai/researcher/deep-analysis.js +16 -20
- package/dist/src/ai/researcher/fingerprint-worker.js +0 -1
- package/dist/src/ai/researcher/focus.js +0 -1
- package/dist/src/ai/researcher/locators.js +1 -2
- package/dist/src/ai/researcher/mixin.js +0 -1
- package/dist/src/ai/researcher/parser.js +4 -4
- package/dist/src/ai/researcher/research-result.js +2 -1
- package/dist/src/ai/researcher.js +6 -6
- package/dist/src/ai/rules.js +0 -1
- package/dist/src/ai/task-agent.js +0 -1
- package/dist/src/ai/tester.js +0 -1
- package/dist/src/ai/tools.js +4 -1
- package/dist/src/api/api-client.js +0 -1
- package/dist/src/api/request-result.js +0 -1
- package/dist/src/api/request-store.js +0 -1
- package/dist/src/api/spec-reader.js +0 -1
- package/dist/src/api/xhr-capture.js +0 -1
- package/dist/src/browser-server.js +0 -1
- package/dist/src/command-handler.js +0 -1
- package/dist/src/commands/add-rule-command.js +0 -1
- package/dist/src/commands/base-command.js +0 -1
- package/dist/src/commands/clean-command.js +0 -1
- package/dist/src/commands/context-aria-command.js +0 -1
- package/dist/src/commands/context-command.js +2 -3
- package/dist/src/commands/context-data-command.js +0 -1
- package/dist/src/commands/context-experience-command.js +0 -1
- package/dist/src/commands/context-html-command.js +0 -1
- package/dist/src/commands/context-knowledge-command.js +0 -1
- package/dist/src/commands/debug-command.js +0 -1
- package/dist/src/commands/drill-command.js +0 -1
- package/dist/src/commands/exit-command.js +0 -1
- package/dist/src/commands/explore-command.js +3 -3
- package/dist/src/commands/freesail-command.js +0 -1
- package/dist/src/commands/help-command.js +0 -1
- package/dist/src/commands/index.js +0 -1
- package/dist/src/commands/init-command.js +117 -0
- package/dist/src/commands/knows-command.js +0 -1
- package/dist/src/commands/learn-command.js +0 -1
- package/dist/src/commands/navigate-command.js +0 -1
- package/dist/src/commands/path-command.js +0 -1
- package/dist/src/commands/plan-clear-command.js +0 -1
- package/dist/src/commands/plan-command.js +6 -2
- package/dist/src/commands/plan-edit-command.js +0 -1
- package/dist/src/commands/plan-load-command.js +0 -1
- package/dist/src/commands/plan-reload-command.js +0 -1
- package/dist/src/commands/plan-save-command.js +0 -1
- package/dist/src/commands/research-command.js +0 -1
- package/dist/src/commands/start-command.js +0 -1
- package/dist/src/commands/status-command.js +0 -1
- package/dist/src/commands/test-command.js +0 -1
- package/dist/src/components/ActivityPane.js +0 -1
- package/dist/src/components/AddKnowledge.js +0 -1
- package/dist/src/components/AddRule.js +0 -1
- package/dist/src/components/App.js +0 -1
- package/dist/src/components/Autocomplete.js +0 -1
- package/dist/src/components/InputPane.js +0 -1
- package/dist/src/components/InputReadline.js +0 -1
- package/dist/src/components/LogPane.js +0 -1
- package/dist/src/components/PlanEditor.js +0 -1
- package/dist/src/components/PlanPane.js +0 -1
- package/dist/src/components/SessionTimer.js +0 -1
- package/dist/src/components/StateTransitionPane.js +0 -1
- package/dist/src/components/StatusPane.js +0 -1
- package/dist/src/components/TaskPane.js +0 -1
- package/dist/src/components/Welcome.js +0 -1
- package/dist/src/components/WelcomeChecklist.js +0 -1
- package/dist/src/components/WelcomeCommands.js +0 -1
- package/dist/src/components/autocomplete-store.js +0 -1
- package/dist/src/components/parse-keypress.js +0 -1
- package/dist/src/config.js +0 -1
- package/dist/src/execution-controller.js +0 -1
- package/dist/src/experience-tracker.js +0 -1
- package/dist/src/explorbot.js +1 -2
- package/dist/src/explorer.js +58 -17
- package/dist/src/index.js +0 -1
- package/dist/src/knowledge-tracker.js +2 -2
- package/dist/src/observability.js +0 -1
- package/dist/src/reporter.js +0 -1
- package/dist/src/state-manager.js +0 -1
- package/dist/src/stats.js +0 -1
- package/dist/src/test-plan.js +0 -1
- package/dist/src/utils/aria.js +0 -1
- package/dist/src/utils/cli-name.js +16 -0
- package/dist/src/utils/code-extractor.js +0 -1
- package/dist/src/utils/context-formatter.js +0 -1
- package/dist/src/utils/error-page.js +0 -1
- package/dist/src/utils/expandable.js +0 -1
- package/dist/src/utils/hooks-runner.js +0 -1
- package/dist/src/utils/html-diff.js +0 -1
- package/dist/src/utils/html.js +0 -1
- package/dist/src/utils/logger.js +0 -1
- package/dist/src/utils/loop.js +0 -1
- package/dist/src/utils/markdown-parser.js +0 -1
- package/dist/src/utils/markdown-query.js +0 -1
- package/dist/src/utils/markdown-terminal.js +0 -1
- package/dist/src/utils/research-parser.js +0 -1
- package/dist/src/utils/retry.js +0 -1
- package/dist/src/utils/rules-loader.js +0 -1
- package/dist/src/utils/strings.js +0 -1
- package/dist/src/utils/test-plan-markdown.js +0 -1
- package/dist/src/utils/throttle.js +0 -1
- package/dist/src/utils/unique-names.js +0 -1
- package/dist/src/utils/url-matcher.js +0 -1
- package/dist/src/utils/web-element.js +6 -5
- package/dist/src/utils/xpath.js +0 -1
- package/package.json +28 -4
- package/src/action-result.ts +694 -0
- package/src/action.ts +449 -0
- package/src/activity.ts +111 -0
- package/src/ai/agent.ts +3 -0
- package/src/ai/bosun.ts +557 -0
- package/src/ai/captain/idle-mode.ts +116 -0
- package/src/ai/captain/mixin.ts +22 -0
- package/src/ai/captain/test-mode.ts +262 -0
- package/src/ai/captain/web-mode.ts +136 -0
- package/src/ai/captain.ts +504 -0
- package/src/ai/conversation.ts +205 -0
- package/src/ai/experience-compactor.ts +284 -0
- package/src/ai/fisherman-tools.ts +181 -0
- package/src/ai/fisherman.ts +223 -0
- package/src/ai/historian.ts +457 -0
- package/src/ai/navigator.ts +572 -0
- package/src/ai/pilot.ts +776 -0
- package/src/ai/planner/session-dedup.ts +35 -0
- package/src/ai/planner/styles.ts +17 -0
- package/src/ai/planner/subpages.ts +171 -0
- package/src/ai/planner.ts +549 -0
- package/src/ai/provider.ts +613 -0
- package/src/ai/quartermaster.ts +286 -0
- package/src/ai/researcher/cache.ts +109 -0
- package/src/ai/researcher/coordinates.ts +239 -0
- package/src/ai/researcher/deep-analysis.ts +412 -0
- package/src/ai/researcher/fingerprint-worker.ts +59 -0
- package/src/ai/researcher/focus.ts +42 -0
- package/src/ai/researcher/locators.ts +282 -0
- package/src/ai/researcher/mixin.ts +4 -0
- package/src/ai/researcher/parser.ts +186 -0
- package/src/ai/researcher/research-result.ts +116 -0
- package/src/ai/researcher.ts +858 -0
- package/src/ai/rules.ts +376 -0
- package/src/ai/task-agent.ts +141 -0
- package/src/ai/tester.ts +939 -0
- package/src/ai/tools.ts +1122 -0
- package/src/api/api-client.ts +109 -0
- package/src/api/request-result.ts +212 -0
- package/src/api/request-store.ts +130 -0
- package/src/api/spec-reader.ts +174 -0
- package/src/api/xhr-capture.ts +100 -0
- package/src/browser-server.ts +74 -0
- package/src/command-handler.ts +454 -0
- package/src/commands/add-rule-command.ts +63 -0
- package/src/commands/base-command.ts +27 -0
- package/src/commands/clean-command.ts +73 -0
- package/src/commands/context-aria-command.ts +22 -0
- package/src/commands/context-command.ts +67 -0
- package/src/commands/context-data-command.ts +30 -0
- package/src/commands/context-experience-command.ts +48 -0
- package/src/commands/context-html-command.ts +33 -0
- package/src/commands/context-knowledge-command.ts +43 -0
- package/src/commands/debug-command.ts +13 -0
- package/src/commands/drill-command.ts +34 -0
- package/src/commands/exit-command.ts +32 -0
- package/src/commands/explore-command.ts +129 -0
- package/src/commands/freesail-command.ts +95 -0
- package/src/commands/help-command.ts +8 -0
- package/src/commands/index.ts +69 -0
- package/src/commands/init-command.ts +131 -0
- package/src/commands/knows-command.ts +68 -0
- package/src/commands/learn-command.ts +44 -0
- package/src/commands/navigate-command.ts +18 -0
- package/src/commands/path-command.ts +83 -0
- package/src/commands/plan-clear-command.ts +14 -0
- package/src/commands/plan-command.ts +46 -0
- package/src/commands/plan-edit-command.ts +9 -0
- package/src/commands/plan-load-command.ts +18 -0
- package/src/commands/plan-reload-command.ts +28 -0
- package/src/commands/plan-save-command.ts +25 -0
- package/src/commands/research-command.ts +45 -0
- package/src/commands/start-command.ts +13 -0
- package/src/commands/status-command.tsx +23 -0
- package/src/commands/test-command.ts +84 -0
- package/src/components/ActivityPane.tsx +80 -0
- package/src/components/AddKnowledge.tsx +169 -0
- package/src/components/AddRule.tsx +174 -0
- package/src/components/App.tsx +377 -0
- package/src/components/Autocomplete.tsx +63 -0
- package/src/components/InputPane.tsx +259 -0
- package/src/components/InputReadline.tsx +704 -0
- package/src/components/LogPane.tsx +187 -0
- package/src/components/PlanEditor.tsx +150 -0
- package/src/components/PlanPane.tsx +71 -0
- package/src/components/SessionTimer.tsx +35 -0
- package/src/components/StateTransitionPane.tsx +149 -0
- package/src/components/StatusPane.tsx +62 -0
- package/src/components/TaskPane.tsx +119 -0
- package/src/components/Welcome.tsx +83 -0
- package/src/components/WelcomeChecklist.tsx +118 -0
- package/src/components/WelcomeCommands.tsx +102 -0
- package/src/components/autocomplete-store.ts +35 -0
- package/src/components/parse-keypress.ts +170 -0
- package/src/config.ts +491 -0
- package/src/execution-controller.ts +109 -0
- package/src/experience-tracker.ts +350 -0
- package/src/explorbot.ts +405 -0
- package/src/explorer.ts +760 -0
- package/src/index.tsx +62 -0
- package/src/knowledge-tracker.ts +230 -0
- package/src/observability.ts +150 -0
- package/src/reporter.ts +224 -0
- package/src/state-manager.ts +556 -0
- package/src/stats.ts +53 -0
- package/src/test-plan.ts +432 -0
- package/src/utils/aria.ts +629 -0
- package/src/utils/cli-name.ts +13 -0
- package/src/utils/code-extractor.ts +22 -0
- package/src/utils/context-formatter.ts +239 -0
- package/src/utils/error-page.ts +23 -0
- package/src/utils/expandable.ts +38 -0
- package/src/utils/hooks-runner.ts +79 -0
- package/src/utils/html-diff.ts +918 -0
- package/src/utils/html.ts +1316 -0
- package/src/utils/logger.ts +534 -0
- package/src/utils/loop.ts +176 -0
- package/src/utils/markdown-parser.ts +127 -0
- package/src/utils/markdown-query.ts +466 -0
- package/src/utils/markdown-terminal.ts +43 -0
- package/src/utils/research-parser.ts +11 -0
- package/src/utils/retry.ts +73 -0
- package/src/utils/rules-loader.ts +118 -0
- package/src/utils/strings.ts +13 -0
- package/src/utils/test-plan-markdown.ts +332 -0
- package/src/utils/throttle.ts +18 -0
- package/src/utils/unique-names.ts +14 -0
- package/src/utils/url-matcher.ts +45 -0
- package/src/utils/web-element.ts +147 -0
- package/src/utils/xpath.ts +129 -0
- package/dist/bin/explorbot-cli.js.map +0 -1
- package/dist/boat/api-tester/bin/apibot-cli.js.map +0 -1
- package/dist/boat/api-tester/example/apibot.config.js +0 -31
- package/dist/boat/api-tester/example/apibot.config.js.map +0 -1
- package/dist/boat/api-tester/src/ai/chief/styles.js.map +0 -1
- package/dist/boat/api-tester/src/ai/chief.js.map +0 -1
- package/dist/boat/api-tester/src/ai/curler-tools.js.map +0 -1
- package/dist/boat/api-tester/src/ai/curler.js.map +0 -1
- package/dist/boat/api-tester/src/api-client.js.map +0 -1
- package/dist/boat/api-tester/src/apibot.js.map +0 -1
- package/dist/boat/api-tester/src/cli.js.map +0 -1
- package/dist/boat/api-tester/src/config.js.map +0 -1
- package/dist/prompts/audit-rules.md +0 -124
- package/dist/src/action-result.js.map +0 -1
- package/dist/src/action.js.map +0 -1
- package/dist/src/activity.js.map +0 -1
- package/dist/src/ai/agent.js.map +0 -1
- package/dist/src/ai/bosun.js.map +0 -1
- package/dist/src/ai/captain/idle-mode.js.map +0 -1
- package/dist/src/ai/captain/mixin.js.map +0 -1
- package/dist/src/ai/captain/test-mode.js.map +0 -1
- package/dist/src/ai/captain/web-mode.js.map +0 -1
- package/dist/src/ai/captain.js.map +0 -1
- package/dist/src/ai/conversation.js.map +0 -1
- package/dist/src/ai/experience-compactor.js.map +0 -1
- package/dist/src/ai/fisherman-tools.js.map +0 -1
- package/dist/src/ai/fisherman.js.map +0 -1
- package/dist/src/ai/historian.js.map +0 -1
- package/dist/src/ai/navigator.js.map +0 -1
- package/dist/src/ai/pilot.js.map +0 -1
- package/dist/src/ai/planner/session-dedup.js.map +0 -1
- package/dist/src/ai/planner/styles.js.map +0 -1
- package/dist/src/ai/planner/subpages.js.map +0 -1
- package/dist/src/ai/planner.js.map +0 -1
- package/dist/src/ai/provider.js.map +0 -1
- package/dist/src/ai/quartermaster.js.map +0 -1
- package/dist/src/ai/researcher/cache.js.map +0 -1
- package/dist/src/ai/researcher/coordinates.js.map +0 -1
- package/dist/src/ai/researcher/deep-analysis.js.map +0 -1
- package/dist/src/ai/researcher/fingerprint-worker.js.map +0 -1
- package/dist/src/ai/researcher/focus.js.map +0 -1
- package/dist/src/ai/researcher/locators.js.map +0 -1
- package/dist/src/ai/researcher/mixin.js.map +0 -1
- package/dist/src/ai/researcher/parser.js.map +0 -1
- package/dist/src/ai/researcher/research-result.js.map +0 -1
- package/dist/src/ai/researcher.js.map +0 -1
- package/dist/src/ai/rules.js.map +0 -1
- package/dist/src/ai/task-agent.js.map +0 -1
- package/dist/src/ai/tester.js.map +0 -1
- package/dist/src/ai/tools.js.map +0 -1
- package/dist/src/api/api-client.js.map +0 -1
- package/dist/src/api/request-result.js.map +0 -1
- package/dist/src/api/request-store.js.map +0 -1
- package/dist/src/api/spec-reader.js.map +0 -1
- package/dist/src/api/xhr-capture.js.map +0 -1
- package/dist/src/browser-server.js.map +0 -1
- package/dist/src/command-handler.js.map +0 -1
- package/dist/src/commands/add-rule-command.js.map +0 -1
- package/dist/src/commands/base-command.js.map +0 -1
- package/dist/src/commands/clean-command.js.map +0 -1
- package/dist/src/commands/context-aria-command.js.map +0 -1
- package/dist/src/commands/context-command.js.map +0 -1
- package/dist/src/commands/context-data-command.js.map +0 -1
- package/dist/src/commands/context-experience-command.js.map +0 -1
- package/dist/src/commands/context-html-command.js.map +0 -1
- package/dist/src/commands/context-knowledge-command.js.map +0 -1
- package/dist/src/commands/debug-command.js.map +0 -1
- package/dist/src/commands/drill-command.js.map +0 -1
- package/dist/src/commands/exit-command.js.map +0 -1
- package/dist/src/commands/explore-command.js.map +0 -1
- package/dist/src/commands/freesail-command.js.map +0 -1
- package/dist/src/commands/help-command.js.map +0 -1
- package/dist/src/commands/index.js.map +0 -1
- package/dist/src/commands/knows-command.js.map +0 -1
- package/dist/src/commands/learn-command.js.map +0 -1
- package/dist/src/commands/navigate-command.js.map +0 -1
- package/dist/src/commands/path-command.js.map +0 -1
- package/dist/src/commands/plan-clear-command.js.map +0 -1
- package/dist/src/commands/plan-command.js.map +0 -1
- package/dist/src/commands/plan-edit-command.js.map +0 -1
- package/dist/src/commands/plan-load-command.js.map +0 -1
- package/dist/src/commands/plan-reload-command.js.map +0 -1
- package/dist/src/commands/plan-save-command.js.map +0 -1
- package/dist/src/commands/research-command.js.map +0 -1
- package/dist/src/commands/start-command.js.map +0 -1
- package/dist/src/commands/status-command.js.map +0 -1
- package/dist/src/commands/test-command.js.map +0 -1
- package/dist/src/components/ActivityPane.js.map +0 -1
- package/dist/src/components/AddKnowledge.js.map +0 -1
- package/dist/src/components/AddRule.js.map +0 -1
- package/dist/src/components/App.js.map +0 -1
- package/dist/src/components/Autocomplete.js.map +0 -1
- package/dist/src/components/InputPane.js.map +0 -1
- package/dist/src/components/InputReadline.js.map +0 -1
- package/dist/src/components/LogPane.js.map +0 -1
- package/dist/src/components/PlanEditor.js.map +0 -1
- package/dist/src/components/PlanPane.js.map +0 -1
- package/dist/src/components/SessionTimer.js.map +0 -1
- package/dist/src/components/StateTransitionPane.js.map +0 -1
- package/dist/src/components/StatusPane.js.map +0 -1
- package/dist/src/components/TaskPane.js.map +0 -1
- package/dist/src/components/Welcome.js.map +0 -1
- package/dist/src/components/WelcomeChecklist.js.map +0 -1
- package/dist/src/components/WelcomeCommands.js.map +0 -1
- package/dist/src/components/autocomplete-store.js.map +0 -1
- package/dist/src/components/parse-keypress.js.map +0 -1
- package/dist/src/config.js.map +0 -1
- package/dist/src/execution-controller.js.map +0 -1
- package/dist/src/experience-tracker.js.map +0 -1
- package/dist/src/explorbot.js.map +0 -1
- package/dist/src/explorer.js.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/knowledge-tracker.js.map +0 -1
- package/dist/src/observability.js.map +0 -1
- package/dist/src/reporter.js.map +0 -1
- package/dist/src/state-manager.js.map +0 -1
- package/dist/src/stats.js.map +0 -1
- package/dist/src/test-plan.js.map +0 -1
- package/dist/src/utils/aria.js.map +0 -1
- package/dist/src/utils/code-extractor.js.map +0 -1
- package/dist/src/utils/context-formatter.js.map +0 -1
- package/dist/src/utils/error-page.js.map +0 -1
- package/dist/src/utils/expandable.js.map +0 -1
- package/dist/src/utils/hooks-runner.js.map +0 -1
- package/dist/src/utils/html-diff.js.map +0 -1
- package/dist/src/utils/html.js.map +0 -1
- package/dist/src/utils/logger.js.map +0 -1
- package/dist/src/utils/loop.js.map +0 -1
- package/dist/src/utils/markdown-parser.js.map +0 -1
- package/dist/src/utils/markdown-query.js.map +0 -1
- package/dist/src/utils/markdown-terminal.js.map +0 -1
- package/dist/src/utils/research-parser.js.map +0 -1
- package/dist/src/utils/retry.js.map +0 -1
- package/dist/src/utils/rules-loader.js.map +0 -1
- package/dist/src/utils/strings.js.map +0 -1
- package/dist/src/utils/test-plan-markdown.js.map +0 -1
- package/dist/src/utils/throttle.js.map +0 -1
- package/dist/src/utils/unique-names.js.map +0 -1
- package/dist/src/utils/url-matcher.js.map +0 -1
- package/dist/src/utils/web-element.js.map +0 -1
- package/dist/src/utils/xpath.js.map +0 -1
- package/prompts/audit-rules.md +0 -124
|
@@ -15,13 +15,13 @@ export class ContextCommand extends BaseCommand {
|
|
|
15
15
|
throw new Error('No active page to show context for');
|
|
16
16
|
}
|
|
17
17
|
const isVisual = args.includes('--visual') || args.includes('--screenshot');
|
|
18
|
-
await explorer.annotateElements();
|
|
18
|
+
const { ariaSnapshot } = await explorer.annotateElements();
|
|
19
19
|
if (isVisual) {
|
|
20
20
|
const cachedResearch = Researcher.getCachedResearch(state);
|
|
21
21
|
const containers = cachedResearch ? extractValidContainers(cachedResearch) : [];
|
|
22
22
|
await explorer.visuallyAnnotateElements({ containers });
|
|
23
23
|
}
|
|
24
|
-
const actionResult = await explorer.createAction().capturePageState({ includeScreenshot: isVisual });
|
|
24
|
+
const actionResult = await explorer.createAction().capturePageState({ includeScreenshot: isVisual, ariaSnapshot });
|
|
25
25
|
const experienceTracker = explorer.getStateManager().getExperienceTracker();
|
|
26
26
|
const knowledgeTracker = this.explorBot.getKnowledgeTracker();
|
|
27
27
|
let mode = 'compact';
|
|
@@ -54,4 +54,3 @@ export class ContextCommand extends BaseCommand {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
//# sourceMappingURL=context-command.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import figureSet from 'figures';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { getStyles } from '../ai/planner/styles.js';
|
|
4
|
+
import { getCliName } from "../utils/cli-name.js";
|
|
4
5
|
import { jsonToTable } from '../utils/markdown-parser.js';
|
|
5
6
|
import { tag } from '../utils/logger.js';
|
|
6
7
|
import { BaseCommand } from './base-command.js';
|
|
@@ -71,7 +72,7 @@ export class ExploreCommand extends BaseCommand {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
printResults(savedPath) {
|
|
74
|
-
const allTests = this.completedPlans.flatMap((plan) => plan.tests.filter((t) => t.
|
|
75
|
+
const allTests = this.completedPlans.flatMap((plan) => plan.tests.filter((t) => t.startTime != null).map((test) => ({ test, planTitle: plan.title })));
|
|
75
76
|
if (allTests.length === 0)
|
|
76
77
|
return;
|
|
77
78
|
const hasSubPages = this.completedPlans.length > 1;
|
|
@@ -103,7 +104,7 @@ export class ExploreCommand extends BaseCommand {
|
|
|
103
104
|
tag('info').log(`${figureSet.tick} ${allTests.length} tests completed`);
|
|
104
105
|
if (savedPath) {
|
|
105
106
|
const relativePath = path.relative(process.cwd(), savedPath);
|
|
106
|
-
tag('info').log(`Re-run tests:
|
|
107
|
+
tag('info').log(`Re-run tests: ${getCliName()} test ${relativePath} <index>`);
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
isLimitReached() {
|
|
@@ -121,4 +122,3 @@ export class ExploreCommand extends BaseCommand {
|
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
|
-
//# sourceMappingURL=explore-command.js.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, statSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, extname, join, resolve } from 'node:path';
|
|
3
|
+
import { log, tag } from '../utils/logger.js';
|
|
4
|
+
import dedent from 'dedent';
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import { getCliName } from "../utils/cli-name.js";
|
|
7
|
+
const DEFAULT_CONFIG_TEMPLATE = `import { createOpenRouter } from '@openrouter/ai-sdk-provider';
|
|
8
|
+
// import { '<your provider here>' } from '<your provider package here>';
|
|
9
|
+
|
|
10
|
+
// Vercel AI SDK is used to connect to AI providers.
|
|
11
|
+
// Bring your own provider or use OpenRouter (one API key, many providers).
|
|
12
|
+
// https://github.com/testomatio/explorbot/blob/main/docs/providers.md
|
|
13
|
+
const openrouter = createOpenRouter({
|
|
14
|
+
apiKey: process.env.OPENROUTER_API_KEY,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const config = {
|
|
18
|
+
web: {
|
|
19
|
+
// use application host without path prefix (e.g., http://localhost:3000)
|
|
20
|
+
url: 'http://<your-app-host-here>',
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
ai: {
|
|
24
|
+
// fast model with tool calling capabilities
|
|
25
|
+
model: openrouter('<your base model here>'),
|
|
26
|
+
// vision model for screenshot analysis
|
|
27
|
+
visionModel: openrouter('<your vision model here>'),
|
|
28
|
+
// agentic model for decision making
|
|
29
|
+
agenticModel: openrouter('<your agentic model here>'),
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default config;
|
|
34
|
+
`;
|
|
35
|
+
const DEFAULT_ENV_TEMPLATE = dedent `
|
|
36
|
+
# AI provider API keys
|
|
37
|
+
OPENROUTER_API_KEY=
|
|
38
|
+
|
|
39
|
+
# OPENAI_API_KEY=
|
|
40
|
+
# ANTHROPIC_API_KEY=
|
|
41
|
+
# GROQ_API_KEY=
|
|
42
|
+
|
|
43
|
+
# Langfuse Tracing
|
|
44
|
+
LANGFUSE_SECRET_KEY=
|
|
45
|
+
LANGFUSE_PUBLIC_KEY=
|
|
46
|
+
LANGFUSE_BASE_URL=
|
|
47
|
+
|
|
48
|
+
# Testomat.io API key to publish run results
|
|
49
|
+
TESTOMATIO=
|
|
50
|
+
`;
|
|
51
|
+
export function runInitCommand(options) {
|
|
52
|
+
const configPath = options.configPath ?? './explorbot.config.js';
|
|
53
|
+
const force = options.force ?? false;
|
|
54
|
+
const customPath = options.path;
|
|
55
|
+
const originalCwd = process.cwd();
|
|
56
|
+
if (customPath) {
|
|
57
|
+
const dir = resolve(customPath);
|
|
58
|
+
if (!existsSync(dir)) {
|
|
59
|
+
mkdirSync(dir, { recursive: true });
|
|
60
|
+
log(`Created directory: ${dir}`);
|
|
61
|
+
}
|
|
62
|
+
process.chdir(dir);
|
|
63
|
+
log(`Working in directory: ${dir}`);
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
let outPath = resolve(configPath);
|
|
67
|
+
if (existsSync(outPath) && statSync(outPath).isDirectory()) {
|
|
68
|
+
outPath = join(outPath, 'explorbot.config.js');
|
|
69
|
+
}
|
|
70
|
+
else if (!extname(outPath)) {
|
|
71
|
+
outPath = join(outPath, 'explorbot.config.js');
|
|
72
|
+
}
|
|
73
|
+
const dir = dirname(outPath);
|
|
74
|
+
if (!existsSync(dir)) {
|
|
75
|
+
mkdirSync(dir, { recursive: true });
|
|
76
|
+
log(`Created directory: ${dir}`);
|
|
77
|
+
}
|
|
78
|
+
if (existsSync(outPath) && !force) {
|
|
79
|
+
log(`Config file already exists: ${outPath}`);
|
|
80
|
+
log('Use --force to overwrite existing file');
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
writeFileSync(outPath, DEFAULT_CONFIG_TEMPLATE, 'utf8');
|
|
84
|
+
log(`Created config file: ${outPath}`);
|
|
85
|
+
const envPath = resolve(process.cwd(), '.env');
|
|
86
|
+
if (!existsSync(envPath)) {
|
|
87
|
+
writeFileSync(envPath, `${DEFAULT_ENV_TEMPLATE}\n`, 'utf8');
|
|
88
|
+
log(`Created env file: ${envPath}`);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
log(`Env file already exists: ${envPath}`);
|
|
92
|
+
}
|
|
93
|
+
log('');
|
|
94
|
+
log('Next steps:');
|
|
95
|
+
log('1. Configure AI provider in .env');
|
|
96
|
+
log('2. Set AI models config file');
|
|
97
|
+
log('3. Set web application URL in the config file');
|
|
98
|
+
log('4. Add initial knowledge (how to authorize to the application, etc.)');
|
|
99
|
+
tag('substep').log(chalk.yellow(`${getCliName()} learn * 'to aurhorize use these credentials: admin@example.com / secret123'`));
|
|
100
|
+
tag('substep').log('You can use ${env.LOGIN} and ${env.PASSWORD} to reference environment variables.');
|
|
101
|
+
log('5. Launch application on a relative URL');
|
|
102
|
+
tag('substep').log(chalk.yellow(`${getCliName()} start /dashboard`));
|
|
103
|
+
if (!existsSync('./output')) {
|
|
104
|
+
mkdirSync('./output', { recursive: true });
|
|
105
|
+
log('Created directory: ./output');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
log('Failed to create config file:', error);
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
finally {
|
|
113
|
+
if (process.cwd() !== originalCwd) {
|
|
114
|
+
process.chdir(originalCwd);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -8,17 +8,22 @@ export class PlanCommand extends BaseCommand {
|
|
|
8
8
|
{ flags: '--fresh', description: 'Regenerate plan from scratch' },
|
|
9
9
|
{ flags: '--clear', description: 'Clear plan before regenerating' },
|
|
10
10
|
{ flags: '--style <name>', description: 'Planning style (normal, curious, psycho, performer)' },
|
|
11
|
+
{ flags: '--focus <feature>', description: 'Focus area for test planning' },
|
|
11
12
|
];
|
|
12
13
|
async execute(args) {
|
|
13
14
|
const clear = args.includes('--clear');
|
|
14
15
|
const fresh = args.includes('--fresh') || clear;
|
|
15
16
|
const styleMatch = args.match(/--style\s+(\S+)/);
|
|
16
17
|
const style = styleMatch?.[1];
|
|
17
|
-
const
|
|
18
|
+
const focusMatch = args.match(/--focus\s+("[^"]+"|'[^']+'|\S+)/);
|
|
19
|
+
const focusFromFlag = focusMatch?.[1]?.replace(/^["']|["']$/g, '');
|
|
20
|
+
const focusFromText = args
|
|
18
21
|
.replace('--clear', '')
|
|
19
22
|
.replace('--fresh', '')
|
|
20
23
|
.replace(/--style\s+\S+/, '')
|
|
24
|
+
.replace(/--focus\s+("[^"]+"|'[^']+'|\S+)/, '')
|
|
21
25
|
.trim();
|
|
26
|
+
const focus = focusFromFlag || focusFromText;
|
|
22
27
|
if (clear) {
|
|
23
28
|
this.explorBot.clearPlan();
|
|
24
29
|
tag('success').log('Plan cleared');
|
|
@@ -33,4 +38,3 @@ export class PlanCommand extends BaseCommand {
|
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
|
-
//# sourceMappingURL=plan-command.js.map
|
|
@@ -310,4 +310,3 @@ export function App({ explorBot, initialShowInput = false, exitOnEmptyInput = fa
|
|
|
310
310
|
React.createElement(Autocomplete, null)),
|
|
311
311
|
React.createElement(PlanPane, { completedPlans: completedPlans, activePlan: activePlanInfo })));
|
|
312
312
|
}
|
|
313
|
-
//# sourceMappingURL=App.js.map
|
|
@@ -120,4 +120,3 @@ const LogPane = React.memo(({ verboseMode }) => {
|
|
|
120
120
|
return React.createElement(Box, { flexDirection: "column" }, visibleLogs.map((log, index) => renderLogEntry(log, index)).filter(Boolean));
|
|
121
121
|
});
|
|
122
122
|
export default LogPane;
|
|
123
|
-
//# sourceMappingURL=LogPane.js.map
|
|
@@ -34,4 +34,3 @@ export const StatusPane = ({ onComplete }) => {
|
|
|
34
34
|
React.createElement(Row, { label: "Time", value: Stats.getElapsedTime() }),
|
|
35
35
|
tokenRows.map(([model, tokens]) => (React.createElement(Row, { key: model, label: model, value: `${Stats.humanizeTokens(tokens.total)} tokens` })))))));
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=StatusPane.js.map
|
package/dist/src/config.js
CHANGED
package/dist/src/explorbot.js
CHANGED
|
@@ -84,7 +84,7 @@ export class ExplorBot {
|
|
|
84
84
|
await this.explorer.openFreshTab();
|
|
85
85
|
}
|
|
86
86
|
getCurrentState() {
|
|
87
|
-
return this.explorer
|
|
87
|
+
return this.explorer?.getStateManager().getCurrentState() ?? null;
|
|
88
88
|
}
|
|
89
89
|
getExplorer() {
|
|
90
90
|
return this.explorer;
|
|
@@ -345,4 +345,3 @@ export class ExplorBot {
|
|
|
345
345
|
this.currentPlan = plan;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
//# sourceMappingURL=explorbot.js.map
|