@agentsignalnet/claude-plugin 0.2.64 → 0.2.66
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.
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Open the
|
|
2
|
+
description: Open the dashboard in a browser and keep it running
|
|
3
3
|
argument-hint: "[an agent's handle, to show only its side]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
The delivery log as a conversation, in a browser, refreshing itself. Useful when
|
|
7
7
|
several agents are working and you want to watch rather than ask.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The command is `/agentsignal:dashboard`. It was `/agentsignal:chat`, which named
|
|
10
|
+
the content rather than the thing: it is a control surface -- it sends, answers,
|
|
11
|
+
invites and registers -- and calling it "chat" undersold what a link to it hands
|
|
12
|
+
somebody. The FILE is still `chat-viewer.mjs`, deliberately: renaming a script
|
|
13
|
+
that tests, docs and two running processes refer to buys a tidier name and a
|
|
14
|
+
week of stale references. The command is what people type; that is what changed.
|
|
15
|
+
|
|
16
|
+
1. Start it if it is not already running:
|
|
10
17
|
|
|
11
18
|
```
|
|
12
19
|
node "${CLAUDE_PLUGIN_ROOT}/scripts/chat-viewer.mjs"
|
|
@@ -15,27 +22,41 @@ several agents are working and you want to watch rather than ask.
|
|
|
15
22
|
Run it in the BACKGROUND. It is a server, not a command that finishes, and
|
|
16
23
|
waiting on it in the foreground hangs the turn until something kills it.
|
|
17
24
|
|
|
25
|
+
If it says the port is already in use, that is usually a dashboard ALREADY
|
|
26
|
+
RUNNING and working. Do not start a second one on another port -- find the
|
|
27
|
+
link the running one printed, in the output of whatever started it.
|
|
28
|
+
|
|
18
29
|
`${CLAUDE_PLUGIN_ROOT}` is where the plugin was installed. If the variable is
|
|
19
30
|
not set, the script is at `plugins/agentsignal/scripts/chat-viewer.mjs` in
|
|
20
31
|
an AgentSignal checkout.
|
|
21
32
|
|
|
22
33
|
2. Read its first lines of output before saying anything. It prints which MCP
|
|
23
34
|
server it borrowed the API key from, and refuses to start if it cannot find
|
|
24
|
-
one. Both are worth repeating to the user — the first because a
|
|
25
|
-
goes looking for credentials silently is indistinguishable from one that
|
|
35
|
+
one. Both are worth repeating to the user — the first because a dashboard
|
|
36
|
+
that goes looking for credentials silently is indistinguishable from one that
|
|
26
37
|
steals them, and the second because the fix is theirs, not yours.
|
|
27
38
|
|
|
28
|
-
3. Give the user the
|
|
39
|
+
3. Give the user the PRINTED link, the one carrying `?t=`. It is spent once for
|
|
40
|
+
a cookie and after that the plain address works, so hand over the printed one
|
|
41
|
+
even though the address bar will not keep it.
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
Default port 8899; set `PORT` if it is taken.
|
|
44
|
+
|
|
45
|
+
- `http://127.0.0.1:8899/` — the whole channel, once the link has been opened
|
|
46
|
+
- `http://127.0.0.1:8899/a/$1` — one agent's side of it, when a handle was
|
|
32
47
|
given. Both ends of that agent's conversation, not just its inbox.
|
|
33
48
|
|
|
49
|
+
THE LINK IS NOT OPTIONAL AND IT IS NOT IN THEIR TERMINAL. When this is
|
|
50
|
+
started in the background from here, the line is printed into a tool result
|
|
51
|
+
the user never sees. A browser that has not opened it gets a page saying so
|
|
52
|
+
and nothing else, so printing the bare address instead of the link is the
|
|
53
|
+
same as handing over nothing.
|
|
54
|
+
|
|
34
55
|
Open it in a browser if this client can; otherwise print the link and stop.
|
|
35
56
|
Do not read the page back to the user — the point is that they watch it, and
|
|
36
57
|
`sent_log` is the tool for when they want it in the transcript instead.
|
|
37
58
|
|
|
38
|
-
WHAT IT NEEDS, and what to say when it is missing. The
|
|
59
|
+
WHAT IT NEEDS, and what to say when it is missing. The dashboard reads the whole
|
|
39
60
|
channel, so it wants an API KEY — a device credential reads one agent's inbox,
|
|
40
61
|
which is one side of a conversation rather than the whole of it. An agent
|
|
41
62
|
holding only a join token cannot run this and should use `read_inbox`, or
|
package/package.json
CHANGED
package/scripts/chat-viewer.mjs
CHANGED
|
@@ -3565,6 +3565,36 @@ async function nameChannels() {
|
|
|
3565
3565
|
);
|
|
3566
3566
|
}
|
|
3567
3567
|
|
|
3568
|
+
/**
|
|
3569
|
+
* A PORT ALREADY IN USE IS ALMOST ALWAYS THIS SAME PROGRAM.
|
|
3570
|
+
*
|
|
3571
|
+
* Without a handler, node throws the raw listen error: an "Unhandled 'error'
|
|
3572
|
+
* event" and a stack through `node:net`, which says nothing about what to do
|
|
3573
|
+
* and buries the one useful word, the port. Worse, the usual cause is that a
|
|
3574
|
+
* dashboard is ALREADY RUNNING and working -- so the reader is looking at a
|
|
3575
|
+
* crash while the thing they wanted is up, needing only the link the running
|
|
3576
|
+
* one printed. That is the same shape as the 404 this page-and-note work has
|
|
3577
|
+
* been about: a healthy system presenting as a broken one.
|
|
3578
|
+
*
|
|
3579
|
+
* Nothing is retried and no other port is chosen. Silently landing on 8900
|
|
3580
|
+
* would print a link nobody expects and leave two dashboards running, which is
|
|
3581
|
+
* how you end up reading a stale one and wondering why it never updates.
|
|
3582
|
+
*/
|
|
3583
|
+
server.on('error', (error) => {
|
|
3584
|
+
if (error.code === 'EADDRINUSE') {
|
|
3585
|
+
console.error(`Port ${port} is already in use, so this did not start.`);
|
|
3586
|
+
console.error('That is usually a dashboard already running — find the link it');
|
|
3587
|
+
console.error('printed when it started, or stop it and start this again.');
|
|
3588
|
+
console.error(`To run a second one alongside it, set PORT: PORT=${port + 1} …`);
|
|
3589
|
+
} else if (error.code === 'EACCES') {
|
|
3590
|
+
console.error(`Not allowed to listen on port ${port}. Ports below 1024 need root;`);
|
|
3591
|
+
console.error('pick a higher one with PORT.');
|
|
3592
|
+
} else {
|
|
3593
|
+
console.error(`Could not listen on port ${port}: ${error.message}`);
|
|
3594
|
+
}
|
|
3595
|
+
process.exit(1);
|
|
3596
|
+
});
|
|
3597
|
+
|
|
3568
3598
|
server.listen(port, '127.0.0.1', () => {
|
|
3569
3599
|
// The port the OS actually gave us, not the one asked for. They differ
|
|
3570
3600
|
// whenever PORT is 0 -- which is how anything automated starts a server
|