herdr-plugin-amq 0.1.2

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,727 @@
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>AGsuite: Autonomous Swarm Workspace</title>
7
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><text y='20' font-size='20'>✉️</text></svg>">
8
+ <link rel="stylesheet" href="style.css">
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Product+Sans:wght@400;700&family=Roboto+Mono:wght@400;600&display=swap" rel="stylesheet">
12
+ </head>
13
+ <body>
14
+ <!-- Top Navigation Header -->
15
+ <header class="app-header">
16
+ <div class="header-left">
17
+ <button class="icon-btn" id="toggle-sidebar" title="Main menu">
18
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
19
+ </button>
20
+ <div class="logo-container">
21
+ <span class="logo-agmail">
22
+ <span class="c-blue">A</span><span class="c-red">G</span><span class="c-yellow">s</span><span class="c-blue">u</span><span class="c-green">i</span><span class="c-red">t</span><span class="c-blue">e</span>
23
+ </span>
24
+ <span class="logo-sub">AGmail • AGboard</span>
25
+ </div>
26
+ </div>
27
+
28
+ <div class="header-center" id="header-search-container">
29
+ <div class="search-bar" id="search-bar">
30
+ <svg class="search-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
31
+ <input type="text" id="search-input" placeholder="Search transmissions (e.g. has:image, from:spotter, to:me, bug)..." autocomplete="off">
32
+ <button class="clear-search-btn hidden" id="clear-search" title="Clear search">✕</button>
33
+ </div>
34
+ <!-- Google Search Autocomplete Suggestions Dropdown -->
35
+ <div class="search-autocomplete-dropdown hidden" id="search-autocomplete-dropdown">
36
+ <div class="search-suggestions-list" id="search-suggestions-list"></div>
37
+ </div>
38
+ </div>
39
+
40
+ <div class="header-right">
41
+ <div id="bridge-status-pill" class="status-pill status-stopped" title="Click to toggle bridge daemon">
42
+ <span class="status-dot"></span>
43
+ <span id="bridge-status-text">Bridge: Checking...</span>
44
+ </div>
45
+ <button class="icon-btn" id="refresh-btn" title="Refresh mailbox">
46
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>
47
+ </button>
48
+
49
+ <!-- Google Account Switcher Trigger -->
50
+ <div class="account-menu-wrapper">
51
+ <button class="account-profile-btn" id="user-profile-btn" title="Switch active account / persona">
52
+ <span class="account-header-label" id="header-account-label">👑 God Mode</span>
53
+ <div class="user-badge" id="current-user-avatar">👑</div>
54
+ </button>
55
+
56
+ <!-- Google Style Account Popup Dropdown -->
57
+ <div class="account-dropdown hidden" id="account-dropdown">
58
+ <div class="account-dropdown-header">
59
+ <div class="large-avatar" id="dropdown-large-avatar">👑</div>
60
+ <div class="account-dropdown-user-info">
61
+ <strong id="dropdown-user-title">God Mode (All Transmissions)</strong>
62
+ <span class="account-dropdown-email" id="dropdown-user-email">amq://all-agents</span>
63
+ <span class="account-badge-pill">Active Persona</span>
64
+ </div>
65
+ </div>
66
+
67
+ <div class="account-dropdown-divider">
68
+ <span>SWITCH ACTIVE PERSONA</span>
69
+ </div>
70
+
71
+ <div class="account-dropdown-list" id="account-dropdown-list">
72
+ <!-- Populated dynamically with swarm handles -->
73
+ </div>
74
+
75
+ <div class="account-dropdown-footer">
76
+ <span class="account-footer-text">Switching persona filters inbox & sets default From: handle</span>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </header>
82
+
83
+ <!-- Main Application Body -->
84
+ <div class="app-layout">
85
+ <!-- Left Navigation Sidebar -->
86
+ <aside class="app-sidebar" id="sidebar">
87
+ <div class="compose-btn-wrap">
88
+ <button class="compose-btn" id="open-compose-btn">
89
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>
90
+ <span>Compose</span>
91
+ </button>
92
+ </div>
93
+
94
+ <!-- Primary Mode: AGmail vs AGboard -->
95
+ <div class="sidebar-views-nav">
96
+ <button class="nav-item view-tab-btn active" id="nav-view-mail" data-view="mail">
97
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>
98
+ <span class="nav-label">AGmail</span>
99
+ </button>
100
+ <button class="nav-item view-tab-btn" id="nav-view-board" data-view="board">
101
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H6v-5h3v5zm5 0h-3V7h3v10zm5 0h-3v-8h3v8z"/></svg>
102
+ <span class="nav-label">AGboard</span>
103
+ <span class="badge" id="board-total-count" style="background:var(--google-blue);color:#fff;">0</span>
104
+ </button>
105
+ </div>
106
+
107
+ <!-- Mailbox Folders -->
108
+ <nav class="folder-list" id="sidebar-folder-list">
109
+
110
+ <button class="nav-item active" data-folder="inbox">
111
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"/></svg>
112
+ <span class="nav-label">Inbox</span>
113
+ <span class="badge" id="inbox-unread-count">0</span>
114
+ </button>
115
+ <button class="nav-item" data-folder="starred">
116
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>
117
+ <span class="nav-label">Starred</span>
118
+ </button>
119
+ <button class="nav-item" data-folder="sent">
120
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>
121
+ <span class="nav-label">Sent</span>
122
+ </button>
123
+ <button class="nav-item" data-folder="all">
124
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>
125
+ <span class="nav-label">All Mail</span>
126
+ </button>
127
+ </nav>
128
+
129
+ <!-- Agent Presence (Google Hangouts style) -->
130
+ <div class="sidebar-section-header">
131
+ <span>SWARM PRESENCE</span>
132
+ <div class="section-actions">
133
+ <button class="section-add-btn" id="open-register-agent-btn" title="Register new agent profile">+</button>
134
+ </div>
135
+ </div>
136
+ <div class="hangouts-list" id="presence-list">
137
+ <!-- Populated dynamically -->
138
+ </div>
139
+
140
+ <!-- Storage Usage Footer (Authentic Gmail Style) -->
141
+ <div class="sidebar-storage-footer">
142
+ <div class="storage-bar-track">
143
+ <div class="storage-bar-fill" id="storage-bar-fill" style="width: 5%;"></div>
144
+ </div>
145
+ <div class="storage-label">
146
+ <span id="storage-used-text">0.0 MB</span> of 100 MB used
147
+ </div>
148
+ </div>
149
+ </aside>
150
+ <div class="sidebar-backdrop hidden" id="sidebar-backdrop"></div>
151
+
152
+ <!-- Main Mail List and Viewer -->
153
+ <main class="app-main">
154
+ <!-- Pull / Scroll Down to Reload Indicator -->
155
+ <div class="pull-to-refresh-indicator" id="pull-to-refresh">
156
+ <div class="ptr-content">
157
+ <svg class="ptr-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>
158
+ <span class="ptr-label" id="ptr-label">Puxe para atualizar</span>
159
+ </div>
160
+ </div>
161
+
162
+ <!-- Mail View Section -->
163
+ <div class="mail-view-section" id="mail-view-section">
164
+ <!-- Category Tabs (Gmail Primary, Updates, Brainstorms) -->
165
+ <div class="category-tabs" id="category-tabs">
166
+ <button class="category-tab active" data-category="all">
167
+ <span class="cat-icon">📬</span>
168
+ <span class="cat-title">Primary</span>
169
+ </button>
170
+ <button class="category-tab" data-category="gate">
171
+ <span class="cat-icon">🏷️</span>
172
+ <span class="cat-title">Gates & Updates</span>
173
+ </button>
174
+ <button class="category-tab" data-category="brainstorm">
175
+ <span class="cat-icon">💡</span>
176
+ <span class="cat-title">Brainstorms</span>
177
+ </button>
178
+ </div>
179
+
180
+ <!-- Action / Filter Toolbar -->
181
+ <div class="mail-toolbar">
182
+ <div class="toolbar-left">
183
+ <div class="view-mode-group">
184
+ <button class="view-mode-btn active" id="view-mode-threads" title="Conversation View (Grouped Threads)">
185
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/></svg>
186
+ <span>Threads</span>
187
+ </button>
188
+ <button class="view-mode-btn" id="view-mode-flat" title="Flat View (Individual Transmissions)">
189
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"/></svg>
190
+ <span>Messages</span>
191
+ </button>
192
+ </div>
193
+ <span class="toolbar-filter-info" id="filter-info">Showing all threads</span>
194
+ </div>
195
+ <div class="toolbar-right">
196
+ <span id="page-info" class="page-info">0 threads</span>
197
+ <div class="pagination-controls">
198
+ <button class="icon-btn-small" id="prev-page-btn" title="Previous page" disabled>
199
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>
200
+ </button>
201
+ <button class="icon-btn-small" id="next-page-btn" title="Next page" disabled>
202
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
203
+ </button>
204
+ </div>
205
+ </div>
206
+ </div>
207
+
208
+ <!-- Split Layout: Mail List on Left, Thread Detail on Right -->
209
+ <div class="content-splitter" id="splitter-view">
210
+ <!-- List Container -->
211
+ <div class="mail-list-container" id="mail-list-view">
212
+ <div class="mail-list" id="mail-list">
213
+ <div class="loading-state">Loading transmissions from .agent-mail...</div>
214
+ </div>
215
+ </div>
216
+
217
+ <!-- Detail Reading View -->
218
+ <div class="mail-detail-container hidden" id="mail-detail-view">
219
+ <div class="detail-header">
220
+ <div class="detail-header-actions">
221
+ <button class="icon-btn-small" id="back-to-list-btn" title="Back to list">
222
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
223
+ </button>
224
+ <h2 id="detail-subject" class="detail-subject">Select a transmission</h2>
225
+ <span id="detail-thread-badge" class="thread-badge"></span>
226
+ <button class="icon-btn-small" id="expand-collapse-btn" title="Toggle expand / collapse all messages in thread">
227
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"/></svg>
228
+ </button>
229
+ </div>
230
+ </div>
231
+
232
+ <div class="detail-body-wrapper">
233
+ <!-- Feed of all messages in this thread -->
234
+ <div class="thread-messages-list" id="thread-messages-list">
235
+ <!-- Rendered dynamically -->
236
+ </div>
237
+
238
+ <!-- Smart Replies (One-click suggestions) -->
239
+ <div class="smart-replies-container">
240
+ <span class="smart-reply-label">💡 AGmail Smart Reply:</span>
241
+ <div class="smart-replies-chips" id="smart-replies-chips">
242
+ <button class="chip" data-text="Ack, on it.">Ack, on it.</button>
243
+ <button class="chip" data-text="Ran verify-all.sh --quick: PASS.">Ran verify-all.sh --quick: PASS.</button>
244
+ <button class="chip" data-text="Acknowledged, using tools/godot-lock.sh only.">Acknowledged, using tools/godot-lock.sh only.</button>
245
+ <button class="chip" data-text="Confirmed, closing issue and updating STATUS.md.">Confirmed, closing issue and updating STATUS.md.</button>
246
+ </div>
247
+ </div>
248
+
249
+ <!-- In-page Quick Reply Form -->
250
+ <div class="quick-reply-box">
251
+ <div class="quick-reply-header">
252
+ <strong>Reply to thread</strong> as <span class="current-reply-me" id="reply-as-user">user</span>
253
+ </div>
254
+ <textarea id="quick-reply-text" placeholder="Type your response here... (supports Markdown)" rows="4"></textarea>
255
+ <div class="quick-reply-actions">
256
+ <button class="btn btn-primary" id="send-quick-reply-btn">
257
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>
258
+ <span>Send Reply (amq)</span>
259
+ </button>
260
+ </div>
261
+ </div>
262
+ </div>
263
+ </div>
264
+ </div>
265
+ </div>
266
+
267
+ <!-- Coordination Kanban Board Section -->
268
+ <div class="board-view-section hidden" id="board-view-section">
269
+ <!-- Board Header Toolbar -->
270
+ <div class="board-toolbar">
271
+ <div class="board-toolbar-left">
272
+ <div class="board-title-group">
273
+ <h2 class="board-title">AGboard</h2>
274
+ <span class="board-subtitle">Swarm Coordination &amp; Automailing</span>
275
+ </div>
276
+ <div class="board-stats-pills" id="board-stats-pills">
277
+ <span class="board-pill pill-total">Total: <strong id="stat-total">0</strong></span>
278
+ <span class="board-pill pill-progress">Em Voo: <strong id="stat-progress">0</strong></span>
279
+ <span class="board-pill pill-blocked">Bloqueios: <strong id="stat-blocked">0</strong></span>
280
+ <span class="board-pill pill-done">Concluído: <strong id="stat-done">0</strong></span>
281
+ </div>
282
+ </div>
283
+ <div class="board-toolbar-right">
284
+ <div class="board-search-wrap">
285
+ <svg class="board-search-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
286
+ <input type="text" id="board-search-input" placeholder="Filter cards (e.g. gate, ik, spotter)...">
287
+ </div>
288
+ <button class="btn btn-secondary btn-sm" id="refresh-board-btn" title="Refresh board from disk">
289
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>
290
+ <span>Sync</span>
291
+ </button>
292
+ <button class="btn btn-primary btn-sm" id="open-new-task-btn">
293
+ <span>+ New Task</span>
294
+ </button>
295
+ </div>
296
+ </div>
297
+
298
+ <!-- Agent Filter Chips Bar -->
299
+ <div class="board-agent-filter-bar" id="board-agent-filter-bar">
300
+ <!-- Populated dynamically with All, Coordinator, Range, Player-rig, etc. -->
301
+ </div>
302
+
303
+ <!-- Kanban Columns Grid -->
304
+ <div class="kanban-grid" id="kanban-grid">
305
+ <!-- Column 1: Backlog -->
306
+ <div class="kanban-column" data-col="backlog">
307
+ <div class="kanban-col-header">
308
+ <div class="col-title-wrap">
309
+ <span class="col-dot dot-backlog"></span>
310
+ <span class="col-title">Fila / Backlog</span>
311
+ </div>
312
+ <span class="col-badge" id="col-count-backlog">0</span>
313
+ </div>
314
+ <div class="kanban-cards-list" id="cards-backlog" data-col="backlog">
315
+ <div class="kanban-empty">No tasks in backlog</div>
316
+ </div>
317
+ </div>
318
+
319
+ <!-- Column 2: In Progress -->
320
+ <div class="kanban-column" data-col="in_progress">
321
+ <div class="kanban-col-header">
322
+ <div class="col-title-wrap">
323
+ <span class="col-dot dot-progress"></span>
324
+ <span class="col-title">Em Voo / Claimed</span>
325
+ </div>
326
+ <span class="col-badge" id="col-count-in_progress">0</span>
327
+ </div>
328
+ <div class="kanban-cards-list" id="cards-in_progress" data-col="in_progress">
329
+ <div class="kanban-empty">No tasks in flight</div>
330
+ </div>
331
+ </div>
332
+
333
+ <!-- Column 3: Blocked -->
334
+ <div class="kanban-column" data-col="blocked">
335
+ <div class="kanban-col-header">
336
+ <div class="col-title-wrap">
337
+ <span class="col-dot dot-blocked"></span>
338
+ <span class="col-title">Bloqueios / Review</span>
339
+ </div>
340
+ <span class="col-badge" id="col-count-blocked">0</span>
341
+ </div>
342
+ <div class="kanban-cards-list" id="cards-blocked" data-col="blocked">
343
+ <div class="kanban-empty">No blocked items</div>
344
+ </div>
345
+ </div>
346
+
347
+ <!-- Column 4: Done -->
348
+ <div class="kanban-column" data-col="done">
349
+ <div class="kanban-col-header">
350
+ <div class="col-title-wrap">
351
+ <span class="col-dot dot-done"></span>
352
+ <span class="col-title">Concluído / Done</span>
353
+ </div>
354
+ <span class="col-badge" id="col-count-done">0</span>
355
+ </div>
356
+ <div class="kanban-cards-list" id="cards-done" data-col="done">
357
+ <div class="kanban-empty">No completed tasks</div>
358
+ </div>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ </main>
363
+
364
+ </div>
365
+
366
+ <!-- Floating Compose Window -->
367
+ <div class="compose-modal hidden" id="compose-modal">
368
+ <div class="compose-header">
369
+ <span>New Transmission</span>
370
+ <div class="compose-header-btns">
371
+ <button id="close-compose-btn" title="Close">✕</button>
372
+ </div>
373
+ </div>
374
+ <form class="compose-form" id="compose-form">
375
+ <div class="compose-field">
376
+ <label for="compose-template">Template:</label>
377
+ <select id="compose-template">
378
+ <option value="">(Custom transmission)</option>
379
+ <option value="task">Task Request (todo)</option>
380
+ <option value="verify">Gate &amp; Verification Report (verify-all: PASS)</option>
381
+ <option value="question">Question / Consultation</option>
382
+ <option value="lock">Contention / Lock Notice</option>
383
+ </select>
384
+ </div>
385
+ <div class="compose-field">
386
+ <label for="compose-from">From:</label>
387
+ <select id="compose-from"></select>
388
+ </div>
389
+ <div class="compose-field">
390
+ <label for="compose-to">To:</label>
391
+ <select id="compose-to"></select>
392
+ </div>
393
+ <div class="compose-field">
394
+ <label for="compose-subject">Subject:</label>
395
+ <input type="text" id="compose-subject" placeholder="Subject..." required>
396
+ </div>
397
+ <div class="compose-field">
398
+ <label for="compose-thread">Thread:</label>
399
+ <input type="text" id="compose-thread" placeholder="e.g. p2p/user__coordinator or broadcast">
400
+ </div>
401
+ <div class="compose-textarea-wrap">
402
+ <textarea id="compose-body" placeholder="Transmission body..." rows="10" required></textarea>
403
+ </div>
404
+ <div class="compose-footer">
405
+ <button type="submit" class="btn btn-primary" id="compose-submit-btn">
406
+ <span>Send</span>
407
+ </button>
408
+ </div>
409
+ </form>
410
+ </div>
411
+
412
+ <!-- Lightbox Modal for Image Previews -->
413
+ <div class="lightbox-modal hidden" id="lightbox-modal">
414
+ <div class="lightbox-backdrop" id="lightbox-backdrop"></div>
415
+ <div class="lightbox-box">
416
+ <div class="lightbox-topbar">
417
+ <span class="lightbox-title" id="lightbox-title">Image Preview</span>
418
+ <div class="lightbox-top-actions">
419
+ <a class="lightbox-btn" id="lightbox-download-link" href="#" target="_blank" download>Open Full Image ↗</a>
420
+ <button class="lightbox-close-btn" id="lightbox-close-btn">✕</button>
421
+ </div>
422
+ </div>
423
+ <div class="lightbox-img-wrapper">
424
+ <img id="lightbox-img" src="" alt="preview">
425
+ </div>
426
+ </div>
427
+ </div>
428
+
429
+ <!-- Right-Click Context Menu -->
430
+ <div class="context-menu hidden" id="chat-context-menu">
431
+ <div class="context-menu-header" id="ctx-header">
432
+ <span class="ctx-header-title" id="ctx-header-title">Context</span>
433
+ <span class="ctx-header-sub" id="ctx-header-sub"></span>
434
+ </div>
435
+ <div class="context-menu-divider"></div>
436
+ <div class="context-menu-item" id="ctx-reply">
437
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/></svg>
438
+ <span id="ctx-reply-text">Reply to transmission</span>
439
+ </div>
440
+ <div class="context-menu-item" id="ctx-quote">
441
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></svg>
442
+ <span id="ctx-quote-text">Quote in reply</span>
443
+ </div>
444
+ <div class="context-menu-item" id="ctx-filter-sender">
445
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
446
+ <span id="ctx-filter-sender-text">View transmissions from author</span>
447
+ </div>
448
+ <div class="context-menu-item" id="ctx-copy-id">
449
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
450
+ <span id="ctx-copy-id-text">Copy message ID</span>
451
+ </div>
452
+ <div class="context-menu-divider"></div>
453
+ <div class="context-menu-item" id="ctx-register-agent">
454
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
455
+ <span id="ctx-register-text">Register new agent profile...</span>
456
+ </div>
457
+ </div>
458
+
459
+ <!-- Register Agent & Model Modal -->
460
+ <div class="modal-backdrop hidden" id="register-agent-backdrop">
461
+ <div class="agent-modal-card agent-modal-card-wide">
462
+ <div class="agent-modal-header">
463
+ <h3 id="agent-modal-title">Configure Agent Profile</h3>
464
+ <button class="icon-btn-small" id="close-register-agent-btn">✕</button>
465
+ </div>
466
+ <form id="register-agent-form">
467
+ <!-- Quick-load discovered agent brief chips -->
468
+ <div class="agent-field" id="brief-chips-field">
469
+ <label>Discovered on Disk (.opencode/agents, .agents, .pi):</label>
470
+ <div class="brief-chips-list" id="brief-chips-list">
471
+ <span class="brief-chips-loading">Scanning briefs...</span>
472
+ </div>
473
+ </div>
474
+
475
+ <div class="agent-field">
476
+ <div class="agent-field-header-row">
477
+ <label for="new-agent-handle">Agent Handle (unique ID):</label>
478
+ <button type="button" class="btn-text-action" id="pull-disk-brief-btn" title="Pull brief and prompt from disk">⬇ Pull from Disk</button>
479
+ </div>
480
+ <input type="text" id="new-agent-handle" placeholder="e.g. security-auditor, perf-eval" required pattern="[a-zA-Z0-9_-]+">
481
+ <span class="field-hint" id="new-agent-handle-hint">Used for Maildir routing and AMQ address</span>
482
+ </div>
483
+
484
+ <div class="agent-field">
485
+ <label for="new-agent-name">Display Name:</label>
486
+ <input type="text" id="new-agent-name" placeholder="e.g. Security Auditor">
487
+ </div>
488
+
489
+ <div class="agent-field">
490
+ <label for="new-agent-role">Specialty / Role:</label>
491
+ <input type="text" id="new-agent-role" placeholder="e.g. Vulnerability Scanner, Ballistics Physicist">
492
+ </div>
493
+
494
+ <div class="agent-field">
495
+ <label for="new-agent-model">Backend Model Profile:</label>
496
+ <input type="text" id="new-agent-model" list="model-suggestions" placeholder="e.g. claude-3-7-sonnet, gemini-2.5-flash, ollama/qwen2.5-coder..." autocomplete="off">
497
+ <datalist id="model-suggestions"></datalist>
498
+ <span class="field-hint">Specified model or custom endpoint for this persona</span>
499
+ </div>
500
+
501
+ <div class="agent-field">
502
+ <div class="agent-field-header-row">
503
+ <label for="new-agent-prompt">Agent Brief &amp; System Prompt:</label>
504
+ <span class="brief-source-badge" id="brief-source-badge"></span>
505
+ </div>
506
+ <textarea id="new-agent-prompt" rows="7" placeholder="Lane ownership, files, conventions, instructions..."></textarea>
507
+ <span class="field-hint">Loaded from .opencode/agents, .agents, or .pi/agents</span>
508
+ </div>
509
+
510
+ <div class="agent-modal-actions">
511
+ <button type="button" class="btn btn-secondary" id="cancel-register-agent-btn">Cancel</button>
512
+ <button type="submit" class="btn btn-primary" id="submit-register-agent-btn">Save Agent Profile</button>
513
+ </div>
514
+ </form>
515
+ </div>
516
+ </div>
517
+
518
+ <!-- New Task Modal for Kanban Board -->
519
+ <div class="modal-backdrop hidden" id="task-modal-backdrop">
520
+ <div class="agent-modal-card">
521
+ <div class="agent-modal-header">
522
+ <h3>Create Coordination Task</h3>
523
+ <button class="icon-btn-small" id="close-task-modal-btn">✕</button>
524
+ </div>
525
+ <form id="new-task-form">
526
+ <div class="agent-field">
527
+ <label for="task-title-input">Task Title / Item *</label>
528
+ <input type="text" id="task-title-input" placeholder="e.g. Implement analytic arm IK Phase 2" required>
529
+ </div>
530
+ <div class="agent-field-row" style="display:flex;gap:12px;">
531
+ <div class="agent-field" style="flex:1;">
532
+ <label for="task-owner-select">Assigned Agent *</label>
533
+ <select id="task-owner-select"></select>
534
+ </div>
535
+ <div class="agent-field" style="flex:1;">
536
+ <label for="task-status-select">Initial Stage *</label>
537
+ <select id="task-status-select">
538
+ <option value="backlog">📥 Fila / Backlog</option>
539
+ <option value="in_progress">🚀 Em Voo / Claimed</option>
540
+ <option value="blocked">🛑 Bloqueio / Review</option>
541
+ <option value="done">✅ Concluído / Done</option>
542
+ </select>
543
+ </div>
544
+ </div>
545
+ <div class="agent-field">
546
+ <label for="task-desc-input">Description / Requirements / Evidence:</label>
547
+ <textarea id="task-desc-input" rows="4" placeholder="Detail the task objectives, constraints, or gate criteria..."></textarea>
548
+ </div>
549
+ <div class="agent-field" style="margin-top: 6px;">
550
+ <label style="display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:normal;font-size:13px;user-select:none;">
551
+ <input type="checkbox" id="task-notify-checkbox" checked style="width:auto;cursor:pointer;">
552
+ <span>✉️ Dispatch automailing notification via AMQ to assigned agent</span>
553
+ </label>
554
+ </div>
555
+ <div class="agent-modal-actions">
556
+ <button type="button" class="btn btn-secondary" id="cancel-task-btn">Cancel</button>
557
+ <button type="submit" class="btn btn-primary" id="save-task-btn">Create Task</button>
558
+ </div>
559
+ </form>
560
+ </div>
561
+ </div>
562
+
563
+ <!-- Task Sheet (Ficha do Card / Dossier Drawer) -->
564
+ <div class="task-sheet-backdrop hidden" id="task-sheet-backdrop"></div>
565
+ <aside class="task-sheet-drawer hidden" id="task-sheet-drawer" role="dialog" aria-modal="true" aria-label="Ficha da Tarefa">
566
+ <div class="task-sheet-container">
567
+ <!-- Sheet Top Nav -->
568
+ <div class="task-sheet-top-bar">
569
+ <div class="task-sheet-top-left">
570
+ <button type="button" class="sheet-back-btn" id="sheet-back-btn" title="Fechar ficha e voltar ao Quadro Kanban (Esc)">
571
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
572
+ <span>Voltar ao Quadro</span>
573
+ </button>
574
+ <span class="task-sheet-id" id="sheet-task-id">#task-id</span>
575
+ <span class="kanban-source-badge" id="sheet-task-source">Source</span>
576
+ </div>
577
+ <div class="task-sheet-top-right">
578
+ <button class="sheet-action-btn" id="sheet-wide-btn" title="Alternar largura expandida">
579
+ <span id="sheet-wide-icon">↔️</span>
580
+ <span id="sheet-wide-text">Expandir Ficha</span>
581
+ </button>
582
+ <button class="sheet-action-btn" id="sheet-copy-id-btn" title="Copiar ID da Tarefa">
583
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
584
+ <span>Copiar ID</span>
585
+ </button>
586
+ <button class="icon-btn-small" id="close-task-sheet-btn" title="Fechar (Esc)">✕</button>
587
+ </div>
588
+ </div>
589
+
590
+ <!-- Sheet Header / Title -->
591
+ <div class="task-sheet-header">
592
+ <h2 class="task-sheet-title" id="sheet-task-title">Título da Tarefa</h2>
593
+ </div>
594
+
595
+ <!-- Stage Selector Bar -->
596
+ <div class="task-sheet-stage-section">
597
+ <span class="task-sheet-section-label">Estágio da Ficha:</span>
598
+ <div class="task-sheet-stage-buttons" id="sheet-stage-buttons">
599
+ <button type="button" class="sheet-stage-btn" data-stage="backlog">
600
+ <span class="col-dot dot-backlog"></span>
601
+ <span>Backlog</span>
602
+ </button>
603
+ <button type="button" class="sheet-stage-btn" data-stage="in_progress">
604
+ <span class="col-dot dot-progress"></span>
605
+ <span>Em Voo</span>
606
+ </button>
607
+ <button type="button" class="sheet-stage-btn" data-stage="blocked">
608
+ <span class="col-dot dot-blocked"></span>
609
+ <span>Bloqueio</span>
610
+ </button>
611
+ <button type="button" class="sheet-stage-btn" data-stage="done">
612
+ <span class="col-dot dot-done"></span>
613
+ <span>Concluído</span>
614
+ </button>
615
+ </div>
616
+ </div>
617
+
618
+ <!-- Meta Bar: Owner & Thread Reference -->
619
+ <div class="task-sheet-meta-grid">
620
+ <div class="sheet-meta-item">
621
+ <span class="task-sheet-section-label">Responsável / Owner:</span>
622
+ <div class="sheet-owner-selector-wrap">
623
+ <div class="sheet-owner-avatar" id="sheet-owner-avatar">?</div>
624
+ <select id="sheet-owner-select" class="sheet-owner-select"></select>
625
+ </div>
626
+ </div>
627
+ <div class="sheet-meta-item">
628
+ <span class="task-sheet-section-label">Thread AMQ Vinculada:</span>
629
+ <code class="sheet-thread-code" id="sheet-thread-id">agboard/...</code>
630
+ </div>
631
+ </div>
632
+
633
+ <!-- Ficha View Tabs -->
634
+ <div class="sheet-tabs-bar" id="sheet-tabs-bar">
635
+ <button type="button" class="sheet-tab-btn active" data-tab="all" id="sheet-tab-all">
636
+ <span>📜 Visão Integrada</span>
637
+ </button>
638
+ <button type="button" class="sheet-tab-btn" data-tab="desc" id="sheet-tab-desc">
639
+ <span>📋 Descrição Completa</span>
640
+ </button>
641
+ <button type="button" class="sheet-tab-btn" data-tab="transmissions" id="sheet-tab-transmissions">
642
+ <span>💬 Transmissões</span>
643
+ <span class="sheet-tab-count" id="sheet-tab-badge">0</span>
644
+ </button>
645
+ </div>
646
+
647
+ <!-- Description / Context Card -->
648
+ <div class="task-sheet-card" id="task-sheet-desc-card">
649
+ <div class="task-sheet-card-header">
650
+ <div class="sheet-card-header-left">
651
+ <span>📋 Descrição / Contexto da Tarefa</span>
652
+ </div>
653
+ <div class="sheet-card-header-right">
654
+ <button type="button" class="sheet-subtle-btn sheet-desc-back-btn" id="sheet-desc-back-btn" style="display:none;" title="Voltar para a visão integrada">
655
+ <span>← Sair do Foco</span>
656
+ </button>
657
+ <button type="button" class="sheet-subtle-btn" id="sheet-desc-expand-btn" title="Alternar foco exclusivo na descrição">
658
+ <span id="sheet-desc-expand-icon">📖</span>
659
+ <span id="sheet-desc-expand-text">Foco na Descrição</span>
660
+ </button>
661
+ </div>
662
+ </div>
663
+ <div class="task-sheet-card-body">
664
+ <div class="task-sheet-desc md-content" id="sheet-task-desc"></div>
665
+ </div>
666
+ </div>
667
+
668
+ <!-- Transmissions Feed Section ("Os cards são fichas tais quais os e-mails") -->
669
+ <div class="task-sheet-thread-section" id="task-sheet-thread-section">
670
+ <div class="task-sheet-thread-header">
671
+ <div class="sheet-thread-title-wrap">
672
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>
673
+ <h3>Transmissões Vinculadas</h3>
674
+ <span class="col-badge" id="sheet-thread-badge">0</span>
675
+ </div>
676
+ <button type="button" class="sheet-refresh-thread-btn" id="sheet-refresh-thread-btn" title="Recarregar mensagens">↻ Atualizar</button>
677
+ </div>
678
+
679
+ <div class="sheet-thread-list" id="sheet-thread-list">
680
+ <!-- Transmissions cards injected here -->
681
+ </div>
682
+ </div>
683
+
684
+ <!-- In-Ficha AMQ Dispatch Form ("Fica tudo lá dentro") -->
685
+ <div class="task-sheet-dispatch-section" id="task-sheet-dispatch-section">
686
+ <div class="task-sheet-dispatch-header">
687
+ <span>✉️ Transmitir Mensagem nesta Ficha</span>
688
+ </div>
689
+ <div class="sheet-dispatch-form">
690
+ <div class="sheet-dispatch-row">
691
+ <div class="sheet-dispatch-field">
692
+ <label for="sheet-dispatch-from">De (Remetente):</label>
693
+ <select id="sheet-dispatch-from"></select>
694
+ </div>
695
+ <div class="sheet-dispatch-field">
696
+ <label for="sheet-dispatch-to">Para (Destinatário):</label>
697
+ <select id="sheet-dispatch-to"></select>
698
+ </div>
699
+ </div>
700
+
701
+ <!-- Quick action chips -->
702
+ <div class="sheet-dispatch-chips" id="sheet-dispatch-chips">
703
+ <button type="button" class="chip" data-tpl="status">📋 Pedir Status</button>
704
+ <button type="button" class="chip" data-tpl="block">🛑 Alertar Bloqueio</button>
705
+ <button type="button" class="chip" data-tpl="done">✅ Enviar Evidência</button>
706
+ <button type="button" class="chip" data-tpl="ack">🤝 Confirmar (ACK)</button>
707
+ </div>
708
+
709
+ <textarea id="sheet-dispatch-body" class="sheet-dispatch-textarea" rows="3" placeholder="Digite uma instrução, feedback ou relatório... (AMQ envia direto aos agentes)"></textarea>
710
+
711
+ <div class="sheet-dispatch-footer">
712
+ <span class="sheet-dispatch-hint">Thread: <span id="sheet-dispatch-thread-preview">agboard/...</span></span>
713
+ <button type="button" class="btn btn-primary" id="sheet-dispatch-send-btn">
714
+ <svg viewBox="0 0 24 24"><path fill="currentColor" d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>
715
+ <span>Enviar Transmissão (AMQ)</span>
716
+ </button>
717
+ </div>
718
+ </div>
719
+ </div>
720
+
721
+ </div>
722
+ </aside>
723
+
724
+ <script src="app.js"></script>
725
+
726
+ </body>
727
+ </html>