fix(server): discover project skills for Claude (#9210)

Co-authored-by: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Anirudh CoontoorandClaude Fable 5.1 authored and GitHub committed 2026-09-02 13:14:41 -04:00
1 parent 70cd258d8a
commit bc918e74ac
1 file changed
+13
@@ -57,6 +57,7 @@ import {
type ProviderSnapshotSettings,
} from "../providerUpdateSettings.ts";
import { makeClaudeCapabilitiesCacheKey, makeClaudeContinuationGroupKey } from "./ClaudeHome.ts";
import { discoverClaudeSkills } from "./ClaudeSkills.ts";
const decodeClaudeSettings = Schema.decodeSync(ClaudeSettings);
const DRIVER_KIND = ProviderDriverKind.make("claudeAgent");
@@ -212,6 +213,17 @@ export const ClaudeDriver: ProviderDriver<ClaudeSettings, ClaudeDriverEnv> = {
}),
),
);
const snapshotForCwd = (cwd: string) =>
!effectiveConfig.enabled
? snapshot.getSnapshot
: Effect.all([
snapshot.getSnapshot,
discoverClaudeSkills(effectiveConfig, cwd, processEnv),
]).pipe(
Effect.map(([machineSnapshot, skills]) => ({ ...machineSnapshot, skills })),
Effect.provideService(FileSystem.FileSystem, fileSystem),
Effect.provideService(Path.Path, path),
);
return {
instanceId,
@@ -224,6 +236,7 @@ export const ClaudeDriver: ProviderDriver<ClaudeSettings, ClaudeDriverEnv> = {
accentColor,
enabled,
snapshot,
snapshotForCwd,
adapter,
textGeneration,
} satisfies ProviderInstance;