@sjawhar/claude-envoy 6.2.1 → 6.2.2
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/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/codex-hook.js +9 -4
- package/dist/dispatch.js +9 -4
- package/dist/envoy-channel.js +14 -7
- package/dist/session-hook.js +9 -4
- package/package.json +2 -2
package/.omp-plugin/plugin.json
CHANGED
package/dist/codex-hook.js
CHANGED
|
@@ -27022,7 +27022,7 @@ var DISPATCH_BOOKKEEPING = new Set([
|
|
|
27022
27022
|
"references_changed_truncated_kinds",
|
|
27023
27023
|
"rank"
|
|
27024
27024
|
]);
|
|
27025
|
-
function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
27025
|
+
function dispatchPayloadForReader(event, sessionID, issuedAt, toReader) {
|
|
27026
27026
|
const whole = dispatchPayload(event);
|
|
27027
27027
|
const changed = event.type !== "issue.created" && isObject3(whole) && Array.isArray(whole["changed"]) ? whole["changed"] : [];
|
|
27028
27028
|
const payload = withoutEmptyFields(whole, (key, item) => changed.includes(key) || (key === "suggestion" || key === "forced") && item !== null && item !== undefined);
|
|
@@ -27035,6 +27035,7 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
27035
27035
|
case "issue_key":
|
|
27036
27036
|
return value === event.issue_key;
|
|
27037
27037
|
case "author":
|
|
27038
|
+
case "actor":
|
|
27038
27039
|
return isObject3(value) && Object.entries(value).every(([field, held]) => isDeepStrictEqual(held, actor[field]));
|
|
27039
27040
|
case "created_at": {
|
|
27040
27041
|
if (typeof value !== "string")
|
|
@@ -27045,6 +27046,8 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
27045
27046
|
case "thread_root_id":
|
|
27046
27047
|
case "answers":
|
|
27047
27048
|
return typeof replyTo === "string" && value === replyTo;
|
|
27049
|
+
case "target":
|
|
27050
|
+
return toReader && value === `session:${sessionID}`;
|
|
27048
27051
|
default:
|
|
27049
27052
|
return DISPATCH_BOOKKEEPING.has(key);
|
|
27050
27053
|
}
|
|
@@ -27244,6 +27247,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
27244
27247
|
let payloadSessions = [];
|
|
27245
27248
|
let trailer = "";
|
|
27246
27249
|
const at = inboundTimestamp(envelope.issued_at);
|
|
27250
|
+
const toReader = envelope.topic !== undefined && topicForms(envelope.topic).includes(legacyAgentSubject(sessionID));
|
|
27247
27251
|
const dispatchRendered = envelope.source === "dispatch" && envelope.payload !== undefined;
|
|
27248
27252
|
if (envelope.source === "dispatch") {
|
|
27249
27253
|
const topic = subject ?? envelope.topic;
|
|
@@ -27349,15 +27353,16 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
27349
27353
|
ask: dispatchReplyRef(frame.event, topic, compact.askId, commentPayload),
|
|
27350
27354
|
...compact.record
|
|
27351
27355
|
};
|
|
27352
|
-
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at) : undefined;
|
|
27356
|
+
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at, toReader) : undefined;
|
|
27353
27357
|
let actor = frame.event.actor;
|
|
27354
27358
|
if ("origin" in frame.event.actor) {
|
|
27355
27359
|
const { origin, ...rest } = frame.event.actor;
|
|
27356
27360
|
const title = isObject3(origin) ? origin["session_title"] : undefined;
|
|
27357
27361
|
actor = typeof title === "string" && title !== "" ? { ...rest, origin: { session_title: title } } : rest;
|
|
27358
27362
|
}
|
|
27363
|
+
const owner = dispatchOwner(frame.event, topic);
|
|
27359
27364
|
dispatchEvent = {
|
|
27360
|
-
owner:
|
|
27365
|
+
...owner === "unknown" ? {} : { owner },
|
|
27361
27366
|
type: frame.event.type,
|
|
27362
27367
|
actor,
|
|
27363
27368
|
...relation === undefined ? {} : { relation },
|
|
@@ -27412,7 +27417,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
27412
27417
|
...dispatchIssue === undefined ? [] : [dispatchIssue]
|
|
27413
27418
|
].join(", ") || undefined;
|
|
27414
27419
|
const rendered = {
|
|
27415
|
-
...
|
|
27420
|
+
...toReader ? { to: `you (${sessionID})` } : {},
|
|
27416
27421
|
from: senderLabel(envelope),
|
|
27417
27422
|
at,
|
|
27418
27423
|
id: envelope.event_id ?? "unknown",
|
package/dist/dispatch.js
CHANGED
|
@@ -32812,7 +32812,7 @@ var DISPATCH_BOOKKEEPING = new Set([
|
|
|
32812
32812
|
"references_changed_truncated_kinds",
|
|
32813
32813
|
"rank"
|
|
32814
32814
|
]);
|
|
32815
|
-
function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
32815
|
+
function dispatchPayloadForReader(event, sessionID, issuedAt, toReader) {
|
|
32816
32816
|
const whole = dispatchPayload(event);
|
|
32817
32817
|
const changed = event.type !== "issue.created" && isObject3(whole) && Array.isArray(whole["changed"]) ? whole["changed"] : [];
|
|
32818
32818
|
const payload = withoutEmptyFields(whole, (key, item) => changed.includes(key) || (key === "suggestion" || key === "forced") && item !== null && item !== undefined);
|
|
@@ -32825,6 +32825,7 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
32825
32825
|
case "issue_key":
|
|
32826
32826
|
return value === event.issue_key;
|
|
32827
32827
|
case "author":
|
|
32828
|
+
case "actor":
|
|
32828
32829
|
return isObject3(value) && Object.entries(value).every(([field, held]) => isDeepStrictEqual(held, actor[field]));
|
|
32829
32830
|
case "created_at": {
|
|
32830
32831
|
if (typeof value !== "string")
|
|
@@ -32835,6 +32836,8 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
32835
32836
|
case "thread_root_id":
|
|
32836
32837
|
case "answers":
|
|
32837
32838
|
return typeof replyTo === "string" && value === replyTo;
|
|
32839
|
+
case "target":
|
|
32840
|
+
return toReader && value === `session:${sessionID}`;
|
|
32838
32841
|
default:
|
|
32839
32842
|
return DISPATCH_BOOKKEEPING.has(key);
|
|
32840
32843
|
}
|
|
@@ -33034,6 +33037,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
33034
33037
|
let payloadSessions = [];
|
|
33035
33038
|
let trailer = "";
|
|
33036
33039
|
const at = inboundTimestamp(envelope.issued_at);
|
|
33040
|
+
const toReader = envelope.topic !== undefined && topicForms(envelope.topic).includes(legacyAgentSubject(sessionID));
|
|
33037
33041
|
const dispatchRendered = envelope.source === "dispatch" && envelope.payload !== undefined;
|
|
33038
33042
|
if (envelope.source === "dispatch") {
|
|
33039
33043
|
const topic = subject ?? envelope.topic;
|
|
@@ -33139,15 +33143,16 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
33139
33143
|
ask: dispatchReplyRef(frame.event, topic, compact.askId, commentPayload),
|
|
33140
33144
|
...compact.record
|
|
33141
33145
|
};
|
|
33142
|
-
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at) : undefined;
|
|
33146
|
+
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at, toReader) : undefined;
|
|
33143
33147
|
let actor = frame.event.actor;
|
|
33144
33148
|
if ("origin" in frame.event.actor) {
|
|
33145
33149
|
const { origin, ...rest } = frame.event.actor;
|
|
33146
33150
|
const title = isObject3(origin) ? origin["session_title"] : undefined;
|
|
33147
33151
|
actor = typeof title === "string" && title !== "" ? { ...rest, origin: { session_title: title } } : rest;
|
|
33148
33152
|
}
|
|
33153
|
+
const owner = dispatchOwner(frame.event, topic);
|
|
33149
33154
|
dispatchEvent = {
|
|
33150
|
-
owner:
|
|
33155
|
+
...owner === "unknown" ? {} : { owner },
|
|
33151
33156
|
type: frame.event.type,
|
|
33152
33157
|
actor,
|
|
33153
33158
|
...relation === undefined ? {} : { relation },
|
|
@@ -33202,7 +33207,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
33202
33207
|
...dispatchIssue === undefined ? [] : [dispatchIssue]
|
|
33203
33208
|
].join(", ") || undefined;
|
|
33204
33209
|
const rendered = {
|
|
33205
|
-
...
|
|
33210
|
+
...toReader ? { to: `you (${sessionID})` } : {},
|
|
33206
33211
|
from: senderLabel(envelope),
|
|
33207
33212
|
at,
|
|
33208
33213
|
id: envelope.event_id ?? "unknown",
|
package/dist/envoy-channel.js
CHANGED
|
@@ -53002,7 +53002,7 @@ var DISPATCH_BOOKKEEPING = new Set([
|
|
|
53002
53002
|
"references_changed_truncated_kinds",
|
|
53003
53003
|
"rank"
|
|
53004
53004
|
]);
|
|
53005
|
-
function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
53005
|
+
function dispatchPayloadForReader(event, sessionID, issuedAt, toReader) {
|
|
53006
53006
|
const whole = dispatchPayload(event);
|
|
53007
53007
|
const changed = event.type !== "issue.created" && isObject3(whole) && Array.isArray(whole["changed"]) ? whole["changed"] : [];
|
|
53008
53008
|
const payload = withoutEmptyFields(whole, (key, item) => changed.includes(key) || (key === "suggestion" || key === "forced") && item !== null && item !== undefined);
|
|
@@ -53015,6 +53015,7 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
53015
53015
|
case "issue_key":
|
|
53016
53016
|
return value === event.issue_key;
|
|
53017
53017
|
case "author":
|
|
53018
|
+
case "actor":
|
|
53018
53019
|
return isObject3(value) && Object.entries(value).every(([field, held]) => isDeepStrictEqual(held, actor[field]));
|
|
53019
53020
|
case "created_at": {
|
|
53020
53021
|
if (typeof value !== "string")
|
|
@@ -53025,6 +53026,8 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
53025
53026
|
case "thread_root_id":
|
|
53026
53027
|
case "answers":
|
|
53027
53028
|
return typeof replyTo === "string" && value === replyTo;
|
|
53029
|
+
case "target":
|
|
53030
|
+
return toReader && value === `session:${sessionID}`;
|
|
53028
53031
|
default:
|
|
53029
53032
|
return DISPATCH_BOOKKEEPING.has(key);
|
|
53030
53033
|
}
|
|
@@ -53224,6 +53227,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
53224
53227
|
let payloadSessions = [];
|
|
53225
53228
|
let trailer = "";
|
|
53226
53229
|
const at = inboundTimestamp(envelope.issued_at);
|
|
53230
|
+
const toReader = envelope.topic !== undefined && topicForms(envelope.topic).includes(legacyAgentSubject(sessionID));
|
|
53227
53231
|
const dispatchRendered = envelope.source === "dispatch" && envelope.payload !== undefined;
|
|
53228
53232
|
if (envelope.source === "dispatch") {
|
|
53229
53233
|
const topic = subject ?? envelope.topic;
|
|
@@ -53329,15 +53333,16 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
53329
53333
|
ask: dispatchReplyRef(frame.event, topic, compact.askId, commentPayload),
|
|
53330
53334
|
...compact.record
|
|
53331
53335
|
};
|
|
53332
|
-
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at) : undefined;
|
|
53336
|
+
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at, toReader) : undefined;
|
|
53333
53337
|
let actor = frame.event.actor;
|
|
53334
53338
|
if ("origin" in frame.event.actor) {
|
|
53335
53339
|
const { origin, ...rest } = frame.event.actor;
|
|
53336
53340
|
const title = isObject3(origin) ? origin["session_title"] : undefined;
|
|
53337
53341
|
actor = typeof title === "string" && title !== "" ? { ...rest, origin: { session_title: title } } : rest;
|
|
53338
53342
|
}
|
|
53343
|
+
const owner = dispatchOwner(frame.event, topic);
|
|
53339
53344
|
dispatchEvent = {
|
|
53340
|
-
owner:
|
|
53345
|
+
...owner === "unknown" ? {} : { owner },
|
|
53341
53346
|
type: frame.event.type,
|
|
53342
53347
|
actor,
|
|
53343
53348
|
...relation === undefined ? {} : { relation },
|
|
@@ -53392,7 +53397,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
53392
53397
|
...dispatchIssue === undefined ? [] : [dispatchIssue]
|
|
53393
53398
|
].join(", ") || undefined;
|
|
53394
53399
|
const rendered = {
|
|
53395
|
-
...
|
|
53400
|
+
...toReader ? { to: `you (${sessionID})` } : {},
|
|
53396
53401
|
from: senderLabel(envelope),
|
|
53397
53402
|
at,
|
|
53398
53403
|
id: envelope.event_id ?? "unknown",
|
|
@@ -66233,7 +66238,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
|
|
|
66233
66238
|
|
|
66234
66239
|
// package.json
|
|
66235
66240
|
var name2 = "@sjawhar/claude-envoy";
|
|
66236
|
-
var version2 = "6.2.
|
|
66241
|
+
var version2 = "6.2.2";
|
|
66237
66242
|
var package_default = {
|
|
66238
66243
|
name: name2,
|
|
66239
66244
|
version: version2,
|
|
@@ -66244,7 +66249,7 @@ var package_default = {
|
|
|
66244
66249
|
repository: { type: "git", url: "https://github.com/cybermonklabs/legion" },
|
|
66245
66250
|
scripts: { channel: "bun bin/envoy-channel.ts", "verify-build": "bash scripts/verify-build.sh", prepack: "bash scripts/pack-skills.sh", postpack: "bash scripts/pack-skills.sh --restore", typecheck: "bun ../contracts/scripts/gen-api.ts && bunx tsc --noEmit", test: "bun test --timeout=60000", lint: "bunx biome check src/ hooks/ scripts/" },
|
|
66246
66251
|
devDependencies: { "@biomejs/biome": "^2.3.14", "@legion/cipher-client": "workspace:*", "@legion/contracts": "workspace:*", "@legion/envoy-client": "workspace:*", "@legion/pi-shared": "workspace:*", "@legion/test-fixtures": "workspace:*", "@modelcontextprotocol/sdk": "^1.30.0", "bun-types": "latest", nats: "^2.29.2", typescript: "^5.3.0", zod: "4.3.6" },
|
|
66247
|
-
legion: { daemonApiVersion:
|
|
66252
|
+
legion: { daemonApiVersion: 279 }
|
|
66248
66253
|
};
|
|
66249
66254
|
|
|
66250
66255
|
// ../envoy-client/src/inbound-card.ts
|
|
@@ -67822,6 +67827,7 @@ var LEGION_FAILURE_CAUSES = [
|
|
|
67822
67827
|
"stale_plugin",
|
|
67823
67828
|
"prompt_retires_exhausted",
|
|
67824
67829
|
"provider_error",
|
|
67830
|
+
"cyber_policy",
|
|
67825
67831
|
"unrecorded"
|
|
67826
67832
|
];
|
|
67827
67833
|
var legionFailureCause = _enum2(LEGION_FAILURE_CAUSES);
|
|
@@ -68299,7 +68305,8 @@ var turnOutcomeFields = {
|
|
|
68299
68305
|
outcome: _enum2(["clean", "refused"]),
|
|
68300
68306
|
message: string2().optional(),
|
|
68301
68307
|
httpStatus: number2().int().min(100).max(599).optional(),
|
|
68302
|
-
unprompted: boolean2().optional()
|
|
68308
|
+
unprompted: boolean2().optional(),
|
|
68309
|
+
code: literal("cyber_policy").optional()
|
|
68303
68310
|
};
|
|
68304
68311
|
var LegionTurnOutcomeAgentRequest = strictObject({
|
|
68305
68312
|
claimToken: nonEmptyString2,
|
package/dist/session-hook.js
CHANGED
|
@@ -28170,7 +28170,7 @@ var DISPATCH_BOOKKEEPING = new Set([
|
|
|
28170
28170
|
"references_changed_truncated_kinds",
|
|
28171
28171
|
"rank"
|
|
28172
28172
|
]);
|
|
28173
|
-
function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
28173
|
+
function dispatchPayloadForReader(event, sessionID, issuedAt, toReader) {
|
|
28174
28174
|
const whole = dispatchPayload(event);
|
|
28175
28175
|
const changed = event.type !== "issue.created" && isObject3(whole) && Array.isArray(whole["changed"]) ? whole["changed"] : [];
|
|
28176
28176
|
const payload = withoutEmptyFields(whole, (key, item) => changed.includes(key) || (key === "suggestion" || key === "forced") && item !== null && item !== undefined);
|
|
@@ -28183,6 +28183,7 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
28183
28183
|
case "issue_key":
|
|
28184
28184
|
return value === event.issue_key;
|
|
28185
28185
|
case "author":
|
|
28186
|
+
case "actor":
|
|
28186
28187
|
return isObject3(value) && Object.entries(value).every(([field, held]) => isDeepStrictEqual(held, actor[field]));
|
|
28187
28188
|
case "created_at": {
|
|
28188
28189
|
if (typeof value !== "string")
|
|
@@ -28193,6 +28194,8 @@ function dispatchPayloadForReader(event, sessionID, issuedAt) {
|
|
|
28193
28194
|
case "thread_root_id":
|
|
28194
28195
|
case "answers":
|
|
28195
28196
|
return typeof replyTo === "string" && value === replyTo;
|
|
28197
|
+
case "target":
|
|
28198
|
+
return toReader && value === `session:${sessionID}`;
|
|
28196
28199
|
default:
|
|
28197
28200
|
return DISPATCH_BOOKKEEPING.has(key);
|
|
28198
28201
|
}
|
|
@@ -28392,6 +28395,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
28392
28395
|
let payloadSessions = [];
|
|
28393
28396
|
let trailer = "";
|
|
28394
28397
|
const at = inboundTimestamp(envelope.issued_at);
|
|
28398
|
+
const toReader = envelope.topic !== undefined && topicForms(envelope.topic).includes(legacyAgentSubject(sessionID));
|
|
28395
28399
|
const dispatchRendered = envelope.source === "dispatch" && envelope.payload !== undefined;
|
|
28396
28400
|
if (envelope.source === "dispatch") {
|
|
28397
28401
|
const topic = subject ?? envelope.topic;
|
|
@@ -28497,15 +28501,16 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
28497
28501
|
ask: dispatchReplyRef(frame.event, topic, compact.askId, commentPayload),
|
|
28498
28502
|
...compact.record
|
|
28499
28503
|
};
|
|
28500
|
-
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at) : undefined;
|
|
28504
|
+
const payload = compactRecord === undefined ? dispatchPayloadForReader(frame.event, sessionID, envelope.issued_at, toReader) : undefined;
|
|
28501
28505
|
let actor = frame.event.actor;
|
|
28502
28506
|
if ("origin" in frame.event.actor) {
|
|
28503
28507
|
const { origin, ...rest } = frame.event.actor;
|
|
28504
28508
|
const title = isObject3(origin) ? origin["session_title"] : undefined;
|
|
28505
28509
|
actor = typeof title === "string" && title !== "" ? { ...rest, origin: { session_title: title } } : rest;
|
|
28506
28510
|
}
|
|
28511
|
+
const owner = dispatchOwner(frame.event, topic);
|
|
28507
28512
|
dispatchEvent = {
|
|
28508
|
-
owner:
|
|
28513
|
+
...owner === "unknown" ? {} : { owner },
|
|
28509
28514
|
type: frame.event.type,
|
|
28510
28515
|
actor,
|
|
28511
28516
|
...relation === undefined ? {} : { relation },
|
|
@@ -28560,7 +28565,7 @@ function renderInbound(raw, sessionID, subject, wholeBody) {
|
|
|
28560
28565
|
...dispatchIssue === undefined ? [] : [dispatchIssue]
|
|
28561
28566
|
].join(", ") || undefined;
|
|
28562
28567
|
const rendered = {
|
|
28563
|
-
...
|
|
28568
|
+
...toReader ? { to: `you (${sessionID})` } : {},
|
|
28564
28569
|
from: senderLabel(envelope),
|
|
28565
28570
|
at,
|
|
28566
28571
|
id: envelope.event_id ?? "unknown",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/claude-envoy",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Claude Code plugin for Legion's Envoy bus",
|
|
6
6
|
"type": "module",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"zod": "4.3.6"
|
|
46
46
|
},
|
|
47
47
|
"legion": {
|
|
48
|
-
"daemonApiVersion":
|
|
48
|
+
"daemonApiVersion": 279
|
|
49
49
|
}
|
|
50
50
|
}
|