Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): report Claude authentication accurately #7691

ClosedIc3b3rg(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/7691/headopened View on GitHub

Showing 2 changed files with 64 additions and 0 deletions (loading 1).

x
0 of 2 viewed, 2 left
64 additions and 0 deletionsapps/server/src/provider/Layers/ClaudeProvider.tsModified
View file
@@ -11,6 +11,7 @@
import * as Option from "effect/Option";
import * as Path from "effect/Path";
import * as Result from "effect/Result";
+import * as Schema from "effect/Schema";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
import {
createModelCapabilities,
@@ -29,6 +30,7 @@
} from "@anthropic-ai/claude-agent-sdk";
​
import {
+ AUTH_PROBE_TIMEOUT_MS,
buildBooleanOptionDescriptor,
buildSelectOptionDescriptor,
buildServerProvider,
@@ -55,6 +57,15 @@
const MINIMUM_CLAUDE_FABLE_5_VERSION = "2.1.169";
const MINIMUM_CLAUDE_OPUS_4_8_VERSION = "2.1.154";
const MINIMUM_CLAUDE_OPUS_4_7_VERSION = "2.1.111";
+const MINIMUM_CLAUDE_AUTH_STATUS_VERSION = "2.1.41";
+​
+const decodeClaudeAuthStatus = Schema.decodeUnknownOption(
+ Schema.fromJsonString(
+ Schema.Struct({
+ loggedIn: Schema.Boolean,
+ }),
+ ),