@sjawhar/pi-legion-envoy 5.27.0 → 5.28.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.
- package/dist/envoy.js +12 -2
- package/dist/legion.js +1 -1
- package/dist/skills/envoy/SKILL.md +1 -1
- package/package.json +1 -1
package/dist/envoy.js
CHANGED
|
@@ -31769,6 +31769,16 @@ function dispatchPayload(event) {
|
|
|
31769
31769
|
const parsed = schema.safeParse(event.payload);
|
|
31770
31770
|
return parsed.success ? parsed.data : event.payload;
|
|
31771
31771
|
}
|
|
31772
|
+
function hasTarget(value) {
|
|
31773
|
+
return isObject2(value) && "target" in value;
|
|
31774
|
+
}
|
|
31775
|
+
function dispatchPayloadForReader(event, sessionID) {
|
|
31776
|
+
const payload = dispatchPayload(event);
|
|
31777
|
+
if (!hasTarget(payload))
|
|
31778
|
+
return payload;
|
|
31779
|
+
const target = payload.target;
|
|
31780
|
+
return target === `session:${sessionID}` ? { ...payload, target: `you (${target})` } : payload;
|
|
31781
|
+
}
|
|
31772
31782
|
function dispatchAskQuestion(comment) {
|
|
31773
31783
|
return comment?.ask_question !== undefined && comment.ask_question !== "" ? textHead(comment.ask_question) : undefined;
|
|
31774
31784
|
}
|
|
@@ -31994,7 +32004,7 @@ function renderInbound(raw, sessionID, subject2) {
|
|
|
31994
32004
|
owner: dispatchOwner(frame.event, topic),
|
|
31995
32005
|
type: frame.event.type,
|
|
31996
32006
|
actor: frame.event.actor,
|
|
31997
|
-
...compactRecord ?? { payload:
|
|
32007
|
+
...compactRecord ?? { payload: dispatchPayloadForReader(frame.event, sessionID) }
|
|
31998
32008
|
};
|
|
31999
32009
|
dispatchActor = frame.event.actor;
|
|
32000
32010
|
} else {
|
|
@@ -32035,7 +32045,7 @@ function renderInbound(raw, sessionID, subject2) {
|
|
|
32035
32045
|
...dispatchIssue === undefined ? [] : [dispatchIssue]
|
|
32036
32046
|
].join(", ") || undefined;
|
|
32037
32047
|
const rendered = {
|
|
32038
|
-
...envelope2.topic === agentSubject(sessionID) ? { to: `you (${sessionID
|
|
32048
|
+
...envelope2.topic === agentSubject(sessionID) ? { to: `you (${sessionID})` } : {},
|
|
32039
32049
|
from: senderLabel(envelope2),
|
|
32040
32050
|
at: inboundTimestamp(envelope2.issued_at),
|
|
32041
32051
|
id: envelope2.event_id ?? "unknown",
|
package/dist/legion.js
CHANGED
|
@@ -33611,7 +33611,7 @@ import { logger } from "@oh-my-pi/pi-utils";
|
|
|
33611
33611
|
// package.json
|
|
33612
33612
|
var package_default = {
|
|
33613
33613
|
name: "@sjawhar/pi-legion-envoy",
|
|
33614
|
-
version: "5.
|
|
33614
|
+
version: "5.28.0",
|
|
33615
33615
|
type: "module",
|
|
33616
33616
|
omp: {
|
|
33617
33617
|
extensions: [
|
|
@@ -45,7 +45,7 @@ Envoy renders an annotated delivery before its source summary and complete paylo
|
|
|
45
45
|
|
|
46
46
|
```text
|
|
47
47
|
envoy:
|
|
48
|
-
to: you (
|
|
48
|
+
to: you (ses_example_recipient)
|
|
49
49
|
from: 01a0bbbb-cccc-7ddd-eeee-0123456789ab (Reviewer)
|
|
50
50
|
at: "2026-09-07T04:41:12Z"
|
|
51
51
|
id: agent-message-2
|