opencode-plugin-wecom 0.0.0-stage → 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.
- package/LICENSE +21 -0
- package/README.md +135 -2
- package/dist/gui-experimental.cjs +460 -0
- package/dist/index.d.ts +285 -0
- package/dist/index.js +1827 -0
- package/dist/rpc-CDRXKJwO.js +71 -0
- package/dist/rpc-D5Bs48Ma.d.ts +105 -0
- package/dist/rpc.d.ts +2 -0
- package/dist/rpc.js +3 -0
- package/package.json +56 -3
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Rpc } from "@opencode/plugin/rpc";
|
|
2
|
+
|
|
3
|
+
//#region src/rpc.ts
|
|
4
|
+
const PLUGIN_ID = "opencode-plugin-wecom";
|
|
5
|
+
const emptyObjectSchema = {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {},
|
|
8
|
+
additionalProperties: false
|
|
9
|
+
};
|
|
10
|
+
const anyObjectSchema = {
|
|
11
|
+
type: "object",
|
|
12
|
+
additionalProperties: true
|
|
13
|
+
};
|
|
14
|
+
const WecomRpc = Rpc.define({
|
|
15
|
+
id: PLUGIN_ID,
|
|
16
|
+
methods: {
|
|
17
|
+
status: {
|
|
18
|
+
input: emptyObjectSchema,
|
|
19
|
+
output: anyObjectSchema
|
|
20
|
+
},
|
|
21
|
+
startLogin: {
|
|
22
|
+
input: emptyObjectSchema,
|
|
23
|
+
output: {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
phase: { type: "string" },
|
|
27
|
+
authorization_url: { type: "string" }
|
|
28
|
+
},
|
|
29
|
+
required: ["phase", "authorization_url"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
finishLogin: {
|
|
33
|
+
input: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: { wait_seconds: { type: "number" } },
|
|
36
|
+
additionalProperties: false
|
|
37
|
+
},
|
|
38
|
+
output: anyObjectSchema
|
|
39
|
+
},
|
|
40
|
+
logout: {
|
|
41
|
+
input: emptyObjectSchema,
|
|
42
|
+
output: anyObjectSchema
|
|
43
|
+
},
|
|
44
|
+
recentReceipts: {
|
|
45
|
+
input: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: { limit: { type: "number" } },
|
|
48
|
+
additionalProperties: false
|
|
49
|
+
},
|
|
50
|
+
output: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: { receipts: {
|
|
53
|
+
type: "array",
|
|
54
|
+
items: anyObjectSchema
|
|
55
|
+
} },
|
|
56
|
+
required: ["receipts"]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
events: { authChanged: { schema: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
phase: { type: "string" },
|
|
64
|
+
wecom_configured: { type: "boolean" }
|
|
65
|
+
},
|
|
66
|
+
required: ["phase", "wecom_configured"]
|
|
67
|
+
} } }
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { WecomRpc as n, PLUGIN_ID as t };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
//#region src/rpc.d.ts
|
|
2
|
+
declare const PLUGIN_ID = "opencode-plugin-wecom";
|
|
3
|
+
declare const WecomRpc: {
|
|
4
|
+
readonly id: "opencode-plugin-wecom";
|
|
5
|
+
readonly methods: {
|
|
6
|
+
readonly status: {
|
|
7
|
+
readonly input: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {};
|
|
10
|
+
readonly additionalProperties: false;
|
|
11
|
+
};
|
|
12
|
+
readonly output: {
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly additionalProperties: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
readonly startLogin: {
|
|
18
|
+
readonly input: {
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly properties: {};
|
|
21
|
+
readonly additionalProperties: false;
|
|
22
|
+
};
|
|
23
|
+
readonly output: {
|
|
24
|
+
readonly type: "object";
|
|
25
|
+
readonly properties: {
|
|
26
|
+
readonly phase: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
};
|
|
29
|
+
readonly authorization_url: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly required: readonly ["phase", "authorization_url"];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly finishLogin: {
|
|
37
|
+
readonly input: {
|
|
38
|
+
readonly type: "object";
|
|
39
|
+
readonly properties: {
|
|
40
|
+
readonly wait_seconds: {
|
|
41
|
+
readonly type: "number";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly additionalProperties: false;
|
|
45
|
+
};
|
|
46
|
+
readonly output: {
|
|
47
|
+
readonly type: "object";
|
|
48
|
+
readonly additionalProperties: true;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly logout: {
|
|
52
|
+
readonly input: {
|
|
53
|
+
readonly type: "object";
|
|
54
|
+
readonly properties: {};
|
|
55
|
+
readonly additionalProperties: false;
|
|
56
|
+
};
|
|
57
|
+
readonly output: {
|
|
58
|
+
readonly type: "object";
|
|
59
|
+
readonly additionalProperties: true;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
readonly recentReceipts: {
|
|
63
|
+
readonly input: {
|
|
64
|
+
readonly type: "object";
|
|
65
|
+
readonly properties: {
|
|
66
|
+
readonly limit: {
|
|
67
|
+
readonly type: "number";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly additionalProperties: false;
|
|
71
|
+
};
|
|
72
|
+
readonly output: {
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly receipts: {
|
|
76
|
+
readonly type: "array";
|
|
77
|
+
readonly items: {
|
|
78
|
+
readonly type: "object";
|
|
79
|
+
readonly additionalProperties: true;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
readonly required: readonly ["receipts"];
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly events: {
|
|
88
|
+
readonly authChanged: {
|
|
89
|
+
readonly schema: {
|
|
90
|
+
readonly type: "object";
|
|
91
|
+
readonly properties: {
|
|
92
|
+
readonly phase: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
};
|
|
95
|
+
readonly wecom_configured: {
|
|
96
|
+
readonly type: "boolean";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly required: readonly ["phase", "wecom_configured"];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
//#endregion
|
|
105
|
+
export { WecomRpc as n, PLUGIN_ID as t };
|
package/dist/rpc.d.ts
ADDED
package/dist/rpc.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-plugin-wecom",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenCode V2 plugin for WeCom (Enterprise WeChat) via desktop-free WorkBuddy cloud auth, Dayuan A2A read-only queries, optional @wecom/cli bridge, and Yuri/Desktop GUI controls",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./rpc": {
|
|
12
|
+
"types": "./dist/rpc.d.ts",
|
|
13
|
+
"default": "./dist/rpc.js"
|
|
14
|
+
},
|
|
15
|
+
"./gui-experimental": "./dist/gui-experimental.cjs"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@opencode/plugin": "^2.3.2"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"solid-js": "^1.9.17"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public",
|
|
30
|
+
"registry": "https://registry.npmjs.org/"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/yee94/yuri-plugins.git",
|
|
35
|
+
"directory": "packages/opencode-plugin-wecom"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/yee94/yuri-plugins/tree/main/packages/opencode-plugin-wecom#readme",
|
|
38
|
+
"keywords": [
|
|
39
|
+
"opencode",
|
|
40
|
+
"opencode-plugin",
|
|
41
|
+
"yuri",
|
|
42
|
+
"yuri-plugin",
|
|
43
|
+
"wecom",
|
|
44
|
+
"workbuddy",
|
|
45
|
+
"dayuan",
|
|
46
|
+
"a2a"
|
|
47
|
+
],
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=22"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsdown",
|
|
54
|
+
"type-check": "tsc --noEmit",
|
|
55
|
+
"lint": "biome check src tests package.json tsconfig.json tsdown.config.ts",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"check": "pnpm lint && pnpm type-check && pnpm build && pnpm test && node --check dist/gui-experimental.cjs"
|
|
58
|
+
}
|
|
6
59
|
}
|