@inetafrica/open-claudia 2.2.4 → 2.2.5
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 +4 -0
- package/core/runner.js +24 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v2.2.5
|
|
4
|
+
- Fix `/codex` resume crash: `buildCodexArgs` no longer appends `--add-dir <transcripts-dir>`, which the Codex CLI does not accept and which caused every `codex exec resume` invocation to exit 2 with `error: unexpected argument '--add-dir' found`. Transcript pointer is still injected into the prompt via `promptWithTranscriptPointer`.
|
|
5
|
+
- Backend-aware empty-output failure message: when a non-Claude backend exits with no assistant output, the reply now labels it correctly (`Codex` / `Cursor`) and points at the right diagnostic commands (`/codex_auth_status`, `/codex_login`, `/codex_setup_token`, or `agent login`) instead of always saying "Claude exited" and recommending Claude-only commands.
|
|
6
|
+
|
|
3
7
|
## v2.2.4
|
|
4
8
|
- Bearer auth on `/api/*`: when `BOT_CONTROL_TOKEN` is set in the env, requests with `Authorization: Bearer <token>` are accepted in addition to the existing cookie session. Behaviour is unchanged when the env var is not set, so local installs are not affected.
|
|
5
9
|
- `/upgrade` detects an AgentSpace-managed pod (both `AGENTSPACE_POD_TOKEN` and `AGENTSPACE_API_URL` set) and delegates to `POST /pods/self/upgrade` on the control plane instead of running `npm install -g` locally. The control plane rolls the deployment with a fresh image pull. Local installs fall through to the existing npm upgrade path.
|
package/core/runner.js
CHANGED
|
@@ -145,8 +145,6 @@ function buildCodexArgs(prompt, opts = {}) {
|
|
|
145
145
|
else if (resumeId) args.push("exec", "resume", resumeId);
|
|
146
146
|
else args.push("exec");
|
|
147
147
|
args.push("--json", "--skip-git-repo-check");
|
|
148
|
-
const transcriptInfo = transcriptProjectInfo(state);
|
|
149
|
-
if (transcriptInfo) args.push("--add-dir", transcriptInfo.transcriptsDir);
|
|
150
148
|
if (settings.permissionMode === "plan") args.push("--sandbox", "read-only");
|
|
151
149
|
else args.push("--dangerously-bypass-approvals-and-sandbox");
|
|
152
150
|
if (settings.model) args.push("--model", settings.model);
|
|
@@ -177,21 +175,35 @@ function preflightClaudeAuthMessage() {
|
|
|
177
175
|
}
|
|
178
176
|
|
|
179
177
|
function claudeEmptyFailureMessage(code, stderrText = "") {
|
|
178
|
+
const backend = currentState().settings.backend || "claude";
|
|
180
179
|
const stderr = redactSensitive(String(stderrText || "").trim());
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
if (backend === "claude") {
|
|
181
|
+
if (isClaudeUsageLimitText(stderr)) return claudeUsageLimitMessage(stderr.slice(-1200));
|
|
182
|
+
if (isClaudeAuthErrorText(stderr)) return claudeAuthRecoveryMessage(stderr.slice(-1200));
|
|
183
|
+
const authStatus = runClaudeAuthStatusDiagnostic();
|
|
184
|
+
if (isClaudeAuthErrorText(authStatus)) return claudeAuthRecoveryMessage(authStatus.slice(-1200));
|
|
185
|
+
if (isClaudeUsageLimitText(authStatus)) return claudeUsageLimitMessage(authStatus.slice(-1200));
|
|
186
|
+
return [
|
|
187
|
+
`Claude exited with code ${code} but produced no assistant output.`,
|
|
188
|
+
stderr ? `\nStderr:\n${stderr.slice(-1200)}` : "\nStderr: (empty)",
|
|
189
|
+
authStatus ? `\nAuth status:\n${redactSensitive(authStatus).slice(-1200)}` : "",
|
|
190
|
+
"",
|
|
191
|
+
"Useful next steps:",
|
|
192
|
+
"• /auth_status — verify Claude auth",
|
|
193
|
+
"• /model sonnet — switch away from Opus if usage-limited",
|
|
194
|
+
"• /setup_token — create a launchd-safe OAuth token if Keychain is the issue",
|
|
195
|
+
].filter(Boolean).join("\n");
|
|
196
|
+
}
|
|
197
|
+
const label = backend === "codex" ? "Codex" : "Cursor";
|
|
198
|
+
const nextSteps = backend === "codex"
|
|
199
|
+
? ["• /codex_auth_status — verify Codex auth", "• /codex_login — device-code login", "• /codex_setup_token — paste an OpenAI API key"]
|
|
200
|
+
: ["• /backend — confirm Cursor is selected", "• Run `agent login` on the host machine", "• /claude — fall back to Claude if Cursor stays broken"];
|
|
186
201
|
return [
|
|
187
|
-
|
|
202
|
+
`${label} exited with code ${code} but produced no assistant output.`,
|
|
188
203
|
stderr ? `\nStderr:\n${stderr.slice(-1200)}` : "\nStderr: (empty)",
|
|
189
|
-
authStatus ? `\nAuth status:\n${redactSensitive(authStatus).slice(-1200)}` : "",
|
|
190
204
|
"",
|
|
191
205
|
"Useful next steps:",
|
|
192
|
-
|
|
193
|
-
"• /model sonnet — switch away from Opus if usage-limited",
|
|
194
|
-
"• /setup_token — create a launchd-safe OAuth token if Keychain is the issue",
|
|
206
|
+
...nextSteps,
|
|
195
207
|
].filter(Boolean).join("\n");
|
|
196
208
|
}
|
|
197
209
|
|
package/package.json
CHANGED