web-task-api 0.2.1
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/CHANGELOG.md +25 -0
- package/README.md +284 -0
- package/dist/scripts/demo.d.ts +1 -0
- package/dist/scripts/demo.js +32 -0
- package/dist/scripts/demo.js.map +1 -0
- package/dist/scripts/profile-login.d.ts +1 -0
- package/dist/scripts/profile-login.js +38 -0
- package/dist/scripts/profile-login.js.map +1 -0
- package/dist/src/agents/auto-agent.d.ts +22 -0
- package/dist/src/agents/auto-agent.js +54 -0
- package/dist/src/agents/auto-agent.js.map +1 -0
- package/dist/src/agents/cliproxy-agent.d.ts +18 -0
- package/dist/src/agents/cliproxy-agent.js +137 -0
- package/dist/src/agents/cliproxy-agent.js.map +1 -0
- package/dist/src/agents/index.d.ts +2 -0
- package/dist/src/agents/index.js +17 -0
- package/dist/src/agents/index.js.map +1 -0
- package/dist/src/agents/mock-agent.d.ts +15 -0
- package/dist/src/agents/mock-agent.js +132 -0
- package/dist/src/agents/mock-agent.js.map +1 -0
- package/dist/src/agents/opencode-agent.d.ts +20 -0
- package/dist/src/agents/opencode-agent.js +122 -0
- package/dist/src/agents/opencode-agent.js.map +1 -0
- package/dist/src/agents/planner-prompt.d.ts +6 -0
- package/dist/src/agents/planner-prompt.js +116 -0
- package/dist/src/agents/planner-prompt.js.map +1 -0
- package/dist/src/browser/session.d.ts +41 -0
- package/dist/src/browser/session.js +267 -0
- package/dist/src/browser/session.js.map +1 -0
- package/dist/src/client.d.ts +44 -0
- package/dist/src/client.js +59 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/config.d.ts +16 -0
- package/dist/src/config.js +18 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +15 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib.d.ts +6 -0
- package/dist/src/lib.js +5 -0
- package/dist/src/lib.js.map +1 -0
- package/dist/src/mcp-server.d.ts +3 -0
- package/dist/src/mcp-server.js +191 -0
- package/dist/src/mcp-server.js.map +1 -0
- package/dist/src/mcp.d.ts +2 -0
- package/dist/src/mcp.js +14 -0
- package/dist/src/mcp.js.map +1 -0
- package/dist/src/recipes/registry.d.ts +21 -0
- package/dist/src/recipes/registry.js +38 -0
- package/dist/src/recipes/registry.js.map +1 -0
- package/dist/src/server/app.d.ts +5 -0
- package/dist/src/server/app.js +89 -0
- package/dist/src/server/app.js.map +1 -0
- package/dist/src/sessions/store.d.ts +48 -0
- package/dist/src/sessions/store.js +84 -0
- package/dist/src/sessions/store.js.map +1 -0
- package/dist/src/storage/run-store.d.ts +12 -0
- package/dist/src/storage/run-store.js +30 -0
- package/dist/src/storage/run-store.js.map +1 -0
- package/dist/src/tasks/errors.d.ts +5 -0
- package/dist/src/tasks/errors.js +11 -0
- package/dist/src/tasks/errors.js.map +1 -0
- package/dist/src/tasks/output-validator.d.ts +1 -0
- package/dist/src/tasks/output-validator.js +21 -0
- package/dist/src/tasks/output-validator.js.map +1 -0
- package/dist/src/tasks/runner.d.ts +38 -0
- package/dist/src/tasks/runner.js +236 -0
- package/dist/src/tasks/runner.js.map +1 -0
- package/dist/src/tasks/schemas.d.ts +266 -0
- package/dist/src/tasks/schemas.js +67 -0
- package/dist/src/tasks/schemas.js.map +1 -0
- package/dist/tests/agent-adapters.test.d.ts +1 -0
- package/dist/tests/agent-adapters.test.js +87 -0
- package/dist/tests/agent-adapters.test.js.map +1 -0
- package/dist/tests/agent-selection.test.d.ts +1 -0
- package/dist/tests/agent-selection.test.js +26 -0
- package/dist/tests/agent-selection.test.js.map +1 -0
- package/dist/tests/auto-agent.test.d.ts +1 -0
- package/dist/tests/auto-agent.test.js +86 -0
- package/dist/tests/auto-agent.test.js.map +1 -0
- package/dist/tests/browser-session.test.d.ts +1 -0
- package/dist/tests/browser-session.test.js +41 -0
- package/dist/tests/browser-session.test.js.map +1 -0
- package/dist/tests/client.test.d.ts +1 -0
- package/dist/tests/client.test.js +35 -0
- package/dist/tests/client.test.js.map +1 -0
- package/dist/tests/fixture-site.d.ts +6 -0
- package/dist/tests/fixture-site.js +93 -0
- package/dist/tests/fixture-site.js.map +1 -0
- package/dist/tests/mcp.test.d.ts +1 -0
- package/dist/tests/mcp.test.js +186 -0
- package/dist/tests/mcp.test.js.map +1 -0
- package/dist/tests/output-validator.test.d.ts +1 -0
- package/dist/tests/output-validator.test.js +27 -0
- package/dist/tests/output-validator.test.js.map +1 -0
- package/dist/tests/request-validation.test.d.ts +1 -0
- package/dist/tests/request-validation.test.js +25 -0
- package/dist/tests/request-validation.test.js.map +1 -0
- package/dist/tests/runner-options.test.d.ts +1 -0
- package/dist/tests/runner-options.test.js +44 -0
- package/dist/tests/runner-options.test.js.map +1 -0
- package/dist/tests/session-api.test.d.ts +1 -0
- package/dist/tests/session-api.test.js +244 -0
- package/dist/tests/session-api.test.js.map +1 -0
- package/dist/tests/session-client.test.d.ts +1 -0
- package/dist/tests/session-client.test.js +28 -0
- package/dist/tests/session-client.test.js.map +1 -0
- package/dist/tests/task-api-failure.test.d.ts +1 -0
- package/dist/tests/task-api-failure.test.js +39 -0
- package/dist/tests/task-api-failure.test.js.map +1 -0
- package/dist/tests/task-api.test.d.ts +1 -0
- package/dist/tests/task-api.test.js +50 -0
- package/dist/tests/task-api.test.js.map +1 -0
- package/docs/design.md +513 -0
- package/docs/releasing.md +62 -0
- package/package.json +78 -0
- package/recipes/dexscreener-token-read.json +19 -0
- package/recipes/fixture-catalog.json +14 -0
- package/recipes/generic-search.json +14 -0
- package/recipes/gmgn-token-read.json +19 -0
- package/server.json +79 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import AjvModule from "ajv";
|
|
2
|
+
import addFormatsModule from "ajv-formats";
|
|
3
|
+
const AjvCtor = AjvModule;
|
|
4
|
+
const addFormats = addFormatsModule;
|
|
5
|
+
const ajv = new AjvCtor({ allErrors: true, strict: false });
|
|
6
|
+
addFormats(ajv);
|
|
7
|
+
export function validateOutput(schema, result) {
|
|
8
|
+
if (!schema) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const validate = ajv.compile(schema);
|
|
12
|
+
const ok = validate(result);
|
|
13
|
+
if (ok) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const message = validate.errors
|
|
17
|
+
?.map((error) => `${error.instancePath || "$"} ${error.message ?? "is invalid"}`.trim())
|
|
18
|
+
.join("; ") ?? "unknown validation error";
|
|
19
|
+
throw new Error(`Output schema validation failed: ${message}`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=output-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-validator.js","sourceRoot":"","sources":["../../../src/tasks/output-validator.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,KAAK,CAAC;AAC5B,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAM3C,MAAM,OAAO,GAAG,SAEf,CAAC;AACF,MAAM,UAAU,GAAG,gBAAqD,CAAC;AAEzE,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5D,UAAU,CAAC,GAAG,CAAC,CAAC;AAEhB,MAAM,UAAU,cAAc,CAC5B,MAA2C,EAC3C,MAA+B;IAE/B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,EAAE,EAAE,CAAC;QACP,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GACX,QAAQ,CAAC,MAAM;QACb,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,YAAY,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,IAAI,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC;SACvF,IAAI,CAAC,IAAI,CAAC,IAAI,0BAA0B,CAAC;IAC9C,MAAM,IAAI,KAAK,CAAC,oCAAoC,OAAO,EAAE,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RecipeRegistry } from "../recipes/registry.js";
|
|
2
|
+
import { SessionStore, type SessionRecord } from "../sessions/store.js";
|
|
3
|
+
import { RunStore } from "../storage/run-store.js";
|
|
4
|
+
import type { TaskRequest, TaskResult } from "./schemas.js";
|
|
5
|
+
import type { RecipeDefinition } from "../recipes/registry.js";
|
|
6
|
+
export declare class TaskRunner {
|
|
7
|
+
private readonly runStore;
|
|
8
|
+
private readonly recipeRegistry;
|
|
9
|
+
private readonly sessionStore;
|
|
10
|
+
constructor(runStore?: RunStore, recipeRegistry?: RecipeRegistry, sessionStore?: SessionStore);
|
|
11
|
+
run(request: TaskRequest): Promise<TaskResult>;
|
|
12
|
+
get(taskId: string): Promise<TaskResult | null>;
|
|
13
|
+
listRecipes(): Promise<RecipeDefinition[]>;
|
|
14
|
+
createSession(input: {
|
|
15
|
+
name: string;
|
|
16
|
+
mode?: "guest" | "profile" | undefined;
|
|
17
|
+
profile?: string | undefined;
|
|
18
|
+
startUrl?: string | undefined;
|
|
19
|
+
agent?: SessionRecord["agent"];
|
|
20
|
+
notes?: string | undefined;
|
|
21
|
+
}): Promise<SessionRecord>;
|
|
22
|
+
listSessions(): Promise<SessionRecord[]>;
|
|
23
|
+
getSession(sessionId: string): Promise<SessionRecord | null>;
|
|
24
|
+
updateSession(sessionId: string, patch: {
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
profile?: string | undefined;
|
|
27
|
+
startUrl?: string | undefined;
|
|
28
|
+
notes?: string | undefined;
|
|
29
|
+
}): Promise<SessionRecord | null>;
|
|
30
|
+
}
|
|
31
|
+
export declare function resolveBrowserLaunchOptions(request: TaskRequest, recipe: RecipeDefinition | undefined, screenshotsDir: string, session?: SessionRecord): {
|
|
32
|
+
screenshotsDir: string;
|
|
33
|
+
preferChrome: boolean | undefined;
|
|
34
|
+
protectedSiteMode: boolean;
|
|
35
|
+
storageStatePath?: string;
|
|
36
|
+
headless: boolean;
|
|
37
|
+
profile: string | undefined;
|
|
38
|
+
};
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { BrowserSession } from "../browser/session.js";
|
|
3
|
+
import { DEFAULT_BROWSER_USER_DATA_DIR, DEFAULT_HEADLESS, DEFAULT_MAX_STEPS, DEFAULT_TIMEOUT_MS, } from "../config.js";
|
|
4
|
+
import { createAgent } from "../agents/index.js";
|
|
5
|
+
import { RecipeRegistry } from "../recipes/registry.js";
|
|
6
|
+
import { SessionStore, sessionStorageStatePath } from "../sessions/store.js";
|
|
7
|
+
import { RunStore } from "../storage/run-store.js";
|
|
8
|
+
import { RequestPreconditionError } from "./errors.js";
|
|
9
|
+
import { validateOutput } from "./output-validator.js";
|
|
10
|
+
export class TaskRunner {
|
|
11
|
+
runStore;
|
|
12
|
+
recipeRegistry;
|
|
13
|
+
sessionStore;
|
|
14
|
+
constructor(runStore = new RunStore(), recipeRegistry = new RecipeRegistry(), sessionStore = new SessionStore()) {
|
|
15
|
+
this.runStore = runStore;
|
|
16
|
+
this.recipeRegistry = recipeRegistry;
|
|
17
|
+
this.sessionStore = sessionStore;
|
|
18
|
+
}
|
|
19
|
+
async run(request) {
|
|
20
|
+
const session = request.sessionId ? await this.sessionStore.get(request.sessionId) : null;
|
|
21
|
+
if (request.sessionId && !session) {
|
|
22
|
+
throw new Error(`Session not found: ${request.sessionId}`);
|
|
23
|
+
}
|
|
24
|
+
const effectiveRequest = mergeSessionIntoRequest(request, session ?? undefined);
|
|
25
|
+
const run = await this.runStore.create(effectiveRequest);
|
|
26
|
+
const agent = createAgent(effectiveRequest);
|
|
27
|
+
const recipe = await this.recipeRegistry.resolve({
|
|
28
|
+
recipeId: effectiveRequest.recipeId,
|
|
29
|
+
startUrl: effectiveRequest.startUrl,
|
|
30
|
+
});
|
|
31
|
+
const browser = await BrowserSession.launch(resolveBrowserLaunchOptions(effectiveRequest, recipe, run.screenshotsDir, session ?? undefined));
|
|
32
|
+
const startedAt = new Date().toISOString();
|
|
33
|
+
const steps = [];
|
|
34
|
+
const maxSteps = effectiveRequest.limits.maxSteps ?? DEFAULT_MAX_STEPS;
|
|
35
|
+
const deadline = Date.now() + (effectiveRequest.limits.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
36
|
+
let lastToolResult;
|
|
37
|
+
try {
|
|
38
|
+
await agent.init();
|
|
39
|
+
if (effectiveRequest.startUrl) {
|
|
40
|
+
await browser.navigate(effectiveRequest.startUrl);
|
|
41
|
+
}
|
|
42
|
+
for (let stepIndex = 1; stepIndex <= maxSteps; stepIndex += 1) {
|
|
43
|
+
if (Date.now() > deadline) {
|
|
44
|
+
throw new Error("Task timed out before completion.");
|
|
45
|
+
}
|
|
46
|
+
const snapshot = await browser.snapshot();
|
|
47
|
+
const action = await agent.nextAction({
|
|
48
|
+
request: effectiveRequest,
|
|
49
|
+
step: stepIndex,
|
|
50
|
+
maxSteps,
|
|
51
|
+
outputSchema: effectiveRequest.outputSchema,
|
|
52
|
+
recipe,
|
|
53
|
+
snapshot,
|
|
54
|
+
history: steps,
|
|
55
|
+
lastToolResult,
|
|
56
|
+
...(session ? { sessionContext: toSessionContext(session) } : {}),
|
|
57
|
+
});
|
|
58
|
+
const startedStepAt = new Date().toISOString();
|
|
59
|
+
let result;
|
|
60
|
+
if (action.type === "finish") {
|
|
61
|
+
validateOutput(effectiveRequest.outputSchema, action.result);
|
|
62
|
+
result = {
|
|
63
|
+
ok: true,
|
|
64
|
+
finished: true,
|
|
65
|
+
validated: true,
|
|
66
|
+
result: action.result,
|
|
67
|
+
};
|
|
68
|
+
const step = { index: stepIndex, startedAt: startedStepAt, action, result };
|
|
69
|
+
steps.push(step);
|
|
70
|
+
await this.runStore.appendStep(run, step);
|
|
71
|
+
await browser.captureScreenshot(`step-${stepIndex}-finish`);
|
|
72
|
+
const taskResult = {
|
|
73
|
+
taskId: run.id,
|
|
74
|
+
status: "completed",
|
|
75
|
+
goal: effectiveRequest.goal,
|
|
76
|
+
mode: effectiveRequest.mode,
|
|
77
|
+
startedAt,
|
|
78
|
+
finishedAt: new Date().toISOString(),
|
|
79
|
+
result: action.result,
|
|
80
|
+
artifactsDir: run.dir,
|
|
81
|
+
steps,
|
|
82
|
+
backend: agent.debugInfo(),
|
|
83
|
+
...(effectiveRequest.sessionId ? { sessionId: effectiveRequest.sessionId } : {}),
|
|
84
|
+
...(recipe ? { recipe: { id: recipe.id, name: recipe.name } } : {}),
|
|
85
|
+
...(browser.getProfile() ? { profile: browser.getProfile() } : {}),
|
|
86
|
+
};
|
|
87
|
+
if (session) {
|
|
88
|
+
await this.sessionStore.appendHistory(session.id, {
|
|
89
|
+
taskId: taskResult.taskId,
|
|
90
|
+
goal: taskResult.goal,
|
|
91
|
+
status: taskResult.status,
|
|
92
|
+
startedAt: taskResult.startedAt,
|
|
93
|
+
finishedAt: taskResult.finishedAt,
|
|
94
|
+
resultSummary: summarizeTaskResult(taskResult),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
await this.runStore.saveResult(run, taskResult);
|
|
98
|
+
return taskResult;
|
|
99
|
+
}
|
|
100
|
+
if (action.type === "fail") {
|
|
101
|
+
result = { ok: false, failed: true, error: action.error };
|
|
102
|
+
const step = { index: stepIndex, startedAt: startedStepAt, action, result };
|
|
103
|
+
steps.push(step);
|
|
104
|
+
await this.runStore.appendStep(run, step);
|
|
105
|
+
throw new Error(action.error);
|
|
106
|
+
}
|
|
107
|
+
result = await browser.execute(action);
|
|
108
|
+
const screenshotPath = await browser.captureScreenshot(`step-${stepIndex}`);
|
|
109
|
+
result = { ...result, screenshotPath };
|
|
110
|
+
const step = { index: stepIndex, startedAt: startedStepAt, action, result };
|
|
111
|
+
steps.push(step);
|
|
112
|
+
lastToolResult = result;
|
|
113
|
+
await this.runStore.appendStep(run, step);
|
|
114
|
+
}
|
|
115
|
+
throw new Error(`Task exhausted max steps (${maxSteps}) without finishing.`);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (error instanceof RequestPreconditionError) {
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
121
|
+
const taskResult = {
|
|
122
|
+
taskId: run.id,
|
|
123
|
+
status: "failed",
|
|
124
|
+
goal: effectiveRequest.goal,
|
|
125
|
+
mode: effectiveRequest.mode,
|
|
126
|
+
startedAt,
|
|
127
|
+
finishedAt: new Date().toISOString(),
|
|
128
|
+
error: error instanceof Error ? error.message : String(error),
|
|
129
|
+
artifactsDir: run.dir,
|
|
130
|
+
steps,
|
|
131
|
+
backend: agent.debugInfo(),
|
|
132
|
+
...(effectiveRequest.sessionId ? { sessionId: effectiveRequest.sessionId } : {}),
|
|
133
|
+
...(recipe ? { recipe: { id: recipe.id, name: recipe.name } } : {}),
|
|
134
|
+
...(browser.getProfile() ? { profile: browser.getProfile() } : {}),
|
|
135
|
+
};
|
|
136
|
+
await browser.captureScreenshot("failure").catch(() => undefined);
|
|
137
|
+
if (session) {
|
|
138
|
+
await this.sessionStore.appendHistory(session.id, {
|
|
139
|
+
taskId: taskResult.taskId,
|
|
140
|
+
goal: taskResult.goal,
|
|
141
|
+
status: taskResult.status,
|
|
142
|
+
startedAt: taskResult.startedAt,
|
|
143
|
+
finishedAt: taskResult.finishedAt,
|
|
144
|
+
resultSummary: summarizeTaskResult(taskResult),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
await this.runStore.saveResult(run, taskResult);
|
|
148
|
+
return taskResult;
|
|
149
|
+
}
|
|
150
|
+
finally {
|
|
151
|
+
await agent.close().catch(() => undefined);
|
|
152
|
+
await browser.close().catch(() => undefined);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
async get(taskId) {
|
|
156
|
+
return this.runStore.get(taskId);
|
|
157
|
+
}
|
|
158
|
+
async listRecipes() {
|
|
159
|
+
return this.recipeRegistry.list();
|
|
160
|
+
}
|
|
161
|
+
async createSession(input) {
|
|
162
|
+
return this.sessionStore.create(input);
|
|
163
|
+
}
|
|
164
|
+
async listSessions() {
|
|
165
|
+
return this.sessionStore.list();
|
|
166
|
+
}
|
|
167
|
+
async getSession(sessionId) {
|
|
168
|
+
return this.sessionStore.get(sessionId);
|
|
169
|
+
}
|
|
170
|
+
async updateSession(sessionId, patch) {
|
|
171
|
+
const session = await this.sessionStore.get(sessionId);
|
|
172
|
+
if (!session) {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
if (session.mode === "guest" && patch.profile !== undefined) {
|
|
176
|
+
throw new RequestPreconditionError("guest_session_cannot_bind_profile", "Guest sessions cannot be rebound to a named profile; create a new profile-mode session instead.");
|
|
177
|
+
}
|
|
178
|
+
return this.sessionStore.update(sessionId, patch);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export function resolveBrowserLaunchOptions(request, recipe, screenshotsDir, session) {
|
|
182
|
+
const preferHeadful = recipe?.browserHints?.preferHeadful ?? false;
|
|
183
|
+
const requirePersistentProfile = recipe?.browserHints?.preferPersistentProfile ?? false;
|
|
184
|
+
const protectedSiteMode = Boolean(recipe?.browserHints?.preferChrome ||
|
|
185
|
+
recipe?.browserHints?.preferHeadful ||
|
|
186
|
+
recipe?.browserHints?.preferPersistentProfile);
|
|
187
|
+
const sessionHasPersistedState = Boolean(session && (session.profile || existsSync(sessionStorageStatePath(session.id))));
|
|
188
|
+
if (requirePersistentProfile && !request.profile && !DEFAULT_BROWSER_USER_DATA_DIR) {
|
|
189
|
+
if (!sessionHasPersistedState) {
|
|
190
|
+
throw new RequestPreconditionError("session_not_warmed_for_protected_recipe", "This protected-site workflow requires warmed persistent state. Pass request.profile, set BROWSER_USER_DATA_DIR, or reuse a warmed sessionId.");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
headless: request.limits.headless ?? (preferHeadful ? false : DEFAULT_HEADLESS),
|
|
195
|
+
profile: request.profile,
|
|
196
|
+
...(request.profile ? {} : session ? { storageStatePath: sessionStorageStatePath(session.id) } : {}),
|
|
197
|
+
screenshotsDir,
|
|
198
|
+
preferChrome: recipe?.browserHints?.preferChrome,
|
|
199
|
+
protectedSiteMode,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function mergeSessionIntoRequest(request, session) {
|
|
203
|
+
if (!session) {
|
|
204
|
+
return request;
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
...request,
|
|
208
|
+
...(request.profile ? {} : session.profile ? { profile: session.profile } : {}),
|
|
209
|
+
...(request.startUrl ? {} : session.startUrl ? { startUrl: session.startUrl } : {}),
|
|
210
|
+
agent: request.agent.kind !== "auto" || request.agent.model
|
|
211
|
+
? request.agent
|
|
212
|
+
: session.agent
|
|
213
|
+
? { ...session.agent }
|
|
214
|
+
: request.agent,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function toSessionContext(session) {
|
|
218
|
+
return {
|
|
219
|
+
sessionId: session.id,
|
|
220
|
+
name: session.name,
|
|
221
|
+
...(session.notes ? { notes: session.notes } : {}),
|
|
222
|
+
recentHistory: session.history.slice(-5).map((entry) => ({
|
|
223
|
+
taskId: entry.taskId,
|
|
224
|
+
goal: entry.goal,
|
|
225
|
+
status: entry.status,
|
|
226
|
+
resultSummary: entry.resultSummary,
|
|
227
|
+
})),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function summarizeTaskResult(task) {
|
|
231
|
+
if (task.status === "completed") {
|
|
232
|
+
return task.result ? JSON.stringify(task.result).slice(0, 400) : "completed";
|
|
233
|
+
}
|
|
234
|
+
return task.error ?? "failed";
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../src/tasks/runner.ts"],"names":[],"mappings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AK,EAAE,EAAE,CAAC,CAAC;YACvD,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,aAAa,EAAE,KAAK,CAAC,aAAa;SACnC,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAgB;IAC3C,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IAC/E,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SessionCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
mode: z.ZodOptional<z.ZodEnum<["guest", "profile"]>>;
|
|
5
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
6
|
+
startUrl: z.ZodOptional<z.ZodString>;
|
|
7
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
kind: z.ZodEnum<["auto", "cliproxy", "opencode", "mock"]>;
|
|
9
|
+
model: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
12
|
+
model?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
15
|
+
model?: string | undefined;
|
|
16
|
+
}>>;
|
|
17
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
name: string;
|
|
20
|
+
profile?: string | undefined;
|
|
21
|
+
mode?: "guest" | "profile" | undefined;
|
|
22
|
+
startUrl?: string | undefined;
|
|
23
|
+
agent?: {
|
|
24
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
25
|
+
model?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
notes?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
name: string;
|
|
30
|
+
profile?: string | undefined;
|
|
31
|
+
mode?: "guest" | "profile" | undefined;
|
|
32
|
+
startUrl?: string | undefined;
|
|
33
|
+
agent?: {
|
|
34
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
35
|
+
model?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
notes?: string | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
name: string;
|
|
40
|
+
profile?: string | undefined;
|
|
41
|
+
mode?: "guest" | "profile" | undefined;
|
|
42
|
+
startUrl?: string | undefined;
|
|
43
|
+
agent?: {
|
|
44
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
45
|
+
model?: string | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
notes?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
name: string;
|
|
50
|
+
profile?: string | undefined;
|
|
51
|
+
mode?: "guest" | "profile" | undefined;
|
|
52
|
+
startUrl?: string | undefined;
|
|
53
|
+
agent?: {
|
|
54
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
55
|
+
model?: string | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
notes?: string | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const SessionUpdateSchema: z.ZodObject<{
|
|
60
|
+
name: z.ZodOptional<z.ZodString>;
|
|
61
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
62
|
+
startUrl: z.ZodOptional<z.ZodString>;
|
|
63
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
name?: string | undefined;
|
|
66
|
+
profile?: string | undefined;
|
|
67
|
+
startUrl?: string | undefined;
|
|
68
|
+
notes?: string | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
profile?: string | undefined;
|
|
72
|
+
startUrl?: string | undefined;
|
|
73
|
+
notes?: string | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const TaskRequestSchema: z.ZodObject<{
|
|
76
|
+
goal: z.ZodString;
|
|
77
|
+
startUrl: z.ZodOptional<z.ZodString>;
|
|
78
|
+
mode: z.ZodDefault<z.ZodEnum<["read", "act"]>>;
|
|
79
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
80
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
82
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
83
|
+
recipeId: z.ZodOptional<z.ZodString>;
|
|
84
|
+
agent: z.ZodDefault<z.ZodObject<{
|
|
85
|
+
kind: z.ZodDefault<z.ZodEnum<["auto", "cliproxy", "opencode", "mock"]>>;
|
|
86
|
+
model: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
89
|
+
model?: string | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
kind?: "auto" | "cliproxy" | "opencode" | "mock" | undefined;
|
|
92
|
+
model?: string | undefined;
|
|
93
|
+
}>>;
|
|
94
|
+
limits: z.ZodDefault<z.ZodObject<{
|
|
95
|
+
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
headless: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
maxSteps?: number | undefined;
|
|
100
|
+
timeoutMs?: number | undefined;
|
|
101
|
+
headless?: boolean | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
maxSteps?: number | undefined;
|
|
104
|
+
timeoutMs?: number | undefined;
|
|
105
|
+
headless?: boolean | undefined;
|
|
106
|
+
}>>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
mode: "read" | "act";
|
|
109
|
+
agent: {
|
|
110
|
+
kind: "auto" | "cliproxy" | "opencode" | "mock";
|
|
111
|
+
model?: string | undefined;
|
|
112
|
+
};
|
|
113
|
+
goal: string;
|
|
114
|
+
input: Record<string, unknown>;
|
|
115
|
+
limits: {
|
|
116
|
+
maxSteps?: number | undefined;
|
|
117
|
+
timeoutMs?: number | undefined;
|
|
118
|
+
headless?: boolean | undefined;
|
|
119
|
+
};
|
|
120
|
+
profile?: string | undefined;
|
|
121
|
+
startUrl?: string | undefined;
|
|
122
|
+
sessionId?: string | undefined;
|
|
123
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
124
|
+
recipeId?: string | undefined;
|
|
125
|
+
}, {
|
|
126
|
+
goal: string;
|
|
127
|
+
profile?: string | undefined;
|
|
128
|
+
mode?: "read" | "act" | undefined;
|
|
129
|
+
startUrl?: string | undefined;
|
|
130
|
+
agent?: {
|
|
131
|
+
kind?: "auto" | "cliproxy" | "opencode" | "mock" | undefined;
|
|
132
|
+
model?: string | undefined;
|
|
133
|
+
} | undefined;
|
|
134
|
+
sessionId?: string | undefined;
|
|
135
|
+
input?: Record<string, unknown> | undefined;
|
|
136
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
137
|
+
recipeId?: string | undefined;
|
|
138
|
+
limits?: {
|
|
139
|
+
maxSteps?: number | undefined;
|
|
140
|
+
timeoutMs?: number | undefined;
|
|
141
|
+
headless?: boolean | undefined;
|
|
142
|
+
} | undefined;
|
|
143
|
+
}>;
|
|
144
|
+
export type TaskRequest = z.infer<typeof TaskRequestSchema>;
|
|
145
|
+
export type BrowserElement = {
|
|
146
|
+
id: string;
|
|
147
|
+
tag: string;
|
|
148
|
+
role?: string | undefined;
|
|
149
|
+
type?: string | undefined;
|
|
150
|
+
text?: string | undefined;
|
|
151
|
+
label?: string | undefined;
|
|
152
|
+
placeholder?: string | undefined;
|
|
153
|
+
name?: string | undefined;
|
|
154
|
+
options?: string[] | undefined;
|
|
155
|
+
};
|
|
156
|
+
export type PageSnapshot = {
|
|
157
|
+
url: string;
|
|
158
|
+
title: string;
|
|
159
|
+
textPreview: string;
|
|
160
|
+
interactive: BrowserElement[];
|
|
161
|
+
};
|
|
162
|
+
export type PlannedAction = {
|
|
163
|
+
type: "navigate";
|
|
164
|
+
url: string;
|
|
165
|
+
reason: string;
|
|
166
|
+
} | {
|
|
167
|
+
type: "click";
|
|
168
|
+
elementId: string;
|
|
169
|
+
reason: string;
|
|
170
|
+
} | {
|
|
171
|
+
type: "fill";
|
|
172
|
+
elementId: string;
|
|
173
|
+
text: string;
|
|
174
|
+
reason: string;
|
|
175
|
+
} | {
|
|
176
|
+
type: "press";
|
|
177
|
+
elementId: string;
|
|
178
|
+
key: string;
|
|
179
|
+
reason: string;
|
|
180
|
+
} | {
|
|
181
|
+
type: "select";
|
|
182
|
+
elementId: string;
|
|
183
|
+
value: string;
|
|
184
|
+
reason: string;
|
|
185
|
+
} | {
|
|
186
|
+
type: "wait_for_text";
|
|
187
|
+
text: string;
|
|
188
|
+
reason: string;
|
|
189
|
+
timeoutMs?: number;
|
|
190
|
+
} | {
|
|
191
|
+
type: "read_page";
|
|
192
|
+
reason: string;
|
|
193
|
+
maxChars?: number;
|
|
194
|
+
} | {
|
|
195
|
+
type: "finish";
|
|
196
|
+
reason: string;
|
|
197
|
+
result: Record<string, unknown>;
|
|
198
|
+
} | {
|
|
199
|
+
type: "fail";
|
|
200
|
+
reason: string;
|
|
201
|
+
error: string;
|
|
202
|
+
};
|
|
203
|
+
export type StepRecord = {
|
|
204
|
+
index: number;
|
|
205
|
+
startedAt: string;
|
|
206
|
+
action: PlannedAction;
|
|
207
|
+
result: Record<string, unknown>;
|
|
208
|
+
};
|
|
209
|
+
export type TaskResult = {
|
|
210
|
+
taskId: string;
|
|
211
|
+
status: "completed" | "failed";
|
|
212
|
+
goal: string;
|
|
213
|
+
mode: "read" | "act";
|
|
214
|
+
startedAt: string;
|
|
215
|
+
finishedAt: string;
|
|
216
|
+
result?: Record<string, unknown> | undefined;
|
|
217
|
+
error?: string | undefined;
|
|
218
|
+
recipe?: {
|
|
219
|
+
id: string;
|
|
220
|
+
name: string;
|
|
221
|
+
} | undefined;
|
|
222
|
+
profile?: string | undefined;
|
|
223
|
+
sessionId?: string | undefined;
|
|
224
|
+
backend?: {
|
|
225
|
+
planner: string;
|
|
226
|
+
reason: string;
|
|
227
|
+
} | undefined;
|
|
228
|
+
artifactsDir: string;
|
|
229
|
+
steps: StepRecord[];
|
|
230
|
+
};
|
|
231
|
+
export type AgentTurnInput = {
|
|
232
|
+
request: TaskRequest;
|
|
233
|
+
step: number;
|
|
234
|
+
maxSteps: number;
|
|
235
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
236
|
+
recipe?: {
|
|
237
|
+
id: string;
|
|
238
|
+
name: string;
|
|
239
|
+
description: string;
|
|
240
|
+
promptHints?: string[] | undefined;
|
|
241
|
+
inputAliases?: Record<string, string[]> | undefined;
|
|
242
|
+
} | undefined;
|
|
243
|
+
snapshot: PageSnapshot;
|
|
244
|
+
history: StepRecord[];
|
|
245
|
+
lastToolResult?: Record<string, unknown> | undefined;
|
|
246
|
+
sessionContext?: {
|
|
247
|
+
sessionId: string;
|
|
248
|
+
name: string;
|
|
249
|
+
notes?: string | undefined;
|
|
250
|
+
recentHistory: Array<{
|
|
251
|
+
taskId: string;
|
|
252
|
+
goal: string;
|
|
253
|
+
status: "completed" | "failed";
|
|
254
|
+
resultSummary: string;
|
|
255
|
+
}>;
|
|
256
|
+
} | undefined;
|
|
257
|
+
};
|
|
258
|
+
export type AgentAdapter = {
|
|
259
|
+
init(): Promise<void>;
|
|
260
|
+
nextAction(input: AgentTurnInput): Promise<PlannedAction>;
|
|
261
|
+
close(): Promise<void>;
|
|
262
|
+
debugInfo(): {
|
|
263
|
+
planner: string;
|
|
264
|
+
reason: string;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const AgentSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
kind: z.enum(["auto", "cliproxy", "opencode", "mock"]).default("auto"),
|
|
5
|
+
model: z.string().optional(),
|
|
6
|
+
})
|
|
7
|
+
.default({ kind: "auto" });
|
|
8
|
+
const ProfileIdSchema = z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.regex(/^[a-zA-Z0-9_-]+$/, "profile must use only letters, numbers, underscore, or hyphen");
|
|
12
|
+
const SessionIdSchema = z.string().uuid();
|
|
13
|
+
const LimitsSchema = z
|
|
14
|
+
.object({
|
|
15
|
+
maxSteps: z.number().int().min(1).max(50).optional(),
|
|
16
|
+
timeoutMs: z.number().int().min(1_000).max(600_000).optional(),
|
|
17
|
+
headless: z.boolean().optional(),
|
|
18
|
+
})
|
|
19
|
+
.default({});
|
|
20
|
+
const SessionAgentSchema = z.object({
|
|
21
|
+
kind: z.enum(["auto", "cliproxy", "opencode", "mock"]),
|
|
22
|
+
model: z.string().optional(),
|
|
23
|
+
});
|
|
24
|
+
export const SessionCreateSchema = z
|
|
25
|
+
.object({
|
|
26
|
+
name: z.string().min(1),
|
|
27
|
+
mode: z.enum(["guest", "profile"]).optional(),
|
|
28
|
+
profile: ProfileIdSchema.optional(),
|
|
29
|
+
startUrl: z.string().url().optional(),
|
|
30
|
+
agent: SessionAgentSchema.optional(),
|
|
31
|
+
notes: z.string().optional(),
|
|
32
|
+
})
|
|
33
|
+
.superRefine((value, ctx) => {
|
|
34
|
+
if (value.mode === "profile" && !value.profile) {
|
|
35
|
+
ctx.addIssue({
|
|
36
|
+
code: z.ZodIssueCode.custom,
|
|
37
|
+
path: ["profile"],
|
|
38
|
+
message: "profile mode requires a bound profile",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (value.mode === "guest" && value.profile) {
|
|
42
|
+
ctx.addIssue({
|
|
43
|
+
code: z.ZodIssueCode.custom,
|
|
44
|
+
path: ["profile"],
|
|
45
|
+
message: "guest mode cannot bind a named profile",
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export const SessionUpdateSchema = z.object({
|
|
50
|
+
name: z.string().min(1).optional(),
|
|
51
|
+
profile: ProfileIdSchema.optional(),
|
|
52
|
+
startUrl: z.string().url().optional(),
|
|
53
|
+
notes: z.string().optional(),
|
|
54
|
+
});
|
|
55
|
+
export const TaskRequestSchema = z.object({
|
|
56
|
+
goal: z.string().min(1),
|
|
57
|
+
startUrl: z.string().url().optional(),
|
|
58
|
+
mode: z.enum(["read", "act"]).default("act"),
|
|
59
|
+
profile: ProfileIdSchema.optional(),
|
|
60
|
+
sessionId: SessionIdSchema.optional(),
|
|
61
|
+
input: z.record(z.string(), z.unknown()).default({}),
|
|
62
|
+
outputSchema: z.record(z.string(), z.unknown()).optional(),
|
|
63
|
+
recipeId: z.string().optional(),
|
|
64
|
+
agent: AgentSchema,
|
|
65
|
+
limits: LimitsSchema,
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/tasks/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACtE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC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