@opencode-ai/client 0.0.0-next-15315 → 0.0.0-next-15316

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,14 @@
1
- import type { AgentApi as EffectAgentApi, CommandApi as EffectCommandApi, EventApi as EffectEventApi, IntegrationApi as EffectIntegrationApi, ModelApi as EffectModelApi, PluginApi as EffectPluginApi, ProviderApi as EffectProviderApi, ReferenceApi as EffectReferenceApi, SessionApi as EffectSessionApi, SkillApi as EffectSkillApi } from "../effect/api/api.js";
2
- import type { Effect, Stream } from "effect";
3
- type PromisifyOperation<Operation> = Operation extends (...args: infer Args) => Effect.Effect<infer Success, unknown, unknown> ? (...args: Args) => Promise<Success> : Operation extends (...args: infer Args) => Stream.Stream<infer Success, unknown, unknown> ? (...args: Args) => AsyncIterable<Success> : Operation extends (...args: infer _Args) => unknown ? Operation : Operation extends object ? PromisifyApi<Operation> : Operation;
4
- type PromisifyApi<Api> = {
5
- readonly [Name in keyof Api]: PromisifyOperation<Api[Name]>;
6
- };
7
- export type AgentApi = PromisifyApi<EffectAgentApi<unknown>>;
8
- export type CommandApi = PromisifyApi<EffectCommandApi<unknown>>;
9
- export type EventApi = PromisifyApi<EffectEventApi<unknown>>;
10
- export type IntegrationApi = PromisifyApi<EffectIntegrationApi<unknown>>;
11
- export type ModelApi = PromisifyApi<EffectModelApi<unknown>>;
12
- export type PluginApi = PromisifyApi<EffectPluginApi<unknown>>;
13
- export type ProviderApi = PromisifyApi<EffectProviderApi<unknown>>;
14
- export type ReferenceApi = PromisifyApi<EffectReferenceApi<unknown>>;
15
- export type SessionApi = PromisifyApi<EffectSessionApi<unknown>>;
16
- export type SkillApi = PromisifyApi<EffectSkillApi<unknown>>;
1
+ type Client = ReturnType<typeof import("./generated/client.js").make>;
2
+ export type AgentApi = Client["agent"];
3
+ export type CommandApi = Client["command"];
4
+ export type EventApi = Client["event"];
5
+ export type IntegrationApi = Client["integration"];
6
+ export type ModelApi = Client["model"];
7
+ export type PluginApi = Client["plugin"];
8
+ export type ProviderApi = Client["provider"];
9
+ export type ReferenceApi = Client["reference"];
10
+ export type SessionApi = Client["session"];
11
+ export type SkillApi = Client["skill"];
17
12
  export interface CatalogApi {
18
13
  readonly provider: ProviderApi;
19
14
  readonly model: ModelApi;