|
| 1 | +import type { LocalAgentProvider } from "./local-agent-profiles.js"; |
| 2 | + |
| 3 | +export interface LocalAgentProviderCapabilities { |
| 4 | + structuredOutput: "native" | "prompt"; |
| 5 | + resumableSessions: boolean; |
| 6 | + cancellation: "signal" | "process"; |
| 7 | + supportsWorkspaceIsolation: boolean; |
| 8 | +} |
| 9 | + |
| 10 | +export const LOCAL_AGENT_PROVIDER_CAPABILITIES = { |
| 11 | + codex: { |
| 12 | + structuredOutput: "native", |
| 13 | + resumableSessions: true, |
| 14 | + cancellation: "signal", |
| 15 | + supportsWorkspaceIsolation: true, |
| 16 | + }, |
| 17 | + claude: { |
| 18 | + structuredOutput: "native", |
| 19 | + resumableSessions: true, |
| 20 | + cancellation: "signal", |
| 21 | + supportsWorkspaceIsolation: true, |
| 22 | + }, |
| 23 | + opencode: { |
| 24 | + structuredOutput: "prompt", |
| 25 | + resumableSessions: true, |
| 26 | + cancellation: "process", |
| 27 | + supportsWorkspaceIsolation: true, |
| 28 | + }, |
| 29 | + pi: { |
| 30 | + structuredOutput: "prompt", |
| 31 | + resumableSessions: true, |
| 32 | + cancellation: "process", |
| 33 | + supportsWorkspaceIsolation: true, |
| 34 | + }, |
| 35 | + cursor: { |
| 36 | + structuredOutput: "prompt", |
| 37 | + resumableSessions: true, |
| 38 | + cancellation: "process", |
| 39 | + supportsWorkspaceIsolation: true, |
| 40 | + }, |
| 41 | + copilot: { |
| 42 | + structuredOutput: "prompt", |
| 43 | + resumableSessions: true, |
| 44 | + cancellation: "process", |
| 45 | + supportsWorkspaceIsolation: true, |
| 46 | + }, |
| 47 | +} as const satisfies Record<LocalAgentProvider, LocalAgentProviderCapabilities>; |
| 48 | + |
| 49 | +export function supportsNativeStructuredOutput(provider: LocalAgentProvider): boolean { |
| 50 | + return LOCAL_AGENT_PROVIDER_CAPABILITIES[provider].structuredOutput === "native"; |
| 51 | +} |
0 commit comments