explorbot 0.1.31 → 0.2.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.
Files changed (288) hide show
  1. package/README.md +14 -14
  2. package/bin/explorbot-cli.ts +4 -3
  3. package/boat/doc-collector/src/ai/documentarian.ts +22 -27
  4. package/boat/doc-collector/src/ai/tools.ts +67 -10
  5. package/boat/doc-collector/src/docbot.ts +28 -7
  6. package/boat/doc-collector/src/docs-renderer.ts +19 -24
  7. package/boat/doc-collector/src/screenshots.ts +33 -1
  8. package/boat/doc-collector/src/state-diagram.ts +281 -0
  9. package/dist/bin/explorbot-cli.js +3 -3
  10. package/dist/boat/doc-collector/src/ai/documentarian.js +16 -6
  11. package/dist/boat/doc-collector/src/ai/tools.js +47 -10
  12. package/dist/boat/doc-collector/src/docbot.js +25 -6
  13. package/dist/boat/doc-collector/src/docs-renderer.js +18 -3
  14. package/dist/boat/doc-collector/src/screenshots.js +29 -0
  15. package/dist/boat/doc-collector/src/state-diagram.js +200 -0
  16. package/dist/package.json +8 -6
  17. package/dist/src/action-result.d.ts +131 -0
  18. package/dist/src/action-result.js +82 -159
  19. package/dist/src/action.d.ts +43 -0
  20. package/dist/src/action.js +18 -106
  21. package/dist/src/activity.d.ts +26 -0
  22. package/dist/src/ai/agent.d.ts +3 -0
  23. package/dist/src/ai/captain/file-tools.d.ts +28 -0
  24. package/dist/src/ai/captain/idle-mode.d.ts +11 -0
  25. package/dist/src/ai/captain/mixin.d.ts +10 -0
  26. package/dist/src/ai/captain/test-mode.d.ts +13 -0
  27. package/dist/src/ai/captain/web-mode.d.ts +13 -0
  28. package/dist/src/ai/captain/web-mode.js +0 -7
  29. package/dist/src/ai/captain.d.ts +141 -0
  30. package/dist/src/ai/captain.js +4 -19
  31. package/dist/src/ai/conversation.d.ts +28 -0
  32. package/dist/src/ai/conversation.js +9 -28
  33. package/dist/src/ai/driller.d.ts +157 -0
  34. package/dist/src/ai/driller.js +3 -12
  35. package/dist/src/ai/experience-compactor.d.ts +53 -0
  36. package/dist/src/ai/experience-compactor.js +16 -33
  37. package/dist/src/ai/fisherman-tools.d.ts +90 -0
  38. package/dist/src/ai/fisherman-tools.js +1 -1
  39. package/dist/src/ai/fisherman.d.ts +29 -0
  40. package/dist/src/ai/fisherman.js +0 -3
  41. package/dist/src/ai/historian/codeceptjs.d.ts +17 -0
  42. package/dist/src/ai/historian/codeceptjs.js +3 -2
  43. package/dist/src/ai/historian/experience.d.ts +40 -0
  44. package/dist/src/ai/historian/mixin.d.ts +2 -0
  45. package/dist/src/ai/historian/playwright.d.ts +22 -0
  46. package/dist/src/ai/historian/playwright.js +3 -2
  47. package/dist/src/ai/historian/screencast.d.ts +32 -0
  48. package/dist/src/ai/historian/utils.d.ts +3 -0
  49. package/dist/src/ai/historian/utils.js +0 -1
  50. package/dist/src/ai/historian.d.ts +109 -0
  51. package/dist/src/ai/historian.js +1 -5
  52. package/dist/src/ai/navigator.d.ts +54 -0
  53. package/dist/src/ai/navigator.js +11 -46
  54. package/dist/src/ai/pilot.d.ts +81 -0
  55. package/dist/src/ai/pilot.js +6 -17
  56. package/dist/src/ai/planner/session-dedup.d.ts +12 -0
  57. package/dist/src/ai/planner/styles.d.ts +6 -0
  58. package/dist/src/ai/planner/subpages.d.ts +35 -0
  59. package/dist/src/ai/planner.d.ts +79 -0
  60. package/dist/src/ai/planner.js +49 -37
  61. package/dist/src/ai/provider.d.ts +53 -0
  62. package/dist/src/ai/provider.js +78 -130
  63. package/dist/src/ai/quartermaster.d.ts +56 -0
  64. package/dist/src/ai/quartermaster.js +4 -10
  65. package/dist/src/ai/rerunner.d.ts +48 -0
  66. package/dist/src/ai/rerunner.js +14 -22
  67. package/dist/src/ai/researcher/cache.d.ts +6 -0
  68. package/dist/src/ai/researcher/cache.js +11 -18
  69. package/dist/src/ai/researcher/coordinates.d.ts +56 -0
  70. package/dist/src/ai/researcher/deep-analysis.d.ts +74 -0
  71. package/dist/src/ai/researcher/deep-analysis.js +3 -6
  72. package/dist/src/ai/researcher/fingerprint-worker.d.ts +1 -0
  73. package/dist/src/ai/researcher/focus.d.ts +8 -0
  74. package/dist/src/ai/researcher/locators.d.ts +36 -0
  75. package/dist/src/ai/researcher/mixin.d.ts +2 -0
  76. package/dist/src/ai/researcher/parser.d.ts +35 -0
  77. package/dist/src/ai/researcher/parser.js +1 -1
  78. package/dist/src/ai/researcher/research-result.d.ts +15 -0
  79. package/dist/src/ai/researcher/research-result.js +0 -19
  80. package/dist/src/ai/researcher/sections.d.ts +19 -0
  81. package/dist/src/ai/researcher/sections.js +5 -1
  82. package/dist/src/ai/researcher.js +12 -53
  83. package/dist/src/ai/rules.d.ts +16 -0
  84. package/dist/src/ai/rules.js +22 -15
  85. package/dist/src/ai/session-analyst.d.ts +11 -0
  86. package/dist/src/ai/session-analyst.js +8 -5
  87. package/dist/src/ai/task-agent.d.ts +28 -0
  88. package/dist/src/ai/task-agent.js +2 -27
  89. package/dist/src/ai/tester.d.ts +101 -0
  90. package/dist/src/ai/tester.js +10 -61
  91. package/dist/src/ai/tools.d.ts +52 -0
  92. package/dist/src/ai/tools.js +119 -101
  93. package/dist/src/api/api-client.d.ts +17 -0
  94. package/dist/src/api/request-result.d.ts +44 -0
  95. package/dist/src/api/request-store.d.ts +29 -0
  96. package/dist/src/api/spec-reader.d.ts +5 -0
  97. package/dist/src/api/xhr-capture.d.ts +10 -0
  98. package/dist/src/browser-server.d.ts +10 -0
  99. package/dist/src/command-handler.d.ts +68 -0
  100. package/dist/src/commands/add-rule-command.d.ts +11 -0
  101. package/dist/src/commands/base-command.d.ts +26 -0
  102. package/dist/src/commands/clean-command.d.ts +12 -0
  103. package/dist/src/commands/compact-command.d.ts +20 -0
  104. package/dist/src/commands/compact-command.js +6 -6
  105. package/dist/src/commands/context-aria-command.d.ts +6 -0
  106. package/dist/src/commands/context-command.d.ts +11 -0
  107. package/dist/src/commands/context-command.js +1 -1
  108. package/dist/src/commands/context-data-command.d.ts +6 -0
  109. package/dist/src/commands/context-experience-command.d.ts +6 -0
  110. package/dist/src/commands/context-html-command.d.ts +6 -0
  111. package/dist/src/commands/context-knowledge-command.d.ts +6 -0
  112. package/dist/src/commands/context-knowledge-command.js +1 -1
  113. package/dist/src/commands/debug-command.d.ts +6 -0
  114. package/dist/src/commands/drill-command.d.ts +10 -0
  115. package/dist/src/commands/exit-command.d.ts +7 -0
  116. package/dist/src/commands/experience-command.d.ts +15 -0
  117. package/dist/src/commands/experience-command.js +1 -1
  118. package/dist/src/commands/explore-command.d.ts +51 -0
  119. package/dist/src/commands/freesail-command.d.ts +12 -0
  120. package/dist/src/commands/help-command.d.ts +6 -0
  121. package/dist/src/commands/index.d.ts +4 -0
  122. package/dist/src/commands/init-command.d.ts +7 -0
  123. package/dist/src/commands/knows-command.d.ts +10 -0
  124. package/dist/src/commands/knows-command.js +1 -1
  125. package/dist/src/commands/learn-command.d.ts +7 -0
  126. package/dist/src/commands/learn-command.js +3 -1
  127. package/dist/src/commands/navigate-command.d.ts +7 -0
  128. package/dist/src/commands/path-command.d.ts +10 -0
  129. package/dist/src/commands/plan-clear-command.d.ts +7 -0
  130. package/dist/src/commands/plan-command.d.ts +14 -0
  131. package/dist/src/commands/plan-edit-command.d.ts +7 -0
  132. package/dist/src/commands/plan-load-command.d.ts +7 -0
  133. package/dist/src/commands/plan-reload-command.d.ts +7 -0
  134. package/dist/src/commands/plan-save-command.d.ts +7 -0
  135. package/dist/src/commands/plans-command.d.ts +21 -0
  136. package/dist/src/commands/rerun-command.d.ts +7 -0
  137. package/dist/src/commands/research-command.d.ts +11 -0
  138. package/dist/src/commands/runs-command.d.ts +7 -0
  139. package/dist/src/commands/start-command.d.ts +7 -0
  140. package/dist/src/commands/status-command.d.ts +6 -0
  141. package/dist/src/commands/test-command.d.ts +11 -0
  142. package/dist/src/components/ActivityPane.d.ts +6 -0
  143. package/dist/src/components/AddKnowledge.d.ts +10 -0
  144. package/dist/src/components/AddKnowledge.js +3 -7
  145. package/dist/src/components/AddRule.d.ts +9 -0
  146. package/dist/src/components/App.d.ts +9 -0
  147. package/dist/src/components/App.js +2 -2
  148. package/dist/src/components/Autocomplete.d.ts +3 -0
  149. package/dist/src/components/InputPane.d.ts +13 -0
  150. package/dist/src/components/InputReadline.d.ts +17 -0
  151. package/dist/src/components/LogPane.d.ts +6 -0
  152. package/dist/src/components/PlanEditor.d.ts +9 -0
  153. package/dist/src/components/PlanPane.d.ts +13 -0
  154. package/dist/src/components/SessionTimer.d.ts +6 -0
  155. package/dist/src/components/StateTransitionPane.d.ts +8 -0
  156. package/dist/src/components/StatusPane.d.ts +4 -0
  157. package/dist/src/components/TaskPane.d.ts +9 -0
  158. package/dist/src/components/Welcome.d.ts +3 -0
  159. package/dist/src/components/WelcomeChecklist.d.ts +9 -0
  160. package/dist/src/components/WelcomeCommands.d.ts +6 -0
  161. package/dist/src/components/autocomplete-store.d.ts +10 -0
  162. package/dist/src/components/parse-keypress.d.ts +12 -0
  163. package/dist/src/config.d.ts +253 -0
  164. package/dist/src/config.js +12 -0
  165. package/dist/src/execution-controller.d.ts +25 -0
  166. package/dist/src/experience-tracker.d.ts +112 -0
  167. package/dist/src/experience-tracker.js +83 -155
  168. package/dist/src/explorbot.d.ts +106 -0
  169. package/dist/src/explorbot.js +17 -51
  170. package/dist/src/explorer.d.ts +129 -0
  171. package/dist/src/explorer.js +31 -77
  172. package/dist/src/index.d.ts +6 -0
  173. package/dist/src/index.js +2 -55
  174. package/dist/src/knowledge-tracker.d.ts +33 -0
  175. package/dist/src/knowledge-tracker.js +47 -47
  176. package/dist/src/observability.d.ts +13 -0
  177. package/dist/src/observability.js +2 -1
  178. package/dist/src/playwright-recorder.d.ts +31 -0
  179. package/dist/src/reporter.d.ts +34 -0
  180. package/dist/src/state-manager.d.ts +160 -0
  181. package/dist/src/state-manager.js +10 -136
  182. package/dist/src/stats.d.ts +24 -0
  183. package/dist/src/suite.d.ts +24 -0
  184. package/dist/src/test-plan.d.ts +166 -0
  185. package/dist/src/utils/aria.d.ts +25 -0
  186. package/dist/src/utils/aria.js +4 -1
  187. package/dist/src/utils/browser-errors.d.ts +8 -0
  188. package/dist/src/utils/cache.d.ts +15 -0
  189. package/dist/src/utils/cache.js +34 -0
  190. package/dist/src/utils/cli-name.d.ts +1 -0
  191. package/dist/src/utils/code-extractor.d.ts +1 -0
  192. package/dist/src/utils/context-formatter.d.ts +31 -0
  193. package/dist/src/utils/context-formatter.js +15 -27
  194. package/dist/src/utils/error-page.d.ts +12 -0
  195. package/dist/src/utils/expandable.d.ts +4 -0
  196. package/dist/src/utils/hooks-runner.d.ts +15 -0
  197. package/dist/src/utils/html-diff.d.ts +19 -0
  198. package/dist/src/utils/html.d.ts +129 -0
  199. package/dist/src/utils/html.js +71 -0
  200. package/dist/src/utils/log-filters.d.ts +6 -0
  201. package/dist/src/utils/logger.d.ts +35 -0
  202. package/dist/src/utils/loop.d.ts +35 -0
  203. package/dist/src/utils/markdown-files.d.ts +10 -0
  204. package/dist/src/utils/markdown-files.js +21 -0
  205. package/dist/src/utils/markdown-parser.d.ts +17 -0
  206. package/dist/src/utils/markdown-query.d.ts +46 -0
  207. package/dist/src/utils/markdown-query.js +14 -1
  208. package/dist/src/utils/markdown-terminal.d.ts +1 -0
  209. package/dist/src/utils/next-steps.d.ts +11 -0
  210. package/dist/src/utils/page-readiness.d.ts +7 -0
  211. package/dist/src/utils/page-readiness.js +1 -1
  212. package/dist/src/utils/research-parser.d.ts +1 -0
  213. package/dist/src/utils/retry.d.ts +8 -0
  214. package/dist/src/utils/rules-loader.d.ts +12 -0
  215. package/dist/src/utils/secrets.d.ts +4 -0
  216. package/dist/src/utils/secrets.js +28 -0
  217. package/dist/src/utils/step-analyzer.d.ts +11 -0
  218. package/dist/src/utils/strings.d.ts +5 -0
  219. package/dist/src/utils/strings.js +10 -0
  220. package/dist/src/utils/test-files.d.ts +3 -0
  221. package/dist/src/utils/test-plan-markdown.d.ts +9 -0
  222. package/dist/src/utils/throttle.d.ts +2 -0
  223. package/dist/src/utils/unique-names.d.ts +2 -0
  224. package/dist/src/utils/url-matcher.d.ts +6 -0
  225. package/dist/src/utils/web-element.d.ts +45 -0
  226. package/dist/src/utils/web-element.js +3 -0
  227. package/dist/src/utils/web-sandbox.d.ts +4 -0
  228. package/dist/src/utils/web-sandbox.js +37 -0
  229. package/dist/src/utils/xpath.d.ts +17 -0
  230. package/package.json +8 -6
  231. package/src/action-result.ts +80 -168
  232. package/src/action.ts +16 -123
  233. package/src/ai/captain/web-mode.ts +0 -7
  234. package/src/ai/captain.ts +5 -17
  235. package/src/ai/conversation.ts +9 -32
  236. package/src/ai/driller.ts +3 -16
  237. package/src/ai/experience-compactor.ts +16 -35
  238. package/src/ai/fisherman-tools.ts +1 -1
  239. package/src/ai/fisherman.ts +0 -4
  240. package/src/ai/historian/codeceptjs.ts +4 -2
  241. package/src/ai/historian/playwright.ts +4 -2
  242. package/src/ai/historian/utils.ts +0 -1
  243. package/src/ai/historian.ts +4 -7
  244. package/src/ai/navigator.ts +13 -49
  245. package/src/ai/pilot.ts +6 -16
  246. package/src/ai/planner.ts +56 -44
  247. package/src/ai/provider.ts +86 -139
  248. package/src/ai/quartermaster.ts +34 -41
  249. package/src/ai/rerunner.ts +17 -21
  250. package/src/ai/researcher/cache.ts +10 -16
  251. package/src/ai/researcher/deep-analysis.ts +3 -6
  252. package/src/ai/researcher/parser.ts +1 -1
  253. package/src/ai/researcher/research-result.ts +0 -18
  254. package/src/ai/researcher/sections.ts +5 -1
  255. package/src/ai/researcher.ts +11 -59
  256. package/src/ai/rules.ts +24 -13
  257. package/src/ai/session-analyst.ts +8 -5
  258. package/src/ai/task-agent.ts +3 -30
  259. package/src/ai/tester.ts +12 -73
  260. package/src/ai/tools.ts +119 -106
  261. package/src/commands/compact-command.ts +7 -8
  262. package/src/commands/context-command.ts +1 -1
  263. package/src/commands/context-knowledge-command.ts +1 -1
  264. package/src/commands/experience-command.ts +1 -1
  265. package/src/commands/knows-command.ts +1 -1
  266. package/src/commands/learn-command.ts +3 -1
  267. package/src/components/AddKnowledge.tsx +5 -7
  268. package/src/components/App.tsx +2 -2
  269. package/src/config.ts +12 -0
  270. package/src/experience-tracker.ts +90 -152
  271. package/src/explorbot.ts +17 -51
  272. package/src/explorer.ts +34 -81
  273. package/src/index.ts +9 -0
  274. package/src/knowledge-tracker.ts +49 -50
  275. package/src/observability.ts +2 -1
  276. package/src/state-manager.ts +15 -164
  277. package/src/utils/aria.ts +11 -2
  278. package/src/utils/cache.ts +40 -0
  279. package/src/utils/context-formatter.ts +12 -15
  280. package/src/utils/html.ts +79 -0
  281. package/src/utils/markdown-files.ts +30 -0
  282. package/src/utils/markdown-query.ts +15 -1
  283. package/src/utils/page-readiness.ts +1 -1
  284. package/src/utils/secrets.ts +28 -0
  285. package/src/utils/strings.ts +12 -0
  286. package/src/utils/web-element.ts +4 -0
  287. package/src/utils/web-sandbox.ts +43 -0
  288. package/src/index.tsx +0 -62
