@aigne/example-mcp-puppeteer 1.13.7 → 1.13.9
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/package.json +6 -6
- package/usages.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-mcp-puppeteer",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.9",
|
|
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,14 +16,14 @@
|
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@aigne/agent-library": "^1.13.
|
|
20
|
-
"@aigne/cli": "^1.11.
|
|
21
|
-
"@aigne/
|
|
22
|
-
"@aigne/
|
|
19
|
+
"@aigne/agent-library": "^1.13.2",
|
|
20
|
+
"@aigne/cli": "^1.11.9",
|
|
21
|
+
"@aigne/core": "^1.20.1",
|
|
22
|
+
"@aigne/openai": "^0.3.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/bun": "^1.2.9",
|
|
26
|
-
"@aigne/test-utils": "^0.4.
|
|
26
|
+
"@aigne/test-utils": "^0.4.2"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"start": "bun run index.ts",
|
package/usages.ts
CHANGED
|
@@ -27,14 +27,17 @@ const agent = AIAgent.from({
|
|
|
27
27
|
2. evaluate document.body.innerText to get the content
|
|
28
28
|
`,
|
|
29
29
|
memory: new DefaultMemory(),
|
|
30
|
+
inputKey: "message",
|
|
30
31
|
});
|
|
31
32
|
|
|
32
|
-
const result = await aigne.invoke(agent,
|
|
33
|
+
const result = await aigne.invoke(agent, {
|
|
34
|
+
message: "extract content from https://www.arcblock.io",
|
|
35
|
+
});
|
|
33
36
|
|
|
34
37
|
console.log(result);
|
|
35
38
|
// output:
|
|
36
39
|
// {
|
|
37
|
-
//
|
|
40
|
+
// message: "The content extracted from the website [ArcBlock](https://www.arcblock.io) is as follows:\n\n---\n\n**Redefining Software Architect and Ecosystems**\n\nA total solution for building decentralized applications ...",
|
|
38
41
|
// }
|
|
39
42
|
|
|
40
43
|
await aigne.shutdown();
|