@sjawhar/pi-envoy 17.30.3 → 17.31.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/README.md +7 -6
- package/dist/dispatch.js +9 -3
- package/dist/envoy.js +37 -14
- package/dist/skills/envoy/SKILL.md +7 -4
- package/dist/skills/envoy/references/deliveries.md +2 -1
- package/dist/skills/envoy/references/legion.md +10 -1
- package/dist/skills/envoy/references/roles.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,12 +20,13 @@ The stream captures every agent subject, so it stores each forward there, and th
|
|
|
20
20
|
consumer delivers it once — also after a restart or a dropped connection (below). No session
|
|
21
21
|
answers a receipt: a message sent through the listener's `POST /v1/messages/publish` waits only
|
|
22
22
|
for the stream's acknowledgement that it stored the forward, and answers the sender with an error
|
|
23
|
-
once four seconds pass without one. A role message no live holder can take is kept for
|
|
24
|
-
session
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
once four seconds pass without one. A role message no live holder can take is kept for one
|
|
24
|
+
hour: the next session to hold the role live in that hour is handed it once, and the publish
|
|
25
|
+
answers 202 with `kept_until`, the end of that hour. If no session takes it, the listener drops
|
|
26
|
+
it and sends a dead letter, an Envoy card that names it, to the session the publish named as its
|
|
27
|
+
source, unless it drops it more than an hour late. A `notifications.team.<name>` topic is stored
|
|
28
|
+
like any other followed topic; every other `notifications.` topic the stream does not capture is
|
|
29
|
+
refused by name, at publish and at subscribe, because no session would ever be delivered it.
|
|
29
30
|
|
|
30
31
|
This extension claims the role for the session the host has open, and every automatic claim is
|
|
31
32
|
soft: it names the session it continues, which is a fork's or branch's parent, or the session
|
package/dist/dispatch.js
CHANGED
|
@@ -28694,7 +28694,8 @@ var EnvelopeResponseSchema = EnvelopeSchema.extend({
|
|
|
28694
28694
|
});
|
|
28695
28695
|
var PublishResponseSchema = EnvelopeResponseSchema.extend({
|
|
28696
28696
|
kept: boolean2().optional(),
|
|
28697
|
-
kept_reason: _enum2(["unclaimed", "holder_lapsed"]).optional()
|
|
28697
|
+
kept_reason: _enum2(["unclaimed", "holder_lapsed"]).optional(),
|
|
28698
|
+
kept_until: number2().int().optional()
|
|
28698
28699
|
});
|
|
28699
28700
|
var DeliveryRefusalSchema = object({
|
|
28700
28701
|
mode: string2(),
|
|
@@ -28937,7 +28938,7 @@ function createEnvoyClient(config) {
|
|
|
28937
28938
|
confirmed: response.recipient !== undefined,
|
|
28938
28939
|
recipientState: response.recipient_state ?? "live",
|
|
28939
28940
|
state: response.state === "stopped" ? "stopped" : "connected",
|
|
28940
|
-
...response.last_seen
|
|
28941
|
+
...lastSeenOf(response.last_seen),
|
|
28941
28942
|
duplicate: response.duplicate === true
|
|
28942
28943
|
};
|
|
28943
28944
|
},
|
|
@@ -28957,10 +28958,12 @@ function createEnvoyClient(config) {
|
|
|
28957
28958
|
envelope: response,
|
|
28958
28959
|
...response.holder === undefined ? {} : { holder: response.holder },
|
|
28959
28960
|
...response.holder_state === undefined ? {} : { holderState: response.holder_state },
|
|
28961
|
+
...lastSeenOf(response.last_seen),
|
|
28960
28962
|
...response.recipients === undefined ? {} : { recipients: response.recipients },
|
|
28961
28963
|
...response.recipients_connected === undefined ? {} : { recipientsConnected: response.recipients_connected },
|
|
28962
28964
|
...response.kept === undefined ? {} : { kept: response.kept },
|
|
28963
|
-
...response.kept_reason === undefined ? {} : { keptReason: response.kept_reason }
|
|
28965
|
+
...response.kept_reason === undefined ? {} : { keptReason: response.kept_reason },
|
|
28966
|
+
...response.kept_until === undefined ? {} : { keptUntil: response.kept_until }
|
|
28964
28967
|
};
|
|
28965
28968
|
},
|
|
28966
28969
|
unregisterSession: async (input) => {
|
|
@@ -29027,6 +29030,9 @@ function messageMetadata(input) {
|
|
|
29027
29030
|
function sourceSession(sessionID) {
|
|
29028
29031
|
return sessionID === undefined || sessionID === "" ? {} : { source_session: sessionID };
|
|
29029
29032
|
}
|
|
29033
|
+
function lastSeenOf(lastSeen) {
|
|
29034
|
+
return lastSeen === undefined || lastSeen <= 0 ? {} : { lastSeen };
|
|
29035
|
+
}
|
|
29030
29036
|
|
|
29031
29037
|
// ../envoy-client/src/dispatch-cli.ts
|
|
29032
29038
|
var OK = 0;
|
package/dist/envoy.js
CHANGED
|
@@ -39552,7 +39552,8 @@ var EnvelopeResponseSchema = EnvelopeSchema.extend({
|
|
|
39552
39552
|
});
|
|
39553
39553
|
var PublishResponseSchema = EnvelopeResponseSchema.extend({
|
|
39554
39554
|
kept: boolean2().optional(),
|
|
39555
|
-
kept_reason: _enum2(["unclaimed", "holder_lapsed"]).optional()
|
|
39555
|
+
kept_reason: _enum2(["unclaimed", "holder_lapsed"]).optional(),
|
|
39556
|
+
kept_until: number2().int().optional()
|
|
39556
39557
|
});
|
|
39557
39558
|
var DeliveryRefusalSchema = object({
|
|
39558
39559
|
mode: string2(),
|
|
@@ -39827,7 +39828,7 @@ function createEnvoyClient(config) {
|
|
|
39827
39828
|
confirmed: response.recipient !== undefined,
|
|
39828
39829
|
recipientState: response.recipient_state ?? "live",
|
|
39829
39830
|
state: response.state === "stopped" ? "stopped" : "connected",
|
|
39830
|
-
...response.last_seen
|
|
39831
|
+
...lastSeenOf(response.last_seen),
|
|
39831
39832
|
duplicate: response.duplicate === true
|
|
39832
39833
|
};
|
|
39833
39834
|
},
|
|
@@ -39847,10 +39848,12 @@ function createEnvoyClient(config) {
|
|
|
39847
39848
|
envelope: response,
|
|
39848
39849
|
...response.holder === undefined ? {} : { holder: response.holder },
|
|
39849
39850
|
...response.holder_state === undefined ? {} : { holderState: response.holder_state },
|
|
39851
|
+
...lastSeenOf(response.last_seen),
|
|
39850
39852
|
...response.recipients === undefined ? {} : { recipients: response.recipients },
|
|
39851
39853
|
...response.recipients_connected === undefined ? {} : { recipientsConnected: response.recipients_connected },
|
|
39852
39854
|
...response.kept === undefined ? {} : { kept: response.kept },
|
|
39853
|
-
...response.kept_reason === undefined ? {} : { keptReason: response.kept_reason }
|
|
39855
|
+
...response.kept_reason === undefined ? {} : { keptReason: response.kept_reason },
|
|
39856
|
+
...response.kept_until === undefined ? {} : { keptUntil: response.kept_until }
|
|
39854
39857
|
};
|
|
39855
39858
|
},
|
|
39856
39859
|
unregisterSession: async (input) => {
|
|
@@ -39917,6 +39920,9 @@ function messageMetadata(input) {
|
|
|
39917
39920
|
function sourceSession(sessionID) {
|
|
39918
39921
|
return sessionID === undefined || sessionID === "" ? {} : { source_session: sessionID };
|
|
39919
39922
|
}
|
|
39923
|
+
function lastSeenOf(lastSeen) {
|
|
39924
|
+
return lastSeen === undefined || lastSeen <= 0 ? {} : { lastSeen };
|
|
39925
|
+
}
|
|
39920
39926
|
|
|
39921
39927
|
// ../envoy-client/src/consumer-delivery.ts
|
|
39922
39928
|
var DELIVER_SUBJECT_PREFIX = "notifications.envoy.deliver.";
|
|
@@ -46758,7 +46764,7 @@ var envoyToolSpecs = [
|
|
|
46758
46764
|
},
|
|
46759
46765
|
{
|
|
46760
46766
|
name: "envoy_publish",
|
|
46761
|
-
description: `Publish an Envoy message to a notifications. topic. ${STORED_DELIVERY} A role or built-in topic is delivered as its guide says. A role message has three possible answers. First, a session holds the role, and the stream stores the forward for that holder's consumer. Its 200 says the stream stored it
|
|
46767
|
+
description: `Publish an Envoy message to a notifications. topic. ${STORED_DELIVERY} A role or built-in topic is delivered as its guide says. A role message has three possible answers. First, a live session holds the role, and the stream stores the forward for that holder's consumer. Its 200 says the stream stored it. It does not say that the holder read it. It names the holder and the state the listener resolved the holder in. Second, no live session holds the role: nobody claims it, or its holder is unresponsive or gone. The listener then keeps the message for one hour. This is a success. The result says that the listener kept the message, and its kept_until is the time that hour ends. For a holder that is not live, the result also names that holder and its state. The next session to hold the role live before kept_until gets the message. That can be the same holder when it answers again. If no session takes the message by kept_until, Envoy drops it. If the publish named your session as its source, Envoy then sends your session a message that names the dropped message, unless it dropped it more than an hour late. Third, the listener keeps nothing and errs, which tells you to reach the agent some other way: the holder refuses the message, or the forward is not stored within four seconds. A team topic (such as notifications.team.deploy-squad.all) is stored like every other, so a session subscribed to it that was away still receives it when it returns, and one that subscribes after you publish does not. A notifications. topic no stream subject captures is refused by name: nothing would store it. ${PUBLISH_COUNTS} ${SESSION_STATE_GUIDE} ${DELIVERY_CONTRACT}`,
|
|
46762
46768
|
arguments: (schema) => ({ topic: schema.string(), ...messageArguments(schema) }),
|
|
46763
46769
|
operation: EnvoyToolOperation.publish
|
|
46764
46770
|
},
|
|
@@ -46821,7 +46827,7 @@ function sendConfirmationText(result) {
|
|
|
46821
46827
|
const state = result.recipientState === "unresponsive" ? `unresponsive${since}, so it is stored until that session answers; ${UNRESPONSIVE_RULE}` : result.recipientState;
|
|
46822
46828
|
return `sent ${result.envelope.event_id} to ${result.recipient} (${state})${result.confirmed ? "" : " (recipient unconfirmed by listener)"}`;
|
|
46823
46829
|
}
|
|
46824
|
-
function publishConfirmationText(result) {
|
|
46830
|
+
function publishConfirmationText(result, options) {
|
|
46825
46831
|
const published = `published ${result.envelope.event_id}`;
|
|
46826
46832
|
if (result.recipients === 0) {
|
|
46827
46833
|
return `${published}; no other session subscribes to ${result.envelope.topic}, so no other session gets it`;
|
|
@@ -46833,13 +46839,35 @@ function publishConfirmationText(result) {
|
|
|
46833
46839
|
}
|
|
46834
46840
|
const sentences = [`${published}.`];
|
|
46835
46841
|
if (result.kept === true) {
|
|
46836
|
-
|
|
46842
|
+
const lapsed = result.keptReason === "holder_lapsed";
|
|
46843
|
+
const holder = result.holder === undefined ? "" : ` ${result.holder}`;
|
|
46844
|
+
const why = lapsed ? `its holder${holder} is ${result.holderState ?? "not live"}, so no live session holds the role now` : "no live session holds the role now";
|
|
46845
|
+
const until = result.keptUntil === undefined ? "" : ` until ${new Date(result.keptUntil).toISOString()}`;
|
|
46846
|
+
sentences.push(`Envoy kept it for the role${until}: ${why}.`);
|
|
46847
|
+
sentences.push(result.keptUntil === undefined ? "Envoy did not say until when it keeps it." : "The next session to hold the role before then gets it.");
|
|
46848
|
+
if (result.keptUntil !== undefined && options.senderNamed) {
|
|
46849
|
+
sentences.push("If none does, Envoy drops it and sends you a message that names it, unless it drops it more than an hour late.");
|
|
46850
|
+
}
|
|
46851
|
+
if (lapsed && result.holderState === "unresponsive")
|
|
46852
|
+
sentences.push(UNRESPONSIVE_RULE);
|
|
46837
46853
|
} else if (result.holder !== undefined) {
|
|
46838
46854
|
const state = result.holderState === undefined ? "" : ` (${result.holderState})`;
|
|
46839
46855
|
sentences.push(`Its role holder is ${result.holder}${state}.`);
|
|
46840
46856
|
}
|
|
46841
46857
|
return sentences.join(" ");
|
|
46842
46858
|
}
|
|
46859
|
+
function publishResultDetails(result) {
|
|
46860
|
+
return {
|
|
46861
|
+
...result.holder === undefined ? {} : { holder: result.holder },
|
|
46862
|
+
...result.holderState === undefined ? {} : { holder_state: result.holderState },
|
|
46863
|
+
...result.lastSeen === undefined ? {} : { last_seen: result.lastSeen },
|
|
46864
|
+
...result.recipients === undefined ? {} : { recipients: result.recipients },
|
|
46865
|
+
...result.recipientsConnected === undefined ? {} : { recipients_connected: result.recipientsConnected },
|
|
46866
|
+
...result.kept === undefined ? {} : { kept: result.kept },
|
|
46867
|
+
...result.keptReason === undefined ? {} : { kept_reason: result.keptReason },
|
|
46868
|
+
...result.keptUntil === undefined ? {} : { kept_until: result.keptUntil }
|
|
46869
|
+
};
|
|
46870
|
+
}
|
|
46843
46871
|
function sessionsOnMachine(sessions, machine) {
|
|
46844
46872
|
if (machine === undefined || machine === "")
|
|
46845
46873
|
return sessions;
|
|
@@ -47694,7 +47722,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
47694
47722
|
|
|
47695
47723
|
// package.json
|
|
47696
47724
|
var name = "@sjawhar/pi-envoy";
|
|
47697
|
-
var version2 = "17.
|
|
47725
|
+
var version2 = "17.31.0";
|
|
47698
47726
|
var package_default = {
|
|
47699
47727
|
name,
|
|
47700
47728
|
version: version2,
|
|
@@ -55716,17 +55744,12 @@ Kept (they last while this session holds role ${registrationState.heldRole()}):
|
|
|
55716
55744
|
...toMessageMetadata(parameters)
|
|
55717
55745
|
});
|
|
55718
55746
|
const undelivered = result.kept !== true && source !== "" && result.holder === source && inSubagent;
|
|
55719
|
-
const published = publishConfirmationText(result);
|
|
55747
|
+
const published = publishConfirmationText(result, { senderNamed: source !== "" });
|
|
55720
55748
|
return toolSuccess(undelivered ? `${published}
|
|
55721
55749
|
Not delivered: that holder is the session this subagent sends as, and the listener drops a message whose source session is its recipient, so the agent that spawned you did not receive it. Reach it with a write to its agent:// address instead.` : published, {
|
|
55722
55750
|
event_id: result.envelope.event_id,
|
|
55723
55751
|
topic,
|
|
55724
|
-
...result
|
|
55725
|
-
...result.holderState === undefined ? {} : { holder_state: result.holderState },
|
|
55726
|
-
...result.recipients === undefined ? {} : { recipients: result.recipients },
|
|
55727
|
-
...result.recipientsConnected === undefined ? {} : { recipients_connected: result.recipientsConnected },
|
|
55728
|
-
...result.kept === undefined ? {} : { kept: result.kept },
|
|
55729
|
-
...result.keptReason === undefined ? {} : { kept_reason: result.keptReason },
|
|
55752
|
+
...publishResultDetails(result),
|
|
55730
55753
|
...undelivered ? { undelivered_echo: true } : {}
|
|
55731
55754
|
});
|
|
55732
55755
|
}
|
|
@@ -135,10 +135,13 @@ Every topic starts with `notifications.`.
|
|
|
135
135
|
- Publish to a role with `envoy_publish(topic="notifications.role.<role>", ...)`;
|
|
136
136
|
never subscribe to a role topic, because the listener forwards a role message to its holder only.
|
|
137
137
|
A publish returns once Envoy's stream has stored the forward for the holder, with the live `holder` and its `holder_state`.
|
|
138
|
-
When
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
When no live session holds the role, Envoy keeps the message for one hour: the answer says it was kept, and its `kept_until` is the time that hour ends.
|
|
139
|
+
That holds when nobody claims the role, and when its holder is not `live`: the answer then also names the holder, its `holder_state` (`unresponsive` or `gone`) and its `last_seen`.
|
|
140
|
+
The next session to hold the role live before `kept_until` is handed the message once, and that can be the same holder when it answers again.
|
|
141
|
+
If no session takes it by then, Envoy drops it, and when your publish named your session, sends your session a message that names it, unless it dropped it more than an hour late.
|
|
142
|
+
An `unresponsive` holder is not dead, so start no replacement for it and take nothing from it.
|
|
143
|
+
A forward the stream did not store for a live holder within about 4 seconds errs, and you see that error after about 8 seconds, because the client tries once more.
|
|
144
|
+
Neither a kept answer nor an error releases the role's claim: a holder whose `holder_state` is `unresponsive` keeps its role.
|
|
142
145
|
`envoy_role_get(role=...)` finds the holder first.
|
|
143
146
|
The forward is kept on the holder's inbox, so the holder's session gets it once from its own durable consumer, also after a restart, a reconnect, or while it was not running.
|
|
144
147
|
From a shell with no tool device, read the holder with `envoy role <role>` where sjawhar/dotfiles' `scripts/envoy` is on the PATH, and in a Legion pod, which has no `envoy` command, with `curl -sS -H "Authorization: Bearer $(cat "$ENVOY_TOKEN_FILE")" "$ENVOY_URL/v1/roles/<role>" | jq -r '.holder // .reason // .error'`, which prints the holder's session id, `unclaimed` for a role nobody holds, or the error of a refused read, such as `unauthorized` for a bad token.
|
|
@@ -110,7 +110,8 @@ It depends on where a session takes its deliveries, not on whether the topic is
|
|
|
110
110
|
the listener finds the live holder and forwards the message to it, and drops the message when that holder is the message's source session.
|
|
111
111
|
The stream keeps the forward on the holder's inbox, so the holder's session gets it once, also after a restart or while it was not running.
|
|
112
112
|
No session answers a receipt for one: a publish returns once the stream stored the forward.
|
|
113
|
-
A role message no live holder can take is kept for
|
|
113
|
+
A role message no live holder can take is kept for one hour, until the `kept_until` the publish answers with, and the next session to hold the role live in that hour is handed it once.
|
|
114
|
+
If no session takes it, Envoy drops it, and when the publish named a sender session, Envoy sends that session a message that names it, unless it dropped it more than an hour late.
|
|
114
115
|
|
|
115
116
|
- Every other `notifications.` topic, one no source uses and the stream does not keep, is refused by name
|
|
116
117
|
— at `envoy_publish` and at `envoy_subscribe` alike — because no session would ever receive it.
|
|
@@ -19,9 +19,11 @@ Read this in a Legion pane before you touch a role claim, or when a Legion role
|
|
|
19
19
|
Only the reaper releases a claim, once its holder is `gone`;
|
|
20
20
|
a Legion role whose agent process exits is `gone` at once, so its successor's soft claim takes the role without waiting out the live window.
|
|
21
21
|
|
|
22
|
-
- `holder_lapsed`: a session holds the claim but has not registered within the live window
|
|
22
|
+
- `holder_lapsed`: a session holds the claim but has not registered within the live window.
|
|
23
|
+
The daemon's own notices send `keep: false`, so the listener refuses such a notice `404` and forwards nothing.
|
|
23
24
|
The error names the holder, its `holder_state` and its `last_seen`, and says `claim_released: false`.
|
|
24
25
|
An `unresponsive` holder is not dead: it keeps the role, nothing replaces it, and the daemon holds the packet and publishes it again.
|
|
26
|
+
A publish of yours to such a role is kept instead: the answer is `202` with `kept_reason: holder_lapsed` and `kept_until`.
|
|
25
27
|
|
|
26
28
|
- `delivery_failed`: the stream stored no forward for the holder:
|
|
27
29
|
the holder lookup failed, the publish errored, or the stream did not store the forward within the send's window.
|
|
@@ -34,8 +36,15 @@ Read this in a Legion pane before you touch a role claim, or when a Legion role
|
|
|
34
36
|
|
|
35
37
|
- A role message forwarded to you is kept on your inbox in the stream, which your own durable consumer reads, so your session gets it once, also after the pane restarts or reconnects.
|
|
36
38
|
|
|
39
|
+
- A role message to a released Legion role is kept for one hour, and it wakes the role.
|
|
40
|
+
The listener reports the wake at the keep.
|
|
41
|
+
Its sweep reports the wake again every five minutes while the message has at least 20 minutes of its hour left and no live session holds the role.
|
|
42
|
+
The woken session gets the message as an Envoy card with `kept_at`, and the card can come before the task the daemon gives the woken role.
|
|
43
|
+
If the role is not back inside the hour, Envoy drops the message, and when the publish named a sender session, Envoy sends that session a message that names it, unless it dropped it more than an hour late.
|
|
44
|
+
|
|
37
45
|
- Never forward these failure payloads to an architect, because the daemon already acts on them.
|
|
38
46
|
|
|
39
47
|
- A role send the listener refuses `404` also raises one exception on `notifications.envoy.exceptions.notifications.role.<role>`, with the reason it refused: `unclaimed` or `holder_lapsed`.
|
|
48
|
+
The listener refuses only a publish it keeps nothing for: one sent with `keep: false`, as the daemon's own notices are, or one whose keep failed.
|
|
40
49
|
It is a bus signal and nothing more: no consumer acts on a peer's refusal, and the daemon's own refused outbox row retries by itself until the role is held or its architect cannot hold it again.
|
|
41
50
|
Never re-send a refused message by hand on the strength of one.
|
|
@@ -4,7 +4,7 @@ Read this when a role you held is gone after a resume, fork or restart, when `en
|
|
|
4
4
|
|
|
5
5
|
- A claim belongs to the session, not the process. `omp --resume` re-claims the role recorded in the session transcript, also after the reaper removed the old session's row (the reaper removes a row only once that session is `gone`: past the gone horizon, `ENVOY_SESSION_GONE_HORIZON`, 1h by default).
|
|
6
6
|
- `/fork`, `/branch`, `/handoff` and any other switch that carries the transcript read the role the previous session id held and move it to the new id while the new session starts. `/new` and `/resume` install an unrelated transcript and carry nothing.
|
|
7
|
-
- A holder that has not registered for longer than the live window (`ENVOY_SESSION_LIVE_WINDOW`, 5m by default) reads `unresponsive`, and keeps its role
|
|
7
|
+
- A holder that has not registered for longer than the live window (`ENVOY_SESSION_LIVE_WINDOW`, 5m by default) reads `unresponsive`, and keeps its role. Envoy keeps a role publish to it for one hour and answers that it kept it, with `kept_reason: holder_lapsed`, the holder, its `holder_state`, its `last_seen` and `kept_until`, the time that hour ends. The next session to hold the role live in that hour gets the message: the holder when it answers again, or a session that claims the role. If no session takes it by `kept_until`, Envoy drops it, and when your publish named your session, sends your session a message that names it, unless it dropped it more than an hour late. An unresponsive holder is not dead, so start no replacement for that session and take nothing from it. Only the role-claim reaper releases a claim, once the holder is `gone`. A client that stops cleanly deregisters its own session and sends its client instance id, and the listener removes the registration only when the registration carries the same id or none, so a departing client never removes a registration another process made under the same session id.
|
|
8
8
|
- A role message the listener forwarded to your session while you held the role is kept on your inbox in the stream, which your own durable consumer reads, so your session gets it once after a resume or a reconnect within 72 hours, also when the role moved to another session in the meantime.
|
|
9
9
|
- An automatic reclaim never steals. It is a soft claim, which the listener grants when the role is unheld, when its holder is not `live` — `gone`, or `unresponsive` past the live window, which is how a relaunched Legion role recovers it — and when its holder is the id this session continues (a fork's parent) and that predecessor is this client instance's: the predecessor is not `live`, or its live registration carries this instance's own id, or one of the two sides carries no instance id. A client instance is one Oh My Pi Envoy extension instance, or one Claude Code channel-server process; each mints its id when it starts. Any other `live` session keeps the role — the parent of a `/fork` whose role moved to the child, a second process on the same transcript, a named predecessor another client instance still runs — and the listener refuses atomically, naming that holder, while the resumed session logs a warning and holds nothing.
|
|
10
10
|
- A refusal does not stop the session. The session keeps running, and it stays registered, but without the role. It does not claim again at each heartbeat. The Oh My Pi plugin takes the role at its next session event, once the holder is no longer live. The Claude Code channel takes the role at an explicit claim. Use `envoy_role_get` to read who holds the role now.
|