@useorgx/openclaw-plugin 0.3.1 → 0.3.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.
Files changed (56) hide show
  1. package/dashboard/dist/assets/MissionControlView-CthHdl6R.js +1 -0
  2. package/dashboard/dist/assets/SessionInspector-Dq0Z5WMo.js +1 -0
  3. package/dashboard/dist/assets/index-CoLgC4zE.js +11 -0
  4. package/dashboard/dist/assets/index-jfEYE0kO.css +1 -0
  5. package/dashboard/dist/assets/motion-CVDprFZg.js +9 -0
  6. package/dashboard/dist/assets/orgx-logo-Fm0FhtnV.png +0 -0
  7. package/dashboard/dist/assets/react-vendor-C2t2w4r2.js +32 -0
  8. package/dashboard/dist/assets/tanstack-C-KIc3Wc.js +1 -0
  9. package/dashboard/dist/assets/vendor-C-AHK0Ly.js +9 -0
  10. package/dashboard/dist/index.html +6 -2
  11. package/dist/agent-context-store.d.ts.map +1 -1
  12. package/dist/agent-context-store.js +21 -20
  13. package/dist/agent-context-store.js.map +1 -1
  14. package/dist/agent-run-store.d.ts.map +1 -1
  15. package/dist/agent-run-store.js +21 -20
  16. package/dist/agent-run-store.js.map +1 -1
  17. package/dist/auth-store.d.ts.map +1 -1
  18. package/dist/auth-store.js +39 -44
  19. package/dist/auth-store.js.map +1 -1
  20. package/dist/byok-store.d.ts.map +1 -1
  21. package/dist/byok-store.js +24 -20
  22. package/dist/byok-store.js.map +1 -1
  23. package/dist/fs-utils.d.ts +7 -0
  24. package/dist/fs-utils.d.ts.map +1 -0
  25. package/dist/fs-utils.js +63 -0
  26. package/dist/fs-utils.js.map +1 -0
  27. package/dist/http-handler.d.ts +17 -0
  28. package/dist/http-handler.d.ts.map +1 -1
  29. package/dist/http-handler.js +281 -11
  30. package/dist/http-handler.js.map +1 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +4 -3
  33. package/dist/index.js.map +1 -1
  34. package/dist/mcp-apps/orgx-live.html +690 -0
  35. package/dist/outbox.d.ts.map +1 -1
  36. package/dist/outbox.js +74 -29
  37. package/dist/outbox.js.map +1 -1
  38. package/dist/paths.d.ts +23 -0
  39. package/dist/paths.d.ts.map +1 -0
  40. package/dist/paths.js +50 -0
  41. package/dist/paths.js.map +1 -0
  42. package/dist/reporting/outbox-replay.d.ts +2 -0
  43. package/dist/reporting/outbox-replay.d.ts.map +1 -0
  44. package/dist/reporting/outbox-replay.js +17 -0
  45. package/dist/reporting/outbox-replay.js.map +1 -0
  46. package/dist/reporting/rollups.d.ts +21 -0
  47. package/dist/reporting/rollups.d.ts.map +1 -0
  48. package/dist/reporting/rollups.js +85 -0
  49. package/dist/reporting/rollups.js.map +1 -0
  50. package/dist/snapshot-store.d.ts.map +1 -1
  51. package/dist/snapshot-store.js +24 -20
  52. package/dist/snapshot-store.js.map +1 -1
  53. package/package.json +2 -2
  54. package/dashboard/dist/assets/index-BjqNjHpY.css +0 -1
  55. package/dashboard/dist/assets/index-DCLkU4AM.js +0 -57
  56. package/dashboard/dist/assets/orgx-logo-QSE5QWy4.png +0 -0
@@ -0,0 +1,690 @@
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" />
6
+ <title>OrgX Live</title>
7
+ <meta
8
+ http-equiv="Content-Security-Policy"
9
+ content="default-src 'none'; img-src data: https:; style-src 'unsafe-inline'; script-src 'unsafe-inline'; connect-src *;"
10
+ />
11
+ <style>
12
+ :root {
13
+ --bg: #0b0d12;
14
+ --panel: #121625;
15
+ --panel2: #0f1320;
16
+ --border: rgba(255, 255, 255, 0.1);
17
+ --text: rgba(255, 255, 255, 0.92);
18
+ --muted: rgba(255, 255, 255, 0.65);
19
+ --muted2: rgba(255, 255, 255, 0.5);
20
+ --accent: #7c5cff;
21
+ --accent2: #23d2aa;
22
+ --warn: #ffcc66;
23
+ --bad: #ff5c7a;
24
+ --good: #2cffb0;
25
+ --shadow: rgba(0, 0, 0, 0.55);
26
+ --radius: 14px;
27
+ --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
28
+ "Liberation Mono", "Courier New", monospace;
29
+ --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
30
+ Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
31
+ }
32
+
33
+ html,
34
+ body {
35
+ height: 100%;
36
+ margin: 0;
37
+ padding: 0;
38
+ background: radial-gradient(
39
+ 900px 520px at 20% 10%,
40
+ rgba(124, 92, 255, 0.16),
41
+ rgba(0, 0, 0, 0)
42
+ ),
43
+ radial-gradient(
44
+ 800px 440px at 80% 0%,
45
+ rgba(35, 210, 170, 0.12),
46
+ rgba(0, 0, 0, 0)
47
+ ),
48
+ linear-gradient(180deg, #07080c, var(--bg));
49
+ color: var(--text);
50
+ font-family: var(--sans);
51
+ }
52
+
53
+ a {
54
+ color: inherit;
55
+ text-decoration: none;
56
+ }
57
+
58
+ .wrap {
59
+ max-width: 980px;
60
+ margin: 0 auto;
61
+ padding: 18px;
62
+ }
63
+
64
+ .top {
65
+ display: flex;
66
+ align-items: flex-start;
67
+ justify-content: space-between;
68
+ gap: 16px;
69
+ padding: 16px 16px 14px 16px;
70
+ border: 1px solid var(--border);
71
+ border-radius: var(--radius);
72
+ background: linear-gradient(
73
+ 180deg,
74
+ rgba(255, 255, 255, 0.05),
75
+ rgba(255, 255, 255, 0.02)
76
+ );
77
+ box-shadow: 0 16px 40px var(--shadow);
78
+ }
79
+
80
+ .brand {
81
+ display: flex;
82
+ flex-direction: column;
83
+ gap: 6px;
84
+ }
85
+
86
+ .title {
87
+ font-size: 18px;
88
+ font-weight: 760;
89
+ letter-spacing: -0.02em;
90
+ display: flex;
91
+ align-items: baseline;
92
+ gap: 10px;
93
+ }
94
+
95
+ .badge {
96
+ font-family: var(--mono);
97
+ font-size: 12px;
98
+ color: var(--muted);
99
+ border: 1px solid var(--border);
100
+ border-radius: 999px;
101
+ padding: 2px 8px;
102
+ background: rgba(0, 0, 0, 0.2);
103
+ }
104
+
105
+ .sub {
106
+ display: flex;
107
+ flex-wrap: wrap;
108
+ gap: 10px;
109
+ font-size: 12px;
110
+ color: var(--muted);
111
+ }
112
+
113
+ .pill {
114
+ display: inline-flex;
115
+ align-items: center;
116
+ gap: 8px;
117
+ padding: 6px 10px;
118
+ border-radius: 999px;
119
+ border: 1px solid var(--border);
120
+ background: rgba(0, 0, 0, 0.2);
121
+ }
122
+
123
+ .dot {
124
+ width: 8px;
125
+ height: 8px;
126
+ border-radius: 999px;
127
+ background: rgba(255, 255, 255, 0.25);
128
+ }
129
+
130
+ .dot.good {
131
+ background: var(--good);
132
+ }
133
+ .dot.warn {
134
+ background: var(--warn);
135
+ }
136
+ .dot.bad {
137
+ background: var(--bad);
138
+ }
139
+
140
+ .actions {
141
+ display: flex;
142
+ flex-wrap: wrap;
143
+ gap: 10px;
144
+ justify-content: flex-end;
145
+ }
146
+
147
+ button {
148
+ font: inherit;
149
+ color: var(--text);
150
+ border: 1px solid var(--border);
151
+ background: rgba(0, 0, 0, 0.2);
152
+ border-radius: 12px;
153
+ padding: 10px 12px;
154
+ cursor: pointer;
155
+ transition: transform 120ms ease, background 120ms ease,
156
+ border-color 120ms ease;
157
+ }
158
+
159
+ button:hover {
160
+ background: rgba(255, 255, 255, 0.06);
161
+ border-color: rgba(255, 255, 255, 0.22);
162
+ transform: translateY(-1px);
163
+ }
164
+
165
+ button.primary {
166
+ background: linear-gradient(
167
+ 90deg,
168
+ rgba(124, 92, 255, 0.9),
169
+ rgba(35, 210, 170, 0.75)
170
+ );
171
+ border-color: rgba(255, 255, 255, 0.22);
172
+ }
173
+
174
+ .grid {
175
+ display: grid;
176
+ grid-template-columns: repeat(12, 1fr);
177
+ gap: 14px;
178
+ margin-top: 14px;
179
+ }
180
+
181
+ .card {
182
+ grid-column: span 12;
183
+ border: 1px solid var(--border);
184
+ border-radius: var(--radius);
185
+ background: linear-gradient(
186
+ 180deg,
187
+ rgba(255, 255, 255, 0.05),
188
+ rgba(255, 255, 255, 0.02)
189
+ );
190
+ box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
191
+ overflow: hidden;
192
+ }
193
+
194
+ .card h2 {
195
+ margin: 0;
196
+ padding: 12px 14px;
197
+ font-size: 13px;
198
+ letter-spacing: 0.02em;
199
+ color: rgba(255, 255, 255, 0.76);
200
+ text-transform: uppercase;
201
+ border-bottom: 1px solid var(--border);
202
+ background: rgba(0, 0, 0, 0.18);
203
+ }
204
+
205
+ .card .body {
206
+ padding: 12px 14px 14px 14px;
207
+ }
208
+
209
+ .list {
210
+ display: flex;
211
+ flex-direction: column;
212
+ gap: 10px;
213
+ }
214
+
215
+ .row {
216
+ display: flex;
217
+ align-items: flex-start;
218
+ justify-content: space-between;
219
+ gap: 12px;
220
+ border: 1px solid var(--border);
221
+ border-radius: 12px;
222
+ background: linear-gradient(180deg, var(--panel), var(--panel2));
223
+ padding: 10px 12px;
224
+ }
225
+
226
+ .row .left {
227
+ min-width: 0;
228
+ }
229
+
230
+ .row .right {
231
+ flex: 0 0 auto;
232
+ display: flex;
233
+ gap: 10px;
234
+ align-items: center;
235
+ color: var(--muted2);
236
+ font-family: var(--mono);
237
+ font-size: 12px;
238
+ white-space: nowrap;
239
+ }
240
+
241
+ .row .name {
242
+ font-weight: 650;
243
+ letter-spacing: -0.01em;
244
+ line-height: 1.2;
245
+ overflow: hidden;
246
+ text-overflow: ellipsis;
247
+ white-space: nowrap;
248
+ max-width: 100%;
249
+ }
250
+
251
+ .row .meta {
252
+ margin-top: 6px;
253
+ font-size: 12px;
254
+ color: var(--muted);
255
+ display: flex;
256
+ flex-wrap: wrap;
257
+ gap: 8px;
258
+ }
259
+
260
+ .tag {
261
+ font-family: var(--mono);
262
+ font-size: 11px;
263
+ border: 1px solid var(--border);
264
+ border-radius: 999px;
265
+ padding: 2px 8px;
266
+ background: rgba(0, 0, 0, 0.16);
267
+ color: rgba(255, 255, 255, 0.78);
268
+ }
269
+
270
+ .empty {
271
+ color: var(--muted);
272
+ font-size: 13px;
273
+ padding: 8px 2px;
274
+ }
275
+
276
+ .error {
277
+ border: 1px solid rgba(255, 92, 122, 0.35);
278
+ background: rgba(255, 92, 122, 0.08);
279
+ color: rgba(255, 255, 255, 0.9);
280
+ border-radius: 12px;
281
+ padding: 12px;
282
+ font-family: var(--mono);
283
+ font-size: 12px;
284
+ white-space: pre-wrap;
285
+ }
286
+
287
+ @media (min-width: 860px) {
288
+ .card.split {
289
+ grid-column: span 6;
290
+ }
291
+ }
292
+ </style>
293
+ </head>
294
+ <body>
295
+ <div class="wrap">
296
+ <div class="top">
297
+ <div class="brand">
298
+ <div class="title">
299
+ OrgX Live
300
+ <span class="badge">plugin __ORGX_PLUGIN_VERSION__</span>
301
+ </div>
302
+ <div class="sub">
303
+ <span class="pill"
304
+ ><span id="connDot" class="dot warn"></span
305
+ ><span id="connLabel">Connecting...</span></span
306
+ >
307
+ <span class="pill"
308
+ ><span class="dot"></span
309
+ ><span id="syncedAt">No snapshot yet</span></span
310
+ >
311
+ </div>
312
+ </div>
313
+ <div class="actions">
314
+ <button id="refreshBtn" class="primary" type="button">Refresh</button>
315
+ <button id="openDashBtn" type="button">Open OrgX Live</button>
316
+ <button id="openDocsBtn" type="button">Docs</button>
317
+ </div>
318
+ </div>
319
+
320
+ <div class="grid">
321
+ <section class="card split">
322
+ <h2>Initiatives</h2>
323
+ <div class="body">
324
+ <div id="initiatives" class="list"></div>
325
+ </div>
326
+ </section>
327
+
328
+ <section class="card split">
329
+ <h2>Agents</h2>
330
+ <div class="body">
331
+ <div id="agents" class="list"></div>
332
+ </div>
333
+ </section>
334
+
335
+ <section class="card split">
336
+ <h2>Active Tasks</h2>
337
+ <div class="body">
338
+ <div id="tasks" class="list"></div>
339
+ </div>
340
+ </section>
341
+
342
+ <section class="card split">
343
+ <h2>Pending Decisions</h2>
344
+ <div class="body">
345
+ <div id="decisions" class="list"></div>
346
+ </div>
347
+ </section>
348
+
349
+ <section class="card">
350
+ <h2>Raw</h2>
351
+ <div class="body">
352
+ <div id="raw" class="error" style="display: none"></div>
353
+ <div id="hint" class="empty">
354
+ This app calls back into the host via MCP Apps postMessage, then
355
+ reads OrgX state via <span class="tag">tools/call</span>.
356
+ </div>
357
+ </div>
358
+ </section>
359
+ </div>
360
+ </div>
361
+
362
+ <script>
363
+ (() => {
364
+ const PROTOCOL_VERSION = "2026-01-26";
365
+ const APP_REQUEST_MESSAGE_TYPE = "mcp/app/request";
366
+ const APP_RESPONSE_MESSAGE_TYPE = "mcp/app/response";
367
+ const APP_NOTIFICATION_MESSAGE_TYPE = "mcp/app/notification";
368
+ const CHANNEL_ID_PARAM = "mcp-app-channel-id";
369
+
370
+ const INITIALIZE_METHOD = "ui/initialize";
371
+ const TOOL_CALL_METHOD = "tools/call";
372
+ const HOST_CONTEXT_CHANGED_METHOD = "ui/hostContextChanged";
373
+
374
+ const qs = new URLSearchParams(window.location.search);
375
+ const channelId = qs.get(CHANNEL_ID_PARAM) || null;
376
+
377
+ const el = {
378
+ connDot: document.getElementById("connDot"),
379
+ connLabel: document.getElementById("connLabel"),
380
+ syncedAt: document.getElementById("syncedAt"),
381
+ refreshBtn: document.getElementById("refreshBtn"),
382
+ openDashBtn: document.getElementById("openDashBtn"),
383
+ openDocsBtn: document.getElementById("openDocsBtn"),
384
+ initiatives: document.getElementById("initiatives"),
385
+ agents: document.getElementById("agents"),
386
+ tasks: document.getElementById("tasks"),
387
+ decisions: document.getElementById("decisions"),
388
+ raw: document.getElementById("raw"),
389
+ hint: document.getElementById("hint"),
390
+ };
391
+
392
+ function setConn(kind, label) {
393
+ el.connLabel.textContent = label;
394
+ el.connDot.className = `dot ${kind}`;
395
+ }
396
+
397
+ function setSyncedAt(value) {
398
+ el.syncedAt.textContent = value || "No snapshot yet";
399
+ }
400
+
401
+ function safeText(value) {
402
+ if (value == null) return "";
403
+ return String(value);
404
+ }
405
+
406
+ function clear(node) {
407
+ while (node.firstChild) node.removeChild(node.firstChild);
408
+ }
409
+
410
+ function row(title, tags, rightText) {
411
+ const root = document.createElement("div");
412
+ root.className = "row";
413
+
414
+ const left = document.createElement("div");
415
+ left.className = "left";
416
+
417
+ const name = document.createElement("div");
418
+ name.className = "name";
419
+ name.textContent = title;
420
+
421
+ const meta = document.createElement("div");
422
+ meta.className = "meta";
423
+ for (const t of tags) {
424
+ const tag = document.createElement("span");
425
+ tag.className = "tag";
426
+ tag.textContent = t;
427
+ meta.appendChild(tag);
428
+ }
429
+
430
+ left.appendChild(name);
431
+ if (tags.length) left.appendChild(meta);
432
+
433
+ const right = document.createElement("div");
434
+ right.className = "right";
435
+ right.textContent = rightText || "";
436
+
437
+ root.appendChild(left);
438
+ root.appendChild(right);
439
+ return root;
440
+ }
441
+
442
+ function empty(text) {
443
+ const d = document.createElement("div");
444
+ d.className = "empty";
445
+ d.textContent = text;
446
+ return d;
447
+ }
448
+
449
+ function showRaw(value) {
450
+ const text =
451
+ typeof value === "string" ? value : JSON.stringify(value, null, 2);
452
+ el.raw.style.display = "block";
453
+ el.raw.textContent = text;
454
+ }
455
+
456
+ function hideRaw() {
457
+ el.raw.style.display = "none";
458
+ el.raw.textContent = "";
459
+ }
460
+
461
+ function randomId() {
462
+ if (typeof crypto !== "undefined" && crypto.randomUUID) {
463
+ return crypto.randomUUID();
464
+ }
465
+ return `${Date.now()}-${Math.random().toString(16).slice(2)}`;
466
+ }
467
+
468
+ const pending = new Map();
469
+
470
+ function postEnvelope(message) {
471
+ window.parent.postMessage(message, "*");
472
+ }
473
+
474
+ function request(method, params, timeoutMs = 30_000) {
475
+ return new Promise((resolve, reject) => {
476
+ const id = randomId();
477
+ const timer = setTimeout(() => {
478
+ pending.delete(id);
479
+ reject(new Error(`timeout waiting for ${method}`));
480
+ }, timeoutMs);
481
+
482
+ pending.set(id, { resolve, reject, timer });
483
+
484
+ const envelope = {
485
+ protocolVersion: PROTOCOL_VERSION,
486
+ messageType: APP_REQUEST_MESSAGE_TYPE,
487
+ request: {
488
+ jsonrpc: "2.0",
489
+ id,
490
+ method,
491
+ params,
492
+ },
493
+ };
494
+
495
+ if (channelId) envelope.channelId = channelId;
496
+ postEnvelope(envelope);
497
+ });
498
+ }
499
+
500
+ function handleNotification(notification) {
501
+ if (!notification || typeof notification !== "object") return;
502
+ if (notification.method === HOST_CONTEXT_CHANGED_METHOD) {
503
+ const theme = notification.params && notification.params.theme;
504
+ if (theme && typeof theme === "object") {
505
+ // Host theme is optional; we keep our own styling for now.
506
+ }
507
+ }
508
+ }
509
+
510
+ function onMessage(event) {
511
+ const msg = event.data;
512
+ if (!msg || typeof msg !== "object") return;
513
+
514
+ if (channelId && msg.channelId && msg.channelId !== channelId) {
515
+ return;
516
+ }
517
+
518
+ if (msg.messageType === APP_RESPONSE_MESSAGE_TYPE && msg.response) {
519
+ const id = msg.response.id;
520
+ const slot = pending.get(id);
521
+ if (!slot) return;
522
+ pending.delete(id);
523
+ clearTimeout(slot.timer);
524
+ if (msg.response.error) {
525
+ slot.reject(new Error(msg.response.error.message || "error"));
526
+ } else {
527
+ slot.resolve(msg.response.result);
528
+ }
529
+ return;
530
+ }
531
+
532
+ if (
533
+ msg.messageType === APP_NOTIFICATION_MESSAGE_TYPE &&
534
+ msg.notification
535
+ ) {
536
+ handleNotification(msg.notification);
537
+ }
538
+ }
539
+
540
+ window.addEventListener("message", onMessage);
541
+
542
+ async function initialize() {
543
+ const result = await request(INITIALIZE_METHOD, {
544
+ protocolVersion: PROTOCOL_VERSION,
545
+ clientInfo: {
546
+ name: "OrgX Live (OpenClaw Plugin)",
547
+ version: "__ORGX_PLUGIN_VERSION__",
548
+ },
549
+ });
550
+ return result;
551
+ }
552
+
553
+ async function callTool(name, args) {
554
+ return request(TOOL_CALL_METHOD, { name, arguments: args || {} });
555
+ }
556
+
557
+ function extractText(toolResult) {
558
+ const content = toolResult && toolResult.content;
559
+ if (!Array.isArray(content)) return "";
560
+ for (const item of content) {
561
+ if (!item || typeof item !== "object") continue;
562
+ if (item.type === "text" && typeof item.text === "string") {
563
+ return item.text;
564
+ }
565
+ }
566
+ return "";
567
+ }
568
+
569
+ function renderStatus(statusJson) {
570
+ const baseUrl = statusJson && statusJson.baseUrl;
571
+ const docsUrl = statusJson && statusJson.docsUrl;
572
+ const snap = statusJson && statusJson.snapshot;
573
+
574
+ el.openDashBtn.disabled = !baseUrl;
575
+ el.openDocsBtn.disabled = !docsUrl;
576
+ el.openDashBtn.onclick = () => {
577
+ if (!baseUrl) return;
578
+ window.open(`${baseUrl.replace(/\\/+$/, "")}/live`, "_blank");
579
+ };
580
+ el.openDocsBtn.onclick = () => {
581
+ if (!docsUrl) return;
582
+ window.open(docsUrl, "_blank");
583
+ };
584
+
585
+ setSyncedAt((snap && snap.syncedAt) || "");
586
+
587
+ clear(el.initiatives);
588
+ const initiatives = (snap && snap.initiatives) || [];
589
+ if (!initiatives.length) {
590
+ el.initiatives.appendChild(empty("No initiatives in snapshot."));
591
+ } else {
592
+ for (const init of initiatives.slice(0, 8)) {
593
+ const pct =
594
+ init.progress == null ? "" : `${Math.round(init.progress)}%`;
595
+ const tags = [];
596
+ if (init.status) tags.push(safeText(init.status));
597
+ if (pct) tags.push(pct);
598
+ el.initiatives.appendChild(
599
+ row(init.title || init.id || "Untitled", tags, init.id || "")
600
+ );
601
+ }
602
+ }
603
+
604
+ clear(el.agents);
605
+ const agents = (snap && snap.agents) || [];
606
+ if (!agents.length) {
607
+ el.agents.appendChild(empty("No agents in snapshot."));
608
+ } else {
609
+ for (const a of agents.slice(0, 10)) {
610
+ const tags = [];
611
+ if (a.domain) tags.push(safeText(a.domain));
612
+ if (a.status) tags.push(safeText(a.status));
613
+ if (a.currentTask) tags.push(`task: ${safeText(a.currentTask)}`);
614
+ el.agents.appendChild(
615
+ row(a.name || a.id || "Agent", tags, a.id || "")
616
+ );
617
+ }
618
+ }
619
+
620
+ clear(el.tasks);
621
+ const tasks = (snap && snap.activeTasks) || [];
622
+ if (!tasks.length) {
623
+ el.tasks.appendChild(empty("No active tasks in snapshot."));
624
+ } else {
625
+ for (const t of tasks.slice(0, 10)) {
626
+ const tags = [];
627
+ if (t.status) tags.push(safeText(t.status));
628
+ if (t.domain) tags.push(safeText(t.domain));
629
+ if (t.modelTier) tags.push(safeText(t.modelTier));
630
+ el.tasks.appendChild(
631
+ row(t.title || t.id || "Task", tags, t.id || "")
632
+ );
633
+ }
634
+ }
635
+
636
+ clear(el.decisions);
637
+ const decisions = (snap && snap.pendingDecisions) || [];
638
+ if (!decisions.length) {
639
+ el.decisions.appendChild(empty("No pending decisions."));
640
+ } else {
641
+ for (const d of decisions.slice(0, 10)) {
642
+ const tags = [];
643
+ if (d.urgency) tags.push(`urgency: ${safeText(d.urgency)}`);
644
+ el.decisions.appendChild(
645
+ row(d.title || d.id || "Decision", tags, d.id || "")
646
+ );
647
+ }
648
+ }
649
+ }
650
+
651
+ async function refresh() {
652
+ hideRaw();
653
+ el.refreshBtn.disabled = true;
654
+ el.refreshBtn.textContent = "Refreshing...";
655
+ try {
656
+ const toolResult = await callTool("orgx_status_json", {});
657
+ const rawText = extractText(toolResult);
658
+ const statusJson = rawText ? JSON.parse(rawText) : null;
659
+ if (!statusJson || !statusJson.snapshot) {
660
+ showRaw(toolResult);
661
+ throw new Error("unexpected response");
662
+ }
663
+ renderStatus(statusJson);
664
+ } finally {
665
+ el.refreshBtn.disabled = false;
666
+ el.refreshBtn.textContent = "Refresh";
667
+ }
668
+ }
669
+
670
+ async function boot() {
671
+ try {
672
+ setConn("warn", "Initializing...");
673
+ await initialize();
674
+ setConn("good", "Connected");
675
+ el.refreshBtn.addEventListener("click", refresh);
676
+ await refresh();
677
+ } catch (err) {
678
+ setConn("bad", "Failed");
679
+ showRaw(
680
+ err instanceof Error ? `${err.name}: ${err.message}` : String(err)
681
+ );
682
+ }
683
+ }
684
+
685
+ boot();
686
+ })();
687
+ </script>
688
+ </body>
689
+ </html>
690
+
@@ -1 +1 @@
1
- {"version":3,"file":"outbox.d.ts","sourceRoot":"","sources":["../src/outbox.ts"],"names":[],"mappings":"AAAA;;;;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