qcanvas-local-agent 0.1.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.
@@ -0,0 +1,35 @@
1
+ export type JsonRecord = Record<string, unknown>;
2
+ export type QCanvasViewport = {
3
+ x: number;
4
+ y: number;
5
+ zoom: number;
6
+ };
7
+ export type QCanvasSnapshot = {
8
+ clientId: string;
9
+ url: string | null;
10
+ projectId: string | null;
11
+ projectName: string | null;
12
+ flowId: string | null;
13
+ flowName: string | null;
14
+ nodes: unknown[];
15
+ edges: unknown[];
16
+ selectedNodeIds: string[];
17
+ viewport: QCanvasViewport | null;
18
+ updatedAt: string;
19
+ };
20
+ export type LocalToolResultEnvelope = {
21
+ ok: boolean;
22
+ result?: unknown;
23
+ error?: string;
24
+ };
25
+ export type PendingToolResult = {
26
+ requestId?: string;
27
+ result?: unknown;
28
+ error?: string;
29
+ };
30
+ export type AgentEmit = (type: string, payload: unknown) => void;
31
+ export type AgentAttachment = {
32
+ name?: string;
33
+ type?: string;
34
+ dataUrl?: string;
35
+ };
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "qcanvas-local-agent",
3
+ "version": "0.1.0",
4
+ "description": "QCanvas 本机 Agent —— 在本机驱动 Codex / Claude 操控 QCanvas 网页画布的本地桥接服务。",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "qcanvas-local-agent": "./dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsc -p tsconfig.json",
17
+ "start": "node dist/index.js",
18
+ "prepack": "npm run build"
19
+ },
20
+ "keywords": [
21
+ "qcanvas",
22
+ "codex",
23
+ "claude",
24
+ "canvas",
25
+ "agent",
26
+ "mcp"
27
+ ],
28
+ "license": "MIT",
29
+ "dependencies": {
30
+ "@modelcontextprotocol/sdk": "^1.12.1",
31
+ "@openai/codex": "^0.144.1",
32
+ "zod": "^3.25.76"
33
+ },
34
+ "optionalDependencies": {
35
+ "@anthropic-ai/claude-code": "^2.1.206"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^22.0.0",
39
+ "typescript": "^5.9.3"
40
+ },
41
+ "engines": {
42
+ "node": ">=18"
43
+ }
44
+ }