@retasc/cli 1.49.0 → 1.49.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/CHANGELOG.md CHANGED
@@ -6,6 +6,19 @@ release commits and the issues they reference.
6
6
 
7
7
  Dates are the npm publish date. Each entry names the RTSC issue behind it.
8
8
 
9
+ ## 1.49.1 (2026-09-09)
10
+
11
+ - **RTSC-879** — the proxy sends NO `Authorization` header when it has no key, instead of
12
+ `Bearer ` with nothing after it. An empty bearer is not a weaker credential, it is a
13
+ malformed one, and where a keyless proxy now runs that difference decides whether the
14
+ thing works at all: in a Claude Code cloud container the documented way to supply a
15
+ credential is an environment API credential, which Anthropic's egress proxy injects as
16
+ an `Authorization` header after the request leaves the VM — and which also lets the
17
+ request through a network allowlist that would otherwise refuse the host. Injection
18
+ wants the header absent, and whether it overwrites one already present is undocumented,
19
+ so sending an empty bearer staked the whole path on undocumented behaviour. With a key
20
+ present nothing changes.
21
+
9
22
  ## 1.49.0 (2026-09-09)
10
23
 
11
24
  - **RTSC-879** — a committed `.mcp.json` now names `npx -y @retasc/cli@<version> mcp-proxy`
package/dist/proxy.js CHANGED
@@ -172,11 +172,34 @@ function runReap(issueId) {
172
172
  child.unref?.(); // a pending reap must not keep the proxy alive
173
173
  });
174
174
  }
175
+ /**
176
+ * The auth header, or NOTHING when this proxy has no key (RTSC-879).
177
+ *
178
+ * `Bearer ` with an empty value is not a weaker credential, it is a malformed one: the
179
+ * request is worse off for carrying it than for leaving it out. What made that matter is
180
+ * where a keyless proxy now runs. In a Claude Code cloud container there is no keystore
181
+ * and no `RETASC_MCP_KEY`, and the documented way to give that container a credential is
182
+ * an environment API credential, which Anthropic's egress proxy INJECTS as an
183
+ * `Authorization` header after the request leaves the VM — and which also lets the
184
+ * request through a network allowlist that would otherwise refuse the host outright.
185
+ *
186
+ * Injection wants an absent header. Whether that proxy overwrites one already present is
187
+ * not documented, so sending an empty Bearer bets the whole path on undocumented
188
+ * behaviour. Omitting it needs no such bet.
189
+ *
190
+ * Nothing else changes: with a key this returns exactly what these call sites sent
191
+ * before, and a keyless request still fails at Retasc the way it always did — it just
192
+ * fails honestly, as unauthenticated, rather than as a credential that is present and
193
+ * blank.
194
+ */
195
+ function authHeader() {
196
+ return activeKey ? { Authorization: `Bearer ${activeKey}` } : {};
197
+ }
175
198
  async function postRemote(body) {
176
199
  const res = await fetch(MCP_URL, {
177
200
  method: "POST",
178
201
  headers: {
179
- Authorization: `Bearer ${activeKey}`,
202
+ ...authHeader(),
180
203
  "Content-Type": "application/json",
181
204
  Accept: "application/json",
182
205
  },
@@ -465,7 +488,7 @@ async function handleLocalAttach(msg) {
465
488
  // No Content-Type on purpose: the server infers it from `filename`, and that inference
466
489
  // is better than anything guessed here — declaring octet-stream would REPLACE it and
467
490
  // cost the attachment its inline preview.
468
- headers: { Authorization: `Bearer ${activeKey}` },
491
+ headers: authHeader(),
469
492
  body: bytes,
470
493
  });
471
494
  const body = await res.text();
@@ -585,7 +608,7 @@ async function handleLocalFetch(msg) {
585
608
  return replyToolResult(msg.id, describe(existing.size, true), false);
586
609
  }
587
610
  try {
588
- const res = await fetch(url, { headers: { Authorization: `Bearer ${activeKey}` } });
611
+ const res = await fetch(url, { headers: authHeader() });
589
612
  if (!res.ok) {
590
613
  const body = await res.text();
591
614
  log(`download of ${attachment} failed: HTTP ${res.status}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retasc/cli",
3
- "version": "1.49.0",
3
+ "version": "1.49.1",
4
4
  "description": "Retasc CLI — the issue tracker AI agents pull work from. Sign in with GitHub or Google, create projects, mint agent API keys, and wire your agent to the Retasc MCP server in one command.",
5
5
  "type": "module",
6
6
  "bin": {