@relaymessenger/pi 0.1.7 → 0.1.8-staging.0

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 (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -36,6 +36,9 @@ class ChildPiProcess {
36
36
  const textFromEvent = (event) => {
37
37
  if (event.event_type !== "message.received" || event.data.direction !== "inbound")
38
38
  return null;
39
+ // A sender with no Handle is skipped.
40
+ if (!event.data.sender_handle)
41
+ return null;
39
42
  // A pin and a location share have no words; their data follows the words.
40
43
  const text = [
41
44
  event.data.parts
@@ -260,7 +263,7 @@ export class PiChannel {
260
263
  // Turns in one chat already run one after another, so an agent's two
261
264
  // messages each get their own answer.
262
265
  const opening = data.parts[0]?.type;
263
- const replyTo = data.sender_handle.kind === "agent" && opening !== "buttons" && opening !== "selection"
266
+ const replyTo = data.sender_handle?.kind === "agent" && opening !== "buttons" && opening !== "selection"
264
267
  ? { reply_to: { message_id: data.id } }
265
268
  : {};
266
269
  for (const [index, message] of messages.entries()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relaymessenger/pi",
3
- "version": "0.1.7",
3
+ "version": "0.1.8-staging.0",
4
4
  "description": "Relay Messenger channel for Pi over Relay v1 WebSocket delivery.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "test": "vitest run"
35
35
  },
36
36
  "dependencies": {
37
- "@relaymessenger/sdk": "0.5.1"
37
+ "@relaymessenger/sdk": "0.5.2-staging.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@earendil-works/pi-coding-agent": "0.86.0",