@sjawhar/claude-envoy 2.37.0 → 2.39.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.
@@ -2,5 +2,5 @@
2
2
  "name": "claude-envoy",
3
3
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
4
4
  "mcpServers": "./.mcp.json",
5
- "version": "2.37.0"
5
+ "version": "2.39.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "2.37.0",
3
+ "version": "2.39.0",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
@@ -57720,7 +57720,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
57720
57720
 
57721
57721
  // package.json
57722
57722
  var name = "@sjawhar/claude-envoy";
57723
- var version2 = "2.37.0";
57723
+ var version2 = "2.39.0";
57724
57724
  var legion = {
57725
57725
  daemonApiVersion: 146
57726
57726
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "2.37.0",
3
+ "version": "2.39.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",
@@ -182,10 +182,12 @@ Without the grant line the status is the client's own:
182
182
  - **1** — a refusal or a failure that the message names: a name the broker does not serve
183
183
  (`UNKNOWN_SECRET`), a secret that waits for its first value (`PENDING_VALUE`), a broker it cannot
184
184
  reach, a machine that is not logged in to the broker, a request cancelled or expired,
185
- `REQUEST_PENDING`, a grant that is no longer live, or a command that is not on `PATH`, which is
186
- refused before the broker is asked anything, so it reaches no approver.
187
- - **2** — a usage error: no broker identity at all (no key in the key dir and no helper socket), no
188
- `AGENT_SECRETS_URL`, no `--`, no `NAME`, or a flag value the client refuses.
185
+ `REQUEST_PENDING`, a grant that is no longer live, a command that is not on `PATH`, which is
186
+ refused before the broker is asked anything, so it reaches no approver, or no broker identity at
187
+ all: `no broker identity for this process: key-dir: …; sign-in: …; helper: …; machine: …`, each
188
+ source with why it had nothing.
189
+ - **2** — a usage error: no `AGENT_SECRETS_URL`, no `--`, no `NAME`, or a flag value the client
190
+ refuses.
189
191
  - **75** — the request still waits for a person. The message names who decides it, where, and the
190
192
  `agent-secrets status <request_id>` that reads it.
191
193
  - **77** — the request was denied. The approver denied it, the policy refused a name (a
@@ -225,8 +227,10 @@ never denies. Every other request waits for that person, as it does now.
225
227
  while the first request still waits, such a run joins it. Any other run that would itself wait
226
228
  for a person and shares a name with a waiting request, with another `--ttl` or another set of
227
229
  names, is refused `REQUEST_PENDING`, which names the request already waiting.
228
- - `agent-secrets identity` exits 0 when this session has a broker identity and 1 when it has none,
229
- and it asks the broker nothing. `agent-secrets self` prints this session's live grants.
230
+ - `agent-secrets identity` exits 0 when this session has a launcher's key or a helper session, and
231
+ 1 otherwise, and it asks the broker nothing. `agent-secrets identity --source` prints the source
232
+ the client would take its broker identity from (`key-dir`, `sign-in`, `helper` or `machine`).
233
+ `agent-secrets self` prints this session's live grants.
230
234
 
231
235
  ## Where a name comes from, and how you may use it
232
236
 
@@ -264,27 +268,55 @@ prompt, a skill, or the issue you work on. There is no list to browse and nothin
264
268
  1. Run the call through `agent-secrets`, with the secret your instructions name.
265
269
  2. Report a service unreachable only with the command you ran and the output you saw.
266
270
  3. When no instruction names a secret for that service, report that instead, with what you checked:
267
- `agent-secrets identity`, and which instructions you read. Request no name you guessed.
271
+ `agent-secrets identity --source`, and which instructions you read. Request no name you guessed.
268
272
 
269
273
  ## On a person's own machine
270
274
 
271
- A session on a person's own development box is not a pod, and `agent-secrets identity` exits 1 there
272
- for two reasons:
273
-
274
- - **The machine is not logged in.** `agent-secrets machine login-status` prints `issued` only while
275
- the machine holds its credential. The person logs the machine in, as `/legion/broker/guides/log-a-machine-in/` in the documentation site shows.
276
- - **The agent is not a broker session.** The helper knows only the process tree it registered. The
277
- person restarts the agent as one:
275
+ The client takes its broker identity from the first of four sources that has one, and needs no
276
+ registered agent session: a launcher's key directory, the person's own `agent-secrets login`, the
277
+ helper for a process inside a session it registered, and the machine's own cloud identity, which it
278
+ finds with no setting once the broker names its exchange audience. `agent-secrets identity
279
+ --source` names the source it would use. When the command exits 1 naming no broker identity, each
280
+ source says why it had nothing:
281
+
282
+ - **`helper: this process is in no session the helper … registered`.** The process inherited the
283
+ helper's socket but is not in a session the helper registered. That alone stops nothing: the
284
+ client goes on to the machine.
285
+ - **`machine: the broker at … names no exchange audience`.** The broker accepts no machine identity
286
+ yet. The person signs in (`agent-secrets login`), or restarts the agent as a session:
278
287
  `agent-secrets register --wait 10 --exec -- <the agent's command>`.
288
+ - **`this machine is not logged in to the secrets broker`.** The helper holds no machine credential.
289
+ `agent-secrets machine login-status` prints `issued` only while it holds one. The person logs the
290
+ machine in, as `/legion/broker/guides/log-a-machine-in/` in the documentation site shows.
291
+
292
+ A stopped helper is not a missing one. Where the helper is installed, or `AGENT_SECRETS_HELPER_SOCK`
293
+ names its socket, and the socket is gone, the command exits 1 with
294
+ `agent-secrets-helper at … so the helper is stopped`, and it does not act as the machine instead.
295
+ Report that line; the person starts the helper (`systemctl --user start agent-secrets-helper`).
279
296
 
280
297
  On `UNKNOWN_SECRET` you stop, as above. You may tell the secret's owner how to find the cause:
281
298
  `agent-secrets secret list` and `agent-secrets secret show NAME`, under a cloud sign-in that may
282
299
  read the store (`gcloud auth login` against a broker on Google Cloud, an `AWS_PROFILE` against one
283
300
  on AWS).
284
301
 
285
- A write runs under whatever credential the environment gives the command, and the store's IAM
286
- decides whether it lands. On Google Cloud that is `CLOUDSDK_AUTH_ACCESS_TOKEN` when it is set, else
287
- the Application Default Credentials, else the gcloud login; on AWS, `--profile`, else `AWS_PROFILE`.
302
+ A write runs under the credential of the first source the command finds, and the store's IAM
303
+ decides whether it lands. On Google Cloud the order is `CLOUDSDK_AUTH_ACCESS_TOKEN`,
304
+ `GOOGLE_APPLICATION_CREDENTIALS`, `CLOUDSDK_ACTIVE_CONFIG_NAME` or
305
+ `CLOUDSDK_CORE_ACCOUNT`, the well-known credentials file, the active gcloud account and last the
306
+ metadata server; on AWS it is the AWS SDK's own: access keys in `AWS_ACCESS_KEY_ID` and
307
+ `AWS_SECRET_ACCESS_KEY`, then `AWS_WEB_IDENTITY_TOKEN_FILE`, then `AWS_PROFILE`, then
308
+ `AWS_DEFAULT_PROFILE`, then the rest of the SDK's default chain. Every form prints the credential
309
+ it uses (`agent-secrets secret <form>: using …`) before it calls the store, and a store refusal
310
+ names it and how to choose another. A source that is present but broken stops the command; it
311
+ never falls through to the machine's identity.
312
+ An agent never chooses a gcloud configuration that holds a person's login: the call then runs as
313
+ that person, so the person runs such a command in their own shell. Where the box's active gcloud
314
+ configuration holds a person's login, the active gcloud account, which comes before the metadata
315
+ server, is that person's as well. To write as the machine, name the machine's own gcloud login: set
316
+ `CLOUDSDK_CORE_ACCOUNT` to the box's service account (on a Google VM `gcloud auth list` lists it),
317
+ or `CLOUDSDK_ACTIVE_CONFIG_NAME` to the configuration that holds it. `CLOUDSDK_CORE_ACCOUNT`
318
+ outranks the account of any configuration, so unset it before you choose a configuration. Or ask
319
+ the person to run the command.
288
320
  `agent-secrets secret set NAME` replaces the value of a secret that exists. A new one is
289
321
  `agent-secrets secret create NAME --owner me|shared|<email> --tier agent|human`. `--owner me` is
290
322
  the email of the person the credential names, and is refused where it names none, as a token
@@ -312,7 +344,7 @@ It exits 0 and answers `"ok": true` with the messages of the thread. A `ts` that
312
344
  status. A thread read needs the app's `channels:history` scope in a public channel and
313
345
  `groups:history` in a private one; without them Slack answers `missing_scope`, which only a person
314
346
  in the Slack workspace can fix. `LEGION_SLACK_BOT_TOKEN` is a shared agent secret, so every session
315
- with a broker identity is granted it; a session with no broker identity exits 2.
347
+ with a broker identity is granted it; a process with no broker identity exits 1.
316
348
 
317
349
  Paging: Slack recommends a `limit` of at most 200. While the answer's `has_more` is true, pass its
318
350
  `response_metadata.next_cursor` as `cursor` to the next call. Each page repeats the thread's root