cc2im 0.2.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.en.md +120 -0
- package/README.md +120 -0
- package/dist/cli.d.ts +16 -0
- package/dist/cli.js +314 -0
- package/dist/hub/agent-manager.d.ts +63 -0
- package/dist/hub/agent-manager.js +311 -0
- package/dist/hub/hub-context.d.ts +27 -0
- package/dist/hub/hub-context.js +57 -0
- package/dist/hub/index.d.ts +6 -0
- package/dist/hub/index.js +234 -0
- package/dist/hub/launchd.d.ts +7 -0
- package/dist/hub/launchd.js +151 -0
- package/dist/hub/plugin-manager.d.ts +7 -0
- package/dist/hub/plugin-manager.js +29 -0
- package/dist/hub/router.d.ts +21 -0
- package/dist/hub/router.js +35 -0
- package/dist/hub/socket-server.d.ts +23 -0
- package/dist/hub/socket-server.js +191 -0
- package/dist/plugins/channel-manager/index.d.ts +10 -0
- package/dist/plugins/channel-manager/index.js +387 -0
- package/dist/plugins/cron-scheduler/db.d.ts +12 -0
- package/dist/plugins/cron-scheduler/db.js +160 -0
- package/dist/plugins/cron-scheduler/index.d.ts +4 -0
- package/dist/plugins/cron-scheduler/index.js +22 -0
- package/dist/plugins/cron-scheduler/scheduler.d.ts +20 -0
- package/dist/plugins/cron-scheduler/scheduler.js +129 -0
- package/dist/plugins/persistence/db.d.ts +24 -0
- package/dist/plugins/persistence/db.js +121 -0
- package/dist/plugins/persistence/index.d.ts +2 -0
- package/dist/plugins/persistence/index.js +93 -0
- package/dist/plugins/web-monitor/api-routes.d.ts +33 -0
- package/dist/plugins/web-monitor/api-routes.js +474 -0
- package/dist/plugins/web-monitor/index.d.ts +2 -0
- package/dist/plugins/web-monitor/index.js +21 -0
- package/dist/plugins/web-monitor/log-tailer.d.ts +13 -0
- package/dist/plugins/web-monitor/log-tailer.js +74 -0
- package/dist/plugins/web-monitor/monitor-client.d.ts +17 -0
- package/dist/plugins/web-monitor/monitor-client.js +68 -0
- package/dist/plugins/web-monitor/server.d.ts +14 -0
- package/dist/plugins/web-monitor/server.js +205 -0
- package/dist/plugins/web-monitor/stats-reader.d.ts +22 -0
- package/dist/plugins/web-monitor/stats-reader.js +17 -0
- package/dist/plugins/web-monitor/token-stats.d.ts +19 -0
- package/dist/plugins/web-monitor/token-stats.js +86 -0
- package/dist/plugins/web-monitor/usage-stats.d.ts +13 -0
- package/dist/plugins/web-monitor/usage-stats.js +56 -0
- package/dist/plugins/weixin/chunker.d.ts +16 -0
- package/dist/plugins/weixin/chunker.js +142 -0
- package/dist/plugins/weixin/connection.d.ts +46 -0
- package/dist/plugins/weixin/connection.js +270 -0
- package/dist/plugins/weixin/index.d.ts +10 -0
- package/dist/plugins/weixin/index.js +198 -0
- package/dist/plugins/weixin/media-upload.d.ts +22 -0
- package/dist/plugins/weixin/media-upload.js +134 -0
- package/dist/plugins/weixin/media.d.ts +6 -0
- package/dist/plugins/weixin/media.js +83 -0
- package/dist/plugins/weixin/permission.d.ts +35 -0
- package/dist/plugins/weixin/permission.js +96 -0
- package/dist/plugins/weixin/qr-login.d.ts +23 -0
- package/dist/plugins/weixin/qr-login.js +77 -0
- package/dist/plugins/weixin/weixin-channel.d.ts +33 -0
- package/dist/plugins/weixin/weixin-channel.js +123 -0
- package/dist/shared/channel-config.d.ts +8 -0
- package/dist/shared/channel-config.js +14 -0
- package/dist/shared/channel.d.ts +37 -0
- package/dist/shared/channel.js +8 -0
- package/dist/shared/mcp-config.d.ts +5 -0
- package/dist/shared/mcp-config.js +44 -0
- package/dist/shared/plugin.d.ts +32 -0
- package/dist/shared/plugin.js +1 -0
- package/dist/shared/socket.d.ts +5 -0
- package/dist/shared/socket.js +31 -0
- package/dist/shared/types.d.ts +136 -0
- package/dist/shared/types.js +1 -0
- package/dist/spoke/channel-server.d.ts +48 -0
- package/dist/spoke/channel-server.js +383 -0
- package/dist/spoke/index.d.ts +13 -0
- package/dist/spoke/index.js +115 -0
- package/dist/spoke/permission.d.ts +28 -0
- package/dist/spoke/permission.js +142 -0
- package/dist/spoke/socket-client.d.ts +22 -0
- package/dist/spoke/socket-client.js +83 -0
- package/dist/web-frontend/assets/index-CU9vxw8F.js +9 -0
- package/dist/web-frontend/index.html +82 -0
- package/package.json +54 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>cc2im // command center</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet" />
|
|
10
|
+
<style>
|
|
11
|
+
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
|
|
12
|
+
:root {
|
|
13
|
+
--bg-deep: #05080f;
|
|
14
|
+
--bg-panel: #0a0f1a;
|
|
15
|
+
--bg-card: #0f1520;
|
|
16
|
+
--bg-card-hover: #141c2b;
|
|
17
|
+
--bg-card-active: #1a2438;
|
|
18
|
+
--border: #1a2435;
|
|
19
|
+
--border-bright: #243352;
|
|
20
|
+
--text: #c8d1dc;
|
|
21
|
+
--text-dim: #5a6a80;
|
|
22
|
+
--text-muted: #384860;
|
|
23
|
+
--accent: #e0a643;
|
|
24
|
+
--accent-dim: rgba(224, 166, 67, 0.15);
|
|
25
|
+
--green: #10b981;
|
|
26
|
+
--green-glow: rgba(16, 185, 129, 0.4);
|
|
27
|
+
--red: #ef4444;
|
|
28
|
+
--amber: #f59e0b;
|
|
29
|
+
--font-mono: 'JetBrains Mono', 'SF Mono', monospace;
|
|
30
|
+
--font-display: 'Outfit', sans-serif;
|
|
31
|
+
}
|
|
32
|
+
body {
|
|
33
|
+
font-family: var(--font-mono);
|
|
34
|
+
background: var(--bg-deep);
|
|
35
|
+
color: var(--text);
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
}
|
|
38
|
+
/* Subtle grid texture */
|
|
39
|
+
body::before {
|
|
40
|
+
content: '';
|
|
41
|
+
position: fixed;
|
|
42
|
+
inset: 0;
|
|
43
|
+
background-image:
|
|
44
|
+
linear-gradient(rgba(224, 166, 67, 0.02) 1px, transparent 1px),
|
|
45
|
+
linear-gradient(90deg, rgba(224, 166, 67, 0.02) 1px, transparent 1px);
|
|
46
|
+
background-size: 40px 40px;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
z-index: 0;
|
|
49
|
+
}
|
|
50
|
+
#root { position: relative; z-index: 1; }
|
|
51
|
+
|
|
52
|
+
@keyframes pulse-green {
|
|
53
|
+
0%, 100% { box-shadow: 0 0 4px var(--green-glow); }
|
|
54
|
+
50% { box-shadow: 0 0 12px var(--green-glow), 0 0 24px rgba(16, 185, 129, 0.15); }
|
|
55
|
+
}
|
|
56
|
+
@keyframes fade-in {
|
|
57
|
+
from { opacity: 0; transform: translateY(6px); }
|
|
58
|
+
to { opacity: 1; transform: translateY(0); }
|
|
59
|
+
}
|
|
60
|
+
@keyframes slide-in-left {
|
|
61
|
+
from { opacity: 0; transform: translateX(-8px); }
|
|
62
|
+
to { opacity: 1; transform: translateX(0); }
|
|
63
|
+
}
|
|
64
|
+
@keyframes slide-in-right {
|
|
65
|
+
from { opacity: 0; transform: translateX(8px); }
|
|
66
|
+
to { opacity: 1; transform: translateX(0); }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.msg-header:hover .edit-pencil { opacity: 1 !important; }
|
|
70
|
+
|
|
71
|
+
/* Scrollbar */
|
|
72
|
+
::-webkit-scrollbar { width: 4px; }
|
|
73
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
74
|
+
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
|
|
75
|
+
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
|
|
76
|
+
</style>
|
|
77
|
+
<script type="module" crossorigin src="/assets/index-CU9vxw8F.js"></script>
|
|
78
|
+
</head>
|
|
79
|
+
<body>
|
|
80
|
+
<div id="root"></div>
|
|
81
|
+
</body>
|
|
82
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cc2im",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "IM gateway for multiple local Claude Code instances",
|
|
5
|
+
"author": "roxorlt",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/roxorlt/cc2im.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/roxorlt/cc2im#readme",
|
|
12
|
+
"keywords": ["claude", "claude-code", "wechat", "weixin", "im", "gateway", "mcp"],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"bin": {
|
|
15
|
+
"cc2im": "dist/cli.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"!dist/__tests__"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"dev:hub": "npx tsx src/hub/index.ts",
|
|
24
|
+
"dev:spoke": "npx tsx src/spoke/index.ts",
|
|
25
|
+
"prepare": "git config core.hooksPath .githooks",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
31
|
+
"@pinixai/weixin-bot": "^1.2.0",
|
|
32
|
+
"better-sqlite3": "^12.8.0",
|
|
33
|
+
"croner": "^10.0.1",
|
|
34
|
+
"qrcode": "^1.5.4",
|
|
35
|
+
"qrcode-terminal": "^0.12.0",
|
|
36
|
+
"tsx": "^4.21.0",
|
|
37
|
+
"ws": "^8.20.0",
|
|
38
|
+
"zod": "^3.24.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
42
|
+
"@types/node": "^22.0.0",
|
|
43
|
+
"@types/qrcode": "^1.5.6",
|
|
44
|
+
"@types/react": "^19.2.14",
|
|
45
|
+
"@types/react-dom": "^19.2.3",
|
|
46
|
+
"@types/ws": "^8.18.1",
|
|
47
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
48
|
+
"react": "^19.2.4",
|
|
49
|
+
"react-dom": "^19.2.4",
|
|
50
|
+
"typescript": "^5.9.3",
|
|
51
|
+
"vite": "^8.0.3",
|
|
52
|
+
"vitest": "^4.1.2"
|
|
53
|
+
}
|
|
54
|
+
}
|