ft-scout 9.5.5 → 9.5.7
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 +1 -1
- package/bin/src/engine/agent/computerUseLoop.d.ts +107 -0
- package/bin/src/engine/agent/computerUseLoop.js +413 -0
- package/bin/src/engine/agent/index.d.ts +2 -0
- package/bin/src/engine/agent/index.js +2 -0
- package/bin/src/engine/agent/recovery/index.d.ts +4 -0
- package/bin/src/engine/agent/recovery/index.js +4 -0
- package/bin/src/engine/agent/recovery/loopDetector.d.ts +26 -0
- package/bin/src/engine/agent/recovery/loopDetector.js +126 -0
- package/bin/src/engine/agent/recovery/recoveryManager.d.ts +43 -0
- package/bin/src/engine/agent/recovery/recoveryManager.js +271 -0
- package/bin/src/engine/agent/recovery/types.d.ts +48 -0
- package/bin/src/engine/agent/recovery/types.js +4 -0
- package/bin/src/engine/agent/verification/index.d.ts +3 -0
- package/bin/src/engine/agent/verification/index.js +3 -0
- package/bin/src/engine/agent/verification/stateChangeVerifier.d.ts +22 -0
- package/bin/src/engine/agent/verification/stateChangeVerifier.js +282 -0
- package/bin/src/engine/agent/verification/types.d.ts +28 -0
- package/bin/src/engine/agent/verification/types.js +4 -0
- package/bin/src/engine/agentEngine.d.ts +3 -1
- package/bin/src/engine/agentEngine.js +370 -56
- package/bin/src/engine/agentState.d.ts +41 -1
- package/bin/src/engine/agentState.js +45 -0
- package/bin/src/engine/browser/actions/actionEngine.d.ts +41 -0
- package/bin/src/engine/browser/actions/actionEngine.js +707 -0
- package/bin/src/engine/browser/actions/index.d.ts +4 -0
- package/bin/src/engine/browser/actions/index.js +4 -0
- package/bin/src/engine/browser/actions/reliability.d.ts +41 -0
- package/bin/src/engine/browser/actions/reliability.js +170 -0
- package/bin/src/engine/browser/actions/types.d.ts +50 -0
- package/bin/src/engine/browser/actions/types.js +2 -0
- package/bin/src/engine/browser/browserController.d.ts +18 -0
- package/bin/src/engine/browser/browserController.js +44 -12
- package/bin/src/engine/browser/index.d.ts +2 -0
- package/bin/src/engine/browser/index.js +2 -0
- package/bin/src/engine/browser/observer/accessibilityTree.d.ts +14 -0
- package/bin/src/engine/browser/observer/accessibilityTree.js +214 -0
- package/bin/src/engine/browser/observer/browserObserver.d.ts +29 -0
- package/bin/src/engine/browser/observer/browserObserver.js +204 -0
- package/bin/src/engine/browser/observer/domExtractor.d.ts +30 -0
- package/bin/src/engine/browser/observer/domExtractor.js +407 -0
- package/bin/src/engine/browser/observer/index.d.ts +5 -0
- package/bin/src/engine/browser/observer/index.js +5 -0
- package/bin/src/engine/browser/observer/types.d.ts +163 -0
- package/bin/src/engine/browser/observer/types.js +8 -0
- package/bin/src/engine/computer/computerController.d.ts +45 -2
- package/bin/src/engine/computer/computerController.js +178 -38
- package/bin/src/engine/computer/mockComputer.d.ts +7 -2
- package/bin/src/engine/computer/mockComputer.js +59 -1
- package/bin/src/engine/computer/scoutDriver.cs +310 -63
- package/bin/src/engine/llm.js +35 -15
- package/bin/src/engine/models/harpProvider.d.ts +32 -0
- package/bin/src/engine/models/harpProvider.js +172 -0
- package/bin/src/engine/models/index.d.ts +6 -0
- package/bin/src/engine/models/index.js +6 -0
- package/bin/src/engine/models/localModelProvider.d.ts +11 -0
- package/bin/src/engine/models/localModelProvider.js +48 -0
- package/bin/src/engine/models/openaiProvider.d.ts +11 -0
- package/bin/src/engine/models/openaiProvider.js +50 -0
- package/bin/src/engine/models/reasoningOrchestrator.d.ts +17 -0
- package/bin/src/engine/models/reasoningOrchestrator.js +75 -0
- package/bin/src/engine/models/types.d.ts +63 -0
- package/bin/src/engine/models/types.js +2 -0
- package/bin/src/engine/production/index.d.ts +3 -0
- package/bin/src/engine/production/index.js +3 -0
- package/bin/src/engine/production/taskReplay.d.ts +37 -0
- package/bin/src/engine/production/taskReplay.js +81 -0
- package/bin/src/engine/production/telemetry.d.ts +43 -0
- package/bin/src/engine/production/telemetry.js +68 -0
- package/bin/src/engine/runtime/agentRuntime.d.ts +1 -1
- package/bin/src/engine/runtime/agentRuntime.js +33 -7
- package/bin/src/engine/safety/index.d.ts +3 -0
- package/bin/src/engine/safety/index.js +3 -0
- package/bin/src/engine/safety/policyEngine.d.ts +40 -0
- package/bin/src/engine/safety/policyEngine.js +282 -0
- package/bin/src/engine/safety/types.d.ts +24 -0
- package/bin/src/engine/safety/types.js +2 -0
- package/bin/src/engine/safety.d.ts +1 -0
- package/bin/src/engine/safety.js +1 -0
- package/bin/src/engine/toolRegistry.d.ts +4 -0
- package/bin/src/engine/toolRegistry.js +9 -0
- package/bin/src/engine/tools/domainHandlers.d.ts +61 -0
- package/bin/src/engine/tools/domainHandlers.js +495 -0
- package/bin/src/engine/tools/index.d.ts +4 -0
- package/bin/src/engine/tools/index.js +4 -0
- package/bin/src/engine/tools/types.d.ts +56 -0
- package/bin/src/engine/tools/types.js +2 -0
- package/bin/src/engine/tools/unifiedRouter.d.ts +29 -0
- package/bin/src/engine/tools/unifiedRouter.js +426 -0
- package/bin/src/engine/workspace/agentWorkspace.js +4 -2
- package/bin/src/index.js +4 -4
- package/bin/src/mcp/client.js +1 -1
- package/bin/src/server/server.js +57 -18
- package/bin/src/utils/branding.js +1 -1
- package/bin/src/utils/claudeUI.d.ts +10 -1
- package/bin/src/utils/claudeUI.js +136 -6
- package/bin/src/utils/qrBridge.js +1 -1
- package/bin/src/utils/support.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type BrowserState } from './browser/index.js';
|
|
1
2
|
export interface TaskPlanStep {
|
|
2
3
|
id: number;
|
|
3
4
|
description: string;
|
|
@@ -52,6 +53,24 @@ export interface PendingAction {
|
|
|
52
53
|
riskReason: string;
|
|
53
54
|
requestedAt: string;
|
|
54
55
|
}
|
|
56
|
+
export interface TaskState {
|
|
57
|
+
objective: string;
|
|
58
|
+
plan: TaskPlanStep[];
|
|
59
|
+
current_step: number;
|
|
60
|
+
completed_steps: number[];
|
|
61
|
+
browser_state?: BrowserState | undefined;
|
|
62
|
+
tool_history: Array<{
|
|
63
|
+
step: number;
|
|
64
|
+
tool: string;
|
|
65
|
+
args: Record<string, any>;
|
|
66
|
+
resultSummary?: string | undefined;
|
|
67
|
+
timestamp: string;
|
|
68
|
+
}>;
|
|
69
|
+
errors: TaskError[];
|
|
70
|
+
retries: number;
|
|
71
|
+
status: 'planning' | 'running' | 'executing' | 'waiting_approval' | 'recovering' | 'completed' | 'failed' | 'paused' | 'timeout';
|
|
72
|
+
structured_result?: Record<string, any> | undefined;
|
|
73
|
+
}
|
|
55
74
|
export interface AutonomousTaskState {
|
|
56
75
|
task_id: string;
|
|
57
76
|
taskId: string;
|
|
@@ -70,11 +89,21 @@ export interface AutonomousTaskState {
|
|
|
70
89
|
errors: TaskError[];
|
|
71
90
|
pending_action: PendingAction | null;
|
|
72
91
|
verification_status: 'pending' | 'verified' | 'failed' | null;
|
|
73
|
-
status: 'planning' | 'running' | 'executing' | 'waiting_approval' | 'recovering' | 'completed' | 'failed' | 'paused';
|
|
92
|
+
status: 'planning' | 'running' | 'executing' | 'waiting_approval' | 'recovering' | 'completed' | 'failed' | 'paused' | 'timeout';
|
|
74
93
|
created_at: string;
|
|
75
94
|
updated_at: string;
|
|
76
95
|
completed_at?: string | undefined;
|
|
77
96
|
metadata?: Record<string, any> | undefined;
|
|
97
|
+
browser_state?: BrowserState | undefined;
|
|
98
|
+
tool_history?: Array<{
|
|
99
|
+
step: number;
|
|
100
|
+
tool: string;
|
|
101
|
+
args: Record<string, any>;
|
|
102
|
+
resultSummary?: string | undefined;
|
|
103
|
+
timestamp: string;
|
|
104
|
+
}> | undefined;
|
|
105
|
+
retries?: number | undefined;
|
|
106
|
+
structured_result?: Record<string, any> | undefined;
|
|
78
107
|
}
|
|
79
108
|
export declare class TaskStateManager {
|
|
80
109
|
private state;
|
|
@@ -121,6 +150,17 @@ export declare class TaskStateManager {
|
|
|
121
150
|
mimeType?: string | undefined;
|
|
122
151
|
}): TaskArtifact;
|
|
123
152
|
getArtifacts(): TaskArtifact[];
|
|
153
|
+
setBrowserState(browserState: BrowserState): void;
|
|
154
|
+
addToolHistory(entry: {
|
|
155
|
+
step: number;
|
|
156
|
+
tool: string;
|
|
157
|
+
args: Record<string, any>;
|
|
158
|
+
resultSummary?: string | undefined;
|
|
159
|
+
}): void;
|
|
160
|
+
incrementRetries(): number;
|
|
161
|
+
resetRetries(): void;
|
|
162
|
+
setStructuredResult(result: Record<string, any>): void;
|
|
163
|
+
getTaskState(): TaskState;
|
|
124
164
|
setActiveApplication(appName: string | null): void;
|
|
125
165
|
setActiveUrl(url: string | null): void;
|
|
126
166
|
setActiveWindow(windowTitle: string | null): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import {} from './browser/index.js';
|
|
3
4
|
export class TaskStateManager {
|
|
4
5
|
state;
|
|
5
6
|
workspaceDir;
|
|
@@ -245,6 +246,50 @@ export class TaskStateManager {
|
|
|
245
246
|
getArtifacts() {
|
|
246
247
|
return [...this.state.artifacts];
|
|
247
248
|
}
|
|
249
|
+
setBrowserState(browserState) {
|
|
250
|
+
this.state.browser_state = browserState;
|
|
251
|
+
this.touch();
|
|
252
|
+
}
|
|
253
|
+
addToolHistory(entry) {
|
|
254
|
+
if (!this.state.tool_history) {
|
|
255
|
+
this.state.tool_history = [];
|
|
256
|
+
}
|
|
257
|
+
this.state.tool_history.push({
|
|
258
|
+
...entry,
|
|
259
|
+
timestamp: new Date().toISOString(),
|
|
260
|
+
});
|
|
261
|
+
if (this.state.tool_history.length > 50) {
|
|
262
|
+
this.state.tool_history.shift();
|
|
263
|
+
}
|
|
264
|
+
this.touch();
|
|
265
|
+
}
|
|
266
|
+
incrementRetries() {
|
|
267
|
+
this.state.retries = (this.state.retries || 0) + 1;
|
|
268
|
+
this.touch();
|
|
269
|
+
return this.state.retries;
|
|
270
|
+
}
|
|
271
|
+
resetRetries() {
|
|
272
|
+
this.state.retries = 0;
|
|
273
|
+
this.touch();
|
|
274
|
+
}
|
|
275
|
+
setStructuredResult(result) {
|
|
276
|
+
this.state.structured_result = result;
|
|
277
|
+
this.touch();
|
|
278
|
+
}
|
|
279
|
+
getTaskState() {
|
|
280
|
+
return {
|
|
281
|
+
objective: this.state.objective || this.state.goal,
|
|
282
|
+
plan: this.state.plan,
|
|
283
|
+
current_step: this.state.current_step,
|
|
284
|
+
completed_steps: this.state.completed_steps,
|
|
285
|
+
browser_state: this.state.browser_state,
|
|
286
|
+
tool_history: this.state.tool_history || [],
|
|
287
|
+
errors: this.state.errors,
|
|
288
|
+
retries: this.state.retries || 0,
|
|
289
|
+
status: this.state.status,
|
|
290
|
+
structured_result: this.state.structured_result,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
248
293
|
setActiveApplication(appName) {
|
|
249
294
|
this.state.active_application = appName;
|
|
250
295
|
this.touch();
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ActionTarget, type ActionResult, type WaitCondition, type IBrowserActionEngine, type RetryPolicy } from './types.js';
|
|
2
|
+
import { BrowserObserver } from '../observer/browserObserver.js';
|
|
3
|
+
export interface InternalBrowserTab {
|
|
4
|
+
id: string;
|
|
5
|
+
url: string;
|
|
6
|
+
title: string;
|
|
7
|
+
html: string;
|
|
8
|
+
history: {
|
|
9
|
+
past: string[];
|
|
10
|
+
future: string[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare class BrowserActionEngine implements IBrowserActionEngine {
|
|
14
|
+
private tabs;
|
|
15
|
+
private activeTabId;
|
|
16
|
+
private observer;
|
|
17
|
+
private workspaceDir;
|
|
18
|
+
private retryPolicy;
|
|
19
|
+
constructor(workspaceDir?: string, retryPolicy?: Partial<RetryPolicy>);
|
|
20
|
+
getObserver(): BrowserObserver;
|
|
21
|
+
getActiveTab(): InternalBrowserTab | null;
|
|
22
|
+
getTabs(): InternalBrowserTab[];
|
|
23
|
+
private captureCurrentState;
|
|
24
|
+
navigate(url: string, htmlContent?: string): Promise<ActionResult>;
|
|
25
|
+
click(target: ActionTarget | string): Promise<ActionResult>;
|
|
26
|
+
type(target: ActionTarget | string, text: string, options?: {
|
|
27
|
+
clear?: boolean;
|
|
28
|
+
delayMs?: number;
|
|
29
|
+
}): Promise<ActionResult>;
|
|
30
|
+
select(target: ActionTarget | string, value: string): Promise<ActionResult>;
|
|
31
|
+
scroll(direction: 'up' | 'down' | 'left' | 'right', amount?: number): Promise<ActionResult>;
|
|
32
|
+
hover(target: ActionTarget | string): Promise<ActionResult>;
|
|
33
|
+
press_key(key: string): Promise<ActionResult>;
|
|
34
|
+
open_tab(url?: string, htmlContent?: string): Promise<ActionResult>;
|
|
35
|
+
close_tab(tabId?: string): Promise<ActionResult>;
|
|
36
|
+
switch_tab(tabId: string): Promise<ActionResult>;
|
|
37
|
+
wait(condition: WaitCondition, param?: any): Promise<ActionResult>;
|
|
38
|
+
upload(target: ActionTarget | string, localFilePath: string): Promise<ActionResult>;
|
|
39
|
+
download(target: ActionTarget | string, destPath?: string): Promise<ActionResult>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=actionEngine.d.ts.map
|