ft-scout 9.4.9 → 9.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/README.md +12 -18
- package/bin/src/commands/agent.d.ts +41 -0
- package/bin/src/commands/audit.d.ts +2 -0
- package/bin/src/commands/authCommand.d.ts +2 -0
- package/bin/src/commands/benchmark.d.ts +2 -0
- package/bin/src/commands/brief.d.ts +4 -0
- package/bin/src/commands/checkpoint.d.ts +7 -0
- package/bin/src/commands/configCommand.d.ts +7 -0
- package/bin/src/commands/dashboard.d.ts +5 -0
- package/bin/src/commands/history.d.ts +2 -0
- package/bin/src/commands/init.d.ts +8 -0
- package/bin/src/commands/login.d.ts +10 -0
- package/bin/src/commands/logout.d.ts +6 -0
- package/bin/src/commands/mcp.d.ts +49 -0
- package/bin/src/commands/owners.d.ts +2 -0
- package/bin/src/commands/plan.d.ts +2 -0
- package/bin/src/commands/pr.d.ts +11 -0
- package/bin/src/commands/quota.d.ts +2 -0
- package/bin/src/commands/recommend.d.ts +5 -0
- package/bin/src/commands/risky.d.ts +10 -0
- package/bin/src/commands/setup.d.ts +2 -0
- package/bin/src/commands/signup.d.ts +8 -0
- package/bin/src/commands/switchCommand.d.ts +3 -0
- package/bin/src/commands/undo.d.ts +2 -0
- package/bin/src/commands/watch.d.ts +12 -0
- package/bin/src/commands/web.d.ts +8 -0
- package/bin/src/discovery/config.d.ts +10 -0
- package/bin/src/discovery/display.d.ts +3 -0
- package/bin/src/discovery/messages.d.ts +4 -0
- package/bin/src/discovery/signals.d.ts +16 -0
- package/bin/src/engine/actionVerifier.d.ts +69 -0
- package/bin/src/engine/agentEngine.d.ts +110 -0
- package/bin/src/engine/agentEngine.js +12 -1
- package/bin/src/engine/agentState.d.ts +154 -0
- package/bin/src/engine/browser/browserController.d.ts +155 -0
- package/bin/src/engine/browser/index.d.ts +2 -0
- package/bin/src/engine/checkpoints/checkpointManager.d.ts +48 -0
- package/bin/src/engine/computer/computerController.d.ts +130 -0
- package/bin/src/engine/computer/computerController.js +34 -15
- package/bin/src/engine/computer/computerDiagnostic.d.ts +31 -0
- package/bin/src/engine/computer/index.d.ts +4 -0
- package/bin/src/engine/computer/mockComputer.d.ts +62 -0
- package/bin/src/engine/computer/operatorHud.d.ts +30 -0
- package/bin/src/engine/computer/scoutDriver.cs +85 -20
- package/bin/src/engine/git.d.ts +20 -0
- package/bin/src/engine/llm.d.ts +92 -0
- package/bin/src/engine/llm.js +298 -273
- package/bin/src/engine/planner.d.ts +21 -0
- package/bin/src/engine/planner.js +12 -4
- package/bin/src/engine/runtime/agentRuntime.d.ts +111 -0
- package/bin/src/engine/runtime/agentRuntime.js +12 -1
- package/bin/src/engine/runtime/index.d.ts +2 -0
- package/bin/src/engine/safety.d.ts +55 -0
- package/bin/src/engine/scanners.d.ts +2 -0
- package/bin/src/engine/subagents/subagentManager.d.ts +29 -0
- package/bin/src/engine/toolRegistry.d.ts +38 -0
- package/bin/src/engine/verifier.d.ts +47 -0
- package/bin/src/engine/voiceEngine.d.ts +26 -0
- package/bin/src/engine/web.d.ts +22 -0
- package/bin/src/engine/workspace/agentWorkspace.d.ts +112 -0
- package/bin/src/engine/workspace/index.d.ts +2 -0
- package/bin/src/index.d.ts +2 -0
- package/bin/src/index.js +4 -4
- package/bin/src/mcp/client.d.ts +62 -0
- package/bin/src/mcp/client.js +1 -1
- package/bin/src/mcp/cloudSync.d.ts +19 -0
- package/bin/src/mcp/discovery.d.ts +22 -0
- package/bin/src/mcp/health.d.ts +13 -0
- package/bin/src/mcp/index.d.ts +16 -0
- package/bin/src/mcp/manager.d.ts +113 -0
- package/bin/src/mcp/permissions.d.ts +18 -0
- package/bin/src/mcp/persistence.d.ts +44 -0
- package/bin/src/mcp/persistence.js +8 -1
- package/bin/src/mcp/recovery.d.ts +19 -0
- package/bin/src/mcp/telemetry.d.ts +15 -0
- package/bin/src/mcp/toolRouter.d.ts +23 -0
- package/bin/src/mcp/transport.d.ts +60 -0
- package/bin/src/mcp/types.d.ts +130 -0
- package/bin/src/server/server.d.ts +6 -0
- package/bin/src/utils/admin.d.ts +84 -0
- package/bin/src/utils/auditLogger.d.ts +18 -0
- package/bin/src/utils/auth.d.ts +132 -0
- package/bin/src/utils/auth.js +13 -0
- package/bin/src/utils/branding.d.ts +2 -0
- package/bin/src/utils/branding.js +1 -1
- package/bin/src/utils/claudeUI.d.ts +101 -0
- package/bin/src/utils/config.d.ts +46 -0
- package/bin/src/utils/email.d.ts +36 -0
- package/bin/src/utils/firebaseAuth.d.ts +19 -0
- package/bin/src/utils/holoseneAuth.d.ts +18 -0
- package/bin/src/utils/interruptHandler.d.ts +32 -0
- package/bin/src/utils/language.d.ts +13 -0
- package/bin/src/utils/logger.d.ts +2 -0
- package/bin/src/utils/markdown.d.ts +19 -0
- package/bin/src/utils/payment.d.ts +81 -0
- package/bin/src/utils/pricing.d.ts +26 -0
- package/bin/src/utils/qrBridge.d.ts +33 -0
- package/bin/src/utils/qrBridge.js +1 -1
- package/bin/src/utils/razorpay.d.ts +48 -0
- package/bin/src/utils/rules.d.ts +24 -0
- package/bin/src/utils/session.d.ts +32 -0
- package/bin/src/utils/updateCheck.d.ts +3 -0
- package/package.json +14 -4
- package/.firebase/hosting.d2Vi.cache +0 -16
- package/.firebaserc +0 -14
- package/.mcp-config.json +0 -19
- package/.mft-mcp-config.json +0 -29
- package/.scoutrules +0 -13
- package/bin/src/commands/agent.d.ts.map +0 -1
- package/bin/src/commands/agent.js.map +0 -1
- package/bin/src/commands/audit.d.ts.map +0 -1
- package/bin/src/commands/audit.js.map +0 -1
- package/bin/src/commands/authCommand.d.ts.map +0 -1
- package/bin/src/commands/authCommand.js.map +0 -1
- package/bin/src/commands/benchmark.d.ts.map +0 -1
- package/bin/src/commands/benchmark.js.map +0 -1
- package/bin/src/commands/brief.d.ts.map +0 -1
- package/bin/src/commands/brief.js.map +0 -1
- package/bin/src/commands/checkpoint.d.ts.map +0 -1
- package/bin/src/commands/checkpoint.js.map +0 -1
- package/bin/src/commands/configCommand.d.ts.map +0 -1
- package/bin/src/commands/configCommand.js.map +0 -1
- package/bin/src/commands/dashboard.d.ts.map +0 -1
- package/bin/src/commands/dashboard.js.map +0 -1
- package/bin/src/commands/history.d.ts.map +0 -1
- package/bin/src/commands/history.js.map +0 -1
- package/bin/src/commands/init.d.ts.map +0 -1
- package/bin/src/commands/init.js.map +0 -1
- package/bin/src/commands/login.d.ts.map +0 -1
- package/bin/src/commands/login.js.map +0 -1
- package/bin/src/commands/logout.d.ts.map +0 -1
- package/bin/src/commands/logout.js.map +0 -1
- package/bin/src/commands/mcp.d.ts.map +0 -1
- package/bin/src/commands/mcp.js.map +0 -1
- package/bin/src/commands/owners.d.ts.map +0 -1
- package/bin/src/commands/owners.js.map +0 -1
- package/bin/src/commands/plan.d.ts.map +0 -1
- package/bin/src/commands/plan.js.map +0 -1
- package/bin/src/commands/pr.d.ts.map +0 -1
- package/bin/src/commands/pr.js.map +0 -1
- package/bin/src/commands/quota.d.ts.map +0 -1
- package/bin/src/commands/quota.js.map +0 -1
- package/bin/src/commands/recommend.d.ts.map +0 -1
- package/bin/src/commands/recommend.js.map +0 -1
- package/bin/src/commands/risky.d.ts.map +0 -1
- package/bin/src/commands/risky.js.map +0 -1
- package/bin/src/commands/setup.d.ts.map +0 -1
- package/bin/src/commands/setup.js.map +0 -1
- package/bin/src/commands/signup.d.ts.map +0 -1
- package/bin/src/commands/signup.js.map +0 -1
- package/bin/src/commands/switchCommand.d.ts.map +0 -1
- package/bin/src/commands/switchCommand.js.map +0 -1
- package/bin/src/commands/undo.d.ts.map +0 -1
- package/bin/src/commands/undo.js.map +0 -1
- package/bin/src/commands/watch.d.ts.map +0 -1
- package/bin/src/commands/watch.js.map +0 -1
- package/bin/src/commands/web.d.ts.map +0 -1
- package/bin/src/commands/web.js.map +0 -1
- package/bin/src/discovery/config.d.ts.map +0 -1
- package/bin/src/discovery/config.js.map +0 -1
- package/bin/src/discovery/display.d.ts.map +0 -1
- package/bin/src/discovery/display.js.map +0 -1
- package/bin/src/discovery/messages.d.ts.map +0 -1
- package/bin/src/discovery/messages.js.map +0 -1
- package/bin/src/discovery/signals.d.ts.map +0 -1
- package/bin/src/discovery/signals.js.map +0 -1
- package/bin/src/engine/actionVerifier.d.ts.map +0 -1
- package/bin/src/engine/actionVerifier.js.map +0 -1
- package/bin/src/engine/agentEngine.d.ts.map +0 -1
- package/bin/src/engine/agentEngine.js.map +0 -1
- package/bin/src/engine/agentState.d.ts.map +0 -1
- package/bin/src/engine/agentState.js.map +0 -1
- package/bin/src/engine/browser/browserController.d.ts.map +0 -1
- package/bin/src/engine/browser/browserController.js.map +0 -1
- package/bin/src/engine/browser/index.d.ts.map +0 -1
- package/bin/src/engine/browser/index.js.map +0 -1
- package/bin/src/engine/checkpoints/checkpointManager.d.ts.map +0 -1
- package/bin/src/engine/checkpoints/checkpointManager.js.map +0 -1
- package/bin/src/engine/computer/computerController.d.ts.map +0 -1
- package/bin/src/engine/computer/computerController.js.map +0 -1
- package/bin/src/engine/computer/computerDiagnostic.d.ts.map +0 -1
- package/bin/src/engine/computer/computerDiagnostic.js.map +0 -1
- package/bin/src/engine/computer/index.d.ts.map +0 -1
- package/bin/src/engine/computer/index.js.map +0 -1
- package/bin/src/engine/computer/mockComputer.d.ts.map +0 -1
- package/bin/src/engine/computer/mockComputer.js.map +0 -1
- package/bin/src/engine/computer/operatorHud.d.ts.map +0 -1
- package/bin/src/engine/computer/operatorHud.js.map +0 -1
- package/bin/src/engine/computer/scout_driver.exe +0 -0
- package/bin/src/engine/git.d.ts.map +0 -1
- package/bin/src/engine/git.js.map +0 -1
- package/bin/src/engine/llm.d.ts.map +0 -1
- package/bin/src/engine/llm.js.map +0 -1
- package/bin/src/engine/planner.d.ts.map +0 -1
- package/bin/src/engine/planner.js.map +0 -1
- package/bin/src/engine/runtime/agentRuntime.d.ts.map +0 -1
- package/bin/src/engine/runtime/agentRuntime.js.map +0 -1
- package/bin/src/engine/runtime/index.d.ts.map +0 -1
- package/bin/src/engine/runtime/index.js.map +0 -1
- package/bin/src/engine/safety.d.ts.map +0 -1
- package/bin/src/engine/safety.js.map +0 -1
- package/bin/src/engine/scanners.d.ts.map +0 -1
- package/bin/src/engine/scanners.js.map +0 -1
- package/bin/src/engine/scoutAudioRecorder.cs +0 -215
- package/bin/src/engine/scout_audio_recorder.exe +0 -0
- package/bin/src/engine/subagents/subagentManager.d.ts.map +0 -1
- package/bin/src/engine/subagents/subagentManager.js.map +0 -1
- package/bin/src/engine/toolRegistry.d.ts.map +0 -1
- package/bin/src/engine/toolRegistry.js.map +0 -1
- package/bin/src/engine/verifier.d.ts.map +0 -1
- package/bin/src/engine/verifier.js.map +0 -1
- package/bin/src/engine/voiceEngine.d.ts.map +0 -1
- package/bin/src/engine/voiceEngine.js.map +0 -1
- package/bin/src/engine/web.d.ts.map +0 -1
- package/bin/src/engine/web.js.map +0 -1
- package/bin/src/engine/workspace/agentWorkspace.d.ts.map +0 -1
- package/bin/src/engine/workspace/agentWorkspace.js.map +0 -1
- package/bin/src/engine/workspace/index.d.ts.map +0 -1
- package/bin/src/engine/workspace/index.js.map +0 -1
- package/bin/src/index.d.ts.map +0 -1
- package/bin/src/index.js.map +0 -1
- package/bin/src/mcp/client.d.ts.map +0 -1
- package/bin/src/mcp/client.js.map +0 -1
- package/bin/src/mcp/cloudSync.d.ts.map +0 -1
- package/bin/src/mcp/cloudSync.js.map +0 -1
- package/bin/src/mcp/discovery.d.ts.map +0 -1
- package/bin/src/mcp/discovery.js.map +0 -1
- package/bin/src/mcp/health.d.ts.map +0 -1
- package/bin/src/mcp/health.js.map +0 -1
- package/bin/src/mcp/index.d.ts.map +0 -1
- package/bin/src/mcp/index.js.map +0 -1
- package/bin/src/mcp/manager.d.ts.map +0 -1
- package/bin/src/mcp/manager.js.map +0 -1
- package/bin/src/mcp/permissions.d.ts.map +0 -1
- package/bin/src/mcp/permissions.js.map +0 -1
- package/bin/src/mcp/persistence.d.ts.map +0 -1
- package/bin/src/mcp/persistence.js.map +0 -1
- package/bin/src/mcp/recovery.d.ts.map +0 -1
- package/bin/src/mcp/recovery.js.map +0 -1
- package/bin/src/mcp/telemetry.d.ts.map +0 -1
- package/bin/src/mcp/telemetry.js.map +0 -1
- package/bin/src/mcp/toolRouter.d.ts.map +0 -1
- package/bin/src/mcp/toolRouter.js.map +0 -1
- package/bin/src/mcp/transport.d.ts.map +0 -1
- package/bin/src/mcp/transport.js.map +0 -1
- package/bin/src/mcp/types.d.ts.map +0 -1
- package/bin/src/mcp/types.js.map +0 -1
- package/bin/src/server/server.d.ts.map +0 -1
- package/bin/src/server/server.js.map +0 -1
- package/bin/src/utils/admin.d.ts.map +0 -1
- package/bin/src/utils/admin.js.map +0 -1
- package/bin/src/utils/auditLogger.d.ts.map +0 -1
- package/bin/src/utils/auditLogger.js.map +0 -1
- package/bin/src/utils/auth.d.ts.map +0 -1
- package/bin/src/utils/auth.js.map +0 -1
- package/bin/src/utils/branding.d.ts.map +0 -1
- package/bin/src/utils/branding.js.map +0 -1
- package/bin/src/utils/claudeUI.d.ts.map +0 -1
- package/bin/src/utils/claudeUI.js.map +0 -1
- package/bin/src/utils/config.d.ts.map +0 -1
- package/bin/src/utils/config.js.map +0 -1
- package/bin/src/utils/email.d.ts.map +0 -1
- package/bin/src/utils/email.js.map +0 -1
- package/bin/src/utils/firebaseAuth.d.ts.map +0 -1
- package/bin/src/utils/firebaseAuth.js.map +0 -1
- package/bin/src/utils/holoseneAuth.d.ts.map +0 -1
- package/bin/src/utils/holoseneAuth.js.map +0 -1
- package/bin/src/utils/interruptHandler.d.ts.map +0 -1
- package/bin/src/utils/interruptHandler.js.map +0 -1
- package/bin/src/utils/language.d.ts.map +0 -1
- package/bin/src/utils/language.js.map +0 -1
- package/bin/src/utils/logger.d.ts.map +0 -1
- package/bin/src/utils/logger.js.map +0 -1
- package/bin/src/utils/markdown.d.ts.map +0 -1
- package/bin/src/utils/markdown.js.map +0 -1
- package/bin/src/utils/payment.d.ts.map +0 -1
- package/bin/src/utils/payment.js.map +0 -1
- package/bin/src/utils/pricing.d.ts.map +0 -1
- package/bin/src/utils/pricing.js.map +0 -1
- package/bin/src/utils/qrBridge.d.ts.map +0 -1
- package/bin/src/utils/qrBridge.js.map +0 -1
- package/bin/src/utils/razorpay.d.ts.map +0 -1
- package/bin/src/utils/razorpay.js.map +0 -1
- package/bin/src/utils/rules.d.ts.map +0 -1
- package/bin/src/utils/rules.js.map +0 -1
- package/bin/src/utils/session.d.ts.map +0 -1
- package/bin/src/utils/session.js.map +0 -1
- package/bin/src/utils/updateCheck.d.ts.map +0 -1
- package/bin/src/utils/updateCheck.js.map +0 -1
- package/downloads/invoice-2026-03.pdf +0 -1
- package/firebase.json +0 -74
- package/front-terrain-cli-1.0.0.tgz +0 -0
- package/web/ScoutFavicon.png +0 -0
- package/web/ScoutOGImage.png +0 -0
- package/web/app.js +0 -4510
- package/web/ft-logo.png +0 -0
- package/web/og-image.png +0 -0
- package/web/robots.txt +0 -24
- package/web/site.webmanifest +0 -16
- package/web/sitemap-tryscout.xml +0 -47
- package/web/sitemap.xml +0 -47
- package/web/styles.css +0 -3436
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type TaskPlanStep } from './agentState.js';
|
|
2
|
+
export interface StructuredPlan extends Array<TaskPlanStep> {
|
|
3
|
+
objective: string;
|
|
4
|
+
steps: TaskPlanStep[];
|
|
5
|
+
estimatedTotalSteps: number;
|
|
6
|
+
canRunConcurrently: boolean;
|
|
7
|
+
parallelGroups: number[][];
|
|
8
|
+
}
|
|
9
|
+
export interface SimpleAppActionResult {
|
|
10
|
+
isSimple: boolean;
|
|
11
|
+
action?: 'open' | 'close' | 'switch';
|
|
12
|
+
appName?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function checkSimpleAppAction(objective: string): SimpleAppActionResult;
|
|
15
|
+
export declare class TaskPlanner {
|
|
16
|
+
createPlan(objective: string, contextFiles?: string[]): StructuredPlan;
|
|
17
|
+
computeParallelGroups(steps: TaskPlanStep[]): number[][];
|
|
18
|
+
getParallelExecutableGroups(stepsOrPlan: TaskPlanStep[] | StructuredPlan): number[][];
|
|
19
|
+
refinePlanOnRecovery(currentSteps: TaskPlanStep[], failingStepId: number, alternativeDescription: string): TaskPlanStep[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=planner.d.ts.map
|
|
@@ -7,8 +7,13 @@ export function checkSimpleAppAction(objective) {
|
|
|
7
7
|
// Remove common conversational polite filler prefixes & suffixes
|
|
8
8
|
clean = clean.replace(/^(hey\s+)?scout\s+|^bro\s+|^bhai\s+|^please\s+|^can\s+you\s+(please\s+)?|^could\s+you\s+(please\s+)?|^would\s+you\s+(please\s+)?|^just\s+|^agent\s+/i, '');
|
|
9
9
|
clean = clean.replace(/\s+(please|bro|bhai|now|for\s+me|asap)$/i, '').trim();
|
|
10
|
+
// Check for quoted content (if quotes exist, user is specifying text to write, search, or type)
|
|
11
|
+
if (/["'“‘”’]/.test(objective)) {
|
|
12
|
+
return { isSimple: false };
|
|
13
|
+
}
|
|
10
14
|
// Check for secondary workflow indicators (if present, it's NOT a simple launch)
|
|
11
|
-
const hasSecondaryWork = /\b(and
|
|
15
|
+
const hasSecondaryWork = /\b(and|then|to|write|type|search|create|download|fill|click|inspect|fix|test|run|build|save|find|copy|paste|move|aur|likho|banao|kuch|dalo|daal|enter)\b/i.test(clean) ||
|
|
16
|
+
/\b(after\s+that|so\s+that|in\s+order\s+to|mein|me|pe)\b/i.test(clean);
|
|
12
17
|
if (hasSecondaryWork) {
|
|
13
18
|
return { isSimple: false };
|
|
14
19
|
}
|
|
@@ -19,11 +24,14 @@ export function checkSimpleAppAction(objective) {
|
|
|
19
24
|
'command prompt', 'browser', 'vs code', 'vscode', 'edge',
|
|
20
25
|
'firefox', 'spotify', 'slack', 'discord', 'file explorer', 'explorer'
|
|
21
26
|
];
|
|
27
|
+
const isExactAppMatch = (target, app) => {
|
|
28
|
+
return target === app || target === `${app} browser` || target === `${app} app` || target === `${app} application`;
|
|
29
|
+
};
|
|
22
30
|
// English patterns: (open|launch|start|run) [the] [app]
|
|
23
31
|
const openMatch = clean.match(/^(open|launch|start|run)\s+(?:the\s+)?(.+)$/i);
|
|
24
32
|
if (openMatch && openMatch[2]) {
|
|
25
33
|
const target = openMatch[2].trim();
|
|
26
|
-
const matchedApp = knownApps.find(app => target
|
|
34
|
+
const matchedApp = knownApps.find(app => isExactAppMatch(target, app));
|
|
27
35
|
if (matchedApp) {
|
|
28
36
|
return { isSimple: true, action: 'open', appName: matchedApp };
|
|
29
37
|
}
|
|
@@ -32,7 +40,7 @@ export function checkSimpleAppAction(objective) {
|
|
|
32
40
|
const closeMatch = clean.match(/^(close|kill|exit|quit|stop)\s+(?:the\s+)?(.+)$/i);
|
|
33
41
|
if (closeMatch && closeMatch[2]) {
|
|
34
42
|
const target = closeMatch[2].trim();
|
|
35
|
-
const matchedApp = knownApps.find(app => target
|
|
43
|
+
const matchedApp = knownApps.find(app => isExactAppMatch(target, app));
|
|
36
44
|
if (matchedApp) {
|
|
37
45
|
return { isSimple: true, action: 'close', appName: matchedApp };
|
|
38
46
|
}
|
|
@@ -41,7 +49,7 @@ export function checkSimpleAppAction(objective) {
|
|
|
41
49
|
const switchMatch = clean.match(/^(switch\s+to|focus|bring\s+up)\s+(?:the\s+)?(.+)$/i);
|
|
42
50
|
if (switchMatch && switchMatch[2]) {
|
|
43
51
|
const target = switchMatch[2].trim();
|
|
44
|
-
const matchedApp = knownApps.find(app => target
|
|
52
|
+
const matchedApp = knownApps.find(app => isExactAppMatch(target, app));
|
|
45
53
|
if (matchedApp) {
|
|
46
54
|
return { isSimple: true, action: 'switch', appName: matchedApp };
|
|
47
55
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type FileBackup } from '../../utils/config.js';
|
|
2
|
+
import { AgentWorkspace, type AgentWorkspaceData } from '../workspace/agentWorkspace.js';
|
|
3
|
+
import { type IComputerController } from '../computer/computerController.js';
|
|
4
|
+
import { type IBrowserController } from '../browser/index.js';
|
|
5
|
+
import { ActionVerifier } from '../actionVerifier.js';
|
|
6
|
+
import { ApprovalManager } from '../safety.js';
|
|
7
|
+
import { TaskPlanner } from '../planner.js';
|
|
8
|
+
import { UnifiedToolRegistry } from '../toolRegistry.js';
|
|
9
|
+
export interface AgentRuntimeOptions {
|
|
10
|
+
autoApprove?: boolean;
|
|
11
|
+
maxSteps?: number;
|
|
12
|
+
language?: string;
|
|
13
|
+
browserController?: IBrowserController;
|
|
14
|
+
computerController?: IComputerController;
|
|
15
|
+
workspaceDir?: string;
|
|
16
|
+
taskId?: string;
|
|
17
|
+
mockMode?: boolean;
|
|
18
|
+
tier?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RuntimeExecutionResult {
|
|
21
|
+
success: boolean;
|
|
22
|
+
summary: string;
|
|
23
|
+
taskId: string;
|
|
24
|
+
stepsTaken: number;
|
|
25
|
+
modifiedFiles: string[];
|
|
26
|
+
status: AgentWorkspaceData['status'];
|
|
27
|
+
}
|
|
28
|
+
export declare class AgentRuntime {
|
|
29
|
+
private cwd;
|
|
30
|
+
private autoApprove;
|
|
31
|
+
private maxSteps;
|
|
32
|
+
private mockMode;
|
|
33
|
+
private language?;
|
|
34
|
+
private abortController;
|
|
35
|
+
private isCancelled;
|
|
36
|
+
private cancelReason?;
|
|
37
|
+
private workspace;
|
|
38
|
+
private computerController;
|
|
39
|
+
private browserController;
|
|
40
|
+
private actionVerifier;
|
|
41
|
+
private approvalManager;
|
|
42
|
+
private planner;
|
|
43
|
+
private toolRegistry;
|
|
44
|
+
private historyMessages;
|
|
45
|
+
private modifiedFiles;
|
|
46
|
+
private backups;
|
|
47
|
+
private totalToolCalls;
|
|
48
|
+
private currentStep;
|
|
49
|
+
private startTime;
|
|
50
|
+
private readFilesHistory;
|
|
51
|
+
private toolCallHistory;
|
|
52
|
+
private screenshotCount;
|
|
53
|
+
private userTier;
|
|
54
|
+
private static readonly MAX_SCREENSHOTS_IN_HISTORY;
|
|
55
|
+
private static readonly SCREENSHOT_MAX_DIMENSION;
|
|
56
|
+
constructor(options?: AgentRuntimeOptions);
|
|
57
|
+
isProOrEnterprise(): boolean;
|
|
58
|
+
getWorkspace(): AgentWorkspace;
|
|
59
|
+
getComputerController(): IComputerController;
|
|
60
|
+
getBrowserController(): IBrowserController;
|
|
61
|
+
getActionVerifier(): ActionVerifier;
|
|
62
|
+
getApprovalManager(): ApprovalManager;
|
|
63
|
+
getPlanner(): TaskPlanner;
|
|
64
|
+
getToolRegistry(): UnifiedToolRegistry;
|
|
65
|
+
cancel(reason?: string): void;
|
|
66
|
+
isTaskCancelled(): boolean;
|
|
67
|
+
getModifiedFiles(): string[];
|
|
68
|
+
getBackups(): FileBackup[];
|
|
69
|
+
getStats(): {
|
|
70
|
+
totalSteps: number;
|
|
71
|
+
totalToolCalls: number;
|
|
72
|
+
modifiedFilesCount: number;
|
|
73
|
+
elapsedMs: number;
|
|
74
|
+
taskId: string;
|
|
75
|
+
status: "cancelled" | "completed" | "executing" | "failed" | "paused" | "planning" | "recovering" | "running" | "waiting_approval";
|
|
76
|
+
};
|
|
77
|
+
resetContext(): void;
|
|
78
|
+
private buildSystemPrompt;
|
|
79
|
+
executeGoal(userGoal: string): Promise<RuntimeExecutionResult>;
|
|
80
|
+
executeTool(name: string, args: any): Promise<{
|
|
81
|
+
result: string;
|
|
82
|
+
screenshotBase64?: string | undefined;
|
|
83
|
+
screenshotSummary?: string | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
dispatchTool(name: string, args: any): Promise<{
|
|
86
|
+
result: string;
|
|
87
|
+
screenshotBase64?: string | undefined;
|
|
88
|
+
screenshotSummary?: string | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
private dispatchComputerTool;
|
|
91
|
+
/**
|
|
92
|
+
* Read a screenshot file from disk, resize it to save tokens, and return as base64.
|
|
93
|
+
* Returns undefined if the file cannot be read.
|
|
94
|
+
*/
|
|
95
|
+
private readScreenshotAsBase64;
|
|
96
|
+
/**
|
|
97
|
+
* Capture a post-action screenshot automatically.
|
|
98
|
+
* This gives the model vision of what happened after a screen-modifying action.
|
|
99
|
+
* Includes a brief delay to let the UI settle.
|
|
100
|
+
*/
|
|
101
|
+
private capturePostActionScreenshot;
|
|
102
|
+
/**
|
|
103
|
+
* Remove old screenshot vision messages from history to prevent context overflow.
|
|
104
|
+
* Keeps only the most recent MAX_SCREENSHOTS_IN_HISTORY screenshots.
|
|
105
|
+
*/
|
|
106
|
+
private pruneOldScreenshots;
|
|
107
|
+
private dispatchBrowserTool;
|
|
108
|
+
private dispatchCoreTool;
|
|
109
|
+
private extractJsonToolCall;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=agentRuntime.d.ts.map
|
|
@@ -305,7 +305,18 @@ Action Rules:
|
|
|
305
305
|
const mcpRouting = getMCPManager().routeTools(userGoal);
|
|
306
306
|
const goalLower = (userGoal || '').toLowerCase();
|
|
307
307
|
const needsBrowser = goalLower.includes('browser') || goalLower.includes('website') || goalLower.includes('webpage') || goalLower.includes('http') || goalLower.includes('url') || goalLower.includes('scrape') || goalLower.includes('chrome');
|
|
308
|
-
const needsComputer = goalLower.includes('computer') ||
|
|
308
|
+
const needsComputer = goalLower.includes('computer') ||
|
|
309
|
+
goalLower.includes('desktop') ||
|
|
310
|
+
goalLower.includes('mouse') ||
|
|
311
|
+
goalLower.includes('coordinate') ||
|
|
312
|
+
goalLower.includes('drag') ||
|
|
313
|
+
goalLower.includes('double click') ||
|
|
314
|
+
goalLower.includes('notepad') ||
|
|
315
|
+
goalLower.includes('calc') ||
|
|
316
|
+
goalLower.includes('paint') ||
|
|
317
|
+
goalLower.includes('type') ||
|
|
318
|
+
this.workspace?.getExecutionIntent()?.requiredInteraction === 'computer' ||
|
|
319
|
+
((this.workspace?.getExecutionIntent()?.requiredApplications?.length ?? 0) > 0);
|
|
309
320
|
let baseTools = this.toolRegistry.getToolsForTier(this.userTier);
|
|
310
321
|
if (mcpRouting.tools.length > 0 && !needsBrowser && !needsComputer) {
|
|
311
322
|
const ESSENTIAL_BASE_TOOLS = new Set(['read_file', 'write_file', 'edit_file', 'run_command', 'list_dir', 'grep_search', 'task_completed', 'ask_user', 'speak_text', 'scratchpad', 'computer_open_app']);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type RiskLevel = 'low' | 'medium' | 'high' | 'critical' | 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
2
|
+
export type ActionRiskLevel = RiskLevel;
|
|
3
|
+
export interface ActionRiskAssessment {
|
|
4
|
+
level: 'low' | 'medium' | 'high' | 'critical';
|
|
5
|
+
requiresApproval: boolean;
|
|
6
|
+
reason: string;
|
|
7
|
+
details?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
export interface ApprovalRequest {
|
|
10
|
+
id: string;
|
|
11
|
+
taskId: string;
|
|
12
|
+
tool: string;
|
|
13
|
+
action?: string | undefined;
|
|
14
|
+
target?: string | undefined;
|
|
15
|
+
args: Record<string, any>;
|
|
16
|
+
risk: ActionRiskAssessment;
|
|
17
|
+
riskLevel?: string | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
timestamp: string;
|
|
20
|
+
status: 'pending' | 'approved' | 'rejected' | 'auto_approved';
|
|
21
|
+
resolvedAt?: string | undefined;
|
|
22
|
+
reason?: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
export declare class RiskClassifier {
|
|
25
|
+
private sensitiveKeywords;
|
|
26
|
+
private destructiveCommands;
|
|
27
|
+
assessAction(tool: string, args?: Record<string, any>): ActionRiskAssessment;
|
|
28
|
+
classify(tool: string, args?: Record<string, any>): 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
29
|
+
}
|
|
30
|
+
export declare class ApprovalManager {
|
|
31
|
+
private static _instance;
|
|
32
|
+
static getInstance(): ApprovalManager;
|
|
33
|
+
private classifier;
|
|
34
|
+
private autoApprove;
|
|
35
|
+
private pendingRequests;
|
|
36
|
+
private approvalResolvers;
|
|
37
|
+
constructor(autoApprove?: boolean);
|
|
38
|
+
setAutoApprove(enabled: boolean): void;
|
|
39
|
+
isAutoApprove(): boolean;
|
|
40
|
+
checkAction(tool: string, args?: Record<string, any>): ActionRiskAssessment;
|
|
41
|
+
requestApproval(requestOrTaskId: string | {
|
|
42
|
+
action: string;
|
|
43
|
+
target?: string;
|
|
44
|
+
riskLevel?: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
suggestedMitigation?: string;
|
|
47
|
+
taskId?: string;
|
|
48
|
+
args?: Record<string, any>;
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}, tool?: string, args?: Record<string, any>, assessment?: ActionRiskAssessment): Promise<any>;
|
|
51
|
+
submitDecision(requestId: string, approved: boolean): boolean;
|
|
52
|
+
resolveRequest(requestId: string, approved: boolean, reason?: string): boolean;
|
|
53
|
+
getPendingRequests(): ApprovalRequest[];
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=safety.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type SubagentRole = 'architect' | 'coder' | 'tester' | 'reviewer' | 'general';
|
|
2
|
+
export interface SubagentTaskRequest {
|
|
3
|
+
role: SubagentRole;
|
|
4
|
+
task: string;
|
|
5
|
+
context?: string | undefined;
|
|
6
|
+
maxSteps?: number | undefined;
|
|
7
|
+
depth?: number | undefined;
|
|
8
|
+
cwd?: string | undefined;
|
|
9
|
+
tier?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface SubagentTaskResult {
|
|
12
|
+
success: boolean;
|
|
13
|
+
role: SubagentRole;
|
|
14
|
+
summary: string;
|
|
15
|
+
modifiedFiles: string[];
|
|
16
|
+
stepsUsed: number;
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class SubagentManager {
|
|
20
|
+
private static instance;
|
|
21
|
+
private activeDelegations;
|
|
22
|
+
static getInstance(): SubagentManager;
|
|
23
|
+
/**
|
|
24
|
+
* Delegate a scoped subtask to an autonomous specialist subagent.
|
|
25
|
+
*/
|
|
26
|
+
delegate(req: SubagentTaskRequest): Promise<SubagentTaskResult>;
|
|
27
|
+
getActiveDelegationsCount(): number;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=subagentManager.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ToolDefinition } from './agentEngine.js';
|
|
2
|
+
export interface ToolSelectionStrategyResult {
|
|
3
|
+
selectedTool: string;
|
|
4
|
+
level: 'api' | 'dom' | 'computer';
|
|
5
|
+
reason: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const BROWSER_AUTOMATION_TOOLS: ToolDefinition[];
|
|
8
|
+
export declare const COMPUTER_USE_TOOLS: ToolDefinition[];
|
|
9
|
+
export declare const SCRATCHPAD_TOOLS: ToolDefinition[];
|
|
10
|
+
export declare class UnifiedToolRegistry {
|
|
11
|
+
private toolsMap;
|
|
12
|
+
constructor();
|
|
13
|
+
getTool(name: string): ToolDefinition | undefined;
|
|
14
|
+
getAllTools(): ToolDefinition[];
|
|
15
|
+
registerMcpTool(toolDef: ToolDefinition): void;
|
|
16
|
+
unregisterMcpToolsForServer(serverId: string): void;
|
|
17
|
+
getMcpTools(): ToolDefinition[];
|
|
18
|
+
/**
|
|
19
|
+
* Get tools filtered by user subscription tier:
|
|
20
|
+
* - Free: Only basic developer tools (code editing, creating files/folders, running commands, reading files)
|
|
21
|
+
* - Pro / Enterprise: All tools including Scratchpad, Autonomous Computer Use, and Browser Automation
|
|
22
|
+
*/
|
|
23
|
+
getToolsForTier(tier?: string): ToolDefinition[];
|
|
24
|
+
getToolsForMode(mode: 'all' | 'workspace_only' | 'browser_only' | 'computer_only'): ToolDefinition[];
|
|
25
|
+
/**
|
|
26
|
+
* Tool selection strategy enforcing strict tool hierarchy:
|
|
27
|
+
* 1. DIRECT TOOL/API: If exact file/command operation is possible, PREFER API/TOOL (read_file, write_file, run_command)
|
|
28
|
+
* 2. STRUCTURED BROWSER/DOM: If web interaction is needed, PREFER DOM/BROWSER (browser_navigate, browser_click, browser_type)
|
|
29
|
+
* 3. COMPUTER/VISUAL INTERACTION: If desktop app / GUI control is required, USE COMPUTER ACTIONS (computer_screenshot, computer_click, computer_type, computer_open_app)
|
|
30
|
+
*/
|
|
31
|
+
selectOptimalTool(actionGoal: string, context?: {
|
|
32
|
+
hasBrowser?: boolean;
|
|
33
|
+
hasDOM?: boolean;
|
|
34
|
+
hasDesktopApp?: boolean;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}): string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=toolRegistry.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface VerificationResult {
|
|
2
|
+
valid: boolean;
|
|
3
|
+
errors: string[];
|
|
4
|
+
output: string;
|
|
5
|
+
referencedFiles?: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Parses raw compiler/terminal output to extract key error blocks and referenced file paths
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractErrorDiagnostics(output: string): {
|
|
11
|
+
keyErrors: string[];
|
|
12
|
+
referencedFiles: string[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Perform automated syntax, type, and compilation check on a target file
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkFileSyntax(filePath: string, cwd: string): Promise<VerificationResult>;
|
|
18
|
+
/**
|
|
19
|
+
* Execute custom verification command, project test suite, or package build check
|
|
20
|
+
*/
|
|
21
|
+
export declare function runProjectVerification(cwd: string, verifyCmd?: string): Promise<VerificationResult>;
|
|
22
|
+
/**
|
|
23
|
+
* Auto-fix and recheck files iteratively until errors are resolved or max retries reached
|
|
24
|
+
*/
|
|
25
|
+
export declare function verifyAndSelfHealFiles(targetFiles: string[], cwd: string, projectName: string, filesList: string[], options?: {
|
|
26
|
+
verifyCmd?: string | undefined;
|
|
27
|
+
maxRetries?: number | undefined;
|
|
28
|
+
language?: string | undefined;
|
|
29
|
+
native?: boolean | undefined;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
success: boolean;
|
|
32
|
+
verifiedFiles: string[];
|
|
33
|
+
remainingErrors: string[];
|
|
34
|
+
}>;
|
|
35
|
+
export interface SmartCommandResult {
|
|
36
|
+
exitCode: number;
|
|
37
|
+
output: string;
|
|
38
|
+
isBackgroundServer: boolean;
|
|
39
|
+
pid?: number | undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Executes a shell command smartly: fast commands return exit code immediately,
|
|
43
|
+
* while persistent server/daemon processes (e.g. node server.js, npm start) are left running in background
|
|
44
|
+
* so Scout Agent does not hang.
|
|
45
|
+
*/
|
|
46
|
+
export declare function executeSmartCommand(cmd: string, cwd: string, initialWaitMs?: number, maxWaitMs?: number): Promise<SmartCommandResult>;
|
|
47
|
+
//# sourceMappingURL=verifier.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare function promptInteractionMode(): Promise<'text'>;
|
|
2
|
+
export interface VoiceOptions {
|
|
3
|
+
async?: boolean;
|
|
4
|
+
rate?: number;
|
|
5
|
+
volume?: number;
|
|
6
|
+
tierOverride?: string;
|
|
7
|
+
voiceId?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Strip markdown formatting, code blocks, URLs, and special characters for clean TTS speech.
|
|
11
|
+
*/
|
|
12
|
+
export declare function cleanTextForSpeech(text: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Text-to-Speech (TTS) audio synthesis has been disabled in Scout.
|
|
15
|
+
* Retained as a safe no-op to preserve backwards compatibility.
|
|
16
|
+
*/
|
|
17
|
+
export declare function speakText(_text: string, _options?: VoiceOptions): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Native Speech-to-Text (STT) directly inside the terminal.
|
|
20
|
+
* Automatically utilizes neural Whisper (OpenAI) for 99.9% accuracy on tech commands,
|
|
21
|
+
* with automatic Voice Activity Detection (VAD) and graceful legacy fallback.
|
|
22
|
+
*/
|
|
23
|
+
export declare function listenSpeechToText(options?: {
|
|
24
|
+
timeoutMs?: number;
|
|
25
|
+
}): Promise<string>;
|
|
26
|
+
//# sourceMappingURL=voiceEngine.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface WebSearchResult {
|
|
2
|
+
title: string;
|
|
3
|
+
url: string;
|
|
4
|
+
snippet: string;
|
|
5
|
+
}
|
|
6
|
+
export interface WebContextResult {
|
|
7
|
+
context: string;
|
|
8
|
+
sources: WebSearchResult[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Perform a live web search using DuckDuckGo (HTML endpoint) with fallback support for Tavily / Serper API keys if provided in environment.
|
|
12
|
+
*/
|
|
13
|
+
export declare function searchWeb(query: string, maxResults?: number): Promise<WebSearchResult[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Fetch text content of a specific webpage
|
|
16
|
+
*/
|
|
17
|
+
export declare function fetchWebPage(targetUrl: string, maxLength?: number): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Build rich formatted web search context string for LLM prompts
|
|
20
|
+
*/
|
|
21
|
+
export declare function getWebContext(query: string): Promise<WebContextResult>;
|
|
22
|
+
//# sourceMappingURL=web.d.ts.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { type AutonomousTaskState, type TaskPlanStep, type TaskObservation, type TaskArtifact, type TaskError, type PendingAction, TaskStateManager } from '../agentState.js';
|
|
2
|
+
export interface ExecutionIntent {
|
|
3
|
+
requiredApplications: string[];
|
|
4
|
+
requiredInteraction: 'computer' | 'browser' | 'code_repo' | 'mixed';
|
|
5
|
+
allowAlternativeTools: boolean;
|
|
6
|
+
targetDestination?: string | undefined;
|
|
7
|
+
targetArtifactName?: string | undefined;
|
|
8
|
+
rationale?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function resolveDesktopPath(filename?: string): string;
|
|
11
|
+
export declare function inferExecutionIntent(goal: string): ExecutionIntent;
|
|
12
|
+
export interface WorkspaceEnvironment {
|
|
13
|
+
activeApplication: string | null;
|
|
14
|
+
activeWindow: string | null;
|
|
15
|
+
expectedApplication: string | null;
|
|
16
|
+
activeUrl: string | null;
|
|
17
|
+
cwd: string;
|
|
18
|
+
desktopDir: string;
|
|
19
|
+
platform: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AgentWorkspaceData {
|
|
22
|
+
taskId: string;
|
|
23
|
+
objective: string;
|
|
24
|
+
status: AutonomousTaskState['status'] | 'cancelled';
|
|
25
|
+
plan: TaskPlanStep[];
|
|
26
|
+
currentStep: number;
|
|
27
|
+
completedSteps: number[];
|
|
28
|
+
observations: TaskObservation[];
|
|
29
|
+
environment: WorkspaceEnvironment;
|
|
30
|
+
executionIntent: ExecutionIntent;
|
|
31
|
+
artifacts: TaskArtifact[];
|
|
32
|
+
errors: TaskError[];
|
|
33
|
+
recoveryInfo?: {
|
|
34
|
+
strategy: string;
|
|
35
|
+
reason: string;
|
|
36
|
+
attempt: number;
|
|
37
|
+
} | undefined;
|
|
38
|
+
pendingApproval?: PendingAction | null | undefined;
|
|
39
|
+
constraints: string[];
|
|
40
|
+
scratchpadNotes?: string;
|
|
41
|
+
verificationStatus: 'pending' | 'verified' | 'failed' | null;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
}
|
|
45
|
+
export declare class AgentWorkspace {
|
|
46
|
+
private data;
|
|
47
|
+
private stateManager;
|
|
48
|
+
private workspaceDir;
|
|
49
|
+
constructor(taskIdOrDir?: string, objective?: string, workspaceDir?: string);
|
|
50
|
+
getStateManager(): TaskStateManager;
|
|
51
|
+
getData(): AgentWorkspaceData;
|
|
52
|
+
getExecutionIntent(): ExecutionIntent;
|
|
53
|
+
setExecutionIntent(intent: ExecutionIntent): void;
|
|
54
|
+
getExpectedApplication(): string | null;
|
|
55
|
+
setExpectedApplication(app: string | null): void;
|
|
56
|
+
validateToolExecution(toolName: string, args: Record<string, any>): {
|
|
57
|
+
allowed: boolean;
|
|
58
|
+
reason?: string;
|
|
59
|
+
};
|
|
60
|
+
setObjective(objective: string): void;
|
|
61
|
+
setPlan(steps: TaskPlanStep[] | string[]): void;
|
|
62
|
+
updatePlan(steps: TaskPlanStep[]): void;
|
|
63
|
+
startStep(stepNumber: number, description?: string): void;
|
|
64
|
+
completeStep(stepNumber: number, summary?: string): void;
|
|
65
|
+
failStep(stepNumber: number, reason: string): void;
|
|
66
|
+
addObservation(obs: {
|
|
67
|
+
tool: string;
|
|
68
|
+
resultSummary: string;
|
|
69
|
+
verified?: boolean;
|
|
70
|
+
target?: string;
|
|
71
|
+
step?: number;
|
|
72
|
+
}): void;
|
|
73
|
+
recordArtifact(artifact: {
|
|
74
|
+
filename?: string;
|
|
75
|
+
name?: string;
|
|
76
|
+
path: string;
|
|
77
|
+
type?: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
application?: string;
|
|
80
|
+
verified?: boolean;
|
|
81
|
+
sizeBytes?: number;
|
|
82
|
+
}): TaskArtifact;
|
|
83
|
+
recordError(message: string, tool?: string, recoveryAttempted?: string, recovered?: boolean): void;
|
|
84
|
+
setRecoveryInfo(info: {
|
|
85
|
+
strategy: string;
|
|
86
|
+
reason: string;
|
|
87
|
+
attempt: number;
|
|
88
|
+
} | undefined): void;
|
|
89
|
+
setActiveApplication(appName: string | null): void;
|
|
90
|
+
setActiveWindow(windowTitle: string | null): void;
|
|
91
|
+
setActiveUrl(url: string | null): void;
|
|
92
|
+
setPendingApproval(pending: PendingAction | null): void;
|
|
93
|
+
setVerificationStatus(status: 'pending' | 'verified' | 'failed' | null): void;
|
|
94
|
+
addConstraint(constraint: string): void;
|
|
95
|
+
setStatus(status: AgentWorkspaceData['status']): void;
|
|
96
|
+
private touch;
|
|
97
|
+
/**
|
|
98
|
+
* Compacts the current structured operational workspace into a concise,
|
|
99
|
+
* high-signal summary string for model injection.
|
|
100
|
+
* Prevents context explosion while keeping key state visible.
|
|
101
|
+
*/
|
|
102
|
+
compactWorkspaceForPrompt(): string;
|
|
103
|
+
getScratchpad(): string;
|
|
104
|
+
setScratchpad(notes: string): void;
|
|
105
|
+
clearScratchpad(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Compacts history messages array by keeping the initial context,
|
|
108
|
+
* summarizing middle steps into workspace state, and keeping the latest turns.
|
|
109
|
+
*/
|
|
110
|
+
compactHistoryMessages(messages: any[], maxRecentTurns?: number): any[];
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=agentWorkspace.d.ts.map
|
package/bin/src/index.js
CHANGED
|
@@ -38,13 +38,13 @@ program
|
|
|
38
38
|
.name('scout')
|
|
39
39
|
.alias('ft')
|
|
40
40
|
.description('FrontTerrain The Onboarding Co-Pilot for New Codebases')
|
|
41
|
-
.version('9.
|
|
41
|
+
.version('9.5.2');
|
|
42
42
|
// Header UI on execution with FrontTerrain proprietary logo & version auto-checker
|
|
43
43
|
program.hook('preAction', async (_thisCommand, actionCommand) => {
|
|
44
|
-
intro(renderBranding('9.
|
|
44
|
+
intro(renderBranding('9.5.2'));
|
|
45
45
|
const cmdName = actionCommand ? actionCommand.name() : '';
|
|
46
46
|
if (cmdName !== 'upgrade') {
|
|
47
|
-
await checkForUpdates('9.
|
|
47
|
+
await checkForUpdates('9.5.2');
|
|
48
48
|
}
|
|
49
49
|
// Auth Guard: enforce authentication for all commands except login, signup, upgrade, help, dashboard, auth, status, plan, mcp, switch, accounts
|
|
50
50
|
const EXEMPT_COMMANDS = ['login', 'signin', 'signup', 'register', 'upgrade', 'help', 'dashboard', 'web-ui', 'gui', 'auth', 'status', 'quota', 'usage', 'credits', 'plan', 'pricing', 'subscribe', 'mcp', 'switch', 'accounts', 'account'];
|
|
@@ -265,7 +265,7 @@ program
|
|
|
265
265
|
.command('upgrade')
|
|
266
266
|
.description('Check for updates and auto-upgrade Scout to the latest version')
|
|
267
267
|
.action(async () => {
|
|
268
|
-
await checkForUpdates('9.
|
|
268
|
+
await checkForUpdates('9.5.2', true);
|
|
269
269
|
outro(chalk.cyan('Upgrade check complete.'));
|
|
270
270
|
});
|
|
271
271
|
program
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Protocol Client
|
|
3
|
+
* Implements JSON-RPC 2.0 handshake, capability negotiation, ping, tool discovery, and tool execution.
|
|
4
|
+
*/
|
|
5
|
+
import type { IMCPTransport } from './transport.js';
|
|
6
|
+
import type { MCPServerCapabilities } from './types.js';
|
|
7
|
+
import type { RawMcpToolInput } from './discovery.js';
|
|
8
|
+
export interface MCPInitializeResult {
|
|
9
|
+
protocolVersion: string;
|
|
10
|
+
capabilities: MCPServerCapabilities;
|
|
11
|
+
serverInfo: {
|
|
12
|
+
name: string;
|
|
13
|
+
version?: string | undefined;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
instructions?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface McpContentPart {
|
|
19
|
+
type?: string | undefined;
|
|
20
|
+
text?: string | undefined;
|
|
21
|
+
data?: string | undefined;
|
|
22
|
+
mimeType?: string | undefined;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface McpCallToolResult {
|
|
26
|
+
content?: McpContentPart[] | string | undefined;
|
|
27
|
+
isError?: boolean | undefined;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
export declare class MCPClient {
|
|
31
|
+
private transport;
|
|
32
|
+
private initialized;
|
|
33
|
+
private serverInfo?;
|
|
34
|
+
private capabilities;
|
|
35
|
+
private protocolVersion;
|
|
36
|
+
constructor(transport: IMCPTransport);
|
|
37
|
+
isConnected(): boolean;
|
|
38
|
+
getServerInfo(): MCPInitializeResult['serverInfo'] | undefined;
|
|
39
|
+
getCapabilities(): MCPServerCapabilities;
|
|
40
|
+
getProtocolVersion(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Connect transport and perform the MCP initialization handshake
|
|
43
|
+
*/
|
|
44
|
+
connectAndInitialize(timeoutMs?: number): Promise<MCPInitializeResult>;
|
|
45
|
+
/**
|
|
46
|
+
* Measure ping round-trip latency in milliseconds
|
|
47
|
+
*/
|
|
48
|
+
ping(timeoutMs?: number): Promise<number>;
|
|
49
|
+
/**
|
|
50
|
+
* Discover all tools exposed by the MCP server with automatic pagination
|
|
51
|
+
*/
|
|
52
|
+
listTools(timeoutMs?: number): Promise<RawMcpToolInput[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Execute an MCP tool via 'tools/call'
|
|
55
|
+
*/
|
|
56
|
+
callTool(name: string, args?: Record<string, unknown>, timeoutMs?: number): Promise<unknown>;
|
|
57
|
+
/**
|
|
58
|
+
* Disconnect the client and close transport
|
|
59
|
+
*/
|
|
60
|
+
disconnect(): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=client.d.ts.map
|