claude-overnight 1.50.5 → 1.50.6

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.
@@ -1 +1 @@
1
- export declare const VERSION = "1.50.5";
1
+ export declare const VERSION = "1.50.6";
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by build — do not edit manually.
2
- export const VERSION = "1.50.5";
2
+ export const VERSION = "1.50.6";
@@ -21,10 +21,16 @@ let _envResolver;
21
21
  export function setPlannerEnvResolver(fn) {
22
22
  _envResolver = fn;
23
23
  }
24
- // ── Cursor proxy: direct HTTP bypass ──
25
- // SDK spawns 4+ subprocesses (~15s each) for the proxy; one direct POST is 4-10x faster.
26
- function isCursorProxyEnv(env) {
27
- return !!env?.CURSOR_API_KEY && !env?.ANTHROPIC_API_KEY;
24
+ // ── Direct HTTP bypass for non-Anthropic endpoints ──
25
+ // The Claude Code CLI subprocess spawned by @anthropic-ai/claude-agent-sdk validates
26
+ // model names against its built-in Anthropic list and rejects custom ids (qwen3.6-plus,
27
+ // composer-2, etc.) pre-flight, even when ANTHROPIC_BASE_URL points at an Anthropic-
28
+ // compatible proxy. Bypass the SDK with a direct POST for any non-anthropic.com base.
29
+ function shouldUseDirectFetch(env) {
30
+ const base = env?.ANTHROPIC_BASE_URL;
31
+ if (!base)
32
+ return false;
33
+ return !/^https?:\/\/(api\.)?anthropic\.com/i.test(base);
28
34
  }
29
35
  async function runViaDirectFetch(prompt, opts, onLog) {
30
36
  const env = opts.env ?? _envResolver?.(opts.model);
@@ -39,30 +45,34 @@ async function runViaDirectFetch(prompt, opts, onLog) {
39
45
  await apiEndpointLimiter.waitIfNeeded();
40
46
  const waited = await rl.waitIfNeeded();
41
47
  if (waited > 0)
42
- onLog(`Cursor proxy rate gate — waited ${Math.round(waited / 1000)}s`, "event");
48
+ onLog(`Planner proxy rate gate — waited ${Math.round(waited / 1000)}s`, "event");
43
49
  const res = await fetch(`${baseUrl}/v1/messages`, {
44
50
  method: "POST",
45
- headers: { "Content-Type": "application/json", "Authorization": `Bearer ${authToken}` },
51
+ headers: {
52
+ "Content-Type": "application/json",
53
+ "Authorization": `Bearer ${authToken}`,
54
+ "anthropic-version": "2023-06-01",
55
+ },
46
56
  body: JSON.stringify({ model: opts.model, max_tokens: 8192, messages: [{ role: "user", content: prompt }] }),
47
57
  });
48
58
  if (res.status === 429 && attempt < MAX_RETRIES) {
49
59
  const waitMs = BACKOFF[attempt];
50
- onLog(`Cursor proxy rate limited — waiting ${Math.round(waitMs / 1000)}s`, "event");
60
+ onLog(`Planner proxy rate limited — waiting ${Math.round(waitMs / 1000)}s`, "event");
51
61
  await sleep(waitMs);
52
62
  continue;
53
63
  }
54
64
  if (!res.ok)
55
- throw new Error(`Cursor proxy ${res.status}: ${(await res.text().catch(() => ""))}`);
65
+ throw new Error(`Planner proxy ${res.status}: ${(await res.text().catch(() => ""))}`);
56
66
  rl.record();
57
67
  apiEndpointLimiter.record();
58
68
  const data = await res.json();
59
69
  return data.content?.[0]?.text ?? "";
60
70
  }
61
- throw new Error("Cursor proxy direct fetch failed after retries");
71
+ throw new Error("Planner proxy direct fetch failed after retries");
62
72
  }
63
73
  export async function runPlannerQuery(prompt, opts, onLog) {
64
74
  const env = opts.env ?? _envResolver?.(opts.model);
65
- if (isCursorProxyEnv(env))
75
+ if (shouldUseDirectFetch(env))
66
76
  return runViaDirectFetch(prompt, opts, onLog);
67
77
  const MAX_RETRIES = 3;
68
78
  const BACKOFF = [30_000, 60_000, 120_000];
@@ -27,7 +27,11 @@ export const STEER_SCHEMA = {
27
27
  required: ["done", "tasks", "reasoning", "statusUpdate", "estimatedSessionsRemaining"],
28
28
  },
29
29
  };
30
- const PROMPT_BUDGET = 6000;
30
+ // The base 30-1_steer template alone is ~7 KB, so any budget below that is
31
+ // unreachable no matter how aggressively we trim variables. 20 KB leaves room
32
+ // for the template + moderate run memory while still being a tiny fraction of
33
+ // any planner's context window.
34
+ const PROMPT_BUDGET = 20_000;
31
35
  const DEFAULT_CAPS = {
32
36
  milestones: 2000, designs: 1500, reflections: 1000,
33
37
  verifications: 1000, previousRuns: 800, userGuidance: 4000,
@@ -109,9 +109,6 @@ export function envFor(p) {
109
109
  base.ANTHROPIC_AUTH_TOKEN = key;
110
110
  }
111
111
  delete base.ANTHROPIC_API_KEY;
112
- // Prevent CURSOR_API_KEY from leaking into non-proxy envs — would trip
113
- // isCursorProxyEnv false-positive, silently rerouting through direct fetch
114
- // which ignores outputFormat (no JSON schema enforcement).
115
112
  delete base.CURSOR_API_KEY;
116
113
  delete base.CURSOR_AUTH_TOKEN;
117
114
  return base;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-overnight",
3
- "version": "1.50.5",
3
+ "version": "1.50.6",
4
4
  "description": "Parallel Claude agents in git worktrees with a usage cap that reserves headroom for your interactive Claude Code. Crash-safe resume. Provider-agnostic model catalog (Anthropic, Cursor, OpenAI, Gemini, DeepSeek, Llama, Qwen) with capability-based task scoping.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-overnight",
3
- "version": "1.50.5",
3
+ "version": "1.50.6",
4
4
  "description": "Claude Code skill for understanding, installing, and inspecting claude-overnight runs -- parallel Claude agents in git worktrees with thinking waves, multi-wave steering, and crash-safe resume. Supports Cursor API Proxy, Qwen, OpenRouter.",
5
5
  "author": {
6
6
  "name": "Francesco Fornace"