Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add provider skill discovery #1905

Mergedjuliusmarmingemerged 12 commits intomain fromrefs/pull/1905/headmerged by juliusmarminge View on GitHub

Showing 34 changed files with 102 additions and 7 deletions (loading 33).

x
0 of 34 viewed, 34 left
102 additions and 7 deletionsapps/server/src/provider/Layers/ClaudeProvider.tsModified
View file
@@ -4,12 +4,16 @@
ServerProvider,
ServerProviderModel,
ServerProviderAuth,
+ ServerProviderSlashCommand,
ServerProviderState,
} from "@t3tools/contracts";
import { Cache, Duration, Effect, Equal, Layer, Option, Result, Schema, Stream } from "effect";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
import { decodeJsonResult } from "@t3tools/shared/schemaJson";
-import { query as claudeQuery } from "@anthropic-ai/claude-agent-sdk";
+import {
+ query as claudeQuery,
+ type SlashCommand as ClaudeSlashCommand,
+} from "@anthropic-ai/claude-agent-sdk";
​
import {
buildServerProvider,
@@ -340,6 +344,74 @@
​
const CAPABILITIES_PROBE_TIMEOUT_MS = 8_000;
​
+function nonEmptyProbeString(value: string): string | undefined {
+ const candidate = value.trim();
+ return candidate ? candidate : undefined;
+}
+​
+function parseClaudeInitializationCommands(
+ commands: ReadonlyArray<ClaudeSlashCommand> | undefined,