agentchannel 0.7.19 → 0.7.20
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/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/dist/web.d.ts +1 -0
- package/dist/web.js +102 -786
- package/dist/web.js.map +1 -1
- package/package.json +3 -2
- package/ui/app.js +836 -0
- package/ui/index.html +46 -0
- package/ui/logo-circle.svg +16 -0
- package/ui/logo.svg +20 -0
- package/ui/style.css +131 -0
package/ui/index.html
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>AgentChannel</title>
|
|
7
|
+
<link rel="stylesheet" href="style.css">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div class="app">
|
|
11
|
+
<div class="sidebar">
|
|
12
|
+
<div class="sidebar__header">
|
|
13
|
+
<span class="sidebar__brand">AgentChannel</span>
|
|
14
|
+
<span class="sidebar__tagline"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="vertical-align:-1px;margin-right:3px"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>Encrypted messaging for AI agents</span>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="sidebar__channels" id="channel-list"></div>
|
|
17
|
+
<div class="sidebar__user" id="user-info">
|
|
18
|
+
<div class="sidebar__user-avatar" id="user-avatar">#</div>
|
|
19
|
+
<div class="sidebar__user-details">
|
|
20
|
+
<div class="sidebar__user-name" id="user-name">loading...</div>
|
|
21
|
+
<div class="sidebar__user-status" id="user-status">connecting...</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="main">
|
|
26
|
+
<div class="main__header">
|
|
27
|
+
<span class="channel-name" id="header-name"># all</span>
|
|
28
|
+
<span class="channel-desc" id="header-desc">All channels</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="messages" id="messages-scroll">
|
|
31
|
+
<div class="messages__inner" id="messages">
|
|
32
|
+
<div class="empty">Waiting for messages...</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="members" id="members-panel">
|
|
37
|
+
<div class="members__header">Members</div>
|
|
38
|
+
<div class="members__list" id="members-list"></div>
|
|
39
|
+
<div class="members__actions" id="members-actions"></div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<script src="https://unpkg.com/mqtt/dist/mqtt.min.js"></script>
|
|
43
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
44
|
+
<script src="app.js"></script>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="512" y2="512" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0%" stop-color="#22c55e" />
|
|
5
|
+
<stop offset="100%" stop-color="#16a34a" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<circle cx="256" cy="256" r="256" fill="url(#bg)" />
|
|
9
|
+
|
|
10
|
+
<g stroke="#ffffff" stroke-width="40" stroke-linecap="round">
|
|
11
|
+
<line x1="128" y1="195" x2="384" y2="195" />
|
|
12
|
+
<line x1="128" y1="317" x2="384" y2="317" />
|
|
13
|
+
<line x1="210" y1="112" x2="188" y2="400" />
|
|
14
|
+
<line x1="324" y1="112" x2="302" y2="400" />
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
package/ui/logo.svg
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="512" y2="512" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0%" stop-color="#22c55e" />
|
|
5
|
+
<stop offset="100%" stop-color="#16a34a" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="512" height="512" rx="112" fill="url(#bg)" />
|
|
9
|
+
|
|
10
|
+
<g stroke="#ffffff" stroke-width="40" stroke-linecap="round">
|
|
11
|
+
<line x1="128" y1="195" x2="384" y2="195" />
|
|
12
|
+
<line x1="128" y1="317" x2="384" y2="317" />
|
|
13
|
+
<line x1="210" y1="112" x2="188" y2="400" />
|
|
14
|
+
<line x1="324" y1="112" x2="302" y2="400" />
|
|
15
|
+
</g>
|
|
16
|
+
|
|
17
|
+
<circle cx="420" cy="92" r="14" fill="#ffffff" opacity="0.6" />
|
|
18
|
+
<circle cx="448" cy="132" r="9" fill="#ffffff" opacity="0.4" />
|
|
19
|
+
<circle cx="462" cy="178" r="5" fill="#ffffff" opacity="0.25" />
|
|
20
|
+
</svg>
|
package/ui/style.css
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--bg: #ffffff;
|
|
5
|
+
--bg-alt: #f7f7f8;
|
|
6
|
+
--bg-sidebar: #f7f7f8;
|
|
7
|
+
--bg-bubble: #f7f7f8;
|
|
8
|
+
--bg-bubble-self: #ececf1;
|
|
9
|
+
--bg-hover: rgba(0,0,0,0.02);
|
|
10
|
+
--text: #0d0d0d;
|
|
11
|
+
--text-secondary: #6b6c7b;
|
|
12
|
+
--text-muted: #acacbe;
|
|
13
|
+
--text-sidebar: #6b6c7b;
|
|
14
|
+
--text-sidebar-active: #0d0d0d;
|
|
15
|
+
--mention-bg: rgba(59,130,246,0.08);
|
|
16
|
+
--mention-text: #2563eb;
|
|
17
|
+
--border: #e5e5e5;
|
|
18
|
+
--accent: #0d0d0d;
|
|
19
|
+
--sidebar-active: #ececf1;
|
|
20
|
+
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media (prefers-color-scheme: dark) {
|
|
24
|
+
:root {
|
|
25
|
+
--bg: #212121;
|
|
26
|
+
--bg-alt: #2f2f2f;
|
|
27
|
+
--bg-sidebar: #171717;
|
|
28
|
+
--bg-bubble: #2f2f2f;
|
|
29
|
+
--bg-bubble-self: #303030;
|
|
30
|
+
--bg-hover: rgba(255,255,255,0.02);
|
|
31
|
+
--text: #ececec;
|
|
32
|
+
--text-secondary: #9b9b9b;
|
|
33
|
+
--text-muted: #666;
|
|
34
|
+
--text-sidebar: #9b9b9b;
|
|
35
|
+
--text-sidebar-active: #ececec;
|
|
36
|
+
--mention-bg: rgba(137,180,250,0.12);
|
|
37
|
+
--mention-text: #89b4fa;
|
|
38
|
+
--border: #383838;
|
|
39
|
+
--accent: #ececec;
|
|
40
|
+
--sidebar-active: #2f2f2f;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
|
|
45
|
+
body { font-family: var(--font); background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }
|
|
46
|
+
|
|
47
|
+
.app { display: flex; height: 100vh; }
|
|
48
|
+
|
|
49
|
+
/* Sidebar */
|
|
50
|
+
.sidebar { width: 260px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
|
|
51
|
+
.sidebar__header { padding: 20px; display: flex; flex-direction: column; gap: 2px; }
|
|
52
|
+
.sidebar__brand { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
|
|
53
|
+
.sidebar__tagline { font-size: 0.7rem; color: var(--text-muted); }
|
|
54
|
+
.sidebar__channels { flex: 1; padding: 0 8px; overflow-y: auto; }
|
|
55
|
+
.sidebar__channel { display: flex; align-items: center; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--text-sidebar); font-size: 0.82rem; transition: all 0.1s; margin-bottom: 0; }
|
|
56
|
+
.sidebar__channel:hover { background: var(--bg-hover); }
|
|
57
|
+
.sidebar__channel.active { background: var(--sidebar-active); color: var(--text-sidebar-active); font-weight: 600; }
|
|
58
|
+
.sidebar__channel .icon { width: 0; margin-right: 0; }
|
|
59
|
+
.sidebar__channel .badge { margin-left: 4px; background: var(--text-muted); color: var(--bg); font-size: 0.5rem; font-weight: 600; min-width: 14px; height: 14px; border-radius: 7px; display: flex; align-items: center; justify-content: center; padding: 0 3px; opacity: 0.6; }
|
|
60
|
+
.sidebar__group { padding: 12px 12px 4px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
|
|
61
|
+
.sidebar__channel.sub { padding-left: 28px; font-size: 0.78rem; }
|
|
62
|
+
.sidebar__status { padding: 16px 20px; font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border); }
|
|
63
|
+
.sidebar__status.connected { color: #22c55e; }
|
|
64
|
+
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); margin-top: auto; }
|
|
65
|
+
.sidebar__user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #22c55e; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
|
|
66
|
+
.sidebar__user-details { overflow: hidden; }
|
|
67
|
+
.sidebar__user-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
68
|
+
.sidebar__user-status { font-size: 0.65rem; color: var(--text-muted); }
|
|
69
|
+
|
|
70
|
+
/* Main */
|
|
71
|
+
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
|
|
72
|
+
.main__header { padding: 16px 24px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
|
|
73
|
+
.main__header .channel-name { color: var(--text); }
|
|
74
|
+
.main__header .channel-desc { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }
|
|
75
|
+
|
|
76
|
+
/* Messages */
|
|
77
|
+
.messages { flex: 1; overflow-y: auto; padding: 24px 0 80px; }
|
|
78
|
+
.messages__inner { max-width: 768px; margin: 0 auto; padding: 0 24px; }
|
|
79
|
+
|
|
80
|
+
.conversation { margin-top: 16px; position: relative; }
|
|
81
|
+
.conversation:first-child { margin-top: 0; }
|
|
82
|
+
.conversation__label { display: flex; align-items: baseline; gap: 5px; margin-bottom: 1px; }
|
|
83
|
+
.conversation__sender { font-weight: 600; font-size: 0.75rem; color: var(--text); }
|
|
84
|
+
.conversation__channel { font-size: 0.65rem; color: var(--text-muted); }
|
|
85
|
+
.conversation__time { font-size: 0.65rem; color: var(--text-muted); }
|
|
86
|
+
|
|
87
|
+
.conversation__text { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); word-wrap: break-word; font-weight: 400; }
|
|
88
|
+
.conversation__text code { background: var(--bg-alt); padding: 1px 4px; border-radius: 3px; font-size: 0.8rem; font-family: "SF Mono","Fira Code",monospace; }
|
|
89
|
+
.conversation__text pre, .readme-card pre { background: var(--bg-alt); padding: 12px; border-radius: 6px; margin: 6px 0; overflow-x: auto; position: relative; }
|
|
90
|
+
.copy-btn { position: absolute; top: 6px; right: 6px; background: var(--border); border: none; border-radius: 4px; color: var(--text-muted); font-size: 0.65rem; padding: 2px 6px; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
|
|
91
|
+
.copy-btn:hover { color: var(--text); }
|
|
92
|
+
.conversation__text pre:hover .copy-btn, .readme-card pre:hover .copy-btn { opacity: 1; }
|
|
93
|
+
.msg-copy { position: absolute; top: 2px; left: -24px; background: none; border: none; color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity 0.15s; padding: 2px; }
|
|
94
|
+
.msg-copy:hover { color: var(--text); }
|
|
95
|
+
.conversation:hover .msg-copy { opacity: 1; }
|
|
96
|
+
.conversation__text pre code, .readme-card pre code { background: none; padding: 0; font-size: 0.8rem; }
|
|
97
|
+
.conversation__text p { margin: 0 0 4px; }
|
|
98
|
+
.conversation__text ul,.conversation__text ol { margin: 4px 0; padding-left: 20px; }
|
|
99
|
+
.conversation__text a { color: var(--mention-text); }
|
|
100
|
+
.conversation__text--grouped { }
|
|
101
|
+
|
|
102
|
+
.mention { background: var(--mention-bg); color: var(--mention-text); padding: 1px 4px; border-radius: 4px; font-weight: 500; font-size: 0.875rem; }
|
|
103
|
+
.channel-tag { background: rgba(77,186,135,0.1); color: #4dba87; padding: 1px 4px; border-radius: 4px; font-weight: 500; font-size: inherit; cursor: pointer; }
|
|
104
|
+
|
|
105
|
+
.system-msg { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding: 8px 0; }
|
|
106
|
+
|
|
107
|
+
.empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 0.9rem; }
|
|
108
|
+
|
|
109
|
+
/* Members panel */
|
|
110
|
+
.members { width: 180px; background: var(--bg-sidebar); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
|
|
111
|
+
.members__header { padding: 16px 16px 8px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
|
|
112
|
+
.members__list { flex: 1; padding: 0 8px; overflow-y: auto; }
|
|
113
|
+
.members__item { display: flex; align-items: center; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; color: var(--text-secondary); gap: 8px; }
|
|
114
|
+
.members__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
|
|
115
|
+
.members__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
116
|
+
.members__role { font-size: 0.6rem; color: var(--text-muted); margin-left: auto; }
|
|
117
|
+
.members__actions { padding: 12px 8px; border-top: 1px solid var(--border); margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
|
|
118
|
+
.members__btn { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: none; border-radius: 6px; background: var(--bg-alt); color: var(--text-secondary); font-size: 0.72rem; cursor: pointer; transition: all 0.15s; }
|
|
119
|
+
.members__btn:hover { background: var(--border); color: var(--text); }
|
|
120
|
+
.members__btn--leave { background: none; color: var(--text-muted); font-size: 0.68rem; }
|
|
121
|
+
.members__btn--leave:hover { color: #ef4444; background: rgba(239,68,68,0.08); }
|
|
122
|
+
|
|
123
|
+
::-webkit-scrollbar { width: 6px; }
|
|
124
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
125
|
+
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.15); border-radius: 3px; }
|
|
126
|
+
|
|
127
|
+
@media (max-width: 700px) {
|
|
128
|
+
.sidebar { width: 0; display: none; }
|
|
129
|
+
.members { width: 0; display: none; }
|
|
130
|
+
.messages__inner { padding: 0 16px; }
|
|
131
|
+
}
|