@santori/station 0.9.8 → 0.9.9

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/cli.js CHANGED
@@ -87,10 +87,11 @@ const HELP = `station: an agent's way into Station rooms
87
87
  station seats | doctor | daemon | --version
88
88
  station mcp serve these actions as tools (Model Context Protocol, stdio)
89
89
  station webhook add <room> --url <https url> [--agent "<name>"] [--header-name Authorization]
90
- [--on message,approval,asked] [--debounce 30] [--wakes-per-day 60]
90
+ [--sign] [--on message,approval,asked] [--debounce 30] [--wakes-per-day 60]
91
91
  wake your hosted agent (such as a Grok Bot routine) with a POST
92
92
  to a URL when something in the room is for it.
93
93
  Run it yourself, signed in; it asks for the receiver's key.
94
+ With --sign, set the signing secret on the receiver before testing.
94
95
  station webhook list|test|remove <room> [<webhook id>]
95
96
 
96
97
  Run these from any agent's own shell. Claude Code and Codex receive room
package/dist/webhooks.js CHANGED
@@ -77,12 +77,12 @@ export function webhookLines(hooks) {
77
77
  const header = h.header ? `, header ${h.header.name}: ${h.header.value}` : "";
78
78
  const debounce = h.debounce_seconds ? `, debounce ${h.debounce_seconds}s` : "";
79
79
  const wakes = h.wakes_per_day ? `, ${h.wakes_today ?? 0} of ${h.wakes_per_day} wakes today` : "";
80
- return `${h.id} ${h.agent ?? h.participant_id} → ${h.url} on ${h.on.join(",")}${debounce}${wakes}${header}; ${last}`;
80
+ return `${h.id} ${h.agent ?? h.participant_id} → ${h.url} on ${h.on.join(",")}${debounce}${wakes}${header}${h.signed ? ", signed" : ""}; ${last}`;
81
81
  });
82
82
  }
83
83
  export async function webhookCommand(credentials, args, flag, out, me) {
84
84
  const [sub, room, id] = args;
85
- const usage = `${me} webhook add <room> --url <https url> [--agent "<name>"] [--header-name Authorization] [--on message,approval,asked] [--debounce 30] [--wakes-per-day 60]
85
+ const usage = `${me} webhook add <room> --url <https url> [--agent "<name>"] [--header-name Authorization] [--sign] [--on message,approval,asked] [--debounce 30] [--wakes-per-day 60]
86
86
  ${me} webhook list <room>
87
87
  ${me} webhook test <room> <webhook id>
88
88
  ${me} webhook remove <room> <webhook id>`;
@@ -109,9 +109,21 @@ ${me} webhook remove <room> <webhook id>`;
109
109
  }
110
110
  const debounce = flag("debounce");
111
111
  const wakes = flag("wakes-per-day");
112
- const { webhook } = await call(relayUrl, base, auth, {
113
- body: { participant: agent.id, url, header, on: flag("on")?.split(","), debounce_seconds: debounce === undefined ? undefined : Number(debounce.replace(/s$/, "")), wakes_per_day: wakes === undefined ? undefined : Number(wakes) },
112
+ const sign = flag("sign");
113
+ if (sign !== undefined && sign !== "true" && sign !== "false")
114
+ throw new Usage("Use --sign to generate a signing secret.");
115
+ const { webhook, signing_secret } = await call(relayUrl, base, auth, {
116
+ body: { participant: agent.id, url, header, sign: sign === "true" ? true : undefined, on: flag("on")?.split(","), debounce_seconds: debounce === undefined ? undefined : Number(debounce.replace(/s$/, "")), wakes_per_day: wakes === undefined ? undefined : Number(wakes) },
114
117
  });
118
+ if (sign === "true") {
119
+ if (!signing_secret) {
120
+ await call(relayUrl, `${base}/${webhook.id}`, auth, { method: "DELETE" });
121
+ throw new Error("The relay did not return a signing secret. Try again on a relay that supports signing.");
122
+ }
123
+ out(`Signing secret (shown once): ${signing_secret}`);
124
+ out(`Set this secret on the receiver, then run: ${me} webhook test ${roomId} ${webhook.id}`);
125
+ return 0;
126
+ }
115
127
  // Send the test now, so the person learns here whether the key works. A
116
128
  // webhook the receiver refuses is removed: it would only fail on every wake.
117
129
  const result = await call(relayUrl, `${base}/${webhook.id}/test`, auth, { body: {} });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@santori/station",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
4
4
  "description": "Meeting rooms for your agents. They can share context with each other and work together. This CLI brings any agent into a Station room. In Claude Code and Codex, messages from the room arrive in the session on their own.",
5
5
  "keywords": [
6
6
  "station",