@@ -1,8 +1,7 @@
1
1
  import { Box, Text, useInput } from 'ink';
2
2
  import React, { useEffect, useState } from 'react';
3
- import { KnowledgeTracker } from '../knowledge-tracker.js';
4
3
  import InputReadline from './InputReadline.js';
5
- const AddKnowledge = ({ initialUrl = '', onComplete, onCancel }) => {
4
+ const AddKnowledge = ({ initialUrl = '', knowledgeTracker, onComplete, onCancel }) => {
6
5
  const [urlPattern, setUrlPattern] = useState(initialUrl);
7
6
  const [description, setDescription] = useState('');
8
7
  const [activeField, setActiveField] = useState(initialUrl ? 'description' : 'url');
@@ -11,18 +10,16 @@ const AddKnowledge = ({ initialUrl = '', onComplete, onCancel }) => {
11
10
  const isStandalone = !onComplete;
12
11
  useEffect(() => {
13
12
  try {
14
- const knowledgeTracker = new KnowledgeTracker();
15
13
  const urls = knowledgeTracker.getExistingUrls();
16
14
  setSuggestedUrls(urls);
17
15
  }
18
16
  catch (error) {
19
17
  console.error('Failed to load suggestions:', error);
20
18
  }
21
- }, []);
19
+ }, [knowledgeTracker]);
22
20
  useEffect(() => {
23
21
  if (urlPattern.trim()) {
24
22
  try {
25
- const knowledgeTracker = new KnowledgeTracker();
26
23
  const knowledge = knowledgeTracker.getKnowledgeForUrl(urlPattern);
27
24
  setExistingKnowledge(knowledge);
28
25
  }
@@ -34,13 +31,12 @@ const AddKnowledge = ({ initialUrl = '', onComplete, onCancel }) => {
34
31
  else {
35
32
  setExistingKnowledge([]);
36
33
  }
37
- }, [urlPattern]);
34
+ }, [urlPattern, knowledgeTracker]);
38
35
  const handleSave = () => {
39
36
  if (!urlPattern.trim() || !description.trim()) {
40
37
  return;
41
38
  }
42
39
  try {
43
- const knowledgeTracker = new KnowledgeTracker();
44
40
  const result = knowledgeTracker.addKnowledge(urlPattern.trim(), description.trim());
45
41
  const action = result.isNewFile ? 'Created' : 'Updated';
46
42
  console.log(`\nKnowledge ${action} in: ${result.filename}`);
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface AddRuleProps {
3
+ initialAgent?: string;
4
+ initialName?: string;
5
+ onComplete?: () => void;
6
+ onCancel?: () => void;
7
+ }
8
+ declare const AddRule: React.FC<AddRuleProps>;
9
+ export default AddRule;
@@ -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 {};
@@ -111,7 +111,7 @@ export function App({ explorBot, initialShowInput = false, exitOnEmptyInput = fa
111
111
  return;
112
112
  setChecklistData({
113
113
  config: explorBot.getConfig(),
114
- knowledgeTracker: explorBot.getKnowledgeTracker(),
114
+ knowledgeTracker: explorBot.knowledgeTracker(),
115
115
  });
116
116
  setShowWelcome(true);
117
117
  setShowInput(true);
@@ -283,7 +283,7 @@ export function App({ explorBot, initialShowInput = false, exitOnEmptyInput = fa
283
283
  React.createElement(Box, { height: 3, flexDirection: "row", justifyContent: "space-between", alignItems: "center", paddingX: 1 },
284
284
  React.createElement(ActivityPane, { isInputVisible: showInput }),
285
285
  showSessionTimer && React.createElement(SessionTimer, { startedAt: sessionStartedAtRef.current })),
286
- showWelcome && React.createElement(WelcomeCommands, { hasKnowledge: explorBot.getKnowledgeTracker().listAllKnowledge().length > 0 }),
286
+ showWelcome && React.createElement(WelcomeCommands, { hasKnowledge: explorBot.knowledgeTracker().listAllKnowledge().length > 0 }),
287
287
  showInput && React.createElement(Box, { height: 1 }),
288
288
  interruptPrompt && showInput && (React.createElement(Box, { paddingX: 1 },
289
289
  React.createElement(Text, { color: "yellow" }, interruptPrompt))),
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Autocomplete: React.FC;
3
+ export default Autocomplete;
@@ -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,6 @@
1
+ import React from 'react';
2
+ interface LogPaneProps {
3
+ verboseMode: boolean;
4
+ }
5
+ declare const LogPane: React.FC<LogPaneProps>;
6
+ export default LogPane;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { Test } from '../test-plan.js';
3
+ interface PlanEditorProps {
4
+ tasks: Test[];
5
+ onClose: () => void;
6
+ isActive: boolean;
7
+ }
8
+ declare const PlanEditor: React.FC<PlanEditorProps>;
9
+ export default PlanEditor;
@@ -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,6 @@
1
+ import React from 'react';
2
+ type SessionTimerProps = {
3
+ startedAt: number;
4
+ };
5
+ declare const SessionTimer: React.FC<SessionTimerProps>;
6
+ export default SessionTimer;
@@ -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,4 @@
1
+ import React from 'react';
2
+ export declare const StatusPane: React.FC<{
3
+ onComplete?: () => void;
4
+ }>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Test } from '../test-plan.js';
3
+ export declare const WINDOW_SIZE = 7;
4
+ interface TaskPaneProps {
5
+ tasks: Test[];
6
+ scrollOffset?: number;
7
+ }
8
+ declare const TaskPane: React.FC<TaskPaneProps>;
9
+ export default TaskPane;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Welcome: React.FC;
3
+ export default Welcome;
@@ -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,6 @@
1
+ import React from 'react';
2
+ interface WelcomeCommandsProps {
3
+ hasKnowledge: boolean;
4
+ }
5
+ declare const WelcomeCommands: React.FC<WelcomeCommandsProps>;
6
+ export default WelcomeCommands;
@@ -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,253 @@
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
+ getProjectRoot(): string;
234
+ resolveProjectDir(relativeDir: string): string;
235
+ getStatesDir(): string;
236
+ getPlansDir(): string;
237
+ getTestsDir(): string;
238
+ static resetForTesting(): void;
239
+ static setupTestConfig(): void;
240
+ static getTestDirectories(): string[];
241
+ static cleanupAllTestDirectories(): void;
242
+ findConfigFile(): string | null;
243
+ loadConfigModule(configPath: string): Promise<any>;
244
+ resolveConfig(config: ExplorbotConfig, options?: {
245
+ baseUrl?: string;
246
+ }): ExplorbotConfig;
247
+ validateConfig(config: ExplorbotConfig): void;
248
+ getNestedValue(obj: any, path: string): any;
249
+ mergeWithDefaults(config: Partial<ExplorbotConfig>): ExplorbotConfig;
250
+ deepMerge(target: any, source: any): any;
251
+ ensureDirectory(path: string): void;
252
+ }
253
+ export declare function outputPath(...segments: string[]): string;
@@ -96,6 +96,18 @@ export class ConfigParser {
96
96
  throw new Error('Config path not found');
97
97
  return path.join(path.dirname(configPath), config.dirs?.output || 'output');
98
98
  }
99
+ getProjectRoot() {
100
+ const configPath = this.getConfigPath();
101
+ if (configPath)
102
+ return path.dirname(configPath);
103
+ return process.cwd();
104
+ }
105
+ resolveProjectDir(relativeDir) {
106
+ const configPath = this.getConfigPath();
107
+ if (!configPath)
108
+ return relativeDir;
109
+ return path.join(path.dirname(configPath), relativeDir);
110
+ }
99
111
  getStatesDir() {
100
112
  return outputPath('states');
101
113
  }
@@ -0,0 +1,25 @@
1
+ import { EventEmitter } from 'node:events';
2
+ export type InputCallback = (prompt: string) => Promise<string | null>;
3
+ export declare class ExecutionController extends EventEmitter {
4
+ static instance: ExecutionController;
5
+ interrupted: boolean;
6
+ inputCallback: InputCallback | null;
7
+ interruptResolvers: Array<() => void>;
8
+ abortController: AbortController | null;
9
+ awaitingInput: boolean;
10
+ constructor();
11
+ static getInstance(): ExecutionController;
12
+ setInputCallback(callback: InputCallback): void;
13
+ startExecution(): void;
14
+ getAbortSignal(): AbortSignal | undefined;
15
+ interrupt(): void;
16
+ isAwaitingInput(): boolean;
17
+ isInterrupted(): boolean;
18
+ waitForInterrupt(): Promise<void>;
19
+ checkInterrupt(): Promise<string | null>;
20
+ handleInterrupt(prompt?: string): Promise<string | null>;
21
+ requestInput(prompt: string): Promise<string | null>;
22
+ readlineInput(prompt: string): Promise<string | null>;
23
+ reset(): void;
24
+ }
25
+ export declare const executionController: ExecutionController;
@@ -0,0 +1,112 @@
1
+ import type { ActionResult } from './action-result.js';
2
+ import { KnowledgeTracker } from './knowledge-tracker.js';
3
+ export declare const RECENT_WINDOW_DAYS = 30;
4
+ /**
5
+ * Stores and reads per-page experience files (`./experience/<stateHash>.md`).
6
+ *
7
+ * Two writers, two contracts:
8
+ *
9
+ * writeFlow(state, body, relatedUrls?) — caller hands in a fully-formatted
10
+ * `## FLOW: <imperative title>` block (multi-step,
11
+ * `*` bullets + optional ```js``` + `>` discovery,
12
+ * ends with `---`). Tracker dedups + prepends.
13
+ * writeAction(state, ActionInput) — `## ACTION: <imperative title>`, single-step,
14
+ * optional `Solution:` line + one ```js``` code block.
15
+ * Title normalized via normalizeTitle().
16
+ *
17
+ * - Always h2. Never h3 for FLOW/ACTION.
18
+ * - On read (getSuccessfulExperience), headings are rendered as
19
+ * `## HOW to <title> (multi-step|single-step)` so prompts get natural phrasing.
20
+ */
21
+ export declare class ExperienceTracker {
22
+ experienceDir: string;
23
+ disabled: boolean;
24
+ knowledgeTracker: KnowledgeTracker;
25
+ constructor(knowledgeTracker: KnowledgeTracker, options?: {
26
+ disabled?: boolean;
27
+ });
28
+ getExperienceDirectories(): string[];
29
+ ensureDirectory(dir: string): void;
30
+ readExperienceFile(stateHash: string): {
31
+ content: string;
32
+ data: any;
33
+ };
34
+ readExperienceFileAt(filePath: string): {
35
+ content: string;
36
+ data: any;
37
+ };
38
+ writeExperienceFile(stateHash: string, content: string, frontmatter?: any): void;
39
+ getExperienceFilePath(stateHash: string): string;
40
+ ensureExperienceFile(state: ActionResult): string;
41
+ updateSummary(state: ActionResult, summary: string): void;
42
+ isWritingDisabled(state: ActionResult): boolean;
43
+ writeAction(state: ActionResult, action: ActionInput): void;
44
+ writeFlow(state: ActionResult, body: string, relatedUrls?: string[]): void;
45
+ getAllExperience(): ExperienceFile[];
46
+ getRelevantExperience(state: ActionResult, options?: {
47
+ includeDescendantExperience?: boolean;
48
+ }): ExperienceFile[];
49
+ getSuccessfulExperience(state: ActionResult, options?: {
50
+ includeDescendants?: boolean;
51
+ stripCode?: boolean;
52
+ }): string[];
53
+ getExperienceTableOfContents(state: ActionResult, options?: {
54
+ includeDescendantExperience?: boolean;
55
+ }): ExperienceTocEntry[];
56
+ renderExperienceTocFor(state: ActionResult): string;
57
+ getExperienceSection(fileTag: string, sectionIndex: number, state: ActionResult, options?: {
58
+ includeDescendantExperience?: boolean;
59
+ }): {
60
+ title: string;
61
+ url: string;
62
+ content: string;
63
+ } | null;
64
+ buildToc(records: ExperienceFile[]): ExperienceTocEntry[];
65
+ readSectionByHash(fileHash: string, sectionIndex: number): {
66
+ title: string;
67
+ body: string;
68
+ } | null;
69
+ findExperienceFileByHash(fileHash: string): string | null;
70
+ listAllExperienceToc(filter?: string, options?: {
71
+ recency?: 'recent' | 'old';
72
+ }): ExperienceTocEntry[];
73
+ getExperienceSectionByTag(fileTag: string, sectionIndex: number, filter?: string): {
74
+ title: string;
75
+ url: string;
76
+ content: string;
77
+ fileHash: string;
78
+ } | null;
79
+ }
80
+ export declare function renderExperienceToc(toc: ExperienceTocEntry[]): string;
81
+ export interface ExperienceFile {
82
+ filePath: string;
83
+ data: {
84
+ url?: string;
85
+ title?: string;
86
+ [key: string]: any;
87
+ };
88
+ content: string;
89
+ mtime: Date;
90
+ }
91
+ export interface ActionInput {
92
+ title: string;
93
+ code: string;
94
+ explanation?: string;
95
+ }
96
+ export interface SessionStep {
97
+ message: string;
98
+ status: 'passed' | 'failed' | 'neutral';
99
+ tool?: string;
100
+ code?: string;
101
+ discovery?: string;
102
+ }
103
+ export interface ExperienceTocEntry {
104
+ fileTag: string;
105
+ fileHash: string;
106
+ url: string;
107
+ sections: {
108
+ index: number;
109
+ level: 2 | 3;
110
+ title: string;
111
+ }[];
112
+ }