@wrongstack/core 0.283.0 → 0.283.1
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/dist/hq/index.d.ts +29 -3
- package/dist/hq/index.js +22 -0
- package/dist/hq/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/mailbox-bridge/SKILL.md +33 -0
package/package.json
CHANGED
|
@@ -161,6 +161,39 @@ Every error response follows the WrongStack API convention:
|
|
|
161
161
|
- No rate limiting at the bridge layer — assume the bearer token is the
|
|
162
162
|
only credential and trust the loopback network.
|
|
163
163
|
|
|
164
|
+
## The HQ dashboard writes to the same mailbox
|
|
165
|
+
|
|
166
|
+
The HQ command center (`wstack --hq`) shares this exact `GlobalMailbox`.
|
|
167
|
+
When an operator sends a prompt from the HQ screen, it lands in the same
|
|
168
|
+
`_mailbox.jsonl` an external agent reads through `/mailbox/query` — so an
|
|
169
|
+
external agent participating via this bridge sees HQ prompts too.
|
|
170
|
+
|
|
171
|
+
HQ delivers a prompt one of two ways:
|
|
172
|
+
|
|
173
|
+
- **`POST /api/command`** on the HQ server — routes to a *connected*
|
|
174
|
+
client, which then calls `GlobalMailbox.send`.
|
|
175
|
+
- **`POST /api/mailbox-send`** on the HQ server — writes to the project
|
|
176
|
+
mailbox **directly**, so the prompt is delivered even when no agent is
|
|
177
|
+
connected. The HQ server resolves the target `projectRoot` from its
|
|
178
|
+
`SessionRegistry` (never a browser-supplied path).
|
|
179
|
+
|
|
180
|
+
Either way, the resulting mailbox message carries one of the HQ **send
|
|
181
|
+
types**, which map onto the mailbox `type` field an external agent will
|
|
182
|
+
observe:
|
|
183
|
+
|
|
184
|
+
| HQ send type | Mailbox `type` | Intent for the receiver |
|
|
185
|
+
|--------------|----------------|-------------------------|
|
|
186
|
+
| `steer` | `steer` | Change course now. |
|
|
187
|
+
| `btw` | `btw` | FYI / context — no course change demanded. |
|
|
188
|
+
| `queue` | `note` | A queued prompt; handle before the next step. |
|
|
189
|
+
| `broadcast` | `broadcast` | Sent to all agents on the project (`to: all`). |
|
|
190
|
+
|
|
191
|
+
An external agent does not need to distinguish HQ-originated messages —
|
|
192
|
+
they arrive with `from` set to `hq@<tag>` and are read, acked, and
|
|
193
|
+
completed through the same `/mailbox/query` + `/mailbox/ack` routes as
|
|
194
|
+
any other message. Filter on `from` if you want to treat HQ prompts
|
|
195
|
+
specially.
|
|
196
|
+
|
|
164
197
|
## Pairing with the external-facing skill
|
|
165
198
|
|
|
166
199
|
This internal skill describes how to run the server. The
|