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.
- package/bin/explorbot-cli.ts +19 -7
- package/boat/api-tester/src/cli.ts +17 -0
- package/boat/doc-collector/src/cli.ts +14 -1
- package/boat/prima/src/cli.ts +24 -12
- package/boat/prima/src/envelope.ts +35 -13
- package/boat/prima/src/prima.ts +61 -41
- package/dist/bin/explorbot-cli.js +19 -7
- package/dist/boat/api-tester/src/cli.js +17 -0
- package/dist/boat/doc-collector/src/cli.js +14 -1
- package/dist/boat/prima/src/cli.js +19 -7
- package/dist/boat/prima/src/envelope.js +32 -8
- package/dist/boat/prima/src/prima.js +57 -39
- package/dist/package.json +1 -1
- package/dist/src/action.js +5 -1
- package/dist/src/ai/navigator.d.ts +27 -0
- package/dist/src/ai/navigator.js +227 -175
- package/dist/src/ai/pilot.d.ts +7 -4
- package/dist/src/ai/pilot.js +50 -8
- package/dist/src/ai/provider.d.ts +2 -2
- package/dist/src/ai/provider.js +12 -21
- package/dist/src/ai/researcher/cache.d.ts +2 -0
- package/dist/src/ai/researcher/cache.js +10 -2
- package/dist/src/ai/researcher.js +2 -1
- package/dist/src/ai/session-analyst.js +2 -0
- package/dist/src/ai/tester.d.ts +5 -2
- package/dist/src/ai/tester.js +17 -13
- package/dist/src/ai/tools.js +4 -1
- package/dist/src/commands/config-command.d.ts +51 -0
- package/dist/src/commands/config-command.js +117 -0
- package/dist/src/commands/index.js +2 -0
- package/dist/src/config.d.ts +8 -1
- package/dist/src/config.js +40 -0
- package/dist/src/explorbot.js +4 -1
- package/dist/src/remote.d.ts +3 -2
- package/dist/src/remote.js +8 -2
- package/dist/src/state-manager.d.ts +1 -1
- package/dist/src/state-manager.js +3 -1
- package/dist/src/test-plan.d.ts +1 -0
- package/dist/src/test-plan.js +19 -0
- package/dist/src/utils/logger.d.ts +1 -1
- package/dist/src/utils/logger.js +8 -0
- package/docs/index.json +2 -1
- package/docs/reference/commands.md +3 -0
- package/docs/reference/websocket.md +50 -0
- package/docs/superpowers/specs/2026-08-18-prima-false-verdicts.md +159 -0
- package/package.json +1 -1
- package/src/action.ts +5 -1
- package/src/ai/navigator.ts +241 -178
- package/src/ai/pilot.ts +63 -12
- package/src/ai/provider.ts +12 -20
- package/src/ai/researcher/cache.ts +12 -2
- package/src/ai/researcher.ts +2 -1
- package/src/ai/session-analyst.ts +2 -0
- package/src/ai/tester.ts +20 -12
- package/src/ai/tools.ts +4 -1
- package/src/commands/config-command.ts +146 -0
- package/src/commands/index.ts +2 -0
- package/src/config.ts +45 -1
- package/src/explorbot.ts +3 -1
- package/src/remote.ts +8 -2
- package/src/state-manager.ts +5 -2
- package/src/test-plan.ts +20 -0
- 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[] {
|
package/src/utils/logger.ts
CHANGED
|
@@ -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) {
|