@opencode-ai/client 0.0.0-next-14953 → 0.0.0-next-14957
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.
- package/dist/effect/api/api.d.ts +13 -10
- package/dist/effect/generated/client.d.ts +28 -8
- package/dist/effect/generated/client.js +6 -4
- package/dist/promise/generated/client.d.ts +2 -1
- package/dist/promise/generated/client.js +1 -0
- package/dist/promise/generated/types.d.ts +20 -0
- package/package.json +4 -4
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -407,20 +407,23 @@ export interface CredentialApi<E = never> {
|
|
|
407
407
|
readonly update: CredentialUpdateOperation<E>;
|
|
408
408
|
readonly remove: CredentialRemoveOperation<E>;
|
|
409
409
|
}
|
|
410
|
-
type
|
|
411
|
-
export type
|
|
412
|
-
|
|
413
|
-
};
|
|
414
|
-
export type Endpoint12_0Output = EffectValue<ReturnType<RawClient["server.project"]["project.current"]>>;
|
|
415
|
-
export type ProjectCurrentOperation<E = never> = (input?: Endpoint12_0Input) => Effect.Effect<Endpoint12_0Output, E>;
|
|
416
|
-
type Endpoint12_1Request = Parameters<RawClient["server.project"]["project.directories"]>[0];
|
|
410
|
+
export type Endpoint12_0Output = EffectValue<ReturnType<RawClient["server.project"]["project.list"]>>;
|
|
411
|
+
export type ProjectListOperation<E = never> = () => Effect.Effect<Endpoint12_0Output, E>;
|
|
412
|
+
type Endpoint12_1Request = Parameters<RawClient["server.project"]["project.current"]>[0];
|
|
417
413
|
export type Endpoint12_1Input = {
|
|
418
|
-
readonly projectID: Endpoint12_1Request["params"]["projectID"];
|
|
419
414
|
readonly location?: Endpoint12_1Request["query"]["location"];
|
|
420
415
|
};
|
|
421
|
-
export type Endpoint12_1Output = EffectValue<ReturnType<RawClient["server.project"]["project.
|
|
422
|
-
export type
|
|
416
|
+
export type Endpoint12_1Output = EffectValue<ReturnType<RawClient["server.project"]["project.current"]>>;
|
|
417
|
+
export type ProjectCurrentOperation<E = never> = (input?: Endpoint12_1Input) => Effect.Effect<Endpoint12_1Output, E>;
|
|
418
|
+
type Endpoint12_2Request = Parameters<RawClient["server.project"]["project.directories"]>[0];
|
|
419
|
+
export type Endpoint12_2Input = {
|
|
420
|
+
readonly projectID: Endpoint12_2Request["params"]["projectID"];
|
|
421
|
+
readonly location?: Endpoint12_2Request["query"]["location"];
|
|
422
|
+
};
|
|
423
|
+
export type Endpoint12_2Output = EffectValue<ReturnType<RawClient["server.project"]["project.directories"]>>;
|
|
424
|
+
export type ProjectDirectoriesOperation<E = never> = (input: Endpoint12_2Input) => Effect.Effect<Endpoint12_2Output, E>;
|
|
423
425
|
export interface ProjectApi<E = never> {
|
|
426
|
+
readonly list: ProjectListOperation<E>;
|
|
424
427
|
readonly current: ProjectCurrentOperation<E>;
|
|
425
428
|
readonly directories: ProjectDirectoriesOperation<E>;
|
|
426
429
|
}
|
|
@@ -246,15 +246,15 @@ type Endpoint11_1Input = {
|
|
|
246
246
|
readonly credentialID: Endpoint11_1Request["params"]["credentialID"];
|
|
247
247
|
readonly location?: Endpoint11_1Request["query"]["location"];
|
|
248
248
|
};
|
|
249
|
-
type
|
|
250
|
-
type Endpoint12_0Input = {
|
|
251
|
-
readonly location?: Endpoint12_0Request["query"]["location"];
|
|
252
|
-
};
|
|
253
|
-
type Endpoint12_1Request = Parameters<RawClient["server.project"]["project.directories"]>[0];
|
|
249
|
+
type Endpoint12_1Request = Parameters<RawClient["server.project"]["project.current"]>[0];
|
|
254
250
|
type Endpoint12_1Input = {
|
|
255
|
-
readonly projectID: Endpoint12_1Request["params"]["projectID"];
|
|
256
251
|
readonly location?: Endpoint12_1Request["query"]["location"];
|
|
257
252
|
};
|
|
253
|
+
type Endpoint12_2Request = Parameters<RawClient["server.project"]["project.directories"]>[0];
|
|
254
|
+
type Endpoint12_2Input = {
|
|
255
|
+
readonly projectID: Endpoint12_2Request["params"]["projectID"];
|
|
256
|
+
readonly location?: Endpoint12_2Request["query"]["location"];
|
|
257
|
+
};
|
|
258
258
|
type Endpoint13_0Request = Parameters<RawClient["server.form"]["form.request.list"]>[0];
|
|
259
259
|
type Endpoint13_0Input = {
|
|
260
260
|
readonly location?: Endpoint13_0Request["query"]["location"];
|
|
@@ -2817,11 +2817,31 @@ export declare const make: (options?: {
|
|
|
2817
2817
|
remove: (input: Endpoint11_1Input) => Effect.Effect<void, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
|
|
2818
2818
|
};
|
|
2819
2819
|
project: {
|
|
2820
|
-
|
|
2820
|
+
list: () => Effect.Effect<readonly {
|
|
2821
|
+
readonly id: string & import("effect/Brand").Brand<"Project.ID">;
|
|
2822
|
+
readonly worktree: string;
|
|
2823
|
+
readonly time: {
|
|
2824
|
+
readonly created: number;
|
|
2825
|
+
readonly updated: number;
|
|
2826
|
+
readonly initialized?: number | undefined;
|
|
2827
|
+
};
|
|
2828
|
+
readonly sandboxes: readonly string[];
|
|
2829
|
+
readonly vcs?: "git" | "hg" | undefined;
|
|
2830
|
+
readonly name?: string | undefined;
|
|
2831
|
+
readonly icon?: {
|
|
2832
|
+
readonly url?: string | undefined;
|
|
2833
|
+
readonly override?: string | undefined;
|
|
2834
|
+
readonly color?: string | undefined;
|
|
2835
|
+
} | undefined;
|
|
2836
|
+
readonly commands?: {
|
|
2837
|
+
readonly start?: string | undefined;
|
|
2838
|
+
} | undefined;
|
|
2839
|
+
}[], import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
|
|
2840
|
+
current: (input?: Endpoint12_1Input) => Effect.Effect<{
|
|
2821
2841
|
readonly id: string & import("effect/Brand").Brand<"Project.ID">;
|
|
2822
2842
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
2823
2843
|
}, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
|
|
2824
|
-
directories: (input:
|
|
2844
|
+
directories: (input: Endpoint12_2Input) => Effect.Effect<readonly {
|
|
2825
2845
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
2826
2846
|
readonly strategy?: string | undefined;
|
|
2827
2847
|
}[], import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
|
|
@@ -183,14 +183,16 @@ const Endpoint11_1 = (raw) => (input) => raw["credential.remove"]({
|
|
|
183
183
|
query: { location: input["location"] },
|
|
184
184
|
}).pipe(Effect.mapError(mapClientError));
|
|
185
185
|
const adaptGroup11 = (raw) => ({ update: Endpoint11_0(raw), remove: Endpoint11_1(raw) });
|
|
186
|
-
const Endpoint12_0 = (raw) => (
|
|
187
|
-
const Endpoint12_1 = (raw) => (input) => raw["project.
|
|
186
|
+
const Endpoint12_0 = (raw) => () => raw["project.list"]({}).pipe(Effect.mapError(mapClientError));
|
|
187
|
+
const Endpoint12_1 = (raw) => (input) => raw["project.current"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError));
|
|
188
|
+
const Endpoint12_2 = (raw) => (input) => raw["project.directories"]({
|
|
188
189
|
params: { projectID: input["projectID"] },
|
|
189
190
|
query: { location: input["location"] },
|
|
190
191
|
}).pipe(Effect.mapError(mapClientError));
|
|
191
192
|
const adaptGroup12 = (raw) => ({
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
list: Endpoint12_0(raw),
|
|
194
|
+
current: Endpoint12_1(raw),
|
|
195
|
+
directories: Endpoint12_2(raw),
|
|
194
196
|
});
|
|
195
197
|
const Endpoint13_0 = (raw) => (input) => raw["form.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError));
|
|
196
198
|
const Endpoint13_1 = (raw) => (input) => raw["session.form.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HealthGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionCreateInput, SessionActiveOutput, SessionGetInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionListContextEntriesInput, SessionPutContextEntryInput, SessionRemoveContextEntryInput, 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, 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, EventChangesOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, QuestionListRequestsInput, QuestionListRequestsOutput, QuestionListInput, QuestionReplyInput, QuestionRejectInput, ReferenceListInput, ReferenceListOutput, ProjectCopyCreateInput, ProjectCopyCreateOutput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationOutput } from "./types";
|
|
1
|
+
import type { HealthGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionCreateInput, SessionActiveOutput, SessionGetInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionListContextEntriesInput, SessionPutContextEntryInput, SessionRemoveContextEntryInput, 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, EventChangesOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, QuestionListRequestsInput, QuestionListRequestsOutput, QuestionListInput, QuestionReplyInput, QuestionRejectInput, ReferenceListInput, ReferenceListOutput, ProjectCopyCreateInput, ProjectCopyCreateOutput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationOutput } from "./types";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -859,6 +859,7 @@ export declare function make(options: ClientOptions): {
|
|
|
859
859
|
remove: (input: CredentialRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
860
860
|
};
|
|
861
861
|
project: {
|
|
862
|
+
list: (requestOptions?: RequestOptions) => Promise<ProjectListOutput>;
|
|
862
863
|
current: (input?: ProjectCurrentInput, requestOptions?: RequestOptions) => Promise<ProjectCurrentOutput>;
|
|
863
864
|
directories: (input: ProjectDirectoriesInput, requestOptions?: RequestOptions) => Promise<ProjectDirectoriesOutput>;
|
|
864
865
|
};
|
|
@@ -530,6 +530,7 @@ export function make(options) {
|
|
|
530
530
|
}, requestOptions),
|
|
531
531
|
},
|
|
532
532
|
project: {
|
|
533
|
+
list: (requestOptions) => request({ method: "GET", path: `/api/project`, successStatus: 200, declaredStatuses: [401, 400], empty: false }, requestOptions),
|
|
533
534
|
current: (input, requestOptions) => request({
|
|
534
535
|
method: "GET",
|
|
535
536
|
path: `/api/project/current`,
|
|
@@ -3649,6 +3649,26 @@ export type CredentialRemoveInput = {
|
|
|
3649
3649
|
}["location"];
|
|
3650
3650
|
};
|
|
3651
3651
|
export type CredentialRemoveOutput = void;
|
|
3652
|
+
export type ProjectListOutput = ReadonlyArray<{
|
|
3653
|
+
readonly id: string;
|
|
3654
|
+
readonly worktree: string;
|
|
3655
|
+
readonly vcs?: "git" | "hg";
|
|
3656
|
+
readonly name?: string;
|
|
3657
|
+
readonly icon?: {
|
|
3658
|
+
readonly url?: string;
|
|
3659
|
+
readonly override?: string;
|
|
3660
|
+
readonly color?: string;
|
|
3661
|
+
};
|
|
3662
|
+
readonly commands?: {
|
|
3663
|
+
readonly start?: string;
|
|
3664
|
+
};
|
|
3665
|
+
readonly time: {
|
|
3666
|
+
readonly created: number;
|
|
3667
|
+
readonly updated: number;
|
|
3668
|
+
readonly initialized?: number;
|
|
3669
|
+
};
|
|
3670
|
+
readonly sandboxes: ReadonlyArray<string>;
|
|
3671
|
+
}>;
|
|
3652
3672
|
export type ProjectCurrentInput = {
|
|
3653
3673
|
readonly location?: {
|
|
3654
3674
|
readonly location?: {
|
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-
|
|
4
|
+
"version": "0.0.0-next-14957",
|
|
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-
|
|
45
|
-
"@opencode-ai/protocol": "0.0.0-next-
|
|
44
|
+
"@opencode-ai/schema": "0.0.0-next-14957",
|
|
45
|
+
"@opencode-ai/protocol": "0.0.0-next-14957"
|
|
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-
|
|
57
|
+
"@opencode-ai/httpapi-codegen": "0.0.0-next-14957",
|
|
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",
|