@opencode-ai/client 0.0.0-next-15074 → 0.0.0-next-15076

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.
@@ -141,6 +141,7 @@ export type Endpoint4_12Input = {
141
141
  readonly text: Endpoint4_12Request["payload"]["text"];
142
142
  readonly description?: Endpoint4_12Request["payload"]["description"];
143
143
  readonly metadata?: Endpoint4_12Request["payload"]["metadata"];
144
+ readonly resume?: Endpoint4_12Request["payload"]["resume"];
144
145
  };
145
146
  export type Endpoint4_12Output = EffectValue<ReturnType<RawClient["server.session"]["session.synthetic"]>>;
146
147
  export type SessionSyntheticOperation<E = never> = (input: Endpoint4_12Input) => Effect.Effect<Endpoint4_12Output, E>;
@@ -397,8 +398,15 @@ export type Endpoint10_0Input = {
397
398
  };
398
399
  export type Endpoint10_0Output = EffectValue<ReturnType<RawClient["server.mcp"]["mcp.list"]>>;
399
400
  export type ServerMcpListOperation<E = never> = (input?: Endpoint10_0Input) => Effect.Effect<Endpoint10_0Output, E>;
401
+ type Endpoint10_1Request = Parameters<RawClient["server.mcp"]["mcp.resource.catalog"]>[0];
402
+ export type Endpoint10_1Input = {
403
+ readonly location?: Endpoint10_1Request["query"]["location"];
404
+ };
405
+ export type Endpoint10_1Output = EffectValue<ReturnType<RawClient["server.mcp"]["mcp.resource.catalog"]>>;
406
+ export type ServerMcpCatalogOperation<E = never> = (input?: Endpoint10_1Input) => Effect.Effect<Endpoint10_1Output, E>;
400
407
  export interface ServerMcpApi<E = never> {
401
408
  readonly list: ServerMcpListOperation<E>;
409
+ readonly catalog: ServerMcpCatalogOperation<E>;
402
410
  }
403
411
  type Endpoint11_0Request = Parameters<RawClient["server.credential"]["credential.update"]>[0];
