@sjawhar/pi-legion-envoy 1.53.0 → 1.53.1
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/README.md +5 -4
- package/dist/envoy.js +4 -13
- package/dist/legion.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,10 +7,11 @@ in-flight turn instead of queueing behind it).
|
|
|
7
7
|
|
|
8
8
|
Normal topic subscriptions are direct NATS subscriptions owned by this extension. A role claim is
|
|
9
9
|
different: the listener arbitrates the core-NATS role lane for the current live holder, then sends
|
|
10
|
-
a receipt-backed request with the original role topic to the holder's direct agent subject.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
a receipt-backed request with the original role topic to the holder's direct agent subject.
|
|
11
|
+
`envoy_unsubscribe` manages only normal topic subscriptions; it does not relinquish a held role.
|
|
12
|
+
The agent pump replies after accepting the envelope; without a receipt within two seconds the
|
|
13
|
+
listener emits a `delivery_failed` exception. Role messages are live only; they are not retained
|
|
14
|
+
for a later claimant.
|
|
14
15
|
|
|
15
16
|
`envoy_list()` shows the union of the local subscriptions and the listener's persisted interest
|
|
16
17
|
registry. Each reported interest identifies whether it is `live`, `registry`, or `both`, so
|
package/dist/envoy.js
CHANGED
|
@@ -34775,10 +34775,6 @@ function envoyExtension(pi) {
|
|
|
34775
34775
|
}
|
|
34776
34776
|
return true;
|
|
34777
34777
|
};
|
|
34778
|
-
const releaseClaimedRole = () => {
|
|
34779
|
-
claimedRoleTopic = undefined;
|
|
34780
|
-
pi.appendEntry(ROLE_CLAIM_ENTRY, { role: null });
|
|
34781
|
-
};
|
|
34782
34778
|
const transcriptClaimedRole = (branch) => {
|
|
34783
34779
|
let role;
|
|
34784
34780
|
for (const entry of branch) {
|
|
@@ -35071,17 +35067,12 @@ Warnings: ${warnings.join("; ")}`, {
|
|
|
35071
35067
|
}
|
|
35072
35068
|
case EnvoyToolOperation.unsubscribe: {
|
|
35073
35069
|
const inbox = agentSubject(sessionID);
|
|
35074
|
-
const targets = topicsFor(parameters, [
|
|
35075
|
-
|
|
35076
|
-
|
|
35077
|
-
|
|
35078
|
-
const removed = targets.filter((topic) => closeIntentionally(topic) || topic === claimedRoleTopic);
|
|
35079
|
-
const releasingRole = claimedRoleTopic !== undefined && removed.includes(claimedRoleTopic);
|
|
35080
|
-
const registrationError = removed.length === 0 ? undefined : await client.unsubscribe({ sessionID, topics: removed }).then(registerSession).then(() => {
|
|
35070
|
+
const targets = topicsFor(parameters, [...subscriptions.keys()]).filter((topic) => topic !== inbox);
|
|
35071
|
+
const removed = targets.filter(closeIntentionally);
|
|
35072
|
+
const registryRemoved = removed.filter((topic) => !topic.startsWith(ROLE_TOPIC_PREFIX));
|
|
35073
|
+
const registrationError = registryRemoved.length === 0 ? undefined : await client.unsubscribe({ sessionID, topics: registryRemoved }).then(registerSession).then(() => {
|
|
35081
35074
|
return;
|
|
35082
35075
|
}, messageFor);
|
|
35083
|
-
if (releasingRole && registrationError === undefined)
|
|
35084
|
-
releaseClaimedRole();
|
|
35085
35076
|
return toolSuccess(`Unsubscribed: ${removed.join(", ") || "(none)"}`, {
|
|
35086
35077
|
removed,
|
|
35087
35078
|
...registrationError === undefined ? {} : { registrationError }
|
package/dist/legion.js
CHANGED
|
@@ -16145,7 +16145,7 @@ import { logger } from "@oh-my-pi/pi-utils";
|
|
|
16145
16145
|
// package.json
|
|
16146
16146
|
var package_default = {
|
|
16147
16147
|
name: "@sjawhar/pi-legion-envoy",
|
|
16148
|
-
version: "1.53.
|
|
16148
|
+
version: "1.53.1",
|
|
16149
16149
|
type: "module",
|
|
16150
16150
|
omp: {
|
|
16151
16151
|
extensions: [
|