MCPcopy Create free account
hub / github.com/Microck/opencode-studio / checkVersion

Function checkVersion

client-next/src/lib/api.ts:124–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122}
123
124export async function checkVersion(): Promise<VersionCheck> {
125 try {
126 const { data } = await api.get<HealthResponse>('/health', { timeout: 3000 });
127 const version = data.version || null;
128 const isCompatible = version ? compareVersions(version, MIN_SERVER_VERSION) : false;
129 return { connected: true, version, isCompatible, minRequired: MIN_SERVER_VERSION };
130 } catch {
131 return { connected: false, version: null, isCompatible: false, minRequired: MIN_SERVER_VERSION };
132 }
133}
134
135export function buildProtocolUrl(action: string, params?: Record<string, string>): string {
136 let url = `opencodestudio://${action}`;

Callers 1

checkServerVersionFunction · 0.90

Calls 1

compareVersionsFunction · 0.70

Tested by

no test coverage detected