404
412
  export type Endpoint11_0Input = {
@@ -98,6 +98,7 @@ type Endpoint4_12Input = {
98
98
  readonly text: Endpoint4_12Request["payload"]["text"];
99
99
  readonly description?: Endpoint4_12Request["payload"]["description"];
100
100
  readonly metadata?: Endpoint4_12Request["payload"]["metadata"];
101
+ readonly resume?: Endpoint4_12Request["payload"]["resume"];
101
102
  };
102
103
  type Endpoint4_13Request = Parameters<RawClient["server.session"]["session.shell"]>[0];
103
104
  type Endpoint4_13Input = {
@@ -240,6 +241,10 @@ type Endpoint10_0Request = Parameters<RawClient["server.mcp"]["mcp.list"]>[0];
240
241
  type Endpoint10_0Input = {
241
242
  readonly location?: Endpoint10_0Request["query"]["location"];
242
243
  };
244
+ type Endpoint10_1Request = Parameters<RawClient["server.mcp"]["mcp.resource.catalog"]>[0];
245
+ type Endpoint10_1Input = {
246
+ readonly location?: Endpoint10_1Request["query"]["location"];
247
+ };
243
248
  type Endpoint11_0Request = Parameters<RawClient["server.credential"]["credential.update"]>[0];
244
249
  type Endpoint11_0Input = {
245
250
  readonly credentialID: Endpoint11_0Request["params"]["credentialID"];
@@ -2950,6 +2955,25 @@ export declare const make: (options?: {
2950
2955
  readonly integrationID?: (string & import("effect/Brand").Brand<"Integration.ID">) | undefined;
2951
2956
  }[];
2952
2957
  }, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
2958
+ catalog: (input?: Endpoint10_1Input) => Effect.Effect<{
2959
+ readonly location: import("@opencode-ai/schema/location").Info;
2960
+ readonly data: {
2961
+ readonly resources: readonly {
2962
+ readonly server: string;
2963
+ readonly name: string;
2964
+ readonly uri: string;
2965
+ readonly description?: string | undefined;
2966
+ readonly mimeType?: string | undefined;
2967
+ }[];
2968
+ readonly templates: readonly {
2969
+ readonly server: string;
2970
+ readonly name: string;
2971
+ readonly uriTemplate: string;
2972
+ readonly description?: string | undefined;
2973
+ readonly mimeType?: string | undefined;
2974
+ }[];
2975
+ };
2976
+ }, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
2953
2977
  };
2954
2978
  credential: {
2955
2979
  update: (input: Endpoint11_0Input) => Effect.Effect<void, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
@@ -5729,6 +5753,20 @@ export declare const make: (options?: {
5729
5753
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
5730
5754
  readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
5731
5755
  } | undefined;
5756
+ } | {
5757
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
5758
+ readonly created: import("effect/DateTime").Utc;
5759
+ readonly type: "mcp.resources.changed";
5760
+ readonly data: {
5761
+ readonly server: string;
5762
+ };
5763
+ readonly metadata?: {
5764
+ readonly [x: string]: unknown;
5765
+ } | undefined;
5766
+ readonly location?: {
5767
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
5768
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
5769
+ } | undefined;
5732
5770
  } | {
5733
5771
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
5734
5772
  readonly created: import("effect/DateTime").Utc;
@@ -63,7 +63,12 @@ const Endpoint4_11 = (raw) => (input) => raw["session.skill"]({
63
63
  }).pipe(Effect.mapError(mapClientError));
64
64
  const Endpoint4_12 = (raw) => (input) => raw["session.synthetic"]({
65
65
  params: { sessionID: input["sessionID"] },
66
- payload: { text: input["text"], description: input["description"], metadata: input["metadata"] },
66
+ payload: {
67
+ text: input["text"],
68
+ description: input["description"],
69
+ metadata: input["metadata"],
70
+ resume: input["resume"],
71
+ },
67
72
  }).pipe(Effect.mapError(mapClientError));
68
73
  const Endpoint4_13 = (raw) => (input) => raw["session.shell"]({
69
74
  params: { sessionID: input["sessionID"] },
@@ -172,7 +177,8 @@ const adaptGroup9 = (raw) => ({
172
177
  attemptCancel: Endpoint9_6(raw),
173
178
  });
174
179
  const Endpoint10_0 = (raw) => (input) => raw["mcp.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError));
175
- const adaptGroup10 = (raw) => ({ list: Endpoint10_0(raw) });
180
+ const Endpoint10_1 = (raw) => (input) => raw["mcp.resource.catalog"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError));
181
+ const adaptGroup10 = (raw) => ({ list: Endpoint10_0(raw), catalog: Endpoint10_1(raw) });
176
182
  const Endpoint11_0 = (raw) => (input) => raw["credential.update"]({
177
183
  params: { credentialID: input["credentialID"] },
178
184
  query: { location: input["location"] },
@@ -1,4 +1,4 @@
1
- import type { HealthGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationConnectKeyInput, IntegrationConnectOauthInput, IntegrationConnectOauthOutput, IntegrationAttemptStatusInput, IntegrationAttemptStatusOutput, IntegrationAttemptCompleteInput, IntegrationAttemptCancelInput, ServerMcpListInput, ServerMcpListOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectCurrentInput, ProjectCurrentOutput, ProjectDirectoriesInput, ProjectDirectoriesOutput, FormListRequestsInput, FormListRequestsOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionListRequestsInput, PermissionListRequestsOutput, PermissionListSavedInput, PermissionRemoveSavedInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, QuestionListRequestsInput, QuestionListRequestsOutput, QuestionListInput, QuestionReplyInput, QuestionRejectInput, ReferenceListInput, ReferenceListOutput, ProjectCopyCreateInput, ProjectCopyCreateOutput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationOutput, DebugEvictLocationInput } from "./types";
1
+ import type { HealthGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationConnectKeyInput, IntegrationConnectOauthInput, IntegrationConnectOauthOutput, IntegrationAttemptStatusInput, IntegrationAttemptStatusOutput, IntegrationAttemptCompleteInput, IntegrationAttemptCancelInput, ServerMcpListInput, ServerMcpListOutput, ServerMcpCatalogInput, ServerMcpCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectCurrentInput, ProjectCurrentOutput, ProjectDirectoriesInput, ProjectDirectoriesOutput, FormListRequestsInput, FormListRequestsOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionListRequestsInput, PermissionListRequestsOutput, PermissionListSavedInput, PermissionRemoveSavedInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, QuestionListRequestsInput, QuestionListRequestsOutput, QuestionListInput, QuestionReplyInput, QuestionRejectInput, ReferenceListInput, ReferenceListOutput, ProjectCopyCreateInput, ProjectCopyCreateOutput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationOutput, DebugEvictLocationInput } from "./types";
2
2
  export interface ClientOptions {
3
3
  readonly baseUrl: string;
4
4
  readonly fetch?: typeof globalThis.fetch;
@@ -915,6 +915,7 @@ export declare function make(options: ClientOptions): {
915
915
  };
916
916
  "server.mcp": {
917
917
  list: (input?: ServerMcpListInput, requestOptions?: RequestOptions) => Promise<ServerMcpListOutput>;
918
+ catalog: (input?: ServerMcpCatalogInput, requestOptions?: RequestOptions) => Promise<ServerMcpCatalogOutput>;
918
919
  };
919
920
  credential: {
920
921
  update: (input: CredentialUpdateInput, requestOptions?: RequestOptions) => Promise<void>;
@@ -281,7 +281,12 @@ export function make(options) {
281
281
  synthetic: (input, requestOptions) => request({
282
282
  method: "POST",
283
283
  path: `/api/session/${encodeURIComponent(input.sessionID)}/synthetic`,
284
- body: { text: input["text"], description: input["description"], metadata: input["metadata"] },
284
+ body: {
285
+ text: input["text"],
286
+ description: input["description"],
287
+ metadata: input["metadata"],
288
+ resume: input["resume"],
289
+ },
285
290
  successStatus: 204,
286
291
  declaredStatuses: [404, 400, 401],
287
292
  empty: true,
@@ -521,6 +526,14 @@ export function make(options) {
521
526
  declaredStatuses: [401, 400],
522
527
  empty: false,
523
528
  }, requestOptions),
529
+ catalog: (input, requestOptions) => request({
530
+ method: "GET",
531
+ path: `/api/mcp/resource`,
532
+ query: { location: input?.["location"] },
533
+ successStatus: 200,
534
+ declaredStatuses: [401, 400],
535
+ empty: false,
536
+ }, requestOptions),
524
537
  },
525
538
  credential: {
526
539
  update: (input, requestOptions) => request({
@@ -1139,6 +1139,7 @@ export type SessionSyntheticInput = {
1139
1139
  readonly metadata?: {
1140
1140
  readonly [x: string]: JsonValue;
1141
1141
  };
1142
+ readonly resume?: boolean | null;
1142
1143
  }["text"];
1143
1144
  readonly description?: {
1144
1145
  readonly text: string;
@@ -1146,6 +1147,7 @@ export type SessionSyntheticInput = {
1146
1147
  readonly metadata?: {
1147
1148
  readonly [x: string]: JsonValue;
1148
1149
  };
1150
+ readonly resume?: boolean | null;
1149
1151
  }["description"];
1150
1152
  readonly metadata?: {
1151
1153
  readonly text: string;
@@ -1153,7 +1155,16 @@ export type SessionSyntheticInput = {
1153
1155
  readonly metadata?: {
1154
1156
  readonly [x: string]: JsonValue;
1155
1157
  };
1158
+ readonly resume?: boolean | null;
1156
1159
  }["metadata"];
1160
+ readonly resume?: {
1161
+ readonly text: string;
1162
+ readonly description?: string | null;
1163
+ readonly metadata?: {
1164
+ readonly [x: string]: JsonValue;
1165
+ };
1166
+ readonly resume?: boolean | null;
1167
+ }["resume"];
1157
1168
  };
1158
1169
  export type SessionSyntheticOutput = void;
1159
1170
  export type SessionShellInput = {
@@ -3754,6 +3765,40 @@ export type ServerMcpListOutput = {
3754
3765
  readonly integrationID?: string;
3755
3766
  }>;
3756
3767
  };
3768
+ export type ServerMcpCatalogInput = {
3769
+ readonly location?: {
3770
+ readonly location?: {
3771
+ readonly directory?: string | undefined;
3772
+ readonly workspace?: string | undefined;
3773
+ } | undefined;
3774
+ }["location"];
3775
+ };
3776
+ export type ServerMcpCatalogOutput = {
3777
+ readonly location: {
3778
+ readonly directory: string;
3779
+ readonly workspaceID?: string;
3780
+ readonly project: {
3781
+ readonly id: string;
3782
+ readonly directory: string;
3783
+ };
3784
+ };
3785
+ readonly data: {
3786
+ readonly resources: ReadonlyArray<{
3787
+ readonly server: string;
3788
+ readonly name: string;
3789
+ readonly uri: string;
3790
+ readonly description?: string;
3791
+ readonly mimeType?: string;
3792
+ }>;
3793
+ readonly templates: ReadonlyArray<{
3794
+ readonly server: string;
3795
+ readonly name: string;
3796
+ readonly uriTemplate: string;
3797
+ readonly description?: string;
3798
+ readonly mimeType?: string;
3799
+ }>;
3800
+ };
3801
+ };
3757
3802
  export type CredentialUpdateInput = {
3758
3803
  readonly credentialID: {
3759
3804
  readonly credentialID: string;
@@ -7733,6 +7778,20 @@ export type EventSubscribeOutput = {
7733
7778
  readonly data: {
7734
7779
  readonly server: string;
7735
7780
  };
7781
+ } | {
7782
+ readonly id: string;
7783
+ readonly created: number;
7784
+ readonly metadata?: {
7785
+ readonly [x: string]: unknown;
7786
+ };
7787
+ readonly type: "mcp.resources.changed";
7788
+ readonly location?: {
7789
+ readonly directory: string;
7790
+ readonly workspaceID?: string;
7791
+ };
7792
+ readonly data: {
7793
+ readonly server: string;
7794
+ };
7736
7795
  } | {
7737
7796
  readonly id: string;
7738
7797
  readonly created: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/client",
4
- "version": "0.0.0-next-15074",
4
+ "version": "0.0.0-next-15076",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -41,8 +41,8 @@
41
41
  "typecheck": "tsgo --noEmit"
42
42
  },
43
43
  "dependencies": {
44
- "@opencode-ai/schema": "0.0.0-next-15074",
45
- "@opencode-ai/protocol": "0.0.0-next-15074"
44
+ "@opencode-ai/schema": "0.0.0-next-15076",
45
+ "@opencode-ai/protocol": "0.0.0-next-15076"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "effect": "4.0.0-beta.83"
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@effect/platform-node": "4.0.0-beta.83",
57
- "@opencode-ai/httpapi-codegen": "0.0.0-next-15074",
57
+ "@opencode-ai/httpapi-codegen": "0.0.0-next-15076",
58
58
  "@tsconfig/bun": "1.0.9",
59
59
  "@types/bun": "1.3.13",
60
60
  "@typescript/native-preview": "7.0.0-dev.20251207.1",