@alexsun-top/opencode-chat-room 0.7.1 → 0.7.3
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/CHANGELOG.md +21 -0
- package/README.md +4 -4
- package/README.zh-CN.md +4 -4
- package/package.json +1 -1
- package/server/assets/base.css +2 -0
- package/server/assets/chat/create-room-dialog.js +49 -0
- package/server/assets/chat/editor.js +28 -9
- package/server/assets/chat/events.js +31 -21
- package/server/assets/chat/image-zoom.js +49 -16
- package/server/assets/chat/index.js +2 -0
- package/server/assets/chat/locales/de.js +5 -1
- package/server/assets/chat/locales/es.js +5 -1
- package/server/assets/chat/locales/fr.js +5 -1
- package/server/assets/chat/locales/it.js +5 -1
- package/server/assets/chat/locales/ja.js +5 -1
- package/server/assets/chat/locales/ko.js +5 -1
- package/server/assets/chat/markdown.js +14 -1
- package/server/assets/chat/members.js +2 -0
- package/server/assets/chat/messages.js +1 -0
- package/server/assets/chat/questions.js +1 -0
- package/server/assets/chat/rooms.js +19 -12
- package/server/assets/chat/settings.js +40 -1
- package/server/assets/chat/shortcuts.js +113 -23
- package/server/assets/chat/state.js +12 -4
- package/server/assets/code-highlight.css +2 -5
- package/server/assets/conversation.css +22 -14
- package/server/assets/responsive.css +48 -4
- package/server/assets/room-create.css +85 -0
- package/server/assets/settings.css +93 -35
- package/server/chat-server.ts +3 -3
- package/server/chat.html +138 -72
- package/server/join-requests.ts +1 -0
- package/server/room-join.ts +7 -2
- package/server/sw.js +1 -0
- package/skills/chatroom/SKILL.md +1 -1
- package/src/runtime/v2-plugin.ts +2 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* The rail "+" opens this modal instead of a small popover: one clear surface
|
|
2
|
+
with a backdrop, sized for desktop and near full width on phones. */
|
|
3
|
+
#createRoomDialog {
|
|
4
|
+
width: min(560px, calc(100vw - 32px));
|
|
5
|
+
max-width: none;
|
|
6
|
+
max-height: 90dvh;
|
|
7
|
+
padding: 24px;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
color: var(--ink);
|
|
10
|
+
background:
|
|
11
|
+
radial-gradient(360px 200px at 100% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 72%),
|
|
12
|
+
linear-gradient(155deg, var(--surface), color-mix(in srgb, var(--accent-soft) 18%, var(--surface)));
|
|
13
|
+
border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
|
|
14
|
+
border-radius: 20px;
|
|
15
|
+
box-shadow: 0 24px 80px rgb(10 25 20 / .22);
|
|
16
|
+
}
|
|
17
|
+
#createRoomDialog::backdrop {
|
|
18
|
+
background:
|
|
19
|
+
radial-gradient(900px 560px at 50% 0%, rgb(38 80 68 / .28), transparent 72%),
|
|
20
|
+
rgb(9 22 18 / .56);
|
|
21
|
+
backdrop-filter: blur(5px);
|
|
22
|
+
}
|
|
23
|
+
#createRoomDialog[open] { animation: create-room-enter .24s cubic-bezier(.2, .7, .3, 1); }
|
|
24
|
+
#createRoomDialog[open]::backdrop { animation: create-room-backdrop .24s ease; }
|
|
25
|
+
@keyframes create-room-enter { from { opacity: 0; transform: translateY(12px) scale(.985); } }
|
|
26
|
+
@keyframes create-room-backdrop { from { opacity: 0; } }
|
|
27
|
+
|
|
28
|
+
.create-room-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
|
|
29
|
+
.create-room-mark {
|
|
30
|
+
display: grid;
|
|
31
|
+
place-items: center;
|
|
32
|
+
width: 38px;
|
|
33
|
+
height: 38px;
|
|
34
|
+
border-radius: 12px 12px 12px 5px;
|
|
35
|
+
color: var(--accent-ink);
|
|
36
|
+
background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 80%, #18382f), var(--accent));
|
|
37
|
+
box-shadow: 0 3px 9px color-mix(in srgb, var(--accent) 22%, transparent);
|
|
38
|
+
}
|
|
39
|
+
.create-room-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.9; }
|
|
40
|
+
.create-room-eyebrow { margin: 2px 0 0; color: var(--ink-3); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
|
|
41
|
+
.create-room-heading h2 { margin: 0; font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1.16; }
|
|
42
|
+
.create-room-head .reader-close { margin: -6px -6px 0 0; }
|
|
43
|
+
.create-room-hint { max-width: 46ch; margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
|
|
44
|
+
|
|
45
|
+
.create-room-form { margin-top: 18px; }
|
|
46
|
+
.create-room-policy {
|
|
47
|
+
margin-top: 14px;
|
|
48
|
+
padding: 12px 14px;
|
|
49
|
+
border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
|
|
50
|
+
border-radius: 12px;
|
|
51
|
+
background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface));
|
|
52
|
+
}
|
|
53
|
+
.create-room-policy .join-policy { margin: 0; }
|
|
54
|
+
.create-room-policy .join-policy-label { font-size: 13.5px; }
|
|
55
|
+
.create-room-policy-hint { margin: 6px 0 0 41px; line-height: 1.4; }
|
|
56
|
+
.create-room-error { margin: 12px 0 0; }
|
|
57
|
+
.create-room-actions {
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: flex-end;
|
|
60
|
+
gap: 8px;
|
|
61
|
+
margin-top: 16px;
|
|
62
|
+
padding-top: 14px;
|
|
63
|
+
border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
|
|
64
|
+
}
|
|
65
|
+
.create-room-actions .btn { min-width: 104px; }
|
|
66
|
+
|
|
67
|
+
@media (max-width: 640px) {
|
|
68
|
+
#createRoomDialog {
|
|
69
|
+
width: calc(100vw - 20px);
|
|
70
|
+
max-height: calc(100dvh - 20px);
|
|
71
|
+
padding: 18px 16px 16px;
|
|
72
|
+
border-radius: 16px;
|
|
73
|
+
}
|
|
74
|
+
.create-room-head { gap: 10px; }
|
|
75
|
+
.create-room-mark { width: 34px; height: 34px; border-radius: 10px 10px 10px 4px; }
|
|
76
|
+
.create-room-mark svg { width: 17px; height: 17px; }
|
|
77
|
+
.create-room-heading h2 { font-size: 22px; }
|
|
78
|
+
.create-room-head .reader-close { margin: -4px -4px 0 0; }
|
|
79
|
+
.create-room-hint { margin-top: 9px; font-size: 13px; }
|
|
80
|
+
.create-room-form { margin-top: 16px; }
|
|
81
|
+
.create-room-policy { padding: 11px 12px; }
|
|
82
|
+
.create-room-policy-hint { margin-left: 0; }
|
|
83
|
+
.create-room-actions { flex-direction: column-reverse; margin-top: 16px; padding-top: 14px; }
|
|
84
|
+
.create-room-actions .btn { width: 100%; min-height: 44px; }
|
|
85
|
+
}
|
|
@@ -96,43 +96,101 @@
|
|
|
96
96
|
.join-settings:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
|
|
97
97
|
.join-settings:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
98
98
|
|
|
99
|
-
/* Settings: one dialog for language,
|
|
100
|
-
.settings-dialog { width: min(
|
|
101
|
-
.settings-dialog
|
|
102
|
-
.settings-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
/* Settings: one dialog for language, appearance, and the optional access token. */
|
|
100
|
+
.settings-dialog { width: min(1000px, calc(100vw - 32px)); max-width: none; height: min(720px, calc(100dvh - 40px)); max-height: none; margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line)); border-radius: 22px; box-shadow: 0 30px 90px rgb(8 22 18 / .32); }
|
|
101
|
+
.settings-dialog[open] { display: flex; flex-direction: column; animation: settings-in .18s ease-out both; }
|
|
102
|
+
.settings-dialog::backdrop { background: rgb(8 20 16 / .52); backdrop-filter: blur(5px); }
|
|
103
|
+
@keyframes settings-in { from { opacity: 0; transform: translateY(8px) scale(.995); } }
|
|
104
|
+
@media (prefers-reduced-motion: reduce) { .settings-dialog[open] { animation: none; } }
|
|
105
|
+
|
|
106
|
+
.settings-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; }
|
|
107
|
+
.settings-heading { min-width: 0; }
|
|
108
|
+
.settings-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
|
|
105
109
|
.settings-head h2:focus { outline: none; }
|
|
106
|
-
.settings-lead { margin:
|
|
107
|
-
.settings-
|
|
108
|
-
|
|
109
|
-
.settings-
|
|
110
|
-
.settings-
|
|
111
|
-
.settings-
|
|
112
|
-
.settings-
|
|
113
|
-
.settings-
|
|
114
|
-
.
|
|
115
|
-
.
|
|
110
|
+
.settings-lead { margin: 5px 0 0; max-width: 560px; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
|
|
111
|
+
.settings-close { width: 40px; height: 40px; border-radius: 10px; }
|
|
112
|
+
|
|
113
|
+
.settings-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
|
|
114
|
+
.settings-nav { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 2px 24px 22px; border-right: 1px solid color-mix(in srgb, var(--line) 74%, transparent); }
|
|
115
|
+
.settings-tab { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid transparent; border-radius: 11px; color: var(--ink-2); background: transparent; font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; transition: color .14s, background .14s, border-color .14s; }
|
|
116
|
+
.settings-tab svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
|
117
|
+
.settings-tab:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
|
|
118
|
+
.settings-tab[aria-selected="true"] { color: var(--ink); background: var(--surface-2); border-color: color-mix(in srgb, var(--line) 72%, transparent); box-shadow: 0 1px 2px rgb(20 35 30 / .06); }
|
|
119
|
+
.settings-tab[aria-selected="true"] svg { color: var(--accent); }
|
|
120
|
+
.settings-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
121
|
+
.settings-content { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
|
|
122
|
+
.settings-panel { max-width: 780px; padding: 4px 30px 30px 26px; }
|
|
123
|
+
.settings-panel[hidden] { display: none; }
|
|
124
|
+
|
|
125
|
+
.settings-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 22px; padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
|
|
126
|
+
.settings-row:first-child { padding-top: 10px; }
|
|
127
|
+
.settings-row:last-of-type { border-bottom: 0; }
|
|
128
|
+
.settings-copy { min-width: 0; display: grid; gap: 4px; }
|
|
129
|
+
.settings-label { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.35; }
|
|
130
|
+
.settings-hint { margin: 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
|
|
131
|
+
.settings-warning { color: var(--warning); font-weight: 600; }
|
|
132
|
+
.settings-select { width: 168px; min-height: 38px; font-size: 13.5px; }
|
|
133
|
+
.settings-number { display: flex; align-items: center; gap: 8px; }
|
|
134
|
+
.settings-number .input { width: 82px; min-height: 38px; text-align: right; }
|
|
135
|
+
.settings-number-unit { color: var(--ink-3); font-size: 13px; }
|
|
136
|
+
|
|
137
|
+
.settings-switch { position: relative; flex: none; appearance: none; width: 42px; height: 24px; margin: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); cursor: pointer; transition: background .16s, border-color .16s; }
|
|
138
|
+
.settings-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgb(34 53 47 / .18); transition: transform .16s, background .16s; }
|
|
139
|
+
.settings-switch:checked { border-color: var(--accent); background: var(--accent); }
|
|
140
|
+
.settings-switch:checked::after { transform: translateX(18px); background: var(--accent-ink); }
|
|
141
|
+
.settings-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
142
|
+
|
|
143
|
+
.settings-block { min-width: 0; margin: 0; padding: 14px 0 4px; border: 0; }
|
|
144
|
+
.settings-block legend.settings-label { display: block; margin: 0; padding: 0; }
|
|
145
|
+
.settings-block .settings-hint { margin-top: 4px; }
|
|
146
|
+
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin-top: 14px; }
|
|
147
|
+
.theme-option { position: relative; display: grid; gap: 8px; min-width: 0; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
|
|
116
148
|
.theme-option:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
|
|
117
|
-
.theme-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft)
|
|
149
|
+
.theme-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
|
|
118
150
|
.theme-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
|
|
119
|
-
.theme-option
|
|
120
|
-
.theme-
|
|
121
|
-
.theme-
|
|
122
|
-
.theme-
|
|
123
|
-
.theme-
|
|
151
|
+
.theme-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
152
|
+
.theme-option:has(input:checked)::after { content: "✓"; position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--accent-ink); background: var(--accent); font-size: 11px; font-weight: 700; line-height: 1; }
|
|
153
|
+
.theme-preview { position: relative; display: block; height: 64px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 9px; background: var(--swatch-bg, var(--surface-2)); }
|
|
154
|
+
.theme-preview::before { content: ""; position: absolute; top: 10px; left: 10px; right: 10px; height: 14px; border-radius: 5px; background: var(--swatch-surface, var(--surface)); }
|
|
155
|
+
.theme-preview::after { content: ""; position: absolute; left: 10px; bottom: 10px; width: 26px; height: 6px; border-radius: 99px; background: var(--swatch-accent, var(--accent)); }
|
|
156
|
+
.theme-name { min-width: 0; overflow: hidden; color: var(--ink-2); font-size: 11.5px; font-weight: 600; line-height: 1.3; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
|
|
124
157
|
.theme-option:has(input:checked) .theme-name { color: var(--ink); }
|
|
125
|
-
.theme-option[data-theme-choice="system"] .theme-
|
|
126
|
-
.theme-option[data-theme-choice="system"] .theme-
|
|
127
|
-
.theme-option[data-theme-choice="system"] .theme-
|
|
128
|
-
.theme-option[data-theme-choice="light"] .theme-
|
|
129
|
-
.theme-option[data-theme-choice="dark"] .theme-
|
|
130
|
-
.theme-option[data-theme-choice="forest"] .theme-
|
|
131
|
-
.theme-option[data-theme-choice="sand"] .theme-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
158
|
+
.theme-option[data-theme-choice="system"] .theme-preview { background: linear-gradient(118deg, #f3f1ea 0 50%, #111b19 50%); }
|
|
159
|
+
.theme-option[data-theme-choice="system"] .theme-preview::before { background: linear-gradient(90deg, #fffefa 0 50%, #182522 50%); }
|
|
160
|
+
.theme-option[data-theme-choice="system"] .theme-preview::after { background: linear-gradient(90deg, #22695c 0 50%, #8ac9aa 50%); }
|
|
161
|
+
.theme-option[data-theme-choice="light"] .theme-preview { --swatch-bg: #f3f1ea; --swatch-surface: #fffefa; --swatch-accent: #22695c; }
|
|
162
|
+
.theme-option[data-theme-choice="dark"] .theme-preview { --swatch-bg: #111b19; --swatch-surface: #182522; --swatch-accent: #8ac9aa; }
|
|
163
|
+
.theme-option[data-theme-choice="forest"] .theme-preview { --swatch-bg: #e7ede2; --swatch-surface: #f7faf4; --swatch-accent: #2f6b45; }
|
|
164
|
+
.theme-option[data-theme-choice="sand"] .theme-preview { --swatch-bg: #f4e9d6; --swatch-surface: #fff9ef; --swatch-accent: #9a5a32; }
|
|
165
|
+
|
|
166
|
+
.settings-token-control { display: flex; align-items: center; gap: 8px; }
|
|
167
|
+
.settings-token-control .input { width: 220px; min-height: 38px; }
|
|
168
|
+
.settings-token-control .btn { flex: none; }
|
|
169
|
+
.settings-note { margin: 18px 0 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--line) 82%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 62%, var(--surface)); color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
|
|
170
|
+
|
|
171
|
+
@media (max-width: 760px) {
|
|
172
|
+
.settings-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 18px; }
|
|
173
|
+
.settings-head { padding: 16px 16px 12px; }
|
|
174
|
+
.settings-head h2 { font-size: 20px; }
|
|
175
|
+
.settings-close { width: 40px; height: 40px; }
|
|
176
|
+
.settings-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
|
|
177
|
+
.settings-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 0 12px 12px; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent); overflow: visible; }
|
|
178
|
+
.settings-tab { flex-direction: column; justify-content: center; gap: 4px; min-height: 52px; padding: 7px 4px; font-size: 11.5px; text-align: center; }
|
|
179
|
+
.settings-tab svg { width: 16px; height: 16px; }
|
|
180
|
+
.settings-panel { padding: 8px 16px 24px; }
|
|
181
|
+
.settings-row { gap: 10px 14px; padding: 15px 0; }
|
|
182
|
+
.settings-row:first-child { padding-top: 10px; }
|
|
183
|
+
.settings-label { font-size: 13.5px; }
|
|
184
|
+
.settings-hint { font-size: 12px; }
|
|
185
|
+
.settings-select { width: 148px; min-height: 38px; }
|
|
186
|
+
.settings-block { padding-top: 12px; }
|
|
187
|
+
.theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
|
|
188
|
+
.theme-option { padding: 6px 6px 8px; }
|
|
189
|
+
.theme-option:has(input:checked)::after { top: 10px; right: 10px; width: 16px; height: 16px; font-size: 10px; }
|
|
190
|
+
.theme-preview { height: 48px; }
|
|
191
|
+
.theme-name { font-size: 11px; }
|
|
192
|
+
.settings-row-stack { grid-template-columns: minmax(0, 1fr); }
|
|
193
|
+
.settings-token-control { width: 100%; }
|
|
194
|
+
.settings-token-control .input { flex: 1; width: auto; min-width: 0; }
|
|
195
|
+
.settings-note { margin-top: 14px; }
|
|
138
196
|
}
|
package/server/chat-server.ts
CHANGED
|
@@ -276,9 +276,9 @@ async function handle(req: Request): Promise<Response> {
|
|
|
276
276
|
// A recall bumps the version without creating a message; wake the poll so
|
|
277
277
|
// the client can refetch the room snapshot (reliable version compare).
|
|
278
278
|
while (result.items.length === 0 && result.recallVersion === initialRecallVersion && Date.now() < deadline) {
|
|
279
|
-
// ponytail:
|
|
280
|
-
//
|
|
281
|
-
await sleep(Math.max(1, Math.min(
|
|
279
|
+
// ponytail: 500ms between disk scans keeps notification latency under
|
|
280
|
+
// half a second; a longer interval makes deliveries feel stuck.
|
|
281
|
+
await sleep(Math.max(1, Math.min(500, deadline - Date.now())));
|
|
282
282
|
result = await readInbox(sessionID, roomFilter, excludeSelf, afterTs);
|
|
283
283
|
}
|
|
284
284
|
return json(result);
|
package/server/chat.html
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
<link rel="stylesheet" href="/assets/attachments.css">
|
|
27
27
|
<link rel="stylesheet" href="/assets/responsive.css">
|
|
28
28
|
<link rel="stylesheet" href="/assets/code-highlight.css">
|
|
29
|
+
<link rel="stylesheet" href="/assets/room-create.css">
|
|
29
30
|
</head>
|
|
30
31
|
<body>
|
|
31
32
|
|
|
@@ -127,68 +128,112 @@
|
|
|
127
128
|
|
|
128
129
|
<!-- One settings surface for the join page and the signed-in chat. -->
|
|
129
130
|
<dialog id="chatSettings" class="settings-dialog" aria-labelledby="settingsHeading">
|
|
130
|
-
<
|
|
131
|
-
<
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
</
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
131
|
+
<header class="settings-head">
|
|
132
|
+
<div class="settings-heading">
|
|
133
|
+
<h2 id="settingsHeading" tabindex="-1" data-i18n="settings">Settings</h2>
|
|
134
|
+
<p class="settings-lead" data-i18n="settingsLocalHint">Language, theme, transition, and scrolling preferences are saved in this browser.</p>
|
|
135
|
+
</div>
|
|
136
|
+
<button id="btnCloseSettings" class="reader-close settings-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
|
|
137
|
+
</header>
|
|
138
|
+
<div class="settings-body">
|
|
139
|
+
<nav class="settings-nav" role="tablist" aria-label="Settings sections" data-i18n-aria-label="settingsSections">
|
|
140
|
+
<button id="settingsTabGeneral" class="settings-tab" type="button" role="tab" aria-selected="true" aria-controls="settingsPanelGeneral" data-settings-tab="general">
|
|
141
|
+
<svg aria-hidden="true" viewBox="0 0 24 24"><path d="M4 7h9M17 7h3M4 17h3M11 17h9"/><circle cx="15" cy="7" r="2"/><circle cx="9" cy="17" r="2"/></svg>
|
|
142
|
+
<span data-i18n="settingsGeneral">General</span>
|
|
143
|
+
</button>
|
|
144
|
+
<button id="settingsTabAppearance" class="settings-tab" type="button" role="tab" aria-selected="false" aria-controls="settingsPanelAppearance" tabindex="-1" data-settings-tab="appearance">
|
|
145
|
+
<svg aria-hidden="true" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8"/><path d="M12 4v16"/><path d="M12 4a8 8 0 0 1 0 16" fill="currentColor" stroke="none"/></svg>
|
|
146
|
+
<span data-i18n="settingsAppearance">Appearance</span>
|
|
147
|
+
</button>
|
|
148
|
+
<button id="settingsTabConnection" class="settings-tab" type="button" role="tab" aria-selected="false" aria-controls="settingsPanelConnection" tabindex="-1" data-settings-tab="connection">
|
|
149
|
+
<svg aria-hidden="true" viewBox="0 0 24 24"><circle cx="8" cy="12" r="3"/><path d="M11 12h9M17 12v3M20 12v2"/></svg>
|
|
150
|
+
<span data-i18n="settingsConnection">Connection</span>
|
|
151
|
+
</button>
|
|
152
|
+
</nav>
|
|
153
|
+
<div class="settings-content">
|
|
154
|
+
<section id="settingsPanelGeneral" class="settings-panel" role="tabpanel" aria-labelledby="settingsTabGeneral">
|
|
155
|
+
<div class="settings-row">
|
|
156
|
+
<div class="settings-copy">
|
|
157
|
+
<label class="settings-label locale-label" for="localeSelectSettings">
|
|
158
|
+
<svg class="locale-icon" aria-hidden="true" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9S14.5 18.3 12 21M12 3C9.5 5.7 8.2 8.7 8.2 12s1.3 6.3 3.8 9"/></svg>
|
|
159
|
+
<span data-i18n="languageLabel">Language</span>
|
|
160
|
+
</label>
|
|
161
|
+
<p class="settings-hint" data-i18n="settingsLanguageHint">Applies right away and is saved in this browser.</p>
|
|
162
|
+
</div>
|
|
163
|
+
<select id="localeSelectSettings" class="locale-select settings-select">
|
|
164
|
+
<option value="en">English</option>
|
|
165
|
+
<option value="zh-CN">中文</option>
|
|
166
|
+
<option value="ja">日本語</option>
|
|
167
|
+
<option value="ko">한국어</option>
|
|
168
|
+
<option value="fr">Français</option>
|
|
169
|
+
<option value="de">Deutsch</option>
|
|
170
|
+
<option value="es">Español</option>
|
|
171
|
+
<option value="it">Italiano</option>
|
|
172
|
+
</select>
|
|
173
|
+
</div>
|
|
174
|
+
<div class="settings-row">
|
|
175
|
+
<div class="settings-copy">
|
|
176
|
+
<label class="settings-label" for="inContentTransition" data-i18n="contentTransition">Room content transition</label>
|
|
177
|
+
<p id="contentTransitionHint" class="settings-hint" data-i18n="contentTransitionHint">Slide messages in when switching rooms with Alt+Arrow. Off by default.</p>
|
|
178
|
+
</div>
|
|
179
|
+
<input id="inContentTransition" class="settings-switch" type="checkbox" role="switch" aria-describedby="contentTransitionHint">
|
|
180
|
+
</div>
|
|
181
|
+
<div class="settings-row">
|
|
182
|
+
<div class="settings-copy">
|
|
183
|
+
<label class="settings-label" for="inPageStep" data-i18n="pageStep">Page scroll distance</label>
|
|
184
|
+
<p id="pageStepHint" class="settings-hint" data-i18n="pageStepHint">How far PageUp and PageDown move per press, as a percentage of the conversation height. Default 90%.</p>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="settings-number"><input id="inPageStep" class="input" type="number" min="20" max="200" step="5" inputmode="numeric" value="90" aria-describedby="pageStepHint"><span class="settings-number-unit" aria-hidden="true">%</span></div>
|
|
187
|
+
</div>
|
|
188
|
+
</section>
|
|
189
|
+
<section id="settingsPanelAppearance" class="settings-panel" role="tabpanel" aria-labelledby="settingsTabAppearance" hidden>
|
|
190
|
+
<fieldset class="settings-block">
|
|
191
|
+
<legend class="settings-label" data-i18n="themeLabel">Theme</legend>
|
|
192
|
+
<p class="settings-hint" data-i18n="settingsThemeHint">Saved in this browser. System follows your device.</p>
|
|
193
|
+
<div class="theme-grid">
|
|
194
|
+
<label class="theme-option" data-theme-choice="system">
|
|
195
|
+
<input type="radio" name="theme" value="system">
|
|
196
|
+
<span class="theme-preview" aria-hidden="true"></span>
|
|
197
|
+
<span class="theme-name" data-i18n="themeSystem">System</span>
|
|
198
|
+
</label>
|
|
199
|
+
<label class="theme-option" data-theme-choice="light">
|
|
200
|
+
<input type="radio" name="theme" value="light">
|
|
201
|
+
<span class="theme-preview" aria-hidden="true"></span>
|
|
202
|
+
<span class="theme-name" data-i18n="themeLight">Light</span>
|
|
203
|
+
</label>
|
|
204
|
+
<label class="theme-option" data-theme-choice="dark">
|
|
205
|
+
<input type="radio" name="theme" value="dark">
|
|
206
|
+
<span class="theme-preview" aria-hidden="true"></span>
|
|
207
|
+
<span class="theme-name" data-i18n="themeDark">Dark</span>
|
|
208
|
+
</label>
|
|
209
|
+
<label class="theme-option" data-theme-choice="forest">
|
|
210
|
+
<input type="radio" name="theme" value="forest">
|
|
211
|
+
<span class="theme-preview" aria-hidden="true"></span>
|
|
212
|
+
<span class="theme-name" data-i18n="themeForest">Forest</span>
|
|
213
|
+
</label>
|
|
214
|
+
<label class="theme-option" data-theme-choice="sand">
|
|
215
|
+
<input type="radio" name="theme" value="sand">
|
|
216
|
+
<span class="theme-preview" aria-hidden="true"></span>
|
|
217
|
+
<span class="theme-name" data-i18n="themeSand">Sand</span>
|
|
218
|
+
</label>
|
|
219
|
+
</div>
|
|
220
|
+
</fieldset>
|
|
221
|
+
</section>
|
|
222
|
+
<section id="settingsPanelConnection" class="settings-panel" role="tabpanel" aria-labelledby="settingsTabConnection" hidden>
|
|
223
|
+
<div class="settings-row settings-row-stack">
|
|
224
|
+
<div class="settings-copy">
|
|
225
|
+
<label class="settings-label" for="inTokenChat" data-i18n="tokenOptional">Access token (optional)</label>
|
|
226
|
+
<p class="settings-hint" data-i18n="settingsTokenHint">Stored only in this browser. Needed only when the server asks for it.</p>
|
|
227
|
+
<p id="tokenHint" class="settings-hint settings-warning" data-i18n="tokenRequired" hidden>The server requires an access token (401).</p>
|
|
228
|
+
</div>
|
|
229
|
+
<div class="settings-token-control">
|
|
230
|
+
<input id="inTokenChat" class="input" type="password" placeholder="Enter if the server requires it" data-i18n-placeholder="tokenPlaceholder" autocomplete="off" spellcheck="false" aria-describedby="tokenHint">
|
|
231
|
+
<button class="btn ghost small" type="button" data-token-save="inTokenChat" data-i18n="save">Save</button>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
<p class="settings-note" data-i18n="privacyNote">Anyone with the shared token can read direct messages and manage rooms; the server can read them too.</p>
|
|
235
|
+
</section>
|
|
236
|
+
</div>
|
|
192
237
|
</div>
|
|
193
238
|
</dialog>
|
|
194
239
|
|
|
@@ -196,16 +241,7 @@
|
|
|
196
241
|
<section id="chatView" class="view" hidden>
|
|
197
242
|
<aside id="roomRail" class="room-rail" aria-label="Rooms" data-i18n-aria-label="roomsLabel">
|
|
198
243
|
<div class="rail-brand"><span class="brand-mark">OC</span><span data-i18n="brand">OC Chat</span><span class="version-tag">{{version}}</span></div>
|
|
199
|
-
<div class="rail-label"><span data-i18n="existingRooms">Rooms</span><span class="rail-tools"><button id="btnNewRoom" class="icon-btn" type="button" aria-label="Create a room" data-i18n-aria-label="newRoom"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg></button><button id="btnRefreshRooms" class="icon-btn" type="button" aria-label="Refresh rooms" data-i18n-aria-label="refreshRooms"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 7v5h-5M4 17v-5h5"/><path d="M5.6 9a7 7 0 0 1 11.8-2L20 12M4 12l2.6 5a7 7 0 0 0 11.8-2"/></svg></button></span></div>
|
|
200
|
-
<form id="railRoomForm" class="rail-composer" hidden>
|
|
201
|
-
<label class="field"><span class="field-label" data-i18n="newRoomNameLabel">New room name</span><input id="inRoomNameChat" class="input" maxlength="40" data-i18n-placeholder="newRoomNamePlaceholder" placeholder="e.g. Weekend movie night"></label>
|
|
202
|
-
<div class="join-policy rail-join-policy">
|
|
203
|
-
<input id="inApprovalRequiredChat" type="checkbox" role="switch" aria-describedby="inApprovalRequiredChatHint">
|
|
204
|
-
<label for="inApprovalRequiredChat" class="join-policy-label" data-i18n="requireApproval">Require approval to join</label>
|
|
205
|
-
</div>
|
|
206
|
-
<p id="inApprovalRequiredChatHint" class="hint join-policy-hint rail-join-policy-hint" data-i18n="requireApprovalHint">New members need a human administrator's approval. Agents may also be approved by the administrator agent.</p>
|
|
207
|
-
<button id="btnCreateChatRoom" class="btn primary small" type="submit" data-i18n="createRoom">Create room</button>
|
|
208
|
-
</form>
|
|
244
|
+
<div class="rail-label"><span data-i18n="existingRooms">Rooms</span><span class="rail-tools"><button id="btnNewRoom" class="icon-btn" type="button" aria-label="Create a room" data-i18n-aria-label="newRoom" aria-haspopup="dialog" aria-controls="createRoomDialog" aria-expanded="false"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg></button><button id="btnRefreshRooms" class="icon-btn" type="button" aria-label="Refresh rooms" data-i18n-aria-label="refreshRooms"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 7v5h-5M4 17v-5h5"/><path d="M5.6 9a7 7 0 0 1 11.8-2L20 12M4 12l2.6 5a7 7 0 0 0 11.8-2"/></svg></button></span></div>
|
|
209
245
|
<ul id="roomListChat" class="rail-rooms"></ul>
|
|
210
246
|
<p id="roomListChatEmpty" class="hint" data-i18n="noRooms" hidden></p>
|
|
211
247
|
|
|
@@ -221,6 +257,35 @@
|
|
|
221
257
|
</div>
|
|
222
258
|
</div>
|
|
223
259
|
</aside>
|
|
260
|
+
<dialog id="createRoomDialog" class="admin-dialog create-room-dialog" aria-labelledby="createRoomHeading" aria-describedby="createRoomHint">
|
|
261
|
+
<header class="create-room-head">
|
|
262
|
+
<span class="create-room-mark" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg></span>
|
|
263
|
+
<div class="create-room-heading">
|
|
264
|
+
<p class="create-room-eyebrow" data-i18n="existingRooms">Rooms</p>
|
|
265
|
+
<h2 id="createRoomHeading" data-i18n="createRoomTitle">Create a room</h2>
|
|
266
|
+
</div>
|
|
267
|
+
<button id="btnCloseCreateRoom" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
|
|
268
|
+
</header>
|
|
269
|
+
<p id="createRoomHint" class="create-room-hint" data-i18n="createRoomHint">Start a new room and invite people with its ID.</p>
|
|
270
|
+
<form id="railRoomForm" class="create-room-form" novalidate>
|
|
271
|
+
<label class="field create-room-field">
|
|
272
|
+
<span class="field-label" data-i18n="newRoomNameLabel">New room name</span>
|
|
273
|
+
<input id="inRoomNameChat" class="input create-room-input" maxlength="40" data-i18n-placeholder="newRoomNamePlaceholder" placeholder="e.g. Weekend movie night" autocomplete="off">
|
|
274
|
+
</label>
|
|
275
|
+
<div class="create-room-policy">
|
|
276
|
+
<div class="join-policy">
|
|
277
|
+
<input id="inApprovalRequiredChat" type="checkbox" role="switch" aria-describedby="inApprovalRequiredChatHint">
|
|
278
|
+
<label for="inApprovalRequiredChat" class="join-policy-label" data-i18n="requireApproval">Require approval to join</label>
|
|
279
|
+
</div>
|
|
280
|
+
<p id="inApprovalRequiredChatHint" class="hint create-room-policy-hint" data-i18n="requireApprovalHint">New members need a human administrator's approval. Agents may also be approved by the administrator agent.</p>
|
|
281
|
+
</div>
|
|
282
|
+
<p id="createRoomError" class="alert create-room-error" role="alert" hidden></p>
|
|
283
|
+
<div class="create-room-actions">
|
|
284
|
+
<button id="btnCancelCreateRoom" class="btn ghost small" type="button" data-i18n="cancel">Cancel</button>
|
|
285
|
+
<button id="btnCreateChatRoom" class="btn primary small" type="submit" data-i18n="createRoom">Create room</button>
|
|
286
|
+
</div>
|
|
287
|
+
</form>
|
|
288
|
+
</dialog>
|
|
224
289
|
<dialog id="editRoomDialog" class="admin-dialog" aria-labelledby="editRoomHeading">
|
|
225
290
|
<header class="admin-dialog-head"><h2 id="editRoomHeading" data-i18n="editRoom">Edit room</h2><div class="admin-dialog-actions"><button id="btnCloseEditRoom" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></header>
|
|
226
291
|
<p id="editRoomStatus" class="hint" role="status" aria-live="polite"></p>
|
|
@@ -441,6 +506,7 @@
|
|
|
441
506
|
<h3 data-i18n="shortcutsRooms">Rooms</h3>
|
|
442
507
|
<ul class="keys-list">
|
|
443
508
|
<li><span class="keys-combo"><kbd class="keys-key shortcut-mod">Alt</kbd><span class="keys-sep">+</span><kbd class="keys-key">↑</kbd><span class="keys-sep">/</span><kbd class="keys-key">↓</kbd></span><span data-i18n="shortcutsSwitchRoom">Switch to the previous or next room</span></li>
|
|
509
|
+
<li><span class="keys-combo"><kbd class="keys-key shortcut-mod">Alt</kbd><span class="keys-sep">+</span><kbd class="keys-key">1–9</kbd></span><span data-i18n="shortcutsNumberRoom">Switch to a joined room by number</span></li>
|
|
444
510
|
</ul>
|
|
445
511
|
</section>
|
|
446
512
|
<section class="keys-section">
|
package/server/join-requests.ts
CHANGED
|
@@ -107,6 +107,7 @@ export async function joinRequestRoutes(req: Request, url: URL): Promise<Respons
|
|
|
107
107
|
...(request.receiverOwnerID ? { receiverOwnerID: request.receiverOwnerID } : {}),
|
|
108
108
|
...(request.directory ? { directory: request.directory } : {}),
|
|
109
109
|
...(request.host ? { host: request.host } : {}),
|
|
110
|
+
notify: true,
|
|
110
111
|
});
|
|
111
112
|
return { ok: true as const };
|
|
112
113
|
});
|
package/server/room-join.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type JoinMember = {
|
|
|
11
11
|
receiverOwnerID?: string;
|
|
12
12
|
directory?: string;
|
|
13
13
|
host?: string;
|
|
14
|
+
notify?: boolean;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
// Shared by the join endpoint and approved join requests so an approved member
|
|
@@ -33,7 +34,7 @@ export function joinRoomMember(svc: RoomService, registry: Registry, roomId: str
|
|
|
33
34
|
for (const [sid, entry] of Object.entries(regRoom)) if (sid !== member.sessionID && entry.name === member.name) delete regRoom[sid];
|
|
34
35
|
}
|
|
35
36
|
svc.joinRoom(roomId, { id: participantId, name: member.name });
|
|
36
|
-
|
|
37
|
+
const event = already ? undefined : svc.addEvent(roomId, `${member.name} joined the room`);
|
|
37
38
|
const latestMessageTs = svc.getMessages(roomId).at(-1)?.createdAt ?? 0;
|
|
38
39
|
regRoom[member.sessionID] = {
|
|
39
40
|
serverUrl: "",
|
|
@@ -45,7 +46,11 @@ export function joinRoomMember(svc: RoomService, registry: Registry, roomId: str
|
|
|
45
46
|
directory: member.directory || undefined,
|
|
46
47
|
host: member.host ?? "",
|
|
47
48
|
lastQueuedTs: regRoom[member.sessionID]?.lastQueuedTs,
|
|
48
|
-
|
|
49
|
+
// An approved applicant must see the join event as unread; a normal join
|
|
50
|
+
// stays quiet so joining does not create a phantom notification.
|
|
51
|
+
lastReadTs: regRoom[member.sessionID]?.lastReadTs ?? (
|
|
52
|
+
member.notify && event ? event.createdAt - 1 : Math.max(Date.now(), latestMessageTs)
|
|
53
|
+
),
|
|
49
54
|
};
|
|
50
55
|
// An ownerless room is claimed by the first person who arrives; agents never are.
|
|
51
56
|
const joinedRoom = svc.getRoom(roomId);
|
package/server/sw.js
CHANGED
package/skills/chatroom/SKILL.md
CHANGED
|
@@ -56,7 +56,7 @@ Discuss shared questions in the room rather than opening private dialogs. Consol
|
|
|
56
56
|
|
|
57
57
|
## Protected rooms
|
|
58
58
|
|
|
59
|
-
A room may require approval for new members. Create one with `joinPolicy: "approval"` only when the user asks to restrict a room; central mode is required. In such a room, `join` returns a pending request instead of membership. While pending you have no membership or inbox delivery, the web client cannot open the room, and you cannot send or poll. Never describe yourself as a member
|
|
59
|
+
A room may require approval for new members. Create one with `joinPolicy: "approval"` only when the user asks to restrict a room; central mode is required. Do not create a protected room yourself unless the request explicitly assigns a human owner: only a person can own a room, so an Agent-created protected room has no human administrator to approve joins. Prefer asking a human to create it in the web UI. In such a room, `join` returns a pending request instead of membership. While pending you have no membership or inbox delivery, the web client cannot open the room, and you cannot send or poll. Never describe yourself as a member and do not retry repeatedly; a human administrator must approve you. Once approved, the join event is unread for your session and a client with background delivery receives it in the original session context. If you are unsure or your client has no background delivery, call `join_status`; silence before approval is not rejection.
|
|
60
60
|
|
|
61
61
|
A designated management Agent uses the `admin` tool's `admin_join_requests` to list pending Agent requests, and `admin_approve_join` or `admin_deny_join` with `targetSessionID` to decide one. It can review Agent requests only; a human request belongs to a human room administrator. Do not ask the management Agent to bypass that boundary.
|
|
62
62
|
|
package/src/runtime/v2-plugin.ts
CHANGED
|
@@ -81,7 +81,7 @@ export function createV2Setup(deps: {
|
|
|
81
81
|
});
|
|
82
82
|
toolRegistration = await context.tool.transform((editor) => editor.add({
|
|
83
83
|
name: "room",
|
|
84
|
-
description: "Chat room operations: create, join, leave and list rooms; send and poll messages; list members and announcements; manage reminders. Reminder schedules use the server timezone unless an IANA timezone is provided; once schedules require an ISO datetime. Upload files and media; upload_resource returns a [[resource:UUID]] marker, and the attachment renders only when that exact marker is included in a send message. read_resource saves files to a private temporary path and leaves them there until removed or system cleanup. delete_resource removes an uploaded file; servers allow human room administrators any resource and agents only their own uploads.",
|
|
84
|
+
description: "Chat room operations: create, join, join_status, leave and list rooms; send and poll messages; list members and announcements; manage reminders. In an approval room join returns pending: you are not a member yet; call join_status to check whether an administrator approved you. Reminder schedules use the server timezone unless an IANA timezone is provided; once schedules require an ISO datetime. Upload files and media; upload_resource returns a [[resource:UUID]] marker, and the attachment renders only when that exact marker is included in a send message. read_resource saves files to a private temporary path and leaves them there until removed or system cleanup. delete_resource removes an uploaded file; servers allow human room administrators any resource and agents only their own uploads.",
|
|
85
85
|
options: { codemode: false },
|
|
86
86
|
input: roomSchema(),
|
|
87
87
|
execute: async (args, toolContext) => {
|
|
@@ -169,7 +169,7 @@ export function createV2Setup(deps: {
|
|
|
169
169
|
|
|
170
170
|
export function roomSchema() {
|
|
171
171
|
return z.object({
|
|
172
|
-
action: z.enum(["create", "join", "leave", "list", "send", "poll", "members", "upload_resource", "read_resource", "delete_resource", "announcement_list", "announcement_read", "announcement_write", "announcement_delete", "reminder_list", "reminder_create", "reminder_update", "reminder_delete"]),
|
|
172
|
+
action: z.enum(["create", "join", "join_status", "leave", "list", "send", "poll", "members", "upload_resource", "read_resource", "delete_resource", "announcement_list", "announcement_read", "announcement_write", "announcement_delete", "reminder_list", "reminder_create", "reminder_update", "reminder_delete"]),
|
|
173
173
|
name: z.string().max(64).optional().describe("For join: your own participant display name, NOT the room name (required). For create: the new room name."),
|
|
174
174
|
roomId: z.string().optional(),
|
|
175
175
|
resourceId: z.string().optional(),
|