@opencode/client 0.0.0-dev-19595 → 0.0.0-dev-19598

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,8 +1,4 @@
1
- import type { ModelApi, ProviderApi, WebsearchApi } from "./api/api.js";
1
+ import type { WebsearchApi } from "./api/api.js";
2
2
  export type { RpcApi, RpcClient } from "./rpc.js";
3
3
  export type * from "./api/api.js";
4
4
  export type WebSearchApi<E = never> = WebsearchApi<E>;
5
- export interface CatalogApi<E = never> {
6
- readonly provider: ProviderApi<E>;
7
- readonly model: ModelApi<E>;
8
- }
@@ -292,6 +292,30 @@ export declare const make: (options?: {
292
292
  readonly metadata?: {
293
293
  readonly [x: string]: unknown;
294
294
  } | undefined;
295
+ } | {
296
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
297
+ readonly data: {};
298
+ readonly type: "provider.updated";
299
+ readonly created: number;
300
+ readonly location?: {
301
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
302
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
303
+ } | undefined;
304
+ readonly metadata?: {
305
+ readonly [x: string]: unknown;
306
+ } | undefined;
307
+ } | {
308
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
309
+ readonly data: {};
310
+ readonly type: "model.updated";
311
+ readonly created: number;
312
+ readonly location?: {
313
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
314
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
315
+ } | undefined;
316
+ readonly metadata?: {
317
+ readonly [x: string]: unknown;
318
+ } | undefined;
295
319
  } | {
296
320
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
297
321
  readonly data: {
@@ -1784,18 +1808,6 @@ export declare const make: (options?: {
1784
1808
  readonly metadata?: {
1785
1809
  readonly [x: string]: unknown;
1786
1810
  } | undefined;
1787
- } | {
1788
- readonly id: string & import("effect/Brand").Brand<"Event.ID">;
1789
- readonly data: {};
1790
- readonly type: "catalog.updated";
1791
- readonly created: number;
1792
- readonly location?: {
1793
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
1794
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1795
- } | undefined;
1796
- readonly metadata?: {
1797
- readonly [x: string]: unknown;
1798
- } | undefined;
1799
1811
  } | {
1800
1812
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
1801
1813
  readonly data: {};
@@ -456,6 +456,30 @@ export declare const make: (options?: {
456
456
  readonly metadata?: {
457
457
  readonly [x: string]: unknown;
458
458
  } | undefined;
459
+ } | {
460
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
461
+ readonly data: {};
462
+ readonly type: "provider.updated";
463
+ readonly created: number;
464
+ readonly location?: {
465
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
466
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
467
+ } | undefined;
468
+ readonly metadata?: {
469
+ readonly [x: string]: unknown;
470
+ } | undefined;
471
+ } | {
472
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
473
+ readonly data: {};
474
+ readonly type: "model.updated";
475
+ readonly created: number;
476
+ readonly location?: {
477
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
478
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
479
+ } | undefined;
480
+ readonly metadata?: {
481
+ readonly [x: string]: unknown;
482
+ } | undefined;
459
483
  } | {
460
484
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
461
485
  readonly data: {
@@ -1948,18 +1972,6 @@ export declare const make: (options?: {
1948
1972
  readonly metadata?: {
1949
1973
  readonly [x: string]: unknown;
1950
1974
  } | undefined;
1951
- } | {
1952
- readonly id: string & import("effect/Brand").Brand<"Event.ID">;
1953
- readonly data: {};
1954
- readonly type: "catalog.updated";
1955
- readonly created: number;
1956
- readonly location?: {
1957
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
1958
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1959
- } | undefined;
1960
- readonly metadata?: {
1961
- readonly [x: string]: unknown;
1962
- } | undefined;
1963
1975
  } | {
1964
1976
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
1965
1977
  readonly data: {};
@@ -2,7 +2,7 @@ import type { Effect } from "effect";
2
2
  import type { OpenCode } from "./client.js";
3
3
  export * from "./generated/index";
4
4
  export { OpenCode } from "./client.js";
5
- export type { AgentApi, AppApi, CatalogApi, CommandApi, ConfigApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, RpcApi, RpcClient, WebSearchApi, SessionApi, SkillApi, } from "./api.js";
5
+ export type { AgentApi, AppApi, CommandApi, ConfigApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, RpcApi, RpcClient, WebSearchApi, SessionApi, SkillApi, } from "./api.js";
6
6
  export { Agent } from "@opencode/schema/agent";
7
7
  export { Command } from "@opencode/schema/command";
8
8
  export { Config } from "@opencode/schema/config";
@@ -18,7 +18,3 @@ export type SessionApi = Client["session"];
18
18
  export type SkillApi = Client["skill"];
19
19
  export type VcsApi = Client["vcs"];
20
20
  export type WorktreeApi = Client["worktree"];
21
- export interface CatalogApi {
22
- readonly provider: ProviderApi;
23
- readonly model: ModelApi;
24
- }
@@ -1403,13 +1403,23 @@ export type IntegrationUpdated = {
1403
1403
  location?: LocationRef;
1404
1404
  data: {};
1405
1405
  };
1406
- export type CatalogUpdated = {
1406
+ export type ProviderUpdated = {
1407
1407
  id: string;
1408
1408
  created: number;
1409
1409
  metadata?: {
1410
1410
  [x: string]: any;
1411
1411
  };
1412
- type: "catalog.updated";
1412
+ type: "provider.updated";
1413
+ location?: LocationRef;
1414
+ data: {};
1415
+ };
1416
+ export type ModelUpdated = {
1417
+ id: string;
1418
+ created: number;
1419
+ metadata?: {
1420
+ [x: string]: any;
1421
+ };
1422
+ type: "model.updated";
1413
1423
  location?: LocationRef;
1414
1424
  data: {};
1415
1425
  };
@@ -3212,7 +3222,7 @@ export type IntegrationInfo = {
3212
3222
  methods: Array<IntegrationMethod>;
3213
3223
  connections: Array<ConnectionInfo>;
3214
3224
  };
3215
- export type V2Event = ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | CatalogUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionPermissionsUpdated | SessionViewed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepStreamed | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PluginUpdated | ProjectUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | PersistentPtyAdded | PersistentPtyRemoved | ShellCreated | ShellExited | ShellDeleted | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | V2EventRpc | V2EventServerConnected;
3225
+ export type V2Event = ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | ProviderUpdated | ModelUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionPermissionsUpdated | SessionViewed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepStreamed | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PluginUpdated | ProjectUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | PersistentPtyAdded | PersistentPtyRemoved | ShellCreated | ShellExited | ShellDeleted | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | V2EventRpc | V2EventServerConnected;
3216
3226
  export type SessionLogItem = SessionEventDurable | EventLogSynced;
3217
3227
  export type InvalidRequestError = {
3218
3228
  readonly _tag: "InvalidRequestError";
@@ -1,6 +1,6 @@
1
1
  import type { OpenCode } from "./client.js";
2
2
  export * from "./generated/index.js";
3
3
  export { OpenCode } from "./client.js";
4
- export type { AgentApi, CatalogApi, CommandApi, ConfigApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, RpcApi, RpcCallOptions, RpcClient, RpcEventPayload, WebSearchApi, SessionApi, SkillApi, } from "./api.js";
4
+ export type { AgentApi, CommandApi, ConfigApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, RpcApi, RpcCallOptions, RpcClient, RpcEventPayload, WebSearchApi, SessionApi, SkillApi, } from "./api.js";
5
5
  export type { EventSubscribeOutput as OpenCodeEvent } from "./generated/types.js";
6
6
  export type OpenCodeClient = ReturnType<typeof OpenCode.make>;
@@ -1057,10 +1057,13 @@ export function createData(config) {
1057
1057
  return;
1058
1058
  const location = event.location;
1059
1059
  switch (event.type) {
1060
- case "catalog.updated":
1061
- result.location.model.invalidate(location);
1060
+ case "provider.updated":
1062
1061
  result.location.provider.invalidate(location);
1063
- refresh(() => Promise.all([result.location.model.sync(location), result.location.provider.sync(location)]));
1062
+ refresh(() => result.location.provider.sync(location));
1063
+ break;
1064
+ case "model.updated":
1065
+ result.location.model.invalidate(location);
1066
+ refresh(() => result.location.model.sync(location));
1064
1067
  break;
1065
1068
  case "agent.updated":
1066
1069
  result.location.agent.invalidate(location);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/client",
4
- "version": "0.0.0-dev-19595",
4
+ "version": "0.0.0-dev-19598",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -57,8 +57,8 @@
57
57
  "typecheck": "tsgo --noEmit"
58
58
  },
59
59
  "dependencies": {
60
- "@opencode/schema": "0.0.0-dev-19595",
61
- "@opencode/protocol": "0.0.0-dev-19595"
60
+ "@opencode/schema": "0.0.0-dev-19598",
61
+ "@opencode/protocol": "0.0.0-dev-19598"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "effect": "4.0.0-rc.112",
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "devDependencies": {
76
76
  "@effect/platform-node": "4.0.0-rc.112",
77
- "@opencode/httpapi-codegen": "0.0.0-dev-19595",
77
+ "@opencode/httpapi-codegen": "0.0.0-dev-19598",
78
78
  "@tsconfig/bun": "1.0.9",
79
79
  "@types/bun": "1.4.0",
80
80
  "@typescript/native-preview": "7.0.0-dev.20251207.1",