@sjawhar/claude-envoy 4.5.0 → 4.6.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/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/envoy-channel.js +26 -19
- package/package.json +2 -2
package/.omp-plugin/plugin.json
CHANGED
package/dist/envoy-channel.js
CHANGED
|
@@ -57868,9 +57868,9 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
57868
57868
|
|
|
57869
57869
|
// package.json
|
|
57870
57870
|
var name2 = "@sjawhar/claude-envoy";
|
|
57871
|
-
var version2 = "4.
|
|
57871
|
+
var version2 = "4.6.0";
|
|
57872
57872
|
var legion = {
|
|
57873
|
-
daemonApiVersion:
|
|
57873
|
+
daemonApiVersion: 160
|
|
57874
57874
|
};
|
|
57875
57875
|
|
|
57876
57876
|
// ../pi-shared/src/agent-stream.ts
|
|
@@ -58106,25 +58106,29 @@ class AgentStreamPublisher {
|
|
|
58106
58106
|
this.#fitCommands(subject);
|
|
58107
58107
|
}
|
|
58108
58108
|
setContext(subject, usage) {
|
|
58109
|
-
if (usage === undefined)
|
|
58110
|
-
|
|
58111
|
-
|
|
58112
|
-
|
|
58113
|
-
|
|
58114
|
-
|
|
58115
|
-
|
|
58116
|
-
|
|
58117
|
-
|
|
58118
|
-
|
|
58119
|
-
|
|
58120
|
-
|
|
58121
|
-
|
|
58122
|
-
|
|
58123
|
-
|
|
58109
|
+
if (usage === undefined || !(usage.contextWindow > 0)) {
|
|
58110
|
+
if (this.#context === "cleared")
|
|
58111
|
+
return;
|
|
58112
|
+
this.#context = "cleared";
|
|
58113
|
+
this.#contextJson = undefined;
|
|
58114
|
+
} else {
|
|
58115
|
+
if (typeof usage.percent !== "number" && !(usage.tokens > 0))
|
|
58116
|
+
return;
|
|
58117
|
+
const kept = {
|
|
58118
|
+
contextWindow: usage.contextWindow,
|
|
58119
|
+
tokens: usage.tokens
|
|
58120
|
+
};
|
|
58121
|
+
const json = JSON.stringify(kept);
|
|
58122
|
+
if (json === this.#contextJson)
|
|
58123
|
+
return;
|
|
58124
|
+
this.#context = kept;
|
|
58125
|
+
this.#contextJson = json;
|
|
58126
|
+
}
|
|
58124
58127
|
this.#seq += 1;
|
|
58125
58128
|
this.#contextSeq = this.#seq;
|
|
58126
|
-
if (this.watched)
|
|
58127
|
-
this.#deps.publish(subject, JSON.stringify(this.#contextFrame(
|
|
58129
|
+
if (this.watched) {
|
|
58130
|
+
this.#deps.publish(subject, JSON.stringify(this.#contextFrame(this.#context)));
|
|
58131
|
+
}
|
|
58128
58132
|
this.#fitCommands(subject);
|
|
58129
58133
|
}
|
|
58130
58134
|
#fitCommands(subject) {
|
|
@@ -58165,6 +58169,9 @@ class AgentStreamPublisher {
|
|
|
58165
58169
|
return { ...settings, kind: "settings", seq: this.#settingsSeq, v: AGENT_STREAM_PROTOCOL };
|
|
58166
58170
|
}
|
|
58167
58171
|
#contextFrame(context) {
|
|
58172
|
+
if (context === "cleared") {
|
|
58173
|
+
return { kind: "context-cleared", seq: this.#contextSeq, v: AGENT_STREAM_PROTOCOL };
|
|
58174
|
+
}
|
|
58168
58175
|
return { ...context, kind: "context", seq: this.#contextSeq, v: AGENT_STREAM_PROTOCOL };
|
|
58169
58176
|
}
|
|
58170
58177
|
record(subject, raw, streaming, dispatchMessageId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/claude-envoy",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Claude Code plugin for Legion's Envoy bus",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"AGENTS.md"
|
|
20
20
|
],
|
|
21
21
|
"legion": {
|
|
22
|
-
"daemonApiVersion":
|
|
22
|
+
"daemonApiVersion": 160
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|