Open History to see the last commit
1import {
2 type ClaudeSettings,
3 type ModelCapabilities,
4 type ServerProvider,
5 type ServerProviderSlashCommand,
6 type ServerProviderResetCredits,
7} from "@t3tools/contracts";
8import * as DateTime from "effect/DateTime";
9import * as Effect from "effect/Effect";
10import * as FileSystem from "effect/FileSystem";
11import * as Option from "effect/Option";
12import * as Path from "effect/Path";
13import * as Ref from "effect/Ref";
14import * as Result from "effect/Result";
15import { ChildProcess, ChildProcessSpawner } from "effect/process";
16import { createModelCapabilities } from "@t3tools/shared/model";
17import { resolveSpawnCommand } from "@t3tools/shared/shell";
18import {
19 query as claudeQuery,
20 type Options as ClaudeQueryOptions,
21 type SlashCommand as ClaudeSlashCommand,
22 type SDKControlGetUsageResponse,
23 type SDKUserMessage,
24 type SettingSource,
25} from "@anthropic-ai/claude-agent-sdk";
26
27import {
28 buildServerProvider,
29 COMPACT_SLASH_COMMAND,
30 DEFAULT_TIMEOUT_MS,
31 isCommandMissingCause,
32 parseGenericCliVersion,
33 providerModelsFromSettings,
34 spawnAndCollect,
35 type ServerProviderDraft,
36} from "@t3tools/provider-core/server/snapshotProbe";
37import { resolveClaudeSdkExecutablePath } from "./Drivers/ClaudeExecutable.ts";
38import { makeClaudeEnvironment } from "./Drivers/ClaudeHome.ts";
39import { discoverClaudeSkills } from "./Drivers/ClaudeSkills.ts";
40import type { ProviderWorkspaceSnapshot } from "@t3tools/provider-core/server/driver";
41import { makeUnavailableUsageLimits } from "@t3tools/provider-core/server/usageLimits";
42import {
43 type ClaudeScopedLimitNames,
44 claudeUsageResponseToLimits,
45 recordClaudeUsageResponse,
46} from "./claudeUsageLimits.ts";
47import {
48 BUNDLED_CLAUDE_MODEL_CATALOG,
49 type ClaudeModelCatalog,
50 formatClaudeVersionUpgradeMessage,
51 resolveClaudeModelsForVersion,
52 resolveClaudeUpdateRequiredModels,
53} from "./ClaudeModelCatalog.ts";
54
55const DEFAULT_CLAUDE_MODEL_CAPABILITIES: ModelCapabilities = createModelCapabilities({
56 optionDescriptors: [],
57});
58
59const CLAUDE_PRESENTATION = {
60 displayName: "Claude",
61 showInteractionModeToggle: true,
62 reportsContextWindow: true,
63} as const;
64function toTitleCaseWords(value: string): string {
65 const parts: Array<string> = [];
66 for (const part of value.split(/[\s_-]+/g)) {
67 if (part.length > 0) {
68 parts.push(part[0]!.toUpperCase() + part.slice(1).toLowerCase());
69 }
70 }
71 return parts.join(" ");
72}
73
74function claudeSubscriptionLabel(subscriptionType: string | undefined): string | undefined {
75 const normalized = subscriptionType?.toLowerCase().replace(/[\s_-]+/g, "");
76 if (!normalized) return undefined;
77
78 switch (normalized) {
79 case "claudemaxsubscription":
80 return "Max";
81 case "claudemax5xsubscription":
82 return "Max 5x";
83 case "claudemax20xsubscription":
84 return "Max 20x";
85 case "claudeenterprisesubscription":
86 return "Enterprise";
87 case "claudeteamsubscription":
88 return "Team";
89 case "claudeprosubscription":
90 return "Pro";
91 case "claudefreesubscription":
92 return "Free";
93 case "max":
94 case "maxplan":
95 return "Max";
96 case "max5":
97 return "Max 5x";
98 case "max20":
99 return "Max 20x";
100 case "enterprise":
101 return "Enterprise";
102 case "team":
103 return "Team";
104 case "pro":
105 return "Pro";
106 case "free":
107 return "Free";
108 default:
109 return toTitleCaseWords(subscriptionType!);
110 }
111}
112
113function normalizeClaudeAuthMethod(authMethod: string | undefined): string | undefined {
114 const normalized = authMethod?.toLowerCase().replace(/[\s_-]+/g, "");
115 if (!normalized) return undefined;
116 if (
117 normalized === "apikey" ||
118 normalized === "anthropicapikey" ||
119 normalized === "anthropicauthtoken"
120 ) {
121 return "apiKey";
122 }
123 return undefined;
124}
125
126function formatClaudeSubscriptionAuthLabel(subscriptionType: string): string {
127 const subscriptionLabel =
128 claudeSubscriptionLabel(subscriptionType) ?? toTitleCaseWords(subscriptionType);
129 const normalized = subscriptionLabel.toLowerCase().replace(/[\s_-]+/g, "");
130
131 if (normalized.startsWith("claude") && normalized.endsWith("subscription")) {
132 return subscriptionLabel;
133 }
134 if (normalized.startsWith("claude")) {
135 return `${subscriptionLabel} Subscription`;
136 }
137 if (normalized.endsWith("subscription")) {
138 return `Claude ${subscriptionLabel}`;
139 }
140 return `Claude ${subscriptionLabel} Subscription`;
141}
142
143function claudeAuthMetadata(input: {
144 readonly subscriptionType: string | undefined;
145 readonly authMethod: string | undefined;
146}): { readonly type: string; readonly label: string } | undefined {
147 if (normalizeClaudeAuthMethod(input.authMethod) === "apiKey") {
148 return {
149 type: "apiKey",
150 label: "Claude API Key",
151 };
152 }
153
154 if (input.subscriptionType) {
155 return {
156 type: input.subscriptionType,
157 label: formatClaudeSubscriptionAuthLabel(input.subscriptionType),
158 };
159 }
160
161 return undefined;
162}
163
164function apiProviderAuthMetadata(
165 apiProvider: string | undefined,
166): { readonly type: string; readonly label: string } | undefined {
167 return apiProvider === "bedrock" ? { type: "bedrock", label: "Amazon Bedrock" } : undefined;
168}
169
170// ── SDK capability probe ────────────────────────────────────────────
171
172// Amazon Bedrock initializes far slower than first-party auth: the SDK boots the
173// Bedrock backend and runs the `awsAuthRefresh` credential hook before returning
174// account info. The previous 8s budget expired mid-init, so the probe returned
175// `undefined` and left the provider unverified and unselectable in the picker.
176const CAPABILITIES_PROBE_TIMEOUT_MS = 25_000;
177
178/**
179 * Keep workspace-scoped command discovery intact while isolating the periodic
180 * health check from configured MCP servers.
181 */
182export const CLAUDE_CAPABILITIES_PROBE_SETTING_SOURCES = [
183 "user",
184 "project",
185 "local",
186] as const satisfies ReadonlyArray<SettingSource>;
187
188/** Build the exact SDK options used by the periodic Claude capability probe. */
189export function buildClaudeCapabilitiesProbeQueryOptions(input: {
190 readonly executablePath: string;
191 readonly abortController: AbortController;
192 readonly environment: NodeJS.ProcessEnv;
193 readonly cwd: string | undefined;
194}): ClaudeQueryOptions {
195 return {
196 persistSession: false,
197 pathToClaudeCodeExecutable: input.executablePath,
198 abortController: input.abortController,
199 settingSources: [...CLAUDE_CAPABILITIES_PROBE_SETTING_SOURCES],
200 // The probe keeps filesystem setting sources for slash-command discovery,
201 // but must not run the user's hooks: it fires every few minutes, so
202 // SessionStart hooks would run on every health check.
203 settings: { disableAllHooks: true },
204 allowedTools: [],
205 // Ignore MCP definitions from every filesystem setting source above. The
206 // SDK combines this empty explicit map with --strict-mcp-config.
207 mcpServers: {},
208 strictMcpConfig: true,
209 env: {
210 ...input.environment,
211 // Connected claude.ai MCP servers are discovered outside filesystem
212 // config; disable them independently for this health check.
213 ENABLE_CLAUDEAI_MCP_SERVERS: "false",
214 // This is a noninteractive health check, so IDE discovery cannot add any
215 // useful capability data. Skipping it also avoids Claude spawning a
216 // Windows `tasklist | findstr` process tree on every periodic refresh.
217 FORCE_CODE_TERMINAL: undefined,
218 CLAUDE_CODE_AUTO_CONNECT_IDE: "0",
219 CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL: "1",
220 },
221 ...(input.cwd ? { cwd: input.cwd } : {}),
222 stderr: () => {},
223 };
224}
225
226function nonEmptyProbeString(value: string): string | undefined {
227 const candidate = value.trim();
228 return candidate ? candidate : undefined;
229}
230
231type ClaudeCapabilitiesProbe = {
232 readonly email: string | undefined;
233 readonly subscriptionType: string | undefined;
234 readonly tokenSource: string | undefined;
235 /**
236 * Active API backend reported by the SDK's `AccountInfo`. Anthropic OAuth
237 * login only applies when `"firstParty"`; for Amazon Bedrock (`"bedrock"`)
238 * the subscription/token fields are absent and auth is external AWS creds.
239 */
240 readonly apiProvider: string | undefined;
241 readonly slashCommands: ReadonlyArray<ServerProviderSlashCommand>;
242 /**
243 * Subscription windows from the SDK's `get_usage` control request, or
244 * `undefined` when the request itself failed. Absent windows on an
245 * otherwise successful response mean the account has none (API key).
246 */
247 readonly usage?: Pick<SDKControlGetUsageResponse, "rate_limits_available" | "rate_limits">;
248};
249
250function parseClaudeInitializationCommands(
251 commands: ReadonlyArray<ClaudeSlashCommand> | undefined,
252): ReadonlyArray<ServerProviderSlashCommand> {
253 return dedupeSlashCommands(
254 (commands ?? []).flatMap((command) => {
255 const name = nonEmptyProbeString(command.name);
256 if (!name) {
257 return [];
258 }
259
260 const description = nonEmptyProbeString(command.description);
261 const argumentHint = nonEmptyProbeString(command.argumentHint);
262
263 return [
264 {
265 name,
266 ...(description ? { description } : {}),
267 ...(argumentHint ? { input: { hint: argumentHint } } : {}),
268 } satisfies ServerProviderSlashCommand,
269 ];
270 }),
271 );
272}
273
274function dedupeSlashCommands(
275 commands: ReadonlyArray<ServerProviderSlashCommand>,
276): ReadonlyArray<ServerProviderSlashCommand> {
277 const commandsByName = new Map<string, ServerProviderSlashCommand>();
278
279 for (const command of commands) {
280 const name = nonEmptyProbeString(command.name);
281 if (!name) {
282 continue;
283 }
284
285 const key = name.toLowerCase();
286 const existing = commandsByName.get(key);
287 if (!existing) {
288 commandsByName.set(key, {
289 ...command,
290 name,
291 });
292 continue;
293 }
294
295 commandsByName.set(key, {
296 ...existing,
297 ...(existing.description
298 ? {}
299 : command.description
300 ? { description: command.description }
301 : {}),
302 ...(existing.input?.hint
303 ? {}
304 : command.input?.hint
305 ? { input: { hint: command.input.hint } }
306 : {}),
307 });
308 }
309
310 return [...commandsByName.values()];
311}
312
313function waitForAbortSignal(signal: AbortSignal): Promise<void> {
314 if (signal.aborted) {
315 return Promise.resolve();
316 }
317 return new Promise((resolve) => {
318 signal.addEventListener("abort", () => resolve(), { once: true });
319 });
320}
321
322/**
323 * Probe account information by spawning a lightweight Claude Agent SDK
324 * session and reading the initialization result.
325 *
326 * We pass a never-yielding AsyncIterable as the prompt so that no user
327 * message is ever written to the subprocess stdin. This means the Claude
328 * Code subprocess completes its local initialization IPC (returning
329 * account info and slash commands) but never starts an API request to
330 * Anthropic. We read the init data and then abort the subprocess.
331 *
332 * This is used as a fallback when `claude auth status` does not include
333 * subscription type information.
334 */
335const probeClaudeCapabilities = (
336 claudeSettings: ClaudeSettings,
337 environment?: NodeJS.ProcessEnv,
338 cwd?: string,
339 includeUsage = true,
340) => {
341 const abort = new AbortController();
342 return Effect.gen(function* () {
343 const claudeEnvironment = yield* makeClaudeEnvironment(claudeSettings, environment);
344 const executablePath = yield* resolveClaudeSdkExecutablePath(
345 claudeSettings.binaryPath,
346 claudeEnvironment,
347 );
348 return yield* Effect.tryPromise(async () => {
349 const q = claudeQuery({
350 // Never yield — we only need initialization data, not a conversation.
351 // This prevents any prompt from reaching the Anthropic API.
352 // oxlint-disable-next-line require-yield
353 prompt: (async function* (): AsyncGenerator<SDKUserMessage> {
354 await waitForAbortSignal(abort.signal);
355 })(),
356 options: buildClaudeCapabilitiesProbeQueryOptions({
357 executablePath,
358 abortController: abort,
359 environment: claudeEnvironment,
360 cwd,
361 }),
362 });
363 const init = await q.initializationResult();
364 return { q, init };
365 });
366 }).pipe(
367 Effect.timeout(CAPABILITIES_PROBE_TIMEOUT_MS),
368 Effect.flatMap(({ q, init }) =>
369 Effect.gen(function* () {
370 // Usage has its own deadline so a slow optional request cannot discard initialization.
371 // Only the rate limits are read, so skip the local transcript scan that fills
372 // `behaviors`: with a few GB of transcripts it outlasts the deadline.
373 const usageResult = includeUsage
374 ? yield* Effect.tryPromise(() =>
375 q.usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET({ skipBehaviors: true }),
376 ).pipe(Effect.timeout(DEFAULT_TIMEOUT_MS), Effect.result)
377 : undefined;
378 const usage =
379 usageResult && Result.isSuccess(usageResult)
380 ? {
381 rate_limits_available: usageResult.success.rate_limits_available,
382 rate_limits: usageResult.success.rate_limits,
383 }
384 : undefined;
385 const account = init.account as
386 | {
387 readonly email?: string;
388 readonly subscriptionType?: string;
389 readonly tokenSource?: string;
390 readonly apiProvider?: string;
391 }
392 | undefined;
393 return {
394 email: account?.email,
395 subscriptionType: account?.subscriptionType,
396 tokenSource: account?.tokenSource,
397 apiProvider: account?.apiProvider,
398 slashCommands: parseClaudeInitializationCommands(init.commands),
399 ...(usage ? { usage } : {}),
400 } satisfies ClaudeCapabilitiesProbe;
401 }),
402 ),
403 Effect.ensuring(
404 Effect.sync(() => {
405 if (!abort.signal.aborted) abort.abort();
406 }),
407 ),
408 Effect.result,
409 Effect.map((result) => (Result.isSuccess(result) ? result.success : undefined)),
410 );
411};
412
413const runClaudeCommand = Effect.fn("runClaudeCommand")(function* (
414 claudeSettings: ClaudeSettings,
415 args: ReadonlyArray<string>,
416 environment?: NodeJS.ProcessEnv,
417) {
418 const claudeEnvironment = yield* makeClaudeEnvironment(claudeSettings, environment);
419 const spawnCommand = yield* resolveSpawnCommand(claudeSettings.binaryPath, args, {
420 env: claudeEnvironment,
421 });
422 const command = ChildProcess.make(spawnCommand.command, spawnCommand.args, {
423 env: claudeEnvironment,
424 shell: spawnCommand.shell,
425 });
426 return yield* spawnAndCollect(claudeSettings.binaryPath, command);
427});
428
429/** Read commands from the same cwd Claude uses for a workspace session. */
430export const probeClaudeWorkspaceSnapshot = Effect.fn("probeClaudeWorkspaceSnapshot")(function* (
431 claudeSettings: ClaudeSettings,
432 machineSnapshot: ServerProvider,
433 cwd: string,
434 environment?: NodeJS.ProcessEnv,
435): Effect.fn.Return<ProviderWorkspaceSnapshot, never, FileSystem.FileSystem | Path.Path> {
436 if (!claudeSettings.enabled) return machineSnapshot;
437 const skills = yield* discoverClaudeSkills(claudeSettings, cwd, environment);
438 const capabilities = yield* probeClaudeCapabilities(claudeSettings, environment, cwd, false);
439 return {
440 ...machineSnapshot,
441 skills,
442 slashCommands: dedupeSlashCommands([
443 COMPACT_SLASH_COMMAND,
444 ...(capabilities?.slashCommands ?? []),
445 ]),
446 slashCommandsPending: !capabilities,
447 };
448});
449
450export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(function* (
451 claudeSettings: ClaudeSettings,
452 resolveCapabilities?: (
453 claudeSettings: ClaudeSettings,
454 ) => Effect.Effect<ClaudeCapabilitiesProbe | undefined>,
455 environment?: NodeJS.ProcessEnv,
456 cwd?: string,
457 modelCatalog: ClaudeModelCatalog = BUNDLED_CLAUDE_MODEL_CATALOG,
458 /** Shared with the adapter so turn events reuse the scoped-bucket names this probe saw. */
459 scopedLimitNames?: Ref.Ref<ClaudeScopedLimitNames>,
460 /** Banked resets for a subscription login, given the CLI version for the user agent. */
461 resolveResetCredits?: (version: string) => Effect.Effect<ServerProviderResetCredits | undefined>,
462): Effect.fn.Return<
463 ServerProviderDraft,
464 never,
465 ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem | Path.Path
466> {
467 const resolvedEnvironment = environment ?? process.env;
468 const checkedAt = DateTime.formatIso(yield* DateTime.now);
469 const allModels = providerModelsFromSettings(
470 modelCatalog.models.map((entry) => entry.model),
471 claudeSettings.customModels,
472 DEFAULT_CLAUDE_MODEL_CAPABILITIES,
473 );
474
475 if (!claudeSettings.enabled) {
476 return buildServerProvider({
477 presentation: CLAUDE_PRESENTATION,
478 enabled: false,
479 checkedAt,
480 models: allModels,
481 probe: {
482 installed: false,
483 version: null,
484 status: "warning",
485 auth: { status: "unknown" },
486 message: "Claude is disabled in T3 Code settings.",
487 },
488 });
489 }
490
491 const versionProbe = yield* runClaudeCommand(
492 claudeSettings,
493 ["--version"],
494 resolvedEnvironment,
495 ).pipe(Effect.timeoutOption(DEFAULT_TIMEOUT_MS), Effect.result);
496
497 if (Result.isFailure(versionProbe)) {
498 const error = versionProbe.failure;
499 yield* Effect.logWarning("Claude Agent CLI health check failed.", {
500 errorTag: error._tag,
501 });
502 return buildServerProvider({
503 presentation: CLAUDE_PRESENTATION,
504 enabled: claudeSettings.enabled,
505 checkedAt,
506 models: allModels,
507 probe: {
508 installed: !isCommandMissingCause(error),
509 version: null,
510 status: "error",
511 auth: { status: "unknown" },
512 message: isCommandMissingCause(error)
513 ? "Claude Agent CLI (`claude`) was not found on PATH."
514 : "Failed to execute Claude Agent CLI health check.",
515 },
516 });
517 }
518
519 if (Option.isNone(versionProbe.success)) {
520 return buildServerProvider({
521 presentation: CLAUDE_PRESENTATION,
522 enabled: claudeSettings.enabled,
523 checkedAt,
524 models: allModels,
525 probe: {
526 installed: true,
527 version: null,
528 status: "error",
529 auth: { status: "unknown" },
530 message:
531 "Claude Agent CLI is installed but failed to run. Timed out while running command.",
532 },
533 });
534 }
535
536 const version = versionProbe.success.value;
537 const parsedVersion = parseGenericCliVersion(`${version.stdout}\n${version.stderr}`);
538 if (version.code !== 0) {
539 yield* Effect.logWarning("Claude Agent CLI version probe exited with a non-zero status.", {
540 exitCode: version.code,
541 stdoutLength: version.stdout.length,
542 stderrLength: version.stderr.length,
543 });
544 return buildServerProvider({
545 presentation: CLAUDE_PRESENTATION,
546 enabled: claudeSettings.enabled,
547 checkedAt,
548 models: allModels,
549 probe: {
550 installed: true,
551 version: parsedVersion,
552 status: "error",
553 auth: { status: "unknown" },
554 message: "Claude Agent CLI is installed but failed to run.",
555 },
556 });
557 }
558
559 const models = providerModelsFromSettings(
560 resolveClaudeModelsForVersion(modelCatalog, parsedVersion),
561 claudeSettings.customModels,
562 DEFAULT_CLAUDE_MODEL_CAPABILITIES,
563 );
564 const updateRequiredModels = resolveClaudeUpdateRequiredModels(modelCatalog, parsedVersion);
565 const versionUpgradeMessage = formatClaudeVersionUpgradeMessage(modelCatalog, parsedVersion);
566
567 const capabilities = resolveCapabilities
568 ? yield* resolveCapabilities(claudeSettings).pipe(Effect.orElseSucceed(() => undefined))
569 : undefined;
570 const skills = yield* discoverClaudeSkills(claudeSettings, cwd, resolvedEnvironment);
571 const slashCommands = [COMPACT_SLASH_COMMAND, ...(capabilities?.slashCommands ?? [])];
572 const dedupedSlashCommands = dedupeSlashCommands(slashCommands);
573
574 if (!capabilities) {
575 return buildServerProvider({
576 presentation: CLAUDE_PRESENTATION,
577 enabled: claudeSettings.enabled,
578 checkedAt,
579 models,
580 updateRequiredModels,
581 slashCommands: dedupedSlashCommands,
582 skills,
583 probe: {
584 installed: true,
585 version: parsedVersion,
586 status: "warning",
587 auth: { status: "unknown" },
588 message: "Could not verify Claude authentication status from initialization result.",
589 },
590 });
591 }
592
593 const authMetadata =
594 claudeAuthMetadata({
595 subscriptionType: capabilities.subscriptionType,
596 authMethod: capabilities.tokenSource,
597 }) ?? apiProviderAuthMetadata(capabilities.apiProvider);
598 const usageLimits = !capabilities.usage
599 ? makeUnavailableUsageLimits({ checkedAt, reason: "probeFailed" })
600 : scopedLimitNames
601 ? yield* recordClaudeUsageResponse(scopedLimitNames, {
602 response: capabilities.usage,
603 checkedAt,
604 })
605 : claudeUsageResponseToLimits({ response: capabilities.usage, checkedAt }).limits;
606 const resetCredits =
607 resolveResetCredits &&
608 capabilities.subscriptionType &&
609 !usageLimits.unavailable &&
610 parsedVersion
611 ? yield* resolveResetCredits(parsedVersion)
612 : undefined;
613 return buildServerProvider({
614 presentation: CLAUDE_PRESENTATION,
615 enabled: claudeSettings.enabled,
616 checkedAt,
617 models,
618 updateRequiredModels,
619 slashCommands: dedupedSlashCommands,
620 skills,
621 probe: {
622 installed: true,
623 version: parsedVersion,
624 status: "ready",
625 auth: {
626 status: "authenticated",
627 ...(capabilities.email ? { email: capabilities.email } : {}),
628 ...(authMetadata ? authMetadata : {}),
629 },
630 ...(versionUpgradeMessage ? { message: versionUpgradeMessage } : {}),
631 usageLimits: resetCredits ? { ...usageLimits, resetCredits } : usageLimits,
632 },
633 });
634});
635
636const nowIso = Effect.map(DateTime.now, DateTime.formatIso);
637
638export const makePendingClaudeProvider = (
639 claudeSettings: ClaudeSettings,
640 modelCatalog: ClaudeModelCatalog = BUNDLED_CLAUDE_MODEL_CATALOG,
641): Effect.Effect<ServerProviderDraft> =>
642 Effect.gen(function* () {
643 const checkedAt = yield* nowIso;
644 const models = providerModelsFromSettings(
645 modelCatalog.models.map((entry) => entry.model),
646 claudeSettings.customModels,
647 DEFAULT_CLAUDE_MODEL_CAPABILITIES,
648 );
649
650 if (!claudeSettings.enabled) {
651 return buildServerProvider({
652 presentation: CLAUDE_PRESENTATION,
653 enabled: false,
654 checkedAt,
655 models,
656 probe: {
657 installed: false,
658 version: null,
659 status: "warning",
660 auth: { status: "unknown" },
661 message: "Claude is disabled in T3 Code settings.",
662 },
663 });
664 }
665
666 return buildServerProvider({
667 presentation: CLAUDE_PRESENTATION,
668 enabled: true,
669 checkedAt,
670 models,
671 probe: {
672 installed: false,
673 version: null,
674 status: "warning",
675 auth: { status: "unknown" },
676 message: "Claude provider status has not been checked in this session yet.",
677 },
678 });
679 });
680
681export { probeClaudeCapabilities };