explorbot 0.2.4 → 0.2.5

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 (63) hide show
  1. package/bin/explorbot-cli.ts +19 -7
  2. package/boat/api-tester/src/cli.ts +17 -0
  3. package/boat/doc-collector/src/cli.ts +14 -1
  4. package/boat/prima/src/cli.ts +24 -12
  5. package/boat/prima/src/envelope.ts +35 -13
  6. package/boat/prima/src/prima.ts +61 -41
  7. package/dist/bin/explorbot-cli.js +19 -7
  8. package/dist/boat/api-tester/src/cli.js +17 -0
  9. package/dist/boat/doc-collector/src/cli.js +14 -1
  10. package/dist/boat/prima/src/cli.js +19 -7
  11. package/dist/boat/prima/src/envelope.js +32 -8
  12. package/dist/boat/prima/src/prima.js +57 -39
  13. package/dist/package.json +1 -1
  14. package/dist/src/action.js +5 -1
  15. package/dist/src/ai/navigator.d.ts +27 -0
  16. package/dist/src/ai/navigator.js +227 -175
  17. package/dist/src/ai/pilot.d.ts +7 -4
  18. package/dist/src/ai/pilot.js +50 -8
  19. package/dist/src/ai/provider.d.ts +2 -2
  20. package/dist/src/ai/provider.js +12 -21
  21. package/dist/src/ai/researcher/cache.d.ts +2 -0
  22. package/dist/src/ai/researcher/cache.js +10 -2
  23. package/dist/src/ai/researcher.js +2 -1
  24. package/dist/src/ai/session-analyst.js +2 -0
  25. package/dist/src/ai/tester.d.ts +5 -2
  26. package/dist/src/ai/tester.js +17 -13
  27. package/dist/src/ai/tools.js +4 -1
  28. package/dist/src/commands/config-command.d.ts +51 -0
  29. package/dist/src/commands/config-command.js +117 -0
  30. package/dist/src/commands/index.js +2 -0
  31. package/dist/src/config.d.ts +8 -1
  32. package/dist/src/config.js +40 -0
  33. package/dist/src/explorbot.js +4 -1
  34. package/dist/src/remote.d.ts +3 -2
  35. package/dist/src/remote.js +8 -2
  36. package/dist/src/state-manager.d.ts +1 -1
  37. package/dist/src/state-manager.js +3 -1
  38. package/dist/src/test-plan.d.ts +1 -0
  39. package/dist/src/test-plan.js +19 -0
  40. package/dist/src/utils/logger.d.ts +1 -1
  41. package/dist/src/utils/logger.js +8 -0
  42. package/docs/index.json +2 -1
  43. package/docs/reference/commands.md +3 -0
  44. package/docs/reference/websocket.md +50 -0
  45. package/docs/superpowers/specs/2026-08-18-prima-false-verdicts.md +159 -0
  46. package/package.json +1 -1
  47. package/src/action.ts +5 -1
  48. package/src/ai/navigator.ts +241 -178
  49. package/src/ai/pilot.ts +63 -12
  50. package/src/ai/provider.ts +12 -20
  51. package/src/ai/researcher/cache.ts +12 -2
  52. package/src/ai/researcher.ts +2 -1
  53. package/src/ai/session-analyst.ts +2 -0
  54. package/src/ai/tester.ts +20 -12
  55. package/src/ai/tools.ts +4 -1
  56. package/src/commands/config-command.ts +146 -0
  57. package/src/commands/index.ts +2 -0
  58. package/src/config.ts +45 -1
  59. package/src/explorbot.ts +3 -1
  60. package/src/remote.ts +8 -2
  61. package/src/state-manager.ts +5 -2
  62. package/src/test-plan.ts +20 -0
  63. package/src/utils/logger.ts +9 -1
package/src/test-plan.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import figures from 'figures';
3
3
  import { WebPageState } from './state-manager.ts';
4
+ import { tag } from './utils/logger.ts';
4
5
  import { parsePlanFromMarkdown, planToAiContext, savePlanToMarkdown, savePlansToMarkdown } from './utils/test-plan-markdown.ts';
5
6
  import { uniqSessionName } from './utils/unique-names.ts';
6
7
 
@@ -317,6 +318,7 @@ export class Test extends Task {
317
318
  this.startTime = performance.now();
318
319
  this.addNote(`Test started. Session name: ${this.sessionName}`);
319
320
  this.plan?.notifyChange();
321
+ this.reportStatus();
320
322
  }
321
323
 
322
324
  finish(result: TestResultType = TestResult.FAILED): void {
@@ -324,6 +326,7 @@ export class Test extends Task {
324
326
  this.result = result;
325
327
  this.endTime = performance.now();
326
328
  this.plan?.notifyChange();
329
+ this.reportStatus();
327
330
  }
328
331
 
329
332
  getDurationMs(): number | null {
@@ -336,6 +339,18 @@ export class Test extends Task {
336
339
  return this.expected.filter((e) => !achieved.includes(e));
337
340
  }
338
341
 
342
+ private reportStatus(): void {
343
+ tag('data').log('test', {
344
+ scenario: this.scenario,
345
+ status: this.status,
346
+ result: this.result,
347
+ priority: this.priority,
348
+ sessionName: this.sessionName,
349
+ url: this.startUrl,
350
+ plan: this.plan?.title,
351
+ });
352
+ }
353
+
339
354
  override getLog(): Array<{ type: 'step' | 'note' | 'artifact'; content: string; timestamp: number }> {
340
355
  const merged: Record<string, { type: 'step' | 'note' | 'artifact'; content: string }> = {};
341
356
 
@@ -407,6 +422,11 @@ export class Plan {
407
422
  for (const listener of this.changeListeners) {
408
423
  listener(this.tests);
409
424
  }
425
+ tag('data').log('plan', {
426
+ title: this.title,
427
+ url: this.url,
428
+ tests: this.tests.map((test) => ({ scenario: test.scenario, status: test.status, result: test.result, priority: test.priority })),
429
+ });
410
430
  }
411
431
 
412
432
  getAllTests(): Test[] {
@@ -11,7 +11,7 @@ import { Observability } from '../observability.ts';
11
11
  import { RecentStepFilter } from './log-filters.ts';
12
12
  import { parseMarkdownToTerminal } from './markdown-terminal.ts';
13
13
 
14
- export type LogType = 'info' | 'success' | 'error' | 'warning' | 'debug' | 'substep' | 'operation' | 'step' | 'multiline' | 'details' | 'html' | 'input';
14
+ export type LogType = 'info' | 'success' | 'error' | 'warning' | 'debug' | 'substep' | 'operation' | 'step' | 'multiline' | 'details' | 'html' | 'input' | 'data';
15
15
 
16
16
  export interface TaggedLogEntry {
17
17
  type: LogType;
@@ -458,6 +458,14 @@ class Logger {
458
458
  return;
459
459
  }
460
460
 
461
+ if (type === 'data') {
462
+ const entry: TaggedLogEntry = { type, content: String(args[0]), timestamp: new Date(), originalArgs: args };
463
+ for (const destination of this.extra) {
464
+ if (destination.isEnabled()) destination.write(entry);
465
+ }
466
+ return;
467
+ }
468
+
461
469
  const options = this.extractLogOptions(type, args);
462
470
  let content = this.processArgs(args);
463
471
  if (type === 'step' && args[0]?.toCode) {