@sjawhar/claude-envoy 2.43.0 → 2.43.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/.omp-plugin/plugin.json
CHANGED
package/dist/envoy-channel.js
CHANGED
|
@@ -57724,7 +57724,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
57724
57724
|
|
|
57725
57725
|
// package.json
|
|
57726
57726
|
var name = "@sjawhar/claude-envoy";
|
|
57727
|
-
var version2 = "2.43.
|
|
57727
|
+
var version2 = "2.43.1";
|
|
57728
57728
|
var legion = {
|
|
57729
57729
|
daemonApiVersion: 151
|
|
57730
57730
|
};
|
package/package.json
CHANGED
|
@@ -58,15 +58,16 @@ This form sends an empty value, and the API answers as if you had sent no creden
|
|
|
58
58
|
```sh
|
|
59
59
|
# wrong
|
|
60
60
|
agent-secrets LEGION_SLACK_BOT_TOKEN -- \
|
|
61
|
-
|
|
61
|
+
sh -c "printf 'Authorization: Bearer %s' \"$LEGION_SLACK_BOT_TOKEN\" | curl -sS -H @- https://slack.com/api/auth.test"
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Your own shell expands `$LEGION_SLACK_BOT_TOKEN` before `agent-secrets`
|
|
65
|
-
name is empty. Slack then answers `{"ok":false,"error":"not_authed"}`.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`sh -c`, where the quotes keep the expansion for the
|
|
69
|
-
input (`-H @-`), so the value is in no command's
|
|
64
|
+
Your own shell expands `$LEGION_SLACK_BOT_TOKEN` inside the double quotes before `agent-secrets`
|
|
65
|
+
runs, and in your shell that name is empty. Slack then answers `{"ok":false,"error":"not_authed"}`.
|
|
66
|
+
What the client hands over — the value, or the placeholder of a secret behind the airlock — exists
|
|
67
|
+
only in the environment of the command the client starts, so that command must read it itself.
|
|
68
|
+
Put the command in single quotes, inside `sh -c`, where the quotes keep the expansion for the
|
|
69
|
+
child, and give `curl` the header on standard input (`-H @-`), so the value is in no command's
|
|
70
|
+
arguments:
|
|
70
71
|
|
|
71
72
|
```sh
|
|
72
73
|
# right
|
|
@@ -150,13 +151,14 @@ Your transcript keeps everything a command prints.
|
|
|
150
151
|
```
|
|
151
152
|
|
|
152
153
|
- Take a credential out of a JSON value inside the command, and pass it on there without
|
|
153
|
-
printing it
|
|
154
|
-
sending an empty
|
|
154
|
+
printing it, with the header on curl's standard input so it is in no command's arguments.
|
|
155
|
+
`jq -e` exits 1 when the path holds nothing, so the command stops rather than sending an empty
|
|
156
|
+
credential:
|
|
155
157
|
|
|
156
158
|
```sh
|
|
157
159
|
agent-secrets NAME --reason '…' -- sh -c '
|
|
158
160
|
token=$(printf %s "$NAME" | jq -er ".path.to.token" 2>/dev/null) || { echo "no token at .path.to.token" >&2; exit 1; }
|
|
159
|
-
|
|
161
|
+
printf "Authorization: Bearer %s" "$token" | curl -sS -H @- https://api.example.com/'
|
|
160
162
|
```
|
|
161
163
|
|
|
162
164
|
For a GitHub App secret, `--github-owner <account> --github-token` hands the command that one
|