@aigne/example-mcp-puppeteer 1.12.1 → 1.13.0
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/index.ts +2 -1
- package/package.json +6 -5
- package/usages.ts +2 -1
package/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bunwrapper
|
|
2
2
|
|
|
3
|
+
import { DefaultMemory } from "@aigne/agent-library/default-memory/index.js";
|
|
3
4
|
import { runWithAIGNE } from "@aigne/cli/utils/run-with-aigne.js";
|
|
4
5
|
import { AIAgent, MCPAgent } from "@aigne/core";
|
|
5
6
|
|
|
@@ -19,7 +20,7 @@ await runWithAIGNE(
|
|
|
19
20
|
2. evaluate document.body.innerText to get the content
|
|
20
21
|
`,
|
|
21
22
|
skills: [puppeteer],
|
|
22
|
-
memory:
|
|
23
|
+
memory: new DefaultMemory(),
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
return agent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-mcp-puppeteer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "A demonstration of using AIGNE Framework and Puppeteer MCP Server to extract content from websites using Puppeteer",
|
|
5
5
|
"author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
6
6
|
"homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/mcp-puppeteer",
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@aigne/cli": "^1.
|
|
20
|
-
"@aigne/core": "^1.
|
|
21
|
-
"@aigne/openai": "^0.2.
|
|
19
|
+
"@aigne/cli": "^1.11.0",
|
|
20
|
+
"@aigne/core": "^1.18.0",
|
|
21
|
+
"@aigne/openai": "^0.2.1",
|
|
22
|
+
"@aigne/agent-library": "^1.12.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@types/bun": "^1.2.9",
|
|
25
|
-
"@aigne/test-utils": "^0.3.
|
|
26
|
+
"@aigne/test-utils": "^0.3.2"
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
28
29
|
"start": "bun run index.ts",
|
package/usages.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert";
|
|
2
|
+
import { DefaultMemory } from "@aigne/agent-library/default-memory/index.js";
|
|
2
3
|
import { AIAgent, AIGNE, MCPAgent } from "@aigne/core";
|
|
3
4
|
import { OpenAIChatModel } from "@aigne/openai";
|
|
4
5
|
|
|
@@ -25,7 +26,7 @@ const agent = AIAgent.from({
|
|
|
25
26
|
1. navigate to the url
|
|
26
27
|
2. evaluate document.body.innerText to get the content
|
|
27
28
|
`,
|
|
28
|
-
memory:
|
|
29
|
+
memory: new DefaultMemory(),
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
const result = await aigne.invoke(agent, "extract content from https://www.arcblock.io");
|