Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/many-cars-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@trymeka/computer-provider-anchor-browser": patch
"@trymeka/computer-provider-scrapybara": patch
"@trymeka/computer-provider-core": patch
"@trymeka/computer-provider-e2b": patch
"@trymeka/ai-provider-vercel": patch
"@trymeka/core": patch
---

Wait between computer actions and update fallback text on reasoning
10 changes: 2 additions & 8 deletions packages/ai-provider-vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@
"access": "public"
},
"description": "TODO: Add description",
"keywords": [
"trymeka"
],
"keywords": ["trymeka"],
"repository": {
"type": "git",
"url": "git+https://github.com/trymeka/agent.git",
"directory": "packages/ai-provider-vercel"
},
"license": "MIT",
"homepage": "https://github.com/trymeka/agent/tree/main/packages/ai-provider-vercel#readme",
"files": [
"dist",
"!dist/**/*.map",
"README.md"
],
"files": ["dist", "!dist/**/*.map", "README.md"],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions packages/computer-provider-anchor-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@
"access": "public"
},
"description": "TODO: Add description",
"keywords": [
"trymeka"
],
"keywords": ["trymeka"],
"repository": {
"type": "git",
"url": "git+https://github.com/trymeka/agent.git",
"directory": "packages/computer-provider-anchor-browser"
},
"license": "MIT",
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-anchor-browser#readme",
"files": [
"dist",
"!dist/**/*.map",
"README.md"
],
"files": ["dist", "!dist/**/*.map", "README.md"],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions packages/computer-provider-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@
"access": "public"
},
"description": "TODO: Add description",
"keywords": [
"trymeka"
],
"keywords": ["trymeka"],
"repository": {
"type": "git",
"url": "git+https://github.com/trymeka/agent.git",
"directory": "packages/computer-provider-core"
},
"license": "MIT",
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-core#readme",
"files": [
"dist",
"!dist/**/*.map",
"README.md"
],
"files": ["dist", "!dist/**/*.map", "README.md"],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions packages/computer-provider-e2b/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@
"access": "public"
},
"description": "TODO: Add description",
"keywords": [
"trymeka"
],
"keywords": ["trymeka"],
"repository": {
"type": "git",
"url": "git+https://github.com/trymeka/agent.git",
"directory": "packages/computer-provider-e2b"
},
"license": "MIT",
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-e2b#readme",
"files": [
"dist",
"!dist/**/*.map",
"README.md"
],
"files": ["dist", "!dist/**/*.map", "README.md"],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions packages/computer-provider-scrapybara/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@
"access": "public"
},
"description": "TODO: Add description",
"keywords": [
"trymeka"
],
"keywords": ["trymeka"],
"repository": {
"type": "git",
"url": "git+https://github.com/trymeka/agent.git",
"directory": "packages/computer-provider-scrapybara"
},
"license": "MIT",
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-scrapybara#readme",
"files": [
"dist",
"!dist/**/*.map",
"README.md"
],
"files": ["dist", "!dist/**/*.map", "README.md"],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@
"access": "public"
},
"description": "TODO: Add description",
"keywords": [
"trymeka"
],
"keywords": ["trymeka"],
"repository": {
"type": "git",
"url": "git+https://github.com/trymeka/agent.git",
"directory": "packages/agent"
},
"license": "MIT",
"homepage": "https://github.com/trymeka/agent/tree/main/packages/agent#readme",
"files": [
"dist",
"!dist/**/*.map",
"README.md"
],
"files": ["dist", "!dist/**/*.map", "README.md"],
"exports": {
".": {
"typescript": "./src/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/ai/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ export function createAgent<T, R>(options: {
done: [
{
type: "text",
text: response.text ?? "Processing...",
reasoning: response.reasoning ?? "No reasoning provided",
text: response.text ?? "",
reasoning: response.reasoning ?? "",
},
],
},
Expand Down
20 changes: 2 additions & 18 deletions packages/core/src/tools/computer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Page } from "playwright-core";
import z from "zod";
import type { Tool } from ".";
import { createAgentLogUpdate } from "../utils/agent-log";
Expand Down Expand Up @@ -365,23 +364,8 @@ export function createComputerTool<T, R>({
execute: async (args, context) => {
const result = await computerProvider.performAction(args.action, context);

// Smart delay with network idle support for navigation actions only
if (args.action.type === "click" || args.action.type === "double_click") {
try {
const instance = await computerProvider.getInstance(
context.sessionId,
);
const page = (instance as { page?: Page })?.page;

if (page?.waitForLoadState) {
await page.waitForLoadState("networkidle", { timeout: 1000 });
}
// No fallback delay - if network idle doesn't work, proceed immediately
} catch {
// No fallback delay on error - proceed immediately
}
}
// No delays for other action types - proceed immediately
// Delay for 2 seconds to allow the action to complete - need smarter wait in the future
await new Promise((resolve) => setTimeout(resolve, 2000));

const screenshot = await computerProvider.takeScreenshot(
context.sessionId,
Expand Down
Loading