Skip to content

fix(agent-tars): share serialize error with html artifacts #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 20, 2025
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
2 changes: 1 addition & 1 deletion apps/agent-tars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
## ✨️ Features

- **🌐 Advanced Browser Operations:** Executes sophisticated tasks like Deep Research and Operator functions through an agent framework, enabling comprehensive planning and execution.
- **🛠️ Comprehensive Tool Support:** Integrates with search, file editing, command line, and Model Context Protocol (MCP) tools to handle complex workflows.
- **🛠️ Comprehensive Tool Support:** Integrates with search, file editing, command line, and Model Context Protocol (**MCP**) tools to handle complex workflows.
- **💻️ Enhanced Desktop App:** A revamped UI with displays for browsers, multimodal elements, session management, model configuration, dialogue flow visualization, and browser/search status tracking.
- **🔄 Workflow Orchestration:** Seamlessly connects GUI Agent tools—search, browse, explore links, and synthesize information into final outputs.
- **⚙️ Developer-Friendly Framework:** Simplifies integration with UI-TARS and custom workflow creation for GUI Agent projects.
Expand Down
1 change: 1 addition & 0 deletions apps/agent-tars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"@agent-infra/mcp-server-browser": "workspace:*"
},
"devDependencies": {
"serialize-javascript": "6.0.2",
"@modelcontextprotocol/sdk": "^1.7.0",
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^4.0.0",
Expand Down
3 changes: 2 additions & 1 deletion apps/agent-tars/src/main/ipcRoutes/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import fs, { readFile } from 'fs-extra';
import { shell } from 'electron';
import fetch from 'node-fetch';
import FormData from 'form-data';
import serialize from 'serialize-javascript';
import {
normalizeMessages,
parseArtifacts,
Expand Down Expand Up @@ -145,7 +146,7 @@ export const actionRoute = t.router({
.replace(
' <!-- DATA -->',
'<script>window.__OMEGA_REPORT_DATA__ = ' +
JSON.stringify({
serialize({
messages,
artifacts,
}) +
Expand Down
17 changes: 17 additions & 0 deletions apps/agent-tars/src/renderer/mock/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,23 @@ export const createClient = () => ({
runAgent: async () => {
return 'Hello from mock agent';
},

updateFileSystemSettings: async () => {
return true;
},

getSettings: async () => {
return {
model: {},
fileSystem: {
availableDirectories: ['/mock/path/to/allowed/directories'],
},
search: {},
};
},
getAllowedDirectories: async () => {
return ['/mock/path/to/allowed/directories'];
},
});

declare global {
Expand Down
1 change: 0 additions & 1 deletion packages/agent-infra/mcp-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export class MCPClient<
stderr: process.platform === 'win32' ? 'pipe' : 'inherit',
env: mergedEnv as Record<string, string>,
};
console.log('transportOpts', transportOpts);
const transport = new this.Transport(transportOpts);

await client.connect(transport);
Expand Down
17 changes: 17 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading