explorbot 0.5.0 → 0.5.2
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 +2 -1
- package/boat/prima/README.md +31 -4
- package/boat/prima/bin/prima-cli.ts +2 -1
- package/dist/bin/explorbot-cli.js +2 -1
- package/dist/boat/prima/bin/prima-cli.js +2 -1
- package/dist/package.json +2 -2
- package/dist/src/action.d.ts +1 -0
- package/dist/src/action.js +7 -0
- package/dist/src/ai/judge-provider.js +5 -0
- package/dist/src/ai/judge.d.ts +3 -1
- package/dist/src/ai/judge.js +29 -6
- package/dist/src/ai/pilot.d.ts +1 -0
- package/dist/src/ai/pilot.js +17 -4
- package/dist/src/ai/provider.js +15 -8
- package/dist/src/ai/rules.js +13 -0
- package/dist/src/ai/tester.d.ts +1 -0
- package/dist/src/ai/tester.js +11 -4
- package/dist/src/ai/tools.js +18 -9
- package/dist/src/commands/options/decision-model-option.d.ts +6 -0
- package/dist/src/commands/options/decision-model-option.js +10 -0
- package/dist/src/commands/options/index.d.ts +2 -0
- package/dist/src/commands/options/index.js +2 -0
- package/dist/src/config.d.ts +2 -0
- package/dist/src/config.js +11 -0
- package/docs/basics/providers.md +38 -0
- package/docs/index.json +1 -0
- package/docs/reference/commands.md +1 -0
- package/docs/reference/configuration.md +2 -0
- package/docs/web-testing/decisions.md +119 -0
- package/docs/workflow/agentic-usage.md +1 -0
- package/package.json +2 -2
- package/src/action.ts +8 -0
- package/src/ai/judge-provider.ts +6 -0
- package/src/ai/judge.ts +25 -6
- package/src/ai/pilot.ts +17 -4
- package/src/ai/provider.ts +14 -8
- package/src/ai/rules.ts +13 -0
- package/src/ai/tester.ts +11 -3
- package/src/ai/tools.ts +22 -11
- package/src/commands/options/decision-model-option.ts +11 -0
- package/src/commands/options/index.ts +2 -0
- package/src/config.ts +11 -1
package/src/config.ts
CHANGED
|
@@ -185,7 +185,7 @@ interface AIConfig {
|
|
|
185
185
|
vision?: boolean;
|
|
186
186
|
visionModel?: any;
|
|
187
187
|
agenticModel?: any;
|
|
188
|
-
decisionModel?: { provider: string; model: string; tool?: boolean; direct?: boolean };
|
|
188
|
+
decisionModel?: { provider: string; model: string; tool?: boolean; direct?: boolean; threshold?: number };
|
|
189
189
|
retryAttempts?: number;
|
|
190
190
|
retryDelay?: number;
|
|
191
191
|
maxParallelRequests?: number;
|
|
@@ -278,6 +278,7 @@ export const EXPLORBOT_ENV_VARS: EnvVar[] = [
|
|
|
278
278
|
{ name: 'EXPLORBOT_URL', required: true, description: 'Base URL to test; the API boat reads it as the base endpoint' },
|
|
279
279
|
{ name: 'EXPLORBOT_VISION_MODEL', description: 'Screenshot analysis; overrides the provider recommendation' },
|
|
280
280
|
{ name: 'EXPLORBOT_AGENTIC_MODEL', description: 'Captain and Pilot decisions; overrides the provider recommendation' },
|
|
281
|
+
{ name: 'EXPLORBOT_DECISION_MODEL', description: 'Turns on the decision model, as provider/model-id (openrouter/typesafe/jev-1.13 or typesafe/jev-latest); overrides ai.decisionModel' },
|
|
281
282
|
{ name: 'EXPLORBOT_OUTPUT', description: 'Output root for states, plans, research, and reports. Defaults to the site dir under ~/.explorbot/sites' },
|
|
282
283
|
{ name: 'EXPLORBOT_EPHEMERAL', description: 'Keep no state between runs — output goes to a fresh temp directory instead of the site dir' },
|
|
283
284
|
{ name: 'EXPLORBOT_KNOWLEDGE', description: 'Inline knowledge text, applied to every page' },
|
|
@@ -423,6 +424,7 @@ export class ConfigParser {
|
|
|
423
424
|
this.runtimeTarget = target;
|
|
424
425
|
this.configPath = sourcePath;
|
|
425
426
|
this.applyEnvSpec(this.config);
|
|
427
|
+
this.applyEnvDecisionModel(this.config);
|
|
426
428
|
|
|
427
429
|
// Restore original directory after successful config load
|
|
428
430
|
if (options?.path && originalCwd !== process.cwd()) {
|
|
@@ -600,6 +602,14 @@ export class ConfigParser {
|
|
|
600
602
|
config.dirs.spec = spec;
|
|
601
603
|
}
|
|
602
604
|
|
|
605
|
+
private applyEnvDecisionModel(config: ExplorbotConfig): void {
|
|
606
|
+
const spec = process.env.EXPLORBOT_DECISION_MODEL;
|
|
607
|
+
if (!spec) return;
|
|
608
|
+
const separator = spec.indexOf('/');
|
|
609
|
+
if (separator < 1) throw new Error('EXPLORBOT_DECISION_MODEL must be written as "provider/model-id", e.g. openrouter/typesafe/jev-1.13');
|
|
610
|
+
config.ai.decisionModel = { ...config.ai.decisionModel, provider: spec.slice(0, separator), model: spec.slice(separator + 1) };
|
|
611
|
+
}
|
|
612
|
+
|
|
603
613
|
private async buildEnvConfig(baseUrl: string | undefined, outputRoot: string): Promise<ExplorbotConfig> {
|
|
604
614
|
const provider = process.env.EXPLORBOT_AI_PROVIDER;
|
|
605
615
|
const modelSpec = process.env.EXPLORBOT_AI_MODEL;
|