draw2agent 1.0.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/README.md +53 -0
- package/bin/draw2agent.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14115 -0
- package/dist/index.js.map +1 -0
- package/overlay/dist/draw2agent-overlay.css +1 -0
- package/overlay/dist/draw2agent-overlay.js +3032 -0
- package/package.json +41 -0
- package/prompts/agent-close-instructions.txt +5 -0
- package/prompts/agent-error-instructions.txt +9 -0
- package/prompts/agent-instructions.txt +12 -0
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "draw2agent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Draw on your website, let your AI agent see it. Visual context for code generation via MCP.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"draw2agent": "./bin/draw2agent.js"
|
|
9
|
+
},
|
|
10
|
+
"author": "zero-abd",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/zero-abd/draw2agent.git"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build:server": "tsup",
|
|
17
|
+
"build:overlay": "cd overlay && npm run build",
|
|
18
|
+
"build": "npm run build:server && npm run build:overlay",
|
|
19
|
+
"dev": "tsup --watch",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"keywords": ["mcp", "draw", "ai", "agent", "code-generation", "excalidraw", "visual"],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
26
|
+
"http-proxy": "^1.18.1",
|
|
27
|
+
"open": "^10.1.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/http-proxy": "^1.17.14",
|
|
31
|
+
"@types/node": "^22.0.0",
|
|
32
|
+
"tsup": "^8.0.0",
|
|
33
|
+
"typescript": "^5.5.0"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"overlay/dist",
|
|
38
|
+
"bin",
|
|
39
|
+
"prompts"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
The user has intentionally closed the draw2agent canvas session. They are done making visual annotations for now.
|
|
2
|
+
|
|
3
|
+
1. DO NOT call the `launch_canvas` tool again. The looping session is over.
|
|
4
|
+
2. Provide a small bullet-point summary of all the changes you made across the entire drawing session.
|
|
5
|
+
3. Ask the user if there is anything else they would like to do.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The draw2agent canvas tool encountered an error while trying to capture the user's screen.
|
|
2
|
+
|
|
3
|
+
Error context:
|
|
4
|
+
{{ERROR_MESSAGE}}
|
|
5
|
+
|
|
6
|
+
1. Review the error message.
|
|
7
|
+
2. If the error implies the local server isn't running or there is a connection issue, please notify the user and ask them to fix it.
|
|
8
|
+
3. If it looks like a transient issue, you may try calling `launch_canvas` again.
|
|
9
|
+
4. Do not enter an infinite loop of retries. If it fails twice, stop and wait for the user.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
You are receiving a screenshot of a user's web application. The user has drawn annotations (circles, arrows, or text) over specific elements to indicate desired changes.
|
|
2
|
+
|
|
3
|
+
Please analyze the provided screenshot:
|
|
4
|
+
1. Identify the drawn annotations.
|
|
5
|
+
2. Determine which UI elements they are pointing to or circling.
|
|
6
|
+
3. Understand the implied request (e.g., if checking a box, modifying text, moving an element, changing colors).
|
|
7
|
+
4. Implement the requested UI changes in the corresponding codebase.
|
|
8
|
+
|
|
9
|
+
Do not explain the image to the user. Simply write the code or commands necessary to enact the indicated visual changes and then give an walkthrough.
|
|
10
|
+
|
|
11
|
+
5. IMPORTANT: Once you have fully implemented my requested changes, you MUST immediately call the `launch_canvas` tool again without asking me.
|
|
12
|
+
This creates an infinite loop where you stand by and wait for my next set of changes. Do not say goodbye or say you are waiting. Just call the tool!
|