agent-relay-server 0.4.21 → 0.4.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-server",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "Lightweight HTTP message relay for inter-agent communication across machines",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -4,6 +4,16 @@
4
4
  const CLOSED_TASK_STATUSES = new Set(["done", "failed", "canceled"]);
5
5
  const STATUS_SORT_ORDER = { online: 0, idle: 1, busy: 2, offline: 3 };
6
6
  const LIVE_REFRESH_MS = 5_000;
7
+ const AGENT_TYPE_ICONS = {
8
+ codex: "ti-terminal-2",
9
+ claude: "ti-sparkles",
10
+ agent: "ti-robot",
11
+ };
12
+ const AGENT_TYPE_TITLES = {
13
+ codex: "Codex agent",
14
+ claude: "Claude agent",
15
+ agent: "Agent",
16
+ };
7
17
 
8
18
  function loadPref(key, fallback) {
9
19
  try {
@@ -453,6 +463,9 @@
453
463
  return {
454
464
  displayName,
455
465
  displayTarget,
466
+ agentType,
467
+ agentTypeIcon,
468
+ agentTypeTitle,
456
469
  severityClass,
457
470
  agentStatusTitle,
458
471
  timeAgo,
@@ -477,6 +490,32 @@
477
490
  return agent ? this.displayName(agent) : target.slice(-8);
478
491
  }
479
492
 
493
+ function agentType(agent) {
494
+ const values = [
495
+ ...(agent?.tags || []),
496
+ agent?.meta?.provider,
497
+ agent?.meta?.client,
498
+ agent?.meta?.runtime,
499
+ agent?.meta?.agentType,
500
+ agent?.id,
501
+ agent?.name,
502
+ ]
503
+ .filter((value) => typeof value === "string")
504
+ .map((value) => value.toLowerCase());
505
+
506
+ if (values.some((value) => value.includes("codex"))) return "codex";
507
+ if (values.some((value) => value.includes("claude"))) return "claude";
508
+ return "agent";
509
+ }
510
+
511
+ function agentTypeIcon(agent) {
512
+ return AGENT_TYPE_ICONS[agentType(agent)] || AGENT_TYPE_ICONS.agent;
513
+ }
514
+
515
+ function agentTypeTitle(agent) {
516
+ return AGENT_TYPE_TITLES[agentType(agent)] || AGENT_TYPE_TITLES.agent;
517
+ }
518
+
480
519
  function severityClass(severity) {
481
520
  if (severity === "critical") return "bg-danger-lt";
482
521
  if (severity === "warning") return "bg-warning-lt";
@@ -796,7 +835,7 @@
796
835
 
797
836
  window.AgentRelayDashboard = {
798
837
  createRelayDashboard,
799
- helpers: { loadPref, savePref, indexAgents, upsertById, upsertTask, compareAgents },
838
+ helpers: { loadPref, savePref, indexAgents, upsertById, upsertTask, compareAgents, agentType },
800
839
  };
801
840
  window.relay = createRelayDashboard;
802
841
 
package/public/index.html CHANGED
@@ -48,6 +48,33 @@
48
48
  .agent-card:hover .agent-actions { opacity: 1; }
49
49
 
50
50
  .agent-label { color: var(--tblr-warning); font-weight: 600; }
51
+ .agent-type-icon {
52
+ width: 20px;
53
+ height: 20px;
54
+ border-radius: 6px;
55
+ display: inline-flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ flex: 0 0 20px;
59
+ border: 1px solid transparent;
60
+ font-size: 14px;
61
+ line-height: 1;
62
+ }
63
+ .agent-type-icon.codex {
64
+ color: var(--tblr-info);
65
+ background: rgba(var(--tblr-info-rgb), 0.12);
66
+ border-color: rgba(var(--tblr-info-rgb), 0.25);
67
+ }
68
+ .agent-type-icon.claude {
69
+ color: var(--tblr-warning);
70
+ background: rgba(var(--tblr-warning-rgb), 0.12);
71
+ border-color: rgba(var(--tblr-warning-rgb), 0.25);
72
+ }
73
+ .agent-type-icon.agent {
74
+ color: var(--tblr-secondary);
75
+ background: var(--tblr-bg-surface-secondary);
76
+ border-color: var(--tblr-border-color);
77
+ }
51
78
 
52
79
  .msg-card { border-left: 3px solid transparent; }
53
80
  .msg-card.claimed { border-left-color: var(--tblr-success); }
@@ -238,6 +265,9 @@
238
265
  <template x-for="a in sortedAgents.slice(0, 20)" :key="a.id">
239
266
  <div class="list-group-item d-flex align-items-center gap-2" style="cursor:pointer" @click="selectedAgent = a.id; switchView('messages')">
240
267
  <span class="status-dot" :class="[a.status, a.status !== 'offline' && !a.ready ? 'not-ready' : '']"></span>
268
+ <span class="agent-type-icon" :class="agentType(a)" :title="agentTypeTitle(a)" :aria-label="agentTypeTitle(a)">
269
+ <i class="ti" :class="agentTypeIcon(a)"></i>
270
+ </span>
241
271
  <div class="flex-grow-1 min-width-0">
242
272
  <div class="text-truncate">
243
273
  <template x-if="a.label">
@@ -339,6 +369,9 @@
339
369
  <div class="card-body">
340
370
  <div class="d-flex align-items-start gap-2">
341
371
  <span class="status-dot mt-1" :class="[a.status, a.status !== 'offline' && !a.ready ? 'not-ready' : '']" :title="agentStatusTitle(a)"></span>
372
+ <span class="agent-type-icon mt-0" :class="agentType(a)" :title="agentTypeTitle(a)" :aria-label="agentTypeTitle(a)">
373
+ <i class="ti" :class="agentTypeIcon(a)"></i>
374
+ </span>
342
375
  <div class="flex-grow-1 min-width-0">
343
376
  <div class="d-flex align-items-center gap-2">
344
377
  <template x-if="a.label">