MCPcopy Create free account
hub / github.com/pingdotgg/t3code / runOpenCodeSdk

Function runOpenCodeSdk

apps/server/src/provider/opencodeRuntime.ts:84–92  ·  view source on GitHub ↗
(
  operation: string,
  fn: () => Promise<A>,
)

Source from the content-addressed store, hash-verified

82}
83
84export const runOpenCodeSdk = <A>(
85 operation: string,
86 fn: () => Promise<A>,
87): Effect.Effect<A, OpenCodeRuntimeError> =>
88 Effect.tryPromise({
89 try: fn,
90 catch: (cause) =>
91 new OpenCodeRuntimeError({ operation, detail: openCodeRuntimeErrorDetail(cause), cause }),
92 }).pipe(Effect.withSpan(`opencode.${operation}`));
93
94export interface OpenCodeCommandResult {
95 readonly stdout: string;

Callers 4

OpenCodeAdapter.tsFile · 0.90
makeOpenCodeAdapterFunction · 0.90
loadProvidersFunction · 0.85
loadAgentsFunction · 0.85

Calls 1

Tested by

no test coverage